diff --git a/packages/app/src/common/core-domain/domain/valueObjects/declaration/declarationInfo/DeclarationIndicatorsYear.ts b/packages/app/src/common/core-domain/domain/valueObjects/declaration/declarationInfo/DeclarationIndicatorsYear.ts index 84c1d00a2..053c0ec83 100644 --- a/packages/app/src/common/core-domain/domain/valueObjects/declaration/declarationInfo/DeclarationIndicatorsYear.ts +++ b/packages/app/src/common/core-domain/domain/valueObjects/declaration/declarationInfo/DeclarationIndicatorsYear.ts @@ -1,8 +1,8 @@ -import { YEARS } from "@common/dict"; +import { ALL_YEARS } from "@common/dict"; import { TupleNumber } from "@common/shared-domain/domain/valueObjects/TupleNumber"; export class DeclarationIndicatorsYear extends TupleNumber { constructor(value: number) { - super(value, YEARS); + super(value, ALL_YEARS); } } diff --git a/packages/app/src/common/dict.ts b/packages/app/src/common/dict.ts index 72ec58d3b..607d5a7ae 100644 --- a/packages/app/src/common/dict.ts +++ b/packages/app/src/common/dict.ts @@ -23,7 +23,7 @@ export const OPMC_OPEN_DURATION_AFTER_EDIT = 2; export const CURRENT_YEAR = 2024 as const; /** Need to be set */ export const PUBLIC_CURRENT_YEAR = 2023; - +export const ALL_YEARS = times(CURRENT_YEAR - FIRST_YEAR + 1, idx => FIRST_YEAR + idx); export const YEARS = times(CURRENT_YEAR - FIRST_DECLARATION_YEAR + 1, idx => FIRST_DECLARATION_YEAR + idx); export const ADMIN_YEARS = times(CURRENT_YEAR - FIRST_YEAR + 1, idx => FIRST_YEAR + idx); export const REPEQ_ADMIN_YEARS = times(CURRENT_YEAR - FIRST_YEAR_REPEQ + 1, idx => FIRST_YEAR_REPEQ + idx);