From 4fc73fc772e9806aa7e2ed27b9b0b7aac4f54d0c Mon Sep 17 00:00:00 2001
From: SAFINE LAGET Anis <anis.safine@beta.gouv.fr>
Date: Wed, 12 Mar 2025 16:34:26 +0000
Subject: [PATCH] =?UTF-8?q?fix(tdb):=20le=20lien=20vers=20le=20titre=20poi?=
 =?UTF-8?q?nte=20sur=20la=20d=C3=A9marche=20concern=C3=A9e=20(pub/pnm-publ?=
 =?UTF-8?q?ic/camino!1670)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...shboard.stories_snapshots_TableauPlein.html |  8 ++++----
 .../dashboard/pure-super-dashboard.tsx         | 18 +++++++++++-------
 2 files changed, 15 insertions(+), 11 deletions(-)

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 810d74151..3633e105e 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 34ded30e8..8b15e1af8 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) },
-- 
GitLab