Skip to content

Commit

Permalink
feat(indemnite-licenciement): ajout de l'outil de rupture conventionn…
Browse files Browse the repository at this point in the history
…elle (#5703)

* feat(indemnite-licenciement): use calculate from information step

* start

* feat(indemnite-licenciement): gestion des ANI avec plusieurs types de rupture

* feat(indemnite-licenciement): mise en place du frontend

* feat(indemnite-licenciement): changement du wording pour la rupture conventionnelle

* fix(indemnite-licenciement): modification du wording

* fix(indemnite-licenciement): fix unit test

* fix(indemnite-licenciement): fix build

* feat(indemnite-licenciement): gestion de l'ineligibilité

* feat(indemnite-licenciement): changement du wording pour la rupture conventionnelle

* fix: unit test + lint

* fix: unit test

* fix: unit test

* fix: unit test

* fix: import optimization

* empty commit

* Update packages/code-du-travail-modeles/src/publicodes/RuptureConventionnellePublicodes.ts

Co-authored-by: Caroline <[email protected]>

* feat: suppression de la question sur l'inaptitude

* feat: merge des missing args

* chore(deps): bump express from 4.18.2 to 4.19.2 (#5717)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: mauvais texte pour afficher le résultat de l'indemnite de licenciement

* feat(rupture co): refacto pour faire la comparaison du legal et du conventionnel côté modèle (#5734)

* feat: amélioration du calcul si plusieurs types de rupture

* fix: feedbacks

* fix: default choosen result (#5758)

* feat(rupture-co): ajout du support des CCs hors ANI (#5755)

* fix: done

* fix: done

* fix: build encore

* feat(rupture-co): ajout de la CC 1501 ; 1996 ; 44 (#5756)

* fix: done

* fix: done

* fix: done

* fix: done

* fix: done

* fix: done

* Update packages/code-du-travail-modeles/src/modeles/conventions/1501_restauration_rapide/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1501_restauration_rapide/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1996_pharmacie/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/44_industries_chimiques/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1996_pharmacie/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/44_industries_chimiques/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* fix: build encore

* fix(ani): done

* fix(ani): done

---------

Co-authored-by: Martial Maillot <[email protected]>

* refactor: calculate indemnite licenciement rupture (#5773)

* refactor: indemnite-licenciement et rupture conv

* fix: tests

* merge dev

* fix: tests

* chore: clean

* chore: clena

* fix: test

* chore: build fix

* fix: formule erreur

* chore: rename test

* fix: licenciement indemnite test

* fix: error when inaptitude = true

* chore: clean

* refactor: getFormule

* chore: clean

* fix: tests

* feat: filtré les résultats valeur 0

---------

Co-authored-by: Victor <[email protected]>

* feat(rupture-co): ajout de la CC 2098 ; 1486 (#5782)

* fix: done

* fix: done

* fix: done

* fix: done

* fix: done

* fix: done

* Update packages/code-du-travail-modeles/src/modeles/conventions/1501_restauration_rapide/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1501_restauration_rapide/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1996_pharmacie/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/44_industries_chimiques/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/1996_pharmacie/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* Update packages/code-du-travail-modeles/src/modeles/conventions/44_industries_chimiques/__tests__/rupture-conventionnelle/calculate.spec.ts

Co-authored-by: Martial Maillot <[email protected]>

* fix: build encore

* fix(ani): done

* fix(ani): done

* fix(ani): done

* fix(ani): done

* fix(ani): done

* fix(e2e): set number of idcc for h2 in contributions

---------

Co-authored-by: Martial Maillot <[email protected]>

* fix: merge

* feat(rupture-co): ajout de la 2216, 1702 et 2120 (#5759)

* feat(RC): implement 2216 and 1702

* ajout de la 2120

* fix: rebase

* fix: calculate

* fix: calculate

---------

Co-authored-by: Martial Maillot <[email protected]>

* fix: test

* fix: unit test...

* feat(rupture-co): gestion de la convention collective 16 (#5780)

* feat(events): utilisation d'events différents entre la rupture-co et l'indemnite-licenciement (#5771)

* fix: merge

* fix: event

* fix: event

* fix: event

* fix: finito

* fix: finito

* fix: import

* feat(rupture-co): ajout d'un point d'aide à l'étape ancienneté (#5809)

* fix: disable other

* feat: 5790 indemnit de rupture conventionnelle exclure les cdi doprations de la simulation pour la 1404 (#5805)

* feat: impolement no cdi operation RC

* refactor: move rule to yaml

---------

Co-authored-by: Victor <[email protected]>

* feat: update wordings step salary (#5804)

Co-authored-by: Victor <[email protected]>

* feat: 5788 indemnit de rupture conventionnelle message dingibilit en cas de cdd (#5799)

* feat: implement html for ineligibility

* feat: add specific eligibility case for 3239

* feat: add specific eligibility case for 3239

* chore: review

* chore: ts fix

* chore: update build

* chore: update TU

---------

Co-authored-by: Victor <[email protected]>

* feat: implement 675 rupture co (#5797)

* refactor: indemnite-licenciement et rupture conv

* fix: tests

* merge dev

* fix: tests

* chore: clean

* chore: clena

* fix: test

* chore: build fix

* feat: implement 675 rupture co

* fix: formule erreur

* chore: rename test

* fix: licenciement indemnite test

* fix: error when inaptitude = true

* chore: clean

* refactor: getFormule

* chore: TU

* chore: TU

* chore: clean

* fix: tests

* chore: clean

* chore: clean

* fix: TU

---------

Co-authored-by: Victor <[email protected]>

* feat(rupture-co): changement du wording sur les questions (#5802)

* feat(rupture-co): changement du wording sur les questions

* feat(rupture-co): désactiver licenciement pour motif absence prolongée ou répétées dans la CC 3248

* feat(rupture-co): correction sur les tests de la CC 16

* feat(rupture-co): fix unit test

* feat(rupture-co): refacto sur le retour du calculate (#5812)

* feat(rupture-co): refacto sur le retour du calculate

* feat(rupture-co): fix unit test

* feat(rupture-co): ajout de l'icone pour la rupture conventionnelle (#5814)

* feat: 5783 indemnité rupture conventionnelle test UI (#5810)

* feat: add TU RC

* cd '/home/victor/Workspace/dnum/code-du-travail-numerique'

* feat: add test 1404 3239 + fix

* chore: clean

* chore: update TU

---------

Co-authored-by: Victor <[email protected]>

* feat(rupture-co): ajout d'un message lors de la selection d'une CC hors ANI (#5811)

* fix: merge

* fix: done

* fix: test

* fix: test

* fix: merge

* fix: disable other

* fix: disable other

* fix: disable other

* fix: disable other

* fix: snapshot

* fix: snapshot

* fix: snapshot

* fix: snapshot

* fix: snapshot

* fix: test

* fix: test

* Revert "fix: test"

This reverts commit d31819c.

* Revert "fix: test"

This reverts commit d625544.

* fix: unit test

* fix: test

* fix: test

---------

Co-authored-by: Martial Maillot <[email protected]>

* fix: jest perf

* fix: upgrade jest

* fix: upgrade jest

* fix: upgrade jest

* fix: upgrade jest

* fix: icon

* feat(rupture-co): corrections suite aux tests (#5827)

* fix(rupture-co): modification wording pour la CC 2120 (#5821)

* fix(modeles): optimisation de la taille de la lib exportée (#5822)

* fix: opti

* fix: jest config

* fix: types

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: carolineBda <[email protected]>
Co-authored-by: Caroline <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maxime Golfier <[email protected]>
Co-authored-by: Victor Zeinstra <[email protected]>
Co-authored-by: Victor <[email protected]>
  • Loading branch information
7 people authored Apr 29, 2024
1 parent b94bf4c commit 27962be
Show file tree
Hide file tree
Showing 479 changed files with 10,377 additions and 3,887 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ yarn test:e2e:ui # To run e2e test with Cypress UI
## License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSocialGouv%2Fcode-du-travail-numerique.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSocialGouv%2Fcode-du-travail-numerique?ref=badge_large)

3 changes: 2 additions & 1 deletion packages/code-du-travail-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const customJestConfig = {
"<rootDir>/node_modules/",
"<rootDir>/cypress/",
],
testTimeout: 20000
testTimeout: 20000,
maxWorkers: "80%",
};

module.exports = createJestConfig(customJestConfig);
6 changes: 3 additions & 3 deletions packages/code-du-travail-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@
"@testing-library/user-event": "^13.5.0",
"@types/cors": "^2.8.13",
"@types/debounce-promise": "^3.1.4",
"@types/jest": "^29.5.0",
"@types/jest": "^29.5.12",
"@types/react-autosuggest": "^10.1.6",
"cypress": "12.17.4",
"cypress-iframe": "^1.0.1",
"eslint": "8.57.0",
"eslint-config-next": "14.1.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-storybook": "^0.8.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^13.0.0",
"mockdate": "^3.0.5",
"nextjs-http-supertest": "^1.0.6",
Expand Down
8 changes: 5 additions & 3 deletions packages/code-du-travail-frontend/pages/outils/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Sentry from "@sentry/nextjs";
import { SOURCES } from "@socialgouv/cdtn-utils";
import { Container, Section, theme } from "@socialgouv/cdtn-ui";
import { Container, theme } from "@socialgouv/cdtn-ui";
import { push as matopush } from "@socialgouv/matomo-next";
import { GetServerSideProps } from "next";
import { useRouter } from "next/router";
Expand All @@ -15,7 +15,8 @@ import { SITE_URL } from "../../src/config";
import { Layout } from "../../src/layout/Layout";
import {
AgreementSearch,
CalculateurIndemnite,
CalculateurIndemniteLicenciement,
CalculateurRuptureConventionnelle,
DismissalProcess,
DureePreavisDemission,
DureePreavisLicenciement,
Expand All @@ -29,13 +30,14 @@ import {
const toolsBySlug = {
"convention-collective": AgreementSearch,
"heures-recherche-emploi": HeuresRechercheEmploi,
"indemnite-licenciement": CalculateurIndemnite,
"indemnite-licenciement": CalculateurIndemniteLicenciement,
"indemnite-precarite": SimulateurIndemnitePrecarite,
"preavis-demission": DureePreavisDemission,
"preavis-licenciement": DureePreavisLicenciement,
"preavis-retraite": DureePreavisRetraite,
"simulateur-embauche": SimulateurEmbauche,
"procedure-licenciement": DismissalProcess,
"indemnite-rupture-conventionnelle": CalculateurRuptureConventionnelle,
};

export interface Props {
Expand Down
3 changes: 2 additions & 1 deletion packages/code-du-travail-frontend/pages/outils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ export async function getStaticProps() {
} else {
result = await getToolsByIdsAndSlugs();
}
const isProd = process.env.NEXT_PUBLIC_IS_PRODUCTION_DEPLOYMENT === "production"
const tools = result
.map(({ _id, _source }) => ({ ..._source, _id }))
.filter((tool) => tool.displayTool);
.filter((tool) => isProd ? tool.displayTool : true);

return {
props: {
Expand Down
4 changes: 2 additions & 2 deletions packages/code-du-travail-frontend/pages/widgets/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Footer } from "../../src/widgets";

import {
AgreementSearch,
CalculateurIndemnite,
CalculateurIndemniteLicenciement,
DismissalProcess,
DureePreavisDemission,
DureePreavisLicenciement,
Expand All @@ -22,7 +22,7 @@ const toolsBySlug = {
"preavis-licenciement": DureePreavisLicenciement,
"preavis-retraite": DureePreavisRetraite,
"procedure-licenciement": DismissalProcess,
"indemnite-licenciement": CalculateurIndemnite,
"indemnite-licenciement": CalculateurIndemniteLicenciement,
"indemnite-precarite": SimulateurIndemnitePrecarite,
"convention-collective": AgreementSearch,
"preavis-demission": DureePreavisDemission,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { Paragraph, theme } from "@socialgouv/cdtn-ui";
import React, { ForwardedRef } from "react";
import styled from "styled-components";
import { LinkedTile, Props } from "./LinkedTile";
import { DirectionRight } from "@socialgouv/cdtn-ui/lib/icons";
import { icons } from "@socialgouv/cdtn-ui";

const { DirectionRight } = icons;

type CallToActionTileProps = Props & { action?: string };

Expand All @@ -20,7 +22,7 @@ export const CallToActionTile = React.forwardRef<
{action && (
<StyledDiv>
<Paragraph variant="primary" fontWeight="600">
{action} <DirectionRight></DirectionRight>
{action} <DirectionRight />
</Paragraph>
</StyledDiv>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { A11yLink } from "../common/A11yLink";
import DisplayContentContribution, {
ContentSP,
} from "./DisplayContentContribution";
import { Section } from "@socialgouv/cdtn-ui/lib";
import { Section } from "@socialgouv/cdtn-ui";

type Props = {
contribution:
Expand Down
1 change: 1 addition & 0 deletions packages/code-du-travail-frontend/src/lib/matomo/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export enum MatomoActionEvent {
PREAVIS_DEMISSION = "view_step_Préavis de démission",
PREAVIS_LICENCIEMENT = "view_step_Préavis de licenciement",
INDEMNITE_LICENCIEMENT = "view_step_Indemnité de licenciement",
RUPTURE_CONVENTIONNELLE = "view_step_Rupture conventionnelle",
VIEW_STEP = "view_step",
CLICK_PREVIOUS = "click_previous",
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { byTestId, byText, byTitle } from "testing-library-selector";
import {
byLabelText,
byTestId,
byText,
byTitle,
} from "testing-library-selector";

export const ui = {
introduction: {
Expand Down Expand Up @@ -98,6 +103,9 @@ export const ui = {
engineerAge: byTestId(
"infos.contrat salarié - convention collective - transports routiers - indemnité de licenciement - catégorie professionnelle - Ingénieurs et cadres - age"
),
ruptureEngineerAge: byTestId(
"infos.contrat salarié - convention collective - transports routiers - rupture conventionnelle - cadre age"
),
employeeAge: byTestId(
"infos.contrat salarié - convention collective - transports routiers - indemnité de licenciement - age"
),
Expand Down Expand Up @@ -149,16 +157,11 @@ export const ui = {
proCategory: byTestId(
"infos.contrat salarié - convention collective - industries chimiques - indemnité de licenciement - catégorie professionnelle"
),
economicFire: {
oui: byTestId(
"infos.contrat salarié - convention collective - industries chimiques - indemnité de licenciement - catégorie professionnelle - licenciement économique - Oui"
),
non: byTestId(
"infos.contrat salarié - convention collective - industries chimiques - indemnité de licenciement - catégorie professionnelle - licenciement économique - Non"
),
},
age: byTestId(
"infos.contrat salarié - convention collective - industries chimiques - indemnité de licenciement - catégorie professionnelle - licenciement économique - age"
"infos.contrat salarié - convention collective - industries chimiques - indemnité de licenciement - catégorie professionnelle - age"
),
ruptureAge: byTestId(
"infos.contrat salarié - convention collective - industries chimiques - rupture conventionnelle - age"
),
},
agreement2609: {
Expand Down Expand Up @@ -237,6 +240,9 @@ export const ui = {
age: byTestId(
"infos.contrat salarié - convention collective - commerces de gros - catégorie professionnelle - agents - licenciement économique - age"
),
ageRupture: byTestId(
"infos.contrat salarié - convention collective - commerces de gros - rupture conventionnelle - licenciement économique agents age"
),
},
agreement2120: {
proCategory: byTestId(
Expand Down Expand Up @@ -279,6 +285,9 @@ export const ui = {
age: byTestId(
"infos.contrat salarié - convention collective - ouvriers travaux public - indemnité de licenciement - age"
),
ruptureAge: byTestId(
"infos.contrat salarié - convention collective - ouvriers travaux public - rupture conventionnelle - age"
),
},
agreement3248: {
proCategory: byTestId(
Expand Down Expand Up @@ -336,6 +345,36 @@ export const ui = {
"infos.contrat salarié - convention collective - hospitalisation privée à but non lucratif - indemnité de licenciement - catégorie professionnelle"
),
},
agreement1501: {
proCategory: byTestId(
"infos.contrat salarié - convention collective - restauration rapide - indemnité de licenciement - catégorie professionnelle"
),
age: byTestId(
"infos.contrat salarié - convention collective - restauration rapide - indemnité de licenciement - licenciement économique - age"
),
ruptureAge: byTestId(
"infos.contrat salarié - convention collective - restauration rapide - rupture conventionnelle - age"
),
},
agreement2098: {
proCategory: byTestId(
"infos.contrat salarié - convention collective - personnel presta service tertiaire - autre licenciement - catégorie professionnelle"
),
age: byTestId(
"infos.contrat salarié - convention collective - personnel presta service tertiaire - rupture conventionnelle - cadre age"
),
},
agreement2216: {
proCategory: byTestId(
"infos.contrat salarié - convention collective - commerce gros et detail alimentation - indemnité de licenciement - catégorie professionnelle"
),
age: byTestId(
"infos.contrat salarié - convention collective - commerce gros et detail alimentation - indemnité de licenciement - catégorie professionnelle - licenciement économique - age"
),
ruptureAge: byTestId(
"infos.contrat salarié - convention collective - commerce gros et detail alimentation - rupture conventionnelle - licenciement économique age"
),
},
},
seniority: {
startDate: byTestId("date-entree"),
Expand Down Expand Up @@ -404,12 +443,21 @@ export const ui = {
resultat: byText(/À partir des éléments que vous avez saisis/),
resultatLegal: byText(/Montant prévu par le code du travail/),
resultatAgreement: byText(/Montant prévu par la convention collective/),
data: byText(/Éléments saisis/),
formula: byTestId("formula"),
legalError: {
title: byText(
"Il n'y a pas d'indemnité de licenciement dans cette situation"
),
cdd: byText(/L’indemnité de licenciement n’est pas due pour les CDD/),
ruptureTitle: byText(
"Il n'y a pas d'indemnité de rupture conventionnelle dans cette situation"
),
cddLicenciement: byText(
/L’indemnité de licenciement ne concerne pas les salariés en CDD et en contrat de travail temporaire/
),
cddRupture: byText(
/La rupture conventionnelle ne concerne pas les salariés en CDD ou en contrat de travail temporaire/
),
fauteGrave: byText(
/L’indemnité de licenciement n’est pas due en cas de faute grave/
),
Expand Down Expand Up @@ -459,6 +507,20 @@ export const ui = {
agreement3239: {
result: byText(/À partir des éléments que vous avez saisis/),
},
dismissalType: {
economic: byText(/Licenciement pour motif économique/),
mobility: byText(
/Le licenciement fait suite au refus d'une clause de mobilité/
),
inaptitude: byText(
/Licenciement pour inaptitude totale et définitive non consécutive à un accident du travail/
),
discipline: byText(/Licenciement pour motif disciplinaire/),
},
sources: byTestId("source-", { exact: false }),
source: (index: number) => byTestId(`source-${index}`),
notifications: byTestId("notification-", { exact: false }),
notification: (index: number) => byTestId(`notification-${index}`),
},
next: byText("Suivant"),
previous: byText("Précédent"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { useContext } from "react";
import { RadioQuestion } from "../../../Components";
import { SalaireTempsPlein } from "../../steps/Salaires/components";
import {
IndemniteLicenciementContext,
useIndemniteLicenciementStore,
IndemniteDepartContext,
useIndemniteDepartStore,
} from "../../store";

export default function Agreement1483() {
const store = useContext(IndemniteLicenciementContext);
const store = useContext(IndemniteDepartContext);
const {
noticeSalaryPeriods,
onSalariesChange,
Expand All @@ -17,7 +17,7 @@ export default function Agreement1483() {
errorHasReceivedSalaries,
noticePeriodsMoreThan3Months,
init,
} = useIndemniteLicenciementStore(store, (state) => ({
} = useIndemniteDepartStore(store, (state) => ({
noticeSalaryPeriods:
state.agreement1483Data.input.noticeSalaryPeriods ?? [],
onSalariesChange: state.agreement1483Function.onSalariesChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
StyledFilledElementTable,
} from "../../steps/Resultat/components/FilledElements";
import {
IndemniteLicenciementContext,
useIndemniteLicenciementStore,
IndemniteDepartContext,
useIndemniteDepartStore,
} from "../../store";

export default function Agreement1483Informations() {
const store = useContext(IndemniteLicenciementContext);
const store = useContext(IndemniteDepartContext);
const { noticeSalaryPeriods, hasReceivedSalaries } =
useIndemniteLicenciementStore(store, (state) => ({
useIndemniteDepartStore(store, (state) => ({
noticeSalaryPeriods:
state.agreement1483Data.input.noticeSalaryPeriods ?? [],
hasReceivedSalaries: state.agreement1483Data.input.hasReceivedSalaries,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { useContext } from "react";
import { RadioQuestion } from "../../../Components";
import { SalaireTempsPlein } from "../../steps/Salaires/components";
import {
IndemniteLicenciementContext,
useIndemniteLicenciementStore,
IndemniteDepartContext,
useIndemniteDepartStore,
} from "../../store";

export default function Agreement1516() {
const store = useContext(IndemniteLicenciementContext);
const store = useContext(IndemniteDepartContext);
const {
noticeSalaryPeriods,
onSalariesChange,
Expand All @@ -17,7 +17,7 @@ export default function Agreement1516() {
errorHasReceivedSalaries,
noticePeriodsMoreThan3Months,
init,
} = useIndemniteLicenciementStore(store, (state) => ({
} = useIndemniteDepartStore(store, (state) => ({
noticeSalaryPeriods:
state.agreement1516Data.input.noticeSalaryPeriods ?? [],
onSalariesChange: state.agreement1516Function.onSalariesChange,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
StyledFilledElementTable,
} from "../../steps/Resultat/components/FilledElements";
import {
IndemniteLicenciementContext,
useIndemniteLicenciementStore,
IndemniteDepartContext,
useIndemniteDepartStore,
} from "../../store";

export default function Agreement1516Informations() {
const store = useContext(IndemniteLicenciementContext);
const store = useContext(IndemniteDepartContext);
const { noticeSalaryPeriods, hasReceivedSalaries } =
useIndemniteLicenciementStore(store, (state) => ({
useIndemniteDepartStore(store, (state) => ({
noticeSalaryPeriods:
state.agreement1516Data.input.noticeSalaryPeriods ?? [],
hasReceivedSalaries: state.agreement1516Data.input.hasReceivedSalaries,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { useContext } from "react";
import { RadioQuestion } from "../../../Components";
import {
IndemniteLicenciementContext,
useIndemniteLicenciementStore,
IndemniteDepartContext,
useIndemniteDepartStore,
} from "../../store";

export default function Agreement1527() {
const store = useContext(IndemniteLicenciementContext);
const store = useContext(IndemniteDepartContext);
const { hasCommission, onChangeHasCommission, errorHasCommission } =
useIndemniteLicenciementStore(store, (state) => ({
useIndemniteDepartStore(store, (state) => ({
hasCommission: state.agreement1527Data.input.hasCommission,
onChangeHasCommission: state.agreement1527Function.onChangeHasCommission,
errorHasCommission: state.agreement1527Data.error.errorHasCommission,
Expand Down
Loading

0 comments on commit 27962be

Please sign in to comment.