From 1eaee4f1ba1c6479c101906f1e2a4330e6e391e2 Mon Sep 17 00:00:00 2001 From: Arthur Molinos Date: Thu, 28 Nov 2024 15:57:27 +0100 Subject: [PATCH] Corrige des erreurs typescript --- .../ModuleFichesActions/ModuleFichesActionsPage.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/TableauDeBord/Personnel/ModuleFichesActions/ModuleFichesActionsPage.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/TableauDeBord/Personnel/ModuleFichesActions/ModuleFichesActionsPage.tsx index bde890e100..5f3993b098 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/TableauDeBord/Personnel/ModuleFichesActions/ModuleFichesActionsPage.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/TableauDeBord/Personnel/ModuleFichesActions/ModuleFichesActionsPage.tsx @@ -28,9 +28,9 @@ type Props = { const ModuleFichesActionsPage = ({ view, slug, sortSettings }: Props) => { const collectiviteId = useCollectiviteId(); - const { data: dataModule, isLoading: isModuleLoading } = + const { data: module, isLoading: isModuleLoading } = usePersonalModuleFetch(slug); - const module = dataModule as ModuleFicheActionsSelect; + const { count } = usePlanActionsCount(); const trackEvent = useEventTracker(`app/tdb/personnel/${slug}`); @@ -46,7 +46,7 @@ const ModuleFichesActionsPage = ({ view, slug, sortSettings }: Props) => { properties={{ collectivite_id: collectiviteId! }} /> { variant="outlined" icon="equalizer-line" size="sm" - children="Filtrer" onClick={() => { openState.setIsOpen(true); trackEvent( @@ -69,7 +68,9 @@ const ModuleFichesActionsPage = ({ view, slug, sortSettings }: Props) => { { collectivite_id: collectiviteId } as never ); }} - /> + > + Filtrer + {module.slug === 'actions-dont-je-suis-pilote' && openState.isOpen && (