Skip to content

Commit

Permalink
UPDATE: navigate link to pvkdokument
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Nov 19, 2024
1 parent 6ef9efa commit 35a536f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/frontend/src/pages/BehandlingensLivslopPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export const BehandlingensLivslopPage = () => {
mutatedBehandlingensLivslop.id = existingBehandlingensLivsLop.id
}

const pvkDokumentLink =
pvkDokument && pvkDokument.skalUtforePvk ? '/pvkdokument/' : '/pvkbehov/'

if (behandlingensLivslop.id || existingBehandlingsLivslopId) {
await updateBehandlingensLivslop(mutatedBehandlingensLivslop).then((response) => {
if (tilTemaOversikt) {
Expand All @@ -100,7 +103,7 @@ export const BehandlingensLivslopPage = () => {
navigate(
'/dokumentasjon/' +
response.etterlevelseDokumentasjonId +
'/pvkdokument/' +
pvkDokumentLink +
(pvkDokument ? pvkDokument.id : 'ny')
)
} else {
Expand All @@ -115,7 +118,7 @@ export const BehandlingensLivslopPage = () => {
navigate(
'/dokumentasjon/' +
response.etterlevelseDokumentasjonId +
'/pvkdokument/' +
pvkDokumentLink +
(pvkDokument ? pvkDokument.id : 'ny')
)
} else {
Expand Down

0 comments on commit 35a536f

Please sign in to comment.