Skip to content

Commit

Permalink
GruppeId kom ikke med dersom man velger importer person rett fra en g…
Browse files Browse the repository at this point in the history
…ruppe istedenfor fra Finn Person (#3424)

#deploy-test-frontend
  • Loading branch information
stigus authored Feb 23, 2024
1 parent 32868f9 commit 5b32d38
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext } from 'react'
import React, { useContext, useEffect } from 'react'
import { harAvhukedeAttributter } from '@/components/bestillingsveileder/utils'
import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext'
import { SigrunstubForm } from '@/components/fagsystem/sigrunstub/form/Form'
Expand Down Expand Up @@ -46,6 +46,12 @@ export const Steg2 = () => {
const opts: any = useContext(BestillingsveilederContext)
const formMethods = useFormContext()

useEffect(() => {
if (opts.gruppe?.id) {
formMethods.setValue('gruppeId', opts.gruppe?.id)
}
}, [])

const leggTil = opts.is.leggTil
const importTestnorge = opts.is.importTestnorge
const gruppe = opts.gruppe
Expand Down

0 comments on commit 5b32d38

Please sign in to comment.