Skip to content
Snippets Groups Projects
Commit 4fc73fc7 authored by SAFINE LAGET Anis's avatar SAFINE LAGET Anis Committed by BITARD Michaël
Browse files

fix(tdb): le lien vers le titre pointe sur la démarche concernée (!1670)

parent 0ca01c3b
No related branches found
Tags v0.110.0
1 merge request!1670fix(tdb): le lien vers le titre pointe sur la démarche concernée
Pipeline #539926 passed
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
</thead> </thead>
<tbody> <tbody>
<tr> <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 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><a href="/mocked-href" title="octroi" aria-label="octroi">Octroi</a></td> <td><span class="">Octroi</span></td>
<td><span class="small bold">Concession</span></td> <td><span class="small bold">Concession</span></td>
<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> <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 @@ ...@@ -41,8 +41,8 @@
<td><span class="">1810-01-01</span></td> <td><span class="">1810-01-01</span></td>
</tr> </tr>
<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 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><a href="/mocked-href" title="octroi" aria-label="octroi">Octroi</a></td> <td><span class="">Octroi</span></td>
<td><span class="small bold">Permis d'exploitation</span></td> <td><span class="small bold">Permis d'exploitation</span></td>
<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> <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>
......
import { defineComponent, onMounted, ref } from 'vue' import { defineComponent, onMounted, ref } from 'vue'
import { Column, TableSimple } from '../_ui/table-simple' 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 { SuperTitre } from 'camino-common/src/titres'
import { LoadingElement } from '@/components/_ui/functional-loader' import { LoadingElement } from '@/components/_ui/functional-loader'
import { AsyncData } from '@/api/client-rest' import { AsyncData } from '@/api/client-rest'
...@@ -12,8 +12,9 @@ import { isNotNullNorUndefinedNorEmpty } from 'camino-common/src/typescript-tool ...@@ -12,8 +12,9 @@ import { isNotNullNorUndefinedNorEmpty } from 'camino-common/src/typescript-tool
import { CaminoRouterLink } from '@/router/camino-router-link' import { CaminoRouterLink } from '@/router/camino-router-link'
import { DemarchesTypes } from 'camino-common/src/static/demarchesTypes' import { DemarchesTypes } from 'camino-common/src/static/demarchesTypes'
import { capitalize } from 'camino-common/src/strings' 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 { EtapesTypes } from 'camino-common/src/static/etapesTypes'
import { TitresTypesTypes } from 'camino-common/src/static/titresTypesTypes'
interface Props { interface Props {
apiClient: Pick<DashboardApiClient, 'getTitresAvecEtapeEnBrouillon'> apiClient: Pick<DashboardApiClient, 'getTitresAvecEtapeEnBrouillon'>
...@@ -40,17 +41,20 @@ export const PureSuperDashboard = defineComponent<Props>(props => { ...@@ -40,17 +41,20 @@ export const PureSuperDashboard = defineComponent<Props>(props => {
const columns: { const columns: {
[key in Columns]: JSXElementColumnData | ComponentColumnData | TextColumnData [key in Columns]: JSXElementColumnData | ComponentColumnData | TextColumnData
} = { } = {
nom: nomCell({ nom: titre.titre_nom }), nom: {
titre_type: typeCell(titre.titre_type_id),
demarche_type: {
type: 'jsx', type: 'jsx',
jsxElement: ( jsxElement: (
<CaminoRouterLink to={{ name: 'demarche', params: { demarcheId: titre.demarche_slug } }} isDisabled={false} title={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(DemarchesTypes[titre.demarche_type_id].nom)} {capitalize(TitresTypesTypes[getTitreTypeType(titre.titre_type_id)].nom)}
</CaminoRouterLink> </CaminoRouterLink>
), ),
value: titre.demarche_type_id, 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) }), domaine: domaineCell({ domaineId: getDomaineId(titre.titre_type_id) }),
titre_statut: statutCell(titre), titre_statut: statutCell(titre),
etape_brouillon: { type: 'text', value: capitalize(EtapesTypes[titre.etape_type_id].nom) }, etape_brouillon: { type: 'text', value: capitalize(EtapesTypes[titre.etape_type_id].nom) },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment