From d45ed0e821bce889f095dcaa46db9d001a78cc2d Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Mon, 11 Mar 2024 10:17:56 +0100 Subject: [PATCH 01/16] Feature/bytte datepicker til designsystem (#3432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Endret Datepicker og MonthPicker oppsett til å bruke designkomponenter isteden * Fikset mye spesifikt design i Dolly for dette * Refaktorering av hvordan form med datepicker fungerer * Fikset CV form og endret mye styling * Endret alle Formik til Form --- .../src/main/js/package-lock.json | 138 +++++++++--------- apps/dolly-frontend/src/main/js/package.json | 2 +- .../src/main/js/src/app/App.less | 4 - .../gjenopprett/GjenopprettBestilling.tsx | 4 +- .../gjenopprett/GjenopprettGruppe.tsx | 4 +- .../gjenopprett/GjenopprettModal.tsx | 6 +- .../gjenopprett/GjenopprettPerson.tsx | 2 +- .../startModal/NyIdent/NyIdent.tsx | 10 +- .../stegVelger/StegVelger.tsx | 8 +- .../stegVelger/steg/steg3/MalOppsummering.tsx | 8 +- .../aareg/form/partials/ameldingForm.tsx | 6 +- .../aareg/form/partials/arbeidsavtaleForm.tsx | 20 +-- .../form/partials/arbeidsforholdForm.tsx | 18 +-- .../form/partials/arbeidsforholdToggle.tsx | 6 +- .../partials/maritimtArbeidsforholdForm.tsx | 8 +- .../aareg/form/partials/permisjonForm.tsx | 20 +-- .../aareg/form/partials/permitteringForm.tsx | 16 +- .../aareg/form/partials/timeloennetForm.tsx | 16 +- .../form/partials/utenlandsoppholdForm.tsx | 16 +- .../fagsystem/alderspensjon/form/Form.tsx | 18 +-- .../fagsystem/arbeidsplassen/form/CvForm.less | 18 +++ .../fagsystem/arbeidsplassen/form/Form.tsx | 3 +- .../form/partials/AndreGodkjenningerForm.tsx | 20 +-- .../form/partials/AnnenErfaringForm.tsx | 20 +-- .../form/partials/ArbeidserfaringForm.tsx | 28 ++-- .../form/partials/FagbrevForm.tsx | 10 +- .../form/partials/FoererkortForm.tsx | 16 +- .../form/partials/HjemmelForm.tsx | 4 +- .../form/partials/JobboenskerForm.tsx | 14 +- .../form/partials/KompetanserForm.tsx | 10 +- .../arbeidsplassen/form/partials/KursForm.tsx | 27 ++-- .../partials/OffentligeGodkjenningerForm.tsx | 20 +-- .../form/partials/SpraakForm.tsx | 14 +- .../form/partials/UtdanningForm.tsx | 26 ++-- .../components/fagsystem/arena/form/Form.tsx | 10 +- .../arena/form/partials/MedServicebehov.tsx | 22 +-- .../bankkonto/form/NorskBankkonto.tsx | 8 +- .../bankkonto/form/UtenlandskBankkonto.tsx | 26 ++-- .../fagsystem/brregstub/form/Form.tsx | 4 +- .../brregstub/form/partials/enheterForm.tsx | 14 +- .../form/partials/personrollerForm.tsx | 10 +- .../fagsystem/dokarkiv/form/DokarkivForm.tsx | 18 +-- .../form/partials/Digitalinnsending.tsx | 10 +- .../fagsystem/histark/form/HistarkForm.tsx | 22 +-- .../fagsystem/inntektsmelding/form/Form.tsx | 22 +-- .../form/partials/InntektsmeldingSelect.tsx | 4 +- .../form/partials/arbeidsforholdForm.tsx | 20 +-- .../form/partials/naturalytelseForm.tsx | 22 +-- .../form/partials/omsorgspengerForm.tsx | 26 ++-- .../form/partials/orgnrToogle.tsx | 4 +- .../form/partials/pleiepengerForm.tsx | 12 +- .../form/partials/refusjonForm.tsx | 18 +-- .../form/partials/sykepengerForm.tsx | 16 +- .../fagsystem/inntektstub/form/Form.tsx | 6 +- .../form/partials/inntektsendringForm.tsx | 4 +- .../form/partials/inntektsinformasjonForm.tsx | 9 +- .../arbeidsforholdForm.tsx | 34 ++--- .../forskuddstrekkForm.tsx | 14 +- .../inntektsinformasjonLister/fradragForm.tsx | 14 +- .../inntektsinformasjonLister/inntektForm.tsx | 16 +- .../partials/inntektstubVirksomhetToggle.tsx | 6 +- .../inntektstub/form/partials/versjon.tsx | 8 +- .../components/fagsystem/inst/form/Form.tsx | 16 +- .../fagsystem/krrstub/form/KrrForm.tsx | 18 +-- .../fagsystem/medl/form/MedlForm.tsx | 20 +-- .../fagsystem/medl/form/MedlSelect.tsx | 4 +- .../organisasjoner/form/partials/Adresser.tsx | 36 ++--- .../organisasjoner/form/partials/Detaljer.tsx | 24 +-- .../form/partials/Kontaktdata.tsx | 8 +- .../partials/relasjoner/PdlRelasjoner.tsx | 1 - .../adressebeskyttelse/Adressebeskyttelse.tsx | 10 +- .../adressetyper/Matrikkeladresse.tsx | 16 +- .../adressetyper/OppholdAnnetSted.tsx | 4 +- .../adresser/adressetyper/Postboksadresse.tsx | 10 +- .../adresser/adressetyper/UkjentBosted.tsx | 4 +- .../adressetyper/UtenlandskAdresse.tsx | 18 +-- .../adressetyper/VegadresseVelger.tsx | 8 +- .../bostedsadresse/Bostedsadresse.tsx | 21 ++- .../kontaktadresse/Kontaktadresse.tsx | 19 +-- .../oppholdsadresse/Oppholdsadresse.tsx | 19 +-- .../pdlf/form/partials/alder/Alder.tsx | 10 +- .../form/partials/avansert/AvansertForm.tsx | 10 +- .../form/partials/doedsfall/Doedsfall.tsx | 13 +- .../doedfoedtBarn/DoedfoedtBarn.tsx | 13 +- .../forelderBarnRelasjon/BarnRelasjon.tsx | 8 +- .../forelderBarnRelasjon/DeltBosted.tsx | 13 +- .../ForelderBarnRelasjon.tsx | 16 +- .../foreldreansvar/Foreldreansvar.tsx | 23 ++- .../sivilstand/Sivilstand.tsx | 49 +++---- .../pdlf/form/partials/foedsel/Foedsel.tsx | 63 ++++---- .../pdlf/form/partials/fullmakt/Fullmakt.tsx | 19 +-- .../falskIdentitet/FalskIdentitet.tsx | 18 +-- .../utenlandsId/UtenlandsId.tsx | 18 +-- .../form/partials/innvandring/Innvandring.tsx | 23 ++- .../pdlf/form/partials/kjoenn/Kjoenn.tsx | 10 +- .../kontaktinformasjonForDoedsbo/Adresse.tsx | 16 +- .../kontaktinformasjonForDoedsbo/Kontakt.tsx | 21 ++- .../KontaktinformasjonForDoedsbo.tsx | 23 ++- .../pdlf/form/partials/navn/Navn.tsx | 25 ++-- .../pdlf/form/partials/nyIdent/nyIdent.tsx | 6 +- .../pdlPerson/PdlEksisterendePerson.tsx | 4 +- .../form/partials/pdlPerson/PdlNyPerson.tsx | 47 +++--- .../pdlPerson/PdlPersonUtenIdentifikator.tsx | 16 +- .../partials/personstatus/Personstatus.tsx | 13 +- .../sikkerhetstiltak/Sikkerhetstiltak.tsx | 18 +-- .../statsborgerskap/Statsborgerskap.tsx | 27 ++-- .../partials/telefonnummer/Telefonnummer.tsx | 18 +-- .../TilrettelagtKommunikasjon.tsx | 12 +- .../form/partials/utvandring/Utvandring.tsx | 23 ++- .../form/partials/vergemaal/Vergemaal.tsx | 23 ++- .../visningRedigerbar/VisningRedigerbar.tsx | 5 +- .../VisningRedigerbarForm.less | 26 ++++ .../VisningRedigerbarPersondetaljer.tsx | 7 + .../fagsystem/pensjon/form/Form.tsx | 14 +- .../fagsystem/sigrunstub/form/Form.tsx | 1 + .../fagsystem/sigrunstub/form/SigrunForm.less | 18 +++ .../form/partials/enkeltinntektForm.tsx | 22 +-- .../form/partials/inntektsaarForm.tsx | 12 +- .../sigrunstubPensjonsgivende/form/Form.tsx | 14 +- .../form/PensjonsgivendeInntektForm.tsx | 22 +-- .../skjermingsregister/form/SkjermingForm.tsx | 12 +- .../form/partials/DetaljertSykemelding.tsx | 54 +++---- .../sykdom/form/partials/SyntSykemelding.tsx | 8 +- .../fagsystem/tjenestepensjon/form/Form.tsx | 11 +- .../tjenestepensjon/form/TPForm.less | 18 +++ .../form/partials/ytelseForm.tsx | 40 ++--- .../tpsmessaging/form/TpsMessagingDiverse.tsx | 4 +- .../fagsystem/udistub/form/partials/Alias.tsx | 12 +- .../fagsystem/udistub/form/partials/Annet.tsx | 6 +- .../udistub/form/partials/Arbeidsadgang.tsx | 19 ++- .../form/partials/IkkeOppholdSammeVilkaar.tsx | 4 +- .../form/partials/OppholdSammeVilkaar.tsx | 14 +- .../udistub/form/partials/Oppholdsstatus.tsx | 12 +- .../fagsystem/uforetrygd/form/Form.tsx | 22 +-- .../form/partials/BarnetilleggForm.tsx | 22 +-- .../inntektStub/validerInntekt/Inntekt.tsx | 14 +- .../inntektStub/validerInntekt/index.tsx | 4 +- .../organisasjonSelect/OrganisasjonLoader.tsx | 10 +- .../organisasjonSelect/OrganisasjonSelect.tsx | 2 +- .../redigerGruppe/RedigerGruppe.tsx | 6 +- .../ui/form/fieldArray/DollyFieldArray.tsx | 2 +- .../ui/form/inputs/checbox/Checkbox.tsx | 2 +- .../ui/form/inputs/datepicker/Datepicker.tsx | 57 ++++---- .../inputs/datepicker/DatepickerStyled.tsx | 14 -- .../components/ui/form/inputs/label/Label.tsx | 18 ++- .../form/inputs/monthpicker/Monthpicker.tsx | 38 ++--- .../ui/form/inputs/select/Select.tsx | 6 +- .../ui/form/inputs/textInput/TextInput.tsx | 2 +- .../ui/form/inputs/timepicker/Timepicker.tsx | 6 +- .../ui/form/inputs/yearpicker/Yearpicker.tsx | 4 +- .../main/js/src/pages/dollySoek/SoekForm.tsx | 68 ++++----- .../NyOrganisasjon/NyOrganisasjon.tsx | 4 +- .../src/pages/testnorgePage/TestnorgePage.tsx | 8 +- .../search/importModal/ImportModal.tsx | 6 +- .../search/partials/Adresser.tsx | 16 +- .../testnorgePage/search/partials/Alder.tsx | 12 +- .../search/partials/Identifikasjon.tsx | 8 +- .../search/partials/Nasjonalitet.tsx | 8 +- .../search/partials/Personstatus.tsx | 4 +- .../search/partials/Relasjoner.tsx | 6 +- .../src/main/js/src/styles/main.less | 28 ++++ ...FormikErrors.tsx => DisplayFormErrors.tsx} | 2 +- ...ayFormikState.tsx => DisplayFormState.tsx} | 2 +- ...ate.test.tsx => DisplayFormState.test.tsx} | 6 +- 164 files changed, 1315 insertions(+), 1260 deletions(-) create mode 100644 apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/CvForm.less create mode 100644 apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbarForm.less create mode 100644 apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/SigrunForm.less create mode 100644 apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/TPForm.less delete mode 100644 apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/DatepickerStyled.tsx rename apps/dolly-frontend/src/main/js/src/utils/{DisplayFormikErrors.tsx => DisplayFormErrors.tsx} (95%) rename apps/dolly-frontend/src/main/js/src/utils/{DisplayFormikState.tsx => DisplayFormState.tsx} (91%) rename apps/dolly-frontend/src/main/js/src/utils/__tests__/{DisplayFormikState.test.tsx => DisplayFormState.test.tsx} (60%) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index 1db88becb37..808ec8d449a 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "3.0.0", + "version": "3.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "3.0.0", + "version": "3.0.3", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -1794,9 +1794,9 @@ "dev": true }, "node_modules/@navikt/fnrvalidator": { - "version": "1.3.3", - "resolved": "https://npm.pkg.github.com/download/@navikt/fnrvalidator/1.3.3/8414963a30e59e3056c9befea7bb022498a2a742", - "integrity": "sha512-GsLa9ioYPGsDMBHcgKUNoYbZor09KyFIqSaWy8jy1I7f06q6DgUhdpZuRTHLVRCPjWqF2aLzKtvAfrw5dSeakg==" + "version": "1.3.10", + "resolved": "https://npm.pkg.github.com/download/@navikt/fnrvalidator/1.3.10/362322fc54015f6be67e366b97c4b2751b57cfdc", + "integrity": "sha512-fTo2On5KILXY2zReLVzyjnKS3R+KfHlnx1ku4egMk3jnWbeSOU4CqzrbXd83nbAh/GhGuc12ff6uEwAGHzX/DQ==" }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", @@ -2825,9 +2825,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", - "integrity": "sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz", + "integrity": "sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==", "cpu": [ "arm" ], @@ -2838,9 +2838,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.0.tgz", - "integrity": "sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.1.tgz", + "integrity": "sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==", "cpu": [ "arm64" ], @@ -2851,9 +2851,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.0.tgz", - "integrity": "sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.1.tgz", + "integrity": "sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==", "cpu": [ "arm64" ], @@ -2864,9 +2864,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.0.tgz", - "integrity": "sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.1.tgz", + "integrity": "sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==", "cpu": [ "x64" ], @@ -2877,9 +2877,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.0.tgz", - "integrity": "sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.1.tgz", + "integrity": "sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==", "cpu": [ "arm" ], @@ -2890,9 +2890,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.0.tgz", - "integrity": "sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.1.tgz", + "integrity": "sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==", "cpu": [ "arm64" ], @@ -2903,9 +2903,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.0.tgz", - "integrity": "sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.1.tgz", + "integrity": "sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==", "cpu": [ "arm64" ], @@ -2916,9 +2916,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.0.tgz", - "integrity": "sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.1.tgz", + "integrity": "sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==", "cpu": [ "riscv64" ], @@ -2929,9 +2929,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.0.tgz", - "integrity": "sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.1.tgz", + "integrity": "sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==", "cpu": [ "x64" ], @@ -2942,9 +2942,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.0.tgz", - "integrity": "sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.1.tgz", + "integrity": "sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==", "cpu": [ "x64" ], @@ -2955,9 +2955,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.0.tgz", - "integrity": "sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.1.tgz", + "integrity": "sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==", "cpu": [ "arm64" ], @@ -2968,9 +2968,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.0.tgz", - "integrity": "sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.1.tgz", + "integrity": "sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==", "cpu": [ "ia32" ], @@ -2981,9 +2981,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.0.tgz", - "integrity": "sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.1.tgz", + "integrity": "sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==", "cpu": [ "x64" ], @@ -3202,9 +3202,9 @@ "dev": true }, "node_modules/@types/react-dom": { - "version": "18.2.19", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", - "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", + "version": "18.2.20", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.20.tgz", + "integrity": "sha512-HXN/biJY8nv20Cn9ZbCFq3liERd4CozVZmKbaiZ9KiKTrWqsP7eoGDO6OOGvJQwoVFuiXaiJ7nBBjiFFbRmQMQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -5403,9 +5403,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.692", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.692.tgz", - "integrity": "sha512-d5rZRka9n2Y3MkWRN74IoAsxR0HK3yaAt7T50e3iT9VZmCCQDT3geXUO5ZRMhDToa1pkCeQXuNo+0g+NfDOVPA==" + "version": "1.4.693", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.693.tgz", + "integrity": "sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -9600,9 +9600,9 @@ } }, "node_modules/rc-util": { - "version": "5.38.2", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.38.2.tgz", - "integrity": "sha512-yRGRPKyi84H7NkRSP6FzEIYBdUt4ufdsmXUZ7qM2H5qoByPax70NnGPkfo36N+UKUnUBj2f2Q2eUbwYMuAsIOQ==", + "version": "5.39.0", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.0.tgz", + "integrity": "sha512-fEVbkOApBUK/lg+NTkfC3fw336EhgRy531ly2QvZj8G+21OjPEzb9TtH/zfKDL2BuQqbGh8J5zXeFyfcELXOlQ==", "dependencies": { "@babel/runtime": "^7.18.3", "react-is": "^18.2.0" @@ -10400,9 +10400,9 @@ } }, "node_modules/rollup": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.0.tgz", - "integrity": "sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.1.tgz", + "integrity": "sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -10415,19 +10415,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.12.0", - "@rollup/rollup-android-arm64": "4.12.0", - "@rollup/rollup-darwin-arm64": "4.12.0", - "@rollup/rollup-darwin-x64": "4.12.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.12.0", - "@rollup/rollup-linux-arm64-gnu": "4.12.0", - "@rollup/rollup-linux-arm64-musl": "4.12.0", - "@rollup/rollup-linux-riscv64-gnu": "4.12.0", - "@rollup/rollup-linux-x64-gnu": "4.12.0", - "@rollup/rollup-linux-x64-musl": "4.12.0", - "@rollup/rollup-win32-arm64-msvc": "4.12.0", - "@rollup/rollup-win32-ia32-msvc": "4.12.0", - "@rollup/rollup-win32-x64-msvc": "4.12.0", + "@rollup/rollup-android-arm-eabi": "4.12.1", + "@rollup/rollup-android-arm64": "4.12.1", + "@rollup/rollup-darwin-arm64": "4.12.1", + "@rollup/rollup-darwin-x64": "4.12.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.12.1", + "@rollup/rollup-linux-arm64-gnu": "4.12.1", + "@rollup/rollup-linux-arm64-musl": "4.12.1", + "@rollup/rollup-linux-riscv64-gnu": "4.12.1", + "@rollup/rollup-linux-x64-gnu": "4.12.1", + "@rollup/rollup-linux-x64-musl": "4.12.1", + "@rollup/rollup-win32-arm64-msvc": "4.12.1", + "@rollup/rollup-win32-ia32-msvc": "4.12.1", + "@rollup/rollup-win32-x64-msvc": "4.12.1", "fsevents": "~2.3.2" } }, diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index 9ec7e0e965c..f6054512926 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "3.0.0", + "version": "3.0.3", "type": "module", "description": "", "main": "index.js", diff --git a/apps/dolly-frontend/src/main/js/src/app/App.less b/apps/dolly-frontend/src/main/js/src/app/App.less index 757215995e3..7c1a2f5c5df 100644 --- a/apps/dolly-frontend/src/main/js/src/app/App.less +++ b/apps/dolly-frontend/src/main/js/src/app/App.less @@ -25,7 +25,3 @@ main { display: inline-block; vertical-align: middle; } - -.navds-popover { - max-width: 350px; -} diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettBestilling.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettBestilling.tsx index 37eef9acf86..a775c250cce 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettBestilling.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettBestilling.tsx @@ -14,7 +14,7 @@ export default function GjenopprettBestilling(props) { const mutate = useMatchMutate() - const submitFormik = async (values) => { + const submitForm = async (values) => { const envsQuery = arrayToString(values.environments).replace(/ /g, '').toLowerCase() erOrganisasjon ? await props.gjenopprettOrganisasjonBestilling(envsQuery) @@ -44,7 +44,7 @@ export default function GjenopprettBestilling(props) { ) - const submitFormik = async (values: any) => { + const submitForm = async (values: any) => { const envsQuery = arrayToString(values.environments).replace(/ /g, '').toLowerCase() await DollyApi.gjenopprettGruppe(gruppe.id, envsQuery) dispatch(setUpdateNow()) @@ -57,7 +57,7 @@ export const GjenopprettGruppe = ({ onClose, gruppeId }: GjenopprettGruppeProps) return ( - submitFormik: any + submitForm: any closeModal: any bestilling?: any brukertype?: string @@ -22,7 +22,7 @@ type GjenopprettModalProps = { export const GjenopprettModal = ({ gjenopprettHeader, environments, - submitFormik, + submitForm, closeModal, bestilling, brukertype, @@ -57,7 +57,7 @@ export const GjenopprettModal = ({ Utfør diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettPerson.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettPerson.tsx index d197fe9db0c..c3ed2ec02ee 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettPerson.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/gjenopprett/GjenopprettPerson.tsx @@ -94,7 +94,7 @@ export const GjenopprettPerson = ({ ident }: GjenopprettProps) => { { closeGjenoprettModal() mutate(REGEX_BACKEND_GRUPPER) diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx index a9499a765b2..580c6eca8db 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/startModal/NyIdent/NyIdent.tsx @@ -3,9 +3,9 @@ import * as Yup from 'yup' import { useToggle } from 'react-use' import { NavLink } from 'react-router-dom' import Button from '@/components/ui/button/Button' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { DollyCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Alert } from '@navikt/ds-react' import ModalActionKnapper from '@/components/ui/modal/ModalActionKnapper' @@ -84,14 +84,14 @@ export const NyIdent = ({ brukernavn, onAvbryt, onSubmit }: NyBestillingProps) =

Velg type og antall

- - +
@@ -118,7 +118,7 @@ export const NyIdent = ({ brukernavn, onAvbryt, onSubmit }: NyBestillingProps) = isClearable={false} isDisabled={!malAktiv} /> - { {devEnabled && ( <> - - + + )} diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx index 1f237e5c45c..b17b89aa3d5 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/steg/steg3/MalOppsummering.tsx @@ -1,5 +1,5 @@ -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { Mal } from '@/utils/hooks/useMaler' import { Switch, ToggleGroup } from '@navikt/ds-react' import styled from 'styled-components' @@ -63,14 +63,14 @@ export const MalOppsummering = ({
{typeMal === MalTyper.ENDRE ? ( - ) : ( - )} - )} - + )} diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsavtaleForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsavtaleForm.tsx index fe3711f2e8e..1eded2156e0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsavtaleForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/arbeidsavtaleForm.tsx @@ -1,13 +1,13 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { ArbeidKodeverk } from '@/config/kodeverk' export const ArbeidsavtaleForm = ({ path, onChangeLenket, ...props }) => (

Ansettelsesdetaljer

- ( onChange={onChangeLenket('arbeidsavtale.yrke')} {...props} /> - ( isClearable={false} {...props} /> - ( onBlur={onChangeLenket('arbeidsavtale.stillingsprosent')} {...props} /> - - - ( onChange={onChangeLenket('arbeidsavtale.arbeidstidsordning')} {...props} /> - )} {arbeidsgiverType === ArbeidsgiverTyper.fritekst && ( - )} {arbeidsgiverType !== ArbeidsgiverTyper.egen && ( - )} - - - {arbeidsforholdstype === 'forenkletOppgjoersordning' && ( - { ) : ( <> - { warningMessage={undefined} /> )} - + )}
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/maritimtArbeidsforholdForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/maritimtArbeidsforholdForm.tsx index dd821ff9db0..6aaaaa82ea4 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/maritimtArbeidsforholdForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/maritimtArbeidsforholdForm.tsx @@ -1,4 +1,4 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { ArbeidKodeverk } from '@/config/kodeverk' type MaritimtArbeidsforhold = { @@ -17,7 +17,7 @@ export const MaritimtArbeidsforholdForm = ({

Fartøy

- - - { return ( - { > {(partialPath, idx) => (
- - - + +
)} -
+ ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/utenlandsoppholdForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/utenlandsoppholdForm.tsx index ad8a8f64173..82be7be8f29 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/utenlandsoppholdForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/aareg/form/partials/utenlandsoppholdForm.tsx @@ -1,7 +1,7 @@ import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialUtenlandsopphold } from '../initialValues' const infotekst = @@ -9,7 +9,7 @@ const infotekst = export const UtenlandsoppholdForm = ({ path }) => { return ( - { > {(partialPath, idx) => (
- - - + +
)} -
+ ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/alderspensjon/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/alderspensjon/form/Form.tsx index 688297b5a6a..b5f35922307 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/alderspensjon/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/alderspensjon/form/Form.tsx @@ -1,7 +1,7 @@ import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' import Panel from '@/components/ui/panel/Panel' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import React, { useContext, useEffect, useState } from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Alert, ToggleGroup } from '@navikt/ds-react' @@ -14,9 +14,9 @@ import { validation } from '@/components/fagsystem/alderspensjon/form/validation import { Monthpicker } from '@/components/ui/form/inputs/monthpicker/Monthpicker' import { getAlder } from '@/ducks/fagsystem' import { useNavEnheter } from '@/utils/hooks/useNorg2' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { genererTilfeldigeNavPersonidenter } from '@/utils/GenererTilfeldigeNavPersonidenter' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { genInitialAlderspensjonSoknad, genInitialAlderspensjonVedtak, @@ -271,7 +271,7 @@ export const AlderspensjonForm = () => {
{!soknad && ( - { }} /> {!soknad && ( - )} {!soknad && ( - )} - {!soknad && ( - { /> )} {soknad && ( - { @@ -29,7 +30,7 @@ export const ArbeidsplassenForm = () => { iconType="cv" startOpen={erForsteEllerTest(formMethods.getValues(), [arbeidsplassenAttributt])} > -
+
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AndreGodkjenningerForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AndreGodkjenningerForm.tsx index df47932fb0d..53b1f244dd9 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AndreGodkjenningerForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AndreGodkjenningerForm.tsx @@ -1,11 +1,11 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialAndreGodkjenninger, initialAndreGodkjenningerVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import * as React from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Vis } from '@/components/bestillingsveileder/VisAttributt' @@ -17,7 +17,7 @@ export const AndreGodkjenningerForm = ({ formMethods }) => { return ( - { {(annenGodkjenningPath, idx) => ( <>
- - - - + +
{ /> )} -
+
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AnnenErfaringForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AnnenErfaringForm.tsx index b53622f83b6..0af1562372f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AnnenErfaringForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/AnnenErfaringForm.tsx @@ -1,13 +1,13 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialAnnenErfaring, initialAnnenErfaringVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Fritekstfelt } from '@/components/fagsystem/arbeidsplassen/form/styles' import _get from 'lodash/get' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import * as React from 'react' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { EraseFillButtons } from '@/components/fagsystem/arbeidsplassen/form/partials/EraseFillButtons' @@ -17,7 +17,7 @@ export const AnnenErfaringForm = ({ formMethods }) => { return ( - { {(annenErfaringPath, idx) => ( <>
- { )}`} resize /> - - + - { /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/ArbeidserfaringForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/ArbeidserfaringForm.tsx index dfd961ea076..f5d3271ee8f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/ArbeidserfaringForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/ArbeidserfaringForm.tsx @@ -1,13 +1,13 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialArbeidserfaring, initialArbeidserfaringVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import * as React from 'react' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import _get from 'lodash/get' import { Fritekstfelt } from '@/components/fagsystem/arbeidsplassen/form/styles' import { SelectOptionsManager as Options } from '@/service/SelectOptions' @@ -24,7 +24,7 @@ export const ArbeidserfaringForm = ({ formMethods }) => { return ( - { {(arbeidsforholdPath, idx) => ( <>
- { isClearable={false} onChange={(valg) => setYrke(valg, arbeidsforholdPath)} /> - { `${arbeidsforholdPath}.alternativeJobTitle`, )}`} /> - - { )}`} resize /> - - + - { /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FagbrevForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FagbrevForm.tsx index 64434a2d3ee..faacd3ab1d1 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FagbrevForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FagbrevForm.tsx @@ -1,10 +1,10 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialFagbrev, initialFagbrevVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' import * as React from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { EraseFillButtons } from '@/components/fagsystem/arbeidsplassen/form/partials/EraseFillButtons' @@ -22,7 +22,7 @@ export const FagbrevForm = ({ formMethods }) => { return ( - { > {(fagbrevPath) => ( <> - { /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FoererkortForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FoererkortForm.tsx index 755bc4290b3..e64285496af 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FoererkortForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/FoererkortForm.tsx @@ -1,12 +1,12 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialFoererkort, initialFoererkortVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import * as React from 'react' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { EraseFillButtons } from '@/components/fagsystem/arbeidsplassen/form/partials/EraseFillButtons' @@ -15,7 +15,7 @@ export const FoererkortForm = ({ formMethods }) => { return ( - { {(foererkortPath, idx) => ( <>
- - - + +
{ /> )} -
+
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/HjemmelForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/HjemmelForm.tsx index a0ad3e3c8cb..4a247fba1c5 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/HjemmelForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/HjemmelForm.tsx @@ -1,4 +1,4 @@ -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { Hjelpetekst } from '@/components/hjelpetekst/Hjelpetekst' @@ -14,7 +14,7 @@ export const HjemmelForm = () => {
- +
) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/JobboenskerForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/JobboenskerForm.tsx index cc488a752f1..053ba831137 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/JobboenskerForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/JobboenskerForm.tsx @@ -1,4 +1,4 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import * as React from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Vis } from '@/components/bestillingsveileder/VisAttributt' @@ -37,7 +37,7 @@ export const JobboenskerForm = ({ formMethods }) => {

Jobbønsker

- { value={formMethods.getValues(`${jobboenskerPath}.occupations`)?.map((y) => y.styrk08)} onChange={(options) => setYrker(options)} /> - { />
- { isClearable={false} isMulti={true} /> - { />
- - { return ( - { > {(kompetansePath) => ( <> - { /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/KursForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/KursForm.tsx index e8f4faf7c7c..86915917f3a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/KursForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/KursForm.tsx @@ -1,11 +1,11 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialKurs, initialKursVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import * as React from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import _get from 'lodash/get' @@ -18,37 +18,32 @@ export const KursForm = ({ formMethods }) => { return ( - + {(kursPath, idx) => { const durationUnit = _get(formMethods.getValues(), `${kursPath}.durationUnit`) return ( <>
- - - - + - { ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/OffentligeGodkjenningerForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/OffentligeGodkjenningerForm.tsx index 507e9bf8118..46ff438712f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/OffentligeGodkjenningerForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/OffentligeGodkjenningerForm.tsx @@ -1,12 +1,12 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialOffentligeGodkjenninger, initialOffentligeGodkjenningerVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import * as React from 'react' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { EraseFillButtons } from '@/components/fagsystem/arbeidsplassen/form/partials/EraseFillButtons' @@ -17,7 +17,7 @@ export const OffentligeGodkjenningerForm = ({ formMethods }) => { return ( - { {(offentligGodkjenningPath, idx) => ( <>
- - { `${offentligGodkjenningPath}.issuer`, )}`} /> - - + +
{ /> )} -
+
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/SpraakForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/SpraakForm.tsx index 70bcb576a69..2abae2b676d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/SpraakForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/SpraakForm.tsx @@ -1,9 +1,9 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialSpraak, initialSpraakVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import * as React from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Vis } from '@/components/bestillingsveileder/VisAttributt' @@ -14,7 +14,7 @@ export const SpraakForm = ({ formMethods }) => { return ( - { {(spraakPath, idx) => ( <>
- - - { /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/UtdanningForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/UtdanningForm.tsx index 5aecb9c1bc6..da23e27922c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/UtdanningForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arbeidsplassen/form/partials/UtdanningForm.tsx @@ -1,25 +1,25 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialUtdanning, initialUtdanningVerdier, } from '@/components/fagsystem/arbeidsplassen/form/initialValues' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import * as React from 'react' import { Fritekstfelt } from '@/components/fagsystem/arbeidsplassen/form/styles' import _get from 'lodash/get' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { EraseFillButtons } from '@/components/fagsystem/arbeidsplassen/form/partials/EraseFillButtons' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' export const UtdanningForm = ({ formMethods }) => { const utdanningListePath = 'arbeidsplassenCV.utdanning' return ( - { return ( <>
- - - { key={`description_${beskrivelsePath}`} resize /> - - + - { ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/Form.tsx index 188c7c45793..99ce1f66e91 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/Form.tsx @@ -4,11 +4,11 @@ import { ifPresent } from '@/utils/YupValidations' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { MedServicebehov } from './partials/MedServicebehov' import { AlertInntektskomponentenRequired } from '@/components/ui/brukerAlert/AlertInntektskomponentenRequired' import { validation } from '@/components/fagsystem/arena/form/validation' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' import { useFormContext } from 'react-hook-form' @@ -45,14 +45,14 @@ export const ArenaForm = () => { )} {!servicebehovAktiv && (
- {!opts.personFoerLeggTil?.arenaforvalteren && ( - {
)} {servicebehovAktiv && } - { )}
- {!opts.personFoerLeggTil?.arenaforvalteren && ( - {
{arenaforvalter.aap115 && ( - + )} {arenaforvalter.aap && (
- - + +
)} @@ -83,7 +83,7 @@ export const MedServicebehov = ({ formMethods, path }) => { title="Dagpengevedtak" >
- { label="Rettighetskode" size={'xlarge'} /> - - - + + +
)} diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/bankkonto/form/NorskBankkonto.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/bankkonto/form/NorskBankkonto.tsx index b9f42684c6b..cb7fbc6982a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/bankkonto/form/NorskBankkonto.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/bankkonto/form/NorskBankkonto.tsx @@ -1,9 +1,9 @@ import * as React from 'react' import { useEffect, useState } from 'react' import { Vis } from '@/components/bestillingsveileder/VisAttributt' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { generateValidKontoOptions } from '@/utils/GenererGyldigNorskBankkonto' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { UseFormReturn } from 'react-hook-form/dist/types' export const NorskBankkonto = ({ formMethods }: { formMethods: UseFormReturn }) => { @@ -19,7 +19,7 @@ export const NorskBankkonto = ({ formMethods }: { formMethods: UseFormReturn }) return (
-
- {
-
- {
- - - - - + + { />
- - - + + +
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/Form.tsx index 829173642e8..d0694d46f01 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/Form.tsx @@ -1,7 +1,7 @@ import * as Yup from 'yup' import { ifPresent, requiredDate, requiredNumber, requiredString } from '@/utils/YupValidations' import { Vis } from '@/components/bestillingsveileder/VisAttributt' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsOppslag } from '@/service/SelectOptionsOppslag' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' @@ -25,7 +25,7 @@ export const BrregstubForm = () => { startOpen={erForsteEllerTest(formMethods.getValues(), [brregAttributt])} >
- { } return ( - { > {(path) => ( <> - { size="large" isClearable={false} /> - + )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/partials/personrollerForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/partials/personrollerForm.tsx index be7e3e0aab2..c1fb39593f9 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/partials/personrollerForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/brregstub/form/partials/personrollerForm.tsx @@ -1,6 +1,6 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { DollySelect } from '@/components/ui/form/inputs/select/Select' const initialValues = { @@ -32,7 +32,7 @@ export const PersonrollerForm = ({ formMethods, path }) => { } return ( - { isClearable={false} styles={formMethods.watch(egenskap) ? colorStyles : null} /> - + ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/DokarkivForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/DokarkivForm.tsx index ec4482ed74a..95f9d80625e 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/DokarkivForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/DokarkivForm.tsx @@ -3,12 +3,12 @@ import * as Yup from 'yup' import { ifPresent, requiredString } from '@/utils/YupValidations' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { DollyTextInput, FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { DollyTextInput, FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' import _ from 'lodash' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { UseFormReturn } from 'react-hook-form/dist/types' import { useFormContext } from 'react-hook-form' @@ -127,7 +127,7 @@ export const DokarkivForm = () => { vis={dokarkivAttributt} >
- { />
- { label="Journalførende enhet" size="large" /> - { /> {harFagsak && ( <> - - + )}
- + {digitalInnsending ? : null} diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/partials/Digitalinnsending.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/partials/Digitalinnsending.tsx index 6d5eb0011aa..f81ee0aa3ce 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/partials/Digitalinnsending.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/form/partials/Digitalinnsending.tsx @@ -1,6 +1,6 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Kategori } from '@/components/ui/form/kategori/Kategori' export default () => { @@ -9,13 +9,13 @@ export default () => {
- - - + +
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/form/HistarkForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/form/HistarkForm.tsx index 25bd7ed7bbc..e0a02a615be 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/form/HistarkForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/form/HistarkForm.tsx @@ -3,17 +3,17 @@ import * as Yup from 'yup' import { ifPresent, requiredDate, requiredString } from '@/utils/YupValidations' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' import { Vedlegg } from '@/components/fagsystem/dokarkiv/form/DokarkivForm' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialHistark } from '@/components/fagsystem/arbeidsplassen/form/initialValues' import { useNavEnheter } from '@/utils/hooks/useNorg2' import _ from 'lodash' import { Option } from '@/service/SelectOptionsOppslag' -import { FormikDateTimepicker } from '@/components/ui/form/inputs/timepicker/Timepicker' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDateTimepicker } from '@/components/ui/form/inputs/timepicker/Timepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Yearpicker } from '@/components/ui/form/inputs/yearpicker/Yearpicker' import { testDatoFom, testDatoTom } from '@/components/fagsystem/utils' import { useFormContext } from 'react-hook-form' @@ -75,7 +75,7 @@ export const HistarkForm = () => { startOpen={erForsteEllerTest(formMethods.getValues(), [histarkAttributt])} > - {
- { isMulti={true} />
- { }} maxDate={new Date()} /> - - - {
)} -
+
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/Form.tsx index d33af2dbc6f..14fb4a89f4f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/Form.tsx @@ -6,10 +6,10 @@ import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' import { Kategori } from '@/components/ui/form/kategori/Kategori' import { DollySelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { ifPresent, messages, @@ -129,7 +129,7 @@ export const InntektsmeldingForm = () => { isClearable={false} /> - { kodeverk={Kodeverk.Ytelse} formMethods={formMethods} /> - {typeArbeidsgiver === TypeArbeidsgiver.PRIVATPERSON && ( <> - - { formMethods={formMethods} />
- +
)} @@ -195,7 +195,7 @@ export const InntektsmeldingForm = () => { visWarning={!formMethods.watch(`${path}.startdatoForeldrepengeperiode`)} warningText="For automatisk behandling av inntektsmelding må dette feltet fylles ut" > - @@ -220,7 +220,7 @@ export const InntektsmeldingForm = () => {
) }} - + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/InntektsmeldingSelect.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/InntektsmeldingSelect.tsx index 365018afcc0..83a37d7ff3d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/InntektsmeldingSelect.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektsmelding/form/partials/InntektsmeldingSelect.tsx @@ -1,5 +1,5 @@ import LoadableComponent, { Feilmelding } from '@/components/ui/loading/LoadableComponent' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { Option, SelectOptionsOppslag } from '@/service/SelectOptionsOppslag' import { codeToNorskLabel } from '@/utils/DataFormatter' import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' @@ -21,7 +21,7 @@ export default ({ path, label, kodeverk, size = 'medium' }: InntektsmeldingSelec ) } render={(data: Array
- { > {(path: string) => ( <> - - + - {!formSimple && } )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/inntektstubVirksomhetToggle.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/inntektstubVirksomhetToggle.tsx index b3df8f48668..ffffcb2350b 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/inntektstubVirksomhetToggle.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/inntektstubVirksomhetToggle.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { OrgnummerToggle } from '@/components/fagsystem/inntektstub/form/partials/orgnummerToggle' import { ToggleGroup } from '@navikt/ds-react' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -59,8 +59,8 @@ export const InntektstubVirksomhetToggle = ({ /> ) : (
- - + +
)}
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/versjon.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/versjon.tsx index 7c856ddd1b6..ca11ee6eee9 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/versjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inntektstub/form/partials/versjon.tsx @@ -4,7 +4,7 @@ import { Inntektsinformasjon } from './inntektinformasjonTypes' import { UseFormReturn } from 'react-hook-form/dist/types' type Versjonsoversikt = { - formikIdx?: number + formIdx?: number underversjonerIdx?: Array } @@ -31,7 +31,7 @@ export default function versjonsinformasjon( //Samler spesifikk versjoninformasjon for den inntekten (idx) som skal vise const spesifikkVersjonsinfo: SpesifikkVersjon = versjonsliste.reduce( (acc: SpesifikkVersjon, curr: Versjonsoversikt, kdx: number) => { - if (curr.formikIdx === idx) { + if (curr.formIdx === idx) { return { ...acc, underversjonerIdx: curr.underversjonerIdx, gjeldendeIdx: kdx } } else if (curr.underversjonerIdx.some((versjon) => versjon === idx)) { return { ...acc, versjonAv: kdx, underVersjonerIdx: curr.underversjonerIdx } @@ -56,10 +56,10 @@ const mapVersjonsliste = ( const versjonsoversikt: Array = [] inntektValues.forEach((inntektinfo: Inntektsinformasjon, idx: number) => { if (_.isNil(inntektinfo.versjon)) { - versjonsoversikt.push({ formikIdx: idx, underversjonerIdx: [] }) + versjonsoversikt.push({ formIdx: idx, underversjonerIdx: [] }) } else { versjonsoversikt.forEach((inntekt) => { - if (sjekkKombinasjon(inntektValues[inntekt.formikIdx], inntektinfo)) { + if (sjekkKombinasjon(inntektValues[inntekt.formIdx], inntektinfo)) { inntekt.underversjonerIdx.push(idx) if (inntektinfo.versjon !== inntekt.underversjonerIdx.length) { //Endrer versjonsnr ved sletting av versjonsnr foran diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inst/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inst/form/Form.tsx index 4f93b7f2f4d..f5c031ba7a7 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/inst/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/inst/form/Form.tsx @@ -2,9 +2,9 @@ import React, { useContext } from 'react' import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' import Panel from '@/components/ui/panel/Panel' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { validation } from '@/components/fagsystem/inst/form/validation' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -41,22 +41,22 @@ export const InstForm = () => { startOpen={erForsteEllerTest(formMethods.getValues(), [instAttributt])} > {/*// @ts-ignore*/} - + {(path, idx) => ( - - - { /> )} - +
) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrForm.tsx index 46354f58563..b778e9664c9 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrForm.tsx @@ -1,7 +1,7 @@ import { Vis } from '@/components/bestillingsveileder/VisAttributt' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { DollyTextInput, FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' +import { DollyTextInput, FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' @@ -82,12 +82,12 @@ export const KrrstubForm = () => { /> {registrert && ( <> - - +
{ }} />
- - + + )}
{registrert && (
- - + {
- { />
- - + +
{
{aktivKilde === MEDL_KILDER.LAANEKASSEN && ( - + )} {aktivKilde === MEDL_KILDER.LAANEKASSEN && ( - { )}
- - `medl.${felt}` === name) ? ( - { vis="organisasjon.forretningsadresse" hjelpetekst={hjelpetekstAdresser} > - { {landForretningsadresse === 'NO' ? ( <> - - { ) : ( <> - - + + )} - - - @@ -81,7 +81,7 @@ export const Adresser = ({ formMethods, path }: AdresserProps) => { hjelpetekst={hjelpetekstAdresser} flexRow={true} > - { /> {landPostadresse === 'NO' ? ( <> - - { ) : ( <> - - + + )} - - - + + + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Detaljer.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Detaljer.tsx index 93afbb810fc..04efe34ca16 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Detaljer.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Detaljer.tsx @@ -2,10 +2,10 @@ import React, { useEffect, useState } from 'react' import _ from 'lodash' import { organisasjonPaths } from '../paths' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { OrganisasjonKodeverk } from '@/config/kodeverk' import { Kontaktdata } from './Kontaktdata' @@ -87,7 +87,7 @@ export const Detaljer = ({ )} -
- {typeUnderenhet === TypeUnderenhet.JURIDISKENHET && ( - )} - - - + + - ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Kontaktdata.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Kontaktdata.tsx index 2756b6c8605..3f08538026c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Kontaktdata.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/organisasjoner/form/partials/Kontaktdata.tsx @@ -1,5 +1,5 @@ import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { kontaktPaths } from '../paths' type KontaktdataProps = { @@ -9,9 +9,9 @@ type KontaktdataProps = { export const Kontaktdata = ({ path }: KontaktdataProps) => { return ( - - - + + + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlRelasjoner.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlRelasjoner.tsx index 9ca8ca70d8c..64a3af6792e 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlRelasjoner.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlRelasjoner.tsx @@ -2,7 +2,6 @@ import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' import { HentPerson } from '@/pages/gruppe/PersonVisning/PersonMiljoeinfo/PdlDataTyper' import { PdlForeldreBarn } from '@/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreBarn' import { PdlPartner } from '@/components/fagsystem/pdl/visning/partials/relasjoner/PdlPartner' -import { Sivilstand } from '@/components/fagsystem/pdlf/PdlTypes' import { PdlForeldreansvar } from '@/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreansvar' import { PdlDoedfoedtBarn } from '@/components/fagsystem/pdl/visning/partials/relasjoner/PdlDoedfoedtBarn' diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressebeskyttelse/Adressebeskyttelse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressebeskyttelse/Adressebeskyttelse.tsx index b4d892f5a8d..fdcf83753dc 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressebeskyttelse/Adressebeskyttelse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressebeskyttelse/Adressebeskyttelse.tsx @@ -1,8 +1,8 @@ import React, { useContext, useEffect, useState } from 'react' import { getInitialAdressebeskyttelse } from '@/components/fagsystem/pdlf/form/initialValues' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -76,7 +76,7 @@ export const AdressebeskyttelseForm = ({ return (
- const identtype = getIdenttype(formMethods, opts.identtype) return ( - identtype={identtype} /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Matrikkeladresse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Matrikkeladresse.tsx index 17d6ee05022..3b23e32a7b2 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Matrikkeladresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Matrikkeladresse.tsx @@ -1,5 +1,5 @@ -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AdresseKodeverk } from '@/config/kodeverk' interface MatrikkeladresseValues { @@ -9,18 +9,18 @@ interface MatrikkeladresseValues { export const Matrikkeladresse = ({ path }: MatrikkeladresseValues) => { return (
- - - - - + + + + - { return (
- +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Postboksadresse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Postboksadresse.tsx index 00fb6bde6f9..b5f4e69294b 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Postboksadresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/Postboksadresse.tsx @@ -1,5 +1,5 @@ -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AdresseKodeverk } from '@/config/kodeverk' interface PostboksadresseValues { @@ -9,9 +9,9 @@ interface PostboksadresseValues { export const Postboksadresse = ({ path }: PostboksadresseValues) => { return (
- - - + + { return (
- - - - - - + + {master === 'PDL' ? ( <> - - + + ) : ( <> diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/VegadresseVelger.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/VegadresseVelger.tsx index cea2bcde54b..034518afb6d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/VegadresseVelger.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/adressetyper/VegadresseVelger.tsx @@ -1,7 +1,7 @@ import { initialVegadresse } from '@/components/fagsystem/pdlf/form/initialValues' import { Vegadresse } from '@/components/fagsystem/pdlf/form/partials/adresser/adressetyper' import { AdresseKodeverk, GtKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { Radio, RadioGroup } from '@navikt/ds-react' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -54,7 +54,7 @@ export const VegadresseVelger = ({ formMethods, path }: VegadressevelgerValues) {vegadresseType === vegadresseValg.POSTNUMMER && ( - )} {vegadresseType === vegadresseValg.BYDELSNUMMER && ( - )} {vegadresseType === vegadresseValg.KOMMUNENUMMER && ( -
- }
- - - - - + + + { const opts = useContext(BestillingsveilederContext) return ( - { identtype={opts?.identtype} /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/kontaktadresse/Kontaktadresse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/kontaktadresse/Kontaktadresse.tsx index c00f9c53c19..43afce1f529 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/kontaktadresse/Kontaktadresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/kontaktadresse/Kontaktadresse.tsx @@ -7,8 +7,8 @@ import { initialVegadresse, } from '@/components/fagsystem/pdlf/form/initialValues' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Postboksadresse, @@ -16,9 +16,8 @@ import { VegadresseVelger, } from '@/components/fagsystem/pdlf/form/partials/adresser/adressetyper' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { Adressetype } from '@/components/fagsystem/pdlf/PdlTypes' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { getPlaceholder, setNavn } from '@/components/fagsystem/pdlf/form/partials/utils' import { useGenererNavn } from '@/utils/hooks/useGenererNavn' import { SelectOptionsFormat } from '@/service/SelectOptionsFormat' @@ -105,7 +104,7 @@ export const KontaktadresseForm = ({ return (
- )}
- - - - + + { const opts = useContext(BestillingsveilederContext) return ( - { identtype={opts?.identtype} /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/oppholdsadresse/Oppholdsadresse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/oppholdsadresse/Oppholdsadresse.tsx index 3ff9e2a9ebf..2654cfafa77 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/oppholdsadresse/Oppholdsadresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/adresser/oppholdsadresse/Oppholdsadresse.tsx @@ -8,8 +8,8 @@ import { initialVegadresse, } from '@/components/fagsystem/pdlf/form/initialValues' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { MatrikkeladresseVelger, @@ -18,9 +18,8 @@ import { VegadresseVelger, } from '@/components/fagsystem/pdlf/form/partials/adresser/adressetyper' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { Adressetype } from '@/components/fagsystem/pdlf/PdlTypes' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { getPlaceholder, setNavn } from '@/components/fagsystem/pdlf/form/partials/utils' import { useGenererNavn } from '@/utils/hooks/useGenererNavn' import { SelectOptionsFormat } from '@/service/SelectOptionsFormat' @@ -131,7 +130,7 @@ export const OppholdsadresseForm = ({ return (
- )}
- - - - + + { const opts = useContext(BestillingsveilederContext) return ( - { identtype={opts?.identtype} /> )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/alder/Alder.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/alder/Alder.tsx index 8566c77da34..1e4936a7b76 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/alder/Alder.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/alder/Alder.tsx @@ -1,6 +1,6 @@ import _ from 'lodash' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import React, { useContext } from 'react' import _get from 'lodash/get' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -36,21 +36,21 @@ export const Alder = ({ formMethods }) => { return (
- - - - - + {/*Gjeldende skjules frem til vi finner en måte å håndtere den på*/} - {/**/} + {/**/}
)}
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/doedsfall/Doedsfall.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/doedsfall/Doedsfall.tsx index a22298f2d43..cd8bfc5fd15 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/doedsfall/Doedsfall.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/doedsfall/Doedsfall.tsx @@ -1,8 +1,7 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { initialDoedsfall } from '@/components/fagsystem/pdlf/form/initialValues' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' type DoedsfallTypes = { path: string @@ -11,9 +10,7 @@ type DoedsfallTypes = { export const DoedsfallForm = ({ path }: DoedsfallTypes) => { return ( <> - - - + ) @@ -22,14 +19,14 @@ export const DoedsfallForm = ({ path }: DoedsfallTypes) => { export const Doedsfall = () => { return (
- {(path: string, _idx: number) => } - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/doedfoedtBarn/DoedfoedtBarn.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/doedfoedtBarn/DoedfoedtBarn.tsx index 07a09ec680a..200ad1b0def 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/doedfoedtBarn/DoedfoedtBarn.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/doedfoedtBarn/DoedfoedtBarn.tsx @@ -1,9 +1,8 @@ import * as React from 'react' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialDoedfoedtBarn } from '@/components/fagsystem/pdlf/form/initialValues' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { UseFormReturn } from 'react-hook-form/dist/types' interface DoedfoedtBarnProps { @@ -14,9 +13,7 @@ interface DoedfoedtBarnProps { export const DoedfoedtBarnForm = ({ formMethods, path }: DoedfoedtBarnProps) => { return (
- - - + export const DoedfoedtBarn = ({ formMethods }: DoedfoedtBarnProps) => { return ( - {(path: string) => } - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/BarnRelasjon.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/BarnRelasjon.tsx index a9d3f56c183..b03f90071a0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/BarnRelasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/BarnRelasjon.tsx @@ -1,7 +1,7 @@ import React, { useContext, useEffect, useState } from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { DollyCheckbox, FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { DollyCheckbox, FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { initialDeltBosted } from '@/components/fagsystem/pdlf/form/initialValues' import { DeltBosted } from '@/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/DeltBosted' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -31,13 +31,13 @@ export const BarnRelasjon = ({ formMethods, path }: BarnRelasjonValues) => { return ( <>
- - - }
- - - - + +
) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/ForelderBarnRelasjon.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/ForelderBarnRelasjon.tsx index fe1669f25cc..91fa3d28bc0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/ForelderBarnRelasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/ForelderBarnRelasjon.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { useContext, useEffect } from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { getInitialBarn, getInitialForelder, @@ -10,8 +10,8 @@ import { } from '@/components/fagsystem/pdlf/form/initialValues' import _ from 'lodash' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { BarnRelasjon } from '@/components/fagsystem/pdlf/form/partials/familierelasjoner/forelderBarnRelasjon/BarnRelasjon' import { TypeAnsvarlig } from '@/components/fagsystem/pdlf/PdlTypes' import { PdlEksisterendePerson } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson' @@ -138,16 +138,16 @@ export const ForelderBarnRelasjonForm = ({ {erBarn && } {!erBarn && ( <> - - + )} - { const opts = useContext(BestillingsveilederContext) return ( - { /> ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx index dd6c0f49588..d6c7a28841e 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx @@ -6,10 +6,10 @@ import { initialPdlPerson, } from '@/components/fagsystem/pdlf/form/initialValues' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import _ from 'lodash' import { ForeldreBarnRelasjon, TypeAnsvarlig } from '@/components/fagsystem/pdlf/PdlTypes' import { PdlEksisterendePerson } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson' @@ -18,7 +18,6 @@ import { PdlPersonUtenIdentifikator } from '@/components/fagsystem/pdlf/form/par import { Alert } from '@navikt/ds-react' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' import styled from 'styled-components' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { UseFormReturn } from 'react-hook-form/dist/types' interface ForeldreansvarForm { @@ -123,20 +122,18 @@ export const ForeldreansvarForm = ({ }, []) return ( -
- + handleChangeAnsvar(target, path)} /> - - - - + + {ansvar === 'ANDRE' && ( - { )} - { {(path: string, _idx: number) => { return }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/sivilstand/Sivilstand.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/sivilstand/Sivilstand.tsx index 20d51053344..1a1eae5a313 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/sivilstand/Sivilstand.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/sivilstand/Sivilstand.tsx @@ -1,19 +1,18 @@ import * as React from 'react' import { useContext } from 'react' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { PdlPersonExpander } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlPersonExpander' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { getInitialSivilstand, initialPdlPerson, } from '@/components/fagsystem/pdlf/form/initialValues' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' import { Hjelpetekst } from '@/components/hjelpetekst/Hjelpetekst' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { Option } from '@/service/SelectOptionsOppslag' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -55,8 +54,8 @@ export const SivilstandForm = ({ const kanHaRelatertPerson = gyldigeSivilstander.includes(formMethods.watch(`${path}.type`)) return ( -
- +
)} - - - - - + + { const opts = useContext(BestillingsveilederContext) return ( - { {(path: string) => ( )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/foedsel/Foedsel.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/foedsel/Foedsel.tsx index 683e9934a26..7418928e16d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/foedsel/Foedsel.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/foedsel/Foedsel.tsx @@ -1,13 +1,12 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { getInitialFoedsel } from '@/components/fagsystem/pdlf/form/initialValues' import { Yearpicker } from '@/components/ui/form/inputs/yearpicker/Yearpicker' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectedValue } from '@/components/fagsystem/pdlf/PdlTypes' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { useContext } from 'react' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -44,31 +43,29 @@ export const FoedselForm = ({ formMethods, path }: FoedselTypes) => { return ( <> - - - { - formMethods.setValue(`${path}.foedselsaar`, val ? new Date(val).getFullYear() : null) - formMethods.trigger() - }} - maxDate={new Date()} - minDate={minDateFoedsel} - // @ts-ignore - disabled={(foedselsdato !== null && foedselsaar === null) || harAlder()} - /> - - - + { + formMethods.setValue(`${path}.foedselsaar`, val ? new Date(val).getFullYear() : null) + formMethods.trigger() + }} + maxDate={new Date()} + minDate={minDateFoedsel} + // @ts-ignore + disabled={(foedselsdato !== null && foedselsaar === null) || harAlder()} + /> + + { formMethods.watch(`${path}.foedeland`) !== null } /> - handleLandChange(selected, path)} @@ -94,7 +91,7 @@ export const Foedsel = ({ formMethods }: FoedselTypes) => { const opts = useContext(BestillingsveilederContext) return (
- { {(path: string, _idx: number) => { return }} - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/fullmakt/Fullmakt.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/fullmakt/Fullmakt.tsx index bef676fa17c..519869333a6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/fullmakt/Fullmakt.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/fullmakt/Fullmakt.tsx @@ -1,13 +1,12 @@ import * as React from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { SelectOptionsOppslag } from '@/service/SelectOptionsOppslag' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { PdlPersonExpander } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlPersonExpander' import { initialFullmakt } from '@/components/fagsystem/pdlf/form/initialValues' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { SelectOptionsFormat } from '@/service/SelectOptionsFormat' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -24,7 +23,7 @@ export const FullmaktForm = ({ formMethods, path, eksisterendeNyPerson = null }: return (
-
- - - - + + { return ( - {(path: string) => } - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/falskIdentitet/FalskIdentitet.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/falskIdentitet/FalskIdentitet.tsx index aedc3205dab..cbf13ff24cc 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/falskIdentitet/FalskIdentitet.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/falskIdentitet/FalskIdentitet.tsx @@ -1,10 +1,10 @@ import _ from 'lodash' import { AdresseKodeverk } from '@/config/kodeverk' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { getPlaceholder, setNavn } from '../../utils' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { initialFalskIdentitetValues } from '@/components/fagsystem/pdlf/form/initialValues' import { PdlEksisterendePerson } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson' @@ -42,7 +42,7 @@ export const FalskIdentitet = ({ formMethods }) => { } return ( - { return ( <>
- { `${path}.rettIdentitetVedOpplysninger.personnavn.fornavn`, )} /> - - - { ) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/utenlandsId/UtenlandsId.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/utenlandsId/UtenlandsId.tsx index 6feb2720528..54c1756c798 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/utenlandsId/UtenlandsId.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/identifikasjon/utenlandsId/UtenlandsId.tsx @@ -1,9 +1,9 @@ import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { getInitialUtenlandskIdentifikasjonsnummer } from '@/components/fagsystem/pdlf/form/initialValues' import React, { useContext } from 'react' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -11,15 +11,15 @@ import { BestillingsveilederContext } from '@/components/bestillingsveileder/Bes export const UtenlandsIdForm = ({ path, idx, identtype }) => { return ( - - + - { const opts = useContext(BestillingsveilederContext) return ( - { {(path: string, idx: number) => ( )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/innvandring/Innvandring.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/innvandring/Innvandring.tsx index 41e8427cd75..65728532112 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/innvandring/Innvandring.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/innvandring/Innvandring.tsx @@ -1,11 +1,10 @@ import React from 'react' // @ts-ignore -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { AdresseKodeverk } from '@/config/kodeverk' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' type InnvandringTypes = { path: string @@ -16,21 +15,19 @@ type InnvandringTypes = { export const InnvandringForm = ({ path }: InnvandringTypes) => { return ( <> - - - - - + + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kjoenn/Kjoenn.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kjoenn/Kjoenn.tsx index 1c4950213ec..f5bd303f7bd 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kjoenn/Kjoenn.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kjoenn/Kjoenn.tsx @@ -1,6 +1,6 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { getInitialKjoenn } from '@/components/fagsystem/pdlf/form/initialValues' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { useContext } from 'react' @@ -14,7 +14,7 @@ type KjoennTypes = { export const KjoennForm = ({ path, identtype }: KjoennTypes) => { return ( <> - { return (
- {(path: string) => } - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Adresse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Adresse.tsx index 38970ef41b1..fe63c8b200a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Adresse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Adresse.tsx @@ -1,6 +1,6 @@ import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import useBoolean from '@/utils/hooks/useBoolean' import Button from '@/components/ui/button/Button' @@ -23,16 +23,16 @@ export const Adresse = ({ formMethods, path }) => { )} {visAdresse && (
- - - + + {formMethods.watch(`${path}.landkode`) === 'NOR' ? ( - { /> ) : ( <> - - + + )}
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Kontakt.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Kontakt.tsx index 74dd849b78b..5e3225fd1ab 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Kontakt.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/kontaktinformasjonForDoedsbo/Kontakt.tsx @@ -1,7 +1,7 @@ import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { getPlaceholder, setNavn } from '../utils' import _ from 'lodash' import { @@ -13,7 +13,6 @@ import { OrganisasjonSelect } from '@/components/organisasjonSelect' import { PdlNyPerson } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlNyPerson' import { PdlEksisterendePerson } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson' import { useEffect } from 'react' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { useGenererNavn } from '@/utils/hooks/useGenererNavn' import { SelectOptionsFormat } from '@/service/SelectOptionsFormat' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -111,7 +110,7 @@ export const Kontakt = ({ formMethods, path, eksisterendeNyPerson = null }: Kont return ( - - - - + { return ( <> - - - - + @@ -49,14 +46,14 @@ export const KontaktinformasjonForDoedsbo = ({ formMethods }) => { iconType="doedsbo" startOpen={erForsteEllerTest(formMethods.getValues(), [doedsboAttributt])} > - {(path) => } - + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/navn/Navn.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/navn/Navn.tsx index 8a0f5bb68ab..899abd90ac7 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/navn/Navn.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/navn/Navn.tsx @@ -1,16 +1,15 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { getInitialNavn } from '@/components/fagsystem/pdlf/form/initialValues' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { Option } from '@/service/SelectOptionsOppslag' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import _, { isEmpty } from 'lodash' import { useContext, useEffect, useState } from 'react' import { ArrowCirclepathIcon } from '@navikt/aksel-icons' import { Button } from '@navikt/ds-react' import styled from 'styled-components' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { useGenererNavn } from '@/utils/hooks/useGenererNavn' import { SelectOptionsFormat } from '@/service/SelectOptionsFormat' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -91,7 +90,7 @@ export const NavnForm = ({ formMethods, path, identtype }: NavnTypes) => { <>
- { {getRefreshButton()}
- { {getRefreshButton()}
- {
- - - - +
@@ -167,7 +164,7 @@ export const Navn = ({ formMethods }: NavnTypes) => { const opts = useContext(BestillingsveilederContext) return (
- { {(path: string) => ( )} - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/nyIdent/nyIdent.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/nyIdent/nyIdent.tsx index e3f6b42b514..f91fc9c4b28 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/nyIdent/nyIdent.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/nyIdent/nyIdent.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { useContext } from 'react' import { getInitialNyIdent } from '@/components/fagsystem/pdlf/form/initialValues' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { PdlPersonExpander } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlPersonExpander' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' @@ -16,7 +16,7 @@ export const NyIdent = ({ formMethods }: NyIdentForm) => { const opts = useContext(BestillingsveilederContext) return ( - {
) }} -
+ ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson.tsx index 3509caa4a7e..29a294e75e6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlEksisterendePerson.tsx @@ -1,5 +1,5 @@ import React, { useContext } from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import Loading from '@/components/ui/loading/Loading' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -138,7 +138,7 @@ export const PdlEksisterendePerson = ({
{(pdlLoading || gruppeLoading) && } {filteredOptions?.length > 0 ? ( - { formMethods.setValue(eksisterendePersonPath, person?.value || null) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlNyPerson.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlNyPerson.tsx index 966c3a6da04..3df1804330d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlNyPerson.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/pdlPerson/PdlNyPerson.tsx @@ -1,12 +1,11 @@ import React, { useContext } from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { Option } from '@/service/SelectOptionsOppslag' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -51,40 +50,38 @@ export const PdlNyPerson = ({ return (
- - - - - - - + + {!erNyIdent && ( - )} {!erNyIdent && ( - )} - - - - + + - - - { return ( <> - - - - - + + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/sikkerhetstiltak/Sikkerhetstiltak.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/sikkerhetstiltak/Sikkerhetstiltak.tsx index abd9a6cfa84..4b562c18371 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/sikkerhetstiltak/Sikkerhetstiltak.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/sikkerhetstiltak/Sikkerhetstiltak.tsx @@ -1,16 +1,16 @@ import * as React from 'react' import { useContext, useEffect, useState } from 'react' import { Vis } from '@/components/bestillingsveileder/VisAttributt' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import _ from 'lodash' import { genererTilfeldigeNavPersonidenter } from '@/utils/GenererTilfeldigeNavPersonidenter' import { Option } from '@/service/SelectOptionsOppslag' import { isToday } from 'date-fns' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { InputWarning } from '@/components/ui/form/inputWarning/inputWarning' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { initialSikkerhetstiltak } from '@/components/fagsystem/pdlf/form/initialValues' import { useNavEnheter } from '@/utils/hooks/useNorg2' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -57,7 +57,7 @@ export const Sikkerhetstiltak = ({ formMethods }: SikkerhetstiltakProps) => { return (
- { value={formMethods.watch(`${path}.tiltakstype`)} isClearable={false} /> - { placeholder={'Velg ...'} label={'Kontaktperson'} /> - { warningText="TPS støtter kun sikkerhetstiltak fra gjeldende dato. Endre til dagens dato dersom et gyldig sikkerhetstiltak fra TPS er ønsket." > - { @@ -115,7 +115,7 @@ export const Sikkerhetstiltak = ({ formMethods }: SikkerhetstiltakProps) => { }} /> - { @@ -126,7 +126,7 @@ export const Sikkerhetstiltak = ({ formMethods }: SikkerhetstiltakProps) => { ) }} - +
) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/statsborgerskap/Statsborgerskap.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/statsborgerskap/Statsborgerskap.tsx index 37f758e2f13..f95748c700c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/statsborgerskap/Statsborgerskap.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/statsborgerskap/Statsborgerskap.tsx @@ -1,10 +1,9 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AdresseKodeverk } from '@/config/kodeverk' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { getInitialStatsborgerskap } from '@/components/fagsystem/pdlf/form/initialValues' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { useContext } from 'react' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' @@ -16,21 +15,19 @@ type StatsborgerskapTypes = { export const StatsborgerskapForm = ({ path, identtype }: StatsborgerskapTypes) => { return ( <> - - - - - + + ) @@ -41,7 +38,7 @@ export const Statsborgerskap = () => { return (
- { {(path: string, _idx: number) => ( )} - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/telefonnummer/Telefonnummer.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/telefonnummer/Telefonnummer.tsx index 3c4d79da958..73aae2a88c0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/telefonnummer/Telefonnummer.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/telefonnummer/Telefonnummer.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from 'react' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { DollyTextInput, FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' +import { DollyTextInput, FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { AdresseKodeverk, PersoninformasjonKodeverk } from '@/config/kodeverk' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { initialTelefonnummer, @@ -49,15 +49,15 @@ const paths = { export const TelefonnummerFormRedigering = ({ path }: TelefonnummerProps) => { return ( <> - - - + - { return (
- { {(tlfPath: string, idx: number) => ( )} - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/tilrettelagtkommunikasjon/TilrettelagtKommunikasjon.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/tilrettelagtkommunikasjon/TilrettelagtKommunikasjon.tsx index a526e022eeb..2c456d31802 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/tilrettelagtkommunikasjon/TilrettelagtKommunikasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/tilrettelagtkommunikasjon/TilrettelagtKommunikasjon.tsx @@ -1,13 +1,13 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { PersoninformasjonKodeverk } from '@/config/kodeverk' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { initialTilrettelagtKommunikasjon } from '@/components/fagsystem/pdlf/form/initialValues' export const TilrettelagtKommunikasjon = () => { return (
- { > {(path: string, _idx: number) => ( <> - - { )} - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/utvandring/Utvandring.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/utvandring/Utvandring.tsx index 7cfa873cd8a..8bbaab472ab 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/utvandring/Utvandring.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/utvandring/Utvandring.tsx @@ -1,11 +1,10 @@ import React from 'react' // @ts-ignore -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { AdresseKodeverk } from '@/config/kodeverk' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' type UtvandringTypes = { path: string @@ -16,21 +15,19 @@ type UtvandringTypes = { export const UtvandringForm = ({ path }: UtvandringTypes) => { return ( <> - - - - - + + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/vergemaal/Vergemaal.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/vergemaal/Vergemaal.tsx index c03eb64d0ea..277997c2b51 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/vergemaal/Vergemaal.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/vergemaal/Vergemaal.tsx @@ -1,12 +1,11 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { AvansertForm } from '@/components/fagsystem/pdlf/form/partials/avansert/AvansertForm' import { initialVergemaal } from '@/components/fagsystem/pdlf/form/initialValues' import { VergemaalKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { PdlPersonExpander } from '@/components/fagsystem/pdlf/form/partials/pdlPerson/PdlPersonExpander' import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' -import { DatepickerWrapper } from '@/components/ui/form/inputs/datepicker/DatepickerStyled' import { Option } from '@/service/SelectOptionsOppslag' import { UseFormReturn } from 'react-hook-form/dist/types' @@ -23,30 +22,28 @@ export const VergemaalForm = ({ }: VergemaalFormTypes) => { return ( <> - - - - - - - + + { return (
- {(path: string, _idx: number) => } - +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbar.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbar.tsx index d4f583a5d96..39d34782fc3 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbar.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbar.tsx @@ -38,6 +38,7 @@ import { UseFormReturn } from 'react-hook-form/dist/types' import { Form, FormProvider, useForm } from 'react-hook-form' import { visningRedigerbarValidation } from '@/components/fagsystem/pdlf/visning/visningRedigerbar/VisningRedigerbarValidation' import { yupResolver } from '@hookform/resolvers/yup' +import './VisningRedigerbarForm.less' type VisningTypes = { getPdlForvalter: Function @@ -385,7 +386,9 @@ export const VisningRedigerbar = ({ > <> -
{getForm(formMethods)}
+
+ {getForm(formMethods)} +
{ )}
- - - + - { diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/SigrunForm.less b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/SigrunForm.less new file mode 100644 index 00000000000..1784191967a --- /dev/null +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/SigrunForm.less @@ -0,0 +1,18 @@ +.sigrun-form { + + .navds-form-field--small .navds-date__field-button { + top: 18px; + right: 33px; + position: relative; + } + + + .navds-date .rdp-button { + position: unset; + } + + && .navds-button { + position: unset; + } + +} \ No newline at end of file diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/enkeltinntektForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/enkeltinntektForm.tsx index 92128f7c227..baf90a1552a 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/enkeltinntektForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/enkeltinntektForm.tsx @@ -1,8 +1,8 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { SigrunKodeverk } from '@/config/kodeverk' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import React from 'react' import { useKodeverk } from '@/utils/hooks/useKodeverk' import { getYear } from 'date-fns' @@ -25,12 +25,12 @@ export const EnkeltinntektForm = ({ const filteredTekniskNavnOptions = getFilteredTekniskNavnOptions() return ( - + {(path, idx) => { const typeInntekt = formMethods.watch(`${path}.tekniskNavn`) return ( - - + {typeInntekt === 'skatteoppgjoersdato' ? ( - + ) : ( - + )} - +
) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/inntektsaarForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/inntektsaarForm.tsx index 5036b40db12..9c4ce54ccb1 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/inntektsaarForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstub/form/partials/inntektsaarForm.tsx @@ -1,6 +1,6 @@ import { subYears } from 'date-fns' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { EnkeltinntektForm } from './enkeltinntektForm' import { getYearRangeOptions } from '@/utils/DataFormatter' @@ -35,18 +35,18 @@ export const InntektsaarForm = ({ formMethods }) => { return ( - + {(path) => (
- - { )} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/Form.tsx index 28cd52cc750..413daf72d6f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/Form.tsx @@ -1,13 +1,13 @@ import { Vis } from '@/components/bestillingsveileder/VisAttributt' import Panel from '@/components/ui/panel/Panel' import { erForsteEllerTest, panelError } from '@/components/ui/form/formUtils' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import React, { useEffect } from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { getYearRangeOptions } from '@/utils/DataFormatter' import { subYears } from 'date-fns' import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { PensjonsgivendeInntektForm } from '@/components/fagsystem/sigrunstubPensjonsgivende/form/PensjonsgivendeInntektForm' import { usePensjonsgivendeInntektKodeverk, @@ -64,7 +64,7 @@ export const SigrunstubPensjonsgivendeForm = () => { startOpen={erForsteEllerTest(formMethods.getValues(), [sigrunstubPensjonsgivendeAttributt])} > - { {(path) => ( <>
- - +
{ /> )} -
+
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/PensjonsgivendeInntektForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/PensjonsgivendeInntektForm.tsx index 7ab3f7c6bf6..c5f47d82e7f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/PensjonsgivendeInntektForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sigrunstubPensjonsgivende/form/PensjonsgivendeInntektForm.tsx @@ -1,8 +1,8 @@ -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import React from 'react' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { getFieldSize, getInitialInntekt, @@ -26,7 +26,7 @@ const createInntektForm = (kodeverk, skatteordning, path) => { const size = getFieldSize(label) if (key === 'skatteordning') { return ( - { } if (value === 'Long') { return ( - { } if (value === 'Date') { return ( - { ) } return ( - + ) }) } @@ -68,7 +68,7 @@ export const PensjonsgivendeInntektForm = ({ path, formMethods, kodeverk, skatte const inntektError = _.get(formMethods.formState.errors, path)?.message return ( - {(path, idx) => { return ( -
+
{createInntektForm(kodeverk, skatteordning, path)}
) }} - + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/skjermingsregister/form/SkjermingForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/skjermingsregister/form/SkjermingForm.tsx index 571659e7832..380c71485f0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/skjermingsregister/form/SkjermingForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/skjermingsregister/form/SkjermingForm.tsx @@ -1,7 +1,7 @@ import React, { useContext } from 'react' import { isAfter } from 'date-fns' import { BestillingsveilederContext } from '@/components/bestillingsveileder/BestillingsveilederContext' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { validation } from '@/components/fagsystem/skjermingsregister/form/validation' export const SkjermingForm = ({ formMethods }) => { @@ -20,7 +20,7 @@ export const SkjermingForm = ({ formMethods }) => { } } - const settFormikDate = (value, path) => { + const settFormDate = (value, path) => { formMethods.setValue(`skjerming.${path}`, value) formMethods.trigger(`skjerming.${path}`) } @@ -29,22 +29,22 @@ export const SkjermingForm = ({ formMethods }) => { return (
- { - settFormikDate(date, 'egenAnsattDatoFom') + settFormDate(date, 'egenAnsattDatoFom') }} maxDate={new Date()} visHvisAvhuket /> {harSkjerming && ( - { - settFormikDate(date, 'egenAnsattDatoTom') + settFormDate(date, 'egenAnsattDatoTom') }} visHvisAvhuket /> diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/partials/DetaljertSykemelding.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/partials/DetaljertSykemelding.tsx index ee7da226b72..557a94534c1 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/partials/DetaljertSykemelding.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/sykdom/form/partials/DetaljertSykemelding.tsx @@ -1,8 +1,8 @@ -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' -import { FormikTextInput } from '@/components/ui/form/inputs/textInput/TextInput' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormTextInput } from '@/components/ui/form/inputs/textInput/TextInput' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { Kategori } from '@/components/ui/form/kategori/Kategori' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { OrganisasjonMedArbeidsforholdSelect } from '@/components/organisasjonSelect' @@ -96,13 +96,13 @@ export const DetaljertSykemelding = ({ formMethods }: SykemeldingForm) => { return (
- - + - {
- { />
- {(path: string) => ( - { isClearable={false} /> )} - + - { valueNavn={true} isClearable={true} /> - { isClearable={false} optionHeight={50} /> -
- {(path: string) => ( <> - - - + + - - - + )} - +
- - - - { return (
- - + { informasjonstekst={hjelpetekst} > {/*// @ts-ignore*/} - + {(formPath, idx) => (
- { )} - + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/TPForm.less b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/TPForm.less new file mode 100644 index 00000000000..618d3920fad --- /dev/null +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/TPForm.less @@ -0,0 +1,18 @@ +.tp-form { + + .navds-form-field--small .navds-date__field-button { + top: 18px; + right: 33px; + position: relative; + } + + + .navds-date .rdp-button { + position: unset; + } + + && .navds-button { + position: unset; + } + +} \ No newline at end of file diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/partials/ytelseForm.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/partials/ytelseForm.tsx index 7e39a32f36b..e4987854065 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/partials/ytelseForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tjenestepensjon/form/partials/ytelseForm.tsx @@ -1,26 +1,28 @@ -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDollyFieldArray } from '@/components/ui/form/fieldArray/DollyFieldArray' import { SelectOptionsManager as Options } from '@/service/SelectOptions' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import React from 'react' export const YtelseForm = ({ path, header, initialYtelser }: any) => { return ( - - {(path: any, idx: React.Key) => ( - - - - - - - )} - +
+ + {(path: any, idx: React.Key) => ( + + + + + + + )} + +
) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsmessaging/form/TpsMessagingDiverse.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsmessaging/form/TpsMessagingDiverse.tsx index 9992c7b4002..20cfab98a7c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsmessaging/form/TpsMessagingDiverse.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/tpsmessaging/form/TpsMessagingDiverse.tsx @@ -1,10 +1,10 @@ import React from 'react' import { PersoninformasjonKodeverk } from '@/config/kodeverk' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' export const TpsMessagingDiverse = () => (
- ( - + {(path, idx, curr) => ( - {curr.nyIdent && ( - ( )} )} - + ) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Annet.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Annet.tsx index d552ca4d2e2..830bb5bc0db 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Annet.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Annet.tsx @@ -1,6 +1,6 @@ import { Vis } from '@/components/bestillingsveileder/VisAttributt' import { Kategori } from '@/components/ui/form/kategori/Kategori' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' export const Annet = () => ( @@ -10,7 +10,7 @@ export const Annet = () => ( >
- ( /> - { font-size: 0.75em; text-transform: uppercase; font-weight: 400; - margin-bottom: -8px; } } ` @@ -52,7 +51,7 @@ export const Arbeidsadgang = ({ formMethods }) => { <>
- { /> {harArbeidsAdgang === 'JA' && ( - - - - @@ -87,7 +86,7 @@ export const Arbeidsadgang = ({ formMethods }) => {
- +
(
- ( - formMethods.setValue(`${pdlBasePath}[0].oppholdFra`, dato)} label="Oppholdstillatelse fra dato" /> - formMethods.setValue(`${pdlBasePath}[0].oppholdTil`, dato)} label="Oppholdstillatelse til dato" /> - - @@ -31,7 +31,7 @@ export const OppholdSammeVilkaar = ({ formMethods }: { formMethods: UseFormRetur } options={Options('oppholdstillatelseType')} /> - diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Oppholdsstatus.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Oppholdsstatus.tsx index 0b5e4c9f8aa..89b9c01f094 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Oppholdsstatus.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/udistub/form/partials/Oppholdsstatus.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' -import { FormikDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' +import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicker' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { OppholdSammeVilkaar } from '@/components/fagsystem/udistub/form/partials/OppholdSammeVilkaar' import { IkkeOppholdSammeVilkaar } from '@/components/fagsystem/udistub/form/partials/IkkeOppholdSammeVilkaar' @@ -128,26 +128,26 @@ export const Oppholdsstatus = ({ formMethods }: { formMethods: UseFormReturn }) size="xxlarge" isClearable={false} /> - formMethods.setValue(`${pdlBasePath}[0].oppholdFra`, fixTimezone(dato)) } label="Oppholdstillatelse fra dato" /> - formMethods.setValue(`${pdlBasePath}[0].oppholdTil`, fixTimezone(dato)) } label="Oppholdstillatelse til dato" /> - {eosEllerEFTAtypeOpphold && ( - { startOpen={erForsteEllerTest(formMethods.getValues(), [uforetrygdPath])} >
- - + @@ -52,7 +52,7 @@ export const UforetrygdForm = () => { formMethods.trigger(`${uforetrygdPath}`) }} /> - {
- - - + - - { return ( - + {(path: any, idx: React.Key) => ( <> - - - - + + + )} - + ) } @@ -58,7 +58,7 @@ export const BarnetilleggForm = ({ formMethods }) => { /> {harBarnetillegg && (
- { !fieldState.isDirty && formMethods.getValues(`${inntektPath}.${fieldName}`) !== null && formMethods.setValue(`${inntektPath}.${fieldName}`, null) - removeEmptyFieldsFromFormik(entry) + removeEmptyFieldsFromForm(entry) }) if ( !tilleggsinformasjonstype && @@ -86,7 +86,7 @@ const InntektStub = ({ inntektPath }) => { } } - const removeEmptyFieldsFromFormik = (entry) => { + const removeEmptyFieldsFromForm = (entry) => { const name = entry[0] const valueArray = entry[1] if ( diff --git a/apps/dolly-frontend/src/main/js/src/components/organisasjonSelect/OrganisasjonLoader.tsx b/apps/dolly-frontend/src/main/js/src/components/organisasjonSelect/OrganisasjonLoader.tsx index ba489496d28..2fb75ab9bd3 100644 --- a/apps/dolly-frontend/src/main/js/src/components/organisasjonSelect/OrganisasjonLoader.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/organisasjonSelect/OrganisasjonLoader.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { useDollyFasteDataOrganisasjoner } from '@/utils/hooks/useOrganisasjoner' type OrganisasjonLoaderProps = { @@ -11,7 +11,7 @@ type OrganisasjonLoaderProps = { afterChange?: (val) => void value: any feil?: any - useFormikSelect?: boolean + useFormSelect?: boolean isClearable?: boolean } @@ -21,7 +21,7 @@ export const OrganisasjonLoader = ({ label, path, handleChange, - useFormikSelect, + useFormSelect, feil, value, isClearable = false, @@ -55,8 +55,8 @@ export const OrganisasjonLoader = ({ postadresse: response.postadresse, })) - return useFormikSelect ? ( -
- - ) -export const FormikCheckbox = ({ +export const FormCheckbox = ({ afterChange = null, size = 'small', checkboxMargin = false, diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index f760e530425..a7d77a2d9df 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -1,7 +1,6 @@ -import ReactDatepicker, { registerLocale } from 'react-datepicker' +import { registerLocale } from 'react-datepicker' import { addYears, subYears } from 'date-fns' import locale_nb from 'date-fns/locale/nb' -import { TextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { Label } from '@/components/ui/form/inputs/label/Label' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' import { Vis } from '@/components/bestillingsveileder/VisAttributt' @@ -9,6 +8,8 @@ import { fixTimezone, SyntEvent } from '@/components/ui/form/formUtils' import 'react-datepicker/dist/react-datepicker.css' import './Datepicker.less' import { useFormContext } from 'react-hook-form' +import { DatePicker, useDatepicker } from '@navikt/ds-react' +import _ from 'lodash' registerLocale('nb', locale_nb) @@ -27,29 +28,29 @@ export const Datepicker = ({ excludeDates, minDate, maxDate, - ...props -}) => ( - } - excludeDates={excludeDates} - {...props} - /> -) +}) => { + const formMethods = useFormContext() + const eksisterendeVerdi = formMethods.watch(name) + const { datepickerProps, inputProps, selectedDay } = useDatepicker({ + fromDate: minDate || subYears(new Date(), 125), + toDate: maxDate || addYears(new Date(), 5), + onDateChange: onChange || onBlur, + defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, + disabled: excludeDates, + }) + + return ( + + + + ) +} export const DollyDatepicker = (props) => ( @@ -59,7 +60,7 @@ export const DollyDatepicker = (props) => ( ) -const P_FormikDatepicker = ({ addHour = false, ...props }) => { +const P_FormDatepicker = ({ addHour = false, ...props }) => { const formMethods = useFormContext() const value = formMethods.watch(props.name) const handleChange = (date) => { @@ -81,7 +82,7 @@ const P_FormikDatepicker = ({ addHour = false, ...props }) => { return } -export const FormikDatepicker = ({ visHvisAvhuket = true, ...props }) => { - const component = +export const FormDatepicker = ({ visHvisAvhuket = true, ...props }) => { + const component = return visHvisAvhuket ? {component} : component } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/DatepickerStyled.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/DatepickerStyled.tsx deleted file mode 100644 index ef20f8de189..00000000000 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/DatepickerStyled.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import styled from 'styled-components' - -export const DatepickerWrapper = styled.div` - display: flex; - flex-wrap: wrap; - &&&& { - button { - position: absolute; - top: 5px; - right: 5px; - margin-right: 0; - } - } -` diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/label/Label.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/label/Label.tsx index eb8becfc15f..54ae6d9d6be 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/label/Label.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/label/Label.tsx @@ -15,7 +15,23 @@ const StyledLabel = styled.label` text-transform: uppercase; ` -export const Label = ({ name, fieldName, label, info = null, containerClass = null, children }) => { +type LabelProps = { + name: string + fieldName?: string + label: string + info?: string + containerClass?: string + children: React.ReactNode +} + +export const Label = ({ + name, + fieldName, + label, + info = null as unknown as string, + containerClass = null as unknown as string, + children, +}: LabelProps) => { const { getFieldState, formState: { touchedFields }, diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx index 98ce7baca6d..5f3e2098d0c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx @@ -1,7 +1,9 @@ -import ReactDatepicker from 'react-datepicker' import { Label } from '@/components/ui/form/inputs/label/Label' -import { TextInput } from '@/components/ui/form/inputs/textInput/TextInput' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' +import { MonthPicker, useMonthpicker } from '@navikt/ds-react' +import { addYears, subYears } from 'date-fns' +import { useFormContext } from 'react-hook-form' +import _ from 'lodash' interface MonthpickerProps { name: string @@ -25,26 +27,24 @@ export const Monthpicker = ({ maxDate = null, ...props }: MonthpickerProps) => { + const formMethods = useFormContext() + const eksisterendeVerdi = formMethods.watch(name) + const formattedDate = date instanceof Date || date === null ? date : new Date(date) + const { monthpickerProps, inputProps, selectedMonth } = useMonthpicker({ + fromDate: minDate || subYears(new Date(), 125), + toDate: maxDate || addYears(new Date(), 5), + onMonthChange: onChange ? onChange : handleDateChange, + defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, + }) + return ( - - ) -const P_FormikSelect = ({ feil, ...props }: SelectProps) => { +const P_FormSelect = ({ feil, ...props }: SelectProps) => { const { field } = useController(props) const errorContext: ShowErrorContextType = useContext(ShowErrorContext) const formMethods = useFormContext() @@ -188,7 +188,7 @@ const P_FormikSelect = ({ feil, ...props }: SelectProps) => { ) } -export const FormikSelect = ({ visHvisAvhuket = false, ...props }: SelectProps) => { - const component = +export const FormSelect = ({ visHvisAvhuket = false, ...props }: SelectProps) => { + const component = return visHvisAvhuket ? {component} : component } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx index b3a554eae6a..54a7bd72504 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx @@ -98,7 +98,7 @@ export const DollyTextInput = (props: { ) -export const FormikTextInput = ({ +export const FormTextInput = ({ visHvisAvhuket = true, ...props }: { diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/timepicker/Timepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/timepicker/Timepicker.tsx index 1c7a8079d95..464c6238899 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/timepicker/Timepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/timepicker/Timepicker.tsx @@ -63,7 +63,7 @@ export const DollyTimepicker = (props) => ( ) -const P_FormikTimepicker = ({ ...props }) => { +const P_FormTimepicker = ({ ...props }) => { const formMethods = useFormContext() const value = formMethods.watch(props.name) @@ -83,7 +83,7 @@ const P_FormikTimepicker = ({ ...props }) => { return } -export const FormikDateTimepicker = ({ visHvisAvhuket = true, ...props }) => { - const component = +export const FormDateTimepicker = ({ visHvisAvhuket = true, ...props }) => { + const component = return visHvisAvhuket ? {component} : component } diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/yearpicker/Yearpicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/yearpicker/Yearpicker.tsx index f51e722a0e1..04da7685ad5 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/yearpicker/Yearpicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/yearpicker/Yearpicker.tsx @@ -26,8 +26,8 @@ export const Yearpicker = ({ minDate = null, disabled = false, }: YearpickerProps) => { - const getFeilmelding = (formMethods: UseFormReturn, formikPath: string) => { - const feilmelding = _.get(formMethods.formState.errors, formikPath) + const getFeilmelding = (formMethods: UseFormReturn, formPath: string) => { + const feilmelding = _.get(formMethods.formState.errors, formPath) return feilmelding ? { feilmelding: feilmelding } : null } diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx index 27b0ea32301..249556cf54a 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx @@ -1,8 +1,8 @@ import '@/styles/variables.less' import styled from 'styled-components' -import { FormikCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' +import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import React, { SyntheticEvent, useState } from 'react' -import { FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { FormSelect } from '@/components/ui/form/inputs/select/Select' import { SelectOptionsManager as Options } from '@/service/SelectOptions' import { Accordion, Button } from '@navikt/ds-react' import { AdresseKodeverk, GtKodeverk } from '@/config/kodeverk' @@ -213,7 +213,7 @@ export const SoekForm = () => {
- { - { handleChange(val?.value || null, `${personPath}.kjoenn`) } /> - { handleChange(val?.value || null, `${personPath}.statsborgerskap`) } /> - { handleChange(val.target.checked, `${personPath}.harVerge`) } /> - handleChange(val.target.checked, `${personPath}.harFullmakt`) } /> - handleChange(val.target.checked, `${personPath}.harDoedsfall`) } /> - handleChange(val.target.checked, `${personPath}.harInnflytting`) } /> - handleChange(val.target.checked, `${personPath}.harUtflytting`) } /> - handleChange(val.target.checked, `${personPath}.harSikkerhetstiltak`) } /> - @@ -343,7 +343,7 @@ export const SoekForm = () => {
- { ) } /> - { ) } /> - { ) } /> - { />
- @@ -403,7 +403,7 @@ export const SoekForm = () => { ) } /> - @@ -413,7 +413,7 @@ export const SoekForm = () => { ) } /> - @@ -423,7 +423,7 @@ export const SoekForm = () => { ) } /> - @@ -433,14 +433,14 @@ export const SoekForm = () => { ) } /> - handleChange(val.target.checked, `${personPath}.harKontaktadresse`) } /> - @@ -466,7 +466,7 @@ export const SoekForm = () => { - { handleChange(val?.value || null, `${personPath}.sivilstand`) } /> - handleChange(val.target.checked, `${personPath}.harBarn`) } /> - handleChange(val.target.checked, `${personPath}.harForeldre`) } /> - handleChange(val.target.checked, `${personPath}.harDoedfoedtBarn`) } /> - handleChange(val.target.checked, `${personPath}.harForeldreAnsvar`) } /> - @@ -527,7 +527,7 @@ export const SoekForm = () => { - { handleChange(val?.value || null, `${personPath}.identtype`) } /> - handleChange(val.target.checked, `${personPath}.harFalskIdentitet`) } /> - @@ -553,7 +553,7 @@ export const SoekForm = () => { ) } /> - @@ -575,7 +575,7 @@ export const SoekForm = () => { - @@ -585,7 +585,7 @@ export const SoekForm = () => { ) } /> - diff --git a/apps/dolly-frontend/src/main/js/src/pages/organisasjoner/NyOrganisasjon/NyOrganisasjon.tsx b/apps/dolly-frontend/src/main/js/src/pages/organisasjoner/NyOrganisasjon/NyOrganisasjon.tsx index fb084b0a5da..14b510e89a3 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/organisasjoner/NyOrganisasjon/NyOrganisasjon.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/organisasjoner/NyOrganisasjon/NyOrganisasjon.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react' import { useToggle } from 'react-use' import { NavLink } from 'react-router-dom' import Button from '@/components/ui/button/Button' -import { DollySelect, FormikSelect } from '@/components/ui/form/inputs/select/Select' +import { DollySelect, FormSelect } from '@/components/ui/form/inputs/select/Select' import { DollyCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox' import ModalActionKnapper from '@/components/ui/modal/ModalActionKnapper' @@ -78,7 +78,7 @@ export const NyOrganisasjon = ({ onAvbryt, onSubmit, brukernavn }: NyBestillingP isClearable={false} isDisabled={!malAktiv} /> - {
- {devEnabled && } + {devEnabled && } {devEnabled && ( - + )} {visPartnereImport && ( - )}
- { return (
Adressebeskyttelse
- { path={paths.borINorge} options={bostedOptions} /> - { optionHeight={50} size="medium" /> - { optionHeight={50} size="medium" /> - { size="medium" /> - { size="medium" info="Velg postnummer tilknyttet tidligere bostedsadresse." /> - { size="medium" info="Velg bydel tilknyttet tidligere bostedsadresse." /> - (
- ( formMethods.handleSubmit() }} /> - ( formMethods.handleSubmit() }} /> - - = ({ options={options.identtype} />
Identitet
- - - + + + { return (
- - { size="medium" isLoading={loading} /> - (
- { return (
- { onChange={() => handleForelderChange(foreldreRoller.MEDMOR)} size="small" /> - { } else return value } -export default function DisplayFormikErrors({ +export default function DisplayFormErrors({ visState = false, errors = null as any, label = 'Vis state', diff --git a/apps/dolly-frontend/src/main/js/src/utils/DisplayFormikState.tsx b/apps/dolly-frontend/src/main/js/src/utils/DisplayFormState.tsx similarity index 91% rename from apps/dolly-frontend/src/main/js/src/utils/DisplayFormikState.tsx rename to apps/dolly-frontend/src/main/js/src/utils/DisplayFormState.tsx index 7f8b4d5346e..05258d79eae 100644 --- a/apps/dolly-frontend/src/main/js/src/utils/DisplayFormikState.tsx +++ b/apps/dolly-frontend/src/main/js/src/utils/DisplayFormState.tsx @@ -14,7 +14,7 @@ const replacer = (key: string, value: any) => { } else return value } -export default function DisplayFormikState({ visState = false, label = 'Vis form' }) { +export default function DisplayFormState({ visState = false, label = 'Vis form' }) { const { getValues } = useFormContext() const [showState, toggleShowState] = useToggle(visState) diff --git a/apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormikState.test.tsx b/apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormState.test.tsx similarity index 60% rename from apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormikState.test.tsx rename to apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormState.test.tsx index 874e8a8f557..6ca7b46a3f3 100644 --- a/apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormikState.test.tsx +++ b/apps/dolly-frontend/src/main/js/src/utils/__tests__/DisplayFormState.test.tsx @@ -1,8 +1,8 @@ import { shallow } from 'enzyme' -import DisplayFormikState from '../DisplayFormikState' +import DisplayFormState from '../DisplayFormState' -describe('DisplayFormikState.js', () => { - const wrapper = shallow() +describe('DisplayFormState.js', () => { + const wrapper = shallow() it('should render pre', () => { expect(wrapper.find('pre').exists()).toBeTruthy() From d9351f7a5331fd69327df81cb82a776e83b41089 Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 11 Mar 2024 11:58:20 +0100 Subject: [PATCH 02/16] Mindre design endringer og Krrtelefonnummer er required #deploy-test-frontend --- .../fagsystem/krrstub/form/KrrValidation.tsx | 2 +- .../src/main/js/src/styles/main.less | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrValidation.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrValidation.tsx index 914f00229da..3d1f6c5e74d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrValidation.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/krrstub/form/KrrValidation.tsx @@ -7,7 +7,7 @@ const testMobil = (val) => { const fullForm = testContext.from && testContext.from[testContext.from.length - 1]?.value const registrert = _.get(fullForm, 'krrstub.registrert') const landkode = _.get(fullForm, 'krrstub.landkode') - if (!registrert || !landkode || _.isEmpty(mobil)) { + if (!registrert || !landkode) { return true } if (landkode === '+47') { diff --git a/apps/dolly-frontend/src/main/js/src/styles/main.less b/apps/dolly-frontend/src/main/js/src/styles/main.less index ff695bf6612..61a057fdb56 100644 --- a/apps/dolly-frontend/src/main/js/src/styles/main.less +++ b/apps/dolly-frontend/src/main/js/src/styles/main.less @@ -14,6 +14,33 @@ body { font-family: 'Source Sans Pro', sans-serif; background-color: @color-bg-grey; color: @color-textbase; + +} + +.dfa-blokk_content { + + &&& .react-datepicker__navigation { + position: fixed; + } + + && .react-datepicker__year-wrapper { + display: flow; + } + + && .navds-form-field--small .navds-date__field-button { + top: 18px; + right: 33px; + position: relative; + } + + + .navds-date .rdp-button { + position: unset; + } + + && .navds-button { + position: unset; + } } fieldset { From da8c030fed3f4c979313b4cce11d790de68855f4 Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Tue, 12 Mar 2024 12:50:36 +0100 Subject: [PATCH 03/16] Bugfix/frontend bugs (#3436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update og fiks for DollySoek som sendte request selv om ingenting var huket av #deploy-test-frontend * Oppdatering og fikset styling på checkbox i dollysoek FIkset datepicker som hade tidssone gmt +1 og gjorde at setDate ble satt tilbake i tid #deploy-test-frontend --- .../src/main/js/package-lock.json | 501 +++++++++--------- apps/dolly-frontend/src/main/js/package.json | 3 +- .../ui/form/inputs/datepicker/Datepicker.tsx | 6 +- .../main/js/src/pages/dollySoek/SoekForm.tsx | 26 +- 4 files changed, 272 insertions(+), 264 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index 808ec8d449a..ec997444229 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "3.0.3", + "version": "3.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "3.0.3", + "version": "3.0.4", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -15,7 +15,6 @@ "@hookform/resolvers": "^3.3.2", "@navikt/ds-css-internal": "^3.4.3", "@navikt/ds-react-internal": "^3.4.3", - "@navikt/fnrvalidator": "^1.3.0", "@popperjs/core": "^2.11.8", "axios": "^1.1.3", "classnames": "^2.3.1", @@ -1307,21 +1306,21 @@ "dev": true }, "node_modules/@grafana/faro-core": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.4.1.tgz", - "integrity": "sha512-9akwZL41Jhzlh4V8qyHuQEsll5Pkh6EiLO1dqulVWlh24zYDuw8B43vYcaNe+nqwyqXbw0GIlyxHVtjZONZLCg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.4.2.tgz", + "integrity": "sha512-gbEXApUNvgUSTuYtvO+8ZlMKyZCF/lSHT5jWhjPVIgPzbPXx0OJn6TEPCq7wrENHnYhh3LXpkSca6WtcqcxouA==", "dependencies": { "@opentelemetry/api": "^1.7.0", "@opentelemetry/otlp-transformer": "^0.48.0" } }, "node_modules/@grafana/faro-react": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@grafana/faro-react/-/faro-react-1.4.1.tgz", - "integrity": "sha512-kTZBnM+dV0FZ+rXq9Fm3BYjE0QxFl46INYX4QVoJ+q3010FR5mGRfuchvbX+BF2LRYrYAQ6WPlNd3FTGhk9fUQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@grafana/faro-react/-/faro-react-1.4.2.tgz", + "integrity": "sha512-HRKye81iWw8q+oGoq/IHjIg8I+QVYMtFbsTW5uC+c4MEfsfLDz29et1K3kCT6WEVD8DxYZ9wFeJBFb7ktU+6vA==", "dependencies": { - "@grafana/faro-web-sdk": "^1.4.1", - "@grafana/faro-web-tracing": "^1.4.1", + "@grafana/faro-web-sdk": "^1.4.2", + "@grafana/faro-web-tracing": "^1.4.2", "hoist-non-react-statics": "^3.3.2" }, "peerDependencies": { @@ -1331,21 +1330,21 @@ } }, "node_modules/@grafana/faro-web-sdk": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.4.1.tgz", - "integrity": "sha512-VkMnJ5IYu9pJ8a4nMrKVCL7nkKQZQextHVHt+3fkxR5tbZWWgaTmDW49kU6oopvNBIw4AHmZdpXrAFSzWofFIQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.4.2.tgz", + "integrity": "sha512-ust45YLEcIDMw0mpe7A1f/tKY33MiH8x2A9rGm9BLNqKeCHFVl2tU3oFs4vuFgV1iBadCHJWczOTkenLzc/RQg==", "dependencies": { - "@grafana/faro-core": "^1.4.1", + "@grafana/faro-core": "^1.4.2", "ua-parser-js": "^1.0.32", "web-vitals": "^3.1.1" } }, "node_modules/@grafana/faro-web-tracing": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@grafana/faro-web-tracing/-/faro-web-tracing-1.4.1.tgz", - "integrity": "sha512-0XQ33NABeVY9sj+sFiB1vKAugi7zB/o7bXpFCrETZgU59iPwuGx34HTx1i2jJYRxae+Cww0a1BGuTu5Fxb5Bqw==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@grafana/faro-web-tracing/-/faro-web-tracing-1.4.2.tgz", + "integrity": "sha512-FoqNc/i+yhrzZA6tq5Cvsa1RaRF24vHblEs0xyO0UUL0AQUXp3GpqU/+3mHeLu3/+VVdSr87v3y5gVIoCLduYQ==", "dependencies": { - "@grafana/faro-web-sdk": "^1.4.1", + "@grafana/faro-web-sdk": "^1.4.2", "@opentelemetry/api": "^1.7.0", "@opentelemetry/context-zone": "^1.18.1", "@opentelemetry/core": "^1.18.1", @@ -1535,13 +1534,13 @@ } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -1793,11 +1792,6 @@ "integrity": "sha512-OHFj34cK23k55v/RQ4YEssx68RYYP8YfR/gstZmZLX93Y4REQjtJujOjmv6QILxSzQWSrdPFWB96i8rY8zrGVA==", "dev": true }, - "node_modules/@navikt/fnrvalidator": { - "version": "1.3.10", - "resolved": "https://npm.pkg.github.com/download/@navikt/fnrvalidator/1.3.10/362322fc54015f6be67e366b97c4b2751b57cfdc", - "integrity": "sha512-fTo2On5KILXY2zReLVzyjnKS3R+KfHlnx1ku4egMk3jnWbeSOU4CqzrbXd83nbAh/GhGuc12ff6uEwAGHzX/DQ==" - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2690,9 +2684,9 @@ } }, "node_modules/@rc-component/trigger": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-1.18.3.tgz", - "integrity": "sha512-Ksr25pXreYe1gX6ayZ1jLrOrl9OAUHUqnuhEx6MeHnNa1zVM5Y2Aj3Q35UrER0ns8D2cJYtmJtVli+i+4eKrvA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.0.0.tgz", + "integrity": "sha512-niwKADPdY5dhdIblV6uwSayVivwo2uUISfJqri+/ovYQcH/omxDYBJKo755QKeoIIsWptxnRpgr7reEnNEZGFg==", "dependencies": { "@babel/runtime": "^7.23.2", "@rc-component/portal": "^1.1.0", @@ -2747,9 +2741,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz", - "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", + "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", "engines": { "node": ">=14.0.0" } @@ -2825,9 +2819,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz", - "integrity": "sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.0.tgz", + "integrity": "sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==", "cpu": [ "arm" ], @@ -2838,9 +2832,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.12.1.tgz", - "integrity": "sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.0.tgz", + "integrity": "sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==", "cpu": [ "arm64" ], @@ -2851,9 +2845,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.12.1.tgz", - "integrity": "sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.0.tgz", + "integrity": "sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==", "cpu": [ "arm64" ], @@ -2864,9 +2858,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.12.1.tgz", - "integrity": "sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.0.tgz", + "integrity": "sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==", "cpu": [ "x64" ], @@ -2877,9 +2871,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.12.1.tgz", - "integrity": "sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.0.tgz", + "integrity": "sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==", "cpu": [ "arm" ], @@ -2890,9 +2884,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.12.1.tgz", - "integrity": "sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.0.tgz", + "integrity": "sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==", "cpu": [ "arm64" ], @@ -2903,9 +2897,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.12.1.tgz", - "integrity": "sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.0.tgz", + "integrity": "sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==", "cpu": [ "arm64" ], @@ -2916,9 +2910,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.12.1.tgz", - "integrity": "sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.0.tgz", + "integrity": "sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==", "cpu": [ "riscv64" ], @@ -2929,9 +2923,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.12.1.tgz", - "integrity": "sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.0.tgz", + "integrity": "sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==", "cpu": [ "x64" ], @@ -2942,9 +2936,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.12.1.tgz", - "integrity": "sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.0.tgz", + "integrity": "sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==", "cpu": [ "x64" ], @@ -2955,9 +2949,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.12.1.tgz", - "integrity": "sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.0.tgz", + "integrity": "sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==", "cpu": [ "arm64" ], @@ -2968,9 +2962,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.12.1.tgz", - "integrity": "sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.0.tgz", + "integrity": "sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==", "cpu": [ "ia32" ], @@ -2981,9 +2975,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.12.1.tgz", - "integrity": "sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.0.tgz", + "integrity": "sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==", "cpu": [ "x64" ], @@ -3132,9 +3126,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", - "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "version": "20.11.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.26.tgz", + "integrity": "sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3160,9 +3154,9 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { - "version": "18.2.63", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.63.tgz", - "integrity": "sha512-ppaqODhs15PYL2nGUOaOu2RSCCB4Difu4UFrP4I3NHLloXC/ESQzQMi9nvjfT1+rudd0d2L3fQPJxRSey+rGlQ==", + "version": "18.2.65", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.65.tgz", + "integrity": "sha512-98TsY0aW4jqx/3RqsUXwMDZSWR1Z4CUlJNue8ueS2/wcxZOsz4xmW1X8ieaWVRHcmmQM3R8xVA4XWB3dJnWwDQ==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -3170,9 +3164,9 @@ } }, "node_modules/@types/react-datepicker": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-6.0.3.tgz", - "integrity": "sha512-3x5flRBrEgC3fFrBryFIrxbLf8bOkte/GNryPjfnXu3my4/XZeaML/01U+XArMCLfk2d3pei6ccNIgTlpe4c5g==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-6.2.0.tgz", + "integrity": "sha512-+JtO4Fm97WLkJTH8j8/v3Ldh7JCNRwjMYjRaKh4KHH0M3jJoXtwiD3JBCsdlg3tsFIw9eQSqyAPeVDN2H2oM9Q==", "dev": true, "dependencies": { "@floating-ui/react": "^0.26.2", @@ -3202,9 +3196,9 @@ "dev": true }, "node_modules/@types/react-dom": { - "version": "18.2.20", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.20.tgz", - "integrity": "sha512-HXN/biJY8nv20Cn9ZbCFq3liERd4CozVZmKbaiZ9KiKTrWqsP7eoGDO6OOGvJQwoVFuiXaiJ7nBBjiFFbRmQMQ==", + "version": "18.2.21", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz", + "integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==", "dev": true, "dependencies": { "@types/react": "*" @@ -3348,16 +3342,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", - "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.2.0.tgz", + "integrity": "sha512-mdekAHOqS9UjlmyF/LSs6AIEvfceV749GFxoBAjwAv0nkevfKHWQFDMcBZWUiIC5ft6ePWivXoS36aKQ0Cy3sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/type-utils": "7.1.1", - "@typescript-eslint/utils": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/type-utils": "7.2.0", + "@typescript-eslint/utils": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -3416,15 +3410,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", - "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.2.0.tgz", + "integrity": "sha512-5FKsVcHTk6TafQKQbuIVkXq58Fnbkd2wDL4LB7AURN7RUOu1utVP+G8+6u3ZhEroW3DF6hyo3ZEXxgKgp4KeCg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4" }, "engines": { @@ -3444,13 +3438,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", - "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.2.0.tgz", + "integrity": "sha512-Qh976RbQM/fYtjx9hs4XkayYujB/aPwglw2choHmf3zBjB4qOywWSdt9+KLRdHubGcoSwBnXUH2sR3hkyaERRg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1" + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3461,13 +3455,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", - "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.2.0.tgz", + "integrity": "sha512-xHi51adBHo9O9330J8GQYQwrKBqbIPJGZZVQTHHmy200hvkLZFWJIFtAG/7IYTWUyun6DE6w5InDReePJYJlJA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.1.1", - "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/typescript-estree": "7.2.0", + "@typescript-eslint/utils": "7.2.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -3488,9 +3482,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", - "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.2.0.tgz", + "integrity": "sha512-XFtUHPI/abFhm4cbCDc5Ykc8npOKBSJePY3a3s+lwumt7XWJuzP5cZcfZ610MIPHjQjNsOLlYK8ASPaNG8UiyA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -3501,13 +3495,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", - "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.2.0.tgz", + "integrity": "sha512-cyxS5WQQCoBwSakpMrvMXuMDEbhOo9bNHHrNcEWis6XHx6KF518tkF1wBvKIn/tpq5ZpUYK7Bdklu8qY0MsFIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/visitor-keys": "7.1.1", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/visitor-keys": "7.2.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3562,17 +3556,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", - "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.2.0.tgz", + "integrity": "sha512-YfHpnMAGb1Eekpm3XRK8hcMwGLGsnT6L+7b2XyRv6ouDuJU1tZir1GS2i0+VXRatMwSI1/UfcyPe53ADkU+IuA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.1.1", - "@typescript-eslint/types": "7.1.1", - "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/scope-manager": "7.2.0", + "@typescript-eslint/types": "7.2.0", + "@typescript-eslint/typescript-estree": "7.2.0", "semver": "^7.5.4" }, "engines": { @@ -3620,12 +3614,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", - "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", + "integrity": "sha512-c6EIQRHhcpl6+tO8EMR+kjkkV+ugUNXOmeASA1rlzkd8EPIriavpWoiEz1HR/VLhbVIdhqnV6E7JZm00cBDx2A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/types": "7.2.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -4404,9 +4398,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001594", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz", - "integrity": "sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g==", + "version": "1.0.30001597", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", + "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", "funding": [ { "type": "opencollective", @@ -5193,9 +5187,9 @@ } }, "node_modules/date-fns": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.3.1.tgz", - "integrity": "sha512-y8e109LYGgoQDveiEBD3DYXKba1jWf5BA8YU1FL5Tvm0BTdEfy54WLCwnuYWZNnzzvALy/QQ4Hov+Q9RVRv+Zw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.4.0.tgz", + "integrity": "sha512-Akz4R8J9MXBsOgF1QeWeCsbv6pntT5KCPjU0Q9prBxVmWJYPLhwAIsNg3b0QAdr0ttiozYLD3L/af7Ra0jqYXw==", "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -5403,9 +5397,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.693", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.693.tgz", - "integrity": "sha512-/if4Ueg0GUQlhCrW2ZlXwDAm40ipuKo+OgeHInlL8sbjt+hzISxZK949fZeJaVsheamrzANXvw1zQTvbxTvSHw==" + "version": "1.4.701", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz", + "integrity": "sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -5422,9 +5416,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.1.tgz", - "integrity": "sha512-3d3JRbwsCLJsYgvb6NuWEG44jjPSOMuS73L/6+7BZuoKm3W+qXnSoIYVHi8dG7Qcg4inAY4jbzkZ7MnskePeDg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -6803,9 +6797,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz", - "integrity": "sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -7030,9 +7024,9 @@ "optional": true }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -7195,9 +7189,9 @@ } }, "node_modules/immer": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.3.tgz", - "integrity": "sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.4.tgz", + "integrity": "sha512-cuBuGK40P/sk5IzWa9QPUaAdvPHjkk1c+xYsd9oZw+YQQEV+10G0P5uMpGctZZKnyQ+ibRO08bD25nWLmYi2pw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/immer" @@ -7547,9 +7541,12 @@ } }, "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7611,9 +7608,12 @@ } }, "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7705,9 +7705,12 @@ } }, "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7724,12 +7727,15 @@ } }, "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8760,9 +8766,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", "optional": true }, "node_modules/nano-css": { @@ -9586,12 +9592,12 @@ } }, "node_modules/rc-tooltip": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.1.3.tgz", - "integrity": "sha512-HMSbSs5oieZ7XddtINUddBLSVgsnlaSb3bZrzzGWjXa7/B7nNedmsuz72s7EWFEro9mNa7RyF3gOXKYqvJiTcQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.2.0.tgz", + "integrity": "sha512-iS/3iOAvtDh9GIx1ulY7EFUXUtktFccNLsARo3NPgLf0QW9oT0w3dA9cYWlhqAKmD+uriEwdWz1kH0Qs4zk2Aw==", "dependencies": { "@babel/runtime": "^7.11.2", - "@rc-component/trigger": "^1.18.0", + "@rc-component/trigger": "^2.0.0", "classnames": "^2.3.1" }, "peerDependencies": { @@ -9600,9 +9606,9 @@ } }, "node_modules/rc-util": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.0.tgz", - "integrity": "sha512-fEVbkOApBUK/lg+NTkfC3fw336EhgRy531ly2QvZj8G+21OjPEzb9TtH/zfKDL2BuQqbGh8J5zXeFyfcELXOlQ==", + "version": "5.39.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-5.39.1.tgz", + "integrity": "sha512-OW/ERynNDgNr4y0oiFmtes3rbEamXw7GHGbkbNd9iRr7kgT03T6fT0b9WpJ3mbxKhyOcAHnGcIoh5u/cjrC2OQ==", "dependencies": { "@babel/runtime": "^7.18.3", "react-is": "^18.2.0" @@ -9637,9 +9643,9 @@ } }, "node_modules/react-datepicker": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.2.0.tgz", - "integrity": "sha512-GzEOiE6yLfp9P6XNkOhXuYtZHzoAx3tirbi7/dj2WHlGM+NGE1lefceqGR0ZrYsYaqsNJhIJFTgwUpzVzA+mjw==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.3.0.tgz", + "integrity": "sha512-1kDbFRDxfV7IMO/m6DgCHk+mzSbFMtJC1YTwp34rcBEMd6lVTROH7IUcCgl08rwTnjqV0iG3IzGlspB8wgjaBA==", "dependencies": { "@floating-ui/react": "^0.26.2", "classnames": "^2.2.6", @@ -9719,9 +9725,9 @@ } }, "node_modules/react-from-dom": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/react-from-dom/-/react-from-dom-0.7.2.tgz", - "integrity": "sha512-mu7bTd7euJ5SUpfrtTIQMt9dMXNT5WUW3dWOzOQKI2xgLbtrPKmGH4/vJO72FY9BUYu55Rz3/OY/rADD65632Q==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/react-from-dom/-/react-from-dom-0.7.3.tgz", + "integrity": "sha512-9IK6R7+eD1wOAMC2ZCrENev0eK1625cb7vX+cnnOR9LBRNbjKiaJk4ij2zQbcefEXTWjXFhA7CTO1cd8wMONnw==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -9931,11 +9937,11 @@ } }, "node_modules/react-router": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz", - "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", + "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", "dependencies": { - "@remix-run/router": "1.15.2" + "@remix-run/router": "1.15.3" }, "engines": { "node": ">=14.0.0" @@ -9945,12 +9951,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz", - "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==", + "version": "6.22.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", + "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", "dependencies": { - "@remix-run/router": "1.15.2", - "react-router": "6.22.2" + "@remix-run/router": "1.15.3", + "react-router": "6.22.3" }, "engines": { "node": ">=14.0.0" @@ -10400,9 +10406,9 @@ } }, "node_modules/rollup": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.12.1.tgz", - "integrity": "sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.13.0.tgz", + "integrity": "sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==", "dev": true, "dependencies": { "@types/estree": "1.0.5" @@ -10415,19 +10421,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.12.1", - "@rollup/rollup-android-arm64": "4.12.1", - "@rollup/rollup-darwin-arm64": "4.12.1", - "@rollup/rollup-darwin-x64": "4.12.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.12.1", - "@rollup/rollup-linux-arm64-gnu": "4.12.1", - "@rollup/rollup-linux-arm64-musl": "4.12.1", - "@rollup/rollup-linux-riscv64-gnu": "4.12.1", - "@rollup/rollup-linux-x64-gnu": "4.12.1", - "@rollup/rollup-linux-x64-musl": "4.12.1", - "@rollup/rollup-win32-arm64-msvc": "4.12.1", - "@rollup/rollup-win32-ia32-msvc": "4.12.1", - "@rollup/rollup-win32-x64-msvc": "4.12.1", + "@rollup/rollup-android-arm-eabi": "4.13.0", + "@rollup/rollup-android-arm64": "4.13.0", + "@rollup/rollup-darwin-arm64": "4.13.0", + "@rollup/rollup-darwin-x64": "4.13.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.13.0", + "@rollup/rollup-linux-arm64-gnu": "4.13.0", + "@rollup/rollup-linux-arm64-musl": "4.13.0", + "@rollup/rollup-linux-riscv64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-gnu": "4.13.0", + "@rollup/rollup-linux-x64-musl": "4.13.0", + "@rollup/rollup-win32-arm64-msvc": "4.13.0", + "@rollup/rollup-win32-ia32-msvc": "4.13.0", + "@rollup/rollup-win32-x64-msvc": "4.13.0", "fsevents": "~2.3.2" } }, @@ -10518,12 +10524,12 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -10656,16 +10662,16 @@ "optional": true }, "node_modules/set-function-length": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", - "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.2", + "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.3", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -11384,9 +11390,9 @@ "optional": true }, "node_modules/terser": { - "version": "5.28.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.28.1.tgz", - "integrity": "sha512-wM+bZp54v/E9eRRGXb5ZFDvinrJIOaTapx3WUokyVGZu5ucVCK55zEgGd5Dl2fSr3jUo5sDiERErUWLY6QPFyA==", + "version": "5.29.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.29.1.tgz", + "integrity": "sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -11537,9 +11543,9 @@ "devOptional": true }, "node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { "node": ">=16" @@ -11603,9 +11609,9 @@ "dev": true }, "node_modules/tsconfck": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.2.tgz", - "integrity": "sha512-6lWtFjwuhS3XI4HsX4Zg0izOI3FU/AI9EGVlPEUMDIhvLPMD4wkiof0WCoDgW7qY+Dy198g4d9miAqUHWHFH6Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.0.3.tgz", + "integrity": "sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==", "dev": true, "bin": { "tsconfck": "bin/tsconfck.js" @@ -11760,9 +11766,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -11949,9 +11955,9 @@ } }, "node_modules/vite": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.5.tgz", - "integrity": "sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.6.tgz", + "integrity": "sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==", "dev": true, "dependencies": { "esbuild": "^0.19.3", @@ -12167,29 +12173,32 @@ } }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", - "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -12424,9 +12433,9 @@ } }, "node_modules/yup": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/yup/-/yup-1.3.3.tgz", - "integrity": "sha512-v8QwZSsHH2K3/G9WSkp6mZKO+hugKT1EmnMqLNUcfu51HU9MDyhlETT/JgtzprnrnQHPWsjc6MUDMBp/l9fNnw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/yup/-/yup-1.4.0.tgz", + "integrity": "sha512-wPbgkJRCqIf+OHyiTBQoJiP5PFuAXaWiJK6AmYkzQAh5/c2K9hzSApBZG5wV9KoKSePF7sAxmNSvh/13YHkFDg==", "dependencies": { "property-expr": "^2.0.5", "tiny-case": "^1.0.3", diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index f6054512926..1f28751bcf2 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "3.0.3", + "version": "3.0.4", "type": "module", "description": "", "main": "index.js", @@ -23,7 +23,6 @@ "@hookform/resolvers": "^3.3.2", "@navikt/ds-css-internal": "^3.4.3", "@navikt/ds-react-internal": "^3.4.3", - "@navikt/fnrvalidator": "^1.3.0", "@popperjs/core": "^2.11.8", "axios": "^1.1.3", "classnames": "^2.3.1", diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index a7d77a2d9df..dca3e42330c 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -60,11 +60,13 @@ export const DollyDatepicker = (props) => ( ) -const P_FormDatepicker = ({ addHour = false, ...props }) => { +const P_FormDatepicker = ({ addHour = true, ...props }) => { const formMethods = useFormContext() const value = formMethods.watch(props.name) const handleChange = (date) => { - if (props.afterChange) props.afterChange(date) + if (props.afterChange) { + props.afterChange(date) + } let val = fixTimezone(date)?.toISOString().substring(0, 19) || null if (addHour) { val = addHours(new Date(fixTimezone(date)), 3) diff --git a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx index 249556cf54a..f072b84c754 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/dollySoek/SoekForm.tsx @@ -36,12 +36,6 @@ const SoekKategori = styled.div` flex-grow: 0; } } - - && { - .navds-checkbox__icon { - margin-top: -4px; - } - } ` const Buttons = styled.div` @@ -130,7 +124,7 @@ const Header = ({ title, antall }) => ( ) export const SoekForm = () => { - const [request, setRequest] = useState(null) + const [request, setRequest] = useState(null as any) const { result, loading, error, mutate } = useSoekIdenter(request) const personPath = 'personRequest' @@ -140,17 +134,21 @@ export const SoekForm = () => { mode: 'onChange', defaultValues: initialValuesClone, }) - const { trigger, getValues, handleSubmit, reset, control, setValue } = formMethods + const { trigger, watch, handleSubmit, reset, control, setValue } = formMethods const preSubmit = () => { - setRequest(getValues()) + setRequest(watch()) mutate() } const handleChange = (value: any, path: string) => { - const updatedRequest = _.set(getValues(), path, value) setValue(path, value) trigger(path) - setRequest(updatedRequest) + const updatedRequest = watch() + if (requestIsEmpty(updatedRequest)) { + setRequest(null) + } else { + setRequest(updatedRequest) + } mutate() } @@ -177,9 +175,9 @@ export const SoekForm = () => { const handleChangeList = (value: any, path: string) => { const list = value.map((item: any) => item.value) - const updatedRequest = _.set(getValues(), path, list) setValue(path, list) trigger(path) + const updatedRequest = watch() if (requestIsEmpty(updatedRequest)) { setRequest(null) } else { @@ -188,12 +186,12 @@ export const SoekForm = () => { mutate() } - const antallFagsystemer = getValues('typer')?.length + const antallFagsystemer = watch('typer')?.length const getAntallRequest = (liste: Array) => { let antall = 0 liste.forEach((item) => { - _.get(getValues()?.personRequest, item) && antall++ + watch(`personRequest.${item}`) && antall++ }) return antall } From 0b7e61123190364568fe9171ad58b15aceda50a9 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 12 Mar 2024 13:06:05 +0100 Subject: [PATCH 04/16] =?UTF-8?q?Endring=20p=C3=A5=20Uf=C3=B8retrygd=20for?= =?UTF-8?q?m=20#deploy-test-frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/src/components/fagsystem/uforetrygd/form/Form.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx index 661d5f3077a..b7909487aff 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx @@ -10,7 +10,6 @@ import { genererTilfeldigeNavPersonidenter } from '@/utils/GenererTilfeldigeNavP import { useNavEnheter } from '@/utils/hooks/useNorg2' import { BarnetilleggForm } from '@/components/fagsystem/uforetrygd/form/partials/BarnetilleggForm' import { validation } from '@/components/fagsystem/uforetrygd/form/validation' -import { Monthpicker } from '@/components/ui/form/inputs/monthpicker/Monthpicker' import { useFormContext } from 'react-hook-form' const uforetrygdPath = 'pensjonforvalter.uforetrygd' @@ -39,11 +38,8 @@ export const UforetrygdForm = () => { >
+ - Date: Tue, 12 Mar 2024 13:16:39 +0100 Subject: [PATCH 05/16] =?UTF-8?q?Endring=20p=C3=A5=20Uf=C3=B8retrygd=20for?= =?UTF-8?q?m=20#deploy-test-frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/js/src/components/fagsystem/uforetrygd/form/Form.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx index b7909487aff..0e1225fba2f 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/uforetrygd/form/Form.tsx @@ -10,6 +10,7 @@ import { genererTilfeldigeNavPersonidenter } from '@/utils/GenererTilfeldigeNavP import { useNavEnheter } from '@/utils/hooks/useNorg2' import { BarnetilleggForm } from '@/components/fagsystem/uforetrygd/form/partials/BarnetilleggForm' import { validation } from '@/components/fagsystem/uforetrygd/form/validation' +import { Monthpicker } from '@/components/ui/form/inputs/monthpicker/Monthpicker' import { useFormContext } from 'react-hook-form' const uforetrygdPath = 'pensjonforvalter.uforetrygd' @@ -39,7 +40,7 @@ export const UforetrygdForm = () => {
- Date: Tue, 12 Mar 2024 13:24:54 +0100 Subject: [PATCH 06/16] =?UTF-8?q?Endring=20p=C3=A5=20Uf=C3=B8retrygd=20for?= =?UTF-8?q?m=20#deploy-test-frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ui/form/inputs/monthpicker/Monthpicker.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx index 5f3e2098d0c..b52186d5a29 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx @@ -35,7 +35,10 @@ export const Monthpicker = ({ const { monthpickerProps, inputProps, selectedMonth } = useMonthpicker({ fromDate: minDate || subYears(new Date(), 125), toDate: maxDate || addYears(new Date(), 5), - onMonthChange: onChange ? onChange : handleDateChange, + onMonthChange: (selectedDate) => { + selectedDate?.setHours(12, 0, 0, 0) + onChange ? onChange(selectedDate) : handleDateChange(selectedDate) + }, defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, }) From 0ca4ef6812a66f9759adbf9643b0520d30f3c565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Thu, 14 Mar 2024 09:29:16 +0100 Subject: [PATCH 07/16] Feature/funksjonalitet for doedsmedling og foedselsmelding (#3433) Funksjonalitet for foedsels- og doedsmeldinger --- apps/adresse-service/config.yml | 2 + apps/endringsmelding-service/config.yml | 3 + .../config/Consumers.java | 4 +- .../consumer/AdresseServiceConsumer.java | 38 +++ .../consumer/GenererNavnServiceConsumer.java | 38 +++ .../consumer/IdentPoolConsumer.java | 38 +++ .../consumer/TpsForvalterConsumer.java | 8 +- .../consumer/TpsMessagingConsumer.java | 84 ++++- .../command/GenererNavnServiceCommand.java | 38 +++ .../command/GetAdressehistorikkCommand.java | 44 +++ .../command/GetEksistererPersonCommand.java | 47 +++ .../command/GetPersondataCommand.java | 41 +++ .../command/IdentpoolPostCommand.java | 46 +++ .../command/SendDoedsmeldingCommand.java | 39 ++- .../command/SendDoedsmeldingOldCommand.java | 47 +++ .../command/SendFoedselsmeldingCommand.java | 37 +-- .../SendFoedselsmeldingOldCommand.java | 47 +++ .../SendKansellerDoedsmeldingCommand.java | 45 +++ .../command/VegadresseServiceCommand.java | 56 ++++ .../consumer/dto/HentIdenterRequest.java | 37 +++ .../SkdEndringsmeldingerController.java | 52 +++ .../mapper/AdressehistorikkMapper.java | 115 +++++++ .../mapper/FoedselsmeldingRequestMapper.java | 112 +++++++ .../mapper/IdentpoolRequestMapper.java | 44 +++ .../service/DoedsmeldingService.java | 165 ++++++++++ .../service/FoedselsmeldingService.java | 113 +++++++ .../utility/KjoennFraIdentUtility.java | 15 + .../src/main/resources/application-dev.yml | 10 + .../src/main/resources/application-prod.yml | 9 + .../src/main/resources/application.yml | 19 +- apps/generer-navn-service/config.yml | 2 + apps/testnav-ident-pool/config.yml | 2 + apps/tps-messaging-service/build.gradle | 2 +- .../config/MapperFacadeConfig.java | 20 +- .../consumer/TestmiljoerServiceConsumer.java | 9 +- .../consumer/TpsConsumer.java | 2 +- .../command/TestmiljoerServiceCommand.java | 7 +- .../consumer/command/TpsMeldingCommand.java | 3 +- .../tpsmessagingservice/dto/TpsRequest.java | 4 + .../dto/TpsServiceRutine.java | 21 -- .../TpsServicerutineAksjonsdatoRequest.java | 35 ++ .../dto/TpsServicerutineM201Response.java | 6 +- .../dto/TpsServicerutineRequest.java | 19 +- .../dto/TpsServicerutineS018Response.java | 39 +++ .../dto/TpsServicerutineS610Response.java | 2 +- .../SkdFeltDefinisjonerTrans1.java | 208 ++++++++++++ .../endringsmeldinger/SkdMeldingTrans1.java | 207 ++++++++++++ .../endringsmeldinger/SkdMeldingsheader.java | 51 +++ .../WhitespaceConstants.java | 21 ++ .../mapper/AdresseMappingStrategy.java | 4 - .../mapper/LocalDateCustomMapping.java | 30 ++ .../mapper/LocalDateTimeCustomMapping.java | 37 +++ .../provider/v1/PersonController.java | 42 +++ .../service/AdressehistorikkService.java | 130 ++++++++ .../service/DoedsmeldingService.java | 68 ++++ .../service/FoedselsmeldingService.java | 44 +++ .../service/IdentService.java | 12 +- .../service/PersonService.java | 11 +- .../service/skd/AdresseAppenderService.java | 107 +++++++ ...DoedsmeldingAnnulleringBuilderService.java | 54 ++++ .../skd/DoedsmeldingBuilderService.java | 52 +++ .../skd/FoedselsmeldingBuilderService.java | 107 +++++++ .../service/skd/SendSkdMeldinger.java | 40 +++ .../utils/ConvertDateToStringUtility.java | 25 ++ .../utils/HentDatoFraIdentUtility.java | 63 ++++ .../utils/HusbokstavEncoder.java | 50 +++ .../utils/IdenttypeFraIdentUtility.java | 24 ++ .../utils/LandkodeEncoder.java | 302 ++++++++++++++++++ .../utils/NullcheckUtil.java | 13 + .../utils/ResponseStatus.java | 37 +++ .../utils/ServiceRutineUtil.java | 8 +- .../utils/TranslittereringUtil.java | 131 -------- .../src/main/resources/application-prod.yaml | 9 + .../src/main/resources/application.yaml | 11 +- .../ApplicationContextTest.java | 2 +- .../v1/FoedselsmeldingDTO.java | 1 + .../dto/endringsmelding/v2/AdresseFra.java | 7 + .../endringsmelding/v2/DoedsmeldingDTO.java | 18 ++ .../v2/DoedsmeldingResponseDTO.java | 20 ++ .../v2/FoedselsmeldingDTO.java | 22 ++ .../v2/FoedselsmeldingResponseDTO.java | 20 ++ .../dto/endringsmelding/v2/Identtype.java | 8 + .../v2/KansellerDoedsmeldingDTO.java | 15 + .../libs/dto/endringsmelding/v2/Kjoenn.java | 7 + .../tpsmessagingservice/v1/AdresseDTO.java | 6 +- .../v1/AdressehistorikkDTO.java | 227 +++++++++++++ .../v1/AdressehistorikkRequest.java | 18 ++ .../v1/DoedsmeldingRequest.java | 18 ++ .../v1/DoedsmeldingResponse.java | 18 ++ .../v1/FoedselsmeldingRequest.java | 17 + .../v1/FoedselsmeldingResponse.java | 18 ++ .../v1/GateadresseDTO.java | 13 +- .../v1/IdentMiljoeDTO.java | 31 ++ .../v1/MatrikkeladresseDTO.java | 11 +- .../tpsmessagingservice/v1/PersonDTO.java | 6 + 95 files changed, 3709 insertions(+), 258 deletions(-) create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java create mode 100644 apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java create mode 100644 apps/endringsmelding-service/src/main/resources/application-dev.yml create mode 100644 apps/endringsmelding-service/src/main/resources/application-prod.yml create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java delete mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java create mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java delete mode 100644 apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java create mode 100644 apps/tps-messaging-service/src/main/resources/application-prod.yaml create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java create mode 100644 libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java create mode 100644 libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java diff --git a/apps/adresse-service/config.yml b/apps/adresse-service/config.yml index 018505cf6f3..9afa0b9e9c5 100644 --- a/apps/adresse-service/config.yml +++ b/apps/adresse-service/config.yml @@ -62,6 +62,8 @@ spec: - application: app-1 namespace: plattformsikkerhet cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp outbound: external: - host: testnav-pdl-proxy.dev-fss-pub.nais.io diff --git a/apps/endringsmelding-service/config.yml b/apps/endringsmelding-service/config.yml index 0eb96c908cb..4e0c0a762e8 100644 --- a/apps/endringsmelding-service/config.yml +++ b/apps/endringsmelding-service/config.yml @@ -28,6 +28,9 @@ spec: outbound: rules: - application: testnav-tps-messaging-service + - application: testnav-ident-pool + - application: generer-navn-service + - application: testnav-adresse-service external: - host: tps-forvalteren-proxy.dev-fss-pub.nais.io liveness: diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java index 0b633903ee0..67a149f36c7 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/Consumers.java @@ -26,5 +26,7 @@ public class Consumers { private ServerProperties tpsForvalterenProxy; private ServerProperties tpsMessagingService; - + private ServerProperties adresseService; + private ServerProperties genererNavnService; + private ServerProperties identPool; } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java new file mode 100644 index 00000000000..d9234331567 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/AdresseServiceConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.VegadresseServiceCommand; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class AdresseServiceConsumer { + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public AdresseServiceConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getAdresseService(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> getVegadresse() { + + return tokenExchange.exchange(serverProperties) + .flatMapMany(token -> new VegadresseServiceCommand(webClient, token.getTokenValue()).call()) + .collectList(); + + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java new file mode 100644 index 00000000000..905d09107e1 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/GenererNavnServiceConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.GenererNavnServiceCommand; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class GenererNavnServiceConsumer { + + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public GenererNavnServiceConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getGenererNavnService(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> getNavn() { + + return tokenExchange.exchange(serverProperties) + .flatMapMany(token -> new GenererNavnServiceCommand(webClient, 1, token.getTokenValue()).call()) + .collectList(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java new file mode 100644 index 00000000000..76c17363321 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/IdentPoolConsumer.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer; + +import no.nav.testnav.endringsmeldingservice.config.Consumers; +import no.nav.testnav.endringsmeldingservice.consumer.command.IdentpoolPostCommand; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; + +import java.util.List; + +@Service +public class IdentPoolConsumer { + + private final WebClient webClient; + private final TokenExchange tokenExchange; + private final ServerProperties serverProperties; + + public IdentPoolConsumer( + TokenExchange tokenExchange, + Consumers consumers) { + this.tokenExchange = tokenExchange; + serverProperties = consumers.getIdentPool(); + this.webClient = WebClient + .builder() + .baseUrl(serverProperties.getUrl()) + .build(); + } + + public Mono> acquireIdents(HentIdenterRequest request) { + + return tokenExchange.exchange(serverProperties) + .flatMap(token -> new IdentpoolPostCommand(webClient, request, + token.getTokenValue()).call()); + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java index c35e4f060e6..952856c6331 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/TpsForvalterConsumer.java @@ -2,8 +2,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import no.nav.testnav.endringsmeldingservice.config.Consumers; -import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingCommand; -import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendDoedsmeldingOldCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingOldCommand; import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; import no.nav.testnav.endringsmeldingservice.domain.Status; @@ -53,14 +53,14 @@ public TpsForvalterConsumer( public Mono sendFoedselsmelding(FoedselsmeldingDTO dto, Set miljoer) { return accessTokenService .exchange(serverProperties) - .flatMap(accessToken -> new SendFoedselsmeldingCommand(webClient, new FoedselsmeldingRequest(dto, miljoer), accessToken.getTokenValue()).call()) + .flatMap(accessToken -> new SendFoedselsmeldingOldCommand(webClient, new FoedselsmeldingRequest(dto, miljoer), accessToken.getTokenValue()).call()) .map(Status::new); } public Mono sendDoedsmelding(no.nav.testnav.libs.dto.endringsmelding.v1.DoedsmeldingDTO dto, Set miljoer) { return accessTokenService .exchange(serverProperties) - .flatMap(accessToken -> new SendDoedsmeldingCommand(webClient, new DoedsmeldingDTO(dto, miljoer), accessToken.getTokenValue()).call()) + .flatMap(accessToken -> new SendDoedsmeldingOldCommand(webClient, new DoedsmeldingDTO(dto, miljoer), accessToken.getTokenValue()).call()) .map(Status::new); } } 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 dbed99e80e6..05ac4a5ee1d 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 @@ -1,8 +1,23 @@ package no.nav.testnav.endringsmeldingservice.consumer; import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; import no.nav.testnav.endringsmeldingservice.config.Consumers; +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.SendDoedsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendFoedselsmeldingCommand; +import no.nav.testnav.endringsmeldingservice.consumer.command.SendKansellerDoedsmeldingCommand; +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; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +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.libs.reactivesecurity.exchange.TokenExchange; import no.nav.testnav.libs.securitycore.domain.ServerProperties; @@ -13,7 +28,12 @@ import org.springframework.web.reactive.function.client.ExchangeStrategies; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import java.time.LocalDate; +import java.util.Set; + +@Slf4j @Component public class TpsMessagingConsumer { private final WebClient webClient; @@ -44,9 +64,71 @@ public TpsMessagingConsumer( .build(); } - public Flux hentMiljoer(String ident) { + public Flux hentMiljoer(String ident) { // Skal ryddes til slutt return accessTokenService .exchange(serverProperties) .flatMapMany(accessToken -> new GetIdentEnvironmentsCommand(webClient, ident, accessToken.getTokenValue()).call()); } + + public Flux getEksistererPerson(Set identer, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> new GetEksistererPersonCommand(webClient, identer, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(resultat -> log.info("Get eksisterende resultat {}", resultat)); + } + + public Flux getPersondata(String ident, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> new GetPersondataCommand(webClient, ident, miljoer, accessToken.getTokenValue()).call()); + } + + public Flux getAdressehistorikk(String ident, LocalDate aksjonsdato, Set miljoer) { + + return getAdressehistorikk(AdressehistorikkRequest.builder() + .ident(ident) + .aksjonsdato(aksjonsdato) + .build(), + miljoer); + } + + public Flux getAdressehistorikk(AdressehistorikkRequest request, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMapMany(accessToken -> + new GetAdressehistorikkCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Adressehistorikk mottatt: {}", response)); + } + + public Mono sendKansellerDoedsmelding(PersonDTO person, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendKansellerDoedsmeldingCommand(webClient, person, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for kanseller dødsmelding {}", response)); + } + + public Mono sendDoedsmelding(DoedsmeldingRequest request, Set miljoer) { + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendDoedsmeldingCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for dødsmelding {}", response)); + } + + public Mono sendFoedselsmelding(FoedselsmeldingRequest request, Set miljoer) { + + log.info("Sender fødselsmelding til miljøer {} {}", miljoer, request); + + return accessTokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new SendFoedselsmeldingCommand(webClient, request, miljoer, accessToken.getTokenValue()).call()) + .doOnNext(response -> log.info("Mottatt status for fødselsmelding {}", response)); + } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java new file mode 100644 index 00000000000..6953946a4e8 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GenererNavnServiceCommand.java @@ -0,0 +1,38 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GenererNavnServiceCommand implements Callable> { + + private static final String NAVN_URL = "/api/v1/navn"; + + private final WebClient webClient; + private final Integer antall; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(NAVN_URL).queryParam("antall", antall).build()) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(NavnDTO.class) + .doOnError(WebClientFilter::logErrorMessage) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)); + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java new file mode 100644 index 00000000000..8b4c950049a --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetAdressehistorikkCommand.java @@ -0,0 +1,44 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetAdressehistorikkCommand implements Callable> { + + private static final String ADRESSE_HIST_URL = "/api/v1/personer/adressehistorikk"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final AdressehistorikkRequest request; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .post() + .uri(builder -> builder.path(ADRESSE_HIST_URL) + .queryParam(MILJOER, miljoer) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromValue(request)) + .retrieve() + .bodyToFlux(AdressehistorikkDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} 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 new file mode 100644 index 00000000000..b569e68923e --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetEksistererPersonCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetEksistererPersonCommand implements Callable> { + + private static final String PERSON_DATA_URL = "/api/v1/identer"; + private static final String MILJOER = "miljoer"; + private static final String IDENTER = "identer"; + + private static final String INCLUDE_PROD = "includeProd"; + + private final WebClient webClient; + private final Set identer; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(PERSON_DATA_URL) + .queryParam(IDENTER, identer) + .queryParamIfPresent(MILJOER, Optional.ofNullable(miljoer)) + .queryParam(INCLUDE_PROD, true) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(IdentMiljoeDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} 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/GetPersondataCommand.java new file mode 100644 index 00000000000..63c7c8dd37c --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/GetPersondataCommand.java @@ -0,0 +1,41 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class GetPersondataCommand implements Callable> { + + private static final String PERSON_DATA_URL = "/api/v1/personer/{ident}"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final String ident; + private final Set miljoer; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(PERSON_DATA_URL) + .queryParam(MILJOER, miljoer) + .build(ident)) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(PersonMiljoeDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java new file mode 100644 index 00000000000..5e682ab1bfa --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/IdentpoolPostCommand.java @@ -0,0 +1,46 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class IdentpoolPostCommand implements Callable>> { + + private static final String ACQUIRE_IDENTS_URL = "/api/v1/identifikator"; + + private final WebClient webClient; + private final HentIdenterRequest body; + private final String token; + + @Override + public Mono> call() { + return webClient + .post() + .uri(builder -> builder.path(ACQUIRE_IDENTS_URL).build()) + .body(BodyInserters.fromValue(body)) + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToMono(String[].class) + .map(Arrays::asList) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException) + .onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> + new InternalError("Identpool: antall repeterende forsøk nådd"))) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java index 34739353b95..9ef9c0bd681 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingCommand.java @@ -1,47 +1,44 @@ package no.nav.testnav.endringsmeldingservice.consumer.command; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; -import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; import org.springframework.http.HttpHeaders; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Set; import java.util.concurrent.Callable; -@Slf4j @RequiredArgsConstructor -public class SendDoedsmeldingCommand implements Callable> { +public class SendDoedsmeldingCommand implements Callable> { + + private static final String DOEDSMELDING_URL = "/api/v1/personer/doedsmelding"; + private static final String MILJOER = "miljoer"; + private final WebClient webClient; - private final DoedsmeldingDTO dto; + private final DoedsmeldingRequest request; + private final Set miljoer; private final String token; @Override - public Mono call() { + public Mono call() { + return webClient .post() - .uri("/api/v1/tpsmelding/doedsmelding") + .uri(builder -> builder.path(DOEDSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .body(BodyInserters.fromPublisher(Mono.just(dto), DoedsmeldingDTO.class)) + .body(BodyInserters.fromValue(request)) .retrieve() - .bodyToMono(EndringsmeldingResponse.class) + .bodyToMono(DoedsmeldingResponse.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) - .doOnError(error -> { - if (error instanceof WebClientResponseException) { - log.error( - "Feil ved innsendelse av dødsmelding. Feilmelding: {}.", - ((WebClientResponseException) error).getResponseBodyAsString() - ); - } else { - log.error("Feil ved innsendelse av dødsmelding.", error); - } - }); + .doOnError(WebClientFilter::logErrorMessage); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java new file mode 100644 index 00000000000..ef314c3f595 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendDoedsmeldingOldCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.dto.DoedsmeldingDTO; +import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class SendDoedsmeldingOldCommand implements Callable> { + private final WebClient webClient; + private final DoedsmeldingDTO dto; + private final String token; + + @Override + public Mono call() { + return webClient + .post() + .uri("/api/v1/tpsmelding/doedsmelding") + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromPublisher(Mono.just(dto), DoedsmeldingDTO.class)) + .retrieve() + .bodyToMono(EndringsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(error -> { + if (error instanceof WebClientResponseException) { + log.error( + "Feil ved innsendelse av dødsmelding. Feilmelding: {}.", + ((WebClientResponseException) error).getResponseBodyAsString() + ); + } else { + log.error("Feil ved innsendelse av dødsmelding.", error); + } + }); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java index 96a95f5a0c6..abb2d14229a 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingCommand.java @@ -1,47 +1,44 @@ package no.nav.testnav.endringsmeldingservice.consumer.command; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; -import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; import org.springframework.http.HttpHeaders; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Set; import java.util.concurrent.Callable; -@Slf4j @RequiredArgsConstructor -public class SendFoedselsmeldingCommand implements Callable> { +public class SendFoedselsmeldingCommand implements Callable> { + + private static final String FOEDSELSMELDING_URL = "/api/v1/personer/foedselsmelding"; + private static final String MILJOER = "miljoer"; + private final WebClient webClient; private final FoedselsmeldingRequest request; + private final Set miljoer; private final String token; @Override - public Mono call() { + public Mono call() { + return webClient .post() - .uri("/api/v1/tpsmelding/foedselsmelding") + .uri(builder -> builder.path(FOEDSELSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .body(BodyInserters.fromPublisher(Mono.just(request), FoedselsmeldingRequest.class)) + .body(BodyInserters.fromValue(request)) .retrieve() - .bodyToMono(EndringsmeldingResponse.class) + .bodyToMono(FoedselsmeldingResponse.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) - .doOnError(error -> { - if (error instanceof WebClientResponseException) { - log.error( - "Feil ved innsendelse av fødseslmelding. Feilmelding: {}.", - ((WebClientResponseException) error).getResponseBodyAsString() - ); - } else { - log.error("Feil ved innsendelse av fødseslmelding.", error); - } - }); + .doOnError(WebClientFilter::logErrorMessage); } } diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java new file mode 100644 index 00000000000..3ca70f1e1c2 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendFoedselsmeldingOldCommand.java @@ -0,0 +1,47 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.request.FoedselsmeldingRequest; +import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@Slf4j +@RequiredArgsConstructor +public class SendFoedselsmeldingOldCommand implements Callable> { + private final WebClient webClient; + private final FoedselsmeldingRequest request; + private final String token; + + @Override + public Mono call() { + return webClient + .post() + .uri("/api/v1/tpsmelding/foedselsmelding") + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromPublisher(Mono.just(request), FoedselsmeldingRequest.class)) + .retrieve() + .bodyToMono(EndringsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(error -> { + if (error instanceof WebClientResponseException) { + log.error( + "Feil ved innsendelse av fødseslmelding. Feilmelding: {}.", + ((WebClientResponseException) error).getResponseBodyAsString() + ); + } else { + log.error("Feil ved innsendelse av fødseslmelding.", error); + } + }); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java new file mode 100644 index 00000000000..7e446f23ced --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/SendKansellerDoedsmeldingCommand.java @@ -0,0 +1,45 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.web.reactive.function.BodyInserters; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.Set; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class SendKansellerDoedsmeldingCommand implements Callable> { + + private static final String DOEDSMELDING_URL = "/api/v1/personer/doedsmelding"; + private static final String MILJOER = "miljoer"; + + private final WebClient webClient; + private final PersonDTO person; + private final Set miljoer; + private final String token; + + @Override + public Mono call() { + + return webClient + .method(HttpMethod.DELETE) + .uri(builder -> builder.path(DOEDSMELDING_URL) + .queryParam(MILJOER, miljoer) + .build()) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .body(BodyInserters.fromValue(person)) + .retrieve() + .bodyToMono(DoedsmeldingResponse.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .doOnError(WebClientFilter::logErrorMessage); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java new file mode 100644 index 00000000000..3702d40ba65 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/command/VegadresseServiceCommand.java @@ -0,0 +1,56 @@ +package no.nav.testnav.endringsmeldingservice.consumer.command; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +@RequiredArgsConstructor +public class VegadresseServiceCommand implements Callable> { + + private static final String ADRESSER_VEG_URL = "/api/v1/adresser/veg"; + + private final WebClient webClient; + private final String token; + + @Override + public Flux call() { + + return webClient + .get() + .uri(builder -> builder.path(ADRESSER_VEG_URL).build()) + .header("antall", "1") + .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .retrieve() + .bodyToFlux(VegadresseDTO.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .onErrorResume(throwable -> throwable instanceof WebClientResponseException.NotFound || + throwable instanceof WebClientResponseException.BadRequest || + Exceptions.isRetryExhausted(throwable), + throwable -> Mono.just(defaultAdresse())); + } + + public static VegadresseDTO defaultAdresse() { + + return VegadresseDTO.builder() + .matrikkelId("285693617") + .adressenavn("FYRSTIKKALLÉEN") + .postnummer("0661") + .husnummer(2) + .kommunenummer("0301") + .poststed("Oslo") + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java new file mode 100644 index 00000000000..0e0f5df9eea --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/consumer/dto/HentIdenterRequest.java @@ -0,0 +1,37 @@ +package no.nav.testnav.endringsmeldingservice.consumer.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import jakarta.validation.constraints.NotNull; +import java.time.LocalDate; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class HentIdenterRequest { + + private Identtype identtype; + private LocalDate foedtEtter; + private LocalDate foedtFoer; + private Kjoenn kjoenn; + + @NotNull + private int antall; + private String rekvirertAv; + private Boolean syntetisk; + + public enum Identtype { + FNR, + DNR, + BOST + } + + public enum Kjoenn { + KVINNE, + MANN + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java new file mode 100644 index 00000000000..a07b93a17d4 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/controller/SkdEndringsmeldingerController.java @@ -0,0 +1,52 @@ +package no.nav.testnav.endringsmeldingservice.controller; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.endringsmeldingservice.service.DoedsmeldingService; +import no.nav.testnav.endringsmeldingservice.service.FoedselsmeldingService; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingResponseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingResponseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.KansellerDoedsmeldingDTO; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Mono; + +import java.util.Set; + +@RestController +@RequestMapping("/api/v2/endringsmelding") +@RequiredArgsConstructor +public class SkdEndringsmeldingerController { + + private final FoedselsmeldingService foedselsmeldingService; + private final DoedsmeldingService doedsmeldingService; + + @PostMapping("/foedselsmelding") + public Mono sendFoedselsmelding( + @RequestHeader Set miljoer, + @RequestBody FoedselsmeldingDTO dto) { + + return foedselsmeldingService.sendFoedselsmelding(dto, miljoer); + } + + @PostMapping("/doedsmelding") + public Mono sendDoedsmelding( + @RequestHeader Set miljoer, + @RequestBody DoedsmeldingDTO doedsmelding) { + + return doedsmeldingService.sendDoedsmelding(doedsmelding, miljoer); + } + + @DeleteMapping("/doedsmelding") + public Mono kansellerDoedsmelding( + @RequestHeader Set miljoer, + @RequestBody KansellerDoedsmeldingDTO kansellerDoedsmelding) { + + return doedsmeldingService.sendKansellerDoedsmelding(kansellerDoedsmelding.getIdent(), miljoer); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java new file mode 100644 index 00000000000..7d7c8ebb28f --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/AdressehistorikkMapper.java @@ -0,0 +1,115 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +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.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.MatrikkeladresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PostadresseDTO; + +import java.time.LocalDate; + +@UtilityClass +public class AdressehistorikkMapper { + + public static PersonDTO mapHistorikk(AdressehistorikkDTO.PersonData person) { + + return PersonDTO.builder() + .ident(person.getIdent()) + .identtype(person.getIdentType()) + .boadresse(mapBoadresse(person)) + .postadresse(person.getPostAdresse().stream() + .map(postadresse -> PostadresseDTO.builder() + .postLinje1(postadresse.getAdresse1()) + .postLinje2(postadresse.getAdresse2()) + .postLinje3(postadresse.getAdresse3()) + .postLand(postadresse.getLand()) + .build() + ) + .findFirst() + .orElse(null) + ) + .build(); + } + + public static AdresseDTO mapBoadresse(AdressehistorikkDTO.PersonData person) { + + return (AdresseDTO) person.getBostedsAdresse().stream() + .map(boadresse -> { + + if ("OFFA".equals(boadresse.getAdresseType())) { + return GateadresseDTO.builder() + .gatekode(boadresse.getOffAdresse().getGatekode()) + .adresse(boadresse.getOffAdresse().getGateNavn()) + .husnummer(boadresse.getOffAdresse().getHusnr()) + .husbokstav(boadresse.getOffAdresse().getBokstav()) + .bolignr(boadresse.getBolignr()) + .flyttedato(boadresse.getDatoFom().atStartOfDay()) + .postnr(boadresse.getPostnr()) + .kommunenr(boadresse.getKommunenr()) + .tilleggsadresse(boadresse.getTilleggsAdresseSKD()) + .build(); + } else { + + return MatrikkeladresseDTO.builder() + .mellomnavn(boadresse.getMatrAdresse().getMellomAdresse()) + .gardsnr(boadresse.getMatrAdresse().getGardsnr()) + .bruksnr(boadresse.getMatrAdresse().getBruksnr()) + .festenr(boadresse.getMatrAdresse().getFestenr()) + .undernr(boadresse.getMatrAdresse().getUndernr()) + .bolignr(boadresse.getBolignr()) + .flyttedato(boadresse.getDatoFom().atStartOfDay()) + .postnr(boadresse.getPostnr()) + .kommunenr(boadresse.getKommunenr()) + .tilleggsadresse(boadresse.getTilleggsAdresseSKD()); + } + }) + .findFirst() + .orElse(null); + } + + public static PostadresseDTO mapPostBoadresse(AdressehistorikkDTO.PersonData person) { + + return (PostadresseDTO) person.getBostedsAdresse().stream() + .map(boadresse -> { + + if ("OFFA".equals(boadresse.getAdresseType())) { + return PostadresseDTO.builder() + .postLinje1("%s %s%s".formatted(boadresse.getOffAdresse().getGateNavn(), + boadresse.getOffAdresse().getHusnr(), + boadresse.getOffAdresse().getBokstav())) + .postLinje2("%s %s".formatted(boadresse.getPostnr(), boadresse.getPoststed())) + .postLand("NOR") + .build(); + } else { + + return PostadresseDTO.builder() + .postLinje1("Gardsnummer: " + boadresse.getMatrAdresse().getGardsnr()) + .postLinje2("Bruksnummer: " + boadresse.getMatrAdresse().getBruksnr()) + .postLinje3("Kommunenummer: " + boadresse.getKommunenr()) + .postLand("NOR"); + } + }) + .findFirst() + .orElse(null); + } + + public static AdressehistorikkRequest buildAdresseRequest(PersonMiljoeDTO person) { + + return AdressehistorikkRequest.builder() + .ident(person.getIdent()) + .aksjonsdato(person.getPerson().getDoedsdato().toLocalDate().minusDays(1)) + .build(); + } + + public static AdressehistorikkRequest buildAdresseRequest(String ident, LocalDate aksjonsdato) { + + return AdressehistorikkRequest.builder() + .ident(ident) + .aksjonsdato(aksjonsdato) + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java new file mode 100644 index 00000000000..175dbbd4ea8 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/FoedselsmeldingRequestMapper.java @@ -0,0 +1,112 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.endringsmeldingservice.utility.KjoennFraIdentUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PostadresseDTO; +import no.nav.testnav.libs.dto.adresseservice.v1.VegadresseDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; +import reactor.util.function.Tuple5; + +import java.util.List; +import java.util.Objects; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.mapBoadresse; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.mapPostBoadresse; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@UtilityClass +public class FoedselsmeldingRequestMapper { + + public static FoedselsmeldingRequest map(FoedselsmeldingDTO foedselsmelding, Tuple5, List, List, + List, List> opplysninger) { + + return FoedselsmeldingRequest.builder() + .barn(PersonDTO.builder() + .ident(opplysninger.getT1().getFirst()) + .identtype(foedselsmelding.getIdenttype().name()) + .fornavn(opplysninger.getT2().getFirst().getAdjektiv()) + .mellomnavn(opplysninger.getT2().getFirst().getAdverb()) + .etternavn(opplysninger.getT2().getFirst().getSubstantiv()) + .boadresse(mapAdresse(foedselsmelding, opplysninger.getT3(), opplysninger.getT4(), opplysninger.getT5())) + .postadresse(mapPostadresse(foedselsmelding, opplysninger.getT3(), opplysninger.getT4(), opplysninger.getT5())) + .kjonn(KjoennFraIdentUtility.get(opplysninger.getT1().getFirst())) + .build()) + .mor(PersonDTO.builder() + .ident(foedselsmelding.getIdentMor()) + .build()) + .far(isNotBlank(foedselsmelding.getIdentFar()) ? + PersonDTO.builder() + .ident(foedselsmelding.getIdentFar()) + .build() : null) + .build(); + } + + private static PostadresseDTO mapPostadresse(FoedselsmeldingDTO foedselsmelding, List vegadresse, + List morsadresser, List farsadresser) { + + if (isNull(foedselsmelding.getAdresseFra())) { + return mapPostadresse(vegadresse.getFirst()); + } + + return switch (foedselsmelding.getAdresseFra()) { + + case LAG_NY_ADRESSE -> mapPostadresse(vegadresse.getFirst()); + case ARV_FRA_MORS -> mapPostBoadresse(morsadresser.getFirst().getPersondata()); + case ARV_FRA_FARS -> nonNull(farsadresser) && !farsadresser.isEmpty() && + nonNull(farsadresser.getFirst().getPersondata()) ? + mapPostBoadresse(farsadresser.getFirst().getPersondata()) : + mapPostadresse(vegadresse.getFirst()); + }; + } + + private static AdresseDTO mapAdresse(FoedselsmeldingDTO foedselsmelding, List vegadresse, + List morsadresser, List farsadresser) { + + if (isNull(foedselsmelding.getAdresseFra())) { + return mapAdresse(vegadresse.getFirst()); + } + + return switch (foedselsmelding.getAdresseFra()) { + + case LAG_NY_ADRESSE -> mapAdresse(vegadresse.getFirst()); + case ARV_FRA_MORS -> mapBoadresse(morsadresser.getFirst().getPersondata()); + case ARV_FRA_FARS -> nonNull(farsadresser) && !farsadresser.isEmpty() && + nonNull(farsadresser.getFirst().getPersondata()) ? + mapBoadresse(farsadresser.getFirst().getPersondata()) : + mapAdresse(vegadresse.getFirst()); + }; + } + + private static AdresseDTO mapAdresse(VegadresseDTO vegadresse) { + + return GateadresseDTO.builder() + .adresse(vegadresse.getAdressenavn()) + .gatekode(vegadresse.getAdressekode()) + .husnummer(vegadresse.getHusnummer().toString()) + .husbokstav(vegadresse.getHusbokstav()) + .postnr(vegadresse.getPostnummer()) + .poststed(vegadresse.getPoststed()) + .kommunenr(vegadresse.getKommunenummer()) + .kommuneNavn(vegadresse.getKommunenavn()) + .tilleggsadresse(vegadresse.getTilleggsnavn()) + .build(); + } + + private static PostadresseDTO mapPostadresse(VegadresseDTO vegadresse) { + + return PostadresseDTO.builder() + .postLinje1("%s %s%s".formatted(vegadresse.getAdressenavn(), vegadresse.getHusnummer().toString(), + Objects.toString(vegadresse.getHusbokstav(), ""))) + .postLinje2("%s %s".formatted(vegadresse.getPostnummer(), vegadresse.getPoststed())) + .postLand("NOR") + .build(); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java new file mode 100644 index 00000000000..f5f049a7dbb --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/mapper/IdentpoolRequestMapper.java @@ -0,0 +1,44 @@ +package no.nav.testnav.endringsmeldingservice.mapper; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest; +import no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Identtype; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.Kjoenn; + +import java.security.SecureRandom; +import java.util.Random; + +import static java.util.Objects.isNull; +import static no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Kjoenn.KVINNE; +import static no.nav.testnav.endringsmeldingservice.consumer.dto.HentIdenterRequest.Kjoenn.MANN; + +@UtilityClass +public class IdentpoolRequestMapper { + + private static final Random random = new SecureRandom(); + + public HentIdenterRequest convert(FoedselsmeldingDTO fodselsmelding) { + + return HentIdenterRequest.builder() + .identtype(Identtype.valueOf(fodselsmelding.getIdenttype().name())) + .foedtFoer(fodselsmelding.getFoedselsdato()) + .foedtEtter(fodselsmelding.getFoedselsdato()) + .kjoenn(convertKjoenn(fodselsmelding.getKjoenn())) + .rekvirertAv("TEMS") // testnav-endringsmelding-service + .antall(1) + .build(); + } + private HentIdenterRequest.Kjoenn convertKjoenn(Kjoenn kjoenn) { + + if (isNull(kjoenn)) { + return random.nextBoolean() ? MANN : KVINNE; + } + + return switch (kjoenn) { + case GUTT -> MANN; + case JENTE -> KVINNE; + case UKJENT -> random.nextBoolean() ? MANN : KVINNE; + }; + } +} 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 new file mode 100644 index 00000000000..85c1ec1ae02 --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/DoedsmeldingService.java @@ -0,0 +1,165 @@ +package no.nav.testnav.endringsmeldingservice.service; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.endringsmeldingservice.consumer.TpsMessagingConsumer; +import no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.IdentMiljoeDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.DoedsmeldingResponseDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import static java.util.Objects.isNull; +import static no.nav.testnav.endringsmeldingservice.mapper.AdressehistorikkMapper.buildAdresseRequest; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Service +@RequiredArgsConstructor +public class DoedsmeldingService { + + private final TpsMessagingConsumer tpsMessagingConsumer; + + public Mono sendDoedsmelding(DoedsmeldingDTO doedsmelding, Set miljoer) { + + if (isNotBlank(validate(doedsmelding))) { + + return Mono.just(DoedsmeldingResponseDTO.builder() + .error(validate(doedsmelding)) + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(Set.of(doedsmelding.getIdent()), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return getDoedsmeldingResponseDTO(miljoer, resultater); + + } else { + + return tpsMessagingConsumer.getPersondata(doedsmelding.getIdent(), miljoer) + .filter(PersonMiljoeDTO::isOk) + .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()))) + .flatMap(response -> tpsMessagingConsumer.sendDoedsmelding(DoedsmeldingRequest.builder() + .ident(doedsmelding.getIdent()) + .doedsdato(doedsmelding.getDoedsdato()) + .build(), Set.of(persondata.getMiljoe()))); + + } else { + return tpsMessagingConsumer.sendDoedsmelding(DoedsmeldingRequest.builder() + .ident(doedsmelding.getIdent()) + .doedsdato(doedsmelding.getDoedsdato()) + .build(), Set.of(persondata.getMiljoe())); + + } + }) + .map(DoedsmeldingResponse::getMiljoStatus) + .reduce((firstMap, secondMap) -> { + firstMap.putAll(secondMap); + return firstMap; + }) + .map(status -> DoedsmeldingResponseDTO.builder() + .ident(doedsmelding.getIdent()) + .miljoStatus(status) + .build()); + } + }); + } + + private static Mono getDoedsmeldingResponseDTO(Set miljoer, List resultater) { + + return resultater.stream() + .filter(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer)) + .map(resultat -> + Mono.just(DoedsmeldingResponseDTO.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( + resultat.getIdent(), miljoer)) + .build())) + .findFirst() + .orElseThrow(() -> new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Feilet å dekode identstatus")); + } + + public Mono sendKansellerDoedsmelding(String ident, Set miljoer) { + + if (isBlank(ident)) { + + return Mono.just(DoedsmeldingResponseDTO.builder() + .error("FEIL: ident mangler") + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(Set.of(ident), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return getDoedsmeldingResponseDTO(miljoer, resultater); + + } else { + + return tpsMessagingConsumer.getPersondata(ident, miljoer) + .filter(PersonMiljoeDTO::isOk) + .filter(persondata -> persondata.getPerson().isDoed()) + .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()); + } + }); + } + + private static String validate(DoedsmeldingDTO doedsmelding) { + + if (isBlank(doedsmelding.getIdent())) { + return "FEIL: ident mangler"; + + } else if (isNull(doedsmelding.getDoedsdato())) { + return "FEIL: dødsdato mangler"; + + } + return null; + } +} 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 new file mode 100644 index 00000000000..4d937a0048c --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/service/FoedselsmeldingService.java @@ -0,0 +1,113 @@ +package no.nav.testnav.endringsmeldingservice.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.endringsmeldingservice.consumer.AdresseServiceConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.GenererNavnServiceConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.IdentPoolConsumer; +import no.nav.testnav.endringsmeldingservice.consumer.TpsMessagingConsumer; +import no.nav.testnav.endringsmeldingservice.mapper.FoedselsmeldingRequestMapper; +import no.nav.testnav.endringsmeldingservice.mapper.IdentpoolRequestMapper; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingDTO; +import no.nav.testnav.libs.dto.endringsmelding.v2.FoedselsmeldingResponseDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static java.util.Objects.isNull; +import static org.apache.commons.lang3.StringUtils.isBlank; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Slf4j +@Service +@RequiredArgsConstructor +public class FoedselsmeldingService { + + private final IdentPoolConsumer identPoolConsumer; + private final GenererNavnServiceConsumer genererNavnServiceConsumer; + private final AdresseServiceConsumer adresseServiceConsumer; + private final TpsMessagingConsumer tpsMessagingConsumer; + + public Mono sendFoedselsmelding(FoedselsmeldingDTO request, Set miljoer) { + + if (isNotBlank(validate(request))) { + + return Mono.just(FoedselsmeldingResponseDTO.builder() + .error(validate(request)) + .build()); + } + + return tpsMessagingConsumer.getEksistererPerson(getForeldre(request), miljoer) + .collectList() + .flatMap(resultater -> { + + if (resultater.stream() + .anyMatch(resultat -> resultat.getMiljoer().contains("p") || + !resultat.getMiljoer().containsAll(miljoer))) { + + return resultater.stream() + .filter(resultat -> resultat.getMiljoer().contains("p") || + !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( + resultat.getIdent(), miljoer)) + .build())) + .findFirst() + .orElseThrow(() -> new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Feilet å dekode identstatus")); + + } else { + return Mono.zip(identPoolConsumer.acquireIdents( + IdentpoolRequestMapper.convert(request)), + genererNavnServiceConsumer.getNavn(), + adresseServiceConsumer.getVegadresse(), + tpsMessagingConsumer.getAdressehistorikk(request.getIdentMor(), request.getFoedselsdato(), miljoer).collectList(), + isBlank(request.getIdentFar()) ? Mono.just(Collections.emptyList()) : + tpsMessagingConsumer.getAdressehistorikk(request.getIdentFar(), request.getFoedselsdato(), miljoer).collectList()) + .flatMap(opplysninger -> Mono.just(FoedselsmeldingRequestMapper.map(request, opplysninger)) + .flatMap(foedselsmelding -> tpsMessagingConsumer.sendFoedselsmelding(foedselsmelding, + opplysninger.getT4().stream().map(AdressehistorikkDTO::getMiljoe).collect(Collectors.toSet())))) + .map(response -> FoedselsmeldingResponseDTO.builder() + .ident(response.getIdent()) + .miljoStatus(response.getMiljoStatus()) + .build()); + } + }); + } + + private static String validate(FoedselsmeldingDTO request) { + + if (isBlank(request.getIdentMor())) { + return "FEIL: mors ident mangler"; + + } else if (isNull(request.getFoedselsdato())) { + return "FEIL: fødselsdato mangler"; + + } else if (isNull(request.getIdenttype())) { + return "FEIL: identtype mangler"; + + } else return null; + } + + private static Set getForeldre(FoedselsmeldingDTO request) { + + return Stream.of(List.of(request.getIdentMor()), + isNotBlank(request.getIdentFar()) ? List.of(request.getIdentFar()) : Collections.emptyList()) + .flatMap(Collection::stream) + .collect(Collectors.toSet()); + } +} diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java new file mode 100644 index 00000000000..7876fef778e --- /dev/null +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/utility/KjoennFraIdentUtility.java @@ -0,0 +1,15 @@ +package no.nav.testnav.endringsmeldingservice.utility; + +import lombok.experimental.UtilityClass; + +import static java.lang.Integer.parseInt; + +@UtilityClass +public class KjoennFraIdentUtility { + + public String get(String ident){ + + int kjoennNummer = parseInt(ident.substring(8,9)); + return kjoennNummer % 2 == 0 ? "K" : "M"; + } +} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application-dev.yml b/apps/endringsmelding-service/src/main/resources/application-dev.yml new file mode 100644 index 00000000000..749d6f813ed --- /dev/null +++ b/apps/endringsmelding-service/src/main/resources/application-dev.yml @@ -0,0 +1,10 @@ + +consumers: + adresse-service: + url: https://testnav-adresse-service.intern.dev.nav.no + generer-navn-service: + url: https://generer-navn-service.intern.dev.nav.no + ident-pool: + url: https://testnav-ident-pool.intern.dev.nav.no + tps-messaging-service: + url: https://testnav-tps-messaging-service.intern.dev.nav.no \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application-prod.yml b/apps/endringsmelding-service/src/main/resources/application-prod.yml new file mode 100644 index 00000000000..894f2d09e4e --- /dev/null +++ b/apps/endringsmelding-service/src/main/resources/application-prod.yml @@ -0,0 +1,9 @@ + +spring: + security: + oauth2: + resourceserver: + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/resources/application.yml b/apps/endringsmelding-service/src/main/resources/application.yml index 40398f5dfe6..6b234af6b85 100644 --- a/apps/endringsmelding-service/src/main/resources/application.yml +++ b/apps/endringsmelding-service/src/main/resources/application.yml @@ -12,10 +12,6 @@ spring: issuer-uri: ${AAD_ISSUER_URI}/v2.0 jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} - tokenx: - issuer-uri: ${TOKEN_X_ISSUER} - jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${TOKEN_X_CLIENT_ID} springdoc: swagger-ui: @@ -33,6 +29,21 @@ consumers: cluster: dev-gcp namespace: dolly name: testnav-tps-messaging-service + ident-pool: + url: http://testnav-ident-pool.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: testnav-ident-pool + adresse-service: + url: http://testnav-adresse-service.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: testnav-adresse-service + generer-navn-service: + url: http://generer-navn-service.dolly.svc.cluster.local + cluster: dev-gcp + namespace: dolly + name: generer-navn-service management: endpoints: diff --git a/apps/generer-navn-service/config.yml b/apps/generer-navn-service/config.yml index 2e2ad5598d3..62df6e2fd25 100644 --- a/apps/generer-navn-service/config.yml +++ b/apps/generer-navn-service/config.yml @@ -39,6 +39,8 @@ spec: cluster: dev-gcp - application: testnav-budpro-service cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp tokenx: enabled: true azure: diff --git a/apps/testnav-ident-pool/config.yml b/apps/testnav-ident-pool/config.yml index 64c3d600750..db7359ec9db 100644 --- a/apps/testnav-ident-pool/config.yml +++ b/apps/testnav-ident-pool/config.yml @@ -61,6 +61,8 @@ spec: - application: app-1 namespace: plattformsikkerhet cluster: dev-gcp + - application: testnav-endringsmelding-service + cluster: dev-gcp outbound: rules: - application: testnav-tps-messaging-service diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 5486d73e8e8..88d48546719 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -81,7 +81,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' - implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.2.1' @@ -96,6 +95,7 @@ dependencies { implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-s610-domain:2020.08.27-09.53-183ead3d81eb' implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-m201-domain:2020.08.27-09.53-183ead3d81eb' + implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-castor-tps-s018-domain:2020.08.27-09.53-183ead3d81eb' implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'ma.glasnost.orika:orika-core:1.5.4' diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java index 224fc7b82c2..12fdadf32c2 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/MapperFacadeConfig.java @@ -1,10 +1,9 @@ package no.nav.testnav.apps.tpsmessagingservice.config; -import lombok.RequiredArgsConstructor; +import ma.glasnost.orika.CustomConverter; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.impl.DefaultMapperFactory; import no.nav.testnav.apps.tpsmessagingservice.mapper.MappingStrategy; - import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -13,19 +12,24 @@ import static java.util.Objects.nonNull; @Configuration -@RequiredArgsConstructor public class MapperFacadeConfig { - private final List mappingStrategies; - @Bean - MapperFacade mapperFacade() { + MapperFacade mapperFacade(List mappingStrategies, List customConverters) { DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build(); if (nonNull(mappingStrategies)) { - mappingStrategies.forEach(mapper -> mapper.register(mapperFactory)); + for (MappingStrategy mapper : mappingStrategies) { + mapper.register(mapperFactory); + } + } + + if (nonNull(customConverters)) { + for (CustomConverter converter : customConverters) { + mapperFactory.getConverterFactory().registerConverter(converter); + } } return mapperFactory.getMapperFacade(); } -} +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java index c4b6fa2bea8..2337605971b 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TestmiljoerServiceConsumer.java @@ -8,13 +8,14 @@ import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; -import java.util.Arrays; import java.util.List; +import java.util.stream.Stream; @Slf4j @Service public class TestmiljoerServiceConsumer { + private final static List EXTRA_ENV = List.of("q5"); private final WebClient webClient; private final ServerProperties serverProperties; private final TokenExchange tokenExchange; @@ -33,8 +34,10 @@ public TestmiljoerServiceConsumer( public List getMiljoer() { - return Arrays.asList(tokenExchange.exchange(serverProperties) + return tokenExchange.exchange(serverProperties) .flatMap(token -> new TestmiljoerServiceCommand(webClient, token.getTokenValue()).call()) - .block()); + .map(miljoer -> Stream.concat(miljoer.stream(), EXTRA_ENV.stream()) + .toList()) + .block(); } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java index c72482156b9..0b46187871f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/TpsConsumer.java @@ -1,5 +1,6 @@ package no.nav.testnav.apps.tpsmessagingservice.consumer; +import jakarta.xml.bind.JAXBException; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -11,7 +12,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import jakarta.xml.bind.JAXBException; import java.util.List; import java.util.Map; import java.util.Objects; diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java index 54c28f0d3bc..109be41e979 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TestmiljoerServiceCommand.java @@ -8,10 +8,12 @@ import reactor.util.retry.Retry; import java.time.Duration; +import java.util.Arrays; +import java.util.List; import java.util.concurrent.Callable; @RequiredArgsConstructor -public class TestmiljoerServiceCommand implements Callable> { +public class TestmiljoerServiceCommand implements Callable>> { private static final String MILJOER_URL = "/api/v1/miljoer"; @@ -19,13 +21,14 @@ public class TestmiljoerServiceCommand implements Callable> { private final String token; @Override - public Mono call() { + public Mono> call() { return webClient.get() .uri(builder -> builder.path(MILJOER_URL).build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() .bodyToMono(String[].class) + .map(Arrays::asList) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) .cache(Duration.ofSeconds(10)); diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java index 4a3544ce01c..9a48e690386 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/consumer/command/TpsMeldingCommand.java @@ -1,7 +1,6 @@ package no.nav.testnav.apps.tpsmessagingservice.consumer.command; import com.ibm.mq.jakarta.jms.MQQueue; -import com.ibm.mq.jmqi.JmqiException; import com.ibm.msg.client.jakarta.wmq.compat.jms.internal.JMSC; import jakarta.jms.Connection; import jakarta.jms.ConnectionFactory; @@ -33,7 +32,7 @@ public class TpsMeldingCommand implements Callable { private final String password; private final String requestMessageContent; - public String call() throws JMSException, JmqiException { + public String call() throws JMSException { try (Connection connection = connectionFactory.createConnection(username, password)) { connection.start(); diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java new file mode 100644 index 00000000000..cedc3a6ee61 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsRequest.java @@ -0,0 +1,4 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +public interface TpsRequest { +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java deleted file mode 100644 index c6901b839c5..00000000000 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServiceRutine.java +++ /dev/null @@ -1,21 +0,0 @@ -package no.nav.testnav.apps.tpsmessagingservice.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import jakarta.xml.bind.annotation.XmlType; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsKode", "aksjonsKode2"}) -public class TpsServiceRutine { - - private String serviceRutinenavn; - private String fnr; - private String aksjonsKode; - private String aksjonsKode2; -} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java new file mode 100644 index 00000000000..834df522540 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineAksjonsdatoRequest.java @@ -0,0 +1,35 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@XmlRootElement(name = "tpsPersonData") +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class TpsServicerutineAksjonsdatoRequest implements TpsRequest { + + private TpsServiceRutineMedAksjonsdato tpsServiceRutine; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsDato", "aksjonsKode", "aksjonsKode2", "buffNr"}) + public static class TpsServiceRutineMedAksjonsdato { + + private String serviceRutinenavn; + private String fnr; + private String aksjonsDato; + private String aksjonsKode; + private String aksjonsKode2; + private String buffNr; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java index e0d4bf2febb..ec19307221e 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineM201Response.java @@ -4,14 +4,14 @@ import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import no.nav.tps.ctg.m201.domain.TpsServiceRutineType; -import jakarta.xml.bind.annotation.XmlRootElement; -import jakarta.xml.bind.annotation.XmlType; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -89,4 +89,4 @@ public static class EFnr { private String en; private TpsMeldingResponse svarStatus; } -} +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java index 4a9f69f5fe5..43d28e21fd8 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineRequest.java @@ -1,20 +1,33 @@ package no.nav.testnav.apps.tpsmessagingservice.dto; import com.fasterxml.jackson.annotation.JsonInclude; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import jakarta.xml.bind.annotation.XmlRootElement; - @Data @Builder @NoArgsConstructor @AllArgsConstructor @XmlRootElement(name = "tpsPersonData") @JsonInclude(JsonInclude.Include.NON_EMPTY) -public class TpsServicerutineRequest { +public class TpsServicerutineRequest implements TpsRequest { private TpsServiceRutine tpsServiceRutine; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @XmlType(propOrder = {"serviceRutinenavn", "fnr", "aksjonsKode", "aksjonsKode2"}) + public static class TpsServiceRutine { + + private String serviceRutinenavn; + private String fnr; + private String aksjonsKode; + private String aksjonsKode2; + } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java new file mode 100644 index 00000000000..d6d4a9cb365 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS018Response.java @@ -0,0 +1,39 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import no.nav.tps.xjc.ctg.domain.s018.S018PersonType; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class TpsServicerutineS018Response { + + private TpsPersonData tpsPersonData; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsPersonData { + private TpsServicerutineAksjonsdatoRequest.TpsServiceRutineMedAksjonsdato tpsServiceRutine; + private TpsServicerutineS018Response.TpsSvar tpsSvar; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsSvar { + + private TpsMeldingResponse svarStatus; + private S018PersonType personDataS018; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java index ef5a5b75f68..8f7c614afe0 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/TpsServicerutineS610Response.java @@ -23,7 +23,7 @@ public class TpsServicerutineS610Response { @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class TpsPersonData { - private TpsServiceRutine tpsServiceRutine; + private TpsServicerutineRequest.TpsServiceRutine tpsServiceRutine; private TpsSvar tpsSvar; } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java new file mode 100644 index 00000000000..2b64d4e810c --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdFeltDefinisjonerTrans1.java @@ -0,0 +1,208 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.Getter; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; + +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.DUMMY_DATO; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.DUMMY_IDENT; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.FIVE_OES; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.SIX_OES; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_100_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_25_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_30_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_40_STK; +import static no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.WhitespaceConstants.WHITESPACE_50_STK; + +@Getter +public enum SkdFeltDefinisjonerTrans1 { + FODSELSDATO("fodselsdato", SIX_OES, 1, 6, 1, 6), + PERSONNUMMER("personnummer", FIVE_OES, 2, 5, 7, 11), + MASKINDATO("maskindato", DUMMY_DATO, 3, 8, 12, 19), + MASKINTID("maskintid", SIX_OES, 4, 6, 20, 25), + TRANSTYPE("transtype", "0", 5, 1, 26, 26), + AARSAKSKODE("aarsakskode", "00", 6, 2, 27, 28), + REG_DATO("regDato", DUMMY_DATO, 7, 8, 29, 36), + STATUSKODE("statuskode", " ", 8, 1, 37, 37), + DOEDSDATO("datoDoed", DUMMY_DATO, 9, 8, 38, 45), + SLEKTSNAVN("slektsnavn", WHITESPACE_50_STK, 10, 50, 46, 95), + FORNAVN("fornavn", WHITESPACE_50_STK, 11, 50, 96, 145), + MELLOMNAVN("mellomnavn", WHITESPACE_50_STK, 12, 50, 146, 195), + SLEKTSNAVN_UGIFT_T("slektsnavnUgift", WHITESPACE_50_STK, 13, 50, 196, 245), + FORKORTET_NAVN("forkortetNavn", WHITESPACE_25_STK, 14, 25, 246, 270), + REGDATO_NAVN("regDatoNavn", DUMMY_DATO, 15, 8, 271, 278), + FOEDEKOMMUNE_LAND("foedekommLand", " ", 16, 4, 279, 282), + FOEDESTED("foedested", " ", 17, 20, 283, 302), + STATSBORGERSKAP("statsborgerskap", "000", 18, 3, 303, 305), + STATSBORGERSKAP_REGDATO("regdatoStatsb", DUMMY_DATO, 19, 8, 306, 313), + FAMILIENUMMER("familienummer", DUMMY_IDENT, 20, 11, 314, 324), + REG_DATO_FAM_NR("regdatoFamnr", DUMMY_DATO, 21, 8, 325, 332), + PERSONKODE("personkode", "0", 22, 1, 333, 333), + SPES_REGTYPE("spesRegType", "0", 23, 1, 334, 334), + DATO_SPES_REGTYPE("datoSpesRegType", DUMMY_DATO, 24, 8, 335, 342), + SIVILSTAND("sivilstand", "0", 25, 1, 343, 343), + REGDATO_SIVILSTAND("regdatoSivilstand", DUMMY_DATO, 26, 8, 344, 351), + EKTEFELLE_PARTNER_FODSELSDATO("ektefellePartnerFoedselsdato", SIX_OES, 28, 6, 352, 357), + EKTEFELLE_PARTNER_PERSONNUMMMER("ektefellePartnerPersonnr", FIVE_OES, 29, 5, 358, 362), + EKTEFELLE_PARTNER_NAVN("ektefellePartnerNavn", WHITESPACE_50_STK, 30, 50, 363, 412), + EKTEFELLER_PARTNER_STATSBORGERSKAP("ektefellePartnerStatsb", "000", 31, 3, 413, 415), + REG_DATO_ADR("regdatoAdr", DUMMY_DATO, 33, 8, 416, 423), + FLYTTEDATO_ADR("flyttedatoAdr", DUMMY_DATO, 34, 8, 424, 431), + KOMMUNENUMMER("kommunenummer", "0000", 35, 4, 432, 435), + GATEGAARD("gateGaard", FIVE_OES, 36, 5, 436, 440), + HUSBRUK("husBruk", "0000", 37, 4, 441, 444, true), + BOKSTAVFESTENR("bokstavFestenr", "0000", 38, 4, 445, 448), + UNDERNR("undernr", "000", 39, 3, 449, 451), + ADRESSENAVN("adressenavn", WHITESPACE_25_STK, 40, 25, 452, 476), + ADRESSETYPE("adressetype", " ", 41, 1, 477, 477), + TILLEGGSADRESSE("tilleggsadresse", WHITESPACE_25_STK, 42, 25, 478, 502), + POSTNUMMER("postnummer", "0000", 43, 4, 503, 506), + VALGKRETS("valgkrets", "0000", 44, 4, 507, 510), + POSTADRESSE1("postadresse1", WHITESPACE_30_STK, 46, 30, 511, 540), + POSTADRESSE2("postadresse2", WHITESPACE_30_STK, 47, 30, 541, 570), + POSTADRESSE3("postadresse3", WHITESPACE_30_STK, 48, 30, 571, 600), + POSTADRESSE_LAND("postadresseLand", "000", 49, 3, 601, 603), + INNVANDRET_FRA_LAND("innvandretFraLand", "000", 50, 3, 604, 606), + FRA_LAND_REGDATO("fraLandRegdato", DUMMY_DATO, 51, 8, 607, 614), + FRA_LAND_FLYTTEDATO("fraLandFlyttedato", DUMMY_DATO, 52, 8, 615, 622), + FRA_KOMMUNE("fraKommune", "0000", 53, 4, 623, 626), + FRA_KOMMUNE_REGDATO("fraKommRegdato", DUMMY_DATO, 54, 8, 627, 634), + FRA_KOMMUNE_FLYTTEDATO("fraKommFlyttedato", DUMMY_DATO, 55, 8, 635, 642), + UTVANDRET_TIL_LAND("utvandretTilLand", "000", 56, 3, 643, 645), + TIL_LAND_REGDATO("tilLandRegdato", DUMMY_DATO, 57, 8, 646, 653), + TIL_LAND_FLYTTEDATO("tilLandFlyttedato", DUMMY_DATO, 58, 8, 654, 661), + SAMEMANNTALL("samemanntall", " ", 59, 1, 662, 662), + DATO_SAMEMANNTALL("datoSamemanntall", DUMMY_DATO, 60, 8, 663, 670), + UMYNDIGGJORT("umyndiggjort", " ", 61, 1, 671, 671), + DATO_UMYNDIGGJORT("datoUmyndiggjort", DUMMY_DATO, 62, 8, 672, 679), + FORELDREANSVAR("foreldreansvar", " ", 63, 1, 680, 680), + DATO_FORELDREANSVAR("datoForeldreansvar", DUMMY_DATO, 64, 8, 681, 688), + ARBEIDSTILLATELSE("arbeidstillatelse", " ", 65, 1, 689, 689), + DATO_ARBEIDSTILLATELSE("datoArbeidstillatelse", DUMMY_DATO, 66, 8, 690, 697), + FREMKONNUMMER("fremkonnummer", DUMMY_DATO, 67, 8, 698, 705), + MORS_FODSELSDATO("morsFodselsdato", SIX_OES, 69, 6, 706, 711), + MORS_PERSONNUMMER("morsPersonnummer", FIVE_OES, 70, 5, 712, 716), + MORS_NAVN("morsNavn", WHITESPACE_50_STK, 71, 50, 717, 766), + MORS_STATSBORGERSKAP("morsStatsbSkap", "000", 72, 3, 767, 769), + FARS_FODSELSDATO("farsFodselsdato", SIX_OES, 74, 6, 770, 775), + FARS_PERSONNUMMER("farsPersonnummer", FIVE_OES, 75, 5, 776, 780), + FARS_NAVN("farsNavn", WHITESPACE_50_STK, 76, 50, 781, 830), + FARS_STATSBSKAP("farsStatsbSkap", "000", 77, 3, 831, 833), + TIDLIGERE_FNR_DNR("tidligereFnrDnr", DUMMY_IDENT, 78, 11, 834, 844), + DATO_TIDLIGERE_FNRDNR("datoTidlFnrDnr", DUMMY_DATO, 79, 8, 845, 852), + NYTT_FNR("nyttFnr", DUMMY_IDENT, 80, 11, 853, 863), + DATO_NYTT_FNR("datoNyttFnr", DUMMY_DATO, 81, 8, 864, 871), + LEVENDE_DOED("levendeDoed", " ", 82, 1, 872, 872), + KJOENN("kjoenn", " ", 83, 1, 873, 873), + TILDELINGSKODE("tildelingskode", " ", 84, 1, 874, 874), + FOEDSELSTYPE("foedselstype", " ", 85, 2, 875, 876), + MORS_SIVILSTAND("morsSivilstand", " ", 86, 1, 877, 877), + EKTESKAP_PARTNERSKAP_NUMMER("ekteskapPartnerskapNr", " ", 87, 1, 878, 878), + EKTEFELLE_EKTESKAP_PARTNERSKAP_NUMMER("ektefelleEkteskapPartnerskapNr", " ", 88, 1, 879, 879), + VIGSELSTYPE("vigselstype", " ", 89, 1, 880, 880), + FORS_BYRDE("forsByrde", " ", 90, 2, 881, 882), + DOMBEVILLING("dombevilling", " ", 91, 1, 883, 883), + ANTALL_BARN("antallBarn", " ", 92, 2, 884, 885), + TIDLIGERE_SIVILSTAND("tidligereSivilstand", " ", 93, 1, 886, 886), + EKTEFELLE_TIDLIGERE_SIVILSTAND("ektefelleTidligereSivilstand", " ", 94, 1, 887, 887), + HJEMMEL("hjemmel", " ", 95, 1, 888, 888), + FYLKE("fylke", " ", 96, 2, 889, 890), + VIGSELSKOMMUNE("vigselskommune", "0000", 97, 4, 891, 894), + TIDL_SEP_DOM_BEV("tidlSepDomBev", " ", 98, 1, 895, 895), + BEGJERT_AV("begjertAv", " ", 99, 1, 896, 896), + REGISTRERINGSGRUNNLAG("registrGrunnlag", " ", 100, 1, 897, 897), + DOEDSSTED("doedssted", " ", 101, 4, 898, 901), + TYPE_DOEDSSTED("typeDoedssted", " ", 102, 1, 902, 902), + VIGSELSDATO("vigselsdato", DUMMY_DATO, 103, 8, 903, 910), + MEDLEM_KIRKEN("medlKirken", " ", 104, 1, 911, 911), + SEKVENS_NR("sekvensnr", SIX_OES, 105, 6, 912, 917), + BOLIG_NR("bolignr", " ", 106, 5, 918, 922), + DUF_ID("dufId", "000000000000", 107, 12, 923, 934), + BRUKERIDENT("brukerident", " ", 108, 8, 935, 942), + SKOLERETS("skolerets", "0000", 109, 4, 943, 946), + TK_NR("tkNr", "0000", 110, 4, 947, 950), + DNR_HJEMLANDSADRESSE1("dnrHjemlandsadresse1", WHITESPACE_40_STK, 111, 40, 951, 990), + DNR_HJEMLANDSADRESSE2("dnrHjemlandsadresse2", WHITESPACE_40_STK, 112, 40, 991, 1030), + DNR_HJEMLANDSADRESSE3("dnrHjemlandsadresse3", WHITESPACE_40_STK, 113, 40, 1031, 1070), + DNR_HJEMLAND_LANDKODE("dnrHjemlandLandkode", "000", 114, 3, 1071, 1073), + DNR_HJEMLAND_REGDATO("dnrHjemlandRegDato", DUMMY_DATO, 115, 8, 1074, 1081), + DNR_ID_KONTROLL("dnrIdKontroll", " ", 116, 1, 1082, 1082), + POSTADRESSE_REGDATO("postadrRegDato", DUMMY_DATO, 117, 8, 1083, 1090), + UTVANDRINGSTYPE("utvandringstype", " ", 118, 1, 1091, 1091), + GRUNNKRETS("grunnkrets", "0000", 119, 4, 1092, 1095), + STATSBORGERSKAP2("statsborgerskap2", "000", 120, 3, 1096, 1098), + REGDATO_STATSB2("regdatoStatsb2", DUMMY_DATO, 121, 8, 1099, 1106), + STATSBORGERSKAP3("statsborgerskap3", "000", 122, 3, 1107, 1109), + REGDATO_STATSB3("regdatoStatsb3", DUMMY_DATO, 123, 8, 1110, 1117), + STATSBORGERSKAP4("statsborgerskap4", "000", 124, 3, 1118, 1120), + REGDATO_STATSB4("regdatoStatsb4", DUMMY_DATO, 125, 8, 1121, 1128), + STATSBORGERSKAP5("statsborgerskap5", "000", 126, 3, 1129, 1131), + REGDATO_STATSB5("regdatoStatsb5", DUMMY_DATO, 127, 8, 1132, 1139), + STATSBORGERSKAP6("statsborgerskap6", "000", 128, 3, 1140, 1142), + REGDATO_STATSB6("regdatoStatsb6", DUMMY_DATO, 129, 8, 1143, 1150), + STATSBORGERSKAP7("statsborgerskap7", "000", 130, 3, 1151, 1153), + REGDATO_STATSB7("regdatoStatsb7", DUMMY_DATO, 131, 8, 1154, 1161), + STATSBORGERSKAP8("statsborgerskap8", "000", 132, 3, 1162, 1164), + REGDATO_STATSB8("regdatoStatsb8", DUMMY_DATO, 132, 8, 1165, 1172), + STATSBORGERSKAP9("statsborgerskap9", "000", 133, 3, 1173, 1175), + REGDATO_STATSB9("regdatoStatsb9", DUMMY_DATO, 134, 8, 1176, 1183), + STATSBORGERSKAP10("statsborgerskap10", "000", 135, 3, 1184, 1186), + REGDATO_STATSB10("regdatoStatsb10", DUMMY_DATO, 136, 8, 1187, 1194), + BIBEHOLD("bibehold", " ", 137, 1, 1195, 1195), + REGDATO_BIBEHOLD("regdatoBibehold", DUMMY_DATO, 138, 8, 1196, 1203), + SAKSID("saksid", "0000000", 139, 7, 1204, 1210), + EMBETE("embete", " ", 140, 4, 1211, 1214), + SAKSTYPE("sakstype", " ", 141, 3, 1215, 1217), + VEDTAKSDATO("vedtaksdato", " ", 142, 8, 1218, 1225), + INTERN_VERGE_ID("internVergeid", "0000000", 143, 7, 1226, 1232), + VERGE_FNR_DNR("vergeFnrDnr", DUMMY_IDENT, 144, 11, 1233, 1243), + VERGETYPE("vergetype", " ", 145, 3, 1244, 1246), + MANDATTYPE("mandattype", " ", 146, 3, 1247, 1249), + MANDAT_TEKST("mandatTekst", WHITESPACE_100_STK, 147, 100, 1250, 1349), + RESERVER_FRAMTIDIG_BRUK("reserverFramtidigBruk", WHITESPACE_100_STK + WHITESPACE_50_STK + " ", 148, 151, 1350, 1500); + + private String variabelNavn; + private String defaultVerdi; + private int idRekkefolge; + private int antallBytesAvsatt; + private int fraByte; + private int tilByte; + private boolean isValueLastInSkdField = false; + + public static final int TRANSTYPE_START_POSITION = 25; + public static final int TRANSTYPE_END_POSITION = 26; + + SkdFeltDefinisjonerTrans1(String variabelnavn, String defaultVerdi, int idRekkefolge, int antallBytesAvsatt, int fraByte, int tilByte, boolean isValueLastInSkdField) { + this.variabelNavn = variabelnavn; + this.defaultVerdi = defaultVerdi; + this.idRekkefolge = idRekkefolge; + this.antallBytesAvsatt = antallBytesAvsatt; + this.fraByte = fraByte; + this.tilByte = tilByte; + this.isValueLastInSkdField = isValueLastInSkdField; + } + + SkdFeltDefinisjonerTrans1(String variabelnavn, String defaultVerdi, int idRekkefolge, int antallBytesAvsatt, + int fraByte, int tilByte) { + this.variabelNavn = variabelnavn; + this.defaultVerdi = defaultVerdi; + this.idRekkefolge = idRekkefolge; + this.antallBytesAvsatt = antallBytesAvsatt; + this.fraByte = fraByte; + this.tilByte = tilByte; + } + + public static List getAllFeltDefinisjonerInSortedList() { + return new ArrayList<>(Arrays.stream(SkdFeltDefinisjonerTrans1.values()) + .sorted(Comparator.comparingInt(SkdFeltDefinisjonerTrans1::getIdRekkefolge)) + .toList()); + } + + public String extractMeldingsfeltverdiFromString(String skdMeldingUtenHeader) { + String extractedValue = skdMeldingUtenHeader.substring(this.getFraByte() - 1, this.getTilByte()); + return extractedValue.equals(this.getDefaultVerdi()) ? null : extractedValue.trim(); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java new file mode 100644 index 00000000000..0599afbc98d --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingTrans1.java @@ -0,0 +1,207 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.apache.commons.lang3.StringUtils; +import org.springframework.http.HttpStatus; +import org.springframework.web.server.ResponseStatusException; + +import java.lang.reflect.InvocationTargetException; + +import static java.lang.Math.min; + +/** + * Java-representasjon av skdmeldingen. Objektet bærer verdiene til de utfylte elementene i skd-meldingen. + */ +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class SkdMeldingTrans1 { + private static final int MELDINGSLENGDE_UTEN_HEADER = 1500; + + private String header; + private String fodselsdato; + private String personnummer; + private String maskindato; + private String maskintid; + private String transtype; + private String aarsakskode; + private String regDato; + private String statuskode; + private String datoDoed; + private String slektsnavn; + private String fornavn; + private String mellomnavn; + private String slektsnavnUgift; + private String forkortetNavn; + private String regDatoNavn; + private String foedekommLand; + private String foedested; + private String statsborgerskap; + private String regdatoStatsb; + private String familienummer; + private String regdatoFamnr; + private String personkode; + private String spesRegType; + private String datoSpesRegType; + private String sivilstand; + private String regdatoSivilstand; + private String ektefellePartnerFoedselsdato; + private String ektefellePartnerPersonnr; + private String ektefellePartnerNavn; + private String ektefellePartnerStatsb; + private String regdatoAdr; + private String flyttedatoAdr; + private String kommunenummer; + private String gateGaard; + private String husBruk; + private String bokstavFestenr; + private String undernr; + private String adressenavn; + private String adressetype; + private String tilleggsadresse; + private String postnummer; + private String valgkrets; + private String postadresse1; + private String postadresse2; + private String postadresse3; + private String postadresseLand; + private String innvandretFraLand; + private String fraLandRegdato; + private String fraLandFlyttedato; + private String fraKommune; + private String fraKommRegdato; + private String fraKommFlyttedato; + private String utvandretTilLand; + private String tilLandRegdato; + private String tilLandFlyttedato; + private String samemanntall; + private String datoSamemanntall; + private String umyndiggjort; + private String datoUmyndiggjort; + private String foreldreansvar; + private String datoForeldreansvar; + private String arbeidstillatelse; + private String datoArbeidstillatelse; + private String fremkonnummer; + private String morsFodselsdato; + private String morsPersonnummer; + private String morsNavn; + private String morsStatsbSkap; + private String farsFodselsdato; + private String farsPersonnummer; + private String farsNavn; + private String farsStatsbSkap; + private String tidligereFnrDnr; + private String datoTidlFnrDnr; + private String nyttFnr; + private String datoNyttFnr; + private String levendeDoed; + private String kjoenn; + private String tildelingskode; + private String foedselstype; + private String morsSivilstand; + private String ekteskapPartnerskapNr; + private String ektefelleEkteskapPartnerskapNr; + private String vigselstype; + private String forsByrde; + private String dombevilling; + private String antallBarn; + private String tidligereSivilstand; + private String ektefelleTidligereSivilstand; + private String hjemmel; + private String fylke; + private String vigselskommune; + private String tidlSepDomBev; + private String begjertAv; + private String registrGrunnlag; + private String doedssted; + private String typeDoedssted; + private String vigselsdato; + private String medlKirken; + private String sekvensnr; + private String bolignr; + private String dufId; + private String brukerident; + private String skolerets; + private String tkNr; + private String dnrHjemlandsadresse1; + private String dnrHjemlandsadresse2; + private String dnrHjemlandsadresse3; + private String dnrHjemlandLandkode; + private String dnrHjemlandRegDato; + private String dnrIdKontroll; + private String postadrRegDato; + private String utvandringstype; + private String grunnkrets; + private String statsborgerskap2; + private String regdatoStatsb2; + private String statsborgerskap3; + private String regdatoStatsb3; + private String statsborgerskap4; + private String regdatoStatsb4; + private String statsborgerskap5; + private String regdatoStatsb5; + private String statsborgerskap6; + private String regdatoStatsb6; + private String statsborgerskap7; + private String regdatoStatsb7; + private String statsborgerskap8; + private String regdatoStatsb8; + private String statsborgerskap9; + private String regdatoStatsb9; + private String statsborgerskap10; + private String regdatoStatsb10; + private String bibehold; + private String regdatoBibehold; + private String saksid; + private String embete; + private String sakstype; + private String vedtaksdato; + private String internVergeid; + private String vergeFnrDnr; + private String vergetype; + private String mandattype; + private String mandatTekst; + private String reserverFramtidigBruk; + + @Override + public String toString() { + StringBuilder skdMelding = new StringBuilder(); + if (header != null) { + skdMelding.append(header); + } + + SkdFeltDefinisjonerTrans1.getAllFeltDefinisjonerInSortedList().forEach(skdFeltDefinisjon -> { + String parameterverdien = getMeldingsverdien(skdFeltDefinisjon); + skdMelding.append(parameterverdien == null ? + skdFeltDefinisjon.getDefaultVerdi() : addDefaultValueToEndOfString(parameterverdien, skdFeltDefinisjon)); + }); + + return skdMelding.toString(); + } + + private String addDefaultValueToEndOfString(String parameterverdien, SkdFeltDefinisjonerTrans1 skdFeltDefinisjon) { + if (!skdFeltDefinisjon.isValueLastInSkdField()) { + return parameterverdien.substring(0, min(parameterverdien.length(), skdFeltDefinisjon.getAntallBytesAvsatt())) + + skdFeltDefinisjon.getDefaultVerdi().substring(min(skdFeltDefinisjon.getAntallBytesAvsatt(), parameterverdien.length())); + } else { + return skdFeltDefinisjon.getDefaultVerdi().substring(0, + (skdFeltDefinisjon.getDefaultVerdi().length() - parameterverdien.length())) + parameterverdien; + } + } + + public String getMeldingsverdien(SkdFeltDefinisjonerTrans1 skdFeltDefinisjon) { + try { + return ((String) getClass().getMethod("get" + StringUtils.capitalize(skdFeltDefinisjon.getVariabelNavn())) + .invoke(this)); + } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java new file mode 100644 index 00000000000..a086d58bc06 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/SkdMeldingsheader.java @@ -0,0 +1,51 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public class SkdMeldingsheader { + + private static final String KJORE_NUMMER = "000004421"; + private static final String KODE_SYSTEM = "TPSF"; + private static final String MQ_HANDLE = "000000000"; + private static final String SKD_REFERANSE = WhitespaceConstants.WHITESPACE_20_STK; + + private static final int INDEX_START_TILDELINGSKODE = 873; + private static final int INDEX_SLUTT_TILDELINGSKODE = 874; + + private static final int INDEX_START_AARSAKSKODE = 26; + private static final int INDEX_SLUTT_AARSAKSKODE = 28; + + private static final int INDEX_START_TRANSTYPE = 25; + private static final int INDEX_SLUTT_TRANSTYPE = 26; + + public String appendHeader(String skdMelding) { + + var aarsakskode = extractAArsakskode(skdMelding); + var transType = extractTranstype(skdMelding); + var tildelingsKode = extractTildelingskode(skdMelding); + + return new StringBuilder() + .append(MQ_HANDLE) + .append(KODE_SYSTEM) + .append(KJORE_NUMMER) + .append(aarsakskode) + .append(transType) + .append(tildelingsKode) + .append(SKD_REFERANSE) + .append(skdMelding) + .toString(); + } + + private String extractAArsakskode(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_AARSAKSKODE ? skdMelding.substring(INDEX_START_AARSAKSKODE, INDEX_SLUTT_AARSAKSKODE) : " "; + } + + private String extractTranstype(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_TRANSTYPE ? skdMelding.substring(INDEX_START_TRANSTYPE, INDEX_SLUTT_TRANSTYPE) : " "; + } + + private String extractTildelingskode(String skdMelding) { + return skdMelding.length() > INDEX_SLUTT_TILDELINGSKODE ? skdMelding.substring(INDEX_START_TILDELINGSKODE, INDEX_SLUTT_TILDELINGSKODE) : "0"; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java new file mode 100644 index 00000000000..ebf9421ca8e --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/dto/endringsmeldinger/WhitespaceConstants.java @@ -0,0 +1,21 @@ +package no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public final class WhitespaceConstants { + + public static final String WHITESPACE_5_STK = " "; + public static final String WHITESPACE_10_STK = WHITESPACE_5_STK + WHITESPACE_5_STK; + public static final String WHITESPACE_20_STK = WHITESPACE_10_STK + WHITESPACE_10_STK; + public static final String WHITESPACE_25_STK = WHITESPACE_5_STK + WHITESPACE_20_STK; + public static final String WHITESPACE_40_STK = WHITESPACE_20_STK + WHITESPACE_20_STK; + public static final String WHITESPACE_30_STK = WHITESPACE_5_STK + WHITESPACE_25_STK; + public static final String WHITESPACE_50_STK = WHITESPACE_25_STK + WHITESPACE_25_STK; + public static final String WHITESPACE_100_STK = WHITESPACE_50_STK + WHITESPACE_50_STK; + + public static final String FIVE_OES = "00000"; + public static final String SIX_OES = "000000"; + public static final String DUMMY_DATO = "00000000"; + public static final String DUMMY_IDENT = "00000000000"; +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java index dcd08fd69ec..bc2309a2c91 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/AdresseMappingStrategy.java @@ -17,8 +17,6 @@ import java.time.LocalDateTime; import static java.util.Objects.nonNull; -import static no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO.Adressetype.GATE; -import static no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO.Adressetype.MATR; @Component public class AdresseMappingStrategy implements MappingStrategy { @@ -70,7 +68,6 @@ public void mapAtoB(BoAdresseType source, GateadresseDTO target, MappingContext target.setHusnummer(skipLeadZeros(source.getOffAdresse().getHusnr())); target.setGatekode(source.getOffAdresse().getGatekode()); target.setFlyttedato(getDate(source.getDatoFom())); - target.setAdressetype(GATE); } }) .byDefault() @@ -87,7 +84,6 @@ public void mapAtoB(BoAdresseType source, MatrikkeladresseDTO target, MappingCon target.setFestenr(skipLeadZeros(source.getMatrAdresse().getFestenr())); target.setUndernr(skipLeadZeros(source.getMatrAdresse().getUndernr())); target.setFlyttedato(getDate(source.getDatoFom())); - target.setAdressetype(MATR); } }) .byDefault() diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java new file mode 100644 index 00000000000..a3dbe79577d --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateCustomMapping.java @@ -0,0 +1,30 @@ +package no.nav.testnav.apps.tpsmessagingservice.mapper; + +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MappingContext; +import ma.glasnost.orika.converter.BidirectionalConverter; +import ma.glasnost.orika.metadata.Type; +import org.springframework.stereotype.Component; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Slf4j +@Component +public class LocalDateCustomMapping extends BidirectionalConverter { + + @Override + public LocalDate convertTo(String localDate, Type type, MappingContext mappingContext) { + + return isNotBlank(localDate) ? LocalDate.parse(localDate) : null; + } + + @Override + public String convertFrom(LocalDate localDate, Type type, MappingContext mappingContext) { + + return nonNull(localDate) ? localDate.format(DateTimeFormatter.ISO_LOCAL_DATE) : null; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java new file mode 100644 index 00000000000..4ce8f381e6a --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/mapper/LocalDateTimeCustomMapping.java @@ -0,0 +1,37 @@ +package no.nav.testnav.apps.tpsmessagingservice.mapper; + +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MappingContext; +import ma.glasnost.orika.converter.BidirectionalConverter; +import ma.glasnost.orika.metadata.Type; +import org.springframework.stereotype.Component; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; +import static org.apache.commons.lang3.StringUtils.isBlank; + +@Slf4j +@Component +public class LocalDateTimeCustomMapping extends BidirectionalConverter { + + @Override + public LocalDateTime convertTo(String localDateTime, Type type, MappingContext mappingContext) { + + if (isBlank(localDateTime)) { + return null; + } + + return localDateTime.length() == 10 ? + LocalDate.parse(localDateTime).atStartOfDay() : + LocalDateTime.parse(localDateTime); + } + + @Override + public String convertFrom(LocalDateTime localDateTime, Type type, MappingContext mappingContext) { + + return nonNull(localDateTime) ? localDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) : null; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java index 12f77f44f1c..db20e8fe24f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/provider/v1/PersonController.java @@ -2,13 +2,23 @@ import lombok.RequiredArgsConstructor; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; +import no.nav.testnav.apps.tpsmessagingservice.service.AdressehistorikkService; import no.nav.testnav.apps.tpsmessagingservice.service.BankkontoNorskService; import no.nav.testnav.apps.tpsmessagingservice.service.BankkontoUtlandService; +import no.nav.testnav.apps.tpsmessagingservice.service.DoedsmeldingService; import no.nav.testnav.apps.tpsmessagingservice.service.EgenansattService; +import no.nav.testnav.apps.tpsmessagingservice.service.FoedselsmeldingService; import no.nav.testnav.apps.tpsmessagingservice.service.PersonService; import no.nav.testnav.apps.tpsmessagingservice.service.SpraakService; import no.nav.testnav.libs.data.kontoregister.v1.BankkontonrNorskDTO; import no.nav.testnav.libs.data.kontoregister.v1.BankkontonrUtlandDTO; +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; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonMiljoeDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.SpraakDTO; import no.nav.testnav.libs.data.tpsmessagingservice.v1.TpsMeldingResponseDTO; @@ -27,6 +37,7 @@ import java.util.Map; import static java.util.Collections.emptyList; +import static java.util.Objects.isNull; import static java.util.Objects.nonNull; @RestController @@ -39,6 +50,9 @@ public class PersonController { private final SpraakService spraakService; private final BankkontoUtlandService bankkontoUtlandService; private final BankkontoNorskService bankkontoNorskService; + private final AdressehistorikkService adressehistorikkService; + private final FoedselsmeldingService foedselsmeldingService; + private final DoedsmeldingService doedsmeldingService; private static List convert(Map tpsMeldingDTO) { @@ -113,5 +127,33 @@ public List opphoerBankkontonrUtland(@PathVariable String return convert(bankkontoUtlandService.opphoerBankkontonrUtland(ident, miljoer)); } + + @PostMapping("/adressehistorikk") + public List personhistorikk(@RequestBody AdressehistorikkRequest request, + @RequestParam(required = false) List miljoer) { + + return adressehistorikkService.hentHistorikk(request, isNull(miljoer) ? emptyList() : miljoer); + } + + @PostMapping("/foedselsmelding") + public FoedselsmeldingResponse sendFoedselsmelding(@RequestParam(required = false) List miljoer, + @RequestBody FoedselsmeldingRequest persondata) { + + return foedselsmeldingService.sendFoedselsmelding(persondata, isNull(miljoer) ? emptyList() : miljoer); + } + + @PostMapping("/doedsmelding") + public DoedsmeldingResponse sendDoedsmelding(@RequestBody DoedsmeldingRequest request, + @RequestParam(required = false) List miljoer) { + + return doedsmeldingService.sendDoedsmelding(request, isNull(miljoer) ? emptyList() : miljoer); + } + + @DeleteMapping("/doedsmelding") + public DoedsmeldingResponse annulerDoedsmelding(@RequestParam(required = false) List miljoer, + @RequestBody PersonDTO persondata) { + + return doedsmeldingService.annulerDoedsmelding(persondata, isNull(miljoer) ? emptyList() : miljoer); + } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java new file mode 100644 index 00000000000..894b4418dd6 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/AdressehistorikkService.java @@ -0,0 +1,130 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MapperFacade; +import no.nav.testnav.apps.tpsmessagingservice.consumer.ServicerutineConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineAksjonsdatoRequest; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineS018Response; +import no.nav.testnav.apps.tpsmessagingservice.utils.EndringsmeldingUtil; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.apps.tpsmessagingservice.utils.ServiceRutineUtil; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdressehistorikkRequest; +import no.nav.tps.xjc.ctg.domain.s018.S018PersonType; +import no.nav.tps.xjc.ctg.domain.s018.SRnavnType; +import org.json.XML; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static java.util.Objects.nonNull; + +@Slf4j +@Service +public class AdressehistorikkService { + + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + private final JAXBContext requestContext; + private final ServicerutineConsumer servicerutineConsumer; + private final MapperFacade mapperFacade; + private final ObjectMapper objectMapper; + + public AdressehistorikkService(TestmiljoerServiceConsumer testmiljoerServiceConsumer, + ServicerutineConsumer servicerutineConsumer, + MapperFacade mapperFacade, + ObjectMapper objectMapper) throws JAXBException { + + this.testmiljoerServiceConsumer = testmiljoerServiceConsumer; + this.requestContext = JAXBContext.newInstance(TpsServicerutineAksjonsdatoRequest.class); + this.servicerutineConsumer = servicerutineConsumer; + this.mapperFacade = mapperFacade; + this.objectMapper = objectMapper; + } + + public List hentHistorikk(AdressehistorikkRequest request, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var tpsPersoner = readFromTps(request.getIdent(), + nonNull(request.getAksjonsdato()) ? request.getAksjonsdato() : LocalDate.now(), + miljoer); + + return tpsPersoner.entrySet().stream() + .map(entry -> { + var status = ResponseStatus.decodeStatus(nonNull(entry.getValue()) && + nonNull(entry.getValue().getTpsPersonData()) ? + entry.getValue().getTpsPersonData().getTpsSvar().getSvarStatus() : null); + return AdressehistorikkDTO.builder() + .miljoe(entry.getKey()) + .status(mapperFacade.map(status, AdressehistorikkDTO.TpsMeldingResponse.class)) + .persondata("OK".equals(status.getReturStatus()) ? + mapAdressehistorikk(request.getIdent(), + entry.getValue().getTpsPersonData().getTpsSvar().getPersonDataS018()) : + null) + .build(); + }) + .toList(); + } + + private AdressehistorikkDTO.PersonData mapAdressehistorikk(String ident, S018PersonType persondataS18) { + + var persondata = mapperFacade.map(persondataS18, AdressehistorikkDTO.PersonData.class); + persondata.setIdent(ident); + return persondata; + } + + private Map readFromTps(String ident, LocalDate foedselsdato, List miljoer) { + + var request = TpsServicerutineAksjonsdatoRequest.builder() + .tpsServiceRutine(TpsServicerutineAksjonsdatoRequest.TpsServiceRutineMedAksjonsdato.builder() + .serviceRutinenavn(SRnavnType.FS_03_FDNUMMER_PADRHIST_O.value()) + .fnr(ident) + .aksjonsKode("A") + .aksjonsKode2("0") + .aksjonsDato(foedselsdato.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) + .build()) + .build(); + + var xmlRequest = ServiceRutineUtil.marshallToXML(requestContext, request); + + var miljoerResponse = servicerutineConsumer.sendMessage(xmlRequest, miljoer); + + miljoerResponse.forEach((key, value) -> log.info("Miljø: {} XML: {}", key, value)); + + return miljoerResponse.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, + entry -> unmarshallFromXml(entry.getValue()))); + } + + @SneakyThrows + private TpsServicerutineS018Response unmarshallFromXml(String endringsmeldingResponse) { + + if (TpsMeldingCommand.NO_RESPONSE.equals(endringsmeldingResponse)) { + + return TpsServicerutineS018Response.builder() + .tpsPersonData(TpsServicerutineS018Response.TpsPersonData.builder() + .tpsSvar(TpsServicerutineS018Response.TpsSvar.builder() + .svarStatus(EndringsmeldingUtil.getNoAnswerStatus()) + .build()) + .build()) + .build(); + + } else { + + var jsonRoot = XML.toJSONObject(endringsmeldingResponse); + return objectMapper.readValue(jsonRoot.toString(), TpsServicerutineS018Response.class); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java new file mode 100644 index 00000000000..2c6c68133c5 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/DoedsmeldingService.java @@ -0,0 +1,68 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.DoedsmeldingAnnulleringBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.DoedsmeldingBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.SendSkdMeldinger; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingResponse; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Slf4j +@Service +@RequiredArgsConstructor +public class DoedsmeldingService { + + private final SendSkdMeldinger sendSkdMeldinger; + private final DoedsmeldingBuilderService doedsmeldingBuilderService; + private final DoedsmeldingAnnulleringBuilderService doedsmeldingAnnulleringBuilderService; + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + + public DoedsmeldingResponse sendDoedsmelding(DoedsmeldingRequest request, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = doedsmeldingBuilderService.build(request); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return DoedsmeldingResponse.builder() + .ident(request.getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + public DoedsmeldingResponse annulerDoedsmelding(PersonDTO person, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = doedsmeldingAnnulleringBuilderService.execute(person); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return DoedsmeldingResponse.builder() + .ident(person.getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + private void prepareStatus(Map sentStatus) { + + sentStatus.forEach((env, status) -> log.info("Doedsmelding i miljø {} status {} ", env, status)); + + sentStatus.replaceAll((env, status) -> status.matches("^00.*") ? "OK" : ResponseStatus.extract(status)); + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java new file mode 100644 index 00000000000..d29c5cf2b3b --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/FoedselsmeldingService.java @@ -0,0 +1,44 @@ +package no.nav.testnav.apps.tpsmessagingservice.service; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.FoedselsmeldingBuilderService; +import no.nav.testnav.apps.tpsmessagingservice.service.skd.SendSkdMeldinger; +import no.nav.testnav.apps.tpsmessagingservice.utils.ResponseStatus; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingResponse; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Service +@RequiredArgsConstructor +public class FoedselsmeldingService { + + private final SendSkdMeldinger sendSkdMeldinger; + private final FoedselsmeldingBuilderService foedselsmeldingBuilderService; + private final TestmiljoerServiceConsumer testmiljoerServiceConsumer; + + public FoedselsmeldingResponse sendFoedselsmelding(FoedselsmeldingRequest persondata, List miljoer) { + + if (miljoer.isEmpty()) { + miljoer = testmiljoerServiceConsumer.getMiljoer(); + } + + var skdMelding = foedselsmeldingBuilderService.build(persondata); + + var miljoerStatus = sendSkdMeldinger.sendMeldinger(skdMelding.toString(), miljoer); + prepareStatus(miljoerStatus); + + return FoedselsmeldingResponse.builder() + .ident(persondata.getBarn().getIdent()) + .miljoStatus(miljoerStatus) + .build(); + } + + private void prepareStatus(Map sentStatus) { + + sentStatus.replaceAll((env, status) -> status.matches("^00.*") ? "OK" : ResponseStatus.extract(status)); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java index 01ca63330be..ea4dfcb36d3 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/IdentService.java @@ -94,11 +94,11 @@ private Map readFromTps(List ident var xmlRequest = prepareRequest(identer, isProd); - log.trace("M201 request: {}", xmlRequest); + log.info("M201 request: {}", xmlRequest); var miljoerResponse = servicerutineConsumer.sendMessage(xmlRequest, miljoer); - miljoerResponse.forEach((key, value) -> log.trace("Miljø: {} XML: {}", key, value)); + miljoerResponse.forEach((key, value) -> log.info("Miljø: {} XML: {}", key, value)); return miljoerResponse.entrySet().parallelStream() .collect(Collectors.toMap(Map.Entry::getKey, @@ -130,9 +130,9 @@ private String prepareRequest(List identer, boolean isProd) { "A" + "%s%s%s" .formatted(isProd ? "2" : "0", - Integer.toString(identer.size()), - identer.stream() - .map("%s"::formatted) - .collect(Collectors.joining())); + Integer.toString(identer.size()), + identer.stream() + .map("%s"::formatted) + .collect(Collectors.joining())); } } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java index feb02f5a0bf..469fdad6989 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/PersonService.java @@ -14,7 +14,6 @@ import no.nav.testnav.apps.tpsmessagingservice.consumer.TestmiljoerServiceConsumer; import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; -import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServiceRutine; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineRequest; import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineS610Response; import no.nav.testnav.apps.tpsmessagingservice.utils.EndringsmeldingUtil; @@ -57,8 +56,11 @@ public class PersonService { private final ObjectMapper objectMapper; private final MapperFacade mapperFacade; - public PersonService(ServicerutineConsumer servicerutineConsumer, ObjectMapper objectMapper, - MapperFacade mapperFacade, TestmiljoerServiceConsumer testmiljoerServiceConsumer) throws JAXBException { + public PersonService(ServicerutineConsumer servicerutineConsumer, + ObjectMapper objectMapper, + MapperFacade mapperFacade, + TestmiljoerServiceConsumer testmiljoerServiceConsumer) throws JAXBException { + this.servicerutineConsumer = servicerutineConsumer; this.objectMapper = objectMapper; this.mapperFacade = mapperFacade; @@ -165,7 +167,7 @@ public TpsServicerutineS610Response unmarshallFromXml(String endringsmeldingResp private Map readFromTps(String ident, List miljoer) { var request = TpsServicerutineRequest.builder() - .tpsServiceRutine(TpsServiceRutine.builder() + .tpsServiceRutine(TpsServicerutineRequest.TpsServiceRutine.builder() .serviceRutinenavn(PERSON_KERNINFO_SERVICE_ROUTINE) .fnr(ident) .aksjonsKode("D") @@ -204,6 +206,7 @@ public List getPerson(String ident, List miljoer) { var personerMedRelasjoner = buildMiljoePersonWithRelasjon(relasjoner).entrySet().stream() .map(entry -> PersonMiljoeDTO.builder() + .ident(ident) .miljoe(entry.getKey()) .status("OK") .person(entry.getValue()) diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java new file mode 100644 index 00000000000..3eed3029390 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/AdresseAppenderService.java @@ -0,0 +1,107 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HusbokstavEncoder; +import no.nav.testnav.apps.tpsmessagingservice.utils.LandkodeEncoder; +import no.nav.testnav.apps.tpsmessagingservice.utils.NullcheckUtil; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.AdresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.GateadresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.MatrikkeladresseDTO; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.regex.Pattern; + +import static java.lang.String.format; +import static java.util.Objects.nonNull; +import static no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility.enforceValidTpsDate; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@Service +@RequiredArgsConstructor +public class AdresseAppenderService { + + private static final Pattern HUSNUMMER_PATTERN = Pattern.compile("(\\d+)"); + private static final Pattern HUSBOKSTAV_PATTERN = Pattern.compile("([A-ZÆØÅÁ])"); + + public void execute(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO person) { + + /* Boadresse */ + if (nonNull(person.getBoadresse())) { + + if (AdresseDTO.Adressetype.GATE == person.getBoadresse().getAdressetype()) { + + var gateadresse = (GateadresseDTO) person.getBoadresse(); + skdMeldingTrans1.setAdressetype("O"); + skdMeldingTrans1.setGateGaard(fixGatekode(gateadresse.getGatekode())); + addHusBrukAndBokstavFestenr(skdMeldingTrans1, gateadresse); + skdMeldingTrans1.setAdressenavn(StringUtils.abbreviate(gateadresse.getAdresse(), 25)); + skdMeldingTrans1.setKommunenummer(gateadresse.getKommunenr()); + skdMeldingTrans1.setPostnummer(gateadresse.getPostnr()); + skdMeldingTrans1.setTilleggsadresse(gateadresse.getTilleggsadresse()); + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd( + enforceValidTpsDate(NullcheckUtil.nullcheckSetDefaultValue(gateadresse.getFlyttedato(), + HentDatoFraIdentUtility.extract(person.getIdent()))))); + + } else if (AdresseDTO.Adressetype.MATR == person.getBoadresse().getAdressetype()) { + + var matrikkeladresse = (MatrikkeladresseDTO) person.getBoadresse(); + skdMeldingTrans1.setAdressetype("M"); + skdMeldingTrans1.setGateGaard(prepad(matrikkeladresse.getGardsnr(), 5)); + skdMeldingTrans1.setHusBruk(prepad(matrikkeladresse.getBruksnr(), 4)); + skdMeldingTrans1.setAdressenavn(matrikkeladresse.getMellomnavn()); + skdMeldingTrans1.setKommunenummer(matrikkeladresse.getKommunenr()); + skdMeldingTrans1.setPostnummer(matrikkeladresse.getPostnr()); + skdMeldingTrans1.setTilleggsadresse(matrikkeladresse.getTilleggsadresse()); + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd( + enforceValidTpsDate(NullcheckUtil.nullcheckSetDefaultValue(matrikkeladresse.getFlyttedato(), + HentDatoFraIdentUtility.extract(person.getIdent()))))); + } + + } else { + skdMeldingTrans1.setFlyttedatoAdr(ConvertDateToStringUtility.yyyyMMdd(enforceValidTpsDate( + HentDatoFraIdentUtility.extract(person.getIdent())))); + } + + /* Postadresse */ + if (nonNull(person.getPostadresse())) { + + var postadresse = person.getPostadresse(); + skdMeldingTrans1.setPostadresse1(postadresse.getPostLinje1()); + skdMeldingTrans1.setPostadresse2(postadresse.getPostLinje2()); + skdMeldingTrans1.setPostadresse3(postadresse.getPostLinje3()); + skdMeldingTrans1.setPostadresseLand(LandkodeEncoder.encode(postadresse.getPostLand())); + } + } + + private static String fixGatekode(String gatekode) { + + return format("%05d", isNotBlank(gatekode) ? Integer.parseInt(gatekode) : 0); + } + + private static String prepad(String value, int length) { + + var formatter = "%1$" + length + 's'; + return format(formatter, nonNull(value) ? value : '0').replace(' ', '0'); + } + + private void addHusBrukAndBokstavFestenr(SkdMeldingTrans1 skdMeldingTrans1, GateadresseDTO gateadresse) { + + if (isNotBlank(gateadresse.getHusnummer())) { + + var husbokstavMatcher = HUSBOKSTAV_PATTERN.matcher(gateadresse.getHusnummer()); + var husnummerMatcher = HUSNUMMER_PATTERN.matcher(gateadresse.getHusnummer()); + + if (husbokstavMatcher.find()) { + skdMeldingTrans1.setBokstavFestenr(HusbokstavEncoder.encode(husbokstavMatcher.group(1))); + } + if (husnummerMatcher.find()) { + skdMeldingTrans1.setHusBruk(husnummerMatcher.group(1)); + } + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java new file mode 100644 index 00000000000..780b7ff4cff --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingAnnulleringBuilderService.java @@ -0,0 +1,54 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; + +@Service +public class DoedsmeldingAnnulleringBuilderService { + + private static final String AARSAKS_KO_DE_FOR_DOEDSMELDING = "45"; + private static final String TRANSTYPE_FOR_DOEDSMELDING = "1"; + private static final String STATUS_KO_DE_FOR_DOEDSMELDING = "1"; + private static final String TILDELINGS_KO_DE_DOEDSMELDING_ANNULERING = "0"; + + @Autowired + private AdresseAppenderService adresseAppenderService; + + public SkdMeldingTrans1 execute(PersonDTO person) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGS_KO_DE_DOEDSMELDING_ANNULERING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, person); + adresseAppenderService.execute(skdMeldingTrans1, person); + addDefaultParam(skdMeldingTrans1); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO person) { + + skdMeldingTrans1.setFodselsdato(person.getIdent().substring(0, 6)); + skdMeldingTrans1.setPersonnummer(person.getIdent().substring(6, 11)); + + var yyyyMMdd = ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now()); + var hhMMss = ConvertDateToStringUtility.hhMMss(LocalDateTime.now()); + + skdMeldingTrans1.setMaskintid(hhMMss); + skdMeldingTrans1.setMaskindato(yyyyMMdd); + + skdMeldingTrans1.setRegDato(yyyyMMdd); + } + + private void addDefaultParam(SkdMeldingTrans1 skdMeldingTrans1) { + + skdMeldingTrans1.setAarsakskode(AARSAKS_KO_DE_FOR_DOEDSMELDING); + skdMeldingTrans1.setTranstype(TRANSTYPE_FOR_DOEDSMELDING); + skdMeldingTrans1.setStatuskode(STATUS_KO_DE_FOR_DOEDSMELDING); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java new file mode 100644 index 00000000000..9021c61b7ee --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/DoedsmeldingBuilderService.java @@ -0,0 +1,52 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.IdenttypeFraIdentUtility; +import no.nav.testnav.libs.data.pdlforvalter.v1.Identtype; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.DoedsmeldingRequest; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; + +@Service +@RequiredArgsConstructor +public class DoedsmeldingBuilderService { + + private static final String AARSAKSKODE_FOR_DOEDSMELDING = "43"; + private static final String TRANSTYPE_FOR_DOEDSMELDING = "1"; + private static final String STATUSKODE_FNR = "5"; + private static final String STATUSKODE_DNR = "2"; + private static final String TILDELINGSKODE_DOEDSMELDING = "0"; + + public SkdMeldingTrans1 build(DoedsmeldingRequest request) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGSKODE_DOEDSMELDING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, request); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, DoedsmeldingRequest request) { + + skdMeldingTrans1.setFodselsdato(request.getIdent().substring(0, 6)); + skdMeldingTrans1.setPersonnummer(request.getIdent().substring(6, 11)); + + var datoDoed = ConvertDateToStringUtility.yyyyMMdd(request.getDoedsdato().atStartOfDay()); + + skdMeldingTrans1.setMaskintid(ConvertDateToStringUtility.hhMMss(LocalDateTime.now())); + skdMeldingTrans1.setMaskindato(ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now())); + + // The specification for doedsmelding says reg-dato should be doedsdato + skdMeldingTrans1.setRegDato(datoDoed); + skdMeldingTrans1.setDatoDoed(datoDoed); + + skdMeldingTrans1.setAarsakskode(AARSAKSKODE_FOR_DOEDSMELDING); + skdMeldingTrans1.setStatuskode(Identtype.FNR == IdenttypeFraIdentUtility.getIdenttype(request.getIdent()) ? + STATUSKODE_FNR : STATUSKODE_DNR); + skdMeldingTrans1.setTranstype(TRANSTYPE_FOR_DOEDSMELDING); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java new file mode 100644 index 00000000000..a6bb9a98566 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/FoedselsmeldingBuilderService.java @@ -0,0 +1,107 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingTrans1; +import no.nav.testnav.apps.tpsmessagingservice.utils.ConvertDateToStringUtility; +import no.nav.testnav.apps.tpsmessagingservice.utils.HentDatoFraIdentUtility; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.FoedselsmeldingRequest; +import no.nav.testnav.libs.data.tpsmessagingservice.v1.PersonDTO; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; + +import java.time.LocalDateTime; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +@Service +@RequiredArgsConstructor +public class FoedselsmeldingBuilderService { + + private static final String AARSAKSKODE_FOR_FOEDSELSMELDING = "01"; + private static final String TILDELINGSKODE_FOEDSELSMELDING = "0"; + + private final AdresseAppenderService adresseAppenderService; + + public SkdMeldingTrans1 build(FoedselsmeldingRequest request) { + + var skdMeldingTrans1 = new SkdMeldingTrans1(); + skdMeldingTrans1.setTildelingskode(TILDELINGSKODE_FOEDSELSMELDING); + + addSkdParametersExtractedFromPerson(skdMeldingTrans1, request.getBarn()); + addSkdParametersExtractedFromForeldre(skdMeldingTrans1, request); + addDefaultParam(skdMeldingTrans1); + + return skdMeldingTrans1; + } + + private void addSkdParametersExtractedFromPerson(SkdMeldingTrans1 skdMeldingTrans1, PersonDTO barn) { + + var regdato = ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(barn.getIdent())); + + skdMeldingTrans1.setFodselsdato(getDato(barn)); + skdMeldingTrans1.setPersonnummer(getPersonnr(barn)); + + skdMeldingTrans1.setMaskintid("000000"); + skdMeldingTrans1.setMaskindato(ConvertDateToStringUtility.yyyyMMdd(LocalDateTime.now())); + skdMeldingTrans1.setRegDato(regdato); + + skdMeldingTrans1.setFoedekommLand("0301"); + skdMeldingTrans1.setFoedested("Sykehus"); + + skdMeldingTrans1.setFornavn(barn.getFornavn()); + skdMeldingTrans1.setSlektsnavn(barn.getEtternavn()); + skdMeldingTrans1.setKjoenn(barn.getKjonn()); + + skdMeldingTrans1.setRegdatoAdr(regdato); + skdMeldingTrans1.setPersonkode("3"); + skdMeldingTrans1.setLevendeDoed("1"); + skdMeldingTrans1.setStatuskode("1"); + + skdMeldingTrans1.setSpesRegType(barn.getSpesreg()); + skdMeldingTrans1.setDatoSpesRegType(regdato); + } + + private void addSkdParametersExtractedFromForeldre(SkdMeldingTrans1 skdMeldingTrans1, FoedselsmeldingRequest request) { + + if (isNull(request.getMor())) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, request.getBarn().getIdent() + " mangler en mor i fødselsmeldingen."); + } + + skdMeldingTrans1.setMorsFodselsdato(getDato(request.getMor())); + skdMeldingTrans1.setMorsPersonnummer(getPersonnr(request.getMor())); + skdMeldingTrans1.setSlektsnavn(request.getBarn().getEtternavn()); + skdMeldingTrans1.setFamilienummer(request.getMor().getIdent()); + skdMeldingTrans1.setRegdatoFamnr( + ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(request.getBarn().getIdent()))); + + if (nonNull(request.getFar())) { + skdMeldingTrans1.setForeldreansvar("D"); + skdMeldingTrans1.setFarsFodselsdato(getDato(request.getFar())); + skdMeldingTrans1.setFarsPersonnummer(getPersonnr(request.getFar())); + } else { + skdMeldingTrans1.setForeldreansvar("M"); + } + skdMeldingTrans1.setDatoForeldreansvar( + ConvertDateToStringUtility.yyyyMMdd(HentDatoFraIdentUtility.extract(request.getBarn().getIdent()))); + + adresseAppenderService.execute(skdMeldingTrans1, request.getBarn()); + } + + private void addDefaultParam(SkdMeldingTrans1 skdMeldingTrans1) { + skdMeldingTrans1.setSivilstand("1"); + skdMeldingTrans1.setTranstype("1"); + skdMeldingTrans1.setAarsakskode(AARSAKSKODE_FOR_FOEDSELSMELDING); + } + + private String getPersonnr(PersonDTO person) { + + return person.getIdent().substring(6, 11); + } + + private static String getDato(PersonDTO person) { + + return person.getIdent().substring(0, 6); + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java new file mode 100644 index 00000000000..1255eb6cf73 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/service/skd/SendSkdMeldinger.java @@ -0,0 +1,40 @@ +package no.nav.testnav.apps.tpsmessagingservice.service.skd; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.tpsmessagingservice.consumer.EndringsmeldingConsumer; +import no.nav.testnav.apps.tpsmessagingservice.consumer.command.TpsMeldingCommand; +import no.nav.testnav.apps.tpsmessagingservice.dto.endringsmeldinger.SkdMeldingsheader; +import org.springframework.http.HttpStatus; +import org.springframework.jms.JmsException; +import org.springframework.stereotype.Service; +import org.springframework.web.server.ResponseStatusException; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Slf4j +@Service +@RequiredArgsConstructor +public class SendSkdMeldinger { + + private final EndringsmeldingConsumer endringsmeldingConsumer; + + public Map sendMeldinger(String skdMelding, List environments) { + + try { + var skdMeldingMedHeader = SkdMeldingsheader.appendHeader(skdMelding); + log.info("SKD-melding til miljøer {} {}", environments, skdMeldingMedHeader); + + return endringsmeldingConsumer.sendMessage(skdMeldingMedHeader, environments) + .entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, respone -> respone.getValue() + .replace(TpsMeldingCommand.NO_RESPONSE, "FEIL: TPS svarer ikke"))); + + } catch (JmsException jmsException) { + log.error(jmsException.getMessage(), jmsException); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, jmsException.getMessage()); + } + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java new file mode 100644 index 00000000000..fd043e40321 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ConvertDateToStringUtility.java @@ -0,0 +1,25 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +import static java.util.Objects.nonNull; + +@UtilityClass +public final class ConvertDateToStringUtility { + + private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern("yyyyMMdd"); + private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("HHmmss"); + + public static String yyyyMMdd(LocalDateTime localDateTime) { + + return nonNull(localDateTime) ? localDateTime.format(DATE_FORMAT) : null; + } + + public static String hhMMss(LocalDateTime localDateTime) { + + return nonNull(localDateTime) ? localDateTime.format(TIME_FORMAT) : null; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java new file mode 100644 index 00000000000..b7235aac145 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HentDatoFraIdentUtility.java @@ -0,0 +1,63 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +import static java.lang.Integer.parseInt; +import static java.time.LocalDateTime.of; +import static java.util.Objects.isNull; + +/** + * INDIVID(POS 7-9) 500-749 OG ÅR > 54 => ÅRHUNDRE = 1800 + * INDIVID(POS 7-9) 000-499 => ÅRHUNDRE = 1900 + * INDIVID(POS 7-9) 900-999 OG ÅR > 39 => ÅRHUNDRE = 1900 + * INDIVID(POS 7-9) 500-999 OG ÅR < 40 => ÅRHUNDRE = 2000 + */ +@UtilityClass +public class HentDatoFraIdentUtility { + + private static final LocalDateTime TPS_MIN_REG_DATE = of(1900, 1, 1, 0, 0); + + public static LocalDateTime extract(String ident) { + + int year = parseInt(ident.substring(4, 6)); + int individ = parseInt(ident.substring(6, 9)); + + // Find century + int century; + if (parseInt(ident.substring(6, 10)) == 0) { + century = year <= LocalDate.now().getYear() % 100 ? 2000 : 1900; + } else if (individ < 500 || (individ >= 900 && year > 39)) { + century = 1900; + } else if (individ >= 500 && year < 40) { + century = 2000; + } else if (individ >= 500 && individ < 750 && year > 54) { + century = 1800; + } else { + century = 2000; + } + + return LocalDateTime.of(century + year, getMonth(ident), getDay(ident), 0, 0); + } + + public static LocalDateTime enforceValidTpsDate(LocalDateTime date) { + + if (isNull(date)) { + return null; + } else { + return date.isBefore(TPS_MIN_REG_DATE) ? TPS_MIN_REG_DATE : date; + } + } + + private int getDay(String ident) { + + return parseInt(ident.substring(0, 2)) % 40; + } + + private int getMonth(String ident) { + + return parseInt(ident.substring(2, 4)) % 20; + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java new file mode 100644 index 00000000000..de77844c525 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/HusbokstavEncoder.java @@ -0,0 +1,50 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import java.util.HashMap; +import java.util.Map; + +@UtilityClass +public class HusbokstavEncoder { + + private static final Map encodingMap; + static { + encodingMap = new HashMap<>(); + encodingMap.put("A", "9901"); + encodingMap.put("B", "9902"); + encodingMap.put("C", "9903"); + encodingMap.put("D", "9904"); + encodingMap.put("E", "9905"); + encodingMap.put("F", "9906"); + encodingMap.put("G", "9907"); + encodingMap.put("H", "9908"); + encodingMap.put("I", "9909"); + encodingMap.put("J", "9910"); + encodingMap.put("K", "9911"); + encodingMap.put("L", "9912"); + encodingMap.put("M", "9913"); + encodingMap.put("N", "9914"); + encodingMap.put("O", "9915"); + encodingMap.put("P", "9916"); + encodingMap.put("Q", "9917"); + encodingMap.put("R", "9918"); + encodingMap.put("S", "9919"); + encodingMap.put("T", "9920"); + encodingMap.put("U", "9921"); + encodingMap.put("V", "9922"); + encodingMap.put("W", "9923"); + encodingMap.put("X", "9924"); + encodingMap.put("Y", "9925"); + encodingMap.put("Z", "9926"); + encodingMap.put("Æ", "9927"); + encodingMap.put("Ø", "9928"); + encodingMap.put("Å", "9929"); + encodingMap.put("Á", "9930"); + } + + public static String encode(String husbokstav) { + return encodingMap.get(husbokstav); + } + +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java new file mode 100644 index 00000000000..34a489158ec --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/IdenttypeFraIdentUtility.java @@ -0,0 +1,24 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.libs.data.pdlforvalter.v1.Identtype; + +import static java.lang.Integer.parseInt; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.DNR; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.FNR; +import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.NPID; + +@UtilityClass +public class IdenttypeFraIdentUtility { + + public static Identtype getIdenttype(String ident) { + + if (parseInt(ident.substring(2, 3)) % 4 >= 2) { + return NPID; + } else if (parseInt(ident.substring(0, 1)) >= 4) { + return DNR; + } else { + return FNR; + } + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java new file mode 100644 index 00000000000..e30b0473319 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/LandkodeEncoder.java @@ -0,0 +1,302 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.experimental.UtilityClass; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.Map; + +import static java.time.LocalDateTime.of; + +@UtilityClass +public class LandkodeEncoder { + + private static final LocalDateTime START_OF_ERA = of(1800, 1, 1, 0, 0); + private static final LocalDateTime FORESEEABLE_FUTURE = of(9999, 12, 31, 0, 0); + + private static final Map landkoderMap = new HashMap<>(); + + private static final LandDetails DEFAULT = new LandDetails("990", START_OF_ERA, FORESEEABLE_FUTURE); + + static { //NOSONAR + landkoderMap.put("???", DEFAULT); + landkoderMap.put("ABW", new LandDetails("657", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AFG", new LandDetails("404", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AGO", new LandDetails("204", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AIA", new LandDetails("660", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ALB", new LandDetails("111", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AND", new LandDetails("114", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ANT", new LandDetails("656", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARE", new LandDetails("426", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARG", new LandDetails("705", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ARM", new LandDetails("406", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ASM", new LandDetails("802", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ATF", new LandDetails("628", START_OF_ERA, of(2000, 1, 1, 0, 0))); + landkoderMap.put("ATG", new LandDetails("603", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AUS", new LandDetails("805", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AUT", new LandDetails("153", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("AZE", new LandDetails("407", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BDI", new LandDetails("216", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BEL", new LandDetails("112", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BEN", new LandDetails("229", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BES", new LandDetails("659", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("BFA", new LandDetails("393", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BGD", new LandDetails("410", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BGR", new LandDetails("113", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BHR", new LandDetails("409", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BHS", new LandDetails("605", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BIH", new LandDetails("155", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLM", new LandDetails("687", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLR", new LandDetails("120", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BLZ", new LandDetails("604", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BMU", new LandDetails("606", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BOL", new LandDetails("710", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRA", new LandDetails("715", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRB", new LandDetails("602", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BRN", new LandDetails("416", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BTN", new LandDetails("412", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BVT", new LandDetails("875", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("BWA", new LandDetails("205", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CAF", new LandDetails("337", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CAN", new LandDetails("612", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CCK", new LandDetails("808", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHE", new LandDetails("141", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHL", new LandDetails("725", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CHN", new LandDetails("484", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CIV", new LandDetails("239", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CMR", new LandDetails("270", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COD", new LandDetails("279", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COG", new LandDetails("278", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COK", new LandDetails("809", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COL", new LandDetails("730", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("COM", new LandDetails("220", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CPV", new LandDetails("273", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CRI", new LandDetails("616", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CSK", new LandDetails("142", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CUB", new LandDetails("620", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CUW", new LandDetails("661", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("CXR", new LandDetails("807", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CYM", new LandDetails("613", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CYP", new LandDetails("500", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("CZE", new LandDetails("158", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DDR", new LandDetails("151", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DEU", new LandDetails("144", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DJI", new LandDetails("250", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DMA", new LandDetails("622", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DNK", new LandDetails("101", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DOM", new LandDetails("624", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("DZA", new LandDetails("203", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ECU", new LandDetails("735", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("EGY", new LandDetails("249", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ERI", new LandDetails("241", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ESH", new LandDetails("304", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ESP", new LandDetails("137", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("EST", new LandDetails("115", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ETH", new LandDetails("246", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FIN", new LandDetails("103", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FJI", new LandDetails("811", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FLK", new LandDetails("740", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FRA", new LandDetails("117", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FRO", new LandDetails("104", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("FSM", new LandDetails("826", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GAB", new LandDetails("254", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GBR", new LandDetails("139", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GEO", new LandDetails("430", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GGY", new LandDetails("162", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GHA", new LandDetails("260", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GIB", new LandDetails("118", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GIN", new LandDetails("264", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GLP", new LandDetails("631", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GMB", new LandDetails("256", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GNB", new LandDetails("266", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GNQ", new LandDetails("235", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRC", new LandDetails("119", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRD", new LandDetails("629", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GRL", new LandDetails("102", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GTM", new LandDetails("632", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUF", new LandDetails("745", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUM", new LandDetails("817", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("GUY", new LandDetails("720", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HKG", new LandDetails("436", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HMD", new LandDetails("870", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HND", new LandDetails("644", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HRV", new LandDetails("122", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HTI", new LandDetails("636", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("HUN", new LandDetails("152", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IDN", new LandDetails("448", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IMN", new LandDetails("164", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IND", new LandDetails("444", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IOT", new LandDetails("213", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRL", new LandDetails("121", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRN", new LandDetails("456", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("IRQ", new LandDetails("452", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ISL", new LandDetails("105", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ISR", new LandDetails("460", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ITA", new LandDetails("123", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JAM", new LandDetails("648", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JEY", new LandDetails("163", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("JOR", new LandDetails("476", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("JPN", new LandDetails("464", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KAZ", new LandDetails("480", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KEN", new LandDetails("276", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KGZ", new LandDetails("502", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KHM", new LandDetails("478", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KIR", new LandDetails("815", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KNA", new LandDetails("677", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KOR", new LandDetails("492", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("KWT", new LandDetails("496", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LAO", new LandDetails("504", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBN", new LandDetails("508", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBR", new LandDetails("283", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LBY", new LandDetails("286", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LCA", new LandDetails("678", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LIE", new LandDetails("128", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LKA", new LandDetails("424", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LSO", new LandDetails("281", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LTU", new LandDetails("136", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LUX", new LandDetails("129", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("LVA", new LandDetails("124", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAC", new LandDetails("510", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAF", new LandDetails("686", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MAR", new LandDetails("303", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MCO", new LandDetails("130", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDA", new LandDetails("138", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDG", new LandDetails("289", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MDV", new LandDetails("513", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MEX", new LandDetails("652", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MHL", new LandDetails("835", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MKD", new LandDetails("156", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MLI", new LandDetails("299", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MLT", new LandDetails("126", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MMR", new LandDetails("420", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MNE", new LandDetails("160", of(2006, 11, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("MNG", new LandDetails("516", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MNP", new LandDetails("840", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MOZ", new LandDetails("319", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MRT", new LandDetails("306", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MSR", new LandDetails("654", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MTQ", new LandDetails("650", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MUS", new LandDetails("307", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MWI", new LandDetails("296", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MYS", new LandDetails("512", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("MYT", new LandDetails("322", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NAM", new LandDetails("308", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NCL", new LandDetails("833", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NER", new LandDetails("309", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NFK", new LandDetails("822", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NGA", new LandDetails("313", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NIC", new LandDetails("664", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NIU", new LandDetails("821", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NLD", new LandDetails("127", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NOR", new LandDetails("000", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NPL", new LandDetails("528", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NRU", new LandDetails("818", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("NZL", new LandDetails("820", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("OMN", new LandDetails("520", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PAK", new LandDetails("534", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PAN", new LandDetails("668", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PCN", new LandDetails("828", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PER", new LandDetails("760", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PHL", new LandDetails("428", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PLW", new LandDetails("839", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PNG", new LandDetails("827", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("POL", new LandDetails("131", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRI", new LandDetails("685", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRK", new LandDetails("488", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRT", new LandDetails("132", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PRY", new LandDetails("755", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PSE", new LandDetails("524", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("PYF", new LandDetails("814", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("QAT", new LandDetails("540", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("REU", new LandDetails("323", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ROU", new LandDetails("133", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("RUS", new LandDetails("140", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("RWA", new LandDetails("329", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SAU", new LandDetails("544", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SCG", new LandDetails("125", of(1994, 1, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SDN", new LandDetails("356", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SEN", new LandDetails("336", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SGP", new LandDetails("548", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SGS", new LandDetails("865", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SHN", new LandDetails("209", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SJM", new LandDetails("744", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLB", new LandDetails("806", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLE", new LandDetails("339", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SLV", new LandDetails("672", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SMR", new LandDetails("134", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SOM", new LandDetails("346", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SPM", new LandDetails("676", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SRB", new LandDetails("159", of(2006, 11, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SSD", new LandDetails("355", of(2011,12,1,0,0), FORESEEABLE_FUTURE)); + landkoderMap.put("STP", new LandDetails("333", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SUN", new LandDetails("135", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SUR", new LandDetails("765", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SVK", new LandDetails("157", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SVN", new LandDetails("146", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SWE", new LandDetails("106", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SWZ", new LandDetails("357", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SXM", new LandDetails("658", of(2011, 12, 1, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("SYC", new LandDetails("338", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("SYR", new LandDetails("564", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TCA", new LandDetails("681", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TCD", new LandDetails("373", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TGO", new LandDetails("376", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("THA", new LandDetails("568", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TJK", new LandDetails("550", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TKL", new LandDetails("829", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TKM", new LandDetails("552", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TLS", new LandDetails("537", of(2002, 5, 20, 0, 0), FORESEEABLE_FUTURE)); + landkoderMap.put("TON", new LandDetails("813", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TTO", new LandDetails("680", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUN", new LandDetails("379", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUR", new LandDetails("143", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TUV", new LandDetails("816", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TWN", new LandDetails("432", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("TZA", new LandDetails("369", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UGA", new LandDetails("386", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UKR", new LandDetails("148", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UMI", new LandDetails("819", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("URY", new LandDetails("770", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("USA", new LandDetails("684", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("UZB", new LandDetails("554", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VAT", new LandDetails("154", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VCT", new LandDetails("679", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VEN", new LandDetails("775", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VGB", new LandDetails("608", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VIR", new LandDetails("601", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VNM", new LandDetails("575", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("VUT", new LandDetails("812", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("WAK", new LandDetails("831", START_OF_ERA, of(2001, 1, 1, 0, 0))); + landkoderMap.put("WLF", new LandDetails("832", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("WSM", new LandDetails("830", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("XXK", new LandDetails("161", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("XXX", new LandDetails("980", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("YEM", new LandDetails("578", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("YUG", new LandDetails("925", of(1944, 1, 1, 0, 0), of(2003, 11, 30, 0, 0))); + landkoderMap.put("ZAF", new LandDetails("359", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ZMB", new LandDetails("389", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("ZWE", new LandDetails("326", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("349", new LandDetails("349", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("546", new LandDetails("546", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("556", new LandDetails("556", START_OF_ERA, FORESEEABLE_FUTURE)); + landkoderMap.put("669", new LandDetails("669", START_OF_ERA, FORESEEABLE_FUTURE)); + } + + public String encode(String statsborgerskap) { + return landkoderMap.getOrDefault(statsborgerskap, DEFAULT).getTpsCode(); + } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + static class LandDetails { + private String tpsCode; + private LocalDateTime fom; + private LocalDateTime tom; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java new file mode 100644 index 00000000000..5d648969c98 --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/NullcheckUtil.java @@ -0,0 +1,13 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; + +import static java.util.Objects.nonNull; + +@UtilityClass +public final class NullcheckUtil { + + public static T nullcheckSetDefaultValue(T value, T defaultValue) { + return nonNull(value) ? value : defaultValue; + } +} diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java new file mode 100644 index 00000000000..26982ecef2c --- /dev/null +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ResponseStatus.java @@ -0,0 +1,37 @@ +package no.nav.testnav.apps.tpsmessagingservice.utils; + +import lombok.experimental.UtilityClass; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsMeldingResponse; + +import static java.lang.String.format; +import static java.util.Objects.nonNull; + +@UtilityClass +public final class ResponseStatus { + + public static String extract(String status) { + + if (nonNull(status) && status.contains("FEIL")) { + return status; + } else if (nonNull(status) && status.length() > 3) { + return format("FEIL: %s", status.substring(3).replaceAll("\\d*%[A-Z]\\d*%", "").replaceAll("%; *", "")); + } else { + return "STATUS: TIDSAVBRUDD"; + } + } + + public static TpsMeldingResponse decodeStatus(TpsMeldingResponse response) { + + return nonNull(response) ? + TpsMeldingResponse.builder() + .returStatus("00".equals(response.getReturStatus()) || "04".equals(response.getReturStatus()) ? "OK" : "FEIL") + .returMelding(response.getReturMelding()) + .utfyllendeMelding(response.getUtfyllendeMelding()) + .build() : + TpsMeldingResponse.builder() + .returStatus("FEIL") + .returMelding("Ingen data") + .utfyllendeMelding("Melding fra TPS er tom") + .build(); + } +} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java index 5833499e2f0..185b689203f 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/ServiceRutineUtil.java @@ -1,22 +1,22 @@ package no.nav.testnav.apps.tpsmessagingservice.utils; +import jakarta.xml.bind.JAXBContext; import lombok.SneakyThrows; import lombok.experimental.UtilityClass; -import no.nav.testnav.apps.tpsmessagingservice.dto.TpsServicerutineRequest; +import no.nav.testnav.apps.tpsmessagingservice.dto.TpsRequest; -import jakarta.xml.bind.JAXBContext; import java.io.StringWriter; @UtilityClass public class ServiceRutineUtil { @SneakyThrows - public static String marshallToXML(JAXBContext requestContext, TpsServicerutineRequest endringsmelding) { + public static String marshallToXML(JAXBContext requestContext, TpsRequest melding) { var marshaller = requestContext.createMarshaller(); var writer = new StringWriter(); - marshaller.marshal(endringsmelding, writer); + marshaller.marshal(melding, writer); return writer.toString(); } diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java deleted file mode 100644 index 8e6383d5fbb..00000000000 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/utils/TranslittereringUtil.java +++ /dev/null @@ -1,131 +0,0 @@ -package no.nav.testnav.apps.tpsmessagingservice.utils; - -import com.ibm.icu.text.Transliterator; -import lombok.experimental.UtilityClass; -import lombok.val; - -import java.text.Normalizer; -import java.util.Map; -import java.util.regex.Pattern; - -import static java.util.Map.Entry; -import static java.util.Map.entry; -import static java.util.Map.ofEntries; -import static java.util.Objects.isNull; - -@UtilityClass -public class TranslittereringUtil { - - private final String LATIN_CYRILLIC = "Latin-Russian/BGN"; - private final Transliterator cyrillicToLatinTrans = Transliterator.getInstance(LATIN_CYRILLIC).getInverse(); - - private final Pattern pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); - - private final Map PRINTABLE_BY_NON_PRINTABLE = ofEntries( - entry('å', '\u0001'), - entry('Å', '\u0002'), - entry('ä', '\u0003'), - entry('Ä', '\u0004'), - entry('é', '\u0005'), - entry('É', '\u0006'), - entry('è', '\u0007'), - entry('È', '\u0008'), - entry('ö', '\u000B'), - entry('Ö', '\u0010'), - entry('ü', '\u0011'), - entry('Ü', '\u0012') - ); - - /** - * Implementerer følgende regler: - *
    - *
  • {@code äöü éè æøå ÄÖÜ ÉÈ ÆØÅ} forblir uendret
  • - *
  • Folkeregisterets regler for translitterering mot DSF https://confluence.adeo.no/download/attachments/229949696/Regler%20for%20translitterering.docx
  • - *
  • DIFI sin erstatningstabell for samiske tegn https://www.difi.no/fagomrader-og-tjenester/digitalisering-og-samordning/standarder/forslag-og-utredninger/hvorfor-felles-tegnsett#Erstatningstabell
  • - *
  • Bokstavene i Unicode Basic Latin (ISO 8859-1) og noen enkeltbokstaver i Latin Extended-A og Extended-B
  • - *
- * Spesialregler for å håndtere tegn utover overstående regelsett blir laget for hvert enkelt tilfelle, se {@code convertKnownCharactersNotHandledByNormalization()}. - * Resten ignoreres/bevares. Se read-me for detaljer.
- */ - public String translitterer(String str) { - - if (isNull(str)) { - return null; - } - - final var prepared = preprocess(str); - final var normalized = pattern.matcher(Normalizer.normalize(prepared, Normalizer.Form.NFD)).replaceAll(""); - final var processed = postprocess(normalized); - String text = convertKnownCharactersNotHandledByNormalization(processed); - return cyrillicToLatinTrans.transliterate(text); - } - - private String preprocess(String str) { - // replace wanted characters with non-printable characters to save them from normalization - for (Entry entry : PRINTABLE_BY_NON_PRINTABLE.entrySet()) { - - var original = entry.getKey(); - var nonPrintable = entry.getValue(); - str = str.replace(nonPrintable.toString(), ""); - str = str.replace(original, nonPrintable); - } - return str; - } - - private String postprocess(String str) { - // replace non-printable characters with original characters after normalization - for (Entry entry : PRINTABLE_BY_NON_PRINTABLE.entrySet()) { - var original = entry.getKey(); - var nonPrintable = entry.getValue(); - str = str.replace(nonPrintable, original); - } - return str; - } - - private String convertKnownCharactersNotHandledByNormalization(String str) { - // replace characters not covered by normalization - return str - .replace('\u0189', 'D') // 'Ɖ' Afrikansk D - .replace('\u0256', 'd') // 'ɖ' Liten afrikansk d med hale - .replace('\u00D0', 'D') // 'Ð' Stor eth (islandsk) - .replace('\u00F0', 'd') // 'ð' Liten eth - .replace('\u0110', 'D') // 'Đ' Stor D med strek (samisk, slavisk, vietnamesisk, mf.) - .replace('\u0111', 'd') // 'đ' Liten d med strek - .replace('\u01E4', 'G') // 'Ǥ' Stor G med strek (samisk) - .replace('\u01E5', 'g') // Liten g med strek (samisk) - .replace('ı', 'i') // LATIN SMALL LETTER DOTLESS I U+0131 - .replace('Ł', 'L') - .replace('ł', 'l') - .replace('Ŋ', 'N') - .replace('ŋ', 'n') - .replace('Ŧ', 'T') - .replace('ŧ', 't') - .replace('Ɓ', 'B') // B med krok - .replace('ɓ', 'b') // b med krok - .replace('\u0187', 'C') // C med krok - .replace('\u0188', 'c') // c med krok - .replace('Ɗ', 'D') // D med krok - .replace('ɗ', 'd') // d med krok - .replace('Ɠ', 'G') // G med krok - .replace('ɠ', 'g') // g med krok - .replace('Ƙ', 'K') // K med krok - .replace('ƙ', 'k') // k med krok - .replace('Ƥ', 'P') // P med krok - .replace('ƥ', 'p') // p med krok - .replace('Ƭ', 'T') // T med krok - .replace('ƭ', 't') // t med krok - .replace('\u01B3', 'Y') // 'Ƴ', Y med krok U+01B3 - .replace('\u01B4', 'y') // 'ƴ', y med krok U+01B4 - .replace("Þ", "TH") - .replace("þ", "th") - .replace("ß", "ss") - .replace("⁰", "") - .replace("Ԉ", "(komi lje)") - .replace("Б", "be") // cyrillisk Komi Lje - .replace("\u001A", " ") // "substitute" control char (ascii 26) - - // strek symboler, finnes mange fler men tar en så lenge bare de vi har sett (https://en.wikipedia.org/wiki/Dash#Unicode) - .replace("–", "-") // Kort Tankestrek til Bindestrek - .replace("—", "-"); // Lang Tankestrek til Bindestrek - } -} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/resources/application-prod.yaml b/apps/tps-messaging-service/src/main/resources/application-prod.yaml new file mode 100644 index 00000000000..896466cec53 --- /dev/null +++ b/apps/tps-messaging-service/src/main/resources/application-prod.yaml @@ -0,0 +1,9 @@ + +spring: + security: + oauth2: + resourceserver: + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/resources/application.yaml b/apps/tps-messaging-service/src/main/resources/application.yaml index d55c85176d4..68eb6a128f4 100644 --- a/apps/tps-messaging-service/src/main/resources/application.yaml +++ b/apps/tps-messaging-service/src/main/resources/application.yaml @@ -3,6 +3,9 @@ AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535 spring: application: name: testnav-tps-messaging-service + cloud: + vault: + enabled: false flyway: enabled: false security: @@ -12,13 +15,6 @@ spring: issuer-uri: ${AAD_ISSUER_URI}/v2.0 jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} - tokenx: - issuer-uri: ${TOKEN_X_ISSUER} - jwk-set-uri: ${TOKEN_X_JWKS_URI} - accepted-audience: ${TOKEN_X_CLIENT_ID} - cloud: - vault: - enabled: false springdoc: swagger-ui: @@ -68,6 +64,7 @@ management: metrics: export: enabled: true + server: servlet: encoding: diff --git a/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java b/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java index bdd45254bf4..a2835984b37 100644 --- a/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java +++ b/apps/tps-messaging-service/src/test/java/no/nav/testnav/apps/tpsmessagingservice/ApplicationContextTest.java @@ -25,4 +25,4 @@ void load_app_context() { assertThat(true).isTrue(); } -} +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java index b489d637b77..f3ba9c037fe 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v1/FoedselsmeldingDTO.java @@ -12,6 +12,7 @@ @AllArgsConstructor @NoArgsConstructor(force = true) public class FoedselsmeldingDTO { + String identFar; String identMor; String identtype; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java new file mode 100644 index 00000000000..43b8d22c0f8 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/AdresseFra.java @@ -0,0 +1,7 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum AdresseFra { + LAG_NY_ADRESSE, + ARV_FRA_MORS, + ARV_FRA_FARS +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java new file mode 100644 index 00000000000..83b879d2492 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingDTO.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +import java.time.LocalDate; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class DoedsmeldingDTO { + + String ident; + LocalDate doedsdato; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java new file mode 100644 index 00000000000..7d729a22168 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/DoedsmeldingResponseDTO.java @@ -0,0 +1,20 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingResponseDTO { + + private String ident; + private Map miljoStatus; + + private String error; +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java new file mode 100644 index 00000000000..2b7ede29057 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingDTO.java @@ -0,0 +1,22 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +import java.time.LocalDate; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class FoedselsmeldingDTO { + + String identFar; + String identMor; + Identtype identtype; + LocalDate foedselsdato; + Kjoenn kjoenn; + AdresseFra adresseFra; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java new file mode 100644 index 00000000000..c61fce4c5c0 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/FoedselsmeldingResponseDTO.java @@ -0,0 +1,20 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingResponseDTO { + + private String ident; + private Map miljoStatus; + + private String error; +} \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java new file mode 100644 index 00000000000..326333c2de5 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Identtype.java @@ -0,0 +1,8 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum Identtype { + + FNR, + DNR, + BOST +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java new file mode 100644 index 00000000000..cd76040f29e --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/KansellerDoedsmeldingDTO.java @@ -0,0 +1,15 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import lombok.Value; + +@Value +@Builder +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class KansellerDoedsmeldingDTO { + + String ident; +} diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java new file mode 100644 index 00000000000..975a8ffd376 --- /dev/null +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/endringsmelding/v2/Kjoenn.java @@ -0,0 +1,7 @@ +package no.nav.testnav.libs.dto.endringsmelding.v2; + +public enum Kjoenn { + GUTT, + JENTE, + UKJENT +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java index 9e941f3622e..b2ae6fd4b22 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdresseDTO.java @@ -5,10 +5,12 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; import java.time.LocalDateTime; @Data +@SuperBuilder @NoArgsConstructor @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "adressetype") @JsonSubTypes({ @@ -19,14 +21,16 @@ public abstract class AdresseDTO { private String kommunenr; + private String kommuneNavn; private LocalDateTime flyttedato; private LocalDateTime gyldigTilDato; private String postnr; + private String poststed; private String tilleggsadresse; private String bolignr; private Boolean deltAdresse; private String matrikkelId; - private Adressetype adressetype; + public abstract Adressetype getAdressetype(); public enum Adressetype {GATE, MATR} } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java new file mode 100644 index 00000000000..0948d9874d9 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkDTO.java @@ -0,0 +1,227 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AdressehistorikkDTO { + + public enum PersonStatus { + ABNR, + ADNR, + BOSA, + DØD, + DØDD, + FØDR, + FOSV, + UREG, + UTPE, + UTAN, + UFUL, + UTVA + } + + private String miljoe; + private TpsMeldingResponse status; + private PersonData persondata; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PersonData { + private String Ident; + private String identType; + private List personStatus; + private List bostedsAdresse; + private List postAdresse; + private List tilleggAdresseNAV; + + public List getPersonStatus() { + + if (isNull(personStatus)) { + personStatus = new ArrayList<>(); + } + return personStatus; + } + + public List getBostedsAdresse() { + + if (isNull(bostedsAdresse)) { + bostedsAdresse = new ArrayList<>(); + } + return bostedsAdresse; + } + + public List getPostAdresse() { + + if (isNull(postAdresse)) { + postAdresse = new ArrayList<>(); + } + return postAdresse; + } + + public List getTilleggAdresseNAV() { + + if (isNull(tilleggAdresseNAV)) { + tilleggAdresseNAV = new ArrayList<>(); + } + return tilleggAdresseNAV; + } + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PersonstatusType { + + protected LocalDate datoFom; + protected LocalDate datoTom; + protected PersonStatus kodePersonstatus; + protected LocalDateTime tidspunktReg; + protected String system; + protected String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class BoAdresseType { + private LocalDate datoFom; + private LocalDate datoTom; + private String adresse1; + private String adresse2; + private String tilleggsAdresseSKD; + private String kommunenr; + private String kommuneNavn; + private String bolignr; + private String postnr; + private String poststed; + private String landKode; + private String land; + private String adresseType; + private String beskrAdrType; + private LOffAdrType offAdresse; + private LMatrAdrType matrAdresse; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PostAdresseType { + + private LocalDate datoFom; + private LocalDate datoTom; + private String landKode; + private String land; + private String adresseType; + private String beskrAdrType; + private String adresse1; + private String adresse2; + private String adresse3; + private String postnr; + private String poststed; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class NavTilleggType { + + private LocalDate datoFom; + private LocalDate datoTom; + private String adresseType; + private String beskrAdrType; + private String typeAdresseNavNorge; + private String beskrTypeAdresseNavNorge; + private String typeTilleggsLinje; + private String beskrTypeTilleggsLinje; + private String tilleggsLinje; + private String kommunenr; + private String kommuneNavn; + private String gatekode; + private String gatenavn; + private String husnr; + private String husbokstav; + private String eiendomsnavn; + private String bolignr; + private String postboksnr; + private String postboksAnlegg; + private String postnr; + private String poststed; + private String landKode; + private String land; + private String adresse1; + private String adresse2; + private String adresse3; + private LocalDateTime tidspunktReg; + private String system; + private String saksbehandler; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class LOffAdrType { + + private String gatekode; + private String gateNavn; + private String husnr; + private String bokstav; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class LMatrAdrType { + + protected String mellomAdresse; + protected String gardsnr; + protected String bruksnr; + protected String festenr; + protected String undernr; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public static class TpsMeldingResponse { + + private String returStatus; + private String returMelding; + private String utfyllendeMelding; + } + + public boolean isOk() { + + return nonNull(status) && "OK".equals(status.getReturStatus()); + } +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java new file mode 100644 index 00000000000..cc03d94cf36 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/AdressehistorikkRequest.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class AdressehistorikkRequest { + + private String ident; + private LocalDate aksjonsdato; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java new file mode 100644 index 00000000000..14a81480d20 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingRequest.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDate; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingRequest { + + private String ident; + private LocalDate doedsdato; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java new file mode 100644 index 00000000000..1cc4f590840 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/DoedsmeldingResponse.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DoedsmeldingResponse { + + private String ident; + private Map miljoStatus; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java new file mode 100644 index 00000000000..cc8a798d610 --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingRequest.java @@ -0,0 +1,17 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingRequest { + + private PersonDTO barn; + private PersonDTO mor; + private PersonDTO far; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java new file mode 100644 index 00000000000..9b055c124fb --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/FoedselsmeldingResponse.java @@ -0,0 +1,18 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class FoedselsmeldingResponse { + + private String ident; + private Map miljoStatus; +} diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java index d9ce3d70123..47179d98b40 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/GateadresseDTO.java @@ -2,13 +2,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.SuperBuilder; @Data -@Builder +@ToString(callSuper = true) +@SuperBuilder @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @@ -19,5 +21,12 @@ public class GateadresseDTO extends AdresseDTO { private String husnummer; + private String husbokstav; + private String gatekode; + + @Override + public Adressetype getAdressetype() { + return Adressetype.GATE; + } } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java new file mode 100644 index 00000000000..d6b71aef34f --- /dev/null +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/IdentMiljoeDTO.java @@ -0,0 +1,31 @@ +package no.nav.testnav.libs.data.tpsmessagingservice.v1; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.HashSet; +import java.util.Set; + +import static java.util.Objects.isNull; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class IdentMiljoeDTO { + + private String ident; + private Set miljoer; + + public Set getMiljoer() { + + if (isNull(miljoer)) { + miljoer = new HashSet<>(); + } + return miljoer; + } +} \ No newline at end of file diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java index 360c6e67fb0..26ede8186a0 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/MatrikkeladresseDTO.java @@ -2,13 +2,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.SuperBuilder; @Data -@Builder +@ToString(callSuper = true) +@SuperBuilder @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @@ -24,4 +26,9 @@ public class MatrikkeladresseDTO extends AdresseDTO { private String festenr; private String undernr; + + @Override + public Adressetype getAdressetype() { + return Adressetype.MATR; + } } diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java index bfad5551584..5e7930b1f28 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/tpsmessagingservice/v1/PersonDTO.java @@ -13,6 +13,7 @@ import java.util.List; import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; @Data @Builder @@ -105,4 +106,9 @@ public List getTelefonnumre() { } return telefonnumre; } + + public boolean isDoed() { + + return nonNull(doedsdato); + } } From 69db3ed4057a26a57de0f8d78deae64b9266bc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Thu, 14 Mar 2024 14:12:42 +0100 Subject: [PATCH 08/16] Feature/amelding progress indikator (#3431) Feilretting ved innsending av Amelding --- .../dolly/DollyBackendApplicationStarter.java | 2 +- .../dolly/bestilling/aareg/AaregClient.java | 3 +- .../aareg/amelding/AmeldingConsumer.java | 33 +++++++++++++++---- .../aareg/amelding/AmeldingService.java | 20 ++++++----- .../AmeldingRequestMappingStrategy.java | 28 ++++++++++------ .../mapper/BestillingAaregStatusMapper.java | 33 ++++++++++--------- .../OppsummeringsdokumentRepository.java | 5 --- .../service/SearchQueryUtility.java | 2 +- 8 files changed, 78 insertions(+), 48 deletions(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java index 6af8668f777..f0ef428e58d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java @@ -10,4 +10,4 @@ public static void main(String[] args) { SpringApplication.run(DollyBackendApplicationStarter.class, args); } -} \ No newline at end of file +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java index 7e7b9949089..2d1f778f561 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java @@ -68,6 +68,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly var initStatus = miljoer.stream() .map(miljo -> String.format("%s:%s", miljo, getInfoVenter(SYSTEM))) .collect(Collectors.joining(",")); + transactionHelperService.persister(progress, BestillingProgress::getAaregStatus, BestillingProgress::setAaregStatus, initStatus); @@ -79,7 +80,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly return sendArbeidsforhold(bestilling, dollyPerson, miljoerTrygg.get(), isOpprettEndre); } else { - return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get()); + return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get(), progress); } }) .map(status -> futurePersist(progress, status)); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java index 764d7cecd77..a967466d8b0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java @@ -5,18 +5,24 @@ import lombok.extern.slf4j.Slf4j; import no.nav.dolly.bestilling.aareg.command.AmeldingPutCommand; import no.nav.dolly.config.Consumers; +import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.Timed; import no.nav.testnav.libs.dto.ameldingservice.v1.AMeldingDTO; import no.nav.testnav.libs.dto.ameldingservice.v1.VirksomhetDTO; import no.nav.testnav.libs.securitycore.domain.ServerProperties; import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; +import org.slf4j.event.Level; import org.springframework.http.HttpStatus; +import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; +import reactor.netty.resources.ConnectionProvider; +import java.time.Duration; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.stream.Collectors; @@ -30,7 +36,6 @@ public class AmeldingConsumer { private static final String JURIDISK_ENHET_IKKE_FUNNET = "Feil= Juridisk enhet for organisasjon(ene): %s ble ikke funnet i miljø"; private static final DateTimeFormatter YEAR_MONTH = DateTimeFormatter.ofPattern("yyyy-MM"); - private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; @@ -41,19 +46,29 @@ public AmeldingConsumer( Consumers consumers, ObjectMapper objectMapper, ErrorStatusDecoder errorStatusDecoder, - WebClient.Builder webClientBuilder - ) { + WebClient.Builder webClientBuilder) { + this.tokenService = tokenService; serverProperties = consumers.getTestnavAmeldingService(); this.webClient = webClientBuilder .baseUrl(serverProperties.getUrl()) .exchangeStrategies(getJacksonStrategy(objectMapper)) + .clientConnector( + new ReactorClientHttpConnector( + HttpClient + .create(ConnectionProvider.builder("Testnorge connection pool") + .maxConnections(5) + .pendingAcquireMaxCount(10000) + .pendingAcquireTimeout(Duration.ofMinutes(30)) + .build()) + .responseTimeout(Duration.ofSeconds(3)) + )) .build(); this.errorStatusDecoder = errorStatusDecoder; } - @Timed(name = "providers", tags = { "operation", "amelding_put" }) - public Flux sendAmeldinger(List ameldinger, String miljoe) { + @Timed(name = "providers", tags = {"operation", "amelding_put"}) + public Flux sendAmeldinger(List ameldinger, String miljoe, BestillingProgress progress) { return tokenService.exchange(serverProperties) .flatMapMany(token -> Flux.fromIterable(ameldinger) @@ -67,9 +82,13 @@ public Flux sendAmeldinger(List ameldinger, String miljoe) log.info("Sender Amelding {} til miljø {}: {}", amelding.getKalendermaaned().format(YEAR_MONTH), miljoe, Json.pretty(amelding)); return new AmeldingPutCommand(webClient, amelding, miljoe, token.getTokenValue()).call() - .doOnNext(status -> log.info("Ameldingstatus: {}", status.getStatusCode())) .map(status -> status.getStatusCode().is2xxSuccessful() ? "OK" : - errorStatusDecoder.getErrorText(HttpStatus.valueOf(status.getStatusCode().value()), status.getBody())); + errorStatusDecoder.getErrorText(HttpStatus.valueOf(status.getStatusCode().value()), status.getBody())) + .doOnNext(status -> + log.atLevel("OK".equals(status) ? Level.INFO : Level.ERROR) + .log("Ameldingstatus: {}, miljoe: {}, kalendermåned: {}, organisasjon: {}", + status, miljoe, amelding.getKalendermaaned(), + amelding.getOpplysningspliktigOrganisajonsnummer())); } })); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java index 388baf613bc..95b766dcb39 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java @@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.MappingContext; +import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.domain.resultset.RsDollyUtvidetBestilling; import no.nav.dolly.domain.resultset.aareg.RsAareg; import no.nav.dolly.domain.resultset.aareg.RsAmeldingRequest; @@ -16,6 +17,7 @@ import reactor.core.publisher.Mono; import java.util.Collection; +import java.util.Comparator; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; @@ -25,16 +27,16 @@ @Slf4j public class AmeldingService { - private static final String STATUS_ELEMENT = "%s: arbforhold=1$%s"; + private static final String STATUS_ELEMENT = "%s:Amelding$%s"; private final AmeldingConsumer ameldingConsumer; private final MapperFacade mapperFacade; private final OrganisasjonServiceConsumer organisasjonServiceConsumer; public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerson dollyPerson, - Set miljoer) { + Set miljoer, BestillingProgress progress) { - var orgnumre = bestilling.getAareg().get(0).getAmelding().stream() + var orgnumre = bestilling.getAareg().getFirst().getAmelding().stream() .map(RsAmeldingRequest::getArbeidsforhold) .flatMap(Collection::stream) .map(RsArbeidsforholdAareg::getArbeidsgiver) @@ -46,14 +48,15 @@ public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerso .filter(OrganisasjonDTO::isFunnet) .collect(Collectors.toMap(OrganisasjonDTO::getOrgnummer, OrganisasjonDTO::getJuridiskEnhet)) .flatMapMany(organisasjon -> - prepareAmeldinger(bestilling.getAareg().get(0), dollyPerson.getIdent(), - organisasjon, miljoe)) + prepareAmeldinger(bestilling.getAareg().getFirst(), dollyPerson.getIdent(), + organisasjon, miljoe, progress)) .collect(Collectors.joining(","))) .flatMap(Flux::from) .collect(Collectors.joining(",")); } - private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, String miljoe) { + private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, + String miljoe, BestillingProgress progress) { var context = new MappingContext.Factory().getContext(); context.setProperty("personIdent", ident); @@ -62,9 +65,10 @@ private Flux prepareAmeldinger(RsAareg aareg, String ident, Map mapperFacade.map(aamelding, AMeldingDTO.class, context)) + .sort(Comparator.comparing(AMeldingDTO::getKalendermaaned)) .collectList() - .flatMapMany(reultat -> ameldingConsumer.sendAmeldinger(reultat, miljoe) + .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe, progress) .distinct() - .map(status -> String.format(STATUS_ELEMENT, miljoe, status))); + .map(status -> STATUS_ELEMENT.formatted(miljoe, status))); } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java index 9d0d11df1b2..89ad49345d5 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/mapper/AmeldingRequestMappingStrategy.java @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; @@ -54,16 +55,21 @@ public void mapAtoB(RsAmeldingRequest rsAmelding, amelding.setKalendermaaned(LocalDate.of(Integer.parseInt(date[0]), Integer.parseInt(date[1]), 1)); var opplysningsPliktig = (Map) context.getProperty("opplysningspliktig"); - amelding.setOpplysningspliktigOrganisajonsnummer(opplysningsPliktig.get(rsAmelding.getArbeidsforhold().get(0).getArbeidsgiver().getOrgnummer())); + amelding.setOpplysningspliktigOrganisajonsnummer(opplysningsPliktig.get(rsAmelding.getArbeidsforhold() + .getFirst().getArbeidsgiver().getOrgnummer())); var virksomheter = mapperFacade.mapAsList(rsAmelding.getArbeidsforhold(), Virksomhet.class, context); - virksomheter.forEach(virksomhet -> { - var arbForholdId = new AtomicInteger(0); - virksomhet.getPersoner() - .forEach(person -> person.getArbeidsforhold() - .forEach(arbeidsforhold -> arbeidsforhold - .setArbeidsforholdId(Integer.toString(arbForholdId.incrementAndGet())))); - }); + var arbeidsForholdIder = new HashMap(); + virksomheter + .forEach(virksomhet -> virksomhet.getPersoner().forEach(person -> + arbeidsForholdIder.put(virksomhet.getOrganisajonsnummer()+person.getIdent(), + new AtomicInteger(0)))); + virksomheter.forEach(virksomhet -> virksomhet.getPersoner() + .forEach(person -> person.getArbeidsforhold() + .forEach(arbeidsforhold -> arbeidsforhold + .setArbeidsforholdId(Integer.toString( + arbeidsForholdIder.get(virksomhet.getOrganisajonsnummer()+person.getIdent()) + .incrementAndGet()))))); var ameldingVirksomheter = virksomheter.stream().map(virksomhet -> VirksomhetDTO.builder() .organisajonsnummer(virksomhet.getOrganisajonsnummer()) @@ -94,12 +100,14 @@ public void mapAtoB(RsArbeidsforholdAareg rsArbeidsforholdAareg, Virksomhet virk getDate(rsArbeidsforholdAareg.getAnsettelsesPeriode().getTom()) : null) .antallTimerPerUke( !rsArbeidsforholdAareg.getAntallTimerForTimeloennet().isEmpty() ? - rsArbeidsforholdAareg.getAntallTimerForTimeloennet().get(0).getAntallTimer().floatValue() : + rsArbeidsforholdAareg.getAntallTimerForTimeloennet() + .getFirst().getAntallTimer().floatValue() : getAvtaltArbeidstidPerUke(rsArbeidsforholdAareg)) .arbeidsforholdType((String) context.getProperty("arbeidsforholdstype")) .arbeidstidsordning(rsArbeidsforholdAareg.getArbeidsavtale().getArbeidstidsordning()) .fartoey(nonNull(rsArbeidsforholdAareg.getFartoy()) && !rsArbeidsforholdAareg.getFartoy().isEmpty() ? - mapperFacade.map(rsArbeidsforholdAareg.getFartoy().get(0), FartoeyDTO.class) : null) + mapperFacade.map(rsArbeidsforholdAareg.getFartoy() + .getFirst(), FartoeyDTO.class) : null) .inntekter( (nonNull(rsArbeidsforholdAareg.getUtenlandsopphold()) && !rsArbeidsforholdAareg.getUtenlandsopphold().isEmpty()) || diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java index 65cde2d4305..b648b8b13cb 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingAaregStatusMapper.java @@ -8,12 +8,12 @@ import no.nav.dolly.domain.resultset.RsStatusRapport; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static no.nav.dolly.domain.resultset.SystemTyper.AAREG; import static no.nav.dolly.mapper.AbstractRsStatusMiljoeIdentForhold.checkAndUpdateStatus; @@ -43,23 +43,26 @@ public static List buildAaregStatusMap(List } }); - return errorEnvIdents.isEmpty() ? emptyList() : - singletonList(RsStatusRapport.builder().id(AAREG).navn(AAREG.getBeskrivelse()) - .statuser(errorEnvIdents.entrySet().stream().map(status -> - RsStatusRapport.Status.builder() - .melding(status.getKey().replace(";", ",")) - .detaljert(status.getValue().entrySet().stream().map(miljo -> - RsStatusRapport.Detaljert.builder() - .miljo(miljo.getKey()) - .identer(miljo.getValue()) - .build()) - .toList()) - .build()) - .toList()) + var statuser = errorEnvIdents.entrySet().stream().map(status -> + RsStatusRapport.Status.builder() + .melding(status.getKey().replace(";", ",")) + .detaljert(status.getValue().entrySet().stream().map(miljo -> + RsStatusRapport.Detaljert.builder() + .miljo(miljo.getKey()) + .identer(miljo.getValue()) + .build()) + .toList()) + .build()) + .toList(); + + return statuser.isEmpty() ? Collections.emptyList() : + singletonList(RsStatusRapport.builder() + .navn(AAREG.getBeskrivelse()) + .id(AAREG) + .statuser(statuser) .build()); } - public static String konverterBAfeilkodeTilFeilmelding(String baKode) { var baFeilkode = getBaFeilkodeFromFeilmelding(baKode); try { diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java index 9e22e797374..a744f3ab626 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/repository/OppsummeringsdokumentRepository.java @@ -1,14 +1,9 @@ package no.nav.testnav.apps.oppsummeringsdokumentservice.repository; import no.nav.testnav.apps.oppsummeringsdokumentservice.repository.model.OppsummeringsdokumentModel; -import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.Populasjon; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; public interface OppsummeringsdokumentRepository extends ElasticsearchRepository { - void deleteAllByMiljoAndPopulasjon(String miljo, Populasjon populasjon); - - void deleteAllByMiljo(String miljo); - } diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java index a596653e8bc..4331755b721 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/service/SearchQueryUtility.java @@ -23,8 +23,8 @@ public static QueryBuilder prepareQuery(QueryRequest request) { matchString(query, "_id", request.getId()); matchString(query, "miljo", request.getMiljo()); + matchString(query, "opplysningspliktigOrganisajonsnummer", request.getOrgnummer()); matchString(query, "virksomheter.personer.ident", request.getIdent()); - matchString(query, "virksomheter.organisajonsnummer", request.getOrgnummer()); matchString(query, "virksomheter.personer.arbeidsforhold.typeArbeidsforhold", request.getTypeArbeidsforhold()); if (nonNull(request.getFom())) { From 83cfb6131f184188f238281dafbf8f6601fed702 Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Fri, 15 Mar 2024 10:31:05 +0100 Subject: [PATCH 09/16] Datepicker og Monthpicker mindre refaktorering (#3437) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Datepicker og Monthpicker mindre refaktorering for å vise innhold etter navigering frem og tilbake og fikset bug som noen ganger viste tomt felt selv om form var fylt inn --- .../src/main/js/package-lock.json | 54 +++++++++---------- apps/dolly-frontend/src/main/js/package.json | 2 +- .../form/partials/arbeidsforholdForm.tsx | 20 +++++-- .../ui/form/inputs/datepicker/Datepicker.tsx | 26 ++++++--- .../form/inputs/monthpicker/Monthpicker.tsx | 32 ++++++++--- 5 files changed, 88 insertions(+), 46 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index ec997444229..d6094648b74 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -3120,15 +3120,15 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, "node_modules/@types/lodash": { - "version": "4.14.202", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz", - "integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", + "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", "dev": true }, "node_modules/@types/node": { - "version": "20.11.26", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.26.tgz", - "integrity": "sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==", + "version": "20.11.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", + "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3196,9 +3196,9 @@ "dev": true }, "node_modules/@types/react-dom": { - "version": "18.2.21", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.21.tgz", - "integrity": "sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==", + "version": "18.2.22", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.22.tgz", + "integrity": "sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -4950,9 +4950,9 @@ "integrity": "sha512-LO/lzYRw134LMDVnLyAf1dHE5tyO6axEFkR3TXjQIOmMkAM9YL6QsiUwuXzZAmFnuDJcs4hayOgyIYtViXFrLw==" }, "node_modules/cypress": { - "version": "13.6.6", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.6.6.tgz", - "integrity": "sha512-S+2S9S94611hXimH9a3EAYt81QM913ZVA03pUmGDfLTFa5gyp85NJ8dJGSlEAEmyRsYkioS1TtnWtbv/Fzt11A==", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.0.tgz", + "integrity": "sha512-UimjRSJJYdTlvkChcdcfywKJ6tUYuwYuk/n1uMMglrvi+ZthNhoRYcxnWgTqUtkl17fXrPAsD5XT2rcQYN1xKA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -5397,9 +5397,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.701", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz", - "integrity": "sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA==" + "version": "1.4.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.705.tgz", + "integrity": "sha512-LKqhpwJCLhYId2VVwEzFXWrqQI5n5zBppz1W9ehhTlfYU8CUUW6kClbN8LHF/v7flMgRdETS772nqywJ+ckVAw==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -10249,9 +10249,9 @@ } }, "node_modules/require-in-the-middle": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.2.0.tgz", - "integrity": "sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.2.1.tgz", + "integrity": "sha512-u5XngygsJ+XV2dBV/Pl4SrcNpUXQfmYmXtuFeHDXfzk4i4NnGnret6xKWkkJHjMHS/16yMV9pEAlAunqmjllkA==", "dependencies": { "debug": "^4.1.1", "module-details-from-path": "^1.0.3", @@ -10583,9 +10583,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.71.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz", - "integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==", + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.72.0.tgz", + "integrity": "sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -12019,14 +12019,14 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.1.tgz", - "integrity": "sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", + "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", "dev": true, "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", - "tsconfck": "^3.0.1" + "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index 1f28751bcf2..65f4d589edc 100644 --- a/apps/dolly-frontend/src/main/js/package.json +++ b/apps/dolly-frontend/src/main/js/package.json @@ -1,6 +1,6 @@ { "name": "dolly", - "version": "3.0.4", + "version": "3.0.6", "type": "module", "description": "", "main": "index.js", 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 88b0a17ace8..aa8ad5257dd 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 @@ -89,8 +89,16 @@ export const ArbeidsforholdForm = ({ } const { setError, watch, control, getValues, setValue, trigger, resetField } = useFormContext() - const [navArbeidsforholdPeriode, setNavArbeidsforholdPeriode] = useState(null as unknown as Date) - const { tidligereBestillinger } = useContext(BestillingsveilederContext) + const eksisterendeArbeidsforholdPeriode = watch(`${path}.navArbeidsforholdPeriode`) + const [navArbeidsforholdPeriode, setNavArbeidsforholdPeriode] = useState( + eksisterendeArbeidsforholdPeriode + ? new Date( + eksisterendeArbeidsforholdPeriode.year, + eksisterendeArbeidsforholdPeriode.monthValue, + ) + : null, + ) + const { tidligereBestillinger }: any = useContext(BestillingsveilederContext) const tidligereAaregBestillinger = hentUnikeAaregBestillinger(tidligereBestillinger) const erLaastArbeidsforhold = (arbeidsgiverType === ArbeidsgiverTyper.felles || @@ -101,12 +109,13 @@ export const ArbeidsforholdForm = ({ if (_.isEmpty(tidligereAaregBestillinger) || harGjortFormEndringer()) { return } - resetField('aareg', { - defaultValue: tidligereAaregBestillinger?.map((aaregBestilling) => { + setValue( + 'aareg', + tidligereAaregBestillinger?.map((aaregBestilling) => { aaregBestilling.isOppdatering = true return aaregBestilling }), - }) + ) trigger('aareg') }, [watch('aareg')]) @@ -306,6 +315,7 @@ export const ArbeidsforholdForm = ({ date={navArbeidsforholdPeriode} label="NAV arbeidsforholdsperiode" onChange={setNavArbeidsforholdPeriode} + value={navArbeidsforholdPeriode} isClearable={true} /> {arbeidsforholdstype === 'forenkletOppgjoersordning' && ( diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index dca3e42330c..09ace0a2cd0 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -1,5 +1,5 @@ import { registerLocale } from 'react-datepicker' -import { addYears, subYears } from 'date-fns' +import { addYears, isDate, subYears } from 'date-fns' import locale_nb from 'date-fns/locale/nb' import { Label } from '@/components/ui/form/inputs/label/Label' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' @@ -10,11 +10,12 @@ import './Datepicker.less' import { useFormContext } from 'react-hook-form' import { DatePicker, useDatepicker } from '@navikt/ds-react' import _ from 'lodash' +import { formatDate } from '@/utils/DataFormatter' registerLocale('nb', locale_nb) function addHours(date, amount) { - date.setHours(amount, 0, 0) + date.setHours(amount) return date } @@ -30,23 +31,36 @@ export const Datepicker = ({ maxDate, }) => { const formMethods = useFormContext() - const eksisterendeVerdi = formMethods.watch(name) - const { datepickerProps, inputProps, selectedDay } = useDatepicker({ + + const getSelectedDay = () => { + const selected = formMethods.watch(name) + if (_.isNil(selected) || _.isEmpty(selected)) { + return undefined + } else if (isDate(selected)) { + return fixTimezone(selected) + } else { + return fixTimezone(new Date(selected)) + } + } + + const { datepickerProps, inputProps } = useDatepicker({ fromDate: minDate || subYears(new Date(), 125), toDate: maxDate || addYears(new Date(), 5), onDateChange: onChange || onBlur, - defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, disabled: excludeDates, + defaultSelected: getSelectedDay(), }) + const selectedDay = getSelectedDay() return ( ) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx index b52186d5a29..40bce233630 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx @@ -1,7 +1,7 @@ import { Label } from '@/components/ui/form/inputs/label/Label' import { InputWrapper } from '@/components/ui/form/inputWrapper/InputWrapper' import { MonthPicker, useMonthpicker } from '@navikt/ds-react' -import { addYears, subYears } from 'date-fns' +import { addYears, isDate, subYears } from 'date-fns' import { useFormContext } from 'react-hook-form' import _ from 'lodash' @@ -28,24 +28,42 @@ export const Monthpicker = ({ ...props }: MonthpickerProps) => { const formMethods = useFormContext() - const eksisterendeVerdi = formMethods.watch(name) + const val = formMethods.watch(name) - const formattedDate = date instanceof Date || date === null ? date : new Date(date) + function getEksisterendeVerdi() { + if (name.includes('navArbeidsforholdPeriode')) { + return val?.year ? new Date(val?.year, val?.monthValue) : null + } + return val + } - const { monthpickerProps, inputProps, selectedMonth } = useMonthpicker({ + const eksisterendeVerdi = getEksisterendeVerdi() + + const formattedDate = + eksisterendeVerdi instanceof Date + ? eksisterendeVerdi + : date instanceof Date || date === null + ? date + : new Date(date) + + const { monthpickerProps, inputProps } = useMonthpicker({ fromDate: minDate || subYears(new Date(), 125), toDate: maxDate || addYears(new Date(), 5), onMonthChange: (selectedDate) => { - selectedDate?.setHours(12, 0, 0, 0) + selectedDate?.setHours(12) onChange ? onChange(selectedDate) : handleDateChange(selectedDate) }, - defaultSelected: !_.isEmpty(eksisterendeVerdi) ? new Date(eksisterendeVerdi) : undefined, + defaultSelected: !_.isNil(formattedDate) + ? isDate(formattedDate) + ? formattedDate + : new Date(formattedDate) + : undefined, }) return ( From 4863f869b0580d408f274accc8f3649c18cbccab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:34:24 +0100 Subject: [PATCH 10/16] Bump follow-redirects in /apps/endringsmelding-frontend/src/main/js (#3440) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- apps/endringsmelding-frontend/src/main/js/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/endringsmelding-frontend/src/main/js/package-lock.json b/apps/endringsmelding-frontend/src/main/js/package-lock.json index e465541bd01..f4e4179b166 100644 --- a/apps/endringsmelding-frontend/src/main/js/package-lock.json +++ b/apps/endringsmelding-frontend/src/main/js/package-lock.json @@ -2764,9 +2764,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From c0c2ee9d38e5e5e0d075695e8176680367e4bfc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 10:34:37 +0100 Subject: [PATCH 11/16] Bump follow-redirects in /apps/dolly-frontend/src/main/js (#3441) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- apps/dolly-frontend/src/main/js/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index d6094648b74..9e7f00d1f20 100644 --- a/apps/dolly-frontend/src/main/js/package-lock.json +++ b/apps/dolly-frontend/src/main/js/package-lock.json @@ -6524,9 +6524,9 @@ "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", From 9a22f4000a5aecc1dcb6b45dd7ac4642b715a903 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Fri, 15 Mar 2024 12:31:52 +0100 Subject: [PATCH 12/16] Set responseTimeout for HttpClientRequest in Pensjonforvalter commands Implemented a responseTimeout in the httpClientRequests for different commands in the Pensjonforvalter package. A constant REQUEST_DURATION of 30000 ms, was included in PensjonforvalterConsumer to be used as the timeout period. This enhancement will ensure that the application doesn't hang while waiting for responses if a server is slow or unresponsive. --- .../pensjonforvalter/PensjonforvalterConsumer.java | 1 + .../pensjonforvalter/command/LagreAlderspensjonCommand.java | 6 ++++++ .../pensjonforvalter/command/LagrePoppInntektCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreTpForholdCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreTpYtelseCommand.java | 6 ++++++ .../pensjonforvalter/command/LagreUforetrygdCommand.java | 6 ++++++ 6 files changed, 31 insertions(+) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java index 518fa494706..81cdf5ac5f7 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java @@ -41,6 +41,7 @@ @Service public class PensjonforvalterConsumer implements ConsumerStatus { + public static final int REQUEST_DURATION = 30000; private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java index b5f0c468b75..4c165bd170f 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -40,6 +42,10 @@ public Flux call() { .path(alderspensjonRequest instanceof AlderspensjonVedtakRequest ? PENSJON_AP_VEDTAK_URL : PENSJON_AP_SOKNAD_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java index 6b3fba6f980..28b8cfdd874 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java @@ -8,11 +8,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -35,6 +37,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(POPP_INNTEKT_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java index 108db087f52..60dca6399da 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -39,6 +41,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_TP_FORHOLD_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .header(HEADER_NAV_CALL_ID, generateCallId()) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java index 97e408b817c..69659c1eba2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java @@ -9,11 +9,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -38,6 +40,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_TP_YTELSE_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .header(HEADER_NAV_CALL_ID, generateCallId()) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java index 8d8effe2cc6..e294e1542e9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java @@ -8,11 +8,13 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; @@ -37,6 +39,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder .path(PENSJON_UT_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(AUTHORIZATION, "Bearer " + token) .header(HEADER_NAV_CALL_ID, generateCallId()) .header(HEADER_NAV_CONSUMER_ID, CONSUMER) From 9af9a0bd7383c3b9cf311cf40a34a9211fcf8efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Mon, 18 Mar 2024 12:25:42 +0100 Subject: [PATCH 13/16] Refactor httpClientRequests to add responseTimeout (#3442) Refactor httpClientRequests to add responseTimeout --- .../nav/dolly/bestilling/aareg/AaregClient.java | 2 +- .../aareg/amelding/AmeldingConsumer.java | 17 +---------------- .../aareg/amelding/AmeldingService.java | 9 ++++----- .../aareg/command/AmeldingPutCommand.java | 7 +++++++ .../command/PdlDataOppdateringCommand.java | 6 ++++++ .../command/PdlDataOpprettingCommand.java | 6 ++++++ .../pdldata/command/PdlDataOrdreCommand.java | 6 ++++++ .../PensjonforvalterConsumer.java | 1 - .../command/LagreAlderspensjonCommand.java | 2 +- .../command/LagrePoppInntektCommand.java | 2 +- .../command/LagreTpForholdCommand.java | 2 +- .../command/LagreTpYtelseCommand.java | 2 +- .../command/LagreUforetrygdCommand.java | 2 +- .../command/EgenansattPostCommand.java | 6 ++++++ .../command/TpsMessagingPostCommand.java | 6 ++++++ .../java/no/nav/dolly/util/RequestTimeout.java | 9 +++++++++ 16 files changed, 57 insertions(+), 28 deletions(-) create mode 100644 apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java index 2d1f778f561..9333c6fe6b2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/AaregClient.java @@ -80,7 +80,7 @@ public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly return sendArbeidsforhold(bestilling, dollyPerson, miljoerTrygg.get(), isOpprettEndre); } else { - return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get(), progress); + return ameldingService.sendAmelding(bestilling, dollyPerson, miljoerTrygg.get()); } }) .map(status -> futurePersist(progress, status)); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java index a967466d8b0..7891bc02455 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingConsumer.java @@ -5,7 +5,6 @@ import lombok.extern.slf4j.Slf4j; import no.nav.dolly.bestilling.aareg.command.AmeldingPutCommand; import no.nav.dolly.config.Consumers; -import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.errorhandling.ErrorStatusDecoder; import no.nav.dolly.metrics.Timed; import no.nav.testnav.libs.dto.ameldingservice.v1.AMeldingDTO; @@ -14,15 +13,11 @@ import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; import org.slf4j.event.Level; import org.springframework.http.HttpStatus; -import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import reactor.netty.http.client.HttpClient; -import reactor.netty.resources.ConnectionProvider; -import java.time.Duration; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.stream.Collectors; @@ -53,22 +48,12 @@ public AmeldingConsumer( this.webClient = webClientBuilder .baseUrl(serverProperties.getUrl()) .exchangeStrategies(getJacksonStrategy(objectMapper)) - .clientConnector( - new ReactorClientHttpConnector( - HttpClient - .create(ConnectionProvider.builder("Testnorge connection pool") - .maxConnections(5) - .pendingAcquireMaxCount(10000) - .pendingAcquireTimeout(Duration.ofMinutes(30)) - .build()) - .responseTimeout(Duration.ofSeconds(3)) - )) .build(); this.errorStatusDecoder = errorStatusDecoder; } @Timed(name = "providers", tags = {"operation", "amelding_put"}) - public Flux sendAmeldinger(List ameldinger, String miljoe, BestillingProgress progress) { + public Flux sendAmeldinger(List ameldinger, String miljoe) { return tokenService.exchange(serverProperties) .flatMapMany(token -> Flux.fromIterable(ameldinger) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java index 95b766dcb39..ad4c851d363 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/amelding/AmeldingService.java @@ -4,7 +4,6 @@ import lombok.extern.slf4j.Slf4j; import ma.glasnost.orika.MapperFacade; import ma.glasnost.orika.MappingContext; -import no.nav.dolly.domain.jpa.BestillingProgress; import no.nav.dolly.domain.resultset.RsDollyUtvidetBestilling; import no.nav.dolly.domain.resultset.aareg.RsAareg; import no.nav.dolly.domain.resultset.aareg.RsAmeldingRequest; @@ -34,7 +33,7 @@ public class AmeldingService { private final OrganisasjonServiceConsumer organisasjonServiceConsumer; public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerson dollyPerson, - Set miljoer, BestillingProgress progress) { + Set miljoer) { var orgnumre = bestilling.getAareg().getFirst().getAmelding().stream() .map(RsAmeldingRequest::getArbeidsforhold) @@ -49,14 +48,14 @@ public Mono sendAmelding(RsDollyUtvidetBestilling bestilling, DollyPerso .collect(Collectors.toMap(OrganisasjonDTO::getOrgnummer, OrganisasjonDTO::getJuridiskEnhet)) .flatMapMany(organisasjon -> prepareAmeldinger(bestilling.getAareg().getFirst(), dollyPerson.getIdent(), - organisasjon, miljoe, progress)) + organisasjon, miljoe)) .collect(Collectors.joining(","))) .flatMap(Flux::from) .collect(Collectors.joining(",")); } private Flux prepareAmeldinger(RsAareg aareg, String ident, Map organisasjon, - String miljoe, BestillingProgress progress) { + String miljoe) { var context = new MappingContext.Factory().getContext(); context.setProperty("personIdent", ident); @@ -67,7 +66,7 @@ private Flux prepareAmeldinger(RsAareg aareg, String ident, Map mapperFacade.map(aamelding, AMeldingDTO.class, context)) .sort(Comparator.comparing(AMeldingDTO::getKalendermaaned)) .collectList() - .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe, progress) + .flatMapMany(ameldinger -> ameldingConsumer.sendAmeldinger(ameldinger, miljoe) .distinct() .map(status -> STATUS_ELEMENT.formatted(miljoe, status))); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java index 7abf1f1b253..b675a80a052 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/aareg/command/AmeldingPutCommand.java @@ -9,11 +9,14 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; + @RequiredArgsConstructor public class AmeldingPutCommand implements Callable>> { @@ -31,6 +34,10 @@ public Mono> call() { return webClient.put() .uri(uriBuilder -> uriBuilder.path(AMELDING_URL) .build()) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, TokenXUtil.getUserJwt()) .header(MILJOE, miljo) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java index aea49ffdfb4..47d8da35b38 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOppdateringCommand.java @@ -13,12 +13,14 @@ import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @Slf4j @@ -37,6 +39,10 @@ public Flux call() { return webClient .put() .uri(PDL_FORVALTER_PERSONER_URL, ident) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java index e476b4e6ce9..ee9a194e245 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOpprettingCommand.java @@ -13,12 +13,14 @@ import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @Slf4j @@ -36,6 +38,10 @@ public Flux call() { return webClient .post() .uri(PDL_FORVALTER_PERSONER_URL) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java index 353b0290336..1b9dcc72e2b 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pdldata/command/PdlDataOrdreCommand.java @@ -10,12 +10,14 @@ import org.springframework.http.MediaType; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.net.http.HttpTimeoutException; import java.time.Duration; import java.util.concurrent.Callable; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; @RequiredArgsConstructor @@ -36,6 +38,10 @@ public Flux call() { .uri(uriBuilder -> uriBuilder.path(PDL_FORVALTER_ORDRE_URL) .queryParam(EXCLUDE_EKSTERNE_PERSONER, ekskluderEksternePersoner) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) .contentType(MediaType.APPLICATION_JSON) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java index 81cdf5ac5f7..518fa494706 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterConsumer.java @@ -41,7 +41,6 @@ @Service public class PensjonforvalterConsumer implements ConsumerStatus { - public static final int REQUEST_DURATION = 30000; private final TokenExchange tokenService; private final WebClient webClient; private final ServerProperties serverProperties; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java index 4c165bd170f..1a7c18149f2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreAlderspensjonCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java index 28b8cfdd874..48c050b98c8 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagrePoppInntektCommand.java @@ -14,11 +14,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java index 60dca6399da..4a4b5488661 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpForholdCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; import static org.springframework.http.HttpHeaders.AUTHORIZATION; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java index 69659c1eba2..f6f41a82704 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreTpYtelseCommand.java @@ -15,11 +15,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static no.nav.dolly.util.TokenXUtil.getUserJwt; import static org.springframework.http.HttpHeaders.AUTHORIZATION; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java index e294e1542e9..dd1d77c0d1c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreUforetrygdCommand.java @@ -14,11 +14,11 @@ import java.time.Duration; import java.util.concurrent.Callable; -import static no.nav.dolly.bestilling.pensjonforvalter.PensjonforvalterConsumer.REQUEST_DURATION; import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; import static no.nav.dolly.util.CallIdUtil.generateCallId; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; import static org.springframework.http.HttpHeaders.AUTHORIZATION; @Slf4j diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java index 132696f1460..8cae609e3e0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/EgenansattPostCommand.java @@ -9,6 +9,7 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; @@ -18,6 +19,7 @@ import java.util.concurrent.Callable; import static java.util.Objects.nonNull; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; @RequiredArgsConstructor @Slf4j @@ -44,6 +46,10 @@ public Flux call() { .queryParamIfPresent(MILJOER_PARAM, nonNull(miljoer) ? Optional.of(miljoer) : Optional.empty()) .queryParam(EGENANSATT_FRA_PARAM, datoFra) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .contentType(MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java index cf17fa53891..a2d111acb97 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/command/TpsMessagingPostCommand.java @@ -9,6 +9,7 @@ import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientRequest; import reactor.util.retry.Retry; import java.time.Duration; @@ -17,6 +18,7 @@ import java.util.concurrent.Callable; import static java.util.Objects.nonNull; +import static no.nav.dolly.util.RequestTimeout.REQUEST_DURATION; @RequiredArgsConstructor @Slf4j @@ -41,6 +43,10 @@ public Flux call() { .path(urlPath) .queryParamIfPresent(MILJOER_PARAM, nonNull(miljoer) ? Optional.of(miljoer) : Optional.empty()) .build(ident)) + .httpRequest(httpRequest -> { + HttpClientRequest reactorRequest = httpRequest.getNativeRequest(); + reactorRequest.responseTimeout(Duration.ofSeconds(REQUEST_DURATION)); + }) .contentType(MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .bodyValue(body) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java b/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java new file mode 100644 index 00000000000..4f646e47f71 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/util/RequestTimeout.java @@ -0,0 +1,9 @@ +package no.nav.dolly.util; + +import lombok.experimental.UtilityClass; + +@UtilityClass +public class RequestTimeout { + + public static final int REQUEST_DURATION = 30000; +} From 7dc03210e8f6a08c620eefa5e740167ad389b9d3 Mon Sep 17 00:00:00 2001 From: Betsy Carina Traran Date: Mon, 18 Mar 2024 13:56:00 +0100 Subject: [PATCH 14/16] Fix dato som ikke vises --- .../js/src/components/ui/form/inputs/datepicker/Datepicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx index 09ace0a2cd0..af34c0e70f6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/Datepicker.tsx @@ -34,7 +34,7 @@ export const Datepicker = ({ const getSelectedDay = () => { const selected = formMethods.watch(name) - if (_.isNil(selected) || _.isEmpty(selected)) { + if (_.isNil(selected) || (!isDate(selected) && _.isEmpty(selected))) { return undefined } else if (isDate(selected)) { return fixTimezone(selected) From c9ece8eb052de1c631864a988340ef91b5a90a69 Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Wed, 20 Mar 2024 15:19:52 +0100 Subject: [PATCH 15/16] Replace Integer with BigInteger in TenorRequest Several fields in TenorRequest.java that were of type Integer have been replaced with BigInteger. This was done to accommodate larger numerical values that may not fit in the range of Integer. Additionally, a setting to always include error messages was added in application.yml. --- .../domain/TenorRequest.java | 23 ++++++++++--------- .../src/main/resources/application.yml | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java index 0415704b80a..2a2e1b4a399 100644 --- a/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java +++ b/apps/tenor-search-service/src/main/java/no/nav/testnav/apps/tenorsearchservice/domain/TenorRequest.java @@ -4,6 +4,7 @@ import lombok.Data; import lombok.NoArgsConstructor; +import java.math.BigInteger; import java.time.LocalDate; import java.time.YearMonth; import java.util.ArrayList; @@ -139,8 +140,8 @@ public static class DatoIntervall { @NoArgsConstructor public static class Intervall { - private Integer fraOgMed; - private Integer tilOgMed; + private BigInteger fraOgMed; + private BigInteger tilOgMed; } @Data @@ -159,7 +160,7 @@ public static class Adresser { @Schema(description = "Adressesøk, fritekst") private AdresseGradering adresseGradering; - private Integer kommunenummer; + private BigInteger kommunenummer; private Boolean harBostedsadresse; private Boolean harOppholdAnnetSted; private Boolean harPostadresseNorge; @@ -207,7 +208,7 @@ public static class Tjenestepensjonsavtale { public static class Skattemelding { @Schema(description = "Inntektsår, 4 siffre, årene 2018, 2019, 2020, 2021, 2022 ... osv opptil i forfjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Skattemeldingstype skattemeldingstype; } @@ -216,7 +217,7 @@ public static class Skattemelding { public static class Inntekt { private MonthInterval periode; - private Integer opplysningspliktig; + private BigInteger opplysningspliktig; private List inntektstyper; private AOrdningBeskrivelse beskrivelse; private List forskuddstrekk; @@ -254,7 +255,7 @@ public static class MonthInterval { public static class Skatteplikt { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private List skattepliktstyper; private SaerskiltSkatteplikt saerskiltSkatteplikt; @@ -271,7 +272,7 @@ public List getSkattepliktstyper() { @NoArgsConstructor public static class Tilleggsskatt { - private Integer inntektsaar; + private BigInteger inntektsaar; private List tilleggsskattTyper; public List getTilleggsskattTyper() { @@ -303,7 +304,7 @@ public static class Arbeidsforhold { public static class BeregnetSkatt { @Schema(description = "Inntektsår, 4 siffre, årene 2018, 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Oppgjoerstype oppgjoerstype; private Boolean pensjonsgivendeInntekt; } @@ -314,7 +315,7 @@ public static class BeregnetSkatt { public static class TestinnsendingSkattPerson { @Schema(description = "Inntektsår, 4 siffre, årene 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; @Schema(description = "Skattemelding utkast, merk at false indikerer har ikke skatteMeldingUtkast") private Boolean harSkattemeldingUtkast; @Schema(description = "Skattemelding fastsatt, merk at false indikerer har ikke skatteMeldingFastsatt") @@ -334,7 +335,7 @@ public static class SamletReskontroInnsyn { public static class SummertSkattegrunnlag { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Stadietype stadietype; private Oppgjoerstype oppgjoerstype; private TekniskNavn tekniskNavn; @@ -346,7 +347,7 @@ public static class SummertSkattegrunnlag { public static class SpesisfisertSummertSkattegrunnlag { @Schema(description = "Inntektsår, 4 siffre, årene 2019, 2020, 2021, 2022, 2023 ... osv opptil i fjor") - private Integer inntektsaar; + private BigInteger inntektsaar; private Stadietype stadietype; private Oppgjoerstype oppgjoerstype; private TekniskNavn tekniskNavn; diff --git a/apps/tenor-search-service/src/main/resources/application.yml b/apps/tenor-search-service/src/main/resources/application.yml index ae8b30ef805..5a061bada64 100644 --- a/apps/tenor-search-service/src/main/resources/application.yml +++ b/apps/tenor-search-service/src/main/resources/application.yml @@ -50,6 +50,8 @@ server: force: true force-request: true force-response: true + error: + include-message: always consumers: tenor-search-service: From d48b5e0df9c35411cab22a5f6afbf4746b937eef Mon Sep 17 00:00:00 2001 From: Stian Gustavsson Date: Thu, 21 Mar 2024 08:58:58 +0100 Subject: [PATCH 16/16] Setter registreringsdato til dagen etter stiftelsesdato for nye org (#3439) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Setter registreringsdato til dagen etter stiftelsesdato for nye organisasjoner * Ereg batch status spør mot modapp isteden på q2 * Mer logging og svarer med 404 dersom kall ikke kommer gjennom, slik at org-service ikke blir stuck i loop * Refaktor av batch status henting fra modapp-q2 * Skrevet om ereg-batch-status-service til reactive * Lagt til modapp ereg proxy * Endret oppsett for ereg-batch-status-service og flyttet den til gcp * Refaktorert apper til å fungere med nye ereg-batch-status-service i dev-gcp * Refaktorert org-bestilling-service --- .../app.ereg-batch-status-service.yml | 2 +- .github/workflows/proxy.modapp-ereg-proxy.yml | 23 ++ .gitignore | 1 + apps/ereg-batch-status-service/README.md | 2 +- apps/ereg-batch-status-service/build.gradle | 10 +- apps/ereg-batch-status-service/config.yml | 5 +- .../ereg-batch-status-service/settings.gradle | 4 +- .../config/ApplicationConfig.java | 9 +- .../config/Consumers.java | 29 +++ .../config/EregProperties.java | 16 -- .../config/OpenApiConfig.java | 15 +- .../config/SecurityConfig.java | 33 +-- .../consumer/EregConsumer.java | 45 ++-- .../command/GetBatchStatusCommand.java | 28 ++- .../filter/SwaggerWebFilter.java | 23 ++ .../provider/BatchStatusController.java | 8 +- .../src/main/resources/application-dev.yml | 1 + .../src/main/resources/application.yml | 20 +- .../src/main/resources/bootstrap.yml | 4 - .../config.yml | 4 +- .../command/GetEregBatchStatusCommand.java | 29 ++- .../src/main/resources/application.yml | 6 +- .../organisasjonmottak/domain/Record.java | 40 +-- .../listener/OrganisasjonMottakListener.java | 14 ++ .../organisasjonmottak/domain/RecordTest.java | 42 ++++ .../EregProxyApplicationStarter.java | 4 +- proxies/modapp-ereg-proxy/Dockerfile | 8 + proxies/modapp-ereg-proxy/build.gradle | 71 ++++++ proxies/modapp-ereg-proxy/config.yml | 66 +++++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + proxies/modapp-ereg-proxy/gradlew | 234 ++++++++++++++++++ proxies/modapp-ereg-proxy/gradlew.bat | 89 +++++++ proxies/modapp-ereg-proxy/gradlewUpdate.sh | 3 + proxies/modapp-ereg-proxy/settings.gradle | 18 ++ .../proxies/modapperegproxy/Consumers.java | 29 +++ .../ModappEregProxyApplicationStarter.java | 73 ++++++ .../src/main/resources/application.yml | 30 +++ .../src/main/resources/logback-spring.xml | 40 +++ .../ApplicationContextTest.java | 20 ++ .../src/test/resources/application-test.yml | 11 + settings.gradle | 1 + 42 files changed, 982 insertions(+), 133 deletions(-) create mode 100644 .github/workflows/proxy.modapp-ereg-proxy.yml create mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java delete mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java create mode 100644 apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java create mode 100644 apps/ereg-batch-status-service/src/main/resources/application-dev.yml delete mode 100644 apps/ereg-batch-status-service/src/main/resources/bootstrap.yml create mode 100644 apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java create mode 100644 proxies/modapp-ereg-proxy/Dockerfile create mode 100644 proxies/modapp-ereg-proxy/build.gradle create mode 100644 proxies/modapp-ereg-proxy/config.yml create mode 100644 proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar create mode 100644 proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties create mode 100755 proxies/modapp-ereg-proxy/gradlew create mode 100644 proxies/modapp-ereg-proxy/gradlew.bat create mode 100755 proxies/modapp-ereg-proxy/gradlewUpdate.sh create mode 100644 proxies/modapp-ereg-proxy/settings.gradle create mode 100644 proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java create mode 100644 proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java create mode 100644 proxies/modapp-ereg-proxy/src/main/resources/application.yml create mode 100644 proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml create mode 100644 proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java create mode 100644 proxies/modapp-ereg-proxy/src/test/resources/application-test.yml diff --git a/.github/workflows/app.ereg-batch-status-service.yml b/.github/workflows/app.ereg-batch-status-service.yml index f9f8e2ac8fd..3547091010a 100644 --- a/.github/workflows/app.ereg-batch-status-service.yml +++ b/.github/workflows/app.ereg-batch-status-service.yml @@ -14,7 +14,7 @@ jobs: workflow: uses: ./.github/workflows/common.workflow.backend.yml with: - cluster: "dev-fss" + cluster: "dev-gcp" working-directory: "apps/ereg-batch-status-service" deploy-tag: "#deploy-ereg-batch-status-service" permissions: diff --git a/.github/workflows/proxy.modapp-ereg-proxy.yml b/.github/workflows/proxy.modapp-ereg-proxy.yml new file mode 100644 index 00000000000..ec4b0b6bdb9 --- /dev/null +++ b/.github/workflows/proxy.modapp-ereg-proxy.yml @@ -0,0 +1,23 @@ +name: modapp-ereg-proxy + +on: + push: + paths: + - libs/reactive-core + - libs/reactive-proxy + - libs/reactive-security + - libs/security-core + - proxies/modapp-ereg-proxy/** + - .github/workflows/proxy.modapp-ereg-proxy.yml + +jobs: + workflow: + uses: ./.github/workflows/common.workflow.backend.yml + with: + cluster: "dev-fss" + working-directory: "proxies/modapp-ereg-proxy" + deploy-tag: "#deploy-proxy" + permissions: + contents: read + id-token: write + secrets: inherit diff --git a/.gitignore b/.gitignore index 88695f9e761..82bf724a9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.idea/ *target/ *.iml +*.http # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. diff --git a/apps/ereg-batch-status-service/README.md b/apps/ereg-batch-status-service/README.md index b258606b430..030a76d60dc 100644 --- a/apps/ereg-batch-status-service/README.md +++ b/apps/ereg-batch-status-service/README.md @@ -2,7 +2,7 @@ App for å hente ut batch status. ## Swagger -Swagger finnes under [/swagger](https://ereg-batch-status-service.dev.intern.nav.no/swagger) -endepunktet til applikasjonen. +Swagger finnes under [/swagger](https://testnav-ereg-batch-status-service.intern.dev.nav.no/swagger) -endepunktet til applikasjonen. ## Lokal kjøring Ha naisdevice kjørende og kjør EregBatchServiceServiceApplicationStarter med følgende argumenter: diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index ac3f1fb375e..c5aa01d3aaa 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -44,21 +44,21 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:servlet-core' - implementation 'no.nav.testnav.libs:servlet-security' + implementation 'no.nav.testnav.libs:reactive-security' + implementation 'no.nav.testnav.libs:security-core' implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' + implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' implementation 'net.logstash.logback:logstash-logback-encoder:7.4' diff --git a/apps/ereg-batch-status-service/config.yml b/apps/ereg-batch-status-service/config.yml index 23f5416dc3e..5e1b25b8980 100644 --- a/apps/ereg-batch-status-service/config.yml +++ b/apps/ereg-batch-status-service/config.yml @@ -18,6 +18,9 @@ spec: cluster: dev-gcp - application: organisasjon-bestilling-service cluster: dev-gcp + outbound: + external: + - host: testnav-modapp-ereg-proxy.dev-fss-pub.nais.io tokenx: enabled: true azure: @@ -48,4 +51,4 @@ spec: limits: memory: 2048Mi ingresses: - - "https://ereg-batch-status-service.dev-fss-pub.nais.io" \ No newline at end of file + - "https://testnav-ereg-batch-status-service.intern.dev.nav.no" \ No newline at end of file diff --git a/apps/ereg-batch-status-service/settings.gradle b/apps/ereg-batch-status-service/settings.gradle index 5b9f453200b..8c37d66ba90 100644 --- a/apps/ereg-batch-status-service/settings.gradle +++ b/apps/ereg-batch-status-service/settings.gradle @@ -6,8 +6,8 @@ rootProject.name = 'ereg-batch-status-service' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' +includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' gradleEnterprise { buildScan { diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java index 67f13c87191..6e6b082290c 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/ApplicationConfig.java @@ -1,14 +1,17 @@ package no.nav.registre.testnorge.eregbatchstatusservice.config; +import no.nav.testnav.libs.reactivecore.config.CoreConfig; +import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.web.reactive.config.EnableWebFlux; -import no.nav.testnav.libs.servletcore.config.ApplicationCoreConfig; -import no.nav.testnav.libs.servletsecurity.config.SecureOAuth2ServerToServerConfiguration; @Configuration +@EnableWebFlux @Import({ - ApplicationCoreConfig.class, + CoreConfig.class, + SecurityConfig.class, SecureOAuth2ServerToServerConfiguration.class }) public class ApplicationConfig { diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java new file mode 100644 index 00000000000..a39eadfc259 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/Consumers.java @@ -0,0 +1,29 @@ +package no.nav.registre.testnorge.eregbatchstatusservice.config; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import static lombok.AccessLevel.PACKAGE; + +/** + * Samler alle placeholders for ulike {@code consumers.*}-konfigurasjon her, dvs. subklasser av {@code ServerProperties}. + *

+ * Husk at Spring Boot bruker relaxed binding + * mellom configuration properties og field names. + * + * @see ServerProperties + */ +@Configuration +@ConfigurationProperties(prefix = "consumers") +@NoArgsConstructor(access = PACKAGE) +@Getter +@Setter(PACKAGE) +public class Consumers { + + private ServerProperties modappEregProxy; + +} diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java deleted file mode 100644 index 4b3c4647e47..00000000000 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/EregProperties.java +++ /dev/null @@ -1,16 +0,0 @@ -package no.nav.registre.testnorge.eregbatchstatusservice.config; - -import lombok.Getter; -import lombok.Setter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -import java.util.Map; - -@Getter -@Setter -@Configuration -@ConfigurationProperties(prefix = "ereg") -public class EregProperties { - private Map envHostMap; -} diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java index 49734eadc21..d72806f2a12 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/OpenApiConfig.java @@ -7,17 +7,15 @@ import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; +import no.nav.testnav.libs.reactivecore.config.ApplicationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.http.HttpHeaders; import java.util.Arrays; -import no.nav.testnav.libs.servletcore.config.ApplicationProperties; - @Configuration -public class OpenApiConfig implements WebMvcConfigurer { +public class OpenApiConfig { @Bean public OpenAPI openApi(ApplicationProperties applicationProperties) { @@ -27,7 +25,7 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) { .scheme("bearer") .bearerFormat("JWT") .in(SecurityScheme.In.HEADER) - .name("Authorization") + .name(HttpHeaders.AUTHORIZATION) )) .addSecurityItem( new SecurityRequirement().addList("bearer-jwt", Arrays.asList("read", "write"))) @@ -47,9 +45,4 @@ public OpenAPI openApi(ApplicationProperties applicationProperties) { ) ); } - - @Override - public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/swagger").setViewName("redirect:/swagger-ui.html"); - } } \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java index 11037bdd77f..8edc18ab66e 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java @@ -1,26 +1,30 @@ package no.nav.registre.testnorge.eregbatchstatusservice.config; +import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; -import org.springframework.security.config.Customizer; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.web.SecurityFilterChain; +import org.springframework.security.config.annotation.method.configuration.EnableReactiveMethodSecurity; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; +import org.springframework.security.config.web.server.ServerHttpSecurity; +import org.springframework.security.web.server.SecurityWebFilterChain; -@EnableWebSecurity @Configuration +@EnableWebFluxSecurity +@EnableReactiveMethodSecurity +@RequiredArgsConstructor @Profile({ "prod", "dev" }) public class SecurityConfig { + private final JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager; + @Bean - public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { + public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { - httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) - .csrf(AbstractHttpConfigurer::disable) - .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( + return httpSecurity + .csrf(ServerHttpSecurity.CsrfSpec::disable) + .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,10 +33,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) - .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(Customizer.withDefaults())); - - return httpSecurity.build(); + ).permitAll().anyExchange().authenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtSpec -> jwtSpec.authenticationManager(jwtReactiveAuthenticationManager))) + .build(); } } diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java index 5a9164c9ca2..b5ed69cfced 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/EregConsumer.java @@ -1,38 +1,37 @@ package no.nav.registre.testnorge.eregbatchstatusservice.consumer; import lombok.extern.slf4j.Slf4j; -import no.nav.registre.testnorge.eregbatchstatusservice.config.EregProperties; +import no.nav.registre.testnorge.eregbatchstatusservice.config.Consumers; import no.nav.registre.testnorge.eregbatchstatusservice.consumer.command.GetBatchStatusCommand; +import no.nav.testnav.libs.reactivesecurity.exchange.TokenExchange; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; - -import java.util.Map; -import java.util.stream.Collectors; +import reactor.core.publisher.Mono; @Slf4j @Component public class EregConsumer { - private final Map envWebClientMap; + private final ServerProperties serverProperties; + private final WebClient webClient; + private final TokenExchange tokenService; + - public EregConsumer(EregProperties eregProperties) { + public EregConsumer(TokenExchange tokenService, + Consumers consumers + ) { - this.envWebClientMap = eregProperties - .getEnvHostMap() - .entrySet() - .stream() - .collect(Collectors.toMap( - Map.Entry::getKey, - entry -> WebClient.builder() - .baseUrl(entry.getValue()) - .build() - )); + this.tokenService = tokenService; + this.serverProperties = consumers.getModappEregProxy(); + this.webClient = WebClient.builder() + .baseUrl(consumers.getModappEregProxy().getUrl()) + .build(); } - public Long getStatusKode(String miljo, Long id) { - if (!envWebClientMap.containsKey(miljo)) { - throw new RuntimeException("Stotter ikke miljo: " + miljo + " i EREG."); - } else { - return new GetBatchStatusCommand(envWebClientMap.get(miljo), id).call(); - } + public Mono getStatusKode(String miljo, Long id) { + return tokenService + .exchange(serverProperties) + .flatMap(accessToken -> + new GetBatchStatusCommand(webClient, miljo, id, accessToken.getTokenValue()).call()); } -} +} \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java index fbbf9ec1e25..cf5cc38f465 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/consumer/command/GetBatchStatusCommand.java @@ -1,27 +1,45 @@ package no.nav.registre.testnorge.eregbatchstatusservice.consumer.command; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import no.nav.registre.testnorge.eregbatchstatusservice.util.WebClientFilter; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.server.ResponseStatusException; +import reactor.core.publisher.Mono; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +import static org.springframework.http.HttpHeaders.AUTHORIZATION; + @RequiredArgsConstructor -public class GetBatchStatusCommand implements Callable { +@Slf4j +public class GetBatchStatusCommand implements Callable> { private final WebClient webClient; + private final String miljoe; private final Long id; + private final String token; @Override - public Long call() { + public Mono call() { return webClient .get() - .uri(builder -> builder.path("/ereg/internal/batch/poll/{id}").build(id)) + .uri(builder -> builder.path("/{miljoe}/ereg/internal/batch/poll/{id}").build(miljoe, id)) + .header(AUTHORIZATION, "Bearer " + token) .retrieve() + .onStatus(HttpStatusCode::is4xxClientError, clientResponse -> { + if (clientResponse.statusCode().equals(HttpStatus.UNAUTHORIZED)) { + log.error("Unauthorized error occurred when calling modapp-ereg-proxy"); + return Mono.error(new ResponseStatusException(HttpStatus.NOT_FOUND, "Resource not found")); + } + log.error("Client error occurred when calling modapp-ereg-proxy"); + return Mono.error(new ResponseStatusException(clientResponse.statusCode(), "Client error occurred")); + }) .bodyToMono(Long.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) - .block(); + .filter(WebClientFilter::is5xxException)); } } diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java new file mode 100644 index 00000000000..6141d2e2409 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/filter/SwaggerWebFilter.java @@ -0,0 +1,23 @@ +package no.nav.registre.testnorge.eregbatchstatusservice.filter; + +import org.springframework.stereotype.Component; +import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.server.WebFilter; +import org.springframework.web.server.WebFilterChain; +import reactor.core.publisher.Mono; + +@Component +public class SwaggerWebFilter implements WebFilter { + @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/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java index f886c3ed961..4086e65f040 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/provider/BatchStatusController.java @@ -1,6 +1,7 @@ package no.nav.registre.testnorge.eregbatchstatusservice.provider; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import no.nav.registre.testnorge.eregbatchstatusservice.consumer.EregConsumer; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -9,7 +10,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Mono; +@Slf4j @RequiredArgsConstructor @RestController @RequestMapping("/api/v1/batch/items") @@ -17,11 +20,12 @@ public class BatchStatusController { private final EregConsumer eregConsumer; @GetMapping("/{id}") - public ResponseEntity getStatusKode(@RequestHeader("miljoe") String miljo, @PathVariable("id") Long id) { + public ResponseEntity> getStatusKode(@RequestHeader("miljoe") String miljo, @PathVariable("id") Long id) { try { var status = eregConsumer.getStatusKode(miljo, id); return ResponseEntity.ok(status); - } catch (WebClientResponseException.NotFound e) { + } catch (WebClientResponseException e) { + log.error(e.getMessage(), e); return ResponseEntity.notFound().build(); } } diff --git a/apps/ereg-batch-status-service/src/main/resources/application-dev.yml b/apps/ereg-batch-status-service/src/main/resources/application-dev.yml new file mode 100644 index 00000000000..f05debbd219 --- /dev/null +++ b/apps/ereg-batch-status-service/src/main/resources/application-dev.yml @@ -0,0 +1 @@ +TOKEN_X_ISSUER: dummy \ No newline at end of file diff --git a/apps/ereg-batch-status-service/src/main/resources/application.yml b/apps/ereg-batch-status-service/src/main/resources/application.yml index ede2e74d146..dbdd87a98e5 100644 --- a/apps/ereg-batch-status-service/src/main/resources/application.yml +++ b/apps/ereg-batch-status-service/src/main/resources/application.yml @@ -1,11 +1,14 @@ AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b spring: + cloud: + vault: + enabled: false main: banner-mode: off application: name: ereg-batch-status-service - version: application.version.todo #TODO Finn ut hvordan denne kan settes fra gradle + version: application.version.todo description: Tjeneste for å hente ut batch status fra EREG. security: oauth2: @@ -15,7 +18,7 @@ spring: jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} tokenx: - issuer-uri: ${TOKEN_X_ISSUER} + issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} accepted-audience: ${TOKEN_X_CLIENT_ID} @@ -24,13 +27,12 @@ springdoc: disable-swagger-default-url: true url: /v3/api-docs -ereg: - envHostMap: - q1: https://ereg-services-q1.dev.intern.nav.no - q2: https://ereg-services-q2.dev.intern.nav.no - q4: https://ereg-services-q4.dev.intern.nav.no - q5: https://ereg-services-q5.dev.intern.nav.no - t3: https://ereg-services-t3.dev.intern.nav.no +consumers: + modapp-ereg-proxy: + name: testnav-modapp-ereg-proxy + namespace: dolly + url: https://testnav-modapp-ereg-proxy.dev-fss-pub.nais.io + cluster: dev-fss management: endpoints: diff --git a/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml b/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml deleted file mode 100644 index 0451449ca23..00000000000 --- a/apps/ereg-batch-status-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - cloud: - vault: - enabled: false \ No newline at end of file diff --git a/apps/organisasjon-bestilling-service/config.yml b/apps/organisasjon-bestilling-service/config.yml index aac16e21e70..085a993d852 100644 --- a/apps/organisasjon-bestilling-service/config.yml +++ b/apps/organisasjon-bestilling-service/config.yml @@ -33,8 +33,10 @@ spec: - application: testnav-organisasjon-mottak-service cluster: dev-gcp outbound: + rules: + - application: ereg-batch-status-service + cluster: dev-gcp external: - - host: ereg-batch-status-service.dev-fss-pub.nais.io - host: testnorge-batch-adeo-proxy.dev-fss-pub.nais.io gcp: sqlInstances: diff --git a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java index 1efac7ce2b5..e480b8ab753 100644 --- a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java +++ b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/consumer/command/GetEregBatchStatusCommand.java @@ -1,14 +1,18 @@ package no.nav.testnav.apps.organisasjonbestillingservice.consumer.command; import lombok.RequiredArgsConstructor; -import no.nav.testnav.libs.commands.utils.WebClientFilter; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import org.springframework.web.server.ResponseStatusException; import reactor.util.retry.Retry; import java.time.Duration; import java.util.concurrent.Callable; +@Slf4j @RequiredArgsConstructor public class GetEregBatchStatusCommand implements Callable { private final WebClient webClient; @@ -18,14 +22,19 @@ public class GetEregBatchStatusCommand implements Callable { @Override public Long call() { - return webClient.get() - .uri(uriBuilder -> uriBuilder.path("/api/v1/batch/items/{id}").build(batchId)) - .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .header("miljoe", miljo) - .retrieve() - .bodyToMono(Long.class) - .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) - .block(); + try { + return webClient.get() + .uri(uriBuilder -> uriBuilder.path("/api/v1/batch/items/{id}").build(batchId)) + .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) + .header("miljoe", miljo) + .retrieve() + .bodyToMono(Long.class) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(throwable -> throwable instanceof WebClientResponseException.GatewayTimeout)) + .block(); + } catch (Exception e) { + log.error("Failed to get status for batch with id: " + batchId, e); + throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Resource not found", e); + } } } \ No newline at end of file diff --git a/apps/organisasjon-bestilling-service/src/main/resources/application.yml b/apps/organisasjon-bestilling-service/src/main/resources/application.yml index 3d3df5fd455..805ee2e6965 100644 --- a/apps/organisasjon-bestilling-service/src/main/resources/application.yml +++ b/apps/organisasjon-bestilling-service/src/main/resources/application.yml @@ -16,7 +16,7 @@ spring: jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} tokenx: - issuer-uri: ${TOKEN_X_ISSUER} + issuer-uri: ${TOKEN_X_ISSUER} jwk-set-uri: ${TOKEN_X_JWKS_URI} accepted-audience: ${TOKEN_X_CLIENT_ID} @@ -27,8 +27,8 @@ springdoc: consumers: ereg-batch-status-service: - url: https://ereg-batch-status-service.dev-fss-pub.nais.io - cluster: dev-fss + url: http://ereg-batch-status-service.dolly.svc.cluster.local + cluster: dev-gcp namespace: dolly name: ereg-batch-status-service jenkins: diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java index 0d1f11a0c4e..cecc9238ecc 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/domain/Record.java @@ -4,21 +4,36 @@ import java.util.Date; import java.util.List; +import static java.util.Objects.nonNull; + public class Record { private final StringBuilder builder = new StringBuilder(); private int record = 0; - public static Record create(List lines, String orgnummer, String enhetstype, boolean update) { + public void append(String value) { + record++; + builder.append(value); + } + + public int getRecord() { + return record; + } + + public String build() { + return builder.toString(); + } + + public static Record create(List lines, String orgnummer, String enhetstype, Date regDato, boolean update) { Record record = new Record(); - record.append(createEHN(update, orgnummer, enhetstype)); + record.append(createEHN(update, orgnummer, enhetstype, regDato)); lines.forEach(line -> record.append(line.getValue())); return record; } - private static String createEHN(boolean update, String orgnummer, String enhetstype) { + private static String createEHN(boolean update, String orgnummer, String enhetstype, Date regDato) { StringBuilder stringBuilder = createStringBuilderWithReplacement(49, ' '); - String dateNowFormatted = getDateNowFormatted(); + String dateNowFormatted = getDateNowFormatted(regDato); String undersakstype = update ? "EN" : "NY"; stringBuilder.replace(0, "ENH".length(), "ENH") @@ -41,21 +56,8 @@ private static StringBuilder createStringBuilderWithReplacement(int size, char r return stringBuilder; } - private static String getDateNowFormatted() { + private static String getDateNowFormatted(Date regDato) { SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); - return format.format(new Date()); - } - - public void append(String value) { - record++; - builder.append(value); - } - - public int getRecord() { - return record; - } - - public String build() { - return builder.toString(); + return format.format(nonNull(regDato) ? regDato : new Date()); } } diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java index 92ac3f4e787..a20a58ca856 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java @@ -29,13 +29,18 @@ import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; +import java.time.LocalDate; +import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; +import static java.util.Objects.nonNull; + @Slf4j @Profile("prod") @Component @@ -95,11 +100,20 @@ private void createRecords(List records, Organisasjon organisasjon, Orga Optional.ofNullable(organisasjon.getFormaal()).ifPresent(value -> list.add(new Formaal(value))); Optional.ofNullable(parent).ifPresent(value -> list.add(new Knytning(value, organisasjon))); + var stiftelsesDato = (nonNull(organisasjon.getStiftelsesdato()) && nonNull(organisasjon.getStiftelsesdato().getDato()) ? organisasjon.getStiftelsesdato().getDato() : null); + var regDato = (nonNull(organisasjon.getStiftelsesdato()) + //Registreringsdato settes til dagen etter stiftelsesdato hvis den er satt + ? Date.from(LocalDate.of(stiftelsesDato.getAar(), stiftelsesDato.getMaaned(), stiftelsesDato.getDag()) + .plusDays(1).atStartOfDay() + .toInstant(ZoneOffset.UTC)) + : null); + var record = Record.create( list.stream().map(ToLine::toLine) .toList(), organisasjon.getOrgnummer(), organisasjon.getEnhetstype(), + regDato, update ); diff --git a/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java b/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java new file mode 100644 index 00000000000..2db6ce7748c --- /dev/null +++ b/apps/organisasjon-mottak-service/src/test/java/no/nav/registre/testnorge/organisasjonmottak/domain/RecordTest.java @@ -0,0 +1,42 @@ +package no.nav.registre.testnorge.organisasjonmottak.domain; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.InjectMocks; +import org.mockito.MockitoAnnotations; + +import java.time.LocalDate; +import java.time.ZoneOffset; +import java.util.Collections; +import java.util.Date; + +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.Mockito.mock; + +class RecordTest { + + @InjectMocks + Record record; + + @BeforeEach + void setUp() { + MockitoAnnotations.openMocks(this); + } + + @Test + void testCreate() { + // Create mock objects + var line = mock(Line.class); + var orgnummer = "123456789"; + var enhetstype = "AS"; + var regDato = Date.from(LocalDate.of(2022, 1, 1).atStartOfDay().toInstant(ZoneOffset.UTC)); + var update = false; + + // Call method under test + var result = Record.create(Collections.singletonList(line), orgnummer, enhetstype, regDato, update); + + // Verify that the StringBuilder contains the correct date + var expectedDate = "20220101"; + assertTrue(result.build().contains(expectedDate)); + } +} \ No newline at end of file diff --git a/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java b/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java index 4ec7582870a..b5f7b4f5d37 100644 --- a/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java +++ b/proxies/ereg-proxy/src/main/java/no/nav/testnav/proxies/eregproxy/EregProxyApplicationStarter.java @@ -12,6 +12,7 @@ import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; +import org.springframework.http.HttpHeaders; import java.util.function.Function; @@ -29,8 +30,6 @@ public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { .route(createRoute("q1")) .route(createRoute("q2")) .route(createRoute("q4")) - .route(createRoute("q5")) - .route(createRoute("t3")) .build(); } @@ -43,6 +42,7 @@ private Function> createRoute(String miljo) { .path("/api/" + miljo + "/**") .filters(filterSpec -> filterSpec .rewritePath("/api/" + miljo + "/(?.*)", "/${segment}") + .removeRequestHeader(HttpHeaders.AUTHORIZATION) ).uri("https://ereg-services-" + miljo + ".dev.intern.nav.no/"); } } diff --git a/proxies/modapp-ereg-proxy/Dockerfile b/proxies/modapp-ereg-proxy/Dockerfile new file mode 100644 index 00000000000..4a36f93546f --- /dev/null +++ b/proxies/modapp-ereg-proxy/Dockerfile @@ -0,0 +1,8 @@ +FROM ghcr.io/navikt/baseimages/temurin:21 +LABEL maintainer="Team Dolly" + +ENV JAVA_OPTS="-Dspring.profiles.active=prod" + +ADD /build/libs/app.jar /app/app.jar + +EXPOSE 8080 diff --git a/proxies/modapp-ereg-proxy/build.gradle b/proxies/modapp-ereg-proxy/build.gradle new file mode 100644 index 00000000000..5f8425ba179 --- /dev/null +++ b/proxies/modapp-ereg-proxy/build.gradle @@ -0,0 +1,71 @@ +plugins { + id 'java' + id "org.sonarqube" version "4.4.1.3373" + id 'org.springframework.boot' version "3.2.1" + id 'io.spring.dependency-management' version "1.1.4" + id "jacoco" +} + +test { + useJUnitPlatform() +} + +sonarqube { + properties { + property "sonar.dynamicAnalysis", "reuseReports" + property "sonar.host.url", "https://sonarcloud.io" + property "sonar.java.coveragePlugin", "jacoco" + property "sonar.language", "java" + property "sonar.token", System.getenv("SONAR_TOKEN") + property "sonar.organization", "navikt" + property "sonar.project.monorepo.enabled", true + property "sonar.projectKey", "testnav-modapp-ereg-proxy" + property "sonar.projectName", "testnav-modapp-ereg-proxy" + property "sonar.sourceEncoding", "UTF-8" + } +} +bootJar { + archiveFileName = "app.jar" +} + +dependencyManagement { + applyMavenExclusions = false + imports { + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' + } +} + +repositories { + mavenCentral() + mavenLocal() +} + +dependencies { + + implementation 'no.nav.testnav.libs:security-core' + implementation 'no.nav.testnav.libs:reactive-core' + implementation 'no.nav.testnav.libs:reactive-proxy' + implementation 'no.nav.testnav.libs:reactive-security' + + implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' + implementation 'org.springframework.boot:spring-boot-starter-webflux' + + implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation 'org.springframework.cloud:spring-cloud-starter-gateway' + + + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation 'org.hibernate.validator:hibernate-validator' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' + + annotationProcessor 'org.projectlombok:lombok' + implementation 'org.projectlombok:lombok' + testAnnotationProcessor 'org.projectlombok:lombok' +} +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/modapp-ereg-proxy/config.yml b/proxies/modapp-ereg-proxy/config.yml new file mode 100644 index 00000000000..be0933c0b8c --- /dev/null +++ b/proxies/modapp-ereg-proxy/config.yml @@ -0,0 +1,66 @@ +--- +apiVersion: nais.io/v1 +kind: AzureAdApplication +metadata: + name: testnav-modapp-ereg-proxy-trygdeetaten + namespace: dolly + labels: + team: dolly +spec: + secretName: azure-trygdeetaten-testnav-modapp-ereg-proxy-trygdeetaten + secretKeyPrefix: "AZURE_TRYGDEETATEN" + tenant: trygdeetaten.no +--- +apiVersion: "nais.io/v1alpha1" +kind: "Application" +metadata: + name: testnav-modapp-ereg-proxy + namespace: dolly + labels: + team: dolly +spec: + image: "{{image}}" + port: 8080 + webproxy: true + tokenx: + enabled: true + azure: + application: + allowAllUsers: true + enabled: true + tenant: nav.no + accessPolicy: + inbound: + rules: + - application: team-dolly-lokal-app + cluster: dev-gcp + - application: testnav-oversikt-frontend + cluster: dev-gcp + - application: ereg-batch-status-service + cluster: dev-gcp + - application: app-1 + namespace: plattformsikkerhet + cluster: dev-gcp + liveness: + path: /internal/isAlive + initialDelay: 4 + periodSeconds: 5 + failureThreshold: 500 + readiness: + path: /internal/isReady + initialDelay: 4 + periodSeconds: 5 + failureThreshold: 500 + replicas: + min: 1 + max: 1 + resources: + requests: + cpu: 200m + memory: 1025Mi + limits: + memory: 2048Mi + envFrom: + - secret: azure-trygdeetaten-testnav-modapp-ereg-proxy-trygdeetaten + ingresses: + - "https://testnav-modapp-ereg-proxy.dev-fss-pub.nais.io" diff --git a/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBn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+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..a5952066425 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/proxies/modapp-ereg-proxy/gradlew b/proxies/modapp-ereg-proxy/gradlew new file mode 100755 index 00000000000..3da45c161b0 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright ? 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions ?$var?, ?${var}?, ?${var:-default}?, ?${var+SET}?, +# ?${var#prefix}?, ?${var%suffix}?, and ?$( cmd )?; +# * compound commands having a testable exit status, especially ?case?; +# * various built-in commands including ?command?, ?set?, and ?ulimit?. +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/proxies/modapp-ereg-proxy/gradlew.bat b/proxies/modapp-ereg-proxy/gradlew.bat new file mode 100644 index 00000000000..107acd32c4e --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/proxies/modapp-ereg-proxy/gradlewUpdate.sh b/proxies/modapp-ereg-proxy/gradlewUpdate.sh new file mode 100755 index 00000000000..e5ee6361152 --- /dev/null +++ b/proxies/modapp-ereg-proxy/gradlewUpdate.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +gradle wrapper \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/settings.gradle b/proxies/modapp-ereg-proxy/settings.gradle new file mode 100644 index 00000000000..ef5b8a957cb --- /dev/null +++ b/proxies/modapp-ereg-proxy/settings.gradle @@ -0,0 +1,18 @@ +plugins { + id "com.gradle.enterprise" version "3.12.3" +} + +rootProject.name = 'modapp-ereg-proxy' + + +includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-proxy' +includeBuild '../../libs/security-core' +includeBuild '../../libs/reactive-security' + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + } +} diff --git a/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java new file mode 100644 index 00000000000..32e25c534b9 --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/Consumers.java @@ -0,0 +1,29 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import static lombok.AccessLevel.PACKAGE; + +/** + * Samler alle placeholders for ulike {@code consumers.*}-konfigurasjon her, dvs. subklasser av {@code ServerProperties}. + *

+ * Husk at Spring Boot bruker
relaxed binding + * mellom configuration properties og field names. + * + * @see ServerProperties + */ +@Configuration +@ConfigurationProperties(prefix = "consumers") +@NoArgsConstructor(access = PACKAGE) +@Getter +@Setter(PACKAGE) +public class Consumers { + + private ServerProperties eregAura; + +} diff --git a/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java new file mode 100644 index 00000000000..4e3b05118bd --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/java/no/nav/testnav/proxies/modapperegproxy/ModappEregProxyApplicationStarter.java @@ -0,0 +1,73 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import no.nav.testnav.libs.reactivecore.config.CoreConfig; +import no.nav.testnav.libs.reactiveproxy.config.DevConfig; +import no.nav.testnav.libs.reactiveproxy.config.SecurityConfig; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.gateway.route.Route; +import org.springframework.cloud.gateway.route.RouteLocator; +import org.springframework.cloud.gateway.route.builder.Buildable; +import org.springframework.cloud.gateway.route.builder.PredicateSpec; +import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Import; + +import java.util.Arrays; +import java.util.Map; +import java.util.function.Function; + +@Import({ + CoreConfig.class, + DevConfig.class, + SecurityConfig.class +}) +@SpringBootApplication +public class ModappEregProxyApplicationStarter { + + private static final String[] miljoer = new String[]{ "q1", "q2", "q4" }; + private static final Map miljoeUrlSegment = Map.of( + "q1", "05", + "q2", "10", + "q4", "09" + ); + + @Bean + public RouteLocator customRouteLocator( + RouteLocatorBuilder builder, + Consumers consumers + ) { + var routes = builder.routes(); + Arrays + .asList(miljoer) + .forEach( + miljoe -> { + var properties = forEnvironment(consumers.getEregAura(), miljoeUrlSegment.get(miljoe)); + routes + .route(createRoute(miljoe, properties.getUrl())); + }); + return routes.build(); + } + + public static void main(String[] args) { + SpringApplication.run(ModappEregProxyApplicationStarter.class, args); + } + + private Function> createRoute(String miljo, String url) { + return spec -> spec + .path("/" + miljo + "/**") + .filters(filterSpec -> filterSpec + .rewritePath("/" + miljo + "/(?.*)", "/${segment}") + ).uri(url); + } + + private static ServerProperties forEnvironment(ServerProperties original, String urlSegment) { + return ServerProperties.of( + original.getCluster(), + original.getNamespace(), + original.getName(), + original.getUrl().replace("-MILJOE", urlSegment) + ); + } +} \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/main/resources/application.yml b/proxies/modapp-ereg-proxy/src/main/resources/application.yml new file mode 100644 index 00000000000..4842e668d2b --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/resources/application.yml @@ -0,0 +1,30 @@ +AAD_ISSUER_URI: https://login.microsoftonline.com/62366534-1ec3-4962-8869-9b5535279d0b + +spring: + application: + name: testnav-modapp-ereg-proxy + desciption: Proxy for ereg appen i modapp som legger på sikkerhet og redirecter til riktig miljø. + security: + oauth2: + resourceserver: + aad: + issuer-uri: ${AAD_ISSUER_URI}/v2.0 + jwk-set-uri: ${AAD_ISSUER_URI}/discovery/v2.0/keys + accepted-audience: ${azure.app.client.id}, api://${azure.app.client.id} + tokenx: + issuer-uri: ${TOKEN_X_ISSUER} + jwk-set-uri: ${TOKEN_X_JWKS_URI} + accepted-audience: ${TOKEN_X_CLIENT_ID} + cloud: + gateway: + httpclient: + response-timeout: 1200s + vault: + enabled: false + +consumers: + ereg-aura: + name: ereg-aura + namespace: arbeidsforhold + url: https://b27jbsl016-MILJOE.preprod.local:8443 + cluster: dev-fss \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml b/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml new file mode 100644 index 00000000000..52c15597b3c --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/main/resources/logback-spring.xml @@ -0,0 +1,40 @@ + + + + + + + true + 256 + 10280 + 20 + ^sun\.reflect\..*\.invoke + ^net\.sf\.cglib\.proxy\.MethodProxy\.invoke + java\.util\.concurrent\..* + org\.apache\.catalina\..* + org\.apache\.coyote\..* + org\.apache\.tomcat\..* + + + + + + + + + + + + + %d{HH:mm:ss.SSS} | %5p | %logger{25} | %m%n + + utf8 + + + + + + + + + \ No newline at end of file diff --git a/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java b/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java new file mode 100644 index 00000000000..315981c5591 --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/test/java/no/nav/testnav/proxies/modapperegproxy/ApplicationContextTest.java @@ -0,0 +1,20 @@ +package no.nav.testnav.proxies.modapperegproxy; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest +@ActiveProfiles("test") +class ApplicationContextTest { + + @MockBean + public ReactiveJwtDecoder reactiveJwtDecoder; + + @Test + @SuppressWarnings("java:S2699") + void load_app_context() { + } +} diff --git a/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml b/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml new file mode 100644 index 00000000000..905697c5bae --- /dev/null +++ b/proxies/modapp-ereg-proxy/src/test/resources/application-test.yml @@ -0,0 +1,11 @@ +TOKEN_X_ISSUER: dummy +consumers: + ereg-aura: + url: http://ereg-dummy.dummy.no + cluster: dev-fss + name: ereg-dummy + namespace: dummy +spring: + cloud: + vault: + enabled: false diff --git a/settings.gradle b/settings.gradle index 1a3d42dbd11..c1a87b24977 100644 --- a/settings.gradle +++ b/settings.gradle @@ -25,6 +25,7 @@ includeBuild './proxies/udistub-proxy' includeBuild './proxies/skjermingsregister-proxy' includeBuild './proxies/batch-adeo-proxy' includeBuild './proxies/saf-proxy' +includeBuild './proxies/modapp-ereg-proxy' includeBuild './proxies/dokarkiv-proxy' includeBuild './proxies/tps-forvalteren-proxy' includeBuild './proxies/aareg-synt-services-proxy'