Skip to content
Snippets Groups Projects
Commit 0ca01c3b authored by BITARD Michaël's avatar BITARD Michaël
Browse files

fix(phases): on affiche la liste des démarches quand on a plusieurs démarches...

fix(phases): on affiche la liste des démarches quand on a plusieurs démarches sans aucune phase (!1672)
parent f78760ff
No related branches found
No related tags found
1 merge request!1672fix(phases): on affiche la liste des démarches quand on a plusieurs démarches sans aucune phase
Pipeline #536823 failed
......@@ -165,7 +165,9 @@ export const PureTitre = defineComponent<Props>(props => {
let demarcheSlug = props.currentDemarcheSlug
if (
if (isNullOrUndefinedOrEmpty(demarcheSlug) && 'erreur' in phases.value) {
demarcheSlug = phases.value.demarches[0].slug
} else if (
(isNullOrUndefinedOrEmpty(demarcheSlug) || isNullOrUndefined(data.demarches.find(({ slug }) => slug === props.currentDemarcheSlug))) &&
!('erreur' in phases.value) &&
phases.value.length > 0
......@@ -195,8 +197,10 @@ export const PureTitre = defineComponent<Props>(props => {
watch(
() => props.titreIdOrSlug,
async () => {
async (newValue, oldValue) => {
console.log('PLOP', props.titreIdOrSlug, newValue, oldValue)
if (titreData.value.status !== 'LOADED' || (titreData.value.value.id !== props.titreIdOrSlug && titreData.value.value.slug !== props.titreIdOrSlug)) {
console.log('Changement de titre')
await updateTitre(props.titreIdOrSlug)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment