From 73f01dddb7662e95ce970feecd04264fdbb3b0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Tue, 7 Feb 2023 11:46:35 +0100 Subject: [PATCH] Move config files --- site/scripts/build-yaml-to-dts.ts | 4 +- site/scripts/runScriptOnFileChange/index.ts | 4 +- .../pages/Creer/{ => choix-statut}/Home.tsx | 6 +- .../choix-statut/_config.ts | 6 +- .../pages/Creer/{ => choix-statut}/créer.svg | 0 site/source/pages/Creer/index.tsx | 2 +- .../{ => artiste-auteur}/ArtisteAuteur.tsx | 2 +- .../Simulateurs/artiste-auteur/_config.ts | 2 +- .../_simulationConfig.ts} | 2 +- .../AutoEntrepreneur.tsx | 0 .../Simulateurs/auto-entrepreneur/_config.ts | 6 +- .../_simulationConfig.ts} | 2 +- .../Simulateurs/auxiliaire-médical/_config.ts | 4 +- .../pages/Simulateurs/avocat/_config.ts | 4 +- .../chirurgien-dentiste/_config.ts | 4 +- .../{ => chômage-partiel}/ChômagePartiel.tsx | 2 - .../ChômagePartielPreview.png | Bin .../Simulateurs/chômage-partiel/_config.ts | 6 +- .../_simulationConfig.ts} | 2 +- .../comparaison-statuts/_config.ts | 4 +- .../_simulationConfig.ts} | 2 +- .../components/AllerPlusLoinRevenus.tsx | 0 .../components/Comparateur.tsx | 0 .../components/DetailsRowCards.tsx | 0 .../components/Détails.tsx | 0 .../components/ItemTitle.tsx | 0 .../components/RetraiteItem.tsx | 0 .../components/RevenuAprèsImpot.tsx | 0 .../components/RevenuEstimé.tsx | 0 .../components/Résultats.tsx | 0 .../components/StatusCard.tsx | 2 +- .../components/TableRow.tsx | 0 .../components/WarningTooltip.tsx | 0 .../contexts/CasParticuliers.tsx | 0 .../index.tsx | 9 -- .../utils.ts | 0 .../{ => dividendes}/Dividendes.tsx | 0 .../pages/Simulateurs/dividendes/_config.ts | 4 +- .../_simulationConfig.ts} | 2 +- .../_config.ts | 40 --------- .../déclaration-revenu-indépendant/_config.ts | 41 --------- site/source/pages/Simulateurs/eirl/_config.ts | 6 +- .../entreprise-individuelle/_config.ts | 9 +- .../source/pages/Simulateurs/eurl/_config.tsx | 6 +- .../ExonérationCovid.tsx | 0 .../FormulaireS1S1Bis.tsx | 0 .../FormulaireS2.tsx | 0 .../Recap.tsx | 0 .../Table.tsx | 0 .../Simulateurs/exonération-covid/_config.ts | 2 +- .../index.tsx | 0 .../Simulateurs/expert-comptable/_config.ts | 4 +- .../{ => indépendant}/Indépendant.tsx | 0 .../pages/Simulateurs/indépendant/_config.ts | 4 +- .../_simulationConfig.ts} | 2 +- site/source/pages/Simulateurs/metadata-src.ts | 12 +-- .../pages/Simulateurs/médecin/_config.ts | 4 +- .../pages/Simulateurs/{ => pamc}/PAMCHome.tsx | 6 +- site/source/pages/Simulateurs/pamc/_config.ts | 4 +- .../pages/Simulateurs/pharmacien/_config.ts | 7 +- .../profession-libérale/_config.ts | 4 +- .../_simulationConfig.ts} | 2 +- .../pages/Simulateurs/sage-femme/_config.ts | 4 +- .../SalaireBrutNetPreviewEN.png | Bin .../SalaireBrutNetPreviewFR.png | Bin .../Simulateurs/{ => salarié}/Salarié.tsx | 4 +- .../pages/Simulateurs/salarié/_config.ts | 8 +- .../_simulationConfig.ts} | 2 +- .../illustration-net-brut-en.png | Bin .../illustration-net-brut.png | Bin .../pages/Simulateurs/{ => sasu}/SASU.tsx | 0 site/source/pages/Simulateurs/sasu/_config.ts | 6 +- .../_simulationConfig.ts} | 2 +- .../ActiviteCard/index.tsx | 0 .../Activité.tsx | 2 +- .../ActivitésSelection.tsx | 0 .../Exonérations.tsx | 0 .../NextButton.tsx | 0 .../StoreContext.tsx | 0 .../VotreSituation.tsx | 2 +- .../économie-collaborative/_config.ts | 2 +- .../actions.ts | 0 .../activités.en.yaml | 0 .../activités.en.yaml.d.ts | 0 .../activités.yaml | 0 .../activités.yaml.d.ts | 0 .../activitésData.ts | 0 .../customReduceReducers.ts | 0 .../images/car.svg | 0 .../images/checklist.svg | 0 .../images/multitasking.svg | 0 .../images/pizzaSharing.svg | 0 .../index.tsx | 2 +- .../reducer.ts | 0 .../selectors.js | 0 .../_config.ts | 78 ++++++++++++++++++ .../declaration-revenu-independants}/_config.ts | 6 +- .../demande-mobilité/_config.ts | 6 +- .../test/regressions/simulations-SASU.test.ts | 2 +- .../simulations-artiste-auteur.test.ts | 2 +- .../simulations-auto-entrepreneur.test.ts | 2 +- .../simulations-dividendes.test.ts | 2 +- .../simulations-indépendant.test.ts | 2 +- .../simulations-professions-libérales.test.ts | 2 +- .../regressions/simulations-salarié.test.ts | 2 +- site/vite-build-simulation-data.config.ts | 2 +- 106 files changed, 186 insertions(+), 188 deletions(-) rename site/source/pages/Creer/{ => choix-statut}/Home.tsx (94%) rename site/source/pages/{Simulateurs => Creer}/choix-statut/_config.ts (83%) rename site/source/pages/Creer/{ => choix-statut}/créer.svg (100%) rename site/source/pages/Simulateurs/{ => artiste-auteur}/ArtisteAuteur.tsx (97%) rename site/source/pages/Simulateurs/{configs/artisteAuteur.ts => artiste-auteur/_simulationConfig.ts} (91%) rename site/source/pages/Simulateurs/{ => auto-entrepreneur}/AutoEntrepreneur.tsx (100%) rename site/source/pages/Simulateurs/{configs/autoEntrepreneur.ts => auto-entrepreneur/_simulationConfig.ts} (96%) rename site/source/pages/Simulateurs/{ => chômage-partiel}/ChômagePartiel.tsx (99%) rename site/source/pages/Simulateurs/{images => chômage-partiel}/ChômagePartielPreview.png (100%) rename site/source/pages/Simulateurs/{configs/chômagePartiel.ts => chômage-partiel/_simulationConfig.ts} (92%) rename site/source/pages/Simulateurs/{configs/comparateurStatuts.ts => comparaison-statuts/_simulationConfig.ts} (96%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/AllerPlusLoinRevenus.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/Comparateur.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/DetailsRowCards.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/Détails.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/ItemTitle.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/RetraiteItem.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/RevenuAprèsImpot.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/RevenuEstimé.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/Résultats.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/StatusCard.tsx (98%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/TableRow.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/components/WarningTooltip.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/contexts/CasParticuliers.tsx (100%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/index.tsx (88%) rename site/source/pages/Simulateurs/{ComparateurStatuts => comparaison-statuts}/utils.ts (100%) rename site/source/pages/Simulateurs/{ => dividendes}/Dividendes.tsx (100%) rename site/source/pages/Simulateurs/{configs/dividendes.ts => dividendes/_simulationConfig.ts} (92%) delete mode 100644 site/source/pages/Simulateurs/déclaration-charges-sociales-indépendant/_config.ts delete mode 100644 site/source/pages/Simulateurs/déclaration-revenu-indépendant/_config.ts rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/ExonérationCovid.tsx (100%) rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/FormulaireS1S1Bis.tsx (100%) rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/FormulaireS2.tsx (100%) rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/Recap.tsx (100%) rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/Table.tsx (100%) rename site/source/pages/Simulateurs/{ExonerationCovid => exonération-covid}/index.tsx (100%) rename site/source/pages/Simulateurs/{ => indépendant}/Indépendant.tsx (100%) rename site/source/pages/Simulateurs/{configs/indépendant.ts => indépendant/_simulationConfig.ts} (98%) rename site/source/pages/Simulateurs/{ => pamc}/PAMCHome.tsx (83%) rename site/source/pages/Simulateurs/{configs/professionLibérale.ts => profession-libérale/_simulationConfig.ts} (97%) rename site/source/pages/Simulateurs/{images => salarié}/SalaireBrutNetPreviewEN.png (100%) rename site/source/pages/Simulateurs/{images => salarié}/SalaireBrutNetPreviewFR.png (100%) rename site/source/pages/Simulateurs/{ => salarié}/Salarié.tsx (98%) rename site/source/pages/Simulateurs/{configs/salarié.ts => salarié/_simulationConfig.ts} (97%) rename site/source/pages/Simulateurs/{images => salarié}/illustration-net-brut-en.png (100%) rename site/source/pages/Simulateurs/{images => salarié}/illustration-net-brut.png (100%) rename site/source/pages/Simulateurs/{ => sasu}/SASU.tsx (100%) rename site/source/pages/Simulateurs/{configs/dirigeantSASU.ts => sasu/_simulationConfig.ts} (96%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/ActiviteCard/index.tsx (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/Activité.tsx (98%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/ActivitésSelection.tsx (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/Exonérations.tsx (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/NextButton.tsx (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/StoreContext.tsx (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/VotreSituation.tsx (99%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/actions.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/activités.en.yaml (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/activités.en.yaml.d.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/activités.yaml (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/activités.yaml.d.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/activitésData.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/customReduceReducers.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/images/car.svg (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/images/checklist.svg (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/images/multitasking.svg (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/images/pizzaSharing.svg (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/index.tsx (96%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/reducer.ts (100%) rename site/source/pages/Simulateurs/{EconomieCollaborative => économie-collaborative}/selectors.js (100%) create mode 100644 site/source/pages/gerer/declaration-charges-sociales-independant/_config.ts rename site/source/pages/{Simulateurs/déclaration-revenu-indépendant-beta => gerer/declaration-revenu-independants}/_config.ts (87%) rename site/source/pages/{Simulateurs => gerer}/demande-mobilité/_config.ts (84%) diff --git a/site/scripts/build-yaml-to-dts.ts b/site/scripts/build-yaml-to-dts.ts index 8db53dfb2..6b0787c86 100644 --- a/site/scripts/build-yaml-to-dts.ts +++ b/site/scripts/build-yaml-to-dts.ts @@ -4,8 +4,8 @@ import { Project } from 'ts-morph' import yaml from 'yaml' const buildYamlToDts = [ - './source/pages/Simulateurs/EconomieCollaborative/activités.yaml', - './source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml', + './source/pages/Simulateurs/économie-collaborative/activités.yaml', + './source/pages/Simulateurs/économie-collaborative/activités.en.yaml', ] const transform = (data: Record, filePath: string) => { diff --git a/site/scripts/runScriptOnFileChange/index.ts b/site/scripts/runScriptOnFileChange/index.ts index 8e1ca3947..0b4d18f31 100644 --- a/site/scripts/runScriptOnFileChange/index.ts +++ b/site/scripts/runScriptOnFileChange/index.ts @@ -9,8 +9,8 @@ export const runScriptOnFileChange = async () => { options: [ { paths: [ - './source/pages/Simulateurs/EconomieCollaborative/activités.yaml', - './source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml', + './source/pages/Simulateurs/économie-collaborative/activités.yaml', + './source/pages/Simulateurs/économie-collaborative/activités.en.yaml', ], run: 'yarn build:yaml-to-dts', }, diff --git a/site/source/pages/Creer/Home.tsx b/site/source/pages/Creer/choix-statut/Home.tsx similarity index 94% rename from site/source/pages/Creer/Home.tsx rename to site/source/pages/Creer/choix-statut/Home.tsx index e5132ff46..22b9b897e 100644 --- a/site/source/pages/Creer/Home.tsx +++ b/site/source/pages/Creer/choix-statut/Home.tsx @@ -13,9 +13,9 @@ import { RootState } from '@/reducers/rootReducer' import { useNextQuestionUrl } from '@/selectors/companyStatusSelectors' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../ATInternetTracking' -import { SimulateurCard } from '../Simulateurs/Home' -import useSimulatorsData from '../Simulateurs/metadata' +import { TrackPage } from '../../../ATInternetTracking' +import { SimulateurCard } from '../../Simulateurs/Home' +import useSimulatorsData from '../../Simulateurs/metadata' import créerSvg from './créer.svg' export default function Créer() { diff --git a/site/source/pages/Simulateurs/choix-statut/_config.ts b/site/source/pages/Creer/choix-statut/_config.ts similarity index 83% rename from site/source/pages/Simulateurs/choix-statut/_config.ts rename to site/source/pages/Creer/choix-statut/_config.ts index e03d551ea..29e0c3df8 100644 --- a/site/source/pages/Simulateurs/choix-statut/_config.ts +++ b/site/source/pages/Creer/choix-statut/_config.ts @@ -1,6 +1,6 @@ -import Créer from '../../Creer/Home' -import { config } from '../configs/config' -import { SimulatorsDataParams } from '../configs/types' +import { config } from '../../Simulateurs/configs/config' +import { SimulatorsDataParams } from '../../Simulateurs/configs/types' +import Créer from './Home' export function choixStatutConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Creer/créer.svg b/site/source/pages/Creer/choix-statut/créer.svg similarity index 100% rename from site/source/pages/Creer/créer.svg rename to site/source/pages/Creer/choix-statut/créer.svg diff --git a/site/source/pages/Creer/index.tsx b/site/source/pages/Creer/index.tsx index 2e493268a..7d8b920c5 100644 --- a/site/source/pages/Creer/index.tsx +++ b/site/source/pages/Creer/index.tsx @@ -7,7 +7,7 @@ import { LANDING_LEGAL_STATUS_LIST, useSitePaths } from '../../sitePaths' import AfterRegistration from './AfterRegistration' import CreationChecklist from './CreationChecklist' import GuideStatut from './GuideStatut' -import Home from './Home' +import Home from './choix-statut/Home' export default function CreateMyCompany() { const { relativeSitePaths } = useSitePaths() diff --git a/site/source/pages/Simulateurs/ArtisteAuteur.tsx b/site/source/pages/Simulateurs/artiste-auteur/ArtisteAuteur.tsx similarity index 97% rename from site/source/pages/Simulateurs/ArtisteAuteur.tsx rename to site/source/pages/Simulateurs/artiste-auteur/ArtisteAuteur.tsx index 20db101f9..0ca38941b 100644 --- a/site/source/pages/Simulateurs/ArtisteAuteur.tsx +++ b/site/source/pages/Simulateurs/artiste-auteur/ArtisteAuteur.tsx @@ -14,7 +14,7 @@ import { EngineContext } from '@/components/utils/EngineContext' import useSimulationConfig from '@/components/utils/useSimulationConfig' import { H2 } from '@/design-system/typography/heading' -import { configArtisteAuteur } from './configs/artisteAuteur' +import { configArtisteAuteur } from './_simulationConfig' export default function ArtisteAuteur() { useSimulationConfig({ path: 'artiste-auteur', config: configArtisteAuteur }) diff --git a/site/source/pages/Simulateurs/artiste-auteur/_config.ts b/site/source/pages/Simulateurs/artiste-auteur/_config.ts index dd4cdf387..162a47586 100644 --- a/site/source/pages/Simulateurs/artiste-auteur/_config.ts +++ b/site/source/pages/Simulateurs/artiste-auteur/_config.ts @@ -1,6 +1,6 @@ -import ArtisteAuteur from '../ArtisteAuteur' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' +import ArtisteAuteur from './ArtisteAuteur' export function artisteAuteurConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/artisteAuteur.ts b/site/source/pages/Simulateurs/artiste-auteur/_simulationConfig.ts similarity index 91% rename from site/source/pages/Simulateurs/configs/artisteAuteur.ts rename to site/source/pages/Simulateurs/artiste-auteur/_simulationConfig.ts index c16f1f809..3606a85bc 100644 --- a/site/source/pages/Simulateurs/configs/artisteAuteur.ts +++ b/site/source/pages/Simulateurs/artiste-auteur/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configArtisteAuteur: SimulationConfig = { objectifs: [ diff --git a/site/source/pages/Simulateurs/AutoEntrepreneur.tsx b/site/source/pages/Simulateurs/auto-entrepreneur/AutoEntrepreneur.tsx similarity index 100% rename from site/source/pages/Simulateurs/AutoEntrepreneur.tsx rename to site/source/pages/Simulateurs/auto-entrepreneur/AutoEntrepreneur.tsx diff --git a/site/source/pages/Simulateurs/auto-entrepreneur/_config.ts b/site/source/pages/Simulateurs/auto-entrepreneur/_config.ts index 30b616cef..5180f0be2 100644 --- a/site/source/pages/Simulateurs/auto-entrepreneur/_config.ts +++ b/site/source/pages/Simulateurs/auto-entrepreneur/_config.ts @@ -1,8 +1,8 @@ -import AutoEntrepreneur, { SeoExplanations } from '../AutoEntrepreneur' -import { configAutoEntrepreneur } from '../configs/autoEntrepreneur' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' -import AutoEntrepreneurPreview from './images/AutoEntrepreneurPreview.png' +import AutoEntrepreneurPreview from '../images/AutoEntrepreneurPreview.png' +import AutoEntrepreneur, { SeoExplanations } from './AutoEntrepreneur' +import { configAutoEntrepreneur } from './_simulationConfig' export function autoEntrepreneurConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/autoEntrepreneur.ts b/site/source/pages/Simulateurs/auto-entrepreneur/_simulationConfig.ts similarity index 96% rename from site/source/pages/Simulateurs/configs/autoEntrepreneur.ts rename to site/source/pages/Simulateurs/auto-entrepreneur/_simulationConfig.ts index 9bb296a4f..04168a9c1 100644 --- a/site/source/pages/Simulateurs/configs/autoEntrepreneur.ts +++ b/site/source/pages/Simulateurs/auto-entrepreneur/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configAutoEntrepreneur: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/auxiliaire-médical/_config.ts b/site/source/pages/Simulateurs/auxiliaire-médical/_config.ts index 7b8e8a149..fda992fe9 100644 --- a/site/source/pages/Simulateurs/auxiliaire-médical/_config.ts +++ b/site/source/pages/Simulateurs/auxiliaire-médical/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configAuxiliaire } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configAuxiliaire } from '../profession-libérale/_simulationConfig' export function auxiliaireMédicalConfig({ t, diff --git a/site/source/pages/Simulateurs/avocat/_config.ts b/site/source/pages/Simulateurs/avocat/_config.ts index 904aa0afc..375a0187d 100644 --- a/site/source/pages/Simulateurs/avocat/_config.ts +++ b/site/source/pages/Simulateurs/avocat/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configAvocat } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configAvocat } from '../profession-libérale/_simulationConfig' export function avocatConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/chirurgien-dentiste/_config.ts b/site/source/pages/Simulateurs/chirurgien-dentiste/_config.ts index ebe96825e..ebfe5ffde 100644 --- a/site/source/pages/Simulateurs/chirurgien-dentiste/_config.ts +++ b/site/source/pages/Simulateurs/chirurgien-dentiste/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configDentiste } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configDentiste } from '../profession-libérale/_simulationConfig' export function chirurgienDentisteConfig({ t, diff --git a/site/source/pages/Simulateurs/ChômagePartiel.tsx b/site/source/pages/Simulateurs/chômage-partiel/ChômagePartiel.tsx similarity index 99% rename from site/source/pages/Simulateurs/ChômagePartiel.tsx rename to site/source/pages/Simulateurs/chômage-partiel/ChômagePartiel.tsx index 6d0d5c5f2..b6565c941 100644 --- a/site/source/pages/Simulateurs/ChômagePartiel.tsx +++ b/site/source/pages/Simulateurs/chômage-partiel/ChômagePartiel.tsx @@ -19,8 +19,6 @@ import { Li, Ul } from '@/design-system/typography/list' import { Body } from '@/design-system/typography/paragraphs' import { catchDivideByZeroError } from '@/utils' -import { SimulatorsDataParams } from './configs/types' - declare global { interface Window { STONLY_WID: string diff --git a/site/source/pages/Simulateurs/images/ChômagePartielPreview.png b/site/source/pages/Simulateurs/chômage-partiel/ChômagePartielPreview.png similarity index 100% rename from site/source/pages/Simulateurs/images/ChômagePartielPreview.png rename to site/source/pages/Simulateurs/chômage-partiel/ChômagePartielPreview.png diff --git a/site/source/pages/Simulateurs/chômage-partiel/_config.ts b/site/source/pages/Simulateurs/chômage-partiel/_config.ts index e9a50332f..f7769abb1 100644 --- a/site/source/pages/Simulateurs/chômage-partiel/_config.ts +++ b/site/source/pages/Simulateurs/chômage-partiel/_config.ts @@ -1,8 +1,8 @@ -import ChômagePartielComponent, { SeoExplanations } from '../ChômagePartiel' -import { configChômagePartiel } from '../configs/chômagePartiel' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' -import ChômagePartielPreview from './images/ChômagePartielPreview.png' +import ChômagePartielComponent, { SeoExplanations } from './ChômagePartiel' +import ChômagePartielPreview from './ChômagePartielPreview.png' +import { configChômagePartiel } from './_simulationConfig' export function chômagePartielConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/chômagePartiel.ts b/site/source/pages/Simulateurs/chômage-partiel/_simulationConfig.ts similarity index 92% rename from site/source/pages/Simulateurs/configs/chômagePartiel.ts rename to site/source/pages/Simulateurs/chômage-partiel/_simulationConfig.ts index 4a69987df..dffb983e7 100644 --- a/site/source/pages/Simulateurs/configs/chômagePartiel.ts +++ b/site/source/pages/Simulateurs/chômage-partiel/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configChômagePartiel: SimulationConfig = { objectifs: [ diff --git a/site/source/pages/Simulateurs/comparaison-statuts/_config.ts b/site/source/pages/Simulateurs/comparaison-statuts/_config.ts index 1692bb631..d0862947b 100644 --- a/site/source/pages/Simulateurs/comparaison-statuts/_config.ts +++ b/site/source/pages/Simulateurs/comparaison-statuts/_config.ts @@ -1,6 +1,7 @@ -import SchemeComparaisonPage from '../ComparateurStatuts' +import SchemeComparaisonPage from '.' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' +import { configComparateurStatuts } from './_simulationConfig' export function comparaisonStatutsConfig({ t, @@ -32,6 +33,7 @@ export function comparaisonStatutsConfig({ 'Comparaison des statuts' ), path: sitePaths.simulateurs.comparaison, + simulation: configComparateurStatuts, component: SchemeComparaisonPage, } as const) } diff --git a/site/source/pages/Simulateurs/configs/comparateurStatuts.ts b/site/source/pages/Simulateurs/comparaison-statuts/_simulationConfig.ts similarity index 96% rename from site/source/pages/Simulateurs/configs/comparateurStatuts.ts rename to site/source/pages/Simulateurs/comparaison-statuts/_simulationConfig.ts index 2456fbc4a..b0eaf7d39 100644 --- a/site/source/pages/Simulateurs/configs/comparateurStatuts.ts +++ b/site/source/pages/Simulateurs/comparaison-statuts/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configComparateurStatuts: SimulationConfig = { 'objectifs exclusifs': [], diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/AllerPlusLoinRevenus.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/AllerPlusLoinRevenus.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/AllerPlusLoinRevenus.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/AllerPlusLoinRevenus.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/Comparateur.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/Comparateur.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/Comparateur.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/Comparateur.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/DetailsRowCards.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/DetailsRowCards.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/DetailsRowCards.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/DetailsRowCards.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/Détails.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/Détails.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/Détails.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/Détails.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/ItemTitle.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/ItemTitle.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/ItemTitle.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/ItemTitle.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/RetraiteItem.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/RetraiteItem.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/RetraiteItem.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/RetraiteItem.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/RevenuAprèsImpot.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/RevenuAprèsImpot.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/RevenuAprèsImpot.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/RevenuAprèsImpot.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/RevenuEstimé.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/RevenuEstimé.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/RevenuEstimé.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/RevenuEstimé.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/Résultats.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/Résultats.tsx similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/Résultats.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/Résultats.tsx diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/components/StatusCard.tsx b/site/source/pages/Simulateurs/comparaison-statuts/components/StatusCard.tsx similarity index 98% rename from site/source/pages/Simulateurs/ComparateurStatuts/components/StatusCard.tsx rename to site/source/pages/Simulateurs/comparaison-statuts/components/StatusCard.tsx index 40ff40fb6..e93b75684 100644 --- a/site/source/pages/Simulateurs/ComparateurStatuts/components/StatusCard.tsx +++ b/site/source/pages/Simulateurs/comparaison-statuts/components/StatusCard.tsx @@ -62,7 +62,7 @@ const StatusCard = ({ ))} - {children} + {children} {isBestOption && ( engine.shallowCopy().setSituation({ diff --git a/site/source/pages/Simulateurs/ComparateurStatuts/utils.ts b/site/source/pages/Simulateurs/comparaison-statuts/utils.ts similarity index 100% rename from site/source/pages/Simulateurs/ComparateurStatuts/utils.ts rename to site/source/pages/Simulateurs/comparaison-statuts/utils.ts diff --git a/site/source/pages/Simulateurs/Dividendes.tsx b/site/source/pages/Simulateurs/dividendes/Dividendes.tsx similarity index 100% rename from site/source/pages/Simulateurs/Dividendes.tsx rename to site/source/pages/Simulateurs/dividendes/Dividendes.tsx diff --git a/site/source/pages/Simulateurs/dividendes/_config.ts b/site/source/pages/Simulateurs/dividendes/_config.ts index b5dbf8b41..e09ea09c2 100644 --- a/site/source/pages/Simulateurs/dividendes/_config.ts +++ b/site/source/pages/Simulateurs/dividendes/_config.ts @@ -1,7 +1,7 @@ -import DividendesSimulation, { SeoExplanations } from '../Dividendes' import { config } from '../configs/config' -import { configDividendes } from '../configs/dividendes' import { SimulatorsDataParams } from '../configs/types' +import DividendesSimulation, { SeoExplanations } from './Dividendes' +import { configDividendes } from './_simulationConfig' export function dividendesConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/dividendes.ts b/site/source/pages/Simulateurs/dividendes/_simulationConfig.ts similarity index 92% rename from site/source/pages/Simulateurs/configs/dividendes.ts rename to site/source/pages/Simulateurs/dividendes/_simulationConfig.ts index d05ae6ffc..2d75e52ce 100644 --- a/site/source/pages/Simulateurs/configs/dividendes.ts +++ b/site/source/pages/Simulateurs/dividendes/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configDividendes: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/déclaration-charges-sociales-indépendant/_config.ts b/site/source/pages/Simulateurs/déclaration-charges-sociales-indépendant/_config.ts deleted file mode 100644 index 301aa8f32..000000000 --- a/site/source/pages/Simulateurs/déclaration-charges-sociales-indépendant/_config.ts +++ /dev/null @@ -1,40 +0,0 @@ -import DéclarationChargeSocialeIndépendant from '../../gerer/declaration-charges-sociales-independant' -import { config } from '../configs/config' -import { SimulatorsDataParams } from '../configs/types' - -export function déclarationChargesSocialesIndépendantConfig({ - t, - sitePaths, -}: SimulatorsDataParams) { - return config({ - id: 'déclaration-charges-sociales-indépendant', - path: sitePaths.gérer['déclaration-charges-sociales-indépendant'], - tracking: { - chapter1: 'gerer', - chapter2: 'declaration_charges_sociales_independant', - }, - icône: '📑', - meta: { - description: t( - 'pages.gérer.declaration_charges_sociales_indépendant.meta.description', - 'Calculez le montant des cotisations et contributions sociales à reporter dans votre déclaration de revenu 2021' - ), - title: t( - 'pages.gérer.declaration_charges_sociales_indépendant.meta.title', - 'Détermination des charges sociales déductibles' - ), - }, - pathId: 'gérer.déclaration-charges-sociales-indépendant', - shortName: t( - 'pages.gérer.declaration_charges_sociales_indépendant.shortname', - 'Détermination des charges sociales déductibles' - ), - iframePath: 'déclaration-charges-sociales-indépendant', - title: t( - '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'], - component: DéclarationChargeSocialeIndépendant, - } as const) -} diff --git a/site/source/pages/Simulateurs/déclaration-revenu-indépendant/_config.ts b/site/source/pages/Simulateurs/déclaration-revenu-indépendant/_config.ts deleted file mode 100644 index 5082ed0f8..000000000 --- a/site/source/pages/Simulateurs/déclaration-revenu-indépendant/_config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import DéclarationChargeSocialeIndépendant from '../../gerer/declaration-charges-sociales-independant' -import { config } from '../configs/config' -import { SimulatorsDataParams } from '../configs/types' - -export function déclarationRevenuIndépendantConfig({ - t, - sitePaths, -}: SimulatorsDataParams) { - // TODO: Delete "déclaration-revenu-indépendant" object when DRI will no longer be in beta - return config({ - id: 'déclaration-revenu-indépendant', - path: sitePaths.gérer.déclarationIndépendant.index, - tracking: { - chapter1: 'gerer', - chapter2: 'declaration_charges_sociales_independant', - }, - icône: '📑', - meta: { - description: t( - 'pages.gérer.declaration_charges_sociales_indépendant.meta.description', - 'Calculez le montant des cotisations et contributions sociales à reporter dans votre déclaration de revenu 2021' - ), - title: t( - 'pages.gérer.declaration_charges_sociales_indépendant.meta.title', - 'Détermination des charges sociales déductibles' - ), - }, - pathId: 'gérer.déclarationIndépendant.index', - shortName: t( - 'pages.gérer.declaration_charges_sociales_indépendant.shortname', - 'Détermination des charges sociales déductibles' - ), - iframePath: 'déclaration-revenu-indépendant', - title: t( - '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'], - component: DéclarationChargeSocialeIndépendant, - } as const) -} diff --git a/site/source/pages/Simulateurs/eirl/_config.ts b/site/source/pages/Simulateurs/eirl/_config.ts index e7d81c42f..13e7b9f13 100644 --- a/site/source/pages/Simulateurs/eirl/_config.ts +++ b/site/source/pages/Simulateurs/eirl/_config.ts @@ -1,8 +1,8 @@ -import IndépendantSimulation from '../Indépendant' import { config } from '../configs/config' -import { configEirl } from '../configs/indépendant' import { SimulatorsDataParams } from '../configs/types' -import AutoEntrepreneurPreview from './images/AutoEntrepreneurPreview.png' +import AutoEntrepreneurPreview from '../images/AutoEntrepreneurPreview.png' +import IndépendantSimulation from '../indépendant/Indépendant' +import { configEirl } from '../indépendant/_simulationConfig' export function eirlConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/entreprise-individuelle/_config.ts b/site/source/pages/Simulateurs/entreprise-individuelle/_config.ts index 593551757..07e25e201 100644 --- a/site/source/pages/Simulateurs/entreprise-individuelle/_config.ts +++ b/site/source/pages/Simulateurs/entreprise-individuelle/_config.ts @@ -1,8 +1,11 @@ -import { EntrepriseIndividuelle, SeoExplanationsEI } from '../Indépendant' import { config } from '../configs/config' -import { configEntrepriseIndividuelle } from '../configs/indépendant' import { SimulatorsDataParams } from '../configs/types' -import AutoEntrepreneurPreview from './images/AutoEntrepreneurPreview.png' +import AutoEntrepreneurPreview from '../images/AutoEntrepreneurPreview.png' +import { + EntrepriseIndividuelle, + SeoExplanationsEI, +} from '../indépendant/Indépendant' +import { configEntrepriseIndividuelle } from '../indépendant/_simulationConfig' export function entrepriseIndividuelleConfig({ t, diff --git a/site/source/pages/Simulateurs/eurl/_config.tsx b/site/source/pages/Simulateurs/eurl/_config.tsx index f0476ebce..3344c4e6d 100644 --- a/site/source/pages/Simulateurs/eurl/_config.tsx +++ b/site/source/pages/Simulateurs/eurl/_config.tsx @@ -1,8 +1,8 @@ -import IndépendantSimulation from '../Indépendant' import { config } from '../configs/config' -import { configEurl } from '../configs/indépendant' import { SimulatorsDataParams } from '../configs/types' -import RémunérationSASUPreview from './images/RémunérationSASUPreview.png' +import RémunérationSASUPreview from '../images/RémunérationSASUPreview.png' +import IndépendantSimulation from '../indépendant/Indépendant' +import { configEurl } from '../indépendant/_simulationConfig' export function eurlConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/ExonerationCovid/ExonérationCovid.tsx b/site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/ExonérationCovid.tsx rename to site/source/pages/Simulateurs/exonération-covid/ExonérationCovid.tsx diff --git a/site/source/pages/Simulateurs/ExonerationCovid/FormulaireS1S1Bis.tsx b/site/source/pages/Simulateurs/exonération-covid/FormulaireS1S1Bis.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/FormulaireS1S1Bis.tsx rename to site/source/pages/Simulateurs/exonération-covid/FormulaireS1S1Bis.tsx diff --git a/site/source/pages/Simulateurs/ExonerationCovid/FormulaireS2.tsx b/site/source/pages/Simulateurs/exonération-covid/FormulaireS2.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/FormulaireS2.tsx rename to site/source/pages/Simulateurs/exonération-covid/FormulaireS2.tsx diff --git a/site/source/pages/Simulateurs/ExonerationCovid/Recap.tsx b/site/source/pages/Simulateurs/exonération-covid/Recap.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/Recap.tsx rename to site/source/pages/Simulateurs/exonération-covid/Recap.tsx diff --git a/site/source/pages/Simulateurs/ExonerationCovid/Table.tsx b/site/source/pages/Simulateurs/exonération-covid/Table.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/Table.tsx rename to site/source/pages/Simulateurs/exonération-covid/Table.tsx diff --git a/site/source/pages/Simulateurs/exonération-covid/_config.ts b/site/source/pages/Simulateurs/exonération-covid/_config.ts index 311e5950a..b50a041ee 100644 --- a/site/source/pages/Simulateurs/exonération-covid/_config.ts +++ b/site/source/pages/Simulateurs/exonération-covid/_config.ts @@ -1,4 +1,4 @@ -import ExonérationCovid from '../ExonerationCovid' +import ExonérationCovid from '.' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' diff --git a/site/source/pages/Simulateurs/ExonerationCovid/index.tsx b/site/source/pages/Simulateurs/exonération-covid/index.tsx similarity index 100% rename from site/source/pages/Simulateurs/ExonerationCovid/index.tsx rename to site/source/pages/Simulateurs/exonération-covid/index.tsx diff --git a/site/source/pages/Simulateurs/expert-comptable/_config.ts b/site/source/pages/Simulateurs/expert-comptable/_config.ts index 6a3ee4082..73eee5223 100644 --- a/site/source/pages/Simulateurs/expert-comptable/_config.ts +++ b/site/source/pages/Simulateurs/expert-comptable/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configExpertComptable } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configExpertComptable } from '../profession-libérale/_simulationConfig' export function expertComptableConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/Indépendant.tsx b/site/source/pages/Simulateurs/indépendant/Indépendant.tsx similarity index 100% rename from site/source/pages/Simulateurs/Indépendant.tsx rename to site/source/pages/Simulateurs/indépendant/Indépendant.tsx diff --git a/site/source/pages/Simulateurs/indépendant/_config.ts b/site/source/pages/Simulateurs/indépendant/_config.ts index b273c58f7..6e16a9281 100644 --- a/site/source/pages/Simulateurs/indépendant/_config.ts +++ b/site/source/pages/Simulateurs/indépendant/_config.ts @@ -1,7 +1,7 @@ -import IndépendantSimulation from '../Indépendant' import { config } from '../configs/config' -import { configIndépendant } from '../configs/indépendant' import { SimulatorsDataParams } from '../configs/types' +import IndépendantSimulation from './Indépendant' +import { configIndépendant } from './_simulationConfig' export function indépendantConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/indépendant.ts b/site/source/pages/Simulateurs/indépendant/_simulationConfig.ts similarity index 98% rename from site/source/pages/Simulateurs/configs/indépendant.ts rename to site/source/pages/Simulateurs/indépendant/_simulationConfig.ts index 5363fe4d0..822b7322f 100644 --- a/site/source/pages/Simulateurs/configs/indépendant.ts +++ b/site/source/pages/Simulateurs/indépendant/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configIndépendant: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/metadata-src.ts b/site/source/pages/Simulateurs/metadata-src.ts index dacb40304..ca9a739ff 100644 --- a/site/source/pages/Simulateurs/metadata-src.ts +++ b/site/source/pages/Simulateurs/metadata-src.ts @@ -1,20 +1,22 @@ import { ImmutableType } from '@/types/utils' +import { choixStatutConfig } from '../Creer/choix-statut/_config' +import { + déclarationChargesSocialesIndépendantConfig, + déclarationRevenuIndépendantConfig, +} from '../gerer/declaration-charges-sociales-independant/_config' +import { déclarationRevenuIndépendantBetaConfig } from '../gerer/declaration-revenu-independants/_config' +import { demandeMobilitéConfig } from '../gerer/demande-mobilité/_config' import { artisteAuteurConfig } from './artiste-auteur/_config' import { autoEntrepreneurConfig } from './auto-entrepreneur/_config' import { auxiliaireMédicalConfig } from './auxiliaire-médical/_config' import { avocatConfig } from './avocat/_config' import { chirurgienDentisteConfig } from './chirurgien-dentiste/_config' -import { choixStatutConfig } from './choix-statut/_config' import { chômagePartielConfig } from './chômage-partiel/_config' import { comparaisonStatutsConfig } from './comparaison-statuts/_config' import { PageConfig, SimulatorsDataParams } from './configs/types' import { coûtCréationEntrepriseConfig } from './cout-creation-entreprise/_config.js' -import { demandeMobilitéConfig } from './demande-mobilité/_config' import { dividendesConfig } from './dividendes/_config' -import { déclarationChargesSocialesIndépendantConfig } from './déclaration-charges-sociales-indépendant/_config' -import { déclarationRevenuIndépendantBetaConfig } from './déclaration-revenu-indépendant-beta/_config' -import { déclarationRevenuIndépendantConfig } from './déclaration-revenu-indépendant/_config' import { eirlConfig } from './eirl/_config' import { entrepriseIndividuelleConfig } from './entreprise-individuelle/_config' import { eurlConfig } from './eurl/_config' diff --git a/site/source/pages/Simulateurs/médecin/_config.ts b/site/source/pages/Simulateurs/médecin/_config.ts index c7527997f..209f51683 100644 --- a/site/source/pages/Simulateurs/médecin/_config.ts +++ b/site/source/pages/Simulateurs/médecin/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configMédecin } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configMédecin } from '../profession-libérale/_simulationConfig' export function médecinConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/PAMCHome.tsx b/site/source/pages/Simulateurs/pamc/PAMCHome.tsx similarity index 83% rename from site/source/pages/Simulateurs/PAMCHome.tsx rename to site/source/pages/Simulateurs/pamc/PAMCHome.tsx index e387fef5f..7218176c5 100644 --- a/site/source/pages/Simulateurs/PAMCHome.tsx +++ b/site/source/pages/Simulateurs/pamc/PAMCHome.tsx @@ -1,8 +1,8 @@ import { H2 } from '@/design-system/typography/heading' -import { TrackPage } from '../../ATInternetTracking' -import { SimulateurCard } from './Home' -import useSimulatorsData from './metadata' +import { TrackPage } from '../../../ATInternetTracking' +import { SimulateurCard } from '../Home' +import useSimulatorsData from '../metadata' export default function SalariéSimulation() { const simulators = useSimulatorsData() diff --git a/site/source/pages/Simulateurs/pamc/_config.ts b/site/source/pages/Simulateurs/pamc/_config.ts index 27c4efe8f..6f17e6fed 100644 --- a/site/source/pages/Simulateurs/pamc/_config.ts +++ b/site/source/pages/Simulateurs/pamc/_config.ts @@ -1,7 +1,7 @@ -import PAMCHome from '../PAMCHome' import { config } from '../configs/config' -import { configProfessionLibérale } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { configProfessionLibérale } from '../profession-libérale/_simulationConfig' +import PAMCHome from './PAMCHome' export function pamcConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/pharmacien/_config.ts b/site/source/pages/Simulateurs/pharmacien/_config.ts index ea1f7db16..61af164a3 100644 --- a/site/source/pages/Simulateurs/pharmacien/_config.ts +++ b/site/source/pages/Simulateurs/pharmacien/_config.ts @@ -1,7 +1,9 @@ import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configPharmacien } from '../profession-libérale/_simulationConfig' -export function pharmacienConfig({ t }: SimulatorsDataParams) { +export function pharmacienConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ id: 'pharmacien', tracking: { @@ -26,5 +28,8 @@ export function pharmacienConfig({ t }: SimulatorsDataParams) { 'pages.simulateurs.pharmacien.title', 'Simulateur de revenus pour pharmacien en libéral' ), + path: sitePaths.simulateurs['profession-libérale'].pharmacien, + simulation: configPharmacien, + component: IndépendantPLSimulation, } as const) } diff --git a/site/source/pages/Simulateurs/profession-libérale/_config.ts b/site/source/pages/Simulateurs/profession-libérale/_config.ts index 2c48d761a..974be426d 100644 --- a/site/source/pages/Simulateurs/profession-libérale/_config.ts +++ b/site/source/pages/Simulateurs/profession-libérale/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configProfessionLibérale } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configProfessionLibérale } from './_simulationConfig' export function professionLibéraleConfig({ t, diff --git a/site/source/pages/Simulateurs/configs/professionLibérale.ts b/site/source/pages/Simulateurs/profession-libérale/_simulationConfig.ts similarity index 97% rename from site/source/pages/Simulateurs/configs/professionLibérale.ts rename to site/source/pages/Simulateurs/profession-libérale/_simulationConfig.ts index 760530e3a..c409a03fd 100644 --- a/site/source/pages/Simulateurs/configs/professionLibérale.ts +++ b/site/source/pages/Simulateurs/profession-libérale/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configProfessionLibérale: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/sage-femme/_config.ts b/site/source/pages/Simulateurs/sage-femme/_config.ts index 61757ea27..3a2b6f834 100644 --- a/site/source/pages/Simulateurs/sage-femme/_config.ts +++ b/site/source/pages/Simulateurs/sage-femme/_config.ts @@ -1,7 +1,7 @@ -import { IndépendantPLSimulation } from '../Indépendant' import { config } from '../configs/config' -import { configSageFemme } from '../configs/professionLibérale' import { SimulatorsDataParams } from '../configs/types' +import { IndépendantPLSimulation } from '../indépendant/Indépendant' +import { configSageFemme } from '../profession-libérale/_simulationConfig' export function sageFemmeConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/images/SalaireBrutNetPreviewEN.png b/site/source/pages/Simulateurs/salarié/SalaireBrutNetPreviewEN.png similarity index 100% rename from site/source/pages/Simulateurs/images/SalaireBrutNetPreviewEN.png rename to site/source/pages/Simulateurs/salarié/SalaireBrutNetPreviewEN.png diff --git a/site/source/pages/Simulateurs/images/SalaireBrutNetPreviewFR.png b/site/source/pages/Simulateurs/salarié/SalaireBrutNetPreviewFR.png similarity index 100% rename from site/source/pages/Simulateurs/images/SalaireBrutNetPreviewFR.png rename to site/source/pages/Simulateurs/salarié/SalaireBrutNetPreviewFR.png diff --git a/site/source/pages/Simulateurs/Salarié.tsx b/site/source/pages/Simulateurs/salarié/Salarié.tsx similarity index 98% rename from site/source/pages/Simulateurs/Salarié.tsx rename to site/source/pages/Simulateurs/salarié/Salarié.tsx index 57687e543..eb241148f 100644 --- a/site/source/pages/Simulateurs/Salarié.tsx +++ b/site/source/pages/Simulateurs/salarié/Salarié.tsx @@ -30,8 +30,8 @@ import { Body, SmallBody } from '@/design-system/typography/paragraphs' import { targetUnitSelector } from '@/selectors/simulationSelectors' import { useSitePaths } from '@/sitePaths' -import urlIllustrationNetBrutEn from './images/illustration-net-brut-en.png' -import urlIllustrationNetBrut from './images/illustration-net-brut.png' +import urlIllustrationNetBrutEn from './illustration-net-brut-en.png' +import urlIllustrationNetBrut from './illustration-net-brut.png' const ButtonContainer = styled.span` display: block; diff --git a/site/source/pages/Simulateurs/salarié/_config.ts b/site/source/pages/Simulateurs/salarié/_config.ts index b1e591d75..5ba9aaf66 100644 --- a/site/source/pages/Simulateurs/salarié/_config.ts +++ b/site/source/pages/Simulateurs/salarié/_config.ts @@ -1,9 +1,9 @@ -import SalariéSimulation, { SeoExplanations } from '../Salarié' import { config } from '../configs/config' -import { configSalarié } from '../configs/salarié' import { SimulatorsDataParams } from '../configs/types' -import salaireBrutNetPreviewEN from './images/SalaireBrutNetPreviewEN.png' -import salaireBrutNetPreviewFR from './images/SalaireBrutNetPreviewFR.png' +import salaireBrutNetPreviewEN from './SalaireBrutNetPreviewEN.png' +import salaireBrutNetPreviewFR from './SalaireBrutNetPreviewFR.png' +import SalariéSimulation, { SeoExplanations } from './Salarié' +import { configSalarié } from './_simulationConfig' export function salariéConfig(params: SimulatorsDataParams) { const { t, sitePaths, language } = params diff --git a/site/source/pages/Simulateurs/configs/salarié.ts b/site/source/pages/Simulateurs/salarié/_simulationConfig.ts similarity index 97% rename from site/source/pages/Simulateurs/configs/salarié.ts rename to site/source/pages/Simulateurs/salarié/_simulationConfig.ts index 4487a1bb0..b6d75042a 100644 --- a/site/source/pages/Simulateurs/configs/salarié.ts +++ b/site/source/pages/Simulateurs/salarié/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configSalarié: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/images/illustration-net-brut-en.png b/site/source/pages/Simulateurs/salarié/illustration-net-brut-en.png similarity index 100% rename from site/source/pages/Simulateurs/images/illustration-net-brut-en.png rename to site/source/pages/Simulateurs/salarié/illustration-net-brut-en.png diff --git a/site/source/pages/Simulateurs/images/illustration-net-brut.png b/site/source/pages/Simulateurs/salarié/illustration-net-brut.png similarity index 100% rename from site/source/pages/Simulateurs/images/illustration-net-brut.png rename to site/source/pages/Simulateurs/salarié/illustration-net-brut.png diff --git a/site/source/pages/Simulateurs/SASU.tsx b/site/source/pages/Simulateurs/sasu/SASU.tsx similarity index 100% rename from site/source/pages/Simulateurs/SASU.tsx rename to site/source/pages/Simulateurs/sasu/SASU.tsx diff --git a/site/source/pages/Simulateurs/sasu/_config.ts b/site/source/pages/Simulateurs/sasu/_config.ts index 153dd859b..e89333de1 100644 --- a/site/source/pages/Simulateurs/sasu/_config.ts +++ b/site/source/pages/Simulateurs/sasu/_config.ts @@ -1,8 +1,8 @@ -import { SASUSimulation, SeoExplanations } from '../SASU' import { config } from '../configs/config' -import { configSASU } from '../configs/dirigeantSASU' import { SimulatorsDataParams } from '../configs/types' -import RémunérationSASUPreview from './images/RémunérationSASUPreview.png' +import RémunérationSASUPreview from '../images/RémunérationSASUPreview.png' +import { SASUSimulation, SeoExplanations } from './SASU' +import { configSASU } from './_simulationConfig' export function sasuConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/source/pages/Simulateurs/configs/dirigeantSASU.ts b/site/source/pages/Simulateurs/sasu/_simulationConfig.ts similarity index 96% rename from site/source/pages/Simulateurs/configs/dirigeantSASU.ts rename to site/source/pages/Simulateurs/sasu/_simulationConfig.ts index 41d6844cf..60120758c 100644 --- a/site/source/pages/Simulateurs/configs/dirigeantSASU.ts +++ b/site/source/pages/Simulateurs/sasu/_simulationConfig.ts @@ -1,4 +1,4 @@ -import { SimulationConfig } from './types' +import { SimulationConfig } from '../configs/types' export const configSASU: SimulationConfig = { 'objectifs exclusifs': [ diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx b/site/source/pages/Simulateurs/économie-collaborative/ActiviteCard/index.tsx similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx rename to site/source/pages/Simulateurs/économie-collaborative/ActiviteCard/index.tsx diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx b/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx similarity index 98% rename from site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx rename to site/source/pages/Simulateurs/économie-collaborative/Activité.tsx index 48e719375..218ad57b4 100644 --- a/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/Activité.tsx @@ -3,6 +3,7 @@ import { useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' import { Navigate, useParams } from 'react-router-dom' +import { TrackPage } from '@/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import { ScrollToTop } from '@/components/utils/Scroll' import { Markdown } from '@/components/utils/markdown' @@ -13,7 +14,6 @@ import { Body, SmallBody } from '@/design-system/typography/paragraphs' import { useSitePaths } from '@/sitePaths' import { getValueFrom } from '@/utils' -import { TrackPage } from '../../../ATInternetTracking' import { ActivitéSelection } from './ActivitésSelection' import Exonérations from './Exonérations' import NextButton from './NextButton' diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx b/site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx rename to site/source/pages/Simulateurs/économie-collaborative/ActivitésSelection.tsx diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx b/site/source/pages/Simulateurs/économie-collaborative/Exonérations.tsx similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx rename to site/source/pages/Simulateurs/économie-collaborative/Exonérations.tsx diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx b/site/source/pages/Simulateurs/économie-collaborative/NextButton.tsx similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx rename to site/source/pages/Simulateurs/économie-collaborative/NextButton.tsx diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/StoreContext.tsx b/site/source/pages/Simulateurs/économie-collaborative/StoreContext.tsx similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/StoreContext.tsx rename to site/source/pages/Simulateurs/économie-collaborative/StoreContext.tsx diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/VotreSituation.tsx b/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx similarity index 99% rename from site/source/pages/Simulateurs/EconomieCollaborative/VotreSituation.tsx rename to site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx index 66162fedc..1515d4c25 100644 --- a/site/source/pages/Simulateurs/EconomieCollaborative/VotreSituation.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/VotreSituation.tsx @@ -2,6 +2,7 @@ import { useContext } from 'react' import { Trans, useTranslation } from 'react-i18next' import { Navigate } from 'react-router-dom' +import { TrackPage } from '@/ATInternetTracking' import { FromBottom } from '@/components/ui/animate' import DefaultHelmet from '@/components/utils/DefaultHelmet' import { ScrollToTop } from '@/components/utils/Scroll' @@ -14,7 +15,6 @@ import { Link } from '@/design-system/typography/link' import { Body, SmallBody } from '@/design-system/typography/paragraphs' import { useSitePaths } from '@/sitePaths' -import { TrackPage } from '../../../ATInternetTracking' import { ActiviteCard } from './ActiviteCard' import { StoreContext } from './StoreContext' import illustration from './images/multitasking.svg' diff --git a/site/source/pages/Simulateurs/économie-collaborative/_config.ts b/site/source/pages/Simulateurs/économie-collaborative/_config.ts index 4ed64f3b0..abb8c3d31 100644 --- a/site/source/pages/Simulateurs/économie-collaborative/_config.ts +++ b/site/source/pages/Simulateurs/économie-collaborative/_config.ts @@ -1,4 +1,4 @@ -import ÉconomieCollaborative from '../EconomieCollaborative' +import ÉconomieCollaborative from '.' import { config } from '../configs/config' import { SimulatorsDataParams } from '../configs/types' diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/actions.ts b/site/source/pages/Simulateurs/économie-collaborative/actions.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/actions.ts rename to site/source/pages/Simulateurs/économie-collaborative/actions.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml b/site/source/pages/Simulateurs/économie-collaborative/activités.en.yaml similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml rename to site/source/pages/Simulateurs/économie-collaborative/activités.en.yaml diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml.d.ts b/site/source/pages/Simulateurs/économie-collaborative/activités.en.yaml.d.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/activités.en.yaml.d.ts rename to site/source/pages/Simulateurs/économie-collaborative/activités.en.yaml.d.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/activités.yaml b/site/source/pages/Simulateurs/économie-collaborative/activités.yaml similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/activités.yaml rename to site/source/pages/Simulateurs/économie-collaborative/activités.yaml diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/activités.yaml.d.ts b/site/source/pages/Simulateurs/économie-collaborative/activités.yaml.d.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/activités.yaml.d.ts rename to site/source/pages/Simulateurs/économie-collaborative/activités.yaml.d.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/activitésData.ts b/site/source/pages/Simulateurs/économie-collaborative/activitésData.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/activitésData.ts rename to site/source/pages/Simulateurs/économie-collaborative/activitésData.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/customReduceReducers.ts b/site/source/pages/Simulateurs/économie-collaborative/customReduceReducers.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/customReduceReducers.ts rename to site/source/pages/Simulateurs/économie-collaborative/customReduceReducers.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/images/car.svg b/site/source/pages/Simulateurs/économie-collaborative/images/car.svg similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/images/car.svg rename to site/source/pages/Simulateurs/économie-collaborative/images/car.svg diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/images/checklist.svg b/site/source/pages/Simulateurs/économie-collaborative/images/checklist.svg similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/images/checklist.svg rename to site/source/pages/Simulateurs/économie-collaborative/images/checklist.svg diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/images/multitasking.svg b/site/source/pages/Simulateurs/économie-collaborative/images/multitasking.svg similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/images/multitasking.svg rename to site/source/pages/Simulateurs/économie-collaborative/images/multitasking.svg diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/images/pizzaSharing.svg b/site/source/pages/Simulateurs/économie-collaborative/images/pizzaSharing.svg similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/images/pizzaSharing.svg rename to site/source/pages/Simulateurs/économie-collaborative/images/pizzaSharing.svg diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/index.tsx b/site/source/pages/Simulateurs/économie-collaborative/index.tsx similarity index 96% rename from site/source/pages/Simulateurs/EconomieCollaborative/index.tsx rename to site/source/pages/Simulateurs/économie-collaborative/index.tsx index 607037358..6b8402e37 100644 --- a/site/source/pages/Simulateurs/EconomieCollaborative/index.tsx +++ b/site/source/pages/Simulateurs/économie-collaborative/index.tsx @@ -2,11 +2,11 @@ import { Trans } from 'react-i18next' import { Route, Routes } from 'react-router-dom' import styled from 'styled-components' +import { TrackChapter } from '@/ATInternetTracking' import { useIsEmbedded } from '@/components/utils/useIsEmbedded' import { Link } from '@/design-system/typography/link' import { useSitePaths } from '@/sitePaths' -import { TrackChapter } from '../../../ATInternetTracking' import useSimulatorsData from '../metadata' import Activité from './Activité' import ActivitésSelection from './ActivitésSelection' diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/reducer.ts b/site/source/pages/Simulateurs/économie-collaborative/reducer.ts similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/reducer.ts rename to site/source/pages/Simulateurs/économie-collaborative/reducer.ts diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/selectors.js b/site/source/pages/Simulateurs/économie-collaborative/selectors.js similarity index 100% rename from site/source/pages/Simulateurs/EconomieCollaborative/selectors.js rename to site/source/pages/Simulateurs/économie-collaborative/selectors.js diff --git a/site/source/pages/gerer/declaration-charges-sociales-independant/_config.ts b/site/source/pages/gerer/declaration-charges-sociales-independant/_config.ts new file mode 100644 index 000000000..850681cd9 --- /dev/null +++ b/site/source/pages/gerer/declaration-charges-sociales-independant/_config.ts @@ -0,0 +1,78 @@ +import DéclarationChargeSocialeIndépendant from '.' +import { config } from '../../Simulateurs/configs/config' +import { SimulatorsDataParams } from '../../Simulateurs/configs/types' + +export function déclarationChargesSocialesIndépendantConfig({ + t, + sitePaths, +}: SimulatorsDataParams) { + return config({ + id: 'déclaration-charges-sociales-indépendant', + path: sitePaths.gérer['déclaration-charges-sociales-indépendant'], + tracking: { + chapter1: 'gerer', + chapter2: 'declaration_charges_sociales_independant', + }, + icône: '📑', + meta: { + description: t( + 'pages.gérer.declaration_charges_sociales_indépendant.meta.description', + 'Calculez le montant des cotisations et contributions sociales à reporter dans votre déclaration de revenu 2021' + ), + title: t( + 'pages.gérer.declaration_charges_sociales_indépendant.meta.title', + 'Détermination des charges sociales déductibles' + ), + }, + pathId: 'gérer.déclaration-charges-sociales-indépendant', + shortName: t( + 'pages.gérer.declaration_charges_sociales_indépendant.shortname', + 'Détermination des charges sociales déductibles' + ), + iframePath: 'déclaration-charges-sociales-indépendant', + title: t( + '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'], + component: DéclarationChargeSocialeIndépendant, + } as const) +} + +export function déclarationRevenuIndépendantConfig({ + t, + sitePaths, +}: SimulatorsDataParams) { + // TODO: Delete "déclaration-revenu-indépendant" object when DRI will no longer be in beta + return config({ + id: 'déclaration-revenu-indépendant', + path: sitePaths.gérer.déclarationIndépendant.index, + tracking: { + chapter1: 'gerer', + chapter2: 'declaration_charges_sociales_independant', + }, + icône: '📑', + meta: { + description: t( + 'pages.gérer.declaration_charges_sociales_indépendant.meta.description', + 'Calculez le montant des cotisations et contributions sociales à reporter dans votre déclaration de revenu 2021' + ), + title: t( + 'pages.gérer.declaration_charges_sociales_indépendant.meta.title', + 'Détermination des charges sociales déductibles' + ), + }, + pathId: 'gérer.déclarationIndépendant.index', + shortName: t( + 'pages.gérer.declaration_charges_sociales_indépendant.shortname', + 'Détermination des charges sociales déductibles' + ), + iframePath: 'déclaration-revenu-indépendant', + title: t( + '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'], + component: DéclarationChargeSocialeIndépendant, + } as const) +} diff --git a/site/source/pages/Simulateurs/déclaration-revenu-indépendant-beta/_config.ts b/site/source/pages/gerer/declaration-revenu-independants/_config.ts similarity index 87% rename from site/source/pages/Simulateurs/déclaration-revenu-indépendant-beta/_config.ts rename to site/source/pages/gerer/declaration-revenu-independants/_config.ts index 0e5d60158..6b29d377b 100644 --- a/site/source/pages/Simulateurs/déclaration-revenu-indépendant-beta/_config.ts +++ b/site/source/pages/gerer/declaration-revenu-independants/_config.ts @@ -1,6 +1,6 @@ -import DéclarationRevenuIndépendant from '../../gerer/declaration-revenu-independants' -import { config } from '../configs/config' -import { SimulatorsDataParams } from '../configs/types' +import DéclarationRevenuIndépendant from '.' +import { config } from '../../Simulateurs/configs/config' +import { SimulatorsDataParams } from '../../Simulateurs/configs/types' export function déclarationRevenuIndépendantBetaConfig({ t, diff --git a/site/source/pages/Simulateurs/demande-mobilité/_config.ts b/site/source/pages/gerer/demande-mobilité/_config.ts similarity index 84% rename from site/source/pages/Simulateurs/demande-mobilité/_config.ts rename to site/source/pages/gerer/demande-mobilité/_config.ts index 3a58263d6..f58a46b50 100644 --- a/site/source/pages/Simulateurs/demande-mobilité/_config.ts +++ b/site/source/pages/gerer/demande-mobilité/_config.ts @@ -1,6 +1,6 @@ -import FormulaireMobilitéIndépendant from '../../gerer/demande-mobilité' -import { config } from '../configs/config' -import { SimulatorsDataParams } from '../configs/types' +import FormulaireMobilitéIndépendant from '.' +import { config } from '../../Simulateurs/configs/config' +import { SimulatorsDataParams } from '../../Simulateurs/configs/types' export function demandeMobilitéConfig({ t, sitePaths }: SimulatorsDataParams) { return config({ diff --git a/site/test/regressions/simulations-SASU.test.ts b/site/test/regressions/simulations-SASU.test.ts index db0d44d1d..a127c66d3 100644 --- a/site/test/regressions/simulations-SASU.test.ts +++ b/site/test/regressions/simulations-SASU.test.ts @@ -1,6 +1,6 @@ import { it } from 'vitest' -import { configSASU } from '@/pages/Simulateurs/configs/dirigeantSASU' +import { configSASU } from '@/pages/Simulateurs/sasu/dirigeantSASU' import rémunérationSASUSituations from './simulations-SASU.yaml' import { runSimulations } from './utils' diff --git a/site/test/regressions/simulations-artiste-auteur.test.ts b/site/test/regressions/simulations-artiste-auteur.test.ts index 2c9607c24..252055ee3 100644 --- a/site/test/regressions/simulations-artiste-auteur.test.ts +++ b/site/test/regressions/simulations-artiste-auteur.test.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' -import { configArtisteAuteur } from '@/pages/Simulateurs/configs/artisteAuteur' +import { configArtisteAuteur } from '@/pages/Simulateurs/artiste-auteur/artisteAuteur' import artisteAuteurSituations from './simulations-artiste-auteur.yaml' import { engine, getMissingVariables, runSimulations } from './utils' diff --git a/site/test/regressions/simulations-auto-entrepreneur.test.ts b/site/test/regressions/simulations-auto-entrepreneur.test.ts index 32173de11..153fe0943 100644 --- a/site/test/regressions/simulations-auto-entrepreneur.test.ts +++ b/site/test/regressions/simulations-auto-entrepreneur.test.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' -import { configAutoEntrepreneur } from '@/pages/Simulateurs/configs/autoEntrepreneur' +import { configAutoEntrepreneur } from '@/pages/Simulateurs/auto-entrepreneur/autoEntrepreneur' import autoEntrepreneurSituations from './simulations-auto-entrepreneur.yaml' import { engine, getMissingVariables, runSimulations } from './utils' diff --git a/site/test/regressions/simulations-dividendes.test.ts b/site/test/regressions/simulations-dividendes.test.ts index 5e4e04653..077f90a19 100644 --- a/site/test/regressions/simulations-dividendes.test.ts +++ b/site/test/regressions/simulations-dividendes.test.ts @@ -1,6 +1,6 @@ import { it } from 'vitest' -import { configDividendes } from '@/pages/Simulateurs/configs/dividendes' +import { configDividendes } from '@/pages/Simulateurs/dividendes/dividendes' import dividendesSituations from './simulations-dividendes.yaml' import { runSimulations } from './utils' diff --git a/site/test/regressions/simulations-indépendant.test.ts b/site/test/regressions/simulations-indépendant.test.ts index 09ce1cc79..d5710c365 100644 --- a/site/test/regressions/simulations-indépendant.test.ts +++ b/site/test/regressions/simulations-indépendant.test.ts @@ -1,7 +1,7 @@ import { DottedName } from 'modele-social' import { expect, it } from 'vitest' -import { configIndépendant } from '@/pages/Simulateurs/configs/indépendant' +import { configIndépendant } from '@/pages/Simulateurs/indépendant/_simulationConfig' import independentSituations from './simulations-indépendant.yaml' import { engine, getMissingVariables, runSimulations } from './utils' diff --git a/site/test/regressions/simulations-professions-libérales.test.ts b/site/test/regressions/simulations-professions-libérales.test.ts index 6ce765968..25931d477 100644 --- a/site/test/regressions/simulations-professions-libérales.test.ts +++ b/site/test/regressions/simulations-professions-libérales.test.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' -import { configProfessionLibérale } from '@/pages/Simulateurs/configs/professionLibérale' +import { configProfessionLibérale } from '@/pages/Simulateurs/profession-libérale/_simulationConfig' import professionsLibéralesSituations from './simulations-professions-libérales.yaml' import { engine, getMissingVariables, runSimulations } from './utils' diff --git a/site/test/regressions/simulations-salarié.test.ts b/site/test/regressions/simulations-salarié.test.ts index 7de2d53bd..e4dc06af1 100644 --- a/site/test/regressions/simulations-salarié.test.ts +++ b/site/test/regressions/simulations-salarié.test.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' -import { configSalarié } from '@/pages/Simulateurs/configs/salarié' +import { configSalarié } from '@/pages/Simulateurs/salarié/_simulationConfig' import employeeSituations from './simulations-salarié.yaml' import { engine, getMissingVariables, runSimulations } from './utils' diff --git a/site/vite-build-simulation-data.config.ts b/site/vite-build-simulation-data.config.ts index fed193aa7..7894e4a60 100644 --- a/site/vite-build-simulation-data.config.ts +++ b/site/vite-build-simulation-data.config.ts @@ -42,7 +42,7 @@ export default defineConfig({ enforce: 'pre', transform(code, id) { // Remove `component` and `seoExplanations` from config - const isConfigFile = /Simulateurs\/.+\/_config\.tsx?$/.test(id) + const isConfigFile = /pages\/.+\/_config\.tsx?$/.test(id) if (isConfigFile) { // eslint-disable-next-line no-console