From fe014e9a00e42b76be86b5e26c59ab29ebcf69c7 Mon Sep 17 00:00:00 2001 From: FlorentGouyon Date: Wed, 20 Dec 2023 17:46:11 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20changement=20du=20mapping=20Front?= =?UTF-8?q?=E2=86=92=20Back=20pour=20filtres=20sauvegard=C3=A9s,=20TODO=20?= =?UTF-8?q?Back=E2=86=90=20Front?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/Documents/Documents.tsx | 46 +++-- .../Dashboard/PatientList/PatientList.tsx | 68 ++++--- .../ui/Inputs/DurationRange/DurationInput.tsx | 2 +- src/components/ui/Searchbar/Select.tsx | 4 + src/hooks/filters/useSavedFilters.ts | 14 +- src/mappers/filters.ts | 174 ++++++++++++++---- src/services/aphp/callApi.ts | 4 +- src/services/aphp/serviceCohorts.ts | 11 +- src/services/aphp/servicePatients.ts | 33 ++-- src/types/searchCriterias.ts | 12 +- 10 files changed, 253 insertions(+), 115 deletions(-) diff --git a/src/components/Dashboard/Documents/Documents.tsx b/src/components/Dashboard/Documents/Documents.tsx index e54a244e3..e6b101944 100644 --- a/src/components/Dashboard/Documents/Documents.tsx +++ b/src/components/Dashboard/Documents/Documents.tsx @@ -414,12 +414,16 @@ const Documents: React.FC = ({ groupId, deidentified }) => { const startDate = newFilters.startDate const endDate = newFilters.endDate const executiveUnits = newFilters.executiveUnits - patchSavedFilter(name, { - searchBy, - searchInput, - orderBy: { orderBy: Order.FAMILY, orderDirection: Direction.ASC }, - filters: { nda, ipp, docTypes, onlyPdfAvailable, startDate, endDate, executiveUnits } - }) + patchSavedFilter( + name, + { + searchBy, + searchInput, + orderBy: { orderBy: Order.FAMILY, orderDirection: Direction.ASC }, + filters: { nda, ipp, docTypes, onlyPdfAvailable, startDate, endDate, executiveUnits } + }, + deidentified ?? true + ) }} validationText={isReadonlyFilterInfoModal ? 'Fermer' : 'Sauvegarder'} > @@ -435,13 +439,25 @@ const Documents: React.FC = ({ groupId, deidentified }) => { maxLimit={50} /> - - + + + + + + - + + +