From d3b83a4f4db028730ffdbd6720363621f7a30377 Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 18 Dec 2023 14:14:09 +0100 Subject: [PATCH] En del mer bugfiksing og refaktorering for react-hook-forms, mindre update --- .../src/main/js/package-lock.json | 164 +++++++++--------- apps/dolly-frontend/src/main/js/package.json | 2 +- .../stegVelger/Navigation/Navigation.tsx | 3 +- .../fagsystem/arena/form/validation.tsx | 1 - .../partials/telefonnummer/Telefonnummer.tsx | 11 +- .../validation/partials/telefonnummer.tsx | 11 +- .../components/miljoVelger/MiljoVelger.tsx | 2 +- 7 files changed, 97 insertions(+), 97 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/package-lock.json b/apps/dolly-frontend/src/main/js/package-lock.json index 084695a3ca1..d157f614a7c 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": "2.5.40", + "version": "2.5.41", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dolly", - "version": "2.5.40", + "version": "2.5.41", "license": "ISC", "dependencies": { "@babel/preset-flow": "^7.18.6", @@ -1221,9 +1221,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -2861,9 +2861,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.0.tgz", - "integrity": "sha512-+1ge/xmaJpm1KVBuIH38Z94zj9fBD+hp+/5WLaHgyY8XLq1ibxk/zj6dTXaqM2cAbYKq8jYlhHd6k05If1W5xA==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz", + "integrity": "sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==", "cpu": [ "arm" ], @@ -2874,9 +2874,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.0.tgz", - "integrity": "sha512-im6hUEyQ7ZfoZdNvtwgEJvBWZYauC9KVKq1w58LG2Zfz6zMd8gRrbN+xCVoqA2hv/v6fm9lp5LFGJ3za8EQH3A==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz", + "integrity": "sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==", "cpu": [ "arm64" ], @@ -2887,9 +2887,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.0.tgz", - "integrity": "sha512-u7aTMskN6Dmg1lCT0QJ+tINRt+ntUrvVkhbPfFz4bCwRZvjItx2nJtwJnJRlKMMaQCHRjrNqHRDYvE4mBm3DlQ==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", + "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", "cpu": [ "arm64" ], @@ -2900,9 +2900,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.0.tgz", - "integrity": "sha512-8FvEl3w2ExmpcOmX5RJD0yqXcVSOqAJJUJ29Lca29Ik+3zPS1yFimr2fr5JSZ4Z5gt8/d7WqycpgkX9nocijSw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz", + "integrity": "sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==", "cpu": [ "x64" ], @@ -2913,9 +2913,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.0.tgz", - "integrity": "sha512-lHoKYaRwd4gge+IpqJHCY+8Vc3hhdJfU6ukFnnrJasEBUvVlydP8PuwndbWfGkdgSvZhHfSEw6urrlBj0TSSfg==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz", + "integrity": "sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==", "cpu": [ "arm" ], @@ -2926,9 +2926,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.0.tgz", - "integrity": "sha512-JbEPfhndYeWHfOSeh4DOFvNXrj7ls9S/2omijVsao+LBPTPayT1uKcK3dHW3MwDJ7KO11t9m2cVTqXnTKpeaiw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz", + "integrity": "sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==", "cpu": [ "arm64" ], @@ -2939,9 +2939,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.0.tgz", - "integrity": "sha512-ahqcSXLlcV2XUBM3/f/C6cRoh7NxYA/W7Yzuv4bDU1YscTFw7ay4LmD7l6OS8EMhTNvcrWGkEettL1Bhjf+B+w==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz", + "integrity": "sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==", "cpu": [ "arm64" ], @@ -2952,9 +2952,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.0.tgz", - "integrity": "sha512-uwvOYNtLw8gVtrExKhdFsYHA/kotURUmZYlinH2VcQxNCQJeJXnkmWgw2hI9Xgzhgu7J9QvWiq9TtTVwWMDa+w==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz", + "integrity": "sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==", "cpu": [ "riscv64" ], @@ -2965,9 +2965,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.0.tgz", - "integrity": "sha512-m6pkSwcZZD2LCFHZX/zW2aLIISyzWLU3hrLLzQKMI12+OLEzgruTovAxY5sCZJkipklaZqPy/2bEEBNjp+Y7xg==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz", + "integrity": "sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==", "cpu": [ "x64" ], @@ -2978,9 +2978,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.0.tgz", - "integrity": "sha512-VFAC1RDRSbU3iOF98X42KaVicAfKf0m0OvIu8dbnqhTe26Kh6Ym9JrDulz7Hbk7/9zGc41JkV02g+p3BivOdAg==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz", + "integrity": "sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==", "cpu": [ "x64" ], @@ -2991,9 +2991,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.0.tgz", - "integrity": "sha512-9jPgMvTKXARz4inw6jezMLA2ihDBvgIU9Ml01hjdVpOcMKyxFBJrn83KVQINnbeqDv0+HdO1c09hgZ8N0s820Q==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz", + "integrity": "sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==", "cpu": [ "arm64" ], @@ -3004,9 +3004,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.0.tgz", - "integrity": "sha512-WE4pT2kTXQN2bAv40Uog0AsV7/s9nT9HBWXAou8+++MBCnY51QS02KYtm6dQxxosKi1VIz/wZIrTQO5UP2EW+Q==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz", + "integrity": "sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==", "cpu": [ "ia32" ], @@ -3017,9 +3017,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.0.tgz", - "integrity": "sha512-aPP5Q5AqNGuT0tnuEkK/g4mnt3ZhheiXrDIiSVIHN9mcN21OyXDVbEMqmXPE7e2OplNLDkcvV+ZoGJa2ZImFgw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", + "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", "cpu": [ "x64" ], @@ -3088,9 +3088,9 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.7", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", - "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" @@ -3168,9 +3168,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz", - "integrity": "sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg==", + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -3218,9 +3218,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.17.tgz", - "integrity": "sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==", + "version": "18.2.18", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", + "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", "dev": true, "dependencies": { "@types/react": "*" @@ -5536,9 +5536,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.613", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.613.tgz", - "integrity": "sha512-r4x5+FowKG6q+/Wj0W9nidx7QO31BJwmR2uEo+Qh3YLGQ8SbBAFuDFpTxzly/I2gsbrFwBuIjrMp423L3O5U3w==" + "version": "1.4.614", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz", + "integrity": "sha512-X4ze/9Sc3QWs6h92yerwqv7aB/uU8vCjZcrMjA8N9R1pjMFRe44dLsck5FzLilOYvcXuDn93B+bpGYyufc70gQ==" }, "node_modules/emoji-regex": { "version": "9.2.2", @@ -5772,14 +5772,14 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -10345,9 +10345,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", @@ -10541,9 +10541,9 @@ } }, "node_modules/rollup": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.0.tgz", - "integrity": "sha512-bUHW/9N21z64gw8s6tP4c88P382Bq/L5uZDowHlHx6s/QWpjJXivIAbEw6LZthgSvlEizZBfLC4OAvWe7aoF7A==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", + "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -10553,19 +10553,19 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.0", - "@rollup/rollup-android-arm64": "4.9.0", - "@rollup/rollup-darwin-arm64": "4.9.0", - "@rollup/rollup-darwin-x64": "4.9.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.0", - "@rollup/rollup-linux-arm64-gnu": "4.9.0", - "@rollup/rollup-linux-arm64-musl": "4.9.0", - "@rollup/rollup-linux-riscv64-gnu": "4.9.0", - "@rollup/rollup-linux-x64-gnu": "4.9.0", - "@rollup/rollup-linux-x64-musl": "4.9.0", - "@rollup/rollup-win32-arm64-msvc": "4.9.0", - "@rollup/rollup-win32-ia32-msvc": "4.9.0", - "@rollup/rollup-win32-x64-msvc": "4.9.0", + "@rollup/rollup-android-arm-eabi": "4.9.1", + "@rollup/rollup-android-arm64": "4.9.1", + "@rollup/rollup-darwin-arm64": "4.9.1", + "@rollup/rollup-darwin-x64": "4.9.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", + "@rollup/rollup-linux-arm64-gnu": "4.9.1", + "@rollup/rollup-linux-arm64-musl": "4.9.1", + "@rollup/rollup-linux-riscv64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-musl": "4.9.1", + "@rollup/rollup-win32-arm64-msvc": "4.9.1", + "@rollup/rollup-win32-ia32-msvc": "4.9.1", + "@rollup/rollup-win32-x64-msvc": "4.9.1", "fsevents": "~2.3.2" } }, @@ -12128,9 +12128,9 @@ } }, "node_modules/vite": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.9.tgz", - "integrity": "sha512-wVqMd5kp28QWGgfYPDfrj771VyHTJ4UDlCteLH7bJDGDEamaz5hV8IX6h1brSGgnnyf9lI2RnzXq/JmD0c2wwg==", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", + "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", "dev": true, "dependencies": { "esbuild": "^0.19.3", diff --git a/apps/dolly-frontend/src/main/js/package.json b/apps/dolly-frontend/src/main/js/package.json index fc1f7948ffe..e5ceeaf22f6 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": "2.5.40", + "version": "2.5.41", "type": "module", "description": "", "main": "index.js", diff --git a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/Navigation/Navigation.tsx b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/Navigation/Navigation.tsx index 3830d4716df..ce737dd1c02 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/Navigation/Navigation.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestillingsveileder/stegVelger/Navigation/Navigation.tsx @@ -34,7 +34,6 @@ export const Navigation = ({ step, onPrevious, isLastStep, handleSubmit }) => { return 'Opprett' } - const hasErrors = step !== 0 && !_.isEmpty(errors) const disabledVidere = step !== 0 && opts?.is?.leggTil && !harAvhukedeAttributter(getValues()) return ( @@ -58,7 +57,7 @@ export const Navigation = ({ step, onPrevious, isLastStep, handleSubmit }) => { Videre diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx index daa6ea84627..7b8666841ae 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/arena/form/validation.tsx @@ -208,7 +208,6 @@ const validFradato = (vedtakType) => { 'har-gjeldende-vedtak', 'AAP- og Dagpenger-vedtak kan ikke overlappe hverandre', (val, testContext) => { - const context = testContext.options.context const fullForm = testContext.from && testContext.from[testContext.from.length - 1]?.value const naavaerendeVerdier = {} for (let key of ikkeOverlappendeVedtak) { 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 0f4f67e5ef9..c8f048e67c4 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 @@ -77,6 +77,7 @@ export const TelefonnummerForm = ({ path, formMethods, idx }: TelefonnummerProps if (tlfListe && tlfListe.length === 1) { formMethods.setValue(`${paths.pdlTelefonnummer}[0].prioritet`, 1) formMethods.setValue(`${paths.tpsMTelefonnummer}[0].telefontype`, 'MOBI') + formMethods.trigger() } }, [tlfListe]) @@ -98,11 +99,13 @@ export const TelefonnummerForm = ({ path, formMethods, idx }: TelefonnummerProps const handleChangeLandkode = (value: string) => { formMethods.setValue(`${path}.landskode`, value) formMethods.setValue(`${paths.tpsMTelefonnummer}[${idx}].landkode`, value) + formMethods.trigger() } const handleChangeNummer = (target: { value: string }) => { formMethods.setValue(`${path}.nummer`, target.value) formMethods.setValue(`${paths.tpsMTelefonnummer}[${idx}].telefonnummer`, target.value) + formMethods.trigger() } const handleChangePrioritet = (value: number) => { @@ -111,6 +114,7 @@ export const TelefonnummerForm = ({ path, formMethods, idx }: TelefonnummerProps `${paths.tpsMTelefonnummer}[${idx}].telefontype`, value === 2 ? 'HJET' : 'MOBI', ) + formMethods.trigger() } return ( @@ -130,11 +134,6 @@ export const TelefonnummerForm = ({ path, formMethods, idx }: TelefonnummerProps value={_.get(formMethods.getValues(), `${path}.nummer`)} /*@ts-ignore*/ size="large" - feil={ - _.get(formMethods.formState.errors, `${path}.nummer`) - ? { feilmelding: _.get(formMethods.formState.errors, `${path}.nummer`) } - : null - } /> { const handleNewEntry = () => { formMethods.setValue(paths.pdlTelefonnummer, [...tlfListe, initialTelefonnummer]) formMethods.setValue(paths.tpsMTelefonnummer, [...tlfListeTps, initialTpsTelefonnummer]) + formMethods.trigger() } const handleRemoveEntry = (idx: number) => { @@ -169,6 +169,7 @@ export const Telefonnummer = ({ formMethods, path }: TelefonnummerProps) => { formMethods.setValue(paths.tpsMTelefonnummer, tlfListeTps) formMethods.setValue(`${paths.pdlTelefonnummer}[0].prioritet`, 1) formMethods.setValue(`${paths.tpsMTelefonnummer}[0].telefontype`, 'MOBI') + formMethods.trigger() } return ( diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/validation/partials/telefonnummer.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/validation/partials/telefonnummer.tsx index 872b31741ba..207eb3a8be4 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/validation/partials/telefonnummer.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/validation/partials/telefonnummer.tsx @@ -13,11 +13,12 @@ const testTelefonnummer = () => .matches(/^[1-9]\d*$/, 'Telefonnummer må være numerisk, og kan ikke starte med 0') const testPrioritet = (val) => { - return val.test('prioritet', 'Ugyldig prioritet', function erEgenPrio() { - const values = this?.options?.context - if (!values || Object.keys(values).length < 1) return true - const index = this?.options?.index || 0 - const tlfListe = _.get(values, 'pdldata.person.telefonnummer') || _.get(values, 'telefonnummer') + return val.test('prioritet', 'Ugyldig prioritet', (val, testContext) => { + const fullForm = testContext.from && testContext.from[testContext.from.length - 1]?.value + if (Object.keys(testContext.parent).length < 1) return true + const index = testContext.index || 0 + const tlfListe = + _.get(fullForm, 'pdldata.person.telefonnummer') || _.get(fullForm, 'telefonnummer') if (tlfListe?.length < 2) { return tlfListe?.[index]?.prioritet === 1 } diff --git a/apps/dolly-frontend/src/main/js/src/components/miljoVelger/MiljoVelger.tsx b/apps/dolly-frontend/src/main/js/src/components/miljoVelger/MiljoVelger.tsx index bb15c8787e5..5c4a9e687c6 100644 --- a/apps/dolly-frontend/src/main/js/src/components/miljoVelger/MiljoVelger.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/miljoVelger/MiljoVelger.tsx @@ -90,7 +90,7 @@ export const MiljoVelger = ({ const order = ['T', 'Q'] const values = formMethods.watch('environments') - if (disableAllEnvironments) { + if (disableAllEnvironments && values.length > 0) { formMethods.setValue('environments', []) }