From d3014b43913a0876bc1979f2eb11d2e3dba2bf65 Mon Sep 17 00:00:00 2001 From: Riron Date: Sat, 16 May 2026 15:13:42 +0200 Subject: [PATCH 1/7] Add csf changes --- .../AdditionalInformations.svelte | 149 ++++++++++++------ apps/frontend/src/lib/utils/seo.ts | 5 + .../src/routes/groupe-csf/+page.svelte | 93 +++++++++++ .../[slug]/content.ts | 18 +++ .../steps/+page.spec.ts | 12 ++ 5 files changed, 231 insertions(+), 46 deletions(-) create mode 100644 apps/frontend/src/routes/groupe-csf/+page.svelte diff --git a/apps/frontend/src/lib/components/pages/simulateur-eligibilite/steps/SearchInformations/AdditionalInformations.svelte b/apps/frontend/src/lib/components/pages/simulateur-eligibilite/steps/SearchInformations/AdditionalInformations.svelte index 3d957d11..16a86c53 100644 --- a/apps/frontend/src/lib/components/pages/simulateur-eligibilite/steps/SearchInformations/AdditionalInformations.svelte +++ b/apps/frontend/src/lib/components/pages/simulateur-eligibilite/steps/SearchInformations/AdditionalInformations.svelte @@ -88,7 +88,12 @@ ...publicSectorSchema, }); } else if (employmentStatus === 'SALARIE_PUBLIC_OU_FONCTIONNAIRE') { - schema = schema.extend(publicSectorSchema); + schema = schema.extend({ + allowFinancingAndOwnershipAdvices: z.boolean({ + message: stepsContent.allowFinancingAndOwnershipAdvices.errorMessage, + }), + ...publicSectorSchema, + }); } else if (employmentStatus === 'SALARIE_PRIVE_NON_AGRICOLE') { schema = schema.extend({ hasCompanyMoreThan10Employees: z.boolean({ @@ -280,51 +285,6 @@ {@render publicSector()} {/snippet} -{#snippet publicSector()} -
- ({ - ...stepContent, - selected: positionStage === stepContent.value, - }))} - onChange={(e) => { - const { value } = e.target as HTMLSelectElement; - - if (value) { - delete errors.positionStage; - } - - eligibilitySimulatorManager.positionStage = - value === '' ? undefined : value === 'true' ? true : false; - }} - error={errors.positionStage} - errorDataTestId={stepsContent.positionStage.errorDataTestId} /> -
-{/snippet} - {#snippet privateSector()}
({ + ...stepContent, + selected: allowFinancingAndOwnershipAdvices === stepContent.value, + }), + )} + onChange={(e) => { + const { value } = e.target as HTMLSelectElement; + + if (value) { + delete errors.allowFinancingAndOwnershipAdvices; + } + + eligibilitySimulatorManager.allowFinancingAndOwnershipAdvices = + value === '' ? undefined : value === 'true' ? true : false; + }} + error={errors.allowFinancingAndOwnershipAdvices} + errorDataTestId={stepsContent.allowFinancingAndOwnershipAdvices + .errorDataTestId} /> + + {#if allowFinancingAndOwnershipAdvices} +

+ + Prendre rendez-vous avec un.e conseiller.e. + +

+ {/if} +
+{/snippet} + +{#snippet publicSector()} + {@render csfFinancingAndOwnershipAdvices()} + +
+ ({ + ...stepContent, + selected: positionStage === stepContent.value, + }))} + onChange={(e) => { + const { value } = e.target as HTMLSelectElement; + + if (value) { + delete errors.positionStage; + } + + eligibilitySimulatorManager.positionStage = + value === '' ? undefined : value === 'true' ? true : false; + }} + error={errors.positionStage} + errorDataTestId={stepsContent.positionStage.errorDataTestId} /> +
+{/snippet} + {#snippet positionContractTypeSnippet()}