From f26a3176e7249659d13cb478a6769973f4a72949 Mon Sep 17 00:00:00 2001 From: "Thomas H. Wiberg" Date: Wed, 18 Sep 2024 14:56:57 +0200 Subject: [PATCH] Vise filter for dokumentliste alltid (#6607) --- .../src/components/DocumentList.tsx | 36 ++++++------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/packages/sak-dokumenter/src/components/DocumentList.tsx b/packages/sak-dokumenter/src/components/DocumentList.tsx index d5b3585f4c..70386a51c7 100644 --- a/packages/sak-dokumenter/src/components/DocumentList.tsx +++ b/packages/sak-dokumenter/src/components/DocumentList.tsx @@ -119,23 +119,9 @@ const DocumentList = ({ const { data: inntektsmeldingerIBruk } = useQuery({ queryKey: ['kompletthet'], queryFn: ({ signal }) => getInntektsmeldingerIBruk(signal), - enabled: erStøttetFagsakYtelseType && !!behandlingUuid + enabled: erStøttetFagsakYtelseType && !!behandlingUuid, }); - const harMerEnnEnBehandlingKnyttetTilDokumenter = () => { - const unikeBehandlinger = []; - if (documents.some(document => document.behandlinger?.length > 0)) { - documents.forEach(document => - document.behandlinger.forEach(behandling => { - if (!unikeBehandlinger.includes(behandling)) { - unikeBehandlinger.push(behandling); - } - }), - ); - } - return unikeBehandlinger.length > 1; - }; - const getModiaLenke = () => ( @@ -168,17 +154,15 @@ const DocumentList = ({ return ( <>
- {harMerEnnEnBehandlingKnyttetTilDokumenter() && ( - - )} + {getModiaLenke()}