From 3e2ec6847f587392acd0e72e4f00a7157228af74 Mon Sep 17 00:00:00 2001 From: Qadeer Khan Date: Thu, 4 Jan 2024 09:40:02 +0100 Subject: [PATCH] =?UTF-8?q?sender=20med=20tomme=20verdier=20for=20br=C3=B8?= =?UTF-8?q?dtekst=20og=20overskrift=20for=20=C3=A5=20trigge=20riktig=20val?= =?UTF-8?q?ideringstekst=20fra=20backend.=20Kan=20ikke=20sende=20null=20i?= =?UTF-8?q?=20disse=20feltene=20fordi=20parsing=20i=20backend=20krever=20a?= =?UTF-8?q?t=20de=20feltene=20er=20satt.=20(#5502)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/behandlingsupport/melding/MeldingIndex.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/sak-app/src/behandlingsupport/melding/MeldingIndex.tsx b/packages/sak-app/src/behandlingsupport/melding/MeldingIndex.tsx index 41981415c7..1e996bf453 100644 --- a/packages/sak-app/src/behandlingsupport/melding/MeldingIndex.tsx +++ b/packages/sak-app/src/behandlingsupport/melding/MeldingIndex.tsx @@ -5,7 +5,11 @@ import BehandlingType, { erTilbakekrevingType } from '@fpsak-frontend/kodeverk/s import dokumentMalType from '@fpsak-frontend/kodeverk/src/dokumentMalType'; import venteArsakType from '@fpsak-frontend/kodeverk/src/venteArsakType'; import kodeverkTyper from '@fpsak-frontend/kodeverk/src/kodeverkTyper'; -import MeldingerSakIndex, { FormValues, MessagesModalSakIndex, type MeldingerSakIndexBackendApi } from '@k9-sak-web/sak-meldinger'; +import MeldingerSakIndex, { + FormValues, + MessagesModalSakIndex, + type MeldingerSakIndexBackendApi, +} from '@k9-sak-web/sak-meldinger'; import { LoadingPanel } from '@fpsak-frontend/shared-components'; import { RestApiState } from '@k9-sak-web/rest-api-hooks'; import { @@ -84,8 +88,9 @@ const getPreviewCallback = dokumentMal, dokumentdata: { fritekst: fritekst || ' ', - fritekstbrev: - fritekstbrev && Object.values(fritekstbrev).some(x => x === null || x === '') ? null : fritekstbrev, + fritekstbrev: fritekstbrev + ? { brødtekst: fritekstbrev.brødtekst ?? '', overskrift: fritekstbrev.overskrift ?? '' } + : null, }, }; fetchPreview(false, data);