diff --git a/packages/ui/src/components/dashboard/pure-super-dashboard.stories_snapshots_TableauPlein.html b/packages/ui/src/components/dashboard/pure-super-dashboard.stories_snapshots_TableauPlein.html index 810d741511555a9338b3631c05b060457c515810..3633e105eba59fa0bdcb7d920ab5614dddc9db43 100644 --- a/packages/ui/src/components/dashboard/pure-super-dashboard.stories_snapshots_TableauPlein.html +++ b/packages/ui/src/components/dashboard/pure-super-dashboard.stories_snapshots_TableauPlein.html @@ -28,8 +28,8 @@ </thead> <tbody> <tr> - <td><a class="fr-link" to="{name:titre,params:{id:m-cx-aachen-1810}}" type="primary"><span class="bold">Aachen</span></a></td> - <td><a href="/mocked-href" title="octroi" aria-label="octroi">Octroi</a></td> + <td><a class="fr-link" to="{name:titre,params:{id:m-cx-aachen-1810}}" type="primary"><a href="/mocked-href" title="concession" aria-label="concession">Concession</a></a></td> + <td><span class="">Octroi</span></td> <td><span class="small bold">Concession</span></td> <td> <p class="fr-tag fr-tag--md mono" title="Domaine minéraux et métaux" aria-label="Domaine minéraux et métaux" style="min-width: 2rem; background-color: var(--background-contrast-blue-ecume); color: black;">M</p> @@ -41,8 +41,8 @@ <td><span class="">1810-01-01</span></td> </tr> <tr> - <td><a class="fr-link" to="{name:titre,params:{id:m-ax-amadis-5-2022}}" type="primary"><span class="bold">Amadis 5</span></a></td> - <td><a href="/mocked-href" title="octroi" aria-label="octroi">Octroi</a></td> + <td><a class="fr-link" to="{name:titre,params:{id:m-ax-amadis-5-2022}}" type="primary"><a href="/mocked-href" title="permis d'exploitation" aria-label="permis d'exploitation">Permis d'exploitation</a></a></td> + <td><span class="">Octroi</span></td> <td><span class="small bold">Permis d'exploitation</span></td> <td> <p class="fr-tag fr-tag--md mono" title="Domaine géothermie" aria-label="Domaine géothermie" style="min-width: 2rem; background-color: var(--background-contrast-pink-tuile); color: black;">G</p> diff --git a/packages/ui/src/components/dashboard/pure-super-dashboard.tsx b/packages/ui/src/components/dashboard/pure-super-dashboard.tsx index 34ded30e865874917e3eef9edb519d570adf4296..8b15e1af86fe4dc3c4abdfefe0829cd55fa7ecba 100644 --- a/packages/ui/src/components/dashboard/pure-super-dashboard.tsx +++ b/packages/ui/src/components/dashboard/pure-super-dashboard.tsx @@ -1,6 +1,6 @@ import { defineComponent, onMounted, ref } from 'vue' import { Column, TableSimple } from '../_ui/table-simple' -import { nomColumn, nomCell, statutCell, typeCell, domaineColumn, domaineCell } from '@/components/titres/table-utils' +import { nomColumn, statutCell, typeCell, domaineColumn, domaineCell } from '@/components/titres/table-utils' import { SuperTitre } from 'camino-common/src/titres' import { LoadingElement } from '@/components/_ui/functional-loader' import { AsyncData } from '@/api/client-rest' @@ -12,8 +12,9 @@ import { isNotNullNorUndefinedNorEmpty } from 'camino-common/src/typescript-tool import { CaminoRouterLink } from '@/router/camino-router-link' import { DemarchesTypes } from 'camino-common/src/static/demarchesTypes' import { capitalize } from 'camino-common/src/strings' -import { getDomaineId } from 'camino-common/src/static/titresTypes' +import { getDomaineId, getTitreTypeType } from 'camino-common/src/static/titresTypes' import { EtapesTypes } from 'camino-common/src/static/etapesTypes' +import { TitresTypesTypes } from 'camino-common/src/static/titresTypesTypes' interface Props { apiClient: Pick<DashboardApiClient, 'getTitresAvecEtapeEnBrouillon'> @@ -40,17 +41,20 @@ export const PureSuperDashboard = defineComponent<Props>(props => { const columns: { [key in Columns]: JSXElementColumnData | ComponentColumnData | TextColumnData } = { - nom: nomCell({ nom: titre.titre_nom }), - titre_type: typeCell(titre.titre_type_id), - demarche_type: { + nom: { type: 'jsx', jsxElement: ( - <CaminoRouterLink to={{ name: 'demarche', params: { demarcheId: titre.demarche_slug } }} isDisabled={false} title={DemarchesTypes[titre.demarche_type_id].nom}> - {capitalize(DemarchesTypes[titre.demarche_type_id].nom)} + <CaminoRouterLink to={{ name: 'demarche', params: { demarcheId: titre.demarche_slug } }} isDisabled={false} title={TitresTypesTypes[getTitreTypeType(titre.titre_type_id)].nom}> + {capitalize(TitresTypesTypes[getTitreTypeType(titre.titre_type_id)].nom)} </CaminoRouterLink> ), value: titre.demarche_type_id, }, + titre_type: typeCell(titre.titre_type_id), + demarche_type: { + type: 'text', + value: capitalize(DemarchesTypes[titre.demarche_type_id].nom), + }, domaine: domaineCell({ domaineId: getDomaineId(titre.titre_type_id) }), titre_statut: statutCell(titre), etape_brouillon: { type: 'text', value: capitalize(EtapesTypes[titre.etape_type_id].nom) },