diff --git a/frontend/components/Form/useDate.tsx b/frontend/components/Form/useDate.tsx index d98294be..79ef5266 100644 --- a/frontend/components/Form/useDate.tsx +++ b/frontend/components/Form/useDate.tsx @@ -66,18 +66,18 @@ const DatePicker: React.FC = ({ ( <> = ({ const periodDate = !intervention.done && !intervention.properties.cancelled && - intervention.intervention_start_date && - intervention.intervention_end_date + intervention.intervention_start_date ? `Prévue pour le ${new Date( intervention.intervention_start_date )?.toLocaleDateString()}` diff --git a/frontend/components/Interventions/Panel/Panel.tsx b/frontend/components/Interventions/Panel/Panel.tsx index ffd94cb8..876bc4f5 100644 --- a/frontend/components/Interventions/Panel/Panel.tsx +++ b/frontend/components/Interventions/Panel/Panel.tsx @@ -219,7 +219,7 @@ const InterventionsEdit: FC = () => { useEffect(() => { const { query, route } = router; - + setIntervention(undefined); if ( route === "/[organizationSlug]/map" && query.panel === "intervention-edit" &&