From 7e4d3f62c0d1f591f0910f1817b5654e3c3911b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Pel=C3=A9?= Date: Wed, 25 Sep 2024 08:42:57 +0200 Subject: [PATCH 1/4] Ajout reload si validation questionnaire OK --- src/components/navigation/Continuer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/navigation/Continuer.tsx b/src/components/navigation/Continuer.tsx index ea5b5d15..f5cb4947 100644 --- a/src/components/navigation/Continuer.tsx +++ b/src/components/navigation/Continuer.tsx @@ -4,7 +4,7 @@ import { useNavigate, useParams } from 'react-router'; import { isComponentsContainSequence } from '../../lib/commons/isComponentscontainSequence'; import { ComponentType } from '../../typeLunatic/type-source'; import { CollectStatusEnum, OrchestratedElement } from '../../typeStromae/type'; -import { uriPostEnvoi, uri404 } from '../../lib/domainUri'; +import { uri404 } from '../../lib/domainUri'; import { useSaveSurveyUnitStateData } from '../../hooks/useSaveSurveyUnitData'; function getButtonTitle(getComponents: () => Array) { @@ -74,7 +74,7 @@ export function Continuer(props: OrchestratedElement) { collectStatus: CollectStatusEnum.Validated, }) .then(() => { - navigate(uriPostEnvoi(survey, unit)); + navigate(0); setSaving(false); }) .catch(() => { From 0f707eed13fbf28557b02e7ac5640f9cd091556e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Pel=C3=A9?= Date: Wed, 25 Sep 2024 08:52:59 +0200 Subject: [PATCH 2/4] remove unnecessary dependencies --- src/components/navigation/Continuer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/navigation/Continuer.tsx b/src/components/navigation/Continuer.tsx index f5cb4947..54f0924e 100644 --- a/src/components/navigation/Continuer.tsx +++ b/src/components/navigation/Continuer.tsx @@ -87,7 +87,7 @@ export function Continuer(props: OrchestratedElement) { document.getElementById('button-precedent')?.focus(); goNextPage(); }, - [goNextPage, isLastPage, unit, survey, navigate, saveSuData, pageTag] + [goNextPage, isLastPage, navigate, saveSuData, pageTag] ); return ( From 2cede4b3d8617cbe7167ab85d13b0091386cee1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Pel=C3=A9?= Date: Wed, 25 Sep 2024 08:59:43 +0200 Subject: [PATCH 3/4] remove unnecessary code --- src/components/navigation/Continuer.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/navigation/Continuer.tsx b/src/components/navigation/Continuer.tsx index 54f0924e..eda72273 100644 --- a/src/components/navigation/Continuer.tsx +++ b/src/components/navigation/Continuer.tsx @@ -1,6 +1,6 @@ import { useCallback, useState } from 'react'; import { Button } from '@codegouvfr/react-dsfr/Button'; -import { useNavigate, useParams } from 'react-router'; +import { useNavigate } from 'react-router'; import { isComponentsContainSequence } from '../../lib/commons/isComponentscontainSequence'; import { ComponentType } from '../../typeLunatic/type-source'; import { CollectStatusEnum, OrchestratedElement } from '../../typeStromae/type'; @@ -57,7 +57,6 @@ export function Continuer(props: OrchestratedElement) { } = props; const navigate = useNavigate(); const saveSuData = useSaveSurveyUnitStateData(); - const { unit, survey } = useParams(); const buttonContent = waiting || saving ? `Chargement` From c63c6f2d455fa79fe87642eb070dbe5de18eb696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20Pel=C3=A9?= Date: Tue, 22 Oct 2024 09:39:15 +0200 Subject: [PATCH 4/4] =?UTF-8?q?Ajout=20espace=20insecable=20et=20possibili?= =?UTF-8?q?t=C3=A9=20de=20ne=20pas=20afficher=20la=20parution=20aux=20jo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Welcome/WelcomeQuestions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Welcome/WelcomeQuestions.tsx b/src/components/Welcome/WelcomeQuestions.tsx index d63b60d0..94381b51 100644 --- a/src/components/Welcome/WelcomeQuestions.tsx +++ b/src/components/Welcome/WelcomeQuestions.tsx @@ -41,7 +41,7 @@ export function WelcomeQuestions(props: { welcome: WelcomeType }) { ) )} - +

Vu l'avis favorable du Conseil national de l'information statistique, cette enquête{caracteristiqueEnquete}, en application de{' '} @@ -60,9 +60,9 @@ export function WelcomeQuestions(props: { welcome: WelcomeType }) { Visa n°{props.welcome.Enq_NumeroVisa} du Ministre{' '} {props.welcome.Enq_MinistereTutelle}, valable pour{' '} {props.welcome.Enq_AnneeVisa} - {props.welcome.Enq_ParutionJo + {props.welcome.Enq_ParutionJo !== undefined && (props.welcome.Enq_ParutionJo ? ` - Arrêté en date du ${props.welcome.Enq_DateParutionJo}` - : '- Arrêté en cours de parution'} + : '- Arrêté en cours de parution')} .