From 54af269ca07569ca4a487607b2d12b9ad4c9e49f Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Tue, 14 May 2024 13:33:01 +0200 Subject: [PATCH 001/327] Update Personinformasjon and NavnForm components, add 'Master' in PdlNavnVisning #deploy-test-frontend The code changes conducted primarily involve modifications in several components like "Personinformasjon", "NavnForm", and "PdlNavnVisning". Name attribute is added in "Personinformasjon", and "identMaster" variable is also now included in "NavnForm" and used in its condition checks. In "PdlNavnVisning", 'Master' title value is also being displayed. --- .../steg/steg1/paneler/Personinformasjon.tsx | 8 ++++++-- .../pdl/visning/partials/PdlPersonInfo.tsx | 6 ++++-- .../fagsystem/pdlf/form/partials/navn/Navn.tsx | 16 ++++++++++++---- .../components/ui/historikk/ArrayHistorikk.tsx | 3 ++- .../src/components/ui/titleValue/TitleValue.tsx | 4 ++++ 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/paneler/Personinformasjon.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/paneler/Personinformasjon.tsx index c8668f85329..ced5cec566d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/paneler/Personinformasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg1/paneler/Personinformasjon.tsx @@ -72,6 +72,7 @@ export const PersoninformasjonPanel = ({ stateModifier, testnorgeIdent }) => { iconType={'personinformasjon'} > + { - const { personFoerLeggTil, identtype } = opts + const { personFoerLeggTil, identtype, identMaster } = opts const fjernIdFoerLeggTil = (path: string) => { const pdlDataElement = _.get(personFoerLeggTil, `pdlforvalter.person.${path}`) @@ -274,7 +275,10 @@ PersoninformasjonPanel.initialValues = ({ set, opts, setMulti, del, has }) => { navn: { label: 'Navn', checked: has(paths.navn), - add: () => set(paths.navn, [getInitialNavn(identtype === 'NPID' ? 'PDL' : 'FREG')]), + add: () => + set(paths.navn, [ + getInitialNavn(identMaster === 'PDL' || identtype === 'NPID' ? 'PDL' : 'FREG'), + ]), remove: () => del(paths.navn), }, sprakKode: { diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/PdlPersonInfo.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/PdlPersonInfo.tsx index 2c6ec237425..ed0e2027055 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/PdlPersonInfo.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/PdlPersonInfo.tsx @@ -20,7 +20,7 @@ const getCurrentPersonstatus = (data) => { return null } -const PdlNavnVisning = ({ data }) => { +const PdlNavnVisning = ({ data, showMaster }) => { if (!data) { return null } @@ -31,6 +31,7 @@ const PdlNavnVisning = ({ data }) => { +