From 94245067bde21285083792819b3098303e1516b3 Mon Sep 17 00:00:00 2001 From: Allan - CodeWorks Date: Tue, 5 Dec 2023 15:24:38 +0100 Subject: [PATCH] =?UTF-8?q?Envoi=20le=20statut=20de=20CEJ=20=C3=A0=20openf?= =?UTF-8?q?isca?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/lib/openfisca/mapping/individu/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/lib/openfisca/mapping/individu/index.ts b/backend/lib/openfisca/mapping/individu/index.ts index 80d34202f4..999fbc5f79 100644 --- a/backend/lib/openfisca/mapping/individu/index.ts +++ b/backend/lib/openfisca/mapping/individu/index.ts @@ -12,6 +12,8 @@ import { findCommuneByInseeCode, } from "../../../mes-aides/distance.js" +import common from "../common.js" + import { Activite } from "../../../../../lib/enums/activite.js" import { IndividuGenerator } from "../../../../../lib/types/individu.js" @@ -141,6 +143,12 @@ const individuSchema: IndividuGenerator = { : "non_agricole" }, }, + sous_contrat_engagement_jeune: { + fn: function (individu, situation) { + const periods = common.getPeriods(situation.dateDeValeur) + return individu.contrat_engagement_jeune[periods.thisMonth] > 0 + }, + }, } function isNotValidValue(value) {