diff --git a/app/routes/batch-opprett._index.tsx b/app/routes/batch-opprett._index.tsx index c2d8953..eb3e9de 100644 --- a/app/routes/batch-opprett._index.tsx +++ b/app/routes/batch-opprett._index.tsx @@ -22,7 +22,7 @@ export default function BatchOpprett_index() {

Opprett BPEN005 batchkjøring

-
+


-
-

- +

@@ -58,7 +65,9 @@ export default function BatchOpprett_index() { />

- +

@@ -101,7 +110,19 @@ export default function BatchOpprett_index() { />

- + Kjør til og med aktivitet + +

+

+

Opprett BPEN091 batchkjøring

@@ -122,19 +143,23 @@ export default function BatchOpprett_index() {

Opprett BPEN096 batchkjøring

-
+

- +

Opprett RTV Brev Sammenligninger

- Opprett RTV Brev Sammenligninger + + Opprett RTV Brev Sammenligninger +

Opprett Omsorgsopptjening uttrekk

- Opprett Omsorgsopptjening-uttrekk + + Opprett Omsorgsopptjening-uttrekk +

Overfør Klager til Kabal

- Start batch behandling + Start batch behandling
) } diff --git a/app/routes/batch-opprett.bpen068.tsx b/app/routes/batch-opprett.bpen068.tsx index cfc0a50..705a5c8 100644 --- a/app/routes/batch-opprett.bpen068.tsx +++ b/app/routes/batch-opprett.bpen068.tsx @@ -9,7 +9,7 @@ export const action = async ({ request }: ActionFunctionArgs) => { const updates = Object.fromEntries(formData) const accessToken = await requireAccessToken(request) - let response = await opprettBpen068(accessToken, updates.satsDato as string, updates.reguleringsDato as string) + let response = await opprettBpen068(accessToken, updates.satsDato as string, updates.reguleringsDato as string, updates.sisteAktivitet as string) return redirect(`/behandling/${response.behandlingId}`) } diff --git a/app/services/batch.bpen068.server.ts b/app/services/batch.bpen068.server.ts index 41660b1..d76b0f5 100644 --- a/app/services/batch.bpen068.server.ts +++ b/app/services/batch.bpen068.server.ts @@ -5,7 +5,18 @@ export async function opprettBpen068( accessToken: string, satsDato: string, reguleringsDato: string, + sisteAktivitet: string, ): Promise { + + const body: any = { + satsDato: satsDato, + reguleringsDato: reguleringsDato, + } + + if(sisteAktivitet !== ''){ + body.sisteAktivitet = sisteAktivitet; + } + const response = await fetch( `${env.penUrl}/api/vedtak/regulering/start`, { @@ -15,10 +26,7 @@ export async function opprettBpen068( 'Content-Type': 'application/json', 'X-Request-ID': crypto.randomUUID(), }, - body: JSON.stringify({ - satsDato: satsDato, - reguleringsDato: reguleringsDato, - }), + body: JSON.stringify(body), }, )