Répare le bug sur le toggle IR/IS
parent
881ecb8b7d
commit
b1cba47f13
|
@ -40,7 +40,7 @@ type Props<Names extends string = DottedName> = Omit<
|
|||
// cf .https://github.com/betagouv/mon-entreprise/issues/1489#issuecomment-823058710
|
||||
showDefaultDateValue?: boolean
|
||||
onSubmit?: (source: string) => void
|
||||
type?: 'radio' | 'card' | 'toggle' | 'select'
|
||||
inputType?: 'radio' | 'card' | 'toggle' | 'select'
|
||||
formatOptions?: Intl.NumberFormatOptions
|
||||
displayedUnit?: string
|
||||
modifiers?: Record<string, string>
|
||||
|
@ -73,7 +73,7 @@ export default function RuleInput<Names extends string = DottedName>({
|
|||
onSubmit = () => null,
|
||||
showDefaultDateValue = false,
|
||||
missing,
|
||||
type,
|
||||
inputType,
|
||||
modifiers = {},
|
||||
...props
|
||||
}: Props<Names>) {
|
||||
|
@ -100,12 +100,12 @@ export default function RuleInput<Names extends string = DottedName>({
|
|||
const meta = getMeta<{ affichage?: string }>(rule.rawNode, {})
|
||||
|
||||
if (getVariant(engine.getRule(dottedName))) {
|
||||
type =
|
||||
type ??
|
||||
const type =
|
||||
inputType ??
|
||||
(meta.affichage &&
|
||||
['radio', 'card', 'toggle', 'select'].includes(meta.affichage))
|
||||
['radio', 'card', 'toggle', 'select'].includes(meta.affichage)
|
||||
? (meta.affichage as 'radio' | 'card' | 'toggle' | 'select')
|
||||
: 'radio'
|
||||
: 'radio')
|
||||
|
||||
return (
|
||||
<MultipleAnswerInput
|
||||
|
|
|
@ -294,18 +294,18 @@ Vous êtes dirigeant d'une SAS(U) ? <2>Accéder au simulateur de revenu dédié<
|
|||
aide: Help
|
||||
aide-déclaration-indépendant:
|
||||
banner: Find out more about our tax<1>return</1>tool
|
||||
description: <0><0>This tool is an aid for the declaration of income for
|
||||
<2>self-employed workers</2>. It allows you to know the amount of deductible
|
||||
social charges.</0><1>You remain entirely responsible for any omissions or
|
||||
description: <0><0>This tool is an aid to the declaration of income for the
|
||||
<2>self-employed</2>. It allows you to know the amount of deductible social
|
||||
charges.</0><1>You remain entirely responsible for any omissions or
|
||||
inaccuracies in your declaration.</1></0><1><0><0>This tool concerns you if
|
||||
you are in the following case:</0></0><1><0>You contribute to the general
|
||||
scheme for independent workers</0></1><2><0>It does not concern you if you
|
||||
are in one of the following cases:</0></2><3><0>You carry out a liberal
|
||||
activity covered by a pension scheme for the liberal professions in accrual
|
||||
are in one of the following cases:</0></2><3><0>You exercise a liberal
|
||||
activity under a pension scheme for liberal professions in accrual
|
||||
accounting</0><1>Your company is domiciled in the
|
||||
DOM</1></3></1><2></2><3>Taxation</3><4>These few questions allow you to
|
||||
determine the type of declaration to be completed, as well as the methods of
|
||||
calculating social contributions.</4>
|
||||
DOM</1></3></1><2>Taxation</2><3>These few questions allow you to determine
|
||||
the type of declaration to be filled in, as well as the methods of
|
||||
calculating the social contributions.</3>
|
||||
entreprise:
|
||||
description: You can fill in your company to pre-fill in the form
|
||||
titre: <0>Company and activity</0>
|
||||
|
@ -1247,7 +1247,7 @@ pages:
|
|||
meta:
|
||||
description: Find out which amounts to fill in and get an estimate of your 2022 dues
|
||||
title: Income tax return assistant for self-employed people
|
||||
shortname: Income Tax Wizard
|
||||
shortname: Income tax return wizard [beta]
|
||||
title: Income tax return assistant for self-employed people
|
||||
demande-mobilité:
|
||||
meta:
|
||||
|
|
|
@ -203,9 +203,9 @@ aide-déclaration-indépendant:
|
|||
cas suivants :</0></2><3><0>Vous exercez une activité libérale relevant d’un
|
||||
régime de retraite des professions libérales en comptabilité
|
||||
d'engagement</0><1>Votre entreprise est domiciliée dans les
|
||||
DOM</1></3></1><2></2><3>Imposition</3><4>Ces quelques questions permettent
|
||||
de déterminer le type de déclaration à remplir, ainsi que les modalités de
|
||||
calcul des cotisations sociales.</4>
|
||||
DOM</1></3></1><2>Imposition</2><3>Ces quelques questions permettent de
|
||||
déterminer le type de déclaration à remplir, ainsi que les modalités de
|
||||
calcul des cotisations sociales.</3>
|
||||
entreprise:
|
||||
titre: <0>Entreprise et activité</0>
|
||||
results:
|
||||
|
@ -1011,7 +1011,7 @@ pages:
|
|||
description: Découvrez quels montants remplir dans quelles cases, et obtenez une
|
||||
estimation des cotisations à payer en 2022
|
||||
title: Assistant à la déclaration de revenu pour les indépendants
|
||||
shortname: Assistant déclaration de revenu
|
||||
shortname: Assistant déclaration de revenu [beta]
|
||||
title: Assistant à la déclaration de revenu pour les indépendants
|
||||
demande-mobilité:
|
||||
meta:
|
||||
|
|
|
@ -55,7 +55,7 @@ export default function IndépendantSimulation() {
|
|||
toggles={
|
||||
<>
|
||||
<RuleInput
|
||||
type="toggle"
|
||||
inputType="toggle"
|
||||
dottedName="entreprise . imposition"
|
||||
onChange={(imposition) => {
|
||||
dispatch(
|
||||
|
|
|
@ -100,7 +100,7 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
shortName: t('pages.simulateurs.eirl.shortname', 'EIRL'),
|
||||
title: t('pages.simulateurs.eirl.title', "Simulateur d'EIRL"),
|
||||
|
||||
nextSteps: ['comparaison-statuts'],
|
||||
nextSteps: ['déclaration-revenu-indépendant-beta', 'comparaison-statuts'],
|
||||
},
|
||||
sasu: {
|
||||
tracking: {
|
||||
|
@ -160,7 +160,11 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
pathId: 'simulateurs.eurl',
|
||||
shortName: t('pages.simulateurs.eurl.shortname', 'EURL'),
|
||||
title: t('pages.simulateurs.eurl.title', "Simulateur d'EURL"),
|
||||
nextSteps: ['is', 'comparaison-statuts'],
|
||||
nextSteps: [
|
||||
'déclaration-revenu-indépendant-beta',
|
||||
'is',
|
||||
'comparaison-statuts',
|
||||
],
|
||||
},
|
||||
'auto-entrepreneur': {
|
||||
tracking: 'auto_entrepreneur',
|
||||
|
@ -215,7 +219,11 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
"Calcul du revenu net après impôt et des cotisations à partir du chiffre d'affaires et inversement"
|
||||
),
|
||||
},
|
||||
nextSteps: ['comparaison-statuts', 'is'],
|
||||
nextSteps: [
|
||||
'déclaration-revenu-indépendant-beta',
|
||||
'comparaison-statuts',
|
||||
'is',
|
||||
],
|
||||
},
|
||||
|
||||
'artiste-auteur': {
|
||||
|
@ -371,6 +379,7 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
'pages.gérer.declaration_charges_sociales_indépendant.title',
|
||||
'Assistant à la détermination des charges sociales déductibles'
|
||||
),
|
||||
nextSteps: ['exonération-covid', 'déclaration-revenu-indépendant-beta'],
|
||||
},
|
||||
|
||||
// TODO: Delete "déclaration-revenu-indépendant" object when DRI will no longer be in beta
|
||||
|
@ -400,6 +409,7 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
'pages.gérer.declaration_charges_sociales_indépendant.title',
|
||||
'Assistant à la détermination des charges sociales déductibles'
|
||||
),
|
||||
nextSteps: ['exonération-covid', 'déclaration-revenu-indépendant-beta'],
|
||||
},
|
||||
|
||||
'déclaration-revenu-indépendant-beta': {
|
||||
|
@ -419,7 +429,6 @@ const metadataSrc = (t: TFunction<'translation', string>) => {
|
|||
),
|
||||
},
|
||||
pathId: 'gérer.déclarationIndépendant.beta',
|
||||
private: true,
|
||||
shortName: t(
|
||||
'pages.gérer.declaration_revenu_indépendant.shortname',
|
||||
'Assistant déclaration de revenu [beta]'
|
||||
|
|
|
@ -3,6 +3,7 @@ import { updateSituation } from '@/actions/actions'
|
|||
import { TrackPage } from '@/ATInternetTracking'
|
||||
import {
|
||||
Condition,
|
||||
WhenAlreadyDefined,
|
||||
WhenApplicable,
|
||||
WhenNotApplicable,
|
||||
} from '@/components/EngineValue'
|
||||
|
@ -178,7 +179,7 @@ export default function Imposition() {
|
|||
|
||||
<SimpleField dottedName="DRI . accompagnement imposition . régime memento fiscal" />
|
||||
<Spacing lg />
|
||||
<Condition expression="DRI . accompagnement imposition . régime">
|
||||
<WhenAlreadyDefined dottedName="DRI . accompagnement imposition . régime">
|
||||
<Markdown components={{ p: Intro }}>
|
||||
{formatValue(
|
||||
engine.evaluate('DRI . accompagnement imposition . régime')
|
||||
|
@ -199,7 +200,7 @@ export default function Imposition() {
|
|||
</Markdown>
|
||||
</Item>
|
||||
</Accordion>
|
||||
</Condition>
|
||||
</WhenAlreadyDefined>
|
||||
</FromTop>
|
||||
</Condition>
|
||||
<Condition expression="DRI . accompagnement imposition = non">
|
||||
|
|
|
@ -298,7 +298,7 @@ function Home() {
|
|||
<WhenApplicable dottedName="dirigeant . indépendant">
|
||||
<SimulateurCard
|
||||
fromGérer
|
||||
{...simulateurs['déclaration-revenu-indépendant']}
|
||||
{...simulateurs['déclaration-revenu-indépendant-beta']}
|
||||
/>
|
||||
</WhenApplicable>
|
||||
<Condition expression="entreprise . imposition . IS">
|
||||
|
|
Loading…
Reference in New Issue