diff --git a/site/source/components/PaySlip.tsx b/site/source/components/PaySlip.tsx index 45ed5e9ee..8903e91e7 100644 --- a/site/source/components/PaySlip.tsx +++ b/site/source/components/PaySlip.tsx @@ -3,7 +3,6 @@ import { ASTNode, ParsedRules, reduceAST, Rule, RuleNode } from 'publicodes' import { Fragment } from 'react' import { Trans } from 'react-i18next' -import RuleLink from '@/components/RuleLink' import { useEngine } from '@/components/utils/EngineContext' import { Strong } from '@/design-system/typography' import { H4, H5 } from '@/design-system/typography/heading' @@ -145,20 +144,6 @@ export default function PaySlip() { ) })} - {/* Réductions */} - - - - - {/* Total cotisation */} diff --git a/site/source/components/PaySlipCotisation.tsx b/site/source/components/PaySlipCotisation.tsx index b6cc8fb5b..f9e8f3da2 100644 --- a/site/source/components/PaySlipCotisation.tsx +++ b/site/source/components/PaySlipCotisation.tsx @@ -21,6 +21,7 @@ export default function Cotisation({ dottedName }: { dottedName: DottedName }) { engine.getRule('salarié . cotisations . employeur') ) ?? '0' ) + const signePlusOuMoins = isExoneration(dottedName) ? '-' : '' if (!partPatronale.nodeValue && !partSalariale.nodeValue) { return null @@ -31,18 +32,24 @@ export default function Cotisation({ dottedName }: { dottedName: DottedName }) { {partPatronale?.nodeValue - ? formatValue(partPatronale, { displayedUnit: '€', language }) + ? signePlusOuMoins + + formatValue(partPatronale, { displayedUnit: '€', language }) : '–'} {partSalariale?.nodeValue - ? formatValue(partSalariale, { displayedUnit: '€', language }) + ? signePlusOuMoins + + formatValue(partSalariale, { displayedUnit: '€', language }) : '–'} ) } +function isExoneration(dottedName: DottedName): boolean { + return dottedName === 'salarié . cotisations . exonérations' +} + function findReferenceInNode( dottedName: DottedName, node: ASTNode