From 9cf5033d2575eac205c2d37155bc94905fd458e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Oliver=20S=C3=B8berg?= <82504565+sebassonav@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:56:52 +0100 Subject: [PATCH] =?UTF-8?q?Ikke=20bruk=20tomt=20s=C3=B8skenarray=20men=20o?= =?UTF-8?q?pprett=20fra=20grunnlagsdata=20(#6159)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../soeskenjustering/Soeskenjustering.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/etterlatte-saksbehandling-ui/client/src/components/behandling/beregningsgrunnlag/soeskenjustering/Soeskenjustering.tsx b/apps/etterlatte-saksbehandling-ui/client/src/components/behandling/beregningsgrunnlag/soeskenjustering/Soeskenjustering.tsx index ddae89ca33f..3cd8e247250 100644 --- a/apps/etterlatte-saksbehandling-ui/client/src/components/behandling/beregningsgrunnlag/soeskenjustering/Soeskenjustering.tsx +++ b/apps/etterlatte-saksbehandling-ui/client/src/components/behandling/beregningsgrunnlag/soeskenjustering/Soeskenjustering.tsx @@ -79,7 +79,7 @@ const Soeskenjustering = (props: SoeskenjusteringProps) => { soeskenMedIBeregning: PeriodisertBeregningsgrunnlag[] }>({ defaultValues: { - soeskenMedIBeregning: behandling.beregningsGrunnlag?.soeskenMedIBeregning + soeskenMedIBeregning: !!behandling.beregningsGrunnlag?.soeskenMedIBeregning.length ? mapListeFraDto(behandling.beregningsGrunnlag?.soeskenMedIBeregning) : [nySoeskengrunnlagPeriode(soesken, behandling.virkningstidspunkt?.dato)], }, @@ -91,7 +91,7 @@ const Soeskenjustering = (props: SoeskenjusteringProps) => { }) const innloggetSaksbehandler = useInnloggetSaksbehandler() - const behandles = behandlingErRedigerbar( + const redigerbar = behandlingErRedigerbar( behandling.status, behandling.sakEnhetId, innloggetSaksbehandler.skriveEnheter @@ -185,7 +185,7 @@ const Soeskenjustering = (props: SoeskenjusteringProps) => { )} - {visFeil && feil.length > 0 && behandles ? : null} + {visFeil && feil.length > 0 && redigerbar ? : null}
{fields.map((item, index) => ( @@ -208,7 +208,7 @@ const Soeskenjustering = (props: SoeskenjusteringProps) => { /> ))} - {behandles && ( + {redigerbar && (