diff --git a/site/source/components/StatutTag.tsx b/site/source/components/StatutTag.tsx index 26f1f7b7a..173e2a75c 100644 --- a/site/source/components/StatutTag.tsx +++ b/site/source/components/StatutTag.tsx @@ -89,7 +89,7 @@ const TAG_DATA = { } } -export type Statut = keyof typeof TAG_DATA +export type StatutType = keyof typeof TAG_DATA const StyledTag = styled(Tag)` margin: 0 0.25rem; @@ -106,7 +106,7 @@ const StyledTag = styled(Tag)` ` interface StatutTagProps { - statut: Statut + statut: StatutType text: 'acronym' | 'longName' showIcon?: boolean } diff --git a/site/source/pages/assistants/choix-du-statut/_components/StatutsDisponibles.tsx b/site/source/pages/assistants/choix-du-statut/_components/StatutsDisponibles.tsx index 029a961a2..92a0912b3 100644 --- a/site/source/pages/assistants/choix-du-statut/_components/StatutsDisponibles.tsx +++ b/site/source/pages/assistants/choix-du-statut/_components/StatutsDisponibles.tsx @@ -1,7 +1,7 @@ +import { DottedName } from 'modele-social' import styled from 'styled-components' -import { DottedName } from '@/../../modele-social' -import { Statut, StatutTag } from '@/components/StatutTag' +import { StatutTag, StatutType } from '@/components/StatutTag' import { useEngine } from '@/components/utils/EngineContext' import { Message } from '@/design-system' import { H5 } from '@/design-system/typography/heading' @@ -21,24 +21,12 @@ export default function StatutsDisponibles() { - - - - - - + + + + + + @@ -77,11 +65,10 @@ const StyledMessage = styled(Message)` function Statut({ statut }: { statut: DottedName }) { const engine = useEngine() - const disabled = - engine.evaluate({ '=': [statut, 'non'] }).nodeValue === true + const disabled = engine.evaluate({ '=': [statut, 'non'] }).nodeValue === true const acronyme = (engine.getRule(statut).rawNode.acronyme ?? - engine.getRule(statut).title.toLocaleLowerCase()) as Statut + engine.getRule(statut).title.toLocaleLowerCase()) as StatutType return (
  • diff --git a/site/source/pages/assistants/choix-du-statut/détails-activité.tsx b/site/source/pages/assistants/choix-du-statut/détails-activité.tsx index 201c79fe6..1a4e7ed41 100644 --- a/site/source/pages/assistants/choix-du-statut/détails-activité.tsx +++ b/site/source/pages/assistants/choix-du-statut/détails-activité.tsx @@ -16,9 +16,9 @@ import { batchUpdateSituation } from '@/store/actions/actions' import { guichetToPLMétier } from '@/utils/guichetToPLMétier' import { + getGuichetTitle, GuichetDescription, GuichetEntry, - getGuichetTitle, useGuichetInfo, } from '../recherche-code-ape/GuichetInfo' import Layout from './_components/Layout'