mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-02-11 00:25:02 +00:00
fix(lodeom): corrige l'affichage des avertissements
This commit is contained in:
parent
5409f6aa27
commit
4c2ee31604
4 changed files with 19 additions and 16 deletions
|
@ -781,6 +781,7 @@ salarié . cotisations . exonérations . JEI:
|
|||
- allocations familiales . taux réduit
|
||||
- maladie . employeur . taux réduit
|
||||
- lodeom
|
||||
- zones lodeom
|
||||
|
||||
salarié . cotisations . exonérations . JEI . montant:
|
||||
titre: Exonération JEI
|
||||
|
|
|
@ -21,18 +21,18 @@ import {
|
|||
type Props = {
|
||||
dottedName: RéductionDottedName
|
||||
onUpdate: () => void
|
||||
warnings: ReactNode
|
||||
warningCondition: PublicodesExpression
|
||||
warningMessage: ReactNode
|
||||
warnings?: ReactNode
|
||||
withRépartition?: boolean
|
||||
}
|
||||
|
||||
export default function RéductionBasique({
|
||||
dottedName,
|
||||
onUpdate,
|
||||
warnings,
|
||||
warningCondition,
|
||||
warningMessage,
|
||||
warnings,
|
||||
withRépartition = true,
|
||||
}: Props) {
|
||||
const engine = useEngine()
|
||||
|
|
|
@ -24,9 +24,9 @@ type Props = {
|
|||
onRémunérationChange: (monthIndex: number, rémunérationBrute: number) => void
|
||||
onOptionsChange: (monthIndex: number, options: Options) => void
|
||||
caption: string
|
||||
warnings: ReactNode
|
||||
warningCondition: PublicodesExpression
|
||||
warningTooltip: ReactNode
|
||||
warnings?: ReactNode
|
||||
codeRéduction?: string
|
||||
codeRégularisation?: string
|
||||
withRépartitionAndRégularisation?: boolean
|
||||
|
@ -38,9 +38,9 @@ export default function RéductionMoisParMois({
|
|||
onRémunérationChange,
|
||||
onOptionsChange,
|
||||
caption,
|
||||
warnings,
|
||||
warningCondition,
|
||||
warningTooltip,
|
||||
warnings,
|
||||
codeRéduction,
|
||||
codeRégularisation,
|
||||
withRépartitionAndRégularisation = true,
|
||||
|
|
|
@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { WhenApplicable } from '@/components/EngineValue/WhenApplicable'
|
||||
import RéductionBasique from '@/components/RéductionDeCotisations/RéductionBasique'
|
||||
import RéductionMoisParMois from '@/components/RéductionDeCotisations/RéductionMoisParMois'
|
||||
import { SimulationGoals } from '@/components/Simulation'
|
||||
|
@ -114,16 +115,19 @@ export default function LodeomSimulationGoals({
|
|||
|
||||
return (
|
||||
<SimulationGoals toggles={toggles} legend={legend}>
|
||||
{!currentBarème && (
|
||||
<Message type="info">
|
||||
<Body>
|
||||
{t(
|
||||
'pages.simulateurs.lodeom.warnings.barème',
|
||||
'Veuillez sélectionner une localisation et un barème pour accéder au simulateur.'
|
||||
)}
|
||||
</Body>
|
||||
</Message>
|
||||
)}
|
||||
<Warnings />
|
||||
<WhenApplicable dottedName="salarié . cotisations . exonérations . zones lodeom">
|
||||
{!currentBarème && (
|
||||
<Message type="info">
|
||||
<Body>
|
||||
{t(
|
||||
'pages.simulateurs.lodeom.warnings.barème',
|
||||
'Veuillez sélectionner une localisation et un barème pour accéder au simulateur.'
|
||||
)}
|
||||
</Body>
|
||||
</Message>
|
||||
)}
|
||||
</WhenApplicable>
|
||||
{currentBarème &&
|
||||
(monthByMonth ? (
|
||||
<RéductionMoisParMois
|
||||
|
@ -135,7 +139,6 @@ export default function LodeomSimulationGoals({
|
|||
'pages.simulateurs.lodeom.month-by-month.caption',
|
||||
'Exonération Lodeom mois par mois :'
|
||||
)}
|
||||
warnings={<Warnings />}
|
||||
warningCondition={`${lodeomDottedName} = 0`}
|
||||
warningTooltip={<WarningSalaireTrans />}
|
||||
codeRéduction={
|
||||
|
@ -156,7 +159,6 @@ export default function LodeomSimulationGoals({
|
|||
<RéductionBasique
|
||||
dottedName={lodeomDottedName}
|
||||
onUpdate={initializeLodeomMoisParMoisData}
|
||||
warnings={<Warnings />}
|
||||
warningCondition={`${lodeomDottedName} = 0`}
|
||||
warningMessage={<WarningSalaireTrans />}
|
||||
withRépartition={currentZone === 'zone un'}
|
||||
|
|
Loading…
Add table
Reference in a new issue