Skip to content

Commit

Permalink
* Dolly frontend mer oppsett for Fullmakt
Browse files Browse the repository at this point in the history
  • Loading branch information
stigus committed Oct 2, 2024
1 parent 2cd58dd commit a520a4f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ export const Fullmakt = ({
label="Handling"
options={Options('fullmaktHandling')}
size="grow"
onChange={(val: Option[]) => {
formMethods.setValue(
`${path}.handling`,
val?.some((opt) => opt.value?.includes('*'))
? alleHandlinger
: val.map((opt) => opt.value),
)
}}
isClearable={true}
isMulti={true}
/>
Expand All @@ -158,7 +166,7 @@ export const Fullmakt = ({
eksisterendePersonPath={`${path}.motpartsPersonident`}
label={'FULLMEKTIG'}
formMethods={formMethods}
isExpanded={isTestnorgeIdent || formMethods.watch(`${path}.motpartsPersonident`) !== null}
isExpanded={isTestnorgeIdent || !!formMethods.watch(`${path}.motpartsPersonident`)}
toggleExpansion={!isTestnorgeIdent}
eksisterendeNyPerson={eksisterendeNyPerson}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Panel({
checkAttributeArray = null,
uncheckAttributeArray = null,
informasjonstekst = null,
iconType = null,
iconType = null as unknown as string,
forceOpen = false,
setPanelOpen = null,
}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ const selectOptions = {
],

fullmaktHandling: [
{ value: '*', label: 'Alle' },
{ value: 'LES', label: 'Les' },
{ value: 'KOMMUNISER', label: 'Kommuniser' },
{ value: 'SKRIV', label: 'Skriv' },
Expand Down

0 comments on commit a520a4f

Please sign in to comment.