diff --git a/apps/adresse-service/src/main/resources/logback-spring.xml b/apps/adresse-service/src/main/resources/logback-spring.xml index 7315b501544..b5676347c14 100644 --- a/apps/adresse-service/src/main/resources/logback-spring.xml +++ b/apps/adresse-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 @@ -35,5 +36,5 @@ - + \ No newline at end of file diff --git a/apps/amelding-service/src/main/resources/logback-spring.xml b/apps/amelding-service/src/main/resources/logback-spring.xml index 52c15597b3c..b674b8f8e84 100644 --- a/apps/amelding-service/src/main/resources/logback-spring.xml +++ b/apps/amelding-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/app-tilgang-analyse-service/src/main/resources/logback-spring.xml b/apps/app-tilgang-analyse-service/src/main/resources/logback-spring.xml index 8fe635b4e57..803031980fa 100644 --- a/apps/app-tilgang-analyse-service/src/main/resources/logback-spring.xml +++ b/apps/app-tilgang-analyse-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/arbeidsforhold-service/src/main/resources/logback-spring.xml b/apps/arbeidsforhold-service/src/main/resources/logback-spring.xml index 2066327923b..b052f83d230 100644 --- a/apps/arbeidsforhold-service/src/main/resources/logback-spring.xml +++ b/apps/arbeidsforhold-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/batch-bestilling-service/src/main/resources/logback-spring.xml b/apps/batch-bestilling-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..27020c5c331 100644 --- a/apps/batch-bestilling-service/src/main/resources/logback-spring.xml +++ b/apps/batch-bestilling-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/brreg-stub/src/main/resources/logback-spring.xml b/apps/brreg-stub/src/main/resources/logback-spring.xml index 7315b501544..86987ef37a2 100644 --- a/apps/brreg-stub/src/main/resources/logback-spring.xml +++ b/apps/brreg-stub/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/bruker-service/src/main/resources/logback-spring.xml b/apps/bruker-service/src/main/resources/logback-spring.xml index 70ee88e5962..b0e1850eb07 100644 --- a/apps/bruker-service/src/main/resources/logback-spring.xml +++ b/apps/bruker-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 @@ -24,7 +25,8 @@ - + + true 256 diff --git a/apps/budpro-service/src/main/resources/logback-spring.xml b/apps/budpro-service/src/main/resources/logback-spring.xml index 8404dbd99f3..a92f9af3406 100644 --- a/apps/budpro-service/src/main/resources/logback-spring.xml +++ b/apps/budpro-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/TpsMessagingConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/TpsMessagingConsumer.java index a06891bd259..c0d78e1c627 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/TpsMessagingConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/TpsMessagingConsumer.java @@ -5,7 +5,7 @@ import no.nav.dolly.bestilling.ConsumerStatus; import no.nav.dolly.bestilling.tpsmessagingservice.command.EgenansattDeleteCommand; import no.nav.dolly.bestilling.tpsmessagingservice.command.EgenansattPostCommand; -import no.nav.dolly.bestilling.tpsmessagingservice.command.PersonGetCommand; +import no.nav.dolly.bestilling.tpsmessagingservice.command.PersonHentCommand; import no.nav.dolly.bestilling.tpsmessagingservice.command.TpsMessagingPostCommand; import no.nav.dolly.config.Consumers; import no.nav.dolly.metrics.Timed; @@ -52,7 +52,7 @@ public TpsMessagingConsumer( .build(); } - @Timed(name = "providers", tags = {"operation", "tps_messaging_createUtenlandskBankkonto"}) + @Timed(name = "providers", tags = { "operation", "tps_messaging_createUtenlandskBankkonto" }) public Flux sendUtenlandskBankkontoRequest(String ident, List miljoer, BankkontonrUtlandDTO body) { @@ -61,7 +61,7 @@ public Flux sendUtenlandskBankkontoRequest(String ident, new TpsMessagingPostCommand(webClient, ident, miljoer, body, UTENLANDSK_BANKKONTO_URL, token.getTokenValue()).call()); } - @Timed(name = "providers", tags = {"operation", "tps_messaging_createNorskBankkonto"}) + @Timed(name = "providers", tags = { "operation", "tps_messaging_createNorskBankkonto" }) public Flux sendNorskBankkontoRequest(String ident, List miljoer, BankkontonrNorskDTO body) { return tokenService.exchange(serverProperties) @@ -69,7 +69,7 @@ public Flux sendNorskBankkontoRequest(String ident, List< new TpsMessagingPostCommand(webClient, ident, miljoer, body, NORSK_BANKKONTO_URL, token.getTokenValue()).call()); } - @Timed(name = "providers", tags = {"operation", "tps_messaging_createSkjerming"}) + @Timed(name = "providers", tags = { "operation", "tps_messaging_createSkjerming" }) public Flux sendEgenansattRequest(String ident, List miljoer, LocalDate fraOgMed) { return tokenService.exchange(serverProperties) @@ -77,14 +77,14 @@ public Flux sendEgenansattRequest(String ident, List deleteEgenansattRequest(String ident, List miljoer) { return tokenService.exchange(serverProperties) .flatMapMany(token -> new EgenansattDeleteCommand(webClient, ident, miljoer, token.getTokenValue()).call()); } - @Timed(name = "providers", tags = {"operation", "tps_messaging_createSpraakkode"}) + @Timed(name = "providers", tags = { "operation", "tps_messaging_createSpraakkode" }) public Flux sendSpraakkodeRequest(String ident, List miljoer, SpraakDTO body) { return tokenService.exchange(serverProperties) @@ -92,11 +92,11 @@ public Flux sendSpraakkodeRequest(String ident, List getPerson(String ident, List miljoer) { return tokenService.exchange(serverProperties) - .flatMapMany(token -> new PersonGetCommand(webClient, ident, miljoer, token.getTokenValue()).call()); + .flatMapMany(token -> new PersonHentCommand(webClient, ident, miljoer, token.getTokenValue()).call()); } @Override diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonGetCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonHentCommand.java similarity index 86% rename from apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonGetCommand.java rename to apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonHentCommand.java index 7d30c111fdd..66c17fa02a3 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonGetCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/PersonHentCommand.java @@ -14,10 +14,10 @@ @RequiredArgsConstructor @Slf4j -public class PersonGetCommand implements Callable> { +public class PersonHentCommand implements Callable> { private static final String MILJOER_PARAM = "miljoer"; - private static final String PERSONER_URL = "/api/v1/personer/{ident}"; + private static final String PERSONER_URL = "/api/v2/personer/ident"; private final WebClient webClient; private final String ident; @@ -27,11 +27,12 @@ public class PersonGetCommand implements Callable> { @Override public Flux call() { - return webClient.get() + return webClient.post() .uri(uriBuilder -> uriBuilder .path(PERSONER_URL) .queryParam(MILJOER_PARAM, miljoer) - .build(ident)) + .build()) + .bodyValue(ident) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() .bodyToFlux(PersonMiljoeDTO.class) diff --git a/apps/dolly-backend/src/main/resources/logback-spring.xml b/apps/dolly-backend/src/main/resources/logback-spring.xml index c5446a2acc1..5a6ea947bb8 100644 --- a/apps/dolly-backend/src/main/resources/logback-spring.xml +++ b/apps/dolly-backend/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 @@ -37,10 +38,10 @@ - - - - - - + + + + + + diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java index 06c00ec7121..1250d63cceb 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java @@ -131,4 +131,4 @@ private Function> createRoute(String segment, St .filters(filter, addUserJwtHeaderFilter()) ).uri(host); } -} \ No newline at end of file +} diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/BestillingSammendrag.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/BestillingSammendrag.tsx index b3c22eff2e4..7680d9e6523 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/BestillingSammendrag.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/BestillingSammendrag.tsx @@ -19,8 +19,8 @@ export default function BestillingSammendrag({ bestilling }) { sistOppdatert: bestilling.sistOppdatert, opprettetFraId: bestilling.opprettetFraId, opprettetFraGruppeId: bestilling.opprettetFraGruppeId, - navSyntetiskIdent: bestilling.bestilling.pdldata?.opprettNyPerson?.syntetisk, - beskrivelse: bestilling.bestilling.beskrivelse, + navSyntetiskIdent: bestilling?.bestilling?.pdldata?.opprettNyPerson?.syntetisk, + beskrivelse: bestilling?.bestilling?.beskrivelse, }} header="Bestillingskriterier" /> diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx index aa8ad5257dd..6b1daa1491f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsforholdForm.tsx @@ -68,7 +68,7 @@ export const ArbeidsforholdForm = ({ const aaregBestillinger = bestillinger ?.filter((bestilling) => bestilling?.data?.aareg) - ?.flatMap((bestilling) => bestilling.data.aareg) + ?.flatMap((bestilling) => bestilling.data?.aareg) ?.filter((bestilling) => _.isEmpty(bestilling?.amelding)) return _.uniqWith( diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx index 0357ec35917..7e55fc61c88 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx @@ -159,10 +159,10 @@ const ingenOverlappFraTildato = (tildato, values) => { if (values.tidligereBestillinger) { const arenaBestillinger = values.tidligereBestillinger.filter((bestilling) => - bestilling.data.hasOwnProperty('arenaforvalter'), + bestilling.data?.hasOwnProperty('arenaforvalter'), ) for (let bestilling of arenaBestillinger) { - let arenaInfo = bestilling.data.arenaforvalter + let arenaInfo = bestilling.data?.arenaforvalter for (let key of ikkeOverlappendeVedtak) { if (arenaInfo[key]?.length > 0) { const fraDatoBestilling = arenaInfo[key]?.[0]?.fraDato diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/visning/Visning.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/visning/Visning.tsx index 2db03364728..48a48a48889 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/visning/Visning.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/visning/Visning.tsx @@ -130,8 +130,8 @@ InntektsmeldingVisning.filterValues = (bestillinger: Array, ident: s return bestillinger.filter( (bestilling: any) => - bestilling.data.inntektsmelding && - !tomBestilling(bestilling.data.inntektsmelding.inntekter) && + bestilling.data?.inntektsmelding && + !tomBestilling(bestilling.data?.inntektsmelding.inntekter) && erGyldig(bestilling.id, 'INNTKMELD', ident), ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/visning/Visning.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/visning/Visning.tsx index 438bdfcac9e..afbe274543c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/visning/Visning.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/visning/Visning.tsx @@ -114,6 +114,6 @@ SykemeldingVisning.filterValues = (bestillinger: Array, ident: stri return bestillinger.filter( (bestilling: any) => - bestilling.data.sykemelding && erGyldig(bestilling.id, 'SYKEMELDING', ident), + bestilling.data?.sykemelding && erGyldig(bestilling.id, 'SYKEMELDING', ident), ) } diff --git a/apps/dolly-frontend/src/main/js/src/pages/gruppe/PersonVisning/PersonVisning.tsx b/apps/dolly-frontend/src/main/js/src/pages/gruppe/PersonVisning/PersonVisning.tsx index 975c570ae80..7ca3eff7628 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/gruppe/PersonVisning/PersonVisning.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/gruppe/PersonVisning/PersonVisning.tsx @@ -514,7 +514,7 @@ export default ({ `${TPS_MESSAGING_URL}/${ident}?miljoer=${miljoe}` -const getTpsMessagingUrlAllEnvs = (ident) => `${TPS_MESSAGING_URL}/${ident}` +const getTpsMessagingUrl_V2 = (miljoe) => `${TPS_MESSAGING_URL_V2}/ident?miljoer=${miljoe}` +const getTpsMessagingUrlAllEnvs_V2 = () => `${TPS_MESSAGING_URL_V2}/ident` export default { getTpsPersonInfo(ident, miljoe) { - return Request.get(getTpsMessagingUrl(ident, miljoe)) + return Request.post(getTpsMessagingUrl_V2(miljoe), ident) }, getTpsPersonInfoAllEnvs(ident) { - return Request.get(getTpsMessagingUrlAllEnvs(ident)) + return Request.post(getTpsMessagingUrlAllEnvs_V2(), ident) }, deleteBankkontoNorsk(ident) { - return Request.delete(`${TPS_MESSAGING_URL}/${ident}/bankkonto-norsk`) + return Request.delete(`${TPS_MESSAGING_URL_V1}/${ident}/bankkonto-norsk`) }, deleteBankkontoUtenlandsk(ident) { - return Request.delete(`${TPS_MESSAGING_URL}/${ident}/bankkonto-utenlandsk`) + return Request.delete(`${TPS_MESSAGING_URL_V1}/${ident}/bankkonto-utenlandsk`) }, } diff --git a/apps/dolly-frontend/src/main/js/src/utils/SjekkBestillingFagsystem.tsx b/apps/dolly-frontend/src/main/js/src/utils/SjekkBestillingFagsystem.tsx index dbef5048242..bee10ce752d 100644 --- a/apps/dolly-frontend/src/main/js/src/utils/SjekkBestillingFagsystem.tsx +++ b/apps/dolly-frontend/src/main/js/src/utils/SjekkBestillingFagsystem.tsx @@ -1,7 +1,7 @@ export const harAaregBestilling = (bestillingerFagsystemer) => { let aareg = false bestillingerFagsystemer?.forEach((i) => { - if (i.aareg) { + if (i?.aareg) { aareg = true } }) @@ -11,7 +11,7 @@ export const harAaregBestilling = (bestillingerFagsystemer) => { export const harMedlBestilling = (bestillingerFagsystemer) => { let medl = false bestillingerFagsystemer?.forEach((i) => { - if (i.medl) { + if (i?.medl) { medl = true } }) @@ -21,7 +21,7 @@ export const harMedlBestilling = (bestillingerFagsystemer) => { export const harUdistubBestilling = (bestillingerFagsystemer) => { let udistub = false bestillingerFagsystemer?.forEach((i) => { - if (i.udistub) { + if (i?.udistub) { udistub = true } }) @@ -31,7 +31,7 @@ export const harUdistubBestilling = (bestillingerFagsystemer) => { export const harTpBestilling = (bestillingerFagsystemer) => { let tp = false bestillingerFagsystemer?.forEach((i) => { - if (i.pensjonforvalter?.tp?.length > 0) { + if (i?.pensjonforvalter?.tp?.length > 0) { tp = true } }) @@ -41,7 +41,7 @@ export const harTpBestilling = (bestillingerFagsystemer) => { export const harPoppBestilling = (bestillingerFagsystemer) => { let popp = false bestillingerFagsystemer?.forEach((i) => { - if (i.pensjonforvalter?.inntekt) { + if (i?.pensjonforvalter?.inntekt) { popp = true } }) @@ -51,7 +51,7 @@ export const harPoppBestilling = (bestillingerFagsystemer) => { export const harApBestilling = (bestillingerFagsystemer) => { let alderspensjon = false bestillingerFagsystemer?.forEach((i) => { - if (i.pensjonforvalter?.alderspensjon) { + if (i?.pensjonforvalter?.alderspensjon) { alderspensjon = true } }) @@ -61,7 +61,7 @@ export const harApBestilling = (bestillingerFagsystemer) => { export const harUforetrygdBestilling = (bestillingerFagsystemer) => { let uforetrygd = false bestillingerFagsystemer?.forEach((i) => { - if (i.pensjonforvalter?.uforetrygd) { + if (i?.pensjonforvalter?.uforetrygd) { uforetrygd = true } }) @@ -71,7 +71,7 @@ export const harUforetrygdBestilling = (bestillingerFagsystemer) => { export const harInstBestilling = (bestillingerFagsystemer) => { let inst = false bestillingerFagsystemer?.forEach((i) => { - if (i.instdata) { + if (i?.instdata) { inst = true } }) @@ -81,7 +81,7 @@ export const harInstBestilling = (bestillingerFagsystemer) => { export const harDokarkivBestilling = (bestillingerFagsystemer) => { let dokarkiv = false bestillingerFagsystemer?.forEach((i) => { - if (i.dokarkiv) { + if (i?.dokarkiv) { dokarkiv = true } }) @@ -91,7 +91,7 @@ export const harDokarkivBestilling = (bestillingerFagsystemer) => { export const harHistarkBestilling = (bestillingerFagsystemer) => { let histark = false bestillingerFagsystemer?.forEach((i) => { - if (i.histark) { + if (i?.histark) { histark = true } }) @@ -101,7 +101,7 @@ export const harHistarkBestilling = (bestillingerFagsystemer) => { export const harArbeidsplassenBestilling = (bestillingerFagsystemer) => { let arbeidsplassen = false bestillingerFagsystemer?.forEach((i) => { - if (i.arbeidsplassenCV) { + if (i?.arbeidsplassenCV) { arbeidsplassen = true } }) @@ -111,7 +111,7 @@ export const harArbeidsplassenBestilling = (bestillingerFagsystemer) => { export const harArenaBestilling = (bestillingerFagsystemer) => { let arena = false bestillingerFagsystemer?.forEach((i) => { - if (i.arenaforvalter) { + if (i?.arenaforvalter) { arena = true } }) @@ -121,7 +121,7 @@ export const harArenaBestilling = (bestillingerFagsystemer) => { export const harSykemeldingBestilling = (bestillingerFagsystemer) => { let sykemelding = false bestillingerFagsystemer?.forEach((i) => { - if (i.sykemelding) { + if (i?.sykemelding) { sykemelding = true } }) @@ -131,7 +131,7 @@ export const harSykemeldingBestilling = (bestillingerFagsystemer) => { export const harInntektsmeldingBestilling = (bestillingerFagsystemer) => { let inntektsmelding = false bestillingerFagsystemer?.forEach((i) => { - if (i.inntektsmelding) { + if (i?.inntektsmelding) { inntektsmelding = true } }) diff --git a/apps/dolly-frontend/src/main/resources/logback-spring.xml b/apps/dolly-frontend/src/main/resources/logback-spring.xml index deb09e10d26..57b5465f668 100644 --- a/apps/dolly-frontend/src/main/resources/logback-spring.xml +++ b/apps/dolly-frontend/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/dollystatus/src/main/resources/logback-spring.xml b/apps/dollystatus/src/main/resources/logback-spring.xml index 52c15597b3c..aa8d7c84f14 100644 --- a/apps/dollystatus/src/main/resources/logback-spring.xml +++ b/apps/dollystatus/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java index 00a741fa6a7..e97da25214a 100644 --- a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java +++ b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/EndringsmeldingFrontendApplicationStarter.java @@ -84,4 +84,4 @@ private Function> createRoute(String segment, St .filters(filter) ).uri(host); } -} \ No newline at end of file +} diff --git a/apps/endringsmelding-frontend/src/main/js/package-lock.json b/apps/endringsmelding-frontend/src/main/js/package-lock.json index b9f7ff4c676..3ac2ebb0e03 100644 --- a/apps/endringsmelding-frontend/src/main/js/package-lock.json +++ b/apps/endringsmelding-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "endringsmelding-frontend", - "version": "1.2.16", + "version": "1.2.22", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "endringsmelding-frontend", - "version": "1.2.16", + "version": "1.2.22", "dependencies": { "@navikt/dolly-komponenter": "^1.3.33", "@navikt/ds-icons": "^3.4.3", @@ -69,27 +69,27 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", + "@babel/generator": "^7.24.4", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", "@babel/template": "^7.24.0", "@babel/traverse": "^7.24.1", "@babel/types": "^7.24.0", @@ -108,9 +108,9 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { "@babel/types": "^7.24.0", @@ -273,9 +273,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", @@ -301,9 +301,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -358,9 +358,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", + "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1037,25 +1037,25 @@ } }, "node_modules/@navikt/aksel-icons": { - "version": "6.3.4", - "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/6.3.4/993535eda9070c8bfacb5fe95a267fdbdcd554e8", - "integrity": "sha512-x5Cia/UjU6W5GuD0qwyxv+9EOOfKGVXz/QtXzTYxT3w1kCjzNVJFCcdZ+U/69jci/dWgTZQN+T93p6PDu6/6Gw==" + "version": "6.5.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/aksel-icons/6.5.0/f051a5673ce58cff706e9e2a9f4ff0e7ee6de77a", + "integrity": "sha512-ncPqVapjRWW4A9nBrqPi1ZSAcACOyodd9x1e7lEWBwpAtQEmzEAjlhMj5OyYTI/HUs5AvSBHF0eUf8kZIvq9Vg==" }, "node_modules/@navikt/dolly-assets": { - "version": "1.2.15", - "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-assets/1.2.15/567f4a0fd3610ede8e2fe9ba2811101fe45d55ce", - "integrity": "sha512-AACQve+uo2XraXSmAaJZgzkk5pf0u9a5Kref5NnxMQ9WJlQO2AJZ/sIl1e0rA2hzcouTw8GkteNYvPcDy+B/eg==" + "version": "1.2.16", + "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-assets/1.2.16/4a2e251444dbe41e384a77c2c74102416903c1b1", + "integrity": "sha512-Wn0IiRaGUsBDng0Y75jZqurQJyHjakjenoQLxki/sG5XryD0SGkaF1w0xlbRwqjluVhNW+miC46iQn2ykq74HQ==" }, "node_modules/@navikt/dolly-komponenter": { - "version": "1.3.35", - "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-komponenter/1.3.35/817e47a8078f942e05c1b72e62da6bea1b280f84", - "integrity": "sha512-JGdMFx3HtmIb5CSH7nCBcwvQQBf5r0dRmx6saxzeeByqlIVG48mPCCP1GVH9XPlWuG06JQtYoR7iMyYK4N2h1g==", + "version": "1.4.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-komponenter/1.4.0/4656f719dad185114709f1001a8ac40c924ac1e8", + "integrity": "sha512-O8ohvwM5EzqKeEyRFijmvIequHXm5GvGuv1QXTN68vUgFnUNzVv9l96V93Mp1uocTtOjOJ7AKdLXgXOD76lCUw==", "dependencies": { "@navikt/dolly-assets": "^1.2.9", "@navikt/dolly-lib": "^1.2.16", - "@navikt/ds-css": "^6.0.0", + "@navikt/ds-css": "^6.3.4", "@navikt/ds-icons": "^3.4.3", - "@navikt/ds-react": "^6.0.0", + "@navikt/ds-react": "^6.3.4", "classnames": "^2.3.2", "date-fns": "^3.3.1", "dayjs": "^1.11.3", @@ -1076,14 +1076,14 @@ } }, "node_modules/@navikt/dolly-lib": { - "version": "1.2.21", - "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-lib/1.2.21/54f71b227f62313920bbdcbf1f9b90e1df3eef63", - "integrity": "sha512-9cuullCMapcPoIPOad2j6DkOr8ZWCm9zxRv5n+2EOAD7y3Ex4bVgJgSHSgc4bvB2Td4ApWyhTocQvyo2OfjSHg==" + "version": "1.2.23", + "resolved": "https://npm.pkg.github.com/download/@navikt/dolly-lib/1.2.23/865f6f64518ff8079d1e780993fb74374cee2579", + "integrity": "sha512-yTs1+Y4v3QOitFJiR/wHPwgiWZ0btJsDJ7++RGs/OkBpRqLNvPuKgvJSzZSZc9+nVolF01noT8T7vgoAO0+MLQ==" }, "node_modules/@navikt/ds-css": { - "version": "6.3.4", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/6.3.4/4a75c7d0c8ded049b791f1f1f9f1454575bbb2a3", - "integrity": "sha512-XYerxBi+eAb/RKdGjEsBtRybZmrK9eG7xl/dpUJVo/PUQTah1/Vs3srQpQZc5x8+XoRT1PV43v4f+oUb5auLyA==" + "version": "6.5.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-css/6.5.0/9b13db809fe703b2ccffb6fe9e3fc497c5b1f71b", + "integrity": "sha512-pKiLPj53DS4IUz8y4Q6dSQgXSxeoRJFSJki1OOrfQ/DezcbevnaDHoZ4eUqM2JLxEIUQxd5BV958bVOxS4AHiQ==" }, "node_modules/@navikt/ds-icons": { "version": "3.4.3", @@ -1095,15 +1095,13 @@ } }, "node_modules/@navikt/ds-react": { - "version": "6.3.4", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/6.3.4/ce6bed132e385fdb262b3f1376bee3691202a437", - "integrity": "sha512-VMKFrmEfEnoQ5menJs/LcPypBmjyQm22JdHFMXrz8ApXqXUs3HWq4Za3dH7BC+X64D7v5p7YXilUHoSk3NM1sg==", + "version": "6.5.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-react/6.5.0/6a363bcbcd1d29fbfd328f05358c50135535d165", + "integrity": "sha512-QiORwNLzCI2Nf1BP0ukGZKqmc3mQQgEt08W3FO0B8gxXtRbzH5h0inv95i14O2u/uLIjLEPDy5027y/Luu2viQ==", "dependencies": { "@floating-ui/react": "0.25.4", - "@navikt/aksel-icons": "^6.3.4", - "@navikt/ds-tokens": "^6.3.4", - "@radix-ui/react-tabs": "1.0.0", - "@radix-ui/react-toggle-group": "1.0.0", + "@navikt/aksel-icons": "^6.5.0", + "@navikt/ds-tokens": "^6.5.0", "clsx": "^2.1.0", "date-fns": "^3.0.0", "react-day-picker": "8.10.0" @@ -1113,10 +1111,23 @@ "react": "^17.0.0 || ^18.0.0" } }, + "node_modules/@navikt/ds-react/node_modules/react-day-picker": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.0.tgz", + "integrity": "sha512-mz+qeyrOM7++1NCb1ARXmkjMkzWVh2GL9YiPbRjKe0zHccvekk4HE+0MPOZOrosn8r8zTHIIeOUXTmXRqmkRmg==", + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/gpbl" + }, + "peerDependencies": { + "date-fns": "^2.28.0 || ^3.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/@navikt/ds-tokens": { - "version": "6.3.4", - "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/6.3.4/79e81dd741f1aebd6797a063b3eff37966a4f7bd", - "integrity": "sha512-tr9VevV8jzh2Mi3IQSiR1WRlHwcPKlfjsBJ54UO+ieQP6wZyNIC+1VGy16U7HzeDdi0QcLaFHI3ns7sdWrF0Cg==" + "version": "6.5.0", + "resolved": "https://npm.pkg.github.com/download/@navikt/ds-tokens/6.5.0/5ceb4651fcc5a8a5cfd13909340421de6c9fe2a1", + "integrity": "sha512-DP60yhxQHBMGJtJtrBwQGlobrxM4njBkJpmNnOeMpPOmOGO5CPwiF/BSvhOB/FV6rbbsaGma9lkFdTOwcz4aAQ==" }, "node_modules/@navikt/fnrvalidator": { "version": "2.0.7", @@ -1136,223 +1147,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@radix-ui/primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz", - "integrity": "sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - } - }, - "node_modules/@radix-ui/react-collection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.0.tgz", - "integrity": "sha512-8i1pf5dKjnq90Z8udnnXKzdCEV3/FYrfw0n/b6NvB6piXEn3fO1bOh7HBcpG8XrnIXzxlYu2oCcR38QpyLS/mg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-primitive": "1.0.0", - "@radix-ui/react-slot": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-compose-refs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz", - "integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-context": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.0.0.tgz", - "integrity": "sha512-1pVM9RfOQ+n/N5PJK33kRSKsr1glNxomxONs5c49MliinBY6Yw2Q995qfBUUo0/Mbg05B/sGA0gkgPI7kmSHBg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-direction": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.0.0.tgz", - "integrity": "sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.0.0.tgz", - "integrity": "sha512-Q6iAB/U7Tq3NTolBBQbHTgclPmGWE3OlktGGqrClPozSw4vkQ1DfQAOtzgRPecKsMdJINE05iaoDUG8tRzCBjw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-layout-effect": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-presence": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.0.0.tgz", - "integrity": "sha512-A+6XEvN01NfVWiKu38ybawfHsBjWum42MRPnEuqPsBZ4eV7e/7K321B5VgYMPv3Xx5An6o1/l9ZuDBgmcmWK3w==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-use-layout-effect": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-primitive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.0.tgz", - "integrity": "sha512-EyXe6mnRlHZ8b6f4ilTDrXmkLShICIuOTTj0GX4w1rp+wSxf3+TD05u1UOITC8VsJ2a9nwHvdXtOXEOl0Cw/zQ==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-slot": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-roving-focus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.0.tgz", - "integrity": "sha512-lHvO4MhvoWpeNbiJAoyDsEtbKqP2jkkdwsMVJ3kfqbkC71J/aXE6Th6gkZA1xHEqSku+t+UgoDjvE7Z3gsBpcg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-collection": "1.0.0", - "@radix-ui/react-compose-refs": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-direction": "1.0.0", - "@radix-ui/react-id": "1.0.0", - "@radix-ui/react-primitive": "1.0.0", - "@radix-ui/react-use-callback-ref": "1.0.0", - "@radix-ui/react-use-controllable-state": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-slot": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz", - "integrity": "sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-compose-refs": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-tabs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.0.tgz", - "integrity": "sha512-oKUwEDsySVC0uuSEH7SHCVt1+ijmiDFAI9p+fHCtuZdqrRDKIFs09zp5nrmu4ggP6xqSx9lj1VSblnDH+n3IBA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-direction": "1.0.0", - "@radix-ui/react-id": "1.0.0", - "@radix-ui/react-presence": "1.0.0", - "@radix-ui/react-primitive": "1.0.0", - "@radix-ui/react-roving-focus": "1.0.0", - "@radix-ui/react-use-controllable-state": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-toggle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.0.0.tgz", - "integrity": "sha512-RvY06eyDlZMC4rZdWK8jNovEDKf2jBvYFOB4rkQ/ypMOjFQuoh2QodlxlGakrZDrLnfxzyNnn/pg88CWVtAAdw==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-primitive": "1.0.0", - "@radix-ui/react-use-controllable-state": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-toggle-group": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.0.0.tgz", - "integrity": "sha512-R/5sK4/BPgOYWAsheFaFpNFh0sLPHdqsBcqO5KW2+Foy36B2KBYrGd6Hu4HnzgivawVX+mSmVNhAwHA8Yb1hLA==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/primitive": "1.0.0", - "@radix-ui/react-context": "1.0.0", - "@radix-ui/react-direction": "1.0.0", - "@radix-ui/react-primitive": "1.0.0", - "@radix-ui/react-roving-focus": "1.0.0", - "@radix-ui/react-toggle": "1.0.0", - "@radix-ui/react-use-controllable-state": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0", - "react-dom": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-use-callback-ref": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.0.0.tgz", - "integrity": "sha512-GZtyzoHz95Rhs6S63D2t/eqvdFCm7I+yHMLVQheKM7nBD8mbZIt+ct1jz4536MDnaOGKIxynJ8eHTkVGVVkoTg==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-use-controllable-state": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.0.0.tgz", - "integrity": "sha512-FohDoZvk3mEXh9AWAVyRTYR4Sq7/gavuofglmiXB2g1aKyboUD4YtgWxKj8O5n+Uak52gXQ4wKz5IFST4vtJHg==", - "dependencies": { - "@babel/runtime": "^7.13.10", - "@radix-ui/react-use-callback-ref": "1.0.0" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, - "node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.0.0.tgz", - "integrity": "sha512-6Tpkq+R6LOlmQb1R5NNETLG0B4YP0wc+klfXafpUCj6JGyaUc8il7/kUZ7m59rGbXGczE9Bs+iz2qloqsZBduQ==", - "dependencies": { - "@babel/runtime": "^7.13.10" - }, - "peerDependencies": { - "react": "^16.8 || ^17.0 || ^18.0" - } - }, "node_modules/@remix-run/router": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", @@ -1383,9 +1177,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz", - "integrity": "sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", + "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", "cpu": [ "arm" ], @@ -1395,9 +1189,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz", - "integrity": "sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", + "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", "cpu": [ "arm64" ], @@ -1407,9 +1201,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz", - "integrity": "sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", + "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", "cpu": [ "arm64" ], @@ -1419,9 +1213,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz", - "integrity": "sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", + "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", "cpu": [ "x64" ], @@ -1431,9 +1225,21 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz", - "integrity": "sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", + "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", + "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", "cpu": [ "arm" ], @@ -1443,9 +1249,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz", - "integrity": "sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", + "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", "cpu": [ "arm64" ], @@ -1455,9 +1261,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz", - "integrity": "sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", + "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", "cpu": [ "arm64" ], @@ -1467,11 +1273,11 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.13.2.tgz", - "integrity": "sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", + "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", "cpu": [ - "ppc64le" + "ppc64" ], "optional": true, "os": [ @@ -1479,9 +1285,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz", - "integrity": "sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", + "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", "cpu": [ "riscv64" ], @@ -1491,9 +1297,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.2.tgz", - "integrity": "sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", + "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", "cpu": [ "s390x" ], @@ -1503,9 +1309,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz", - "integrity": "sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", + "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", "cpu": [ "x64" ], @@ -1515,9 +1321,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz", - "integrity": "sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", + "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", "cpu": [ "x64" ], @@ -1527,9 +1333,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz", - "integrity": "sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", + "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", "cpu": [ "arm64" ], @@ -1539,9 +1345,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz", - "integrity": "sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", + "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", "cpu": [ "ia32" ], @@ -1551,9 +1357,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz", - "integrity": "sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", + "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", "cpu": [ "x64" ], @@ -1843,9 +1649,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.7", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.7.tgz", - "integrity": "sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==", + "version": "8.56.9", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.9.tgz", + "integrity": "sha512-W4W3KcqzjJ0sHg2vAq9vfml6OhsJ53TcUjUqfzzZf/EChUtwspszj/S0pzMxnfRcO55/iGq47dscXw71Fxc4Zg==", "dev": true, "peer": true, "dependencies": { @@ -1888,9 +1694,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "peer": true, "dependencies": { @@ -1908,18 +1714,18 @@ "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" }, "node_modules/@types/react": { - "version": "18.2.73", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.73.tgz", - "integrity": "sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA==", + "version": "18.2.79", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz", + "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.2.23", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.23.tgz", - "integrity": "sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==", + "version": "18.2.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz", + "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==", "dev": true, "dependencies": { "@types/react": "*" @@ -2372,9 +2178,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001605", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", - "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", + "version": "1.0.30001610", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz", + "integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==", "dev": true, "funding": [ { @@ -2591,9 +2397,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.723", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz", - "integrity": "sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==", + "version": "1.4.738", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.738.tgz", + "integrity": "sha512-lwKft2CLFztD+vEIpesrOtCrko/TFnEJlHFdRhazU7Y/jx5qc4cqsocfVrBg4So4gGe9lvxnbLIoev47WMpg+A==", "dev": true }, "node_modules/enhanced-resolve": { @@ -3251,9 +3057,9 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.1.tgz", - "integrity": "sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.9.0.tgz", + "integrity": "sha512-Zs1YsZVfemekSZG+44vBsYTLQORkPMwnlv+aehcxK/NLKC+EGhDB39/YePYYqx/sTk6NnYpuqikhSn7+JIevTA==", "dev": true, "dependencies": { "schema-utils": "^4.0.0", @@ -3545,9 +3351,9 @@ } }, "node_modules/react-datepicker": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.6.0.tgz", - "integrity": "sha512-ERC0/Q4pPC9bNIcGUpdCbHc+oCxhkU3WI3UOGHkyJ3A9fqALCYpEmLc5S5xvAd7DuCDdbsyW97oRPM6pWWwjww==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.8.0.tgz", + "integrity": "sha512-/h3IXzAbwXVbhBhsXx57B94in0ECzYayijwHbAbB0QIyXaHTGnICNgldjiYIqQFimROP1h/SunoY1pHkLplJtw==", "dependencies": { "@floating-ui/react": "^0.26.2", "clsx": "^2.1.0", @@ -3561,9 +3367,9 @@ } }, "node_modules/react-datepicker/node_modules/@floating-ui/react": { - "version": "0.26.10", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.10.tgz", - "integrity": "sha512-sh6f9gVvWQdEzLObrWbJ97c0clJObiALsFe0LiR/kb3tDRKwEhObASEH2QyfdoO/ZBPzwxa9j+nYFo+sqgbioA==", + "version": "0.26.12", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.12.tgz", + "integrity": "sha512-D09o62HrWdIkstF2kGekIKAC0/N/Dl6wo3CQsnLcOmO3LkW6Ik8uIb3kw8JYkwxNCcg+uJ2bpWUiIijTBep05w==", "dependencies": { "@floating-ui/react-dom": "^2.0.0", "@floating-ui/utils": "^0.2.0", @@ -3580,9 +3386,9 @@ "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" }, "node_modules/react-day-picker": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.0.tgz", - "integrity": "sha512-mz+qeyrOM7++1NCb1ARXmkjMkzWVh2GL9YiPbRjKe0zHccvekk4HE+0MPOZOrosn8r8zTHIIeOUXTmXRqmkRmg==", + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-8.10.1.tgz", + "integrity": "sha512-TMx7fNbhLk15eqcMt+7Z7S2KF7mfTId/XJDjKE8f+IUcFn0l08/kI4FiYTL/0yuOLmEcbR4Fwe3GJf/NiiMnPA==", "funding": { "type": "individual", "url": "https://github.com/sponsors/gpbl" @@ -3743,9 +3549,9 @@ } }, "node_modules/rollup": { - "version": "4.13.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.2.tgz", - "integrity": "sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", + "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", "dependencies": { "@types/estree": "1.0.5" }, @@ -3757,21 +3563,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.13.2", - "@rollup/rollup-android-arm64": "4.13.2", - "@rollup/rollup-darwin-arm64": "4.13.2", - "@rollup/rollup-darwin-x64": "4.13.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.13.2", - "@rollup/rollup-linux-arm64-gnu": "4.13.2", - "@rollup/rollup-linux-arm64-musl": "4.13.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.13.2", - "@rollup/rollup-linux-riscv64-gnu": "4.13.2", - "@rollup/rollup-linux-s390x-gnu": "4.13.2", - "@rollup/rollup-linux-x64-gnu": "4.13.2", - "@rollup/rollup-linux-x64-musl": "4.13.2", - "@rollup/rollup-win32-arm64-msvc": "4.13.2", - "@rollup/rollup-win32-ia32-msvc": "4.13.2", - "@rollup/rollup-win32-x64-msvc": "4.13.2", + "@rollup/rollup-android-arm-eabi": "4.14.3", + "@rollup/rollup-android-arm64": "4.14.3", + "@rollup/rollup-darwin-arm64": "4.14.3", + "@rollup/rollup-darwin-x64": "4.14.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", + "@rollup/rollup-linux-arm-musleabihf": "4.14.3", + "@rollup/rollup-linux-arm64-gnu": "4.14.3", + "@rollup/rollup-linux-arm64-musl": "4.14.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", + "@rollup/rollup-linux-riscv64-gnu": "4.14.3", + "@rollup/rollup-linux-s390x-gnu": "4.14.3", + "@rollup/rollup-linux-x64-gnu": "4.14.3", + "@rollup/rollup-linux-x64-musl": "4.14.3", + "@rollup/rollup-win32-arm64-msvc": "4.14.3", + "@rollup/rollup-win32-ia32-msvc": "4.14.3", + "@rollup/rollup-win32-x64-msvc": "4.14.3", "fsevents": "~2.3.2" } }, @@ -4021,9 +3828,9 @@ } }, "node_modules/terser": { - "version": "5.30.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.1.tgz", - "integrity": "sha512-PJhOnRttZqqmIujxOQOMu4QuFGvh43lR7Youln3k6OJvmxwZ5FxK5rbCEh8XABRCpLf7ZnhrZuclCNCASsScnA==", + "version": "5.30.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", + "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", "dev": true, "peer": true, "dependencies": { @@ -4168,9 +3975,9 @@ "dev": true }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4256,9 +4063,9 @@ } }, "node_modules/vite": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.7.tgz", - "integrity": "sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz", + "integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==", "dev": true, "dependencies": { "esbuild": "^0.20.1", diff --git a/apps/endringsmelding-frontend/src/main/js/package.json b/apps/endringsmelding-frontend/src/main/js/package.json index 00e9a524bbf..cb837afe897 100644 --- a/apps/endringsmelding-frontend/src/main/js/package.json +++ b/apps/endringsmelding-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "endringsmelding-frontend", - "version": "1.2.16", + "version": "1.2.22", "private": true, "type": "module", "homepage": "/", diff --git a/apps/endringsmelding-frontend/src/main/js/src/App.tsx b/apps/endringsmelding-frontend/src/main/js/src/App.tsx index c793e3ac073..7683af69fa9 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/App.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/App.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { Header, ProfilLoader } from '@navikt/dolly-komponenter'; -import { EndringsmeldingPage } from '@/pages'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; -import LoginPage from '@/pages/login-page/LoginPage'; import ProfilService from './service/ProfilService'; import '@navikt/ds-css'; +import { EndringsmeldingPage } from '@/pages/endringsmelding-page/EndringsmeldingPage'; +import { LoginPage } from '@/pages/login-page/LoginPage'; const App = () => ( diff --git a/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx b/apps/endringsmelding-frontend/src/main/js/src/components/search/SearchDiv.tsx similarity index 84% rename from apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx rename to apps/endringsmelding-frontend/src/main/js/src/components/search/SearchDiv.tsx index 8250405d593..22b306ab1fb 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/components/search/Search.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/components/search/SearchDiv.tsx @@ -10,9 +10,8 @@ import { WarningAlertstripe, } from '@navikt/dolly-komponenter'; import _ from 'lodash'; -import { Action } from '@/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingReducer'; -const Search = styled.div` +const SearchDiv = styled.div` display: flex; flex-direction: row; `; @@ -26,11 +25,12 @@ const StyledKnapp = styled(Knapp)` `; type Props = { - dispatch: any; setMiljoer: any; + setShow: any; labels: { label: string; button: string; + delete: string; onFound: string; onNotFound: string; onError: string; @@ -57,9 +57,9 @@ const StyledWarning = styled(WarningAlertstripe)` width: -webkit-fill-available; `; -export default ({ labels, onChange, dispatch, setMiljoer }: Props) => { +export const Search = ({ labels, onChange, setShow, setMiljoer }: Props) => { const [value, setValue] = useState(''); - const [search, setSearch] = useState(null); + const [query, setQuery] = useState(null); const [response, setResponse] = useState(null); const [loading, setLoading] = useState(null); const [error, setError] = useState(null); @@ -86,11 +86,14 @@ export default ({ labels, onChange, dispatch, setMiljoer }: P }) .then(async (res) => { setLoading(false); + setError(false); const jsonResponse = await res.json(); setResponse(jsonResponse?.[0]); + setShow(true); }) .catch((reason) => { console.error(reason); + setShow(false); setLoading(false); setError(true); if (reason?.response?.status === 401 || reason?.response?.status === 403) { @@ -106,26 +109,26 @@ export default ({ labels, onChange, dispatch, setMiljoer }: P }; useEffect(() => { - if (search && search.length === 11) { - hentMiljoeInfo(search); + if (query && query.length === 11) { + hentMiljoeInfo(query); } else { setError('Ident må være 11 siffer.'); } - }, [search]); + }, [query]); useEffect(() => { setMiljoer(response?.miljoer); - error - ? dispatch({ type: Action.SET_HENT_MILJOER_ERROR_ACTION }) - : dispatch({ type: Action.SET_HENT_MILJOER_SUCCESS_ACTION }); - }, [response, error]); + }, [response]); return ( - + { + setShow(false); + setResponse(null); + setMiljoer([]); if (onChange) { onChange(e.target.value); } @@ -135,7 +138,7 @@ export default ({ labels, onChange, dispatch, setMiljoer }: P { event.preventDefault(); - setSearch(value); + setQuery(value); }} disabled={loading || isSyntheticIdent(value)} loading={loading} @@ -144,6 +147,6 @@ export default ({ labels, onChange, dispatch, setMiljoer }: P {isSyntheticIdent(value) && } {renderAlert()} - + ); }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/components/search/index.ts b/apps/endringsmelding-frontend/src/main/js/src/components/search/index.ts deleted file mode 100644 index d95d8a04d26..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/components/search/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Search from './Search'; - -export { Search }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/EndringsmeldingPage.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/EndringsmeldingPage.tsx index 5ebb8552068..27b7c04073d 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/EndringsmeldingPage.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/EndringsmeldingPage.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Page } from '@navikt/dolly-komponenter'; -import { DodsmeldingForm, FodselsmeldingForm } from './form'; import { Tabs } from '@navikt/ds-react'; import styled from 'styled-components'; +import { FodselsmeldingForm } from '@/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm'; +import { DodsmeldingForm } from '@/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm'; const StyledPanel = styled(Tabs.Panel)` background-color: hsl(0deg 0% 100%); @@ -10,7 +11,7 @@ const StyledPanel = styled(Tabs.Panel)` border-radius: 4px; `; -export default () => { +export const EndringsmeldingPage = () => { return ( diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx index 23cc720de40..059dc7ebe20 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm.tsx @@ -1,121 +1,111 @@ -import React, { useReducer } from 'react'; +import React, { useState } from 'react'; import { DatePickerFormItem, Line, SelectFormItem } from '@navikt/dolly-komponenter'; -import reducer, { Action, State } from './DodsmeldingReducer'; -import { sendDodsmelding } from '@/service/EndringsmeldingService'; -import { EndringsmeldingForm } from '../endringsmelding-form'; +import { sendDodsmelding, slettDodsmelding } from '@/service/EndringsmeldingService'; import { format } from 'date-fns'; +import { Alert } from '@navikt/ds-react'; +import { EndringsmeldingForm } from '@/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm'; -export const initState: State = { - miljoOptions: [], - handling: 'SETTE_DOEDSDATO', - ident: '', - doedsdato: format(new Date(), 'y-MM-dd'), - miljoer: [], - validate: false, -}; +export type Handling = 'SETTE_DOEDSDATO' | 'ENDRET_DOEDSDATO' | 'ANNULLERE_DOEDSDATO'; const notEmptyString = (value: string) => !!value && value !== ''; const notEmptyList = (value: unknown[]) => !!value && value.length > 0; -export default () => { - const [state, dispatch] = useReducer(reducer, initState); +export const DodsmeldingForm = () => { + const [miljoOptions, setMiljoOptions] = useState([]); + const [ident, setIdent] = useState(''); + const [doedsdato, setDoedsdato] = useState(format(new Date(), 'y-MM-dd')); + const [valgteMiljoer, setValgteMiljoer] = useState([]); + const [validate, setValidate] = useState(false); + const [error, setError] = useState(''); - const onValidate = () => { - dispatch({ type: Action.SET_VALIDATE_ACTION, value: true }); + const onValidate = (handling: Handling) => { + setValidate(true); return ( - (state.handling === 'ANNULLERE_DOEDSDATO' || notEmptyString(state.doedsdato)) && - notEmptyList(state.miljoer) + (handling === 'ANNULLERE_DOEDSDATO' || notEmptyString(doedsdato)) && + notEmptyList(valgteMiljoer) ); }; - const onSend = () => - sendDodsmelding( + const onSend = (handling: Handling): Promise => { + if (handling === 'ANNULLERE_DOEDSDATO') { + return slettDodsmelding(ident.trim(), valgteMiljoer).then((response) => { + setError(response?.error); + return Promise.resolve(response); + }); + } + return sendDodsmelding( { - doedsdato: state.doedsdato, - ident: state.ident.trim(), - handling: state.handling, + doedsdato: doedsdato, + ident: ident.trim(), + handling: handling, }, - state.miljoer, - ); + valgteMiljoer, + ).then((response) => { + setError(response?.error); + return Promise.resolve(response); + }); + }; - const getSuccessMessage = () => { - const miljoer = state.miljoer; - if (state.handling === 'SETTE_DOEDSDATO') { - return `Dødsmelding for ident ${state.ident} ble sendt til miljø ${miljoer}.`; + const getSuccessMessage = (value: string, handling?: Handling) => { + if (handling === 'ANNULLERE_DOEDSDATO') { + return `Dødsmelding annulert for ident ${value} i miljø ${valgteMiljoer}.`; } - if (state.handling === 'ENDRET_DOEDSDATO') { - return `Dødsdato endret til ${state.doedsdato} for ident ${state.ident} i miljø ${miljoer}.`; - } - return `Dødsmelding annulert for ident ${state.ident} i miljø ${miljoer}.`; + return `Dødsmelding for ident ${value} ble sendt til miljø ${valgteMiljoer}.`; }; return ( dispatch({ type: Action.SET_IDENT_ACTION, value: ident })} + setIdent={(ident) => { + setError(null); + setMiljoOptions([]); + setValgteMiljoer([]); + setIdent(ident); + }} getSuccessMessage={getSuccessMessage} setMiljoer={(miljoer) => { - dispatch({ type: Action.SET_MILJOER_OPTIONS_ACTION, value: miljoer }); + setMiljoOptions(miljoer); if (miljoer?.length > 0) { - dispatch({ type: Action.SET_MILJOER_ACTION, value: [miljoer[0]] }); + setValgteMiljoer([miljoer[0]]); } }} > - - // @ts-ignore - dispatch({ - type: Action.SET_HANDLING_ACTION, - value: value && value.length > 0 ? value[0] : 'SETTE_DOEDSDATO', - }) - } - options={[ - { - value: 'SETTE_DOEDSDATO', - label: 'Sette dødsdato', - }, - { - value: 'ENDRET_DOEDSDATO', - label: 'Endret dødsdato', - }, - { - value: 'ANNULLERE_DOEDSDATO', - label: 'Annullert dødsdato', - }, - ]} + setDoedsdato(value)} + error={validate && !notEmptyString(doedsdato) ? 'Påkrevd' : null} /> - {state.handling !== 'ANNULLERE_DOEDSDATO' && ( - dispatch({ type: Action.SET_DOEDSDATO_ACTION, value: value })} - error={state.validate && !notEmptyString(state.doedsdato) ? 'Påkrevd' : null} - /> - )} dispatch({ type: Action.SET_MILJOER_ACTION, value: value })} + onChange={(value: string[]) => setValgteMiljoer(value)} htmlId="miljo-dodsdato-select" multi={true} label="Send til miljo*" - error={state.validate && !notEmptyList(state.miljoer) ? 'Påkrevd' : null} + error={validate && !notEmptyList(valgteMiljoer) ? 'Påkrevd' : null} options={ - !state.miljoOptions || state.miljoOptions?.length === 0 + !miljoOptions || miljoOptions?.length === 0 ? [] - : state.miljoOptions?.map((value: string) => ({ + : miljoOptions?.map((value: string) => ({ value: value, label: value.toUpperCase(), })) } /> + {notEmptyString(error) && ( + + setError('')}> + {error} + + + )} ); }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingReducer.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingReducer.ts deleted file mode 100644 index 9329fbcc4a2..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingReducer.ts +++ /dev/null @@ -1,74 +0,0 @@ -type SetMiljoerOptionsAction = 'SET_MILJOER_OPTIONS'; -type SetIdentAction = 'SET_IDENT'; -type SetMiljoerAction = 'SET_MILJOER'; -type SetHandlingAction = 'SET_HANDLING'; -type SetDoedsdatoAction = 'SET_DOEDSDATO'; -type SetValidateAction = 'SET_VALIDATE'; - -type Handling = 'SETTE_DOEDSDATO' | 'ENDRET_DOEDSDATO' | 'ANNULLERE_DOEDSDATO'; - -type Actions = - | { - type: SetIdentAction; - value: string; - } - | { - type: SetMiljoerAction; - value: string[]; - } - | { - type: SetHandlingAction; - value: Handling; - } - | { - type: SetDoedsdatoAction; - value: string; - } - | { - type: SetMiljoerOptionsAction; - value: string[]; - } - | { - type: SetValidateAction; - value: boolean; - }; - -export type State = { - miljoOptions: string[]; - handling: Handling; - ident: string; - doedsdato: string; - miljoer: string[]; - validate: boolean; -}; - -export class Action { - public static SET_MILJOER_OPTIONS_ACTION: SetMiljoerOptionsAction = 'SET_MILJOER_OPTIONS'; - public static SET_IDENT_ACTION: SetIdentAction = 'SET_IDENT'; - public static SET_HANDLING_ACTION: SetHandlingAction = 'SET_HANDLING'; - public static SET_DOEDSDATO_ACTION: SetDoedsdatoAction = 'SET_DOEDSDATO'; - public static SET_MILJOER_ACTION: SetMiljoerAction = 'SET_MILJOER'; - public static SET_VALIDATE_ACTION: SetValidateAction = 'SET_VALIDATE'; -} - -export default (state: State, action: Actions) => { - switch (action.type) { - case Action.SET_IDENT_ACTION: - return { ...state, ident: action.value.trim() }; - case Action.SET_HANDLING_ACTION: - if (action.value === 'ANNULLERE_DOEDSDATO') { - return { ...state, doedsdato: null, handling: action.value }; - } - return { ...state, handling: action.value }; - case Action.SET_DOEDSDATO_ACTION: - return { ...state, doedsdato: action.value }; - case Action.SET_MILJOER_ACTION: - return { ...state, miljoer: action.value }; - case Action.SET_VALIDATE_ACTION: - return { ...state, validate: action.value }; - case Action.SET_MILJOER_OPTIONS_ACTION: - return { ...state, miljoOptions: action.value }; - default: - return state; - } -}; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/index.ts deleted file mode 100644 index 99a3f655d4d..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/dodsmelding-form/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import DodsmeldingForm from './DodsmeldingForm'; -export { DodsmeldingForm }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm.tsx index 183eac61cb9..079bc768cec 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm.tsx @@ -1,5 +1,4 @@ -import React, { useReducer } from 'react'; -import { Search } from '@/components/search'; +import React, { useState } from 'react'; import { ErrorAlertstripe, @@ -9,30 +8,26 @@ import { SuccessAlertstripe, WarningAlertstripe, } from '@navikt/dolly-komponenter'; -import { Action, reducer, State } from './EndringsmeldingReducer'; import { BadRequestError } from '@navikt/dolly-lib/lib/error'; +import { Handling } from '@/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm'; +import { Search } from '@/components/search/SearchDiv'; type Props = { children: React.ReactNode; labels: { search: string; submit: string; + delete?: string; }; - getSuccessMessage: (value?: T) => string; + getSuccessMessage: (value?: string, handling?: Handling) => string; getErrorMessage?: () => string; - onSend: () => Promise; - valid: () => boolean; + onSend: (handling: Handling) => Promise; + valid: (handling: Handling) => boolean; setIdent: (value: string) => void; setMiljoer: (value: string[]) => void; }; -export const initState: State = { - ident: '', - loading: false, - show: true, -}; - -export default ({ +export const EndringsmeldingForm = ({ children, onSend, valid, @@ -42,33 +37,34 @@ export default ({ getSuccessMessage, getErrorMessage = () => 'Noe gikk galt.', }: Props) => { - const [state, dispatch] = useReducer(reducer, initState); + const [loading, setLoading] = useState(null); + const [show, setShow] = useState(false); + const [successMessage, setSuccessMessage] = useState(''); + const [errorMessage, setErrorMessage] = useState(''); + const [warningMessages, setWarningMessages] = useState([]); - if (state.warningMessages) { - console.log(state.warningMessages); + if (warningMessages && warningMessages.length > 0) { + console.log(warningMessages); } - const onSubmit = (event: React.MouseEvent) => { + const onSubmit = (event: React.MouseEvent, handling: Handling) => { event.preventDefault(); - if (valid()) { - dispatch({ type: Action.SET_SUBMIT_START }); - onSend() - .then((response) => - dispatch({ - type: Action.SET_SUBMIT_SUCCESS, - successMessage: getSuccessMessage(response), - }), - ) + if (valid(handling)) { + setLoading(handling || 'SETTE_DOEDSDATO'); + onSend(handling) + .then((response) => { + setLoading(null); + if (!response?.error) { + setSuccessMessage(getSuccessMessage(response?.ident, handling)); + } + }) .catch((e) => { + setLoading(null); if (e instanceof BadRequestError) { - return e.response - .json() - .then((body: string[]) => - dispatch({ type: Action.SET_SUBMIT_WARNING, warningMessages: body }), - ); + return e.response.json().then((body: string[]) => setWarningMessages(body)); } - return dispatch({ type: Action.SET_SUBMIT_ERROR, errorMessage: getErrorMessage() }); + setErrorMessage(getErrorMessage()); }); } }; @@ -76,13 +72,16 @@ export default ({ { + setSuccessMessage(''); + setErrorMessage(''); + setWarningMessages([]); setIdent(value); - dispatch({ type: Action.SET_IDENT_ACTION, value: value }); }} + setShow={setShow} setMiljoer={setMiljoer} - dispatch={dispatch} labels={{ label: labels.search, + delete: 'Slett dødsmelding', button: 'Søk etter person', onFound: 'Person funnet', onNotFound: 'Person ikke funnet', @@ -90,27 +89,39 @@ export default ({ syntIdent: 'Endringsmelding støtter ikke synt-identer.', }} /> - {state.show && ( + {show && ( <> {children} ) => + onSubmit(event, null) + } + disabled={loading} + loading={loading === 'SETTE_DOEDSDATO'} > {labels.submit} + {labels.delete && ( + ) => + onSubmit(event, 'ANNULLERE_DOEDSDATO') + } + disabled={loading} + loading={loading === 'ANNULLERE_DOEDSDATO'} + > + {labels.delete} + + )} > )} - {!!state.successMessage && } - {!!state.errorMessage && } - {!!state.warningMessages && - state.warningMessages.map((warning, index) => ( - - ))} + {!!successMessage && } + {!!errorMessage && } + {!!warningMessages && + warningMessages.map((warning, index) => )} ); }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingReducer.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingReducer.ts deleted file mode 100644 index a00f4b7d6ec..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingReducer.ts +++ /dev/null @@ -1,109 +0,0 @@ -type SetHentMiljoerSuccessAction = 'SET_HENT_MILJOER_SUCCESS'; -type SetHentMiljoerErrorAction = 'SET_HENT_MILJOER_ERROR'; -type SubmitStartAction = 'SET_SUBMIT_START'; -type SubmitSuccessAction = 'SET_SUBMIT_SUCCESS'; -type SubmitErrorAction = 'SET_SUBMIT_ERROR'; -type SubmitWarringAction = 'SET_SUBMIT_WARRING'; -type SetIdentAction = 'SET_IDENT'; - -type Actions = - | { - type: SetHentMiljoerSuccessAction; - } - | { - type: SetHentMiljoerErrorAction; - } - | { - type: SubmitStartAction; - } - | { - type: SubmitSuccessAction; - successMessage: string; - } - | { - type: SubmitErrorAction; - errorMessage: string; - } - | { - type: SubmitWarringAction; - warningMessages: string[]; - } - | { - type: SetIdentAction; - value: string; - }; - -export type State = { - ident: string; - show: boolean; - loading: boolean; - errorMessage?: string; - warningMessages?: string[]; - successMessage?: string; -}; - -export class Action { - public static SET_HENT_MILJOER_SUCCESS_ACTION: SetHentMiljoerSuccessAction = - 'SET_HENT_MILJOER_SUCCESS'; - public static SET_HENT_MILJOER_ERROR_ACTION: SetHentMiljoerErrorAction = 'SET_HENT_MILJOER_ERROR'; - public static SET_IDENT_ACTION: SetIdentAction = 'SET_IDENT'; - public static SET_SUBMIT_START: SubmitStartAction = 'SET_SUBMIT_START'; - public static SET_SUBMIT_SUCCESS: SubmitSuccessAction = 'SET_SUBMIT_SUCCESS'; - public static SET_SUBMIT_ERROR: SubmitErrorAction = 'SET_SUBMIT_ERROR'; - public static SET_SUBMIT_WARNING: SubmitWarringAction = 'SET_SUBMIT_WARRING'; -} - -export const reducer = (state: State, action: Actions) => { - switch (action.type) { - case Action.SET_IDENT_ACTION: - return { - ...state, - ident: action.value, - }; - case Action.SET_HENT_MILJOER_SUCCESS_ACTION: - return { - ...state, - show: true, - errorMessage: null, - successMessage: null, - }; - case Action.SET_HENT_MILJOER_ERROR_ACTION: - return { - ...state, - show: false, - errorMessage: null, - successMessage: null, - }; - case Action.SET_SUBMIT_START: - return { - ...state, - loading: true, - successMessage: null, - warningMessages: null, - errorMessage: null, - }; - case Action.SET_SUBMIT_ERROR: - return { - ...state, - loading: false, - show: false, - errorMessage: action.errorMessage, - }; - case Action.SET_SUBMIT_WARNING: - return { - ...state, - loading: false, - show: true, - warningMessages: action.warningMessages, - }; - case Action.SET_SUBMIT_SUCCESS: - return { - ...state, - loading: false, - show: false, - successMessage: action.successMessage, - }; - default: - return state; - } -}; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/index.ts deleted file mode 100644 index 7798eec51d8..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/endringsmelding-form/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import EndringsmeldingForm from './EndringsmeldingForm'; -export { EndringsmeldingForm }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx index fb602d8ffc2..29969c15110 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingForm.tsx @@ -1,52 +1,50 @@ -import React, { useReducer } from 'react'; +import React, { useState } from 'react'; import { DatePickerFormItem, InputFormItem, Line, SelectFormItem } from '@navikt/dolly-komponenter'; -import reducer, { Action, State } from './FodselsmeldingReducer'; import { sendFodselsmelding } from '@/service/EndringsmeldingService'; -import { EndringsmeldingForm } from '../endringsmelding-form'; import { format } from 'date-fns'; - -export const initState: State = { - miljoOptions: [], - kjoenType: 'GUTT', - identType: 'FNR', - farsIdent: '', - morsIdent: '', - foedselsdato: format(new Date(), 'y-MM-dd'), - address: 'LAG_NY_ADRESSE', - miljoer: [], - validate: false, -}; +import { Alert } from '@navikt/ds-react'; +import { EndringsmeldingForm } from '@/pages/endringsmelding-page/form/endringsmelding-form/EndringsmeldingForm'; +import { Handling } from '@/pages/endringsmelding-page/form/dodsmelding-form/DodsmeldingForm'; const notEmptyString = (value: string) => !!value && value !== ''; const notEmptyList = (value: unknown[]) => !!value && value.length > 0; -export default () => { - const [state, dispatch] = useReducer(reducer, initState); +export const FodselsmeldingForm = () => { + const [miljoOptions, setMiljoOptions] = useState([]); + const [kjoennType, setKjoennType] = useState('GUTT'); + const [identType, setIdentType] = useState('FNR'); + const [farsIdent, setFarsIdent] = useState(''); + const [morsIdent, setMorsIdent] = useState(''); + const [foedselsdato, setFoedselsdato] = useState(format(new Date(), 'y-MM-dd')); + const [address, setAddress] = useState('LAG_NY_ADRESSE'); + const [miljoer, setMiljoer] = useState([]); + const [validate, setValidate] = useState(false); + const [error, setError] = useState(''); const onValidate = () => { - dispatch({ type: Action.SET_VALIDATE_ACTION, value: true }); - return notEmptyString(state.foedselsdato) && notEmptyList(state.miljoer); + setValidate(true); + return notEmptyString(foedselsdato) && notEmptyList(miljoer); }; - const onSend = () => + const onSend = (handling: Handling) => sendFodselsmelding( { - adresseFra: state.address, - identFar: state.farsIdent !== '' ? state.farsIdent.trim() : null, - identMor: state.morsIdent.trim(), - identtype: state.identType, - foedselsdato: state.foedselsdato, - kjoenn: state.kjoenType, + adresseFra: address, + identFar: farsIdent !== '' ? farsIdent.trim() : null, + identMor: morsIdent.trim(), + identtype: identType, + foedselsdato: foedselsdato, + kjoenn: kjoennType, }, - state.miljoer, - ).then((ident) => { - dispatch({ type: Action.SET_BARNS_IDENT, value: ident.trim() }); - return Promise.resolve(ident); + miljoer, + ).then((response) => { + setError(response?.error); + return Promise.resolve(response); }); - const getSuccessMessage = (value: string | null) => - `Gratulerer, person med ident ${value} ble født i miljø ${state.miljoer.join(', ')}.`; + const getSuccessMessage = (value: string | null, handling?: Handling) => + `Gratulerer, person med ident ${value} ble født i miljø ${miljoer.join(', ')}.`; return ( { }} onSend={onSend} valid={onValidate} - setIdent={(ident) => dispatch({ type: Action.SET_MORS_IDENT_ACTION, value: ident.trim() })} + setIdent={(ident) => { + setError(''); + setMiljoer([]); + setMiljoOptions([]); + setMorsIdent(ident?.trim()); + }} getSuccessMessage={getSuccessMessage} setMiljoer={(miljoer) => { - dispatch({ type: Action.SET_MILJOER_OPTIONS_ACTION, value: miljoer }); + setMiljoOptions(miljoer); if (miljoer?.length > 0) { - dispatch({ type: Action.SET_MILJOER_ACTION, value: [miljoer[0]] }); + setMiljoer([miljoer[0]]); } }} > @@ -70,17 +73,15 @@ export default () => { dispatch({ type: Action.SET_FARS_IDENT_ACTION, value: e.target.value })} + onBlur={(e) => { + setError(null); + setFarsIdent(e.target.value); + }} /> - dispatch({ - type: Action.SET_IDENT_TYPE_ACTION, - value: value && value.length > 0 ? value[0] : '', - }) - } + onChange={(value) => setIdentType(value && value.length > 0 ? value[0] : '')} options={[ { value: 'FNR', @@ -101,13 +102,7 @@ export default () => { - // @ts-ignore - dispatch({ - type: Action.SET_KJOEN_TYPE_ACTION, - value: value && value.length > 0 ? value[0] : 'GUTT', - }) - } + onChange={(value) => setKjoennType(value && value.length > 0 ? value[0] : 'GUTT')} options={[ { value: 'GUTT', @@ -124,14 +119,16 @@ export default () => { ]} /> dispatch({ type: Action.SET_MILJOER_ACTION, value: value })} + onChange={(value) => { + setMiljoer([value]); + }} htmlId="miljo-select" label="Send til miljo*" - error={state.validate && !notEmptyList(state.miljoer) ? 'Påkrevd' : null} + error={validate && !notEmptyList(miljoer) ? 'Påkrevd' : null} options={ - !state.miljoOptions || state.miljoOptions?.length === 0 + !miljoOptions || miljoOptions?.length === 0 ? [] - : state.miljoOptions?.map((value: string) => ({ + : miljoOptions?.map((value: string) => ({ value: value, label: value.toUpperCase(), })) @@ -140,13 +137,7 @@ export default () => { - // @ts-ignore - dispatch({ - type: Action.SET_ADRESSE_ACTION, - value: value && value.length > 0 ? value[0] : '', - }) - } + onChange={(value) => setAddress(value && value.length > 0 ? value[0] : '')} options={[ { value: 'LAG_NY_ADRESSE', @@ -167,10 +158,17 @@ export default () => { dispatch({ type: Action.SET_FOEDSELSDATO_ACTION, value: value })} + onBlur={(value) => setFoedselsdato(value)} required={true} /> + {notEmptyString(error) && ( + + setError('')}> + {error} + + + )} ); }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingReducer.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingReducer.ts deleted file mode 100644 index 987c5feec27..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/FodselsmeldingReducer.ts +++ /dev/null @@ -1,105 +0,0 @@ -type SetMiljoerOptionsAction = 'SET_MILJOER_OPTIONS'; -type SetFarsIdentAction = 'SET_FARS_IDENT'; -type SetMiljoerAction = 'SET_MILJOER'; -type SetIdentTypeAction = 'SET_IDENT_TYPE'; -type SetKjoenTypeAction = 'SET_KJOEN_TYPE'; -type SetAdresseAction = 'SET_ADRESSE'; -type SetMorsIdentAction = 'SET_MORS_IDENT'; -type SetFoedselsdatoAction = 'SET_FOEDSELSDATO'; -type SetValidateAction = 'SET_VALIDATE'; -type SetBarnsIdentAction = 'SET_BARNS_IDENT'; - -type Actions = - | { - type: SetFarsIdentAction; - value: string; - } - | { - type: SetMiljoerAction; - value: string[]; - } - | { - type: SetIdentTypeAction; - value: string; - } - | { - type: SetKjoenTypeAction; - value: 'GUTT' | 'JENTE' | 'UKJENT'; - } - | { - type: SetAdresseAction; - value: 'LAG_NY_ADRESSE' | 'ARV_FRA_MORS' | 'ARV_FRA_FARS'; - } - | { - type: SetMorsIdentAction; - value: string; - } - | { - type: SetFoedselsdatoAction; - value: string; - } - | { - type: SetBarnsIdentAction; - value: string; - } - | { - type: SetMiljoerOptionsAction; - value: string[]; - } - | { - type: SetValidateAction; - value: boolean; - }; - -export type State = { - miljoOptions: string[]; - kjoenType: 'GUTT' | 'JENTE' | 'UKJENT'; - identType: string; - farsIdent: string; - morsIdent: string; - foedselsdato: string; - address: 'LAG_NY_ADRESSE' | 'ARV_FRA_MORS' | 'ARV_FRA_FARS'; - miljoer: string[]; - validate: boolean; - barnsIdent?: string; -}; - -export class Action { - public static SET_MILJOER_OPTIONS_ACTION: SetMiljoerOptionsAction = 'SET_MILJOER_OPTIONS'; - public static SET_MORS_IDENT_ACTION: SetMorsIdentAction = 'SET_MORS_IDENT'; - public static SET_FARS_IDENT_ACTION: SetFarsIdentAction = 'SET_FARS_IDENT'; - public static SET_FOEDSELSDATO_ACTION: SetFoedselsdatoAction = 'SET_FOEDSELSDATO'; - public static SET_IDENT_TYPE_ACTION: SetIdentTypeAction = 'SET_IDENT_TYPE'; - public static SET_KJOEN_TYPE_ACTION: SetKjoenTypeAction = 'SET_KJOEN_TYPE'; - public static SET_ADRESSE_ACTION: SetAdresseAction = 'SET_ADRESSE'; - public static SET_MILJOER_ACTION: SetMiljoerAction = 'SET_MILJOER'; - public static SET_VALIDATE_ACTION: SetValidateAction = 'SET_VALIDATE'; - public static SET_BARNS_IDENT: SetBarnsIdentAction = 'SET_BARNS_IDENT'; -} - -export default (state: State, action: Actions) => { - switch (action.type) { - case Action.SET_MORS_IDENT_ACTION: - return { ...state, morsIdent: action.value }; - case Action.SET_FARS_IDENT_ACTION: - return { ...state, farsIdent: action.value }; - case Action.SET_FOEDSELSDATO_ACTION: - return { ...state, foedselsdato: action.value }; - case Action.SET_IDENT_TYPE_ACTION: - return { ...state, identType: action.value }; - case Action.SET_KJOEN_TYPE_ACTION: - return { ...state, kjoenType: action.value }; - case Action.SET_ADRESSE_ACTION: - return { ...state, addressFra: action.value }; - case Action.SET_MILJOER_ACTION: - return { ...state, miljoer: action.value }; - case Action.SET_VALIDATE_ACTION: - return { ...state, validate: action.value }; - case Action.SET_MILJOER_OPTIONS_ACTION: - return { ...state, miljoOptions: action.value }; - case Action.SET_BARNS_IDENT: - return { ...state, barnsIdent: action.value }; - default: - return state; - } -}; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/index.ts deleted file mode 100644 index 779622975e7..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/fodselsmelding-from/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import FodselsmeldingForm from './FodselsmeldingForm'; -export { FodselsmeldingForm }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/index.ts deleted file mode 100644 index e04ffda78b3..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/form/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { FodselsmeldingForm } from './fodselsmelding-from'; -import { DodsmeldingForm } from './dodsmelding-form'; - -export { FodselsmeldingForm, DodsmeldingForm }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/index.ts deleted file mode 100644 index 18bfa76029e..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/endringsmelding-page/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import EndringsmeldingPage from './EndringsmeldingPage'; - -export default EndringsmeldingPage; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/index.ts deleted file mode 100644 index 92d59d53cc6..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import EndringsmeldingPage from './endringsmelding-page'; - -export { EndringsmeldingPage }; diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/LoginPage.tsx b/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/LoginPage.tsx index 2cd3d162fc8..a4e99fa6005 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/LoginPage.tsx +++ b/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/LoginPage.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { WarningFilled } from '@navikt/ds-icons'; import styled from 'styled-components'; -const LoginPage = styled.div` +const StyledLoginPage = styled.div` margin-top: 150px; padding: 100px 20px; margin-right: 15%; @@ -15,8 +15,8 @@ const LoginPage = styled.div` text-align: center; `; -export default () => ( - +export const LoginPage = () => ( + Du har ikke tilgang til denne siden @@ -27,5 +27,5 @@ export default () => ( Ta kontakt med team #dolly på Slack dersom du ønsker tilgang. - + ); diff --git a/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/index.ts b/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/index.ts deleted file mode 100644 index 6c9595dbfcf..00000000000 --- a/apps/endringsmelding-frontend/src/main/js/src/pages/login-page/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import LoginPage from './LoginPage'; - -export default LoginPage; diff --git a/apps/endringsmelding-frontend/src/main/js/src/service/EndringsmeldingService.ts b/apps/endringsmelding-frontend/src/main/js/src/service/EndringsmeldingService.ts index a209743d0bb..4380d2a3720 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/service/EndringsmeldingService.ts +++ b/apps/endringsmelding-frontend/src/main/js/src/service/EndringsmeldingService.ts @@ -6,6 +6,12 @@ type Dodsmelding = { doedsdato: string; }; +type EndringsmeldingResponse = { + ident: string; + miljoStatus?: Map; + error?: string; +}; + type Fodselsmelding = { identFar?: string; identMor: string; @@ -15,19 +21,35 @@ type Fodselsmelding = { foedselsdato: string; }; -export const sendDodsmelding = (dodsmelding: Dodsmelding, miljoer: string[]) => +export const slettDodsmelding = ( + ident: string, + miljoer: string[], +): Promise => + Api.fetch( + '/endringsmelding-service/api/v2/endringsmelding/doedsmelding', + { + method: 'DELETE', + headers: { miljoer: miljoer.join(','), 'Content-Type': 'application/json' }, + }, + JSON.stringify({ ident: ident }), + ).then((response) => response.json()) as Promise; + +export const sendDodsmelding = ( + dodsmelding: Dodsmelding, + miljoer: string[], +): Promise => Api.fetch( - '/endringsmelding-service/api/v1/endringsmelding/doedsmelding', + '/endringsmelding-service/api/v2/endringsmelding/doedsmelding', { method: 'POST', headers: { miljoer: miljoer.join(','), 'Content-Type': 'application/json' } }, - JSON.stringify(dodsmelding) - ); + JSON.stringify(dodsmelding), + ).then((response) => response.json()) as Promise; export const sendFodselsmelding = ( fodselsmelding: Fodselsmelding, - miljoer: string[] -): Promise => + miljoer: string[], +): Promise => Api.fetch( - '/endringsmelding-service/api/v1/endringsmelding/foedeselsmelding', + '/endringsmelding-service/api/v2/endringsmelding/foedselsmelding', { method: 'POST', headers: { miljoer: miljoer.join(','), 'Content-Type': 'application/json' } }, - JSON.stringify(fodselsmelding) - ).then((response) => response.text() as Promise); + JSON.stringify(fodselsmelding), + ).then((response) => response.json()) as Promise; diff --git a/apps/endringsmelding-frontend/src/main/js/src/service/index.ts b/apps/endringsmelding-frontend/src/main/js/src/service/index.ts index 6d181f720f2..a362d061765 100644 --- a/apps/endringsmelding-frontend/src/main/js/src/service/index.ts +++ b/apps/endringsmelding-frontend/src/main/js/src/service/index.ts @@ -1,7 +1,5 @@ -import EndringsmeldingService from './EndringsmeldingService'; import ProfilService from './ProfilService'; export default { - EndringsmeldingService, ProfilService, }; diff --git a/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml b/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml index 9ebcb909c3d..4f764105cec 100644 --- a/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml +++ b/apps/endringsmelding-frontend/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/OpenApiConfig.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/OpenApiConfig.java index 8b964a5eaa1..a02c3d5a279 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/OpenApiConfig.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/OpenApiConfig.java @@ -13,10 +13,14 @@ import java.util.Arrays; import no.nav.testnav.libs.reactivecore.config.ApplicationProperties; +import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.server.WebFilter; +import org.springframework.web.server.WebFilterChain; +import reactor.core.publisher.Mono; @Configuration -public class OpenApiConfig { +public class OpenApiConfig implements WebFilter { @Bean public OpenAPI openApi(ApplicationProperties applicationProperties) { @@ -46,4 +50,17 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) { ) ); } + + @Override + public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { + if (exchange.getRequest().getURI().getPath().equals("/swagger")) { + return chain + .filter(exchange.mutate() + .request(exchange.getRequest() + .mutate().path("/swagger-ui.html").build()) + .build()); + } + + return chain.filter(exchange); + } } \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java index 9888efcefc9..21ddec3baf5 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsMessagingConsumer.java @@ -6,10 +6,11 @@ import no.nav.testnav.endringsmeldingservice.consumer.command.GetAdressehistorikkCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.GetEksistererPersonCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.GetIdentEnvironmentsCommand; -import no.nav.testnav.endringsmeldingservice.consumer.command.GetPersondataCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.HentPersondataCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingCommand; import no.nav.testnav.endringsmeldingservice.consumer.command.SendKansellerDoedsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.domain.IdenterRequest; import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; @@ -19,7 +20,6 @@ import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; -import no.nav.testnav.endringsmeldingservice.domain.IdenterRequest; import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsIdentStatusDTO; import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; import no.nav.testnav.libs.securitycore.domain.ServerProperties; @@ -84,7 +84,7 @@ public Flux getPersondata(String ident, Set miljoer) { return accessTokenService .exchange(serverProperties) - .flatMapMany(accessToken -> new GetPersondataCommand(webClient, ident, miljoer, accessToken.getTokenValue()).call()); + .flatMapMany(accessToken -> new HentPersondataCommand(webClient, ident, miljoer, accessToken.getTokenValue()).call()); } public Flux getAdressehistorikk(String ident, LocalDate aksjonsdato, Set miljoer) { diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java index b569e68923e..08b45a78936 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java @@ -35,7 +35,7 @@ public Flux call() { .uri(builder -> builder.path(PERSON_DATA_URL) .queryParam(IDENTER, identer) .queryParamIfPresent(MILJOER, Optional.ofNullable(miljoer)) - .queryParam(INCLUDE_PROD, true) + .queryParam(INCLUDE_PROD, false) .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/HentPersondataCommand.java similarity index 83% rename from apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java rename to apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/HentPersondataCommand.java index 63c7c8dd37c..3899c0ea014 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/HentPersondataCommand.java @@ -13,9 +13,9 @@ import java.util.concurrent.Callable; @RequiredArgsConstructor -public class GetPersondataCommand implements Callable> { +public class HentPersondataCommand implements Callable> { - private static final String PERSON_DATA_URL = "/api/v1/personer/{ident}"; + private static final String PERSON_DATA_URL = "/api/v2/personer/ident"; private static final String MILJOER = "miljoer"; private final WebClient webClient; @@ -27,10 +27,11 @@ public class GetPersondataCommand implements Callable> { public Flux call() { return webClient - .get() + .post() .uri(builder -> builder.path(PERSON_DATA_URL) .queryParam(MILJOER, miljoer) - .build(ident)) + .build()) + .bodyValue(ident) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() .bodyToFlux(PersonMiljoeDTO.class) diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java index 85c1ec1ae02..340ecc65b26 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java @@ -13,9 +13,12 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import java.util.Collection; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -98,10 +101,8 @@ private static Mono getDoedsmeldingResponseDTO(Set miljoe, - miljoe -> "finnes i %smiljø".formatted("p".equals(miljoe) ? "produksjons" : "")))) - .error("FEIL: ident %s finnes ikke i alle forspurte miljøer/og eller i prod(p) %s".formatted( + .collect(Collectors.toMap(miljoe -> miljoe, miljoe -> "Ident finnes, men kansellering ikke utført"))) + .error("FEIL: ident %s finnes ikke i alle forspurte miljøer %s".formatted( resultat.getIdent(), miljoer)) .build())) .findFirst() @@ -122,8 +123,7 @@ public Mono sendKansellerDoedsmelding(String ident, Set .flatMap(resultater -> { if (resultater.stream() - .anyMatch(resultat -> resultat.getMiljoer().contains("p") || - !resultat.getMiljoer().containsAll(miljoer))) { + .anyMatch(resultat -> !resultat.getMiljoer().containsAll(miljoer))) { return getDoedsmeldingResponseDTO(miljoer, resultater); @@ -131,26 +131,40 @@ public Mono sendKansellerDoedsmelding(String ident, Set return tpsMessagingConsumer.getPersondata(ident, miljoer) .filter(PersonMiljoeDTO::isOk) - .filter(persondata -> persondata.getPerson().isDoed()) + .flatMap(persondata -> { + if (persondata.getPerson().isDoed()) { + return tpsMessagingConsumer.getAdressehistorikk(buildAdresseRequest(persondata), + Set.of(persondata.getMiljoe())) + .filter(AdressehistorikkDTO::isOk) + .map(AdressehistorikkDTO::getPersondata) + .map(AdressehistorikkMapper::mapHistorikk) + .flatMap(person -> tpsMessagingConsumer.sendKansellerDoedsmelding(person, + Set.of(persondata.getMiljoe()))); + } else { + return Flux.just(DoedsmeldingResponse.builder() + .ident(ident) + .miljoStatus(Map.of(persondata.getMiljoe(), "OK")) + .build()); + } + }) .collectList() - .filter(persondata -> !persondata.isEmpty()) - .flatMap(persondata -> tpsMessagingConsumer.getAdressehistorikk(buildAdresseRequest(persondata.getFirst()), - persondata.stream().map(PersonMiljoeDTO::getMiljoe).collect(Collectors.toSet())) - .filter(AdressehistorikkDTO::isOk) - .map(AdressehistorikkDTO::getPersondata) - .map(AdressehistorikkMapper::mapHistorikk) - .collectList() - .flatMap(personer -> - tpsMessagingConsumer.sendKansellerDoedsmelding(personer.getFirst(), - persondata.stream().map(PersonMiljoeDTO::getMiljoe).collect(Collectors.toSet())))) - .map(response -> DoedsmeldingResponseDTO.builder() - .ident(ident) - .miljoStatus(response.getMiljoStatus()) - .build()); + .map(resultat -> convertResult(ident, resultat)); } }); } + private static DoedsmeldingResponseDTO convertResult(String ident, List result) { + + return DoedsmeldingResponseDTO.builder() + .ident(ident) + .miljoStatus(result.stream() + .map(DoedsmeldingResponse::getMiljoStatus) + .map(Map::entrySet) + .flatMap(Collection::stream) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))) + .build(); + } + private static String validate(DoedsmeldingDTO doedsmelding) { if (isBlank(doedsmelding.getIdent())) { diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java index 4d937a0048c..edd9de84302 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java @@ -51,20 +51,16 @@ public Mono sendFoedselsmelding(FoedselsmeldingDTO r .flatMap(resultater -> { if (resultater.stream() - .anyMatch(resultat -> resultat.getMiljoer().contains("p") || - !resultat.getMiljoer().containsAll(miljoer))) { + .anyMatch(resultat -> !resultat.getMiljoer().containsAll(miljoer))) { return resultater.stream() - .filter(resultat -> resultat.getMiljoer().contains("p") || - !resultat.getMiljoer().containsAll(miljoer)) + .filter(resultat -> !resultat.getMiljoer().containsAll(miljoer)) .map(resultat -> Mono.just(FoedselsmeldingResponseDTO.builder() .ident(resultat.getIdent()) .miljoStatus(resultat.getMiljoer().stream() - .sorted() - .collect(Collectors.toMap(miljoe -> miljoe, - miljoe -> "finnes i %smiljø".formatted("p".equals(miljoe) ? "produksjons" : "")))) - .error("FEIL: ident %s finnes ikke i alle forspurte miljøer/og eller i prod(p) %s".formatted( + .collect(Collectors.toMap(miljoe -> miljoe, miljoe -> "Ident finnes, men oppretting ikke utført"))) + .error("FEIL: ident %s finnes ikke i alle forspurte miljøer %s".formatted( resultat.getIdent(), miljoer)) .build())) .findFirst() diff --git a/apps/endringsmelding-service/src/main/resources/logback-spring.xml b/apps/endringsmelding-service/src/main/resources/logback-spring.xml index de8c7308e9c..5bf0e8577fe 100644 --- a/apps/endringsmelding-service/src/main/resources/logback-spring.xml +++ b/apps/endringsmelding-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/ereg-batch-status-service/src/main/resources/logback-spring.xml b/apps/ereg-batch-status-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..8cb873abbff 100644 --- a/apps/ereg-batch-status-service/src/main/resources/logback-spring.xml +++ b/apps/ereg-batch-status-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/faste-data-frontend/src/main/resources/logback-spring.xml b/apps/faste-data-frontend/src/main/resources/logback-spring.xml index 52c15597b3c..ee4311671c9 100644 --- a/apps/faste-data-frontend/src/main/resources/logback-spring.xml +++ b/apps/faste-data-frontend/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 @@ -36,5 +37,5 @@ - + \ No newline at end of file diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/logback-spring.xml b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/logback-spring.xml index 3d872283bfc..cd9958e7178 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/logback-spring.xml +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/generer-navn-service/src/main/resources/logback-spring.xml b/apps/generer-navn-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..27020c5c331 100644 --- a/apps/generer-navn-service/src/main/resources/logback-spring.xml +++ b/apps/generer-navn-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/generer-organisasjon-populasjon-service/src/main/resources/logback-spring.xml b/apps/generer-organisasjon-populasjon-service/src/main/resources/logback-spring.xml index 3d872283bfc..cd9958e7178 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/resources/logback-spring.xml +++ b/apps/generer-organisasjon-populasjon-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/generer-synt-amelding-service/src/main/resources/logback-spring.xml b/apps/generer-synt-amelding-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..8cb873abbff 100644 --- a/apps/generer-synt-amelding-service/src/main/resources/logback-spring.xml +++ b/apps/generer-synt-amelding-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/helsepersonell-service/src/main/resources/logback-spring.xml b/apps/helsepersonell-service/src/main/resources/logback-spring.xml index 3d872283bfc..a5d35dcff1c 100644 --- a/apps/helsepersonell-service/src/main/resources/logback-spring.xml +++ b/apps/helsepersonell-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 @@ -35,5 +36,5 @@ - + \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/resources/logback-spring.xml b/apps/inntektsmelding-generator-service/src/main/resources/logback-spring.xml index 3d872283bfc..cd9958e7178 100644 --- a/apps/inntektsmelding-generator-service/src/main/resources/logback-spring.xml +++ b/apps/inntektsmelding-generator-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/inntektsmelding-service/src/main/resources/logback-spring.xml b/apps/inntektsmelding-service/src/main/resources/logback-spring.xml index 3d872283bfc..cd9958e7178 100644 --- a/apps/inntektsmelding-service/src/main/resources/logback-spring.xml +++ b/apps/inntektsmelding-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/jenkins-batch-status-service/src/main/resources/logback-spring.xml b/apps/jenkins-batch-status-service/src/main/resources/logback-spring.xml index 3d872283bfc..00e4f75ed9a 100644 --- a/apps/jenkins-batch-status-service/src/main/resources/logback-spring.xml +++ b/apps/jenkins-batch-status-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/joark-dokument-service/src/main/resources/logback-spring.xml b/apps/joark-dokument-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..27020c5c331 100644 --- a/apps/joark-dokument-service/src/main/resources/logback-spring.xml +++ b/apps/joark-dokument-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/kodeverk-service/src/main/resources/logback-spring.xml b/apps/kodeverk-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..8cb873abbff 100644 --- a/apps/kodeverk-service/src/main/resources/logback-spring.xml +++ b/apps/kodeverk-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/miljoer-service/src/main/resources/logback-spring.xml b/apps/miljoer-service/src/main/resources/logback-spring.xml index 1a9ce7a5e5c..27020c5c331 100644 --- a/apps/miljoer-service/src/main/resources/logback-spring.xml +++ b/apps/miljoer-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/oppsummeringsdokument-service/src/main/resources/logback-spring.xml b/apps/oppsummeringsdokument-service/src/main/resources/logback-spring.xml index 6e5d6b01e71..5489f69bcb3 100644 --- a/apps/oppsummeringsdokument-service/src/main/resources/logback-spring.xml +++ b/apps/oppsummeringsdokument-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/organisasjon-bestilling-service/src/main/resources/logback-spring.xml b/apps/organisasjon-bestilling-service/src/main/resources/logback-spring.xml index 3d872283bfc..00e4f75ed9a 100644 --- a/apps/organisasjon-bestilling-service/src/main/resources/logback-spring.xml +++ b/apps/organisasjon-bestilling-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/organisasjon-faste-data-service/src/main/resources/logback-spring.xml b/apps/organisasjon-faste-data-service/src/main/resources/logback-spring.xml index 3d872283bfc..00e4f75ed9a 100644 --- a/apps/organisasjon-faste-data-service/src/main/resources/logback-spring.xml +++ b/apps/organisasjon-faste-data-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/organisasjon-forvalter/src/main/resources/logback-spring.xml b/apps/organisasjon-forvalter/src/main/resources/logback-spring.xml index 3d872283bfc..cd9958e7178 100644 --- a/apps/organisasjon-forvalter/src/main/resources/logback-spring.xml +++ b/apps/organisasjon-forvalter/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + + true 256 diff --git a/apps/organisasjon-mottak-service/src/main/resources/logback-spring.xml b/apps/organisasjon-mottak-service/src/main/resources/logback-spring.xml index 2066327923b..b052f83d230 100644 --- a/apps/organisasjon-mottak-service/src/main/resources/logback-spring.xml +++ b/apps/organisasjon-mottak-service/src/main/resources/logback-spring.xml @@ -2,7 +2,8 @@ - + +
@@ -27,5 +27,5 @@ export default () => ( Ta kontakt med team #dolly på Slack dersom du ønsker tilgang.