From 655f83beea689de9d26360295ec359cd98985747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Meneuvrier?= Date: Mon, 3 Jun 2024 15:59:52 +0200 Subject: [PATCH] change footer buttons on recap disordre #2362 --- .../desordres_profile_occupant.json | 32 ++++++++++++-- .../Signalement/desordres_profile_tiers.json | 43 ++++++++++++++++--- 2 files changed, 67 insertions(+), 8 deletions(-) diff --git a/assets/json/Signalement/desordres_profile_occupant.json b/assets/json/Signalement/desordres_profile_occupant.json index 79f1f8486..c232ec49b 100644 --- a/assets/json/Signalement/desordres_profile_occupant.json +++ b/assets/json/Signalement/desordres_profile_occupant.json @@ -2544,16 +2544,42 @@ { "type": "SignalementFormButton", "label": "Je passe à la suite", - "slug": "desordres_renseignes_next", + "slug": "desordres_renseignes_next_no_disorder", "action": "goto:ecran_intermediaire_procedure", - "customCss": "fr-mb-3v" + "customCss": "fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === false" + } }, { "type": "SignalementFormButton", "label": "Je renseigne les désordres", + "slug": "desordres_renseignes_previous_no_disorder", + "action": "resolve:findPreviousScreen", + "customCss": "fr-btn--secondary fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === false" + } + }, + { + "type": "SignalementFormButton", + "label": "Suivant", + "slug": "desordres_renseignes_next", + "action": "goto:ecran_intermediaire_procedure", + "customCss": "fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === true" + } + }, + { + "type": "SignalementFormButton", + "label": "Précédent", "slug": "desordres_renseignes_previous", "action": "resolve:findPreviousScreen", - "customCss": "fr-btn--secondary fr-mb-3v" + "customCss": "fr-btn--secondary fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === true" + } } ] } diff --git a/assets/json/Signalement/desordres_profile_tiers.json b/assets/json/Signalement/desordres_profile_tiers.json index 5b5ec08c9..c2263a1ab 100644 --- a/assets/json/Signalement/desordres_profile_tiers.json +++ b/assets/json/Signalement/desordres_profile_tiers.json @@ -2560,29 +2560,62 @@ { "type": "SignalementFormButton", "label": "Je passe à la suite", - "slug": "desordres_renseignes_next_autre", + "slug": "desordres_renseignes_next_autre_no_disorder", "action": "goto:ecran_intermediaire_procedure", "customCss": "fr-mb-3v", "conditional": { - "show": "formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_particulier' || formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_pro' || formStore.data.signalement_concerne_profil_detail_tiers === 'bailleur'" + "show": "(formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_particulier' || formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_pro' || formStore.data.signalement_concerne_profil_detail_tiers === 'bailleur') && formStore.hasDesordre('desordres_') === false" } }, { "type": "SignalementFormButton", "label": "Je passe à la suite", - "slug": "desordres_renseignes_next_secours", + "slug": "desordres_renseignes_next_secours_no_disorder", "action": "goto:utilisation_service", "customCss": "fr-mb-3v", "conditional": { - "show": "formStore.data.signalement_concerne_profil_detail_tiers === 'service_secours'" + "show": "formStore.data.signalement_concerne_profil_detail_tiers === 'service_secours' && formStore.hasDesordre('desordres_') === false" } }, { "type": "SignalementFormButton", "label": "Je renseigne les désordres", + "slug": "desordres_renseignes_previous_no_disorder", + "action": "resolve:findPreviousScreen", + "customCss": "fr-btn--secondary fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === false" + } + }, + { + "type": "SignalementFormButton", + "label": "Suivant", + "slug": "desordres_renseignes_next_autre", + "action": "goto:ecran_intermediaire_procedure", + "customCss": "fr-mb-3v", + "conditional": { + "show": "(formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_particulier' || formStore.data.signalement_concerne_profil_detail_tiers === 'tiers_pro' || formStore.data.signalement_concerne_profil_detail_tiers === 'bailleur') && formStore.hasDesordre('desordres_') === true" + } + }, + { + "type": "SignalementFormButton", + "label": "Suivant", + "slug": "desordres_renseignes_next_secours", + "action": "goto:utilisation_service", + "customCss": "fr-mb-3v", + "conditional": { + "show": "formStore.data.signalement_concerne_profil_detail_tiers === 'service_secours' && formStore.hasDesordre('desordres_') === true" + } + }, + { + "type": "SignalementFormButton", + "label": "Précédent", "slug": "desordres_renseignes_previous", "action": "resolve:findPreviousScreen", - "customCss": "fr-btn--secondary fr-mb-3v" + "customCss": "fr-btn--secondary fr-mb-3v", + "conditional": { + "show": "formStore.hasDesordre('desordres_') === true" + } } ] }