diff --git a/site/source/pages/simulateurs/reduction-generale/Basique.tsx b/site/source/pages/simulateurs/reduction-generale/Basique.tsx new file mode 100644 index 000000000..a2dcea4b5 --- /dev/null +++ b/site/source/pages/simulateurs/reduction-generale/Basique.tsx @@ -0,0 +1,54 @@ +import { useTranslation } from 'react-i18next' + +import { Condition } from '@/components/EngineValue/Condition' +import { SimulationGoal } from '@/components/Simulation' +import { SimulationValue } from '@/components/Simulation/SimulationValue' +import { Message } from '@/design-system' +import { Spacing } from '@/design-system/layout' +import { Body } from '@/design-system/typography/paragraphs' + +import Répartition from './components/Répartition' +import Warnings from './components/Warnings' +import WarningSalaireTrans from './components/WarningSalaireTrans' +import { + réductionGénéraleDottedName, + rémunérationBruteDottedName, +} from './utils' + +type Props = { + onUpdate: () => void +} + +export default function RéductionGénéraleBasique({ onUpdate }: Props) { + const { t } = useTranslation() + + return ( + <> + + + + 1.6 * SMIC`}> + + + + + + + + = 0`}> + + + + + + ) +} diff --git a/site/source/pages/simulateurs/reduction-generale/Goals.tsx b/site/source/pages/simulateurs/reduction-generale/Goals.tsx index 9da9528e9..9b6ebc255 100644 --- a/site/source/pages/simulateurs/reduction-generale/Goals.tsx +++ b/site/source/pages/simulateurs/reduction-generale/Goals.tsx @@ -1,25 +1,17 @@ import { DottedName } from 'modele-social' import { PublicodesExpression } from 'publicodes' import { useCallback, useEffect, useRef, useState } from 'react' -import { useTranslation } from 'react-i18next' import { useDispatch, useSelector } from 'react-redux' -import { Condition } from '@/components/EngineValue/Condition' -import { SimulationGoal, SimulationGoals } from '@/components/Simulation' -import { SimulationValue } from '@/components/Simulation/SimulationValue' +import { SimulationGoals } from '@/components/Simulation' import { useEngine } from '@/components/utils/EngineContext' import useYear from '@/components/utils/useYear' -import { Message } from '@/design-system' -import { Spacing } from '@/design-system/layout' -import { Body } from '@/design-system/typography/paragraphs' import { SimpleRuleEvaluation } from '@/domaine/engine/SimpleRuleEvaluation' import { Situation } from '@/domaine/Situation' import { ajusteLaSituation } from '@/store/actions/actions' import { situationSelector } from '@/store/selectors/simulationSelectors' -import Répartition from './components/Répartition' -import Warnings from './components/Warnings' -import WarningSalaireTrans from './components/WarningSalaireTrans' +import RéductionGénéraleBasique from './Basique' import RéductionGénéraleMoisParMois from './MoisParMois' import { getInitialRéductionGénéraleMoisParMois, @@ -27,7 +19,6 @@ import { heuresSupplémentairesDottedName, MonthState, Options, - réductionGénéraleDottedName, reevaluateRéductionGénéraleMoisParMois, RégularisationMethod, rémunérationBruteDottedName, @@ -57,7 +48,6 @@ export default function RéductionGénéraleSimulationGoals({ }) { const engine = useEngine() const dispatch = useDispatch() - const { t } = useTranslation() const [réductionGénéraleMoisParMoisData, setData] = useState([]) const year = useYear() const situation = useSelector(situationSelector) as SituationType @@ -196,33 +186,9 @@ export default function RéductionGénéraleSimulationGoals({ onOptionsChange={onOptionsChange} /> ) : ( - <> - - - - 1.6 * SMIC`}> - - - - - - - - = 0`}> - - - - - + )} )