From e1e911ee3bcf4f28c9bb3af5b6809c40bead8af6 Mon Sep 17 00:00:00 2001 From: taniaholst Date: Tue, 12 Dec 2023 12:22:29 +0100 Subject: [PATCH 01/17] metrikker: tiltakstype lagt til i fanevalg --- .../src/components/tabs/TiltaksdetaljerFane.tsx | 1 + frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/mulighetsrommet-veileder-flate/src/components/tabs/TiltaksdetaljerFane.tsx b/frontend/mulighetsrommet-veileder-flate/src/components/tabs/TiltaksdetaljerFane.tsx index 87ba837b3e..2ca6f93fa4 100644 --- a/frontend/mulighetsrommet-veileder-flate/src/components/tabs/TiltaksdetaljerFane.tsx +++ b/frontend/mulighetsrommet-veileder-flate/src/components/tabs/TiltaksdetaljerFane.tsx @@ -71,6 +71,7 @@ const TiltaksdetaljerFane = ({ tiltaksgjennomforing }: Props) => { name: "arbeidsmarkedstiltak.fanevalg", data: { faneValgt: getFaneValgt(value as TabsType), + tiltakstype: tiltaksgjennomforing.tiltakstype.navn, }, }); }} diff --git a/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts b/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts index 257d4331ac..8eefad97b1 100644 --- a/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts +++ b/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts @@ -10,6 +10,7 @@ type KLIKK_PA_FANE_EVENT = { name: "arbeidsmarkedstiltak.fanevalg"; data: { faneValgt: string; + tiltakstype: string; }; }; From 677def7af3c742e3df7c661a4b6d71b9edf852f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:52:50 +0000 Subject: [PATCH 02/17] Bump the minorversions group with 6 updates Bumps the minorversions group with 6 updates: | Package | From | To | | --- | --- | --- | | [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.12.2` | `5.13.4` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `6.11.0` | `6.14.0` | | [eslint](https://github.com/eslint/eslint) | `8.53.0` | `8.55.0` | | [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) | `16.3.1` | `16.4.0` | | [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer) | `5.10.0` | `5.11.0` | | [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.48.2` | `7.49.0` | Updates `@tanstack/react-query` from 5.12.2 to 5.13.4 - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.13.4/packages/react-query) Updates `@typescript-eslint/eslint-plugin` from 6.11.0 to 6.14.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.14.0/packages/eslint-plugin) Updates `eslint` from 8.53.0 to 8.55.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.55.0) Updates `eslint-plugin-n` from 16.3.1 to 16.4.0 - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/16.3.1...16.4.0) Updates `rollup-plugin-visualizer` from 5.10.0 to 5.11.0 - [Changelog](https://github.com/btd/rollup-plugin-visualizer/blob/master/CHANGELOG.md) - [Commits](https://github.com/btd/rollup-plugin-visualizer/compare/v5.10.0...v5.11.0) Updates `react-hook-form` from 7.48.2 to 7.49.0 - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-hook-form/react-hook-form/compare/v7.48.2...v7.49.0) --- updated-dependencies: - dependency-name: "@tanstack/react-query" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minorversions - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minorversions - dependency-name: eslint dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minorversions - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minorversions - dependency-name: rollup-plugin-visualizer dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minorversions - dependency-name: react-hook-form dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minorversions ... Signed-off-by: dependabot[bot] --- frontend/arena-adapter-manager/package.json | 4 +- frontend/mr-admin-flate/package.json | 8 +- .../package.json | 8 +- package-lock.json | 909 ++++-------------- 4 files changed, 193 insertions(+), 736 deletions(-) diff --git a/frontend/arena-adapter-manager/package.json b/frontend/arena-adapter-manager/package.json index 55d5f9cf80..10dfc6386d 100644 --- a/frontend/arena-adapter-manager/package.json +++ b/frontend/arena-adapter-manager/package.json @@ -22,9 +22,9 @@ "devDependencies": { "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.11.0", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", - "eslint": "8.53.0", + "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-react-refresh": "0.4.4", "typescript": "5.3.3", diff --git a/frontend/mr-admin-flate/package.json b/frontend/mr-admin-flate/package.json index 74f439f514..c9aea5ff3b 100644 --- a/frontend/mr-admin-flate/package.json +++ b/frontend/mr-admin-flate/package.json @@ -29,7 +29,7 @@ "@navikt/ds-react": "5.11.4", "@portabletext/react": "3.0.11", "@portabletext/types": "2.0.8", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "@types/is-url": "1.2.32", "classnames": "2.3.2", @@ -42,7 +42,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-error-boundary": "4.0.11", - "react-hook-form": "7.48.2", + "react-hook-form": "7.49.0", "react-router-dom": "6.20.1", "react-select": "5.8.0", "react-toastify": "9.1.3", @@ -60,14 +60,14 @@ "@rollup/plugin-terser": "0.4.4", "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "axe-core": "4.8.2", "cross-env": "7.0.3", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", diff --git a/frontend/mulighetsrommet-veileder-flate/package.json b/frontend/mulighetsrommet-veileder-flate/package.json index df59c2381b..b2b71a34ff 100644 --- a/frontend/mulighetsrommet-veileder-flate/package.json +++ b/frontend/mulighetsrommet-veileder-flate/package.json @@ -30,7 +30,7 @@ "@navikt/ds-react": "5.11.4", "@navikt/navspa": "6.0.1", "@portabletext/react": "3.0.11", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "axe-core": "4.8.2", "classnames": "2.3.2", @@ -51,14 +51,14 @@ "@faker-js/faker": "8.3.1", "@playwright/test": "^1.40.1", "@types/node": "^20.10.3", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "cross-env": "7.0.3", "eslint": "8.55.0", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", @@ -66,7 +66,7 @@ "eslint-plugin-react-refresh": "0.4.4", "msw": "2.0.10", "rollup-plugin-import-map": "^3.0.0", - "rollup-plugin-visualizer": "5.10.0", + "rollup-plugin-visualizer": "5.11.0", "typescript": "5.3.3", "vite": "5.0.7" }, diff --git a/package-lock.json b/package-lock.json index c49676a6de..04e869dec6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,305 +28,15 @@ "devDependencies": { "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.11.0", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", - "eslint": "8.53.0", + "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-react-refresh": "0.4.4", "typescript": "5.3.3", "vite": "5.0.7" } }, - "frontend/arena-adapter-manager/node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", - "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/type-utils": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/scope-manager": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", - "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/type-utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", - "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/types": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", - "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", - "dev": true, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", - "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", - "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", - "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": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" - } - }, - "frontend/arena-adapter-manager/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", - "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "6.11.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^16.0.0 || >=18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "frontend/arena-adapter-manager/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "frontend/arena-adapter-manager/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "frontend/arena-adapter-manager/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "frontend/arena-adapter-manager/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "frontend/arena-adapter-manager/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "frontend/arena-adapter-manager/node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "frontend/arena-adapter-manager/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -341,36 +51,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "frontend/arena-adapter-manager/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "frontend/arena-adapter-manager/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "frontend/arena-adapter-manager/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "frontend/arena-adapter-manager/node_modules/rollup": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.8.0.tgz", @@ -400,30 +80,6 @@ "fsevents": "~2.3.2" } }, - "frontend/arena-adapter-manager/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "frontend/arena-adapter-manager/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "frontend/arena-adapter-manager/node_modules/vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -499,7 +155,7 @@ "@navikt/ds-react": "5.11.4", "@portabletext/react": "3.0.11", "@portabletext/types": "2.0.8", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "@types/is-url": "1.2.32", "classnames": "2.3.2", @@ -512,7 +168,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-error-boundary": "4.0.11", - "react-hook-form": "7.48.2", + "react-hook-form": "7.49.0", "react-router-dom": "6.20.1", "react-select": "5.8.0", "react-toastify": "9.1.3", @@ -530,14 +186,14 @@ "@rollup/plugin-terser": "0.4.4", "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "axe-core": "4.8.2", "cross-env": "7.0.3", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", @@ -684,7 +340,7 @@ "@navikt/ds-react": "5.11.4", "@navikt/navspa": "6.0.1", "@portabletext/react": "3.0.11", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "axe-core": "4.8.2", "classnames": "2.3.2", @@ -705,14 +361,14 @@ "@faker-js/faker": "8.3.1", "@playwright/test": "^1.40.1", "@types/node": "^20.10.3", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "cross-env": "7.0.3", "eslint": "8.55.0", "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", @@ -720,7 +376,7 @@ "eslint-plugin-react-refresh": "0.4.4", "msw": "2.0.10", "rollup-plugin-import-map": "^3.0.0", - "rollup-plugin-visualizer": "5.10.0", + "rollup-plugin-visualizer": "5.11.0", "typescript": "5.3.3", "vite": "5.0.7" } @@ -4808,9 +4464,9 @@ "dev": true }, "node_modules/@tanstack/query-core": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.12.1.tgz", - "integrity": "sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==", + "version": "5.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.13.4.tgz", + "integrity": "sha512-8+rJucXvC/xlr4OrxHhEIob/cTlbT4fgmz1VsvB0D12FRStKaXeLORNGcOhSAynRd2NL74SV/Qq0IIb4DedLcA==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -4826,11 +4482,11 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.12.2", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.12.2.tgz", - "integrity": "sha512-BeWZu8zVFH20oRc+S/K9ADPgWjEzP/XQCGBNz5IbApUwPQAdwkQYbXODVL5AyAlWiSxhx+P2xlARPBApj2Yrog==", + "version": "5.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.13.4.tgz", + "integrity": "sha512-3HjvkFFriEQwffUXtKHPiwkfFXUGbs46YATTzzyK1+Pw6Ekd3kwzS50e45qdamWuEXmXxyo5S1zp534LdFG0Rw==", "dependencies": { - "@tanstack/query-core": "5.12.1" + "@tanstack/query-core": "5.13.4" }, "funding": { "type": "github", @@ -5143,16 +4799,16 @@ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz", - "integrity": "sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", + "integrity": "sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.2", - "@typescript-eslint/type-utils": "6.13.2", - "@typescript-eslint/utils": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/type-utils": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -5243,13 +4899,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz", - "integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.14.0.tgz", + "integrity": "sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2" + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5260,9 +4916,9 @@ } }, "node_modules/@typescript-eslint/scope-manager/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5273,13 +4929,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz", - "integrity": "sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.14.0.tgz", + "integrity": "sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.2", - "@typescript-eslint/utils": "6.13.2", + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/utils": "6.14.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -5300,9 +4956,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5313,13 +4969,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5400,17 +5056,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz", - "integrity": "sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.14.0.tgz", + "integrity": "sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==", "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": "6.13.2", - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", "semver": "^7.5.4" }, "engines": { @@ -5425,9 +5081,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -5438,13 +5094,13 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5465,12 +5121,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", - "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.14.0.tgz", + "integrity": "sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/types": "6.14.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -5482,9 +5138,9 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -7717,6 +7373,18 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-compat-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", + "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, "node_modules/eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -7805,13 +7473,14 @@ } }, "node_modules/eslint-plugin-es-x": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.1.0.tgz", - "integrity": "sha512-AhiaF31syh4CCQ+C5ccJA0VG6+kJK8+5mXKKE7Qs1xcPRg02CDPOj3mWlQxuWS/AYtg7kxrDNgW9YW3vc0Q+Mw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", + "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.5.0" + "@eslint-community/regexpp": "^4.6.0", + "eslint-compat-utils": "^0.1.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -7885,14 +7554,14 @@ } }, "node_modules/eslint-plugin-n": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.3.1.tgz", - "integrity": "sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.4.0.tgz", + "integrity": "sha512-IkqJjGoWYGskVaJA7WQuN8PINIxc0N/Pk/jLeYT4ees6Fo5lAhpwGsYek6gS9tCUxgDC4zJ+OwY2bY/6/9OMKQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "builtins": "^5.0.1", - "eslint-plugin-es-x": "^7.1.0", + "eslint-plugin-es-x": "^7.5.0", "get-tsconfig": "^4.7.0", "ignore": "^5.2.4", "is-builtin-module": "^3.2.1", @@ -12193,11 +11862,12 @@ } }, "node_modules/react-hook-form": { - "version": "7.48.2", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.48.2.tgz", - "integrity": "sha512-H0T2InFQb1hX7qKtDIZmvpU1Xfn/bdahWBN1fH19gSe4bBEqTfmlr7H3XWTaVtiK4/tpPaI1F3355GPMZYge+A==", + "version": "7.49.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.49.0.tgz", + "integrity": "sha512-gf4qyY4WiqK2hP/E45UUT6wt3Khl49pleEVcIzxhLBrD6m+GMWtLRk0vMrRv45D1ZH8PnpXFwRPv0Pewske2jw==", "engines": { - "node": ">=12.22.0" + "node": ">=18", + "pnpm": "8" }, "funding": { "type": "opencollective", @@ -12834,9 +12504,9 @@ "integrity": "sha512-JB4WGCvTEDLU/puADvkJpqw3GqrdGs6UBR9USyYv47hkyWv0w1Nmwim4Cnq5yUZQQK1Po0gtA9s4NQblgc5i3A==" }, "node_modules/rollup-plugin-visualizer": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.10.0.tgz", - "integrity": "sha512-N4AkNL0qFvipegbDJ0kupS+8eKGjL0q+lYwV46NflLX/B8Rh73wz3kCIdg50bR6XVhNcaMA4Eb519xtm90Ckfg==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.11.0.tgz", + "integrity": "sha512-exM0Ms2SN3AgTzMeW7y46neZQcyLY7eKwWAop1ZoRTCZwyrIRdMMJ6JjToAJbML77X/9N8ZEpmXG4Z/Clb9k8g==", "dev": true, "dependencies": { "open": "^8.4.0", @@ -18806,9 +18476,9 @@ "dev": true }, "@tanstack/query-core": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.12.1.tgz", - "integrity": "sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==" + "version": "5.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.13.4.tgz", + "integrity": "sha512-8+rJucXvC/xlr4OrxHhEIob/cTlbT4fgmz1VsvB0D12FRStKaXeLORNGcOhSAynRd2NL74SV/Qq0IIb4DedLcA==" }, "@tanstack/query-devtools": { "version": "5.13.3", @@ -18816,11 +18486,11 @@ "integrity": "sha512-1acztPKZexvM9Ns2T0aq4rMVSDA3VGdB73KF7zT/KNVl6VfnBvs24wuIRVSPZKqyZznZTzT3/DzcpntYqg9hmw==" }, "@tanstack/react-query": { - "version": "5.12.2", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.12.2.tgz", - "integrity": "sha512-BeWZu8zVFH20oRc+S/K9ADPgWjEzP/XQCGBNz5IbApUwPQAdwkQYbXODVL5AyAlWiSxhx+P2xlARPBApj2Yrog==", + "version": "5.13.4", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.13.4.tgz", + "integrity": "sha512-3HjvkFFriEQwffUXtKHPiwkfFXUGbs46YATTzzyK1+Pw6Ekd3kwzS50e45qdamWuEXmXxyo5S1zp534LdFG0Rw==", "requires": { - "@tanstack/query-core": "5.12.1" + "@tanstack/query-core": "5.13.4" } }, "@tanstack/react-query-devtools": { @@ -19104,16 +18774,16 @@ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "@typescript-eslint/eslint-plugin": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.13.2.tgz", - "integrity": "sha512-3+9OGAWHhk4O1LlcwLBONbdXsAhLjyCFogJY/cWy2lxdVJ2JrcTF2pTGMaLl2AE7U1l31n8Py4a8bx5DLf/0dQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", + "integrity": "sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.2", - "@typescript-eslint/type-utils": "6.13.2", - "@typescript-eslint/utils": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/type-utils": "6.14.0", + "@typescript-eslint/utils": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -19161,49 +18831,49 @@ } }, "@typescript-eslint/scope-manager": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.2.tgz", - "integrity": "sha512-CXQA0xo7z6x13FeDYCgBkjWzNqzBn8RXaE3QVQVIUm74fWJLkJkaHmHdKStrxQllGh6Q4eUGyNpMe0b1hMkXFA==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.14.0.tgz", + "integrity": "sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==", "dev": true, "requires": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2" + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0" }, "dependencies": { "@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true } } }, "@typescript-eslint/type-utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.13.2.tgz", - "integrity": "sha512-Qr6ssS1GFongzH2qfnWKkAQmMUyZSyOr0W54nZNU1MDfo+U4Mv3XveeLZzadc/yq8iYhQZHYT+eoXJqnACM1tw==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.14.0.tgz", + "integrity": "sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "6.13.2", - "@typescript-eslint/utils": "6.13.2", + "@typescript-eslint/typescript-estree": "6.14.0", + "@typescript-eslint/utils": "6.14.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "dependencies": { "@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -19250,34 +18920,34 @@ } }, "@typescript-eslint/utils": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.13.2.tgz", - "integrity": "sha512-b9Ptq4eAZUym4idijCRzl61oPCwwREcfDI8xGk751Vhzig5fFZR9CyzDz4Sp/nxSLBYxUPyh4QdIDqWykFhNmQ==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.14.0.tgz", + "integrity": "sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.13.2", - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/scope-manager": "6.14.0", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/typescript-estree": "6.14.0", "semver": "^7.5.4" }, "dependencies": { "@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.2.tgz", - "integrity": "sha512-SuD8YLQv6WHnOEtKv8D6HZUzOub855cfPnPMKvdM/Bh1plv1f7Q/0iFUDLKKlxHcEstQnaUU4QZskgQq74t+3w==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz", + "integrity": "sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.13.2", - "@typescript-eslint/visitor-keys": "6.13.2", + "@typescript-eslint/types": "6.14.0", + "@typescript-eslint/visitor-keys": "6.14.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -19288,19 +18958,19 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.2.tgz", - "integrity": "sha512-OGznFs0eAQXJsp+xSd6k/O1UbFi/K/L7WjqeRoFE7vadjAF9y0uppXhYNQNEqygjou782maGClOoZwPqF0Drlw==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.14.0.tgz", + "integrity": "sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==", "dev": true, "requires": { - "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/types": "6.14.0", "eslint-visitor-keys": "^3.4.1" }, "dependencies": { "@typescript-eslint/types": { - "version": "6.13.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.2.tgz", - "integrity": "sha512-7sxbQ+EMRubQc3wTfTsycgYpSujyVbI1xw+3UMRUcrhSy+pN09y/lWzeKDbvhoqcRbHdc+APLs/PWYi/cisLPg==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.14.0.tgz", + "integrity": "sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==", "dev": true } } @@ -19604,9 +19274,9 @@ "@emotion/styled": "11.11.0", "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.11.0", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", - "eslint": "8.53.0", + "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-react-refresh": "0.4.4", "react": "18.2.0", @@ -19618,191 +19288,6 @@ "vite": "5.0.7" }, "dependencies": { - "@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", - "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/type-utils": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", - "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", - "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/types": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", - "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", - "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - } - }, - "@typescript-eslint/utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", - "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", - "semver": "^7.5.4" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", - "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "6.11.0", - "eslint-visitor-keys": "^3.4.1" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", - "@humanwhocodes/config-array": "^0.11.13", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - } - }, "fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -19810,27 +19295,6 @@ "dev": true, "optional": true }, - "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "rollup": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.8.0.tgz", @@ -19853,21 +19317,6 @@ "fsevents": "~2.3.2" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, "vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -21292,6 +20741,13 @@ } } }, + "eslint-compat-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz", + "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==", + "dev": true, + "requires": {} + }, "eslint-config-prettier": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", @@ -21349,13 +20805,14 @@ } }, "eslint-plugin-es-x": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.1.0.tgz", - "integrity": "sha512-AhiaF31syh4CCQ+C5ccJA0VG6+kJK8+5mXKKE7Qs1xcPRg02CDPOj3mWlQxuWS/AYtg7kxrDNgW9YW3vc0Q+Mw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz", + "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.5.0" + "@eslint-community/regexpp": "^4.6.0", + "eslint-compat-utils": "^0.1.2" } }, "eslint-plugin-import": { @@ -21410,14 +20867,14 @@ } }, "eslint-plugin-n": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.3.1.tgz", - "integrity": "sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==", + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.4.0.tgz", + "integrity": "sha512-IkqJjGoWYGskVaJA7WQuN8PINIxc0N/Pk/jLeYT4ees6Fo5lAhpwGsYek6gS9tCUxgDC4zJ+OwY2bY/6/9OMKQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", "builtins": "^5.0.1", - "eslint-plugin-es-x": "^7.1.0", + "eslint-plugin-es-x": "^7.5.0", "get-tsconfig": "^4.7.0", "ignore": "^5.2.4", "is-builtin-module": "^3.2.1", @@ -23493,12 +22950,12 @@ "@portabletext/react": "3.0.11", "@portabletext/types": "2.0.8", "@rollup/plugin-terser": "0.4.4", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "@types/is-url": "1.2.32", "@types/react": "18.2.42", "@types/react-dom": "18.2.17", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "axe-core": "4.8.2", "classnames": "2.3.2", @@ -23508,7 +22965,7 @@ "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", @@ -23522,7 +22979,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-error-boundary": "4.0.11", - "react-hook-form": "7.48.2", + "react-hook-form": "7.49.0", "react-router-dom": "6.20.1", "react-select": "5.8.0", "react-toastify": "9.1.3", @@ -23715,10 +23172,10 @@ "@navikt/navspa": "6.0.1", "@playwright/test": "^1.40.1", "@portabletext/react": "3.0.11", - "@tanstack/react-query": "5.12.2", + "@tanstack/react-query": "5.13.4", "@tanstack/react-query-devtools": "5.13.3", "@types/node": "^20.10.3", - "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "axe-core": "4.8.2", "classnames": "2.3.2", @@ -23727,7 +23184,7 @@ "eslint-config-prettier": "9.1.0", "eslint-config-standard": "17.1.0", "eslint-plugin-import": "2.29.0", - "eslint-plugin-n": "16.3.1", + "eslint-plugin-n": "16.4.0", "eslint-plugin-prettier": "5.0.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", @@ -23744,7 +23201,7 @@ "react-joyride": "2.7.1", "react-router-dom": "6.20.1", "rollup-plugin-import-map": "^3.0.0", - "rollup-plugin-visualizer": "5.10.0", + "rollup-plugin-visualizer": "5.11.0", "typescript": "5.3.3", "url-join": "5.0.0", "uuid": "9.0.1", @@ -24664,9 +24121,9 @@ } }, "react-hook-form": { - "version": "7.48.2", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.48.2.tgz", - "integrity": "sha512-H0T2InFQb1hX7qKtDIZmvpU1Xfn/bdahWBN1fH19gSe4bBEqTfmlr7H3XWTaVtiK4/tpPaI1F3355GPMZYge+A==", + "version": "7.49.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.49.0.tgz", + "integrity": "sha512-gf4qyY4WiqK2hP/E45UUT6wt3Khl49pleEVcIzxhLBrD6m+GMWtLRk0vMrRv45D1ZH8PnpXFwRPv0Pewske2jw==", "requires": {} }, "react-hot-toast": { @@ -25109,9 +24566,9 @@ "integrity": "sha512-JB4WGCvTEDLU/puADvkJpqw3GqrdGs6UBR9USyYv47hkyWv0w1Nmwim4Cnq5yUZQQK1Po0gtA9s4NQblgc5i3A==" }, "rollup-plugin-visualizer": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.10.0.tgz", - "integrity": "sha512-N4AkNL0qFvipegbDJ0kupS+8eKGjL0q+lYwV46NflLX/B8Rh73wz3kCIdg50bR6XVhNcaMA4Eb519xtm90Ckfg==", + "version": "5.11.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.11.0.tgz", + "integrity": "sha512-exM0Ms2SN3AgTzMeW7y46neZQcyLY7eKwWAop1ZoRTCZwyrIRdMMJ6JjToAJbML77X/9N8ZEpmXG4Z/Clb9k8g==", "dev": true, "requires": { "open": "^8.4.0", From c4069aa4158e827dc59aa1d388cc0269c190dd3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:17:00 +0000 Subject: [PATCH 03/17] Bump the patches group with 6 updates Bumps the patches group with 6 updates: | Package | From | To | | --- | --- | --- | | [prettier](https://github.com/prettier/prettier) | `3.1.0` | `3.1.1` | | [@grafana/faro-web-sdk](https://github.com/grafana/faro-web-sdk/tree/HEAD/packages/web-sdk) | `1.3.2` | `1.3.4` | | [@tanstack/react-query-devtools](https://github.com/TanStack/query/tree/HEAD/packages/react-query-devtools) | `5.13.3` | `5.13.5` | | [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) | `0.4.4` | `0.4.5` | | [msw](https://github.com/mswjs/msw) | `2.0.10` | `2.0.11` | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `18.2.42` | `18.2.43` | Updates `prettier` from 3.1.0 to 3.1.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.1.0...3.1.1) Updates `@grafana/faro-web-sdk` from 1.3.2 to 1.3.4 - [Changelog](https://github.com/grafana/faro-web-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/grafana/faro-web-sdk/commits/v1.3.4/packages/web-sdk) Updates `@tanstack/react-query-devtools` from 5.13.3 to 5.13.5 - [Release notes](https://github.com/TanStack/query/releases) - [Commits](https://github.com/TanStack/query/commits/v5.13.5/packages/react-query-devtools) Updates `eslint-plugin-react-refresh` from 0.4.4 to 0.4.5 - [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases) - [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md) - [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.4...v0.4.5) Updates `msw` from 2.0.10 to 2.0.11 - [Release notes](https://github.com/mswjs/msw/releases) - [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md) - [Commits](https://github.com/mswjs/msw/compare/v2.0.10...v2.0.11) Updates `@types/react` from 18.2.42 to 18.2.43 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch dependency-group: patches - dependency-name: "@grafana/faro-web-sdk" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patches - dependency-name: "@tanstack/react-query-devtools" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patches - dependency-name: eslint-plugin-react-refresh dependency-type: direct:development update-type: version-update:semver-patch dependency-group: patches - dependency-name: msw dependency-type: direct:development update-type: version-update:semver-patch dependency-group: patches - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: patches ... Signed-off-by: dependabot[bot] --- frontend/arena-adapter-manager/package.json | 4 +- frontend/mr-admin-flate/package.json | 10 +- frontend/mulighetsrommet-cms/package.json | 2 +- .../package.json | 8 +- package-lock.json | 229 +++++++++++------- package.json | 2 +- 6 files changed, 157 insertions(+), 98 deletions(-) diff --git a/frontend/arena-adapter-manager/package.json b/frontend/arena-adapter-manager/package.json index 10dfc6386d..229c8457ee 100644 --- a/frontend/arena-adapter-manager/package.json +++ b/frontend/arena-adapter-manager/package.json @@ -20,13 +20,13 @@ "react-router-dom": "6.20.1" }, "devDependencies": { - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", + "eslint-plugin-react-refresh": "0.4.5", "typescript": "5.3.3", "vite": "5.0.7" } diff --git a/frontend/mr-admin-flate/package.json b/frontend/mr-admin-flate/package.json index c9aea5ff3b..23d4034ca8 100644 --- a/frontend/mr-admin-flate/package.json +++ b/frontend/mr-admin-flate/package.json @@ -21,7 +21,7 @@ "playwright:codegen": "playwright codegen playwright.dev" }, "dependencies": { - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@eik/rollup-plugin": "4.0.60", "@hookform/resolvers": "3.3.2", "@navikt/aksel-icons": "5.11.4", @@ -30,7 +30,7 @@ "@portabletext/react": "3.0.11", "@portabletext/types": "2.0.8", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "@types/is-url": "1.2.32", "classnames": "2.3.2", "debounce": "2.0.0", @@ -58,7 +58,7 @@ "@axe-core/playwright": "4.8.2", "@playwright/test": "1.40.1", "@rollup/plugin-terser": "0.4.4", - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", @@ -72,8 +72,8 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", - "msw": "2.0.10", + "eslint-plugin-react-refresh": "0.4.5", + "msw": "2.0.11", "rollup-plugin-import-map": "3.0.0", "typescript": "5.3.3", "vite": "5.0.7", diff --git a/frontend/mulighetsrommet-cms/package.json b/frontend/mulighetsrommet-cms/package.json index 143412a323..bdb0a5b655 100644 --- a/frontend/mulighetsrommet-cms/package.json +++ b/frontend/mulighetsrommet-cms/package.json @@ -26,7 +26,7 @@ "styled-components": "6.1.1" }, "devDependencies": { - "@types/react": "18.2.42", + "@types/react": "18.2.43", "sass": "1.69.5" } } diff --git a/frontend/mulighetsrommet-veileder-flate/package.json b/frontend/mulighetsrommet-veileder-flate/package.json index b2b71a34ff..da8a2c2851 100644 --- a/frontend/mulighetsrommet-veileder-flate/package.json +++ b/frontend/mulighetsrommet-veileder-flate/package.json @@ -24,14 +24,14 @@ "not op_mini all" ], "dependencies": { - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@navikt/aksel-icons": "5.11.4", "@navikt/ds-css": "5.11.4", "@navikt/ds-react": "5.11.4", "@navikt/navspa": "6.0.1", "@portabletext/react": "3.0.11", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "axe-core": "4.8.2", "classnames": "2.3.2", "jotai": "2.6.0", @@ -63,8 +63,8 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", - "msw": "2.0.10", + "eslint-plugin-react-refresh": "0.4.5", + "msw": "2.0.11", "rollup-plugin-import-map": "^3.0.0", "rollup-plugin-visualizer": "5.11.0", "typescript": "5.3.3", diff --git a/package-lock.json b/package-lock.json index 04e869dec6..d80da77267 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ ], "devDependencies": { "husky": "8.0.3", - "prettier": "3.1.0", + "prettier": "3.1.1", "turbo": "1.11.1" } }, @@ -26,13 +26,13 @@ "react-router-dom": "6.20.1" }, "devDependencies": { - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", + "eslint-plugin-react-refresh": "0.4.5", "typescript": "5.3.3", "vite": "5.0.7" } @@ -80,6 +80,19 @@ "fsevents": "~2.3.2" } }, + "frontend/arena-adapter-manager/node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "frontend/arena-adapter-manager/node_modules/vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -148,7 +161,7 @@ "version": "0.0.0", "dependencies": { "@eik/rollup-plugin": "4.0.60", - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@hookform/resolvers": "3.3.2", "@navikt/aksel-icons": "5.11.4", "@navikt/ds-css": "5.11.4", @@ -156,7 +169,7 @@ "@portabletext/react": "3.0.11", "@portabletext/types": "2.0.8", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "@types/is-url": "1.2.32", "classnames": "2.3.2", "debounce": "2.0.0", @@ -184,7 +197,7 @@ "@axe-core/playwright": "4.8.2", "@playwright/test": "1.40.1", "@rollup/plugin-terser": "0.4.4", - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", @@ -198,8 +211,8 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", - "msw": "2.0.10", + "eslint-plugin-react-refresh": "0.4.5", + "msw": "2.0.11", "rollup-plugin-import-map": "3.0.0", "typescript": "5.3.3", "vite": "5.0.7", @@ -249,6 +262,19 @@ "fsevents": "~2.3.2" } }, + "frontend/mr-admin-flate/node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "frontend/mr-admin-flate/node_modules/vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -327,21 +353,21 @@ "styled-components": "6.1.1" }, "devDependencies": { - "@types/react": "18.2.42", + "@types/react": "18.2.43", "sass": "1.69.5" } }, "frontend/mulighetsrommet-veileder-flate": { "version": "1.0.0", "dependencies": { - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@navikt/aksel-icons": "5.11.4", "@navikt/ds-css": "5.11.4", "@navikt/ds-react": "5.11.4", "@navikt/navspa": "6.0.1", "@portabletext/react": "3.0.11", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "axe-core": "4.8.2", "classnames": "2.3.2", "jotai": "2.6.0", @@ -373,8 +399,8 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", - "msw": "2.0.10", + "eslint-plugin-react-refresh": "0.4.5", + "msw": "2.0.11", "rollup-plugin-import-map": "^3.0.0", "rollup-plugin-visualizer": "5.11.0", "typescript": "5.3.3", @@ -433,6 +459,19 @@ "fsevents": "~2.3.2" } }, + "frontend/mulighetsrommet-veileder-flate/node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "frontend/mulighetsrommet-veileder-flate/node_modules/vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -2906,9 +2945,9 @@ } }, "node_modules/@grafana/faro-core": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.3.2.tgz", - "integrity": "sha512-K8IMWBNnBxydmL4/BWEbx5u0EDAsGadbbBxLCUxEiQyh2iC/0h/mZkFP88xkqCPxtdC+JrmZ2oDrPNVXUozy3Q==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.3.4.tgz", + "integrity": "sha512-r3l+7+qZHWGlAcc1q0DQI5xdF2cidDoYO0TtU3P1XDFLayFqMcUwQpXX1Yu0fd/WYegrtgc96jwje7g9W2N/5g==", "dependencies": { "@opentelemetry/api": "^1.7.0", "@opentelemetry/otlp-transformer": "^0.45.1", @@ -2916,11 +2955,11 @@ } }, "node_modules/@grafana/faro-web-sdk": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.3.2.tgz", - "integrity": "sha512-ye7NtfjVaNnOkG1Crhi1ARFaOqjYYRtjsbUzGej1KNDJ+wt/g/09ZS1i4O5lmB+QaVOpqzHWmwvL947yX4Rttg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.3.4.tgz", + "integrity": "sha512-jPgSqU+W6RZKWmo1XOBJEv/Rn8O6AeHeKeD9N8G8Rs0Rg3jW0HfnU+dA07trpdbHVpdF1jJ84XNe9hhJRbbThg==", "dependencies": { - "@grafana/faro-core": "^1.3.2", + "@grafana/faro-core": "^1.3.4", "ua-parser-js": "^1.0.32", "web-vitals": "^3.1.1" } @@ -4473,9 +4512,9 @@ } }, "node_modules/@tanstack/query-devtools": { - "version": "5.13.3", - "resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.13.3.tgz", - "integrity": "sha512-1acztPKZexvM9Ns2T0aq4rMVSDA3VGdB73KF7zT/KNVl6VfnBvs24wuIRVSPZKqyZznZTzT3/DzcpntYqg9hmw==", + "version": "5.13.5", + "resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.13.5.tgz", + "integrity": "sha512-effSYz9AWcZ6sNd+c8LCBYFIuDZApoCTXEpRlEYChBZpMz9QUUVMLToThwCyUY49+T5pANL3XxgZf3HV7hwJlg==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -4497,18 +4536,18 @@ } }, "node_modules/@tanstack/react-query-devtools": { - "version": "5.13.3", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.13.3.tgz", - "integrity": "sha512-ct58CMRrcjANRWCQ6cxzSUtme2jlX5au63+ckhMONob8bIk5VRfUEi4R49AWNJFL5haTBKe0InC0AV4bWi75VQ==", + "version": "5.13.5", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.13.5.tgz", + "integrity": "sha512-FB17B/yPtwnqg+DAdosAM+rFj3t8Pl121MPLiUGgl6jvG0A+U9XN3n39zVbhurbdSFO5jCMkPBlloW4NH5ojrA==", "dependencies": { - "@tanstack/query-devtools": "5.13.3" + "@tanstack/query-devtools": "5.13.5" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.12.2", + "@tanstack/react-query": "^5.13.4", "react": "^18.0.0" } }, @@ -4709,9 +4748,9 @@ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "node_modules/@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.2.43", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.43.tgz", + "integrity": "sha512-nvOV01ZdBdd/KW6FahSbcNplt2jCJfyWdTos61RYHV+FVv5L/g9AOX1bmbVcWcLFL8+KHQfh1zVIQrud6ihyQA==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -7664,9 +7703,9 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.4.tgz", - "integrity": "sha512-eD83+65e8YPVg6603Om2iCIwcQJf/y7++MWm4tACtEswFLYMwxwVWAfwN+e19f5Ad/FOyyNg9Dfi5lXhH3Y3rA==", + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true, "peerDependencies": { "eslint": ">=7" @@ -10544,9 +10583,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msw": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.10.tgz", - "integrity": "sha512-JhKdzIEuMDSU7qak4CJjiSFW2J0R4Wm5AuLhFzimKs68Wx7PTyqjgnw7+7FpQ3kGi0yY49g/qEFmUmMyLmjb4w==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.11.tgz", + "integrity": "sha512-dAXFS2DxZX0uFqMPhS3oUAu8S/5IQ5qKKSwtXl3/dMTeML0C8JfSvbeWtowYg6pu4Iehgp5L/pHLrlIcG++y/A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -11513,9 +11552,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -14081,10 +14120,11 @@ } }, "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.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17324,9 +17364,9 @@ } }, "@grafana/faro-core": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.3.2.tgz", - "integrity": "sha512-K8IMWBNnBxydmL4/BWEbx5u0EDAsGadbbBxLCUxEiQyh2iC/0h/mZkFP88xkqCPxtdC+JrmZ2oDrPNVXUozy3Q==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@grafana/faro-core/-/faro-core-1.3.4.tgz", + "integrity": "sha512-r3l+7+qZHWGlAcc1q0DQI5xdF2cidDoYO0TtU3P1XDFLayFqMcUwQpXX1Yu0fd/WYegrtgc96jwje7g9W2N/5g==", "requires": { "@opentelemetry/api": "^1.7.0", "@opentelemetry/otlp-transformer": "^0.45.1", @@ -17334,11 +17374,11 @@ } }, "@grafana/faro-web-sdk": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.3.2.tgz", - "integrity": "sha512-ye7NtfjVaNnOkG1Crhi1ARFaOqjYYRtjsbUzGej1KNDJ+wt/g/09ZS1i4O5lmB+QaVOpqzHWmwvL947yX4Rttg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@grafana/faro-web-sdk/-/faro-web-sdk-1.3.4.tgz", + "integrity": "sha512-jPgSqU+W6RZKWmo1XOBJEv/Rn8O6AeHeKeD9N8G8Rs0Rg3jW0HfnU+dA07trpdbHVpdF1jJ84XNe9hhJRbbThg==", "requires": { - "@grafana/faro-core": "^1.3.2", + "@grafana/faro-core": "^1.3.4", "ua-parser-js": "^1.0.32", "web-vitals": "^3.1.1" } @@ -18481,9 +18521,9 @@ "integrity": "sha512-8+rJucXvC/xlr4OrxHhEIob/cTlbT4fgmz1VsvB0D12FRStKaXeLORNGcOhSAynRd2NL74SV/Qq0IIb4DedLcA==" }, "@tanstack/query-devtools": { - "version": "5.13.3", - "resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.13.3.tgz", - "integrity": "sha512-1acztPKZexvM9Ns2T0aq4rMVSDA3VGdB73KF7zT/KNVl6VfnBvs24wuIRVSPZKqyZznZTzT3/DzcpntYqg9hmw==" + "version": "5.13.5", + "resolved": "https://registry.npmjs.org/@tanstack/query-devtools/-/query-devtools-5.13.5.tgz", + "integrity": "sha512-effSYz9AWcZ6sNd+c8LCBYFIuDZApoCTXEpRlEYChBZpMz9QUUVMLToThwCyUY49+T5pANL3XxgZf3HV7hwJlg==" }, "@tanstack/react-query": { "version": "5.13.4", @@ -18494,11 +18534,11 @@ } }, "@tanstack/react-query-devtools": { - "version": "5.13.3", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.13.3.tgz", - "integrity": "sha512-ct58CMRrcjANRWCQ6cxzSUtme2jlX5au63+ckhMONob8bIk5VRfUEi4R49AWNJFL5haTBKe0InC0AV4bWi75VQ==", + "version": "5.13.5", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.13.5.tgz", + "integrity": "sha512-FB17B/yPtwnqg+DAdosAM+rFj3t8Pl121MPLiUGgl6jvG0A+U9XN3n39zVbhurbdSFO5jCMkPBlloW4NH5ojrA==", "requires": { - "@tanstack/query-devtools": "5.13.3" + "@tanstack/query-devtools": "5.13.5" } }, "@tanstack/react-virtual": { @@ -18684,9 +18724,9 @@ "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "@types/react": { - "version": "18.2.42", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.42.tgz", - "integrity": "sha512-c1zEr96MjakLYus/wPnuWDo1/zErfdU9rNsIGmE+NV71nx88FG9Ttgo5dqorXTu/LImX2f63WBP986gJkMPNbA==", + "version": "18.2.43", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.43.tgz", + "integrity": "sha512-nvOV01ZdBdd/KW6FahSbcNplt2jCJfyWdTos61RYHV+FVv5L/g9AOX1bmbVcWcLFL8+KHQfh1zVIQrud6ihyQA==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -19272,13 +19312,13 @@ "@chakra-ui/react": "2.8.2", "@emotion/react": "11.11.1", "@emotion/styled": "11.11.0", - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", "eslint": "8.55.0", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", + "eslint-plugin-react-refresh": "0.4.5", "react": "18.2.0", "react-dom": "18.2.0", "react-hot-toast": "2.4.1", @@ -19317,6 +19357,12 @@ "fsevents": "~2.3.2" } }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true + }, "vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -20961,9 +21007,9 @@ "requires": {} }, "eslint-plugin-react-refresh": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.4.tgz", - "integrity": "sha512-eD83+65e8YPVg6603Om2iCIwcQJf/y7++MWm4tACtEswFLYMwxwVWAfwN+e19f5Ad/FOyyNg9Dfi5lXhH3Y3rA==", + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.5.tgz", + "integrity": "sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==", "dev": true, "requires": {} }, @@ -22941,7 +22987,7 @@ "requires": { "@axe-core/playwright": "4.8.2", "@eik/rollup-plugin": "4.0.60", - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@hookform/resolvers": "3.3.2", "@navikt/aksel-icons": "5.11.4", "@navikt/ds-css": "5.11.4", @@ -22951,9 +22997,9 @@ "@portabletext/types": "2.0.8", "@rollup/plugin-terser": "0.4.4", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "@types/is-url": "1.2.32", - "@types/react": "18.2.42", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", @@ -22970,10 +23016,10 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", + "eslint-plugin-react-refresh": "0.4.5", "is-url": "1.2.4", "jotai": "2.6.0", - "msw": "2.0.10", + "msw": "2.0.11", "mulighetsrommet-api-client": "*", "mulighetsrommet-frontend-common": "*", "react": "18.2.0", @@ -23025,6 +23071,12 @@ "fsevents": "~2.3.2" } }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true + }, "vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -23045,9 +23097,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "msw": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.10.tgz", - "integrity": "sha512-JhKdzIEuMDSU7qak4CJjiSFW2J0R4Wm5AuLhFzimKs68Wx7PTyqjgnw7+7FpQ3kGi0yY49g/qEFmUmMyLmjb4w==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.0.11.tgz", + "integrity": "sha512-dAXFS2DxZX0uFqMPhS3oUAu8S/5IQ5qKKSwtXl3/dMTeML0C8JfSvbeWtowYg6pu4Iehgp5L/pHLrlIcG++y/A==", "dev": true, "requires": { "@bundled-es-modules/cookie": "^2.0.0", @@ -23143,7 +23195,7 @@ "@portabletext/react": "3.0.11", "@sanity/client": "6.9.3", "@sanity/vision": "3.21.1", - "@types/react": "18.2.42", + "@types/react": "18.2.43", "react": "18.2.0", "react-dom": "18.2.0", "react-icons": "4.12.0", @@ -23165,7 +23217,7 @@ "requires": { "@axe-core/playwright": "^4.8.1", "@faker-js/faker": "8.3.1", - "@grafana/faro-web-sdk": "1.3.2", + "@grafana/faro-web-sdk": "1.3.4", "@navikt/aksel-icons": "5.11.4", "@navikt/ds-css": "5.11.4", "@navikt/ds-react": "5.11.4", @@ -23173,7 +23225,7 @@ "@playwright/test": "^1.40.1", "@portabletext/react": "3.0.11", "@tanstack/react-query": "5.13.4", - "@tanstack/react-query-devtools": "5.13.3", + "@tanstack/react-query-devtools": "5.13.5", "@types/node": "^20.10.3", "@typescript-eslint/eslint-plugin": "6.14.0", "@vitejs/plugin-react": "4.2.1", @@ -23189,10 +23241,10 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "eslint-plugin-react-refresh": "0.4.4", + "eslint-plugin-react-refresh": "0.4.5", "jotai": "2.6.0", "jotai-location": "0.5.2", - "msw": "2.0.10", + "msw": "2.0.11", "mulighetsrommet-api-client": "*", "mulighetsrommet-frontend-common": "*", "react": "18.2.0", @@ -23246,6 +23298,12 @@ "fsevents": "~2.3.2" } }, + "typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true + }, "vite": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.7.tgz", @@ -23853,9 +23911,9 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" }, "prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true }, "prettier-linter-helpers": { @@ -25788,10 +25846,11 @@ } }, "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", - "dev": true + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "peer": true }, "ua-parser-js": { "version": "1.0.35", diff --git a/package.json b/package.json index c57ea79405..ea7b4a5896 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ ], "devDependencies": { "husky": "8.0.3", - "prettier": "3.1.0", + "prettier": "3.1.1", "turbo": "1.11.1" }, "scripts": { From 719fd03ee260b4a82338eb114bb3c458bcbf2f23 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Fri, 24 Nov 2023 07:54:16 +0100 Subject: [PATCH 04/17] change view definitions to 'create or replace' --- .../db/migration/R__avtale_admin_view.sql | 5 ++--- .../R__tiltaksgjennomforing_admin_view.sql | 18 ++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql b/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql index e39e0739f3..087b320747 100644 --- a/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql +++ b/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql @@ -1,5 +1,4 @@ -drop view if exists avtale_admin_dto_view; -create view avtale_admin_dto_view as +create or replace view avtale_admin_dto_view as select a.id, a.navn, a.tiltakstype_id, @@ -39,7 +38,7 @@ select a.id, when aa.nav_ident is null then null::jsonb else jsonb_build_object('navIdent', aa.nav_ident, 'navn', concat(na.fornavn, ' ', na.etternavn)) end - ) as administratorer + ) as administratorer from avtale a join tiltakstype t on t.id = a.tiltakstype_id left join avtale_administrator aa on a.id = aa.avtale_id diff --git a/mulighetsrommet-api/src/main/resources/db/migration/R__tiltaksgjennomforing_admin_view.sql b/mulighetsrommet-api/src/main/resources/db/migration/R__tiltaksgjennomforing_admin_view.sql index add204fde1..c0ff355dd3 100644 --- a/mulighetsrommet-api/src/main/resources/db/migration/R__tiltaksgjennomforing_admin_view.sql +++ b/mulighetsrommet-api/src/main/resources/db/migration/R__tiltaksgjennomforing_admin_view.sql @@ -1,5 +1,4 @@ -drop view if exists tiltaksgjennomforing_admin_dto_view; -create view tiltaksgjennomforing_admin_dto_view as +create or replace view tiltaksgjennomforing_admin_dto_view as select tg.id::uuid, tg.navn, tg.tiltakstype_id, @@ -12,14 +11,13 @@ select tg.id::uuid, t.navn as tiltakstype_navn, case when arena_nav_enhet.enhetsnummer is null then null::jsonb - else - jsonb_build_object( - 'enhetsnummer', arena_nav_enhet.enhetsnummer, - 'navn', arena_nav_enhet.navn, - 'type', arena_nav_enhet.type, - 'overordnetEnhet', - arena_nav_enhet.overordnet_enhet) end - as arena_ansvarlig_enhet, + else jsonb_build_object( + 'enhetsnummer', arena_nav_enhet.enhetsnummer, + 'navn', arena_nav_enhet.navn, + 'type', arena_nav_enhet.type, + 'overordnetEnhet', + arena_nav_enhet.overordnet_enhet) + end as arena_ansvarlig_enhet, tg.avslutningsstatus, tg.apent_for_innsok, tg.sanity_id, From 90274e41958bdd0cc81e398b06b54479c5d17289 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Tue, 5 Dec 2023 08:47:29 +0100 Subject: [PATCH 05/17] remove dead code --- .../TiltaksgjennomforingRepository.kt | 61 +----------------- .../TiltaksgjennomforingRepositoryTest.kt | 63 ------------------- 2 files changed, 1 insertion(+), 123 deletions(-) diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt index 17312420c1..ff32445952 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt @@ -19,7 +19,6 @@ import no.nav.mulighetsrommet.domain.dbo.TiltaksgjennomforingOppstartstype import no.nav.mulighetsrommet.domain.dto.Tiltaksgjennomforingsstatus import no.nav.mulighetsrommet.domain.dto.Tiltaksgjennomforingsstatus.* import org.intellij.lang.annotations.Language -import org.postgresql.util.PSQLException import org.slf4j.LoggerFactory import java.time.LocalDate import java.util.* @@ -271,64 +270,6 @@ class TiltaksgjennomforingRepository(private val db: Database) { queryOf(query, tiltaksgjennomforing.toSqlParameters()).asExecute.let { tx.run(it) } } - fun updateEnheter(tiltaksnummer: String, navEnheter: List): Int { - @Language("PostgreSQL") - val findId = """ - select id from tiltaksgjennomforing - where (:aar::text is null and split_part(tiltaksnummer, '#', 2) = :lopenr) - or ( - :aar::text is not null and split_part(tiltaksnummer, '#', 1) = :aar - and split_part(tiltaksnummer, '#', 2) = :lopenr - ) - """.trimIndent() - - @Language("PostgreSQL") - val upsertEnhet = """ - insert into tiltaksgjennomforing_nav_enhet (tiltaksgjennomforing_id, enhetsnummer) - values (:id::uuid, :enhetsnummer) - on conflict (tiltaksgjennomforing_id, enhetsnummer) do nothing - """.trimIndent() - - @Language("PostgreSQL") - val deleteEnheter = """ - delete from tiltaksgjennomforing_nav_enhet - where tiltaksgjennomforing_id = :id::uuid and not (enhetsnummer = any (:enhetsnummere)) - """.trimIndent() - - val (aar, lopenr) = tiltaksnummer.split("#").let { - if (it.size == 2) { - (it.first() to it[1]) - } else { - (null to it.first()) - } - } - - return db.transaction { tx -> - val ider = queryOf(findId, mapOf("aar" to aar, "lopenr" to lopenr)) - .map { it.string("id") } - .asList - .let { db.run(it) } - if (ider.size > 1) { - throw PSQLException("Fant flere enn én tiltaksgjennomforing_id for tiltaksnummer: $tiltaksnummer", null) - } - if (ider.isEmpty()) { - return@transaction 0 - } - val id = ider[0] - - navEnheter.forEach { enhetsnummer -> - tx.run( - queryOf(upsertEnhet, mapOf("id" to id, "enhetsnummer" to enhetsnummer)).asExecute, - ) - } - tx.run( - queryOf(deleteEnheter, mapOf("id" to id, "enhetsnummere" to db.createTextArray(navEnheter))).asExecute, - ) - - 1 - } - } - fun get(id: UUID): TiltaksgjennomforingAdminDto? = db.transaction { get(id, it) } @@ -830,7 +771,7 @@ class TiltaksgjennomforingRepository(private val db: Database) { .let { db.run(it) } } - fun setAvtaleId(gjennomforingId: UUID, avtaleId: UUID?) { + fun setAvtaleId(tx: Session, gjennomforingId: UUID, avtaleId: UUID?) { @Language("PostgreSQL") val query = """ update tiltaksgjennomforing diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepositoryTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepositoryTest.kt index cd21d021c2..5aff688aa0 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepositoryTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepositoryTest.kt @@ -2,7 +2,6 @@ package no.nav.mulighetsrommet.api.repositories import io.kotest.assertions.arrow.core.shouldBeRight import io.kotest.core.spec.style.FunSpec -import io.kotest.matchers.collections.shouldBeEmpty import io.kotest.matchers.collections.shouldContainAll import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder import io.kotest.matchers.collections.shouldHaveSize @@ -349,68 +348,6 @@ class TiltaksgjennomforingRepositoryTest : FunSpec({ ) } - test("Oppdater navEnheter fra Sanity-tiltaksgjennomføringer til database") { - val enhetRepository = NavEnhetRepository(database.db) - enhetRepository.upsert( - NavEnhetDbo( - navn = "Navn1", - enhetsnummer = "1", - status = NavEnhetStatus.AKTIV, - type = Norg2Type.LOKAL, - overordnetEnhet = null, - ), - ).shouldBeRight() - enhetRepository.upsert( - NavEnhetDbo( - navn = "Navn2", - enhetsnummer = "2", - status = NavEnhetStatus.AKTIV, - type = Norg2Type.LOKAL, - overordnetEnhet = null, - ), - ).shouldBeRight() - - val gjennomforing = Oppfolging1.copy(navEnheter = emptyList()) - - tiltaksgjennomforinger.upsert(gjennomforing) - tiltaksgjennomforinger.get(gjennomforing.id).should { - it!!.navEnheter.shouldBeEmpty() - } - tiltaksgjennomforinger.updateEnheter("1", listOf("1", "2")) - tiltaksgjennomforinger.get(gjennomforing.id).should { - it!!.navEnheter shouldContainExactlyInAnyOrder listOf( - EmbeddedNavEnhet( - enhetsnummer = "1", - navn = "Navn1", - type = Norg2Type.LOKAL, - overordnetEnhet = null, - ), - EmbeddedNavEnhet( - enhetsnummer = "2", - navn = "Navn2", - type = Norg2Type.LOKAL, - overordnetEnhet = null, - ), - ) - } - database.assertThat("tiltaksgjennomforing_nav_enhet").hasNumberOfRows(2) - - tiltaksgjennomforinger.updateEnheter("1", listOf("2")) - tiltaksgjennomforinger.get(gjennomforing.id).should { - it!!.navEnheter.shouldContainExactlyInAnyOrder( - listOf( - EmbeddedNavEnhet( - enhetsnummer = "2", - navn = "Navn2", - type = Norg2Type.LOKAL, - overordnetEnhet = null, - ), - ), - ) - } - database.assertThat("tiltaksgjennomforing_nav_enhet").hasNumberOfRows(1) - } - test("update sanity_id") { val id = UUID.randomUUID() From ffc096fb5787ffc5548e70725808fb5acf786d9c Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Thu, 23 Nov 2023 13:46:05 +0100 Subject: [PATCH 06/17] =?UTF-8?q?logg=20historikk=20for=20avtaler=20og=20g?= =?UTF-8?q?jennomf=C3=B8ringer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/domain/dto/EndringshistorikkDto.kt | 23 ++++ .../api/plugins/DependencyInjection.kt | 6 +- .../api/repositories/AvtaleRepository.kt | 18 ++- .../TiltaksgjennomforingRepository.kt | 12 +- .../api/routes/v1/AvtaleRoutes.kt | 3 +- .../routes/v1/TiltaksgjennomforingRoutes.kt | 9 +- .../api/services/ArenaAdapterService.kt | 51 +++++++- .../api/services/AvtaleService.kt | 42 ++++++- .../api/services/EndringshistorikkService.kt | 98 +++++++++++++++ .../services/TiltaksgjennomforingService.kt | 73 +++++++---- .../db/migration/R__version_history.sql | 53 ++++++++ .../db/migration/V101__endringshistorikk.sql | 23 ++++ .../api/services/ArenaAdapterServiceTest.kt | 4 + .../api/services/AvtaleServiceTest.kt | 14 ++- .../services/EndringshistorikkServiceTest.kt | 115 ++++++++++++++++++ .../TiltaksgjennomforingServiceTest.kt | 14 ++- 16 files changed, 502 insertions(+), 56 deletions(-) create mode 100644 mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt create mode 100644 mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt create mode 100644 mulighetsrommet-api/src/main/resources/db/migration/R__version_history.sql create mode 100644 mulighetsrommet-api/src/main/resources/db/migration/V101__endringshistorikk.sql create mode 100644 mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt new file mode 100644 index 0000000000..e1107093cf --- /dev/null +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt @@ -0,0 +1,23 @@ +package no.nav.mulighetsrommet.api.domain.dto + +import kotlinx.serialization.Serializable +import no.nav.mulighetsrommet.domain.serializers.LocalDateTimeSerializer +import no.nav.mulighetsrommet.domain.serializers.UUIDSerializer +import java.time.LocalDateTime +import java.util.* + +@Serializable +data class EndringshistorikkDto( + val entries: List, +) { + + @Serializable + data class Entry( + @Serializable(with = UUIDSerializer::class) + val id: UUID, + val operation: String, + @Serializable(with = LocalDateTimeSerializer::class) + val editedAt: LocalDateTime, + val editedBy: String, + ) +} diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/plugins/DependencyInjection.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/plugins/DependencyInjection.kt index a61c54c488..b0b884b024 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/plugins/DependencyInjection.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/plugins/DependencyInjection.kt @@ -261,6 +261,7 @@ private fun services(appConfig: AppConfig) = module { single { BrregClientImpl(baseUrl = appConfig.brreg.baseUrl) } + single { EndringshistorikkService(get()) } single { ArenaAdapterService( get(), @@ -276,9 +277,10 @@ private fun services(appConfig: AppConfig) = module { get(), get(), get(), + get(), ) } - single { AvtaleService(get(), get(), get(), get(), get(), get(), get()) } + single { AvtaleService(get(), get(), get(), get(), get(), get(), get(), get()) } single { TiltakshistorikkService(get(), get()) } single { VeilederflateService(get(), get(), get(), get()) } single { ArrangorService(get()) } @@ -288,7 +290,7 @@ private fun services(appConfig: AppConfig) = module { single { PoaoTilgangService(get()) } single { DelMedBrukerService(get()) } single { MicrosoftGraphService(get()) } - single { TiltaksgjennomforingService(get(), get(), get(), get(), get(), get(), get(), get(), get()) } + single { TiltaksgjennomforingService(get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) } single { SanityTiltaksgjennomforingService(get(), get(), get()) } single { TiltakstypeService(get()) } single { NavEnheterSyncService(get(), get(), get(), get()) } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt index 581839493a..9bd4d9d293 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt @@ -156,7 +156,11 @@ class AvtaleRepository(private val db: Database) { ).asExecute.let { tx.run(it) } } - fun upsertArenaAvtale(avtale: ArenaAvtaleDbo) { + fun upsertArenaAvtale(avtale: ArenaAvtaleDbo): Unit = db.transaction { + upsertArenaAvtale(it, avtale) + } + + fun upsertArenaAvtale(tx: Session, avtale: ArenaAvtaleDbo) { logger.info("Lagrer avtale fra Arena id=${avtale.id}") @Language("PostgreSQL") @@ -201,7 +205,7 @@ class AvtaleRepository(private val db: Database) { returning * """.trimIndent() - queryOf(query, avtale.toSqlParameters()).asExecute.let { db.run(it) } + queryOf(query, avtale.toSqlParameters()).asExecute.let { tx.run(it) } } fun get(id: UUID): AvtaleAdminDto? = db.transaction { get(id, it) } @@ -309,6 +313,10 @@ class AvtaleRepository(private val db: Database) { } fun setAvslutningsstatus(id: UUID, status: Avslutningsstatus) { + db.transaction { setAvslutningsstatus(it, id, status) } + } + + fun setAvslutningsstatus(tx: Session, id: UUID, status: Avslutningsstatus) { @Language("PostgreSQL") val query = """ update avtale @@ -318,10 +326,10 @@ class AvtaleRepository(private val db: Database) { queryOf(query, mapOf("id" to id, "status" to status.name)) .asUpdate - .let { db.run(it) } + .let { tx.run(it) } } - fun delete(id: UUID) { + fun delete(tx: Session, id: UUID) { logger.info("Sletter avtale id=$id") @Language("PostgreSQL") @@ -332,7 +340,7 @@ class AvtaleRepository(private val db: Database) { queryOf(query, id) .asUpdate - .let { db.run(it) } + .let { tx.run(it) } } private fun AvtaleDbo.toSqlParameters() = mapOf( diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt index ff32445952..16ac3dd2b4 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/TiltaksgjennomforingRepository.kt @@ -551,6 +551,10 @@ class TiltaksgjennomforingRepository(private val db: Database) { } fun setTilgjengeligForVeileder(id: UUID, tilgjengeligForVeileder: Boolean): Int { + return db.transaction { setTilgjengeligForVeileder(it, id, tilgjengeligForVeileder) } + } + + fun setTilgjengeligForVeileder(tx: Session, id: UUID, tilgjengeligForVeileder: Boolean): Int { logger.info("Setter tilgjengelig for veileder '$tilgjengeligForVeileder' for gjennomføring med id: $id") @Language("PostgreSQL") val query = """ @@ -559,11 +563,7 @@ class TiltaksgjennomforingRepository(private val db: Database) { where id = ?::uuid """.trimIndent() - return queryOf( - query, - tilgjengeligForVeileder, - id, - ).asUpdate.let { db.run(it) } + return queryOf(query, tilgjengeligForVeileder, id).asUpdate.let { tx.run(it) } } private fun TiltaksgjennomforingDbo.toSqlParameters() = mapOf( @@ -779,7 +779,7 @@ class TiltaksgjennomforingRepository(private val db: Database) { where id = ? """.trimIndent() - return queryOf(query, avtaleId, gjennomforingId).asUpdate.let { db.run(it) } + return queryOf(query, avtaleId, gjennomforingId).asUpdate.let { tx.run(it) } } fun getAllMidlertidigStengteGjennomforingerSomNarmerSegSluttdato(currentDate: LocalDate = LocalDate.now()): List { diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt index f5929c14ed..41387c6eaa 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt @@ -83,7 +83,8 @@ fun Route.avtaleRoutes() { put("{id}/avbryt") { val id = call.parameters.getOrFail("id") - val response = avtaler.avbrytAvtale(id) + val navIdent = getNavIdent() + val response = avtaler.avbrytAvtale(id, navIdent) call.respondWithStatusResponse(response) } } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt index b86d49df84..8e396a95b4 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt @@ -65,21 +65,24 @@ fun Route.tiltaksgjennomforingRoutes() { put("{id}/avtale") { val id = call.parameters.getOrFail("id") + val navIdent = getNavIdent() val request = call.receive() - val response = service.setAvtale(id, request.avtaleId) + val response = service.setAvtale(id, request.avtaleId, navIdent) call.respondWithStatusResponse(response) } put("{id}/avbryt") { val id = call.parameters.getOrFail("id") - val response = service.avbrytGjennomforing(id) + val navIdent = getNavIdent() + val response = service.avbrytGjennomforing(id, navIdent) call.respondWithStatusResponse(response) } put("{id}/tilgjengelig-for-veileder") { val id = call.parameters.getOrFail("id") + val navIdent = getNavIdent() val request = call.receive() - service.setTilgjengeligForVeileder(id, request.tilgjengeligForVeileder) + service.setTilgjengeligForVeileder(id, request.tilgjengeligForVeileder, navIdent) call.respond(HttpStatusCode.OK) } } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt index 1bd78b94b4..1d7b5695bf 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt @@ -2,6 +2,10 @@ package no.nav.mulighetsrommet.api.services import arrow.core.NonEmptyList import arrow.core.toNonEmptyListOrNull +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonNull +import kotlinx.serialization.json.encodeToJsonElement +import kotliquery.TransactionalSession import no.nav.mulighetsrommet.api.domain.dbo.NavAnsattRolle import no.nav.mulighetsrommet.api.domain.dbo.NavEnhetDbo import no.nav.mulighetsrommet.api.domain.dbo.NavEnhetStatus @@ -42,6 +46,7 @@ class ArenaAdapterService( private val virksomhetService: VirksomhetService, private val navEnhetService: NavEnhetService, private val notificationService: NotificationService, + private val endringshistorikk: EndringshistorikkService, ) { fun upsertTiltakstype(tiltakstype: TiltakstypeDbo): QueryResult { return tiltakstyper.upsert(tiltakstype).onRight { @@ -61,17 +66,26 @@ class ArenaAdapterService( suspend fun upsertAvtale(avtale: ArenaAvtaleDbo): AvtaleAdminDto { virksomhetService.getOrSyncVirksomhet(avtale.leverandorOrganisasjonsnummer) - avtaler.upsertArenaAvtale(avtale) - val dbo = avtaler.get(avtale.id)!! + val dbo = db.transaction { tx -> + avtaler.upsertArenaAvtale(tx, avtale) + val dbo = avtaler.get(avtale.id, tx)!! + logUpdate(tx, DocumentClass.AVTALE, dbo.id, dbo) + dbo + } + if (dbo.avtalestatus == Avtalestatus.Aktiv && dbo.administratorer.isEmpty()) { maybeNotifyRelevantAdministrators(dbo) } + return dbo } fun removeAvtale(id: UUID) { - avtaler.delete(id) + db.transaction { tx -> + avtaler.delete(tx, id) + logDelete(tx, DocumentClass.AVTALE, id) + } } suspend fun upsertTiltaksgjennomforing(tiltaksgjennomforing: ArenaTiltaksgjennomforingDbo): QueryResult { @@ -82,6 +96,7 @@ class ArenaAdapterService( val gjennomforing = db.transactionSuspend { tx -> tiltaksgjennomforinger.upsertArenaTiltaksgjennomforing(tiltaksgjennomforingMedAvtale, tx) val gjennomforing = tiltaksgjennomforinger.get(tiltaksgjennomforing.id, tx)!! + logUpdate(tx, DocumentClass.TILTAKSGJENNOMFORING, gjennomforing.id, gjennomforing) tiltaksgjennomforingKafkaProducer.publish(TiltaksgjennomforingDto.from(gjennomforing)) if (shouldBeManagedInSanity(gjennomforing)) { @@ -103,6 +118,7 @@ class ArenaAdapterService( db.transaction { tx -> tiltaksgjennomforinger.delete(id, tx) + logDelete(tx, DocumentClass.TILTAKSGJENNOMFORING, id) tiltaksgjennomforingKafkaProducer.retract(id) } @@ -212,4 +228,33 @@ class ArenaAdapterService( val notification = createNotification(administrators) notificationService.scheduleNotification(notification) } + + private inline fun logUpdate( + tx: TransactionalSession, + documentClass: DocumentClass, + id: UUID, + value: T, + ) { + endringshistorikk.logEndring( + tx, + documentClass, + "OPPDATERT", + "Arena", + id, + ) { Json.encodeToJsonElement(value) } + } + + private fun logDelete( + tx: TransactionalSession, + documentClass: DocumentClass, + id: UUID, + ) { + endringshistorikk.logEndring( + tx, + documentClass, + "SLETTET", + "Arena", + id, + ) { JsonNull } + } } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt index 3ca36ec2bf..8246881686 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt @@ -2,11 +2,14 @@ package no.nav.mulighetsrommet.api.services import arrow.core.Either import arrow.core.toNonEmptyListOrNull +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.encodeToJsonElement import kotliquery.TransactionalSession import no.nav.mulighetsrommet.api.avtaler.AvtaleValidator import no.nav.mulighetsrommet.api.domain.dbo.AvtaleDbo import no.nav.mulighetsrommet.api.domain.dto.AvtaleAdminDto import no.nav.mulighetsrommet.api.domain.dto.AvtaleNotificationDto +import no.nav.mulighetsrommet.api.domain.dto.EndringshistorikkDto import no.nav.mulighetsrommet.api.repositories.AvtaleRepository import no.nav.mulighetsrommet.api.repositories.TiltaksgjennomforingRepository import no.nav.mulighetsrommet.api.repositories.UtkastRepository @@ -31,6 +34,7 @@ class AvtaleService( private val notificationRepository: NotificationRepository, private val utkastRepository: UtkastRepository, private val validator: AvtaleValidator, + private val endringshistorikkService: EndringshistorikkService, private val db: Database, ) { fun get(id: UUID): AvtaleAdminDto? { @@ -48,7 +52,9 @@ class AvtaleService( dispatchNotificationToNewAdministrators(tx, dbo, navIdent) - avtaler.get(dbo.id, tx)!! + val dto = getOrError(dbo.id, tx) + logEndring("OPPDATERT", dto, navIdent, tx) + dto } } } @@ -83,8 +89,8 @@ class AvtaleService( return avtaler.getAllAvtalerSomNarmerSegSluttdato() } - fun avbrytAvtale(avtaleId: UUID): StatusResponse { - val avtale = avtaler.get(avtaleId) + fun avbrytAvtale(id: UUID, navIdent: String): StatusResponse { + val avtale = avtaler.get(id) ?: return Either.Left(NotFound("Avtalen finnes ikke")) if (avtale.opphav == Opphav.ARENA) { @@ -95,7 +101,7 @@ class AvtaleService( return Either.Left(BadRequest(message = "Avtalen er allerede avsluttet og kan derfor ikke avbrytes.")) } - val (antallGjennomforinger) = tiltaksgjennomforinger.getAll(avtaleId = avtaleId) + val (antallGjennomforinger) = tiltaksgjennomforinger.getAll(avtaleId = id) if (antallGjennomforinger > 0) { return Either.Left( BadRequest( @@ -108,7 +114,22 @@ class AvtaleService( ) } - return Either.Right(avtaler.setAvslutningsstatus(avtaleId, Avslutningsstatus.AVBRUTT)) + db.transaction { tx -> + avtaler.setAvslutningsstatus(tx, id, Avslutningsstatus.AVBRUTT) + val dto = getOrError(id, tx) + logEndring("AVBRUTT", dto, navIdent, tx) + } + + return Either.Right(Unit) + } + + fun getEndringshistorikk(id: UUID): EndringshistorikkDto { + return endringshistorikkService.getEndringshistorikk(DocumentClass.AVTALE, id) + } + + private fun getOrError(id: UUID, tx: TransactionalSession): AvtaleAdminDto { + val dto = avtaler.get(id, tx) + return requireNotNull(dto) { "Avtale med id=$id finnes ikke" } } private fun dispatchNotificationToNewAdministrators( @@ -129,4 +150,15 @@ class AvtaleService( ) notificationRepository.insert(notification, tx) } + + private fun logEndring( + operation: String, + dto: AvtaleAdminDto, + navIdent: String, + tx: TransactionalSession, + ) { + endringshistorikkService.logEndring(tx, DocumentClass.AVTALE, operation, navIdent, dto.id) { + Json.encodeToJsonElement(dto) + } + } } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt new file mode 100644 index 0000000000..65daf857bd --- /dev/null +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt @@ -0,0 +1,98 @@ +package no.nav.mulighetsrommet.api.services + +import kotlinx.serialization.json.JsonElement +import kotliquery.TransactionalSession +import kotliquery.queryOf +import no.nav.mulighetsrommet.api.domain.dto.EndringshistorikkDto +import no.nav.mulighetsrommet.database.Database +import org.intellij.lang.annotations.Language +import java.time.LocalDateTime +import java.util.* + +class EndringshistorikkService( + private val db: Database, +) { + + fun getEndringshistorikk(documentClass: DocumentClass, id: UUID): EndringshistorikkDto { + @Language("PostgreSQL") + val statement = """ + select document_id, + operation, + lower(sys_period) as edited_at, + case + when na.nav_ident is not null then concat(na.fornavn, ' ', na.etternavn) + else user_id + end as edited_by + from ${documentClass.table} + left join nav_ansatt na on user_id = na.nav_ident + where document_id = :document_id + order by sys_period desc; + """.trimIndent() + + val params = mapOf( + "document_id" to id, + ) + + val entries = queryOf(statement, params) + .map { + EndringshistorikkDto.Entry( + id = it.uuid("document_id"), + operation = it.string("operation"), + editedAt = it.localDateTime("edited_at"), + editedBy = it.string("edited_by"), + ) + } + .asList + .let { db.run(it) } + + return EndringshistorikkDto(entries = entries) + } + + + fun logEndring( + documentClass: DocumentClass, + operation: String, + userId: String, + documentId: UUID, + timestamp: LocalDateTime? = null, + valueProvider: () -> JsonElement, + ) = db.transaction { + logEndring(it, documentClass, operation, userId, documentId, timestamp, valueProvider) + } + + fun logEndring( + tx: TransactionalSession, + documentClass: DocumentClass, + operation: String, + userId: String, + documentId: UUID, + timestamp: LocalDateTime? = null, + valueProvider: () -> JsonElement, + ) { + val statement = if (timestamp == null) { + """ + select version_history(:table, :operation, :document_id::uuid, :value::jsonb, :user_id) + """.trimIndent() + } else { + """ + select version_history(:table, :operation, :document_id::uuid, :value::jsonb, :user_id, :timestamp) + """.trimIndent() + } + + val params = mapOf( + "operation" to operation, + "table" to documentClass.table, + "document_id" to documentId, + "value" to valueProvider.invoke().toString(), + "user_id" to userId, + "timestamp" to timestamp, + ) + + tx.run(queryOf(statement, params).asExecute) + } +} + +enum class DocumentClass(val table: String) { + AVTALE("avtale_endringshistorikk"), + TILTAKSGJENNOMFORING("tiltaksgjennomforing_endringshistorikk"), +} diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt index f2f909e350..6c76b8fd72 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt @@ -3,14 +3,12 @@ package no.nav.mulighetsrommet.api.services import arrow.core.Either import arrow.core.left import arrow.core.toNonEmptyListOrNull -import io.ktor.server.plugins.* +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.encodeToJsonElement import kotliquery.TransactionalSession import no.nav.mulighetsrommet.api.clients.vedtak.Innsatsgruppe import no.nav.mulighetsrommet.api.domain.dbo.TiltaksgjennomforingDbo -import no.nav.mulighetsrommet.api.domain.dto.TiltaksgjennomforingAdminDto -import no.nav.mulighetsrommet.api.domain.dto.TiltaksgjennomforingDto -import no.nav.mulighetsrommet.api.domain.dto.TiltaksgjennomforingNotificationDto -import no.nav.mulighetsrommet.api.domain.dto.VeilederflateTiltaksgjennomforing +import no.nav.mulighetsrommet.api.domain.dto.* import no.nav.mulighetsrommet.api.repositories.AvtaleRepository import no.nav.mulighetsrommet.api.repositories.DeltakerRepository import no.nav.mulighetsrommet.api.repositories.TiltaksgjennomforingRepository @@ -40,6 +38,7 @@ class TiltaksgjennomforingService( private val tiltaksgjennomforingKafkaProducer: TiltaksgjennomforingKafkaProducer, private val notificationRepository: NotificationRepository, private val validator: TiltaksgjennomforingValidator, + private val documentHistoryService: EndringshistorikkService, private val db: Database, ) { suspend fun upsert( @@ -56,14 +55,17 @@ class TiltaksgjennomforingService( dispatchNotificationToNewAdministrators(tx, dbo, navIdent) - val dto = tiltaksgjennomforinger.get(dbo.id, tx)!! + val dto = getOrError(dbo.id, tx) + logEndring("OPPDATERT", dto, navIdent, tx) tiltaksgjennomforingKafkaProducer.publish(TiltaksgjennomforingDto.from(dto)) dto } } } - fun get(id: UUID): TiltaksgjennomforingAdminDto? = tiltaksgjennomforinger.get(id) + fun get(id: UUID): TiltaksgjennomforingAdminDto? { + return tiltaksgjennomforinger.get(id) + } fun getAllSkalMigreres( pagination: PaginationParams, @@ -146,16 +148,21 @@ class TiltaksgjennomforingService( return tiltaksgjennomforinger.getAllMidlertidigStengteGjennomforingerSomNarmerSegSluttdato() } - fun setTilgjengeligForVeileder(id: UUID, tilgjengeligForVeileder: Boolean) { - val updatedRows = tiltaksgjennomforinger.setTilgjengeligForVeileder(id, tilgjengeligForVeileder) - if (updatedRows != 1) { - throw NotFoundException("Gjennomføringen finnes ikke") + fun setTilgjengeligForVeileder(id: UUID, tilgjengeligForVeileder: Boolean, navIdent: String) { + db.transaction { tx -> + tiltaksgjennomforinger.setTilgjengeligForVeileder(tx, id, tilgjengeligForVeileder) + val dto = getOrError(id, tx) + val operation = if (tilgjengeligForVeileder) { + "TILGJENGELIG_FOR_VEILEDER" + } else { + "IKKE_TILGJENGELIG_FOR_VEILEDER" + } + logEndring(operation, dto, navIdent, tx) } } - fun setAvtale(gjennomforingId: UUID, avtaleId: UUID?): StatusResponse { - val gjennomforing = tiltaksgjennomforinger.get(gjennomforingId) - ?: return NotFound("Tiltaksgjennomføring med id=$gjennomforingId finnes ikke").left() + fun setAvtale(id: UUID, avtaleId: UUID?, navIdent: String): StatusResponse { + val gjennomforing = get(id) ?: return NotFound("Gjennomføringen finnes ikke").left() if (!isTiltakMedAvtalerFraMulighetsrommet(gjennomforing.tiltakstype.arenaKode)) { return BadRequest("Avtale kan bare settes for tiltaksgjennomføringer av type AFT eller VTA").left() @@ -168,14 +175,17 @@ class TiltaksgjennomforingService( } } - tiltaksgjennomforinger.setAvtaleId(gjennomforingId, avtaleId) + db.transaction { tx -> + tiltaksgjennomforinger.setAvtaleId(tx, id, avtaleId) + val dto = getOrError(id, tx) + logEndring("AVTALE_ENDRET", dto, navIdent, tx) + } return Either.Right(Unit) } - fun avbrytGjennomforing(gjennomforingId: UUID): StatusResponse { - val gjennomforing = tiltaksgjennomforinger.get(gjennomforingId) - ?: return Either.Left(NotFound("Gjennomføringen finnes ikke")) + fun avbrytGjennomforing(id: UUID, navIdent: String): StatusResponse { + val gjennomforing = get(id) ?: return Either.Left(NotFound("Gjennomføringen finnes ikke")) if (gjennomforing.opphav == ArenaMigrering.Opphav.ARENA) { return Either.Left(BadRequest(message = "Gjennomføringen har opprinnelse fra Arena og kan ikke bli avbrutt i admin-flate.")) @@ -185,20 +195,30 @@ class TiltaksgjennomforingService( return Either.Left(BadRequest(message = "Gjennomføringen kan ikke avbrytes fordi den allerede er avsluttet.")) } - val antallDeltagere = deltakerRepository.getAll(gjennomforingId).size + val antallDeltagere = deltakerRepository.getAll(id).size if (antallDeltagere > 0) { return Either.Left(BadRequest(message = "Gjennomføringen kan ikke avbrytes fordi den har $antallDeltagere deltager(e) koblet til seg.")) } db.transaction { tx -> - tiltaksgjennomforinger.setAvslutningsstatus(tx, gjennomforingId, Avslutningsstatus.AVBRUTT) - val dto = tiltaksgjennomforinger.get(gjennomforingId, tx)!! + tiltaksgjennomforinger.setAvslutningsstatus(tx, id, Avslutningsstatus.AVBRUTT) + val dto = getOrError(id, tx) + logEndring("AVBRUTT", dto, navIdent, tx) tiltaksgjennomforingKafkaProducer.publish(TiltaksgjennomforingDto.from(dto)) } return Either.Right(Unit) } + fun getEndringshistorikk(id: UUID): EndringshistorikkDto { + return documentHistoryService.getEndringshistorikk(DocumentClass.TILTAKSGJENNOMFORING, id) + } + + private fun getOrError(id: UUID, tx: TransactionalSession): TiltaksgjennomforingAdminDto { + val gjennomforing = tiltaksgjennomforinger.get(id, tx) + return requireNotNull(gjennomforing) { "Gjennomføringen med id=$id finnes ikke" } + } + private fun dispatchNotificationToNewAdministrators( tx: TransactionalSession, dbo: TiltaksgjennomforingDbo, @@ -217,4 +237,15 @@ class TiltaksgjennomforingService( ) notificationRepository.insert(notification, tx) } + + private fun logEndring( + operation: String, + dto: TiltaksgjennomforingAdminDto, + navIdent: String, + tx: TransactionalSession, + ) { + documentHistoryService.logEndring(tx, DocumentClass.TILTAKSGJENNOMFORING, operation, navIdent, dto.id) { + Json.encodeToJsonElement(dto) + } + } } diff --git a/mulighetsrommet-api/src/main/resources/db/migration/R__version_history.sql b/mulighetsrommet-api/src/main/resources/db/migration/R__version_history.sql new file mode 100644 index 0000000000..f51a1f6385 --- /dev/null +++ b/mulighetsrommet-api/src/main/resources/db/migration/R__version_history.sql @@ -0,0 +1,53 @@ +/** + * Utility for å dumpe snaphots av et dokument til en tabell spesifisert i [versioning_table]. + * + * versioning_table: tabell som skal skrives til + * operation: fritekst som beskriver endringen + * document_id: id til dokumentet/entiteten som blir endret + * value: en JSON dump av dokumentet/entiteten + * user_id: identifikator på den som gjør endringen (typisk NAVIdent). + * ts: timestamp for endringen. Utledes automatisk, men kan settes eksplisitt. + * Må være etter (i tid) forrige rad med samme [document_id]. + */ +create or replace function version_history( + versioning_table text, + operation text, + document_id uuid, + value jsonb, + user_id text, + ts timestamp with time zone default current_timestamp +) returns void as +$$ +declare + last_sys_period tstzrange; + sql_query text; +begin + -- Find the last sys_period for the given document_id + sql_query := 'SELECT sys_period FROM ' || versioning_table || + ' WHERE document_id = $1 ORDER BY sys_period DESC LIMIT 1'; + execute sql_query into last_sys_period using document_id; + + -- If a previous record for "id", validate + if last_sys_period is not null then + if lower(last_sys_period) > ts then + raise invalid_parameter_value using + message = + 'the "ts" parameter must be after the most recent "sys_period" for versions of record with document_id ' || + document_id, + hint = 'expected "ts" to be after ' || lower(last_sys_period); + end if; + + -- Update the sys_period of the previous latest record + sql_query := 'UPDATE ' || versioning_table || + ' SET sys_period = tstzrange($1, $2, ''[)'')' || + ' WHERE document_id = $3 AND sys_period = $4'; + execute sql_query using lower(last_sys_period), ts, document_id, last_sys_period; + end if; + + -- Insert the new record with the updated sys_period + sql_query := 'INSERT INTO ' || versioning_table || + ' (operation, document_id, value, user_id, sys_period) VALUES ($1, $2, $3, $4, tstzrange($5, NULL, ''[)''))'; + execute sql_query using operation, document_id, value, user_id, ts; +end +$$ language plpgsql; + diff --git a/mulighetsrommet-api/src/main/resources/db/migration/V101__endringshistorikk.sql b/mulighetsrommet-api/src/main/resources/db/migration/V101__endringshistorikk.sql new file mode 100644 index 0000000000..33a4d9e91e --- /dev/null +++ b/mulighetsrommet-api/src/main/resources/db/migration/V101__endringshistorikk.sql @@ -0,0 +1,23 @@ +create table if not exists tiltaksgjennomforing_endringshistorikk +( + document_id uuid not null, + value jsonb not null, + operation text not null, + user_id text not null, + sys_period tstzrange not null +); + +create index on tiltaksgjennomforing_endringshistorikk (document_id, sys_period); +create index on tiltaksgjennomforing_endringshistorikk using gist (sys_period) include (document_id); + +create table if not exists avtale_endringshistorikk +( + document_id uuid not null, + value jsonb not null, + operation text not null, + user_id text not null, + sys_period tstzrange not null +); + +create index on avtale_endringshistorikk (document_id, sys_period); +create index on avtale_endringshistorikk using gist (sys_period) include (document_id); diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterServiceTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterServiceTest.kt index 51e372b8ef..b2f518f89c 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterServiceTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterServiceTest.kt @@ -144,6 +144,7 @@ class ArenaAdapterServiceTest : FunSpec({ virksomhetService = mockk(relaxed = true), navEnhetService = mockk(relaxed = true), notificationService = mockk(relaxed = true), + endringshistorikk = EndringshistorikkService(database.db), ) afterTest { @@ -202,6 +203,7 @@ class ArenaAdapterServiceTest : FunSpec({ virksomhetService = mockk(relaxed = true), navEnhetService = NavEnhetService(navEnheter), notificationService = notificationService, + endringshistorikk = EndringshistorikkService(database.db), ) afterEach { @@ -336,6 +338,7 @@ class ArenaAdapterServiceTest : FunSpec({ virksomhetService = mockk(relaxed = true), navEnhetService = NavEnhetService(NavEnhetRepository(database.db)), notificationService = notificationService, + endringshistorikk = EndringshistorikkService(database.db), ) afterEach { @@ -538,6 +541,7 @@ class ArenaAdapterServiceTest : FunSpec({ virksomhetService = mockk(relaxed = true), navEnhetService = NavEnhetService(NavEnhetRepository(database.db)), notificationService = mockk(relaxed = true), + endringshistorikk = EndringshistorikkService(database.db), ) beforeTest { diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/AvtaleServiceTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/AvtaleServiceTest.kt index 8adcda4928..311ec77763 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/AvtaleServiceTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/AvtaleServiceTest.kt @@ -57,6 +57,7 @@ class AvtaleServiceTest : FunSpec({ NotificationRepository(database.db), utkastRepository, validator, + EndringshistorikkService(database.db), database.db, ) @@ -82,6 +83,7 @@ class AvtaleServiceTest : FunSpec({ NotificationRepository(database.db), utkastRepository, validator, + EndringshistorikkService(database.db), database.db, ) @@ -90,7 +92,7 @@ class AvtaleServiceTest : FunSpec({ val avtaleIdSomIkkeFinnes = "3c9f3d26-50ec-45a7-a7b2-c2d8a3653945".toUUID() avtaleRepository.upsert(avtale) - avtaleService.avbrytAvtale(avtaleIdSomIkkeFinnes).shouldBeLeft( + avtaleService.avbrytAvtale(avtaleIdSomIkkeFinnes, "B123456").shouldBeLeft( NotFound("Avtalen finnes ikke"), ) } @@ -104,7 +106,7 @@ class AvtaleServiceTest : FunSpec({ ) avtaleRepository.upsert(avtale) - avtaleService.avbrytAvtale(avtale.id).shouldBeLeft( + avtaleService.avbrytAvtale(avtale.id, "B123456").shouldBeLeft( BadRequest("Avtalen har opprinnelse fra Arena og kan ikke bli avbrutt fra admin-flate."), ) } @@ -118,7 +120,7 @@ class AvtaleServiceTest : FunSpec({ ) avtaleRepository.upsert(avtale) - avtaleService.avbrytAvtale(avtale.id).shouldBeLeft( + avtaleService.avbrytAvtale(avtale.id, "B123456").shouldBeLeft( BadRequest(message = "Avtalen er allerede avsluttet og kan derfor ikke avbrytes."), ) } @@ -160,7 +162,7 @@ class AvtaleServiceTest : FunSpec({ tiltaksgjennomforinger.upsert(arbeidstrening) tiltaksgjennomforinger.upsert(oppfolging2) - avtaleService.avbrytAvtale(avtale.id).shouldBeLeft( + avtaleService.avbrytAvtale(avtale.id, "B123456").shouldBeLeft( BadRequest("Avtalen har 2 tiltaksgjennomføringer koblet til seg. Du må frikoble gjennomføringene før du kan avbryte avtalen."), ) } @@ -172,7 +174,7 @@ class AvtaleServiceTest : FunSpec({ ) avtaleRepository.upsert(avtale).right() - avtaleService.avbrytAvtale(avtale.id) + avtaleService.avbrytAvtale(avtale.id, "B123456") } } @@ -186,6 +188,7 @@ class AvtaleServiceTest : FunSpec({ NotificationRepository(database.db), utkastRepository, validator, + EndringshistorikkService(database.db), database.db, ) val navAnsattRepository = NavAnsattRepository(database.db) @@ -283,6 +286,7 @@ class AvtaleServiceTest : FunSpec({ NotificationRepository(database.db), utkastRepository, validator, + EndringshistorikkService(database.db), database.db, ) diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt new file mode 100644 index 0000000000..c85483c8ea --- /dev/null +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt @@ -0,0 +1,115 @@ +package no.nav.mulighetsrommet.api.services + +import io.kotest.core.spec.style.FunSpec +import io.kotest.matchers.shouldBe +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonNull +import no.nav.mulighetsrommet.api.createDatabaseTestConfig +import no.nav.mulighetsrommet.api.domain.dto.EndringshistorikkDto +import no.nav.mulighetsrommet.api.fixtures.MulighetsrommetTestDomain +import no.nav.mulighetsrommet.api.fixtures.NavAnsattFixture +import no.nav.mulighetsrommet.database.kotest.extensions.FlywayDatabaseTestListener +import java.time.LocalDateTime +import java.util.* + +class EndringshistorikkServiceTest : FunSpec({ + val database = extension(FlywayDatabaseTestListener(createDatabaseTestConfig())) + + test("opprett og les endringshistorikk sortert med nyeste endringer først") { + val id = UUID.randomUUID() + + val endringshistorikk = EndringshistorikkService(database.db) + + endringshistorikk.logEndring( + DocumentClass.AVTALE, + operation = "OPPRETTET", + userId = "Arena", + documentId = id, + timestamp = LocalDateTime.of(2023, 1, 1, 9, 0, 0), + ) { Json.parseToJsonElement("""{ "navn": "Ny avtale" }""") } + + endringshistorikk.logEndring( + DocumentClass.AVTALE, + operation = "ENDRET", + userId = "Ola", + documentId = id, + timestamp = LocalDateTime.of(2023, 1, 2, 9, 0, 0), + ) { Json.parseToJsonElement("""{ "navn": "Endret avtale" }""") } + + endringshistorikk.logEndring( + DocumentClass.AVTALE, + operation = "SLETTET", + userId = "Arena", + documentId = id, + timestamp = LocalDateTime.of(2023, 1, 3, 9, 0, 0), + ) { JsonNull } + + endringshistorikk.getEndringshistorikk(DocumentClass.AVTALE, id) shouldBe EndringshistorikkDto( + entries = listOf( + EndringshistorikkDto.Entry( + id = id, + operation = "SLETTET", + editedAt = LocalDateTime.of(2023, 1, 3, 9, 0, 0), + editedBy = "Arena", + ), + EndringshistorikkDto.Entry( + id = id, + operation = "ENDRET", + editedAt = LocalDateTime.of(2023, 1, 2, 9, 0, 0), + editedBy = "Ola", + ), + EndringshistorikkDto.Entry( + id = id, + operation = "OPPRETTET", + editedAt = LocalDateTime.of(2023, 1, 1, 9, 0, 0), + editedBy = "Arena", + ), + ), + ) + } + + test("bruker i endringshistorikk blir utledet fra kjente NAV-ansatte") { + val id = UUID.randomUUID() + + val ansatt1 = NavAnsattFixture.ansatt1 + val ansatt2 = NavAnsattFixture.ansatt2 + + val domain = MulighetsrommetTestDomain(ansatte = listOf(ansatt1, ansatt2)) + domain.initialize(database.db) + + val endringshistorikk = EndringshistorikkService(database.db) + + endringshistorikk.logEndring( + DocumentClass.AVTALE, + operation = "OPPRETTET", + userId = ansatt1.navIdent, + documentId = id, + timestamp = LocalDateTime.of(2023, 1, 1, 9, 0, 0), + ) { Json.parseToJsonElement("""{ "navn": "Ny avtale" }""") } + + endringshistorikk.logEndring( + DocumentClass.AVTALE, + operation = "ENDRET", + userId = ansatt2.navIdent, + documentId = id, + timestamp = LocalDateTime.of(2023, 1, 2, 9, 0, 0), + ) { Json.parseToJsonElement("""{ "navn": "Endret avtale" }""") } + + endringshistorikk.getEndringshistorikk(DocumentClass.AVTALE, id) shouldBe EndringshistorikkDto( + entries = listOf( + EndringshistorikkDto.Entry( + id = id, + operation = "ENDRET", + editedAt = LocalDateTime.of(2023, 1, 2, 9, 0, 0), + editedBy = "${ansatt2.fornavn} ${ansatt2.etternavn}", + ), + EndringshistorikkDto.Entry( + id = id, + operation = "OPPRETTET", + editedAt = LocalDateTime.of(2023, 1, 1, 9, 0, 0), + editedBy = "${ansatt1.fornavn} ${ansatt1.etternavn}", + ), + ), + ) + } +}) diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingServiceTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingServiceTest.kt index bc7223f7ea..4334b9765c 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingServiceTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingServiceTest.kt @@ -66,11 +66,12 @@ class TiltaksgjennomforingServiceTest : FunSpec({ tiltaksgjennomforingKafkaProducer, NotificationRepository(database.db), validator, + EndringshistorikkService(database.db), database.db, ) test("Man skal ikke få avbryte dersom gjennomføringen ikke finnes") { - tiltaksgjennomforingService.avbrytGjennomforing(UUID.randomUUID()).shouldBeLeft( + tiltaksgjennomforingService.avbrytGjennomforing(UUID.randomUUID(), "B123456").shouldBeLeft( NotFound(message = "Gjennomføringen finnes ikke"), ) } @@ -82,7 +83,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ ) tiltaksgjennomforingRepository.upsert(gjennomforing) - tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id).shouldBeLeft( + tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id, "B123456").shouldBeLeft( BadRequest(message = "Gjennomføringen har opprinnelse fra Arena og kan ikke bli avbrutt i admin-flate."), ) } @@ -98,7 +99,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ val deltager = DeltakerFixture.Deltaker.copy(tiltaksgjennomforingId = gjennomforing.id) deltagerRepository.upsert(deltager) - tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id).shouldBeLeft( + tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id, "B123456").shouldBeLeft( BadRequest(message = "Gjennomføringen kan ikke avbrytes fordi den har 1 deltager(e) koblet til seg."), ) } @@ -111,7 +112,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ ) tiltaksgjennomforingRepository.upsert(gjennomforing) - tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id).shouldBeRight() + tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id, "B123456").shouldBeRight() } } @@ -129,6 +130,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ tiltaksgjennomforingKafkaProducer, NotificationRepository(database.db), validator, + EndringshistorikkService(database.db), database.db, ) @@ -161,6 +163,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ tiltaksgjennomforingKafkaProducer, NotificationRepository(database.db), validator, + EndringshistorikkService(database.db), database.db, ) val navAnsattRepository = NavAnsattRepository(database.db) @@ -278,6 +281,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ tiltaksgjennomforingKafkaProducer, notificationRepository, validator, + EndringshistorikkService(database.db), database.db, ) @@ -337,7 +341,7 @@ class TiltaksgjennomforingServiceTest : FunSpec({ every { tiltaksgjennomforingKafkaProducer.publish(any()) } throws Exception() - shouldThrow { tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id) } + shouldThrow { tiltaksgjennomforingService.avbrytGjennomforing(gjennomforing.id, "B123456") } tiltaksgjennomforingService.get(gjennomforing.id) should { it!!.status shouldBe Tiltaksgjennomforingsstatus.GJENNOMFORES From e86820c2b383ffd66225f7e501ecbece28f75320 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Fri, 8 Dec 2023 14:29:49 +0100 Subject: [PATCH 07/17] vis endringshistorikk i adminflate --- frontend/mr-admin-flate/src/api/QueryKeys.ts | 9 +- .../src/api/avtaler/useAvbrytAvtale.ts | 16 ++- .../api/avtaler/useAvtaleEndringshistorikk.ts | 14 +++ .../src/api/avtaler/useAvtaler.ts | 4 +- .../src/api/avtaler/useUpsertAvtale.ts | 17 +++- ...seTiltaksgjennomforingEndringshistorikk.ts | 14 +++ .../EndringshistorikkPopover.tsx | 43 ++++++++ .../ViewEndringshistorikk.module.scss | 5 + .../ViewEndringshistorikk.tsx | 41 ++++++++ .../skjema/ValideringsfeilOppsummering.tsx | 5 +- .../src/pages/avtaler/AvtaleKnapperad.tsx | 26 +++++ .../TiltaksgjennomforingKnapperad.tsx | 29 ++++++ frontend/mr-admin-flate/src/utils/Utils.ts | 2 +- .../api/domain/dto/EndringshistorikkDto.kt | 16 ++- .../api/routes/v1/AvtaleRoutes.kt | 6 ++ .../routes/v1/TiltaksgjennomforingRoutes.kt | 6 ++ .../api/services/EndringshistorikkService.kt | 14 ++- .../src/main/resources/web/openapi.yaml | 99 ++++++++++++++++++- .../services/EndringshistorikkServiceTest.kt | 10 +- 19 files changed, 348 insertions(+), 28 deletions(-) create mode 100644 frontend/mr-admin-flate/src/api/avtaler/useAvtaleEndringshistorikk.ts create mode 100644 frontend/mr-admin-flate/src/api/tiltaksgjennomforing/useTiltaksgjennomforingEndringshistorikk.ts create mode 100644 frontend/mr-admin-flate/src/components/endringshistorikk/EndringshistorikkPopover.tsx create mode 100644 frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.module.scss create mode 100644 frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx diff --git a/frontend/mr-admin-flate/src/api/QueryKeys.ts b/frontend/mr-admin-flate/src/api/QueryKeys.ts index 447f864733..a66eb8cdeb 100644 --- a/frontend/mr-admin-flate/src/api/QueryKeys.ts +++ b/frontend/mr-admin-flate/src/api/QueryKeys.ts @@ -15,13 +15,16 @@ export const QueryKeys = { tiltaksgjennomforingfilter?: TiltaksgjennomforingfilterProps, ) => ["tiltaksgjennomforinger", page, { ...tiltaksgjennomforingfilter }] as const, tiltaksgjennomforing: (id?: string) => ["tiltaksgjennomforing", id] as const, + tiltaksgjennomforingHistorikk: (id?: string) => + ["tiltaksgjennomforing", id, "historikk"] as const, tiltaksgjennomforingerByEnhet: (enhet: string = "enhet", page?: number) => [enhet, page, "tiltaksgjennomforinger"] as const, veilederflateTiltaksgjennomforing: (id: string) => [id, "tiltaksgjennomforing"] as const, ansatt: () => ["ansatt"] as const, - avtaler: (avtaleFilter: AvtaleFilterProps, page: number) => - ["avtaler", page, { ...avtaleFilter }] as const, - avtale: (avtaleId: string) => ["avtale", avtaleId], + avtaler: (mine?: boolean, page?: number, avtaleFilter?: AvtaleFilterProps) => + ["avtaler", mine, page, { ...avtaleFilter }] as const, + avtale: (id: string) => ["avtale", id], + avtaleHistorikk: (id?: string) => ["avtale", id, "historikk"] as const, enheter: () => ["enheter"], virksomheter: (til?: VirksomhetTil) => ["virksomheter", til], antallUlesteNotifikasjoner: () => ["antallUlesteNotifikasjoner"], diff --git a/frontend/mr-admin-flate/src/api/avtaler/useAvbrytAvtale.ts b/frontend/mr-admin-flate/src/api/avtaler/useAvbrytAvtale.ts index 4b4abd7c73..406b6cd151 100644 --- a/frontend/mr-admin-flate/src/api/avtaler/useAvbrytAvtale.ts +++ b/frontend/mr-admin-flate/src/api/avtaler/useAvbrytAvtale.ts @@ -1,17 +1,25 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import { mulighetsrommetClient } from "../clients"; import { ApiError } from "mulighetsrommet-api-client"; +import { QueryKeys } from "../QueryKeys"; export function useAvbrytAvtale() { const client = useQueryClient(); + return useMutation({ mutationFn: (id: string) => { return mulighetsrommetClient.avtaler.avbrytAvtale({ id }); }, - onSuccess: () => { - client.invalidateQueries({ - queryKey: ["avtale"], - }); + onSuccess: (_, id) => { + return Promise.all([ + client.invalidateQueries({ + queryKey: QueryKeys.avtale(id), + }), + + client.invalidateQueries({ + queryKey: QueryKeys.avtaler(), + }), + ]); }, }); } diff --git a/frontend/mr-admin-flate/src/api/avtaler/useAvtaleEndringshistorikk.ts b/frontend/mr-admin-flate/src/api/avtaler/useAvtaleEndringshistorikk.ts new file mode 100644 index 0000000000..f08abdfae6 --- /dev/null +++ b/frontend/mr-admin-flate/src/api/avtaler/useAvtaleEndringshistorikk.ts @@ -0,0 +1,14 @@ +import { useSuspenseQuery } from "@tanstack/react-query"; +import { QueryKeys } from "../QueryKeys"; +import { mulighetsrommetClient } from "../clients"; + +export function useAvtaleEndringshistorikk(id: string) { + return useSuspenseQuery({ + queryKey: QueryKeys.avtaleHistorikk(id), + queryFn() { + return mulighetsrommetClient.avtaler.getAvtaleEndringshistorikk({ + id, + }); + }, + }); +} diff --git a/frontend/mr-admin-flate/src/api/avtaler/useAvtaler.ts b/frontend/mr-admin-flate/src/api/avtaler/useAvtaler.ts index 0c97982222..d5810a1b49 100644 --- a/frontend/mr-admin-flate/src/api/avtaler/useAvtaler.ts +++ b/frontend/mr-admin-flate/src/api/avtaler/useAvtaler.ts @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { WritableAtom, useAtom } from "jotai"; +import { useAtom, WritableAtom } from "jotai"; import { useDebounce } from "mulighetsrommet-frontend-common"; import { QueryKeys } from "../QueryKeys"; import { AvtaleFilterProps, avtalePaginationAtomAtom } from "../atoms"; @@ -24,7 +24,7 @@ export function useAvtaler( }; return useQuery({ - queryKey: QueryKeys.avtaler({ ...filter, sok: debouncedSok }, page), + queryKey: QueryKeys.avtaler(filter.visMineAvtaler, page, { ...filter, sok: debouncedSok }), queryFn: () => { return filter.visMineAvtaler diff --git a/frontend/mr-admin-flate/src/api/avtaler/useUpsertAvtale.ts b/frontend/mr-admin-flate/src/api/avtaler/useUpsertAvtale.ts index 3a8c816e45..d65dde30db 100644 --- a/frontend/mr-admin-flate/src/api/avtaler/useUpsertAvtale.ts +++ b/frontend/mr-admin-flate/src/api/avtaler/useUpsertAvtale.ts @@ -1,10 +1,25 @@ -import { useMutation } from "@tanstack/react-query"; +import { useMutation, useQueryClient } from "@tanstack/react-query"; import { ApiError, Avtale, AvtaleRequest } from "mulighetsrommet-api-client"; import { mulighetsrommetClient } from "../clients"; +import { QueryKeys } from "../QueryKeys"; export function useUpsertAvtale() { + const queryClient = useQueryClient(); + return useMutation({ mutationFn: (requestBody: AvtaleRequest) => mulighetsrommetClient.avtaler.upsertAvtale({ requestBody }), + + onSuccess(_, request) { + return Promise.all([ + queryClient.invalidateQueries({ + queryKey: QueryKeys.avtale(request.id), + }), + + queryClient.invalidateQueries({ + queryKey: QueryKeys.avtaler(), + }), + ]); + }, }); } diff --git a/frontend/mr-admin-flate/src/api/tiltaksgjennomforing/useTiltaksgjennomforingEndringshistorikk.ts b/frontend/mr-admin-flate/src/api/tiltaksgjennomforing/useTiltaksgjennomforingEndringshistorikk.ts new file mode 100644 index 0000000000..251a44e961 --- /dev/null +++ b/frontend/mr-admin-flate/src/api/tiltaksgjennomforing/useTiltaksgjennomforingEndringshistorikk.ts @@ -0,0 +1,14 @@ +import { useSuspenseQuery } from "@tanstack/react-query"; +import { QueryKeys } from "../QueryKeys"; +import { mulighetsrommetClient } from "../clients"; + +export function useTiltaksgjennomforingEndringshistorikk(id: string) { + return useSuspenseQuery({ + queryKey: QueryKeys.tiltaksgjennomforingHistorikk(id), + queryFn() { + return mulighetsrommetClient.tiltaksgjennomforinger.getTiltaksgjennomforingEndringshistorikk({ + id, + }); + }, + }); +} diff --git a/frontend/mr-admin-flate/src/components/endringshistorikk/EndringshistorikkPopover.tsx b/frontend/mr-admin-flate/src/components/endringshistorikk/EndringshistorikkPopover.tsx new file mode 100644 index 0000000000..4542a611b3 --- /dev/null +++ b/frontend/mr-admin-flate/src/components/endringshistorikk/EndringshistorikkPopover.tsx @@ -0,0 +1,43 @@ +import React, { ReactElement, useRef, useState } from "react"; +import { ClockDashedIcon } from "@navikt/aksel-icons"; +import { Button, Loader, Popover } from "@navikt/ds-react"; +import { ErrorBoundary } from "react-error-boundary"; +import { ErrorFallback } from "../../main"; + +export interface EndringshistorikkPopoverProps { + children: ReactElement; +} + +export function EndringshistorikkPopover({ children }: EndringshistorikkPopoverProps) { + const [open, setOpen] = useState(false); + const buttonRef = useRef(null); + + return ( + <> + + + setOpen(false)} + anchorEl={buttonRef.current} + placement="bottom-end" + > + + }> + {children} + + + + + ); +} diff --git a/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.module.scss b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.module.scss new file mode 100644 index 0000000000..2d69097aba --- /dev/null +++ b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.module.scss @@ -0,0 +1,5 @@ +.endringshistorikkList { + list-style-type: none; + padding: 0; + margin: 0; +} diff --git a/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx new file mode 100644 index 0000000000..61b15dc7d3 --- /dev/null +++ b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx @@ -0,0 +1,41 @@ +import type { + Endringshistorikk, + EndringshistorikkNavAnsatt, + EndringshistorikkUser, +} from "mulighetsrommet-api-client"; +import { formaterDatoTid } from "../../utils/Utils"; +import styles from "./ViewEndringshistorikk.module.scss"; + +export interface ViewEndringshistorikkProps { + historikk: Endringshistorikk; + + operationToDescription(operation: string): string; +} + +export function ViewEndringshistorikk(props: ViewEndringshistorikkProps) { + const { historikk, operationToDescription } = props; + + if (historikk.entries.length === 0) { + return
Endringshistorikken er tom
; + } + + return ( +
    + {historikk.entries.map(({ operation, editedAt, editedBy }) => { + const user = isNavAnsatt(editedBy) + ? `${editedBy.navn} (${editedBy.navIdent})` + : editedBy.navn; + + return ( +
  • + {formaterDatoTid(editedAt)} - {operationToDescription(operation)} - {user} +
  • + ); + })} +
+ ); +} + +function isNavAnsatt(user: EndringshistorikkUser): user is EndringshistorikkNavAnsatt { + return "navIdent" in user; +} diff --git a/frontend/mr-admin-flate/src/components/skjema/ValideringsfeilOppsummering.tsx b/frontend/mr-admin-flate/src/components/skjema/ValideringsfeilOppsummering.tsx index a690a9a5ad..7b949d6953 100644 --- a/frontend/mr-admin-flate/src/components/skjema/ValideringsfeilOppsummering.tsx +++ b/frontend/mr-admin-flate/src/components/skjema/ValideringsfeilOppsummering.tsx @@ -1,6 +1,5 @@ import { ExclamationmarkTriangleFillIcon } from "@navikt/aksel-icons"; import { Button, ErrorSummary, Popover } from "@navikt/ds-react"; -import PopoverContent from "@navikt/ds-react/esm/popover/PopoverContent"; import { useRef, useState } from "react"; import { useFormContext } from "react-hook-form"; import styles from "./ValideringsfeilOppsummering.module.scss"; @@ -51,7 +50,7 @@ export function ValideringsfeilOppsummering() { onClose={() => setVisValideringsfeil(false)} anchorEl={visValideringsFeilTrekantRef.current} > - + - + ); diff --git a/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx b/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx index 1d783cde9c..366d09e91a 100644 --- a/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx +++ b/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx @@ -1,6 +1,9 @@ import { Avtale } from "mulighetsrommet-api-client"; import { Lenkeknapp } from "../../components/lenkeknapp/Lenkeknapp"; import styles from "../DetaljerInfo.module.scss"; +import { useAvtaleEndringshistorikk } from "../../api/avtaler/useAvtaleEndringshistorikk"; +import { ViewEndringshistorikk } from "../../components/endringshistorikk/ViewEndringshistorikk"; +import { EndringshistorikkPopover } from "../../components/endringshistorikk/EndringshistorikkPopover"; interface Props { avtale: Avtale; @@ -9,9 +12,32 @@ interface Props { export function AvtaleKnapperad({ avtale }: Props) { return (
+ + + + Rediger avtale
); } + +function AvtaleEndringshistorikk({ id }: { id: string }) { + const historikk = useAvtaleEndringshistorikk(id); + + function operationToDescription(operation: string): string { + const descriptions: { [operation: string]: string } = { + OPPDATERT: "Redigerte avtale", + AVBRUTT: "Avbrutt", + }; + return descriptions[operation] ?? operation; + } + + return ( + + ); +} diff --git a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx index f9495e9c2f..b6672182ac 100644 --- a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx +++ b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx @@ -4,6 +4,9 @@ import { useMutateTilgjengeligForVeileder } from "../../api/tiltaksgjennomforing import { Lenkeknapp } from "../../components/lenkeknapp/Lenkeknapp"; import styles from "../DetaljerInfo.module.scss"; import { Tiltaksgjennomforing } from "mulighetsrommet-api-client"; +import { useTiltaksgjennomforingEndringshistorikk } from "../../api/tiltaksgjennomforing/useTiltaksgjennomforingEndringshistorikk"; +import { EndringshistorikkPopover } from "../../components/endringshistorikk/EndringshistorikkPopover"; +import { ViewEndringshistorikk } from "../../components/endringshistorikk/ViewEndringshistorikk"; interface Props { style?: React.CSSProperties; @@ -23,9 +26,35 @@ export function TiltaksgjennomforingKnapperad({ style, tiltaksgjennomforing }: P Tilgjengelig for veileder + + + + Rediger ); } + +function TiltaksgjennomforingEndringshistorikk({ id }: { id: string }) { + const historikk = useTiltaksgjennomforingEndringshistorikk(id); + + function operationToDescription(operation: string): string { + const descriptions: { [operation: string]: string } = { + OPPDATERT: "Redigerte tiltaksgjennomføring", + TILGJENGELIG_FOR_VEILEDER: "Tilgjengelig for veileder", + IKKE_TILGJENGELIG_FOR_VEILEDER: "Ikke tilgjengelig for veileder", + AVTALE_ENDRET: "Avtale endret", + AVBRUTT: "Avbrutt", + }; + return descriptions[operation] ?? operation; + } + + return ( + + ); +} diff --git a/frontend/mr-admin-flate/src/utils/Utils.ts b/frontend/mr-admin-flate/src/utils/Utils.ts index 5ad87d6d29..f0564268f9 100644 --- a/frontend/mr-admin-flate/src/utils/Utils.ts +++ b/frontend/mr-admin-flate/src/utils/Utils.ts @@ -43,7 +43,7 @@ export function formaterDatoTid(dato: string | Date, fallback = ""): string { return fallback; } - return result.replace(",", " -"); + return result.replace(",", " "); } export function formaterDatoSomYYYYMMDD(dato?: Date | null, fallback = ""): string { diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt index e1107093cf..4cfdf377bd 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/EndringshistorikkDto.kt @@ -18,6 +18,20 @@ data class EndringshistorikkDto( val operation: String, @Serializable(with = LocalDateTimeSerializer::class) val editedAt: LocalDateTime, - val editedBy: String, + val editedBy: User, ) + + @Serializable + sealed class User + + @Serializable + data class Systembruker( + val navn: String, + ) : User() + + @Serializable + data class NavAnsatt( + val navIdent: String, + val navn: String?, + ) : User() } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt index 41387c6eaa..d1e5d19aa6 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt @@ -81,6 +81,12 @@ fun Route.avtaleRoutes() { ?: call.respond(HttpStatusCode.NotFound, "Det finnes ikke noen avtale med id $id") } + get("{id}/historikk") { + val id: UUID by call.parameters + val historikk = avtaler.getEndringshistorikk(id) + call.respond(historikk) + } + put("{id}/avbryt") { val id = call.parameters.getOrFail("id") val navIdent = getNavIdent() diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt index 8e396a95b4..400e283480 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/TiltaksgjennomforingRoutes.kt @@ -63,6 +63,12 @@ fun Route.tiltaksgjennomforingRoutes() { ?: call.respond(HttpStatusCode.NotFound, "Ingen tiltaksgjennomføring med id=$id") } + get("{id}/historikk") { + val id: UUID by call.parameters + val historikk = service.getEndringshistorikk(id) + call.respond(historikk) + } + put("{id}/avtale") { val id = call.parameters.getOrFail("id") val navIdent = getNavIdent() diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt index 65daf857bd..0d3bd0b514 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkService.kt @@ -19,10 +19,11 @@ class EndringshistorikkService( select document_id, operation, lower(sys_period) as edited_at, + user_id as user_id, case when na.nav_ident is not null then concat(na.fornavn, ' ', na.etternavn) - else user_id - end as edited_by + else null + end as user_name from ${documentClass.table} left join nav_ansatt na on user_id = na.nav_ident where document_id = :document_id @@ -35,11 +36,17 @@ class EndringshistorikkService( val entries = queryOf(statement, params) .map { + val userId = it.string("user_id") + + val editedBy = it.stringOrNull("user_name") + ?.let { navn -> EndringshistorikkDto.NavAnsatt(userId, navn) } + ?: EndringshistorikkDto.Systembruker(userId) + EndringshistorikkDto.Entry( id = it.uuid("document_id"), operation = it.string("operation"), editedAt = it.localDateTime("edited_at"), - editedBy = it.string("edited_by"), + editedBy = editedBy, ) } .asList @@ -48,7 +55,6 @@ class EndringshistorikkService( return EndringshistorikkDto(entries = entries) } - fun logEndring( documentClass: DocumentClass, operation: String, diff --git a/mulighetsrommet-api/src/main/resources/web/openapi.yaml b/mulighetsrommet-api/src/main/resources/web/openapi.yaml index 4399819662..5a643809fa 100644 --- a/mulighetsrommet-api/src/main/resources/web/openapi.yaml +++ b/mulighetsrommet-api/src/main/resources/web/openapi.yaml @@ -382,6 +382,48 @@ paths: schema: $ref: "#/components/schemas/TiltaksgjennomforingNotat" + /api/v1/internal/avtaler/{id}/historikk: + get: + tags: + - Avtaler + operationId: getAvtaleEndringshistorikk + parameters: + - in: path + name: id + required: true + schema: + type: string + format: uuid + description: ID for avtalen + responses: + 200: + description: Endringshistorikken for avtalen + content: + application/json: + schema: + $ref: "#/components/schemas/Endringshistorikk" + + /api/v1/internal/tiltaksgjennomforinger/{id}/historikk: + get: + tags: + - Tiltaksgjennomforinger + operationId: getTiltaksgjennomforingEndringshistorikk + parameters: + - in: path + name: id + required: true + schema: + type: string + format: uuid + description: ID for tiltaksgjennomføringen + responses: + 200: + description: Endringshistorikken for tiltaksgjennomføringen + content: + application/json: + schema: + $ref: "#/components/schemas/Endringshistorikk" + /api/v1/internal/notater/tiltaksgjennomforinger/mine: get: tags: @@ -675,10 +717,6 @@ paths: responses: 200: description: Update for 'tilgjengelig for veileder' was successful - content: - application/json: - schema: - $ref: "#/components/schemas/Tiltaksgjennomforing" /api/v1/internal/tiltaksgjennomforinger/enhet/{enhet}: parameters: @@ -3042,6 +3080,59 @@ components: - avtaleId - innhold + Endringshistorikk: + type: object + properties: + entries: + type: array + items: + $ref: "#/components/schemas/EndringshistorikkEntry" + required: + - entries + + EndringshistorikkEntry: + type: object + properties: + id: + type: string + format: uuid + operation: + type: string + editedAt: + type: string + format: date-time + editedBy: + $ref: "#/components/schemas/EndringshistorikkUser" + required: + - id + - operation + - editedAt + - editedBy + + EndringshistorikkUser: + oneOf: + - $ref: "#/components/schemas/EndringshistorikkSystembruker" + - $ref: "#/components/schemas/EndringshistorikkNavAnsatt" + + EndringshistorikkSystembruker: + type: object + properties: + navn: + type: string + required: + - navn + + EndringshistorikkNavAnsatt: + type: object + properties: + navIdent: + type: string + navn: + type: string + required: + - navIdent + - navn + TiltaksgjennomforingNotat: type: object properties: diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt index c85483c8ea..b66d0e0730 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/services/EndringshistorikkServiceTest.kt @@ -50,19 +50,19 @@ class EndringshistorikkServiceTest : FunSpec({ id = id, operation = "SLETTET", editedAt = LocalDateTime.of(2023, 1, 3, 9, 0, 0), - editedBy = "Arena", + editedBy = EndringshistorikkDto.Systembruker(navn = "Arena"), ), EndringshistorikkDto.Entry( id = id, operation = "ENDRET", editedAt = LocalDateTime.of(2023, 1, 2, 9, 0, 0), - editedBy = "Ola", + editedBy = EndringshistorikkDto.Systembruker(navn = "Ola"), ), EndringshistorikkDto.Entry( id = id, operation = "OPPRETTET", editedAt = LocalDateTime.of(2023, 1, 1, 9, 0, 0), - editedBy = "Arena", + editedBy = EndringshistorikkDto.Systembruker(navn = "Arena"), ), ), ) @@ -101,13 +101,13 @@ class EndringshistorikkServiceTest : FunSpec({ id = id, operation = "ENDRET", editedAt = LocalDateTime.of(2023, 1, 2, 9, 0, 0), - editedBy = "${ansatt2.fornavn} ${ansatt2.etternavn}", + editedBy = EndringshistorikkDto.NavAnsatt(navIdent = "DD2", navn = "Dolly Duck"), ), EndringshistorikkDto.Entry( id = id, operation = "OPPRETTET", editedAt = LocalDateTime.of(2023, 1, 1, 9, 0, 0), - editedBy = "${ansatt1.fornavn} ${ansatt1.etternavn}", + editedBy = EndringshistorikkDto.NavAnsatt(navIdent = "DD1", navn = "Donald Duck"), ), ), ) From 4ce4fc6e49dfd5809355ff949c37ecb0fce00b72 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Tue, 12 Dec 2023 15:23:54 +0100 Subject: [PATCH 08/17] skriv endring direkte i db --- .../ViewEndringshistorikk.tsx | 6 ++---- .../src/pages/avtaler/AvtaleKnapperad.tsx | 15 +-------------- .../TiltaksgjennomforingKnapperad.tsx | 18 +----------------- .../api/services/ArenaAdapterService.kt | 4 ++-- .../api/services/AvtaleService.kt | 4 ++-- .../services/TiltaksgjennomforingService.kt | 10 +++++----- 6 files changed, 13 insertions(+), 44 deletions(-) diff --git a/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx index 61b15dc7d3..f975519a7a 100644 --- a/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx +++ b/frontend/mr-admin-flate/src/components/endringshistorikk/ViewEndringshistorikk.tsx @@ -8,12 +8,10 @@ import styles from "./ViewEndringshistorikk.module.scss"; export interface ViewEndringshistorikkProps { historikk: Endringshistorikk; - - operationToDescription(operation: string): string; } export function ViewEndringshistorikk(props: ViewEndringshistorikkProps) { - const { historikk, operationToDescription } = props; + const { historikk } = props; if (historikk.entries.length === 0) { return
Endringshistorikken er tom
; @@ -28,7 +26,7 @@ export function ViewEndringshistorikk(props: ViewEndringshistorikkProps) { return (
  • - {formaterDatoTid(editedAt)} - {operationToDescription(operation)} - {user} + {formaterDatoTid(editedAt)} - {operation} - {user}
  • ); })} diff --git a/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx b/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx index 366d09e91a..394754cc81 100644 --- a/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx +++ b/frontend/mr-admin-flate/src/pages/avtaler/AvtaleKnapperad.tsx @@ -26,18 +26,5 @@ export function AvtaleKnapperad({ avtale }: Props) { function AvtaleEndringshistorikk({ id }: { id: string }) { const historikk = useAvtaleEndringshistorikk(id); - function operationToDescription(operation: string): string { - const descriptions: { [operation: string]: string } = { - OPPDATERT: "Redigerte avtale", - AVBRUTT: "Avbrutt", - }; - return descriptions[operation] ?? operation; - } - - return ( - - ); + return ; } diff --git a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx index b6672182ac..23d5ec8a13 100644 --- a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx +++ b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingKnapperad.tsx @@ -40,21 +40,5 @@ export function TiltaksgjennomforingKnapperad({ style, tiltaksgjennomforing }: P function TiltaksgjennomforingEndringshistorikk({ id }: { id: string }) { const historikk = useTiltaksgjennomforingEndringshistorikk(id); - function operationToDescription(operation: string): string { - const descriptions: { [operation: string]: string } = { - OPPDATERT: "Redigerte tiltaksgjennomføring", - TILGJENGELIG_FOR_VEILEDER: "Tilgjengelig for veileder", - IKKE_TILGJENGELIG_FOR_VEILEDER: "Ikke tilgjengelig for veileder", - AVTALE_ENDRET: "Avtale endret", - AVBRUTT: "Avbrutt", - }; - return descriptions[operation] ?? operation; - } - - return ( - - ); + return ; } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt index 1d7b5695bf..8ab42c6fb4 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/ArenaAdapterService.kt @@ -238,7 +238,7 @@ class ArenaAdapterService( endringshistorikk.logEndring( tx, documentClass, - "OPPDATERT", + "Endret i Arena", "Arena", id, ) { Json.encodeToJsonElement(value) } @@ -252,7 +252,7 @@ class ArenaAdapterService( endringshistorikk.logEndring( tx, documentClass, - "SLETTET", + "Slettet i Arena", "Arena", id, ) { JsonNull } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt index 8246881686..2a5256f166 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/AvtaleService.kt @@ -53,7 +53,7 @@ class AvtaleService( dispatchNotificationToNewAdministrators(tx, dbo, navIdent) val dto = getOrError(dbo.id, tx) - logEndring("OPPDATERT", dto, navIdent, tx) + logEndring("Redigerte avtale", dto, navIdent, tx) dto } } @@ -117,7 +117,7 @@ class AvtaleService( db.transaction { tx -> avtaler.setAvslutningsstatus(tx, id, Avslutningsstatus.AVBRUTT) val dto = getOrError(id, tx) - logEndring("AVBRUTT", dto, navIdent, tx) + logEndring("Avtale ble avbrutt", dto, navIdent, tx) } return Either.Right(Unit) diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt index 6c76b8fd72..501411df64 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/services/TiltaksgjennomforingService.kt @@ -56,7 +56,7 @@ class TiltaksgjennomforingService( dispatchNotificationToNewAdministrators(tx, dbo, navIdent) val dto = getOrError(dbo.id, tx) - logEndring("OPPDATERT", dto, navIdent, tx) + logEndring("Redigerte gjennomføring", dto, navIdent, tx) tiltaksgjennomforingKafkaProducer.publish(TiltaksgjennomforingDto.from(dto)) dto } @@ -153,9 +153,9 @@ class TiltaksgjennomforingService( tiltaksgjennomforinger.setTilgjengeligForVeileder(tx, id, tilgjengeligForVeileder) val dto = getOrError(id, tx) val operation = if (tilgjengeligForVeileder) { - "TILGJENGELIG_FOR_VEILEDER" + "Tilgjengelig for veileder" } else { - "IKKE_TILGJENGELIG_FOR_VEILEDER" + "Ikke tilgjengelig for veileder" } logEndring(operation, dto, navIdent, tx) } @@ -178,7 +178,7 @@ class TiltaksgjennomforingService( db.transaction { tx -> tiltaksgjennomforinger.setAvtaleId(tx, id, avtaleId) val dto = getOrError(id, tx) - logEndring("AVTALE_ENDRET", dto, navIdent, tx) + logEndring("Endret avtale", dto, navIdent, tx) } return Either.Right(Unit) @@ -203,7 +203,7 @@ class TiltaksgjennomforingService( db.transaction { tx -> tiltaksgjennomforinger.setAvslutningsstatus(tx, id, Avslutningsstatus.AVBRUTT) val dto = getOrError(id, tx) - logEndring("AVBRUTT", dto, navIdent, tx) + logEndring("Gjennomføring ble avbrutt", dto, navIdent, tx) tiltaksgjennomforingKafkaProducer.publish(TiltaksgjennomforingDto.from(dto)) } From e31fd33763b70502bec1d7055db251357bb3b4c5 Mon Sep 17 00:00:00 2001 From: taniaholst Date: Tue, 12 Dec 2023 16:15:23 +0100 Subject: [PATCH 09/17] metrikker - unike brukere --- .../mulighetsrommet-veileder-flate/src/logging/taxonomy.ts | 6 +++++- .../ViewTiltaksgjennomforingOversikt.tsx | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts b/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts index 8eefad97b1..b2466d68d3 100644 --- a/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts +++ b/frontend/mulighetsrommet-veileder-flate/src/logging/taxonomy.ts @@ -14,4 +14,8 @@ type KLIKK_PA_FANE_EVENT = { }; }; -export type Event = DEL_MED_BRUKER_EVENT | KLIKK_PA_FANE_EVENT; +type UNIKE_BRUKERE = { + name: "arbeidsmarkedstiltak.unike-brukere"; +}; + +export type Event = DEL_MED_BRUKER_EVENT | KLIKK_PA_FANE_EVENT | UNIKE_BRUKERE; diff --git a/frontend/mulighetsrommet-veileder-flate/src/views/tiltaksgjennomforing-oversikt/ViewTiltaksgjennomforingOversikt.tsx b/frontend/mulighetsrommet-veileder-flate/src/views/tiltaksgjennomforing-oversikt/ViewTiltaksgjennomforingOversikt.tsx index b5c751ac7f..a5c0b2c67b 100644 --- a/frontend/mulighetsrommet-veileder-flate/src/views/tiltaksgjennomforing-oversikt/ViewTiltaksgjennomforingOversikt.tsx +++ b/frontend/mulighetsrommet-veileder-flate/src/views/tiltaksgjennomforing-oversikt/ViewTiltaksgjennomforingOversikt.tsx @@ -23,6 +23,7 @@ import { tiltaksgjennomforingsfilter } from "../../core/atoms/atoms"; import { usePrepopulerFilter } from "../../hooks/usePrepopulerFilter"; import { routes } from "../../routes"; import styles from "./ViewTiltaksgjennomforingOversikt.module.scss"; +import { useLogEvent } from "../../logging/amplitude"; const ViewTiltaksgjennomforingOversikt = () => { useTitle("Arbeidsmarkedstiltak - Oversikt"); @@ -31,6 +32,7 @@ const ViewTiltaksgjennomforingOversikt = () => { const { data: brukerdata } = useHentBrukerdata(); const landingssideFeature = useFeatureToggle(Toggles.MULIGHETSROMMET_VEILEDERFLATE_LANDINGSSIDE); const landingssideEnabled = landingssideFeature.isSuccess && landingssideFeature.data; + const { logEvent } = useLogEvent(); const { data: tiltaksgjennomforinger = [], @@ -44,6 +46,10 @@ const ViewTiltaksgjennomforingOversikt = () => { setIsHistorikkModalOpen(isHistorikkModalOpen); }, [isHistorikkModalOpen]); + useEffect(() => { + logEvent({ name: "arbeidsmarkedstiltak.unike-brukere" }); + }, []); + if (!brukerdata) return null; if (isError) { From 0a9d7c2110f08b5a8ae15ec452d5d7a7a67969cb Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Tue, 12 Dec 2023 16:28:52 +0100 Subject: [PATCH 10/17] bump common --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index eedd072992..7cf745cc8f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -common-java-modules = "3.2023.10.23_12.41-bafec3836d28" +common-java-modules = "3.2023.12.12_13.53-510909d4aa1a" flyway = "10.2.0" hoplite = "2.7.5" koin = "3.5.1" From dc604111d36cd569172d5d279ec59a08b0624ec3 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Tue, 12 Dec 2023 16:32:25 +0100 Subject: [PATCH 11/17] remove old dependency constraints --- common/ktor/build.gradle.kts | 13 ------------- mulighetsrommet-api/build.gradle.kts | 8 -------- 2 files changed, 21 deletions(-) diff --git a/common/ktor/build.gradle.kts b/common/ktor/build.gradle.kts index 23cf27caa8..fce7a6b056 100644 --- a/common/ktor/build.gradle.kts +++ b/common/ktor/build.gradle.kts @@ -19,25 +19,12 @@ dependencies { implementation(libs.ktor.server.core) implementation(libs.ktor.server.metricsMicrometer) implementation(libs.ktor.server.netty) - constraints { - implementation("io.netty:netty-codec-http2:4.1.101.Final") { - because("sikkerhetshull i transitiv avhengighet rapportert via dependabot. kan fjernes etter at vi har versjon av ktor > 2.3.6") - } - } implementation(libs.ktor.server.statusPages) implementation(libs.ktor.server.auth) implementation(libs.ktor.server.authJwt) // Audit-logging implementation(libs.nav.common.auditLog) - constraints { - implementation(libs.logback.core) { - because("sikkerhetshull i transitiv avhengighet rapportert via snyk") - } - implementation(libs.logback.classic) { - because("sikkerhetshull i transitiv avhengighet rapportert via snyk") - } - } // Cache implementation(libs.caffeine) diff --git a/mulighetsrommet-api/build.gradle.kts b/mulighetsrommet-api/build.gradle.kts index 8e32070838..ec33354894 100644 --- a/mulighetsrommet-api/build.gradle.kts +++ b/mulighetsrommet-api/build.gradle.kts @@ -104,14 +104,6 @@ dependencies { implementation(libs.unleash) implementation(libs.nav.common.auditLog) - constraints { - implementation(libs.logback.core) { - because("sikkerhetshull i transitiv avhengighet rapportert via snyk") - } - implementation(libs.logback.classic) { - because("sikkerhetshull i transitiv avhengighet rapportert via snyk") - } - } implementation(libs.nav.common.tokenClient) constraints { implementation("net.minidev:json-smart:2.5.0") { From 7cd046b0143d488fdb439951d07eb90ed89f13d2 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Tue, 12 Dec 2023 16:43:36 +0100 Subject: [PATCH 12/17] only report dependencies for application and test --- .github/workflows/mr-api.yaml | 7 +++++++ .github/workflows/mr-arena-adapter.yaml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/mr-api.yaml b/.github/workflows/mr-api.yaml index 9ea847f5de..d360df8df6 100644 --- a/.github/workflows/mr-api.yaml +++ b/.github/workflows/mr-api.yaml @@ -50,6 +50,13 @@ jobs: with: gradle-build-module: :mulighetsrommet-api sub-module-mode: INDIVIDUAL + gradle-build-configuration: |- + compileClasspath + implementation + runtimeClasspath + testCompileClasspath + testImplementation + testRuntimeClasspath - name: Build and push Docker image uses: nais/docker-build-push@v0 id: docker-build-push diff --git a/.github/workflows/mr-arena-adapter.yaml b/.github/workflows/mr-arena-adapter.yaml index ecc4171e8a..0867224c30 100644 --- a/.github/workflows/mr-arena-adapter.yaml +++ b/.github/workflows/mr-arena-adapter.yaml @@ -49,6 +49,13 @@ jobs: with: gradle-build-module: :mulighetsrommet-arena-adapter sub-module-mode: INDIVIDUAL + gradle-build-configuration: |- + compileClasspath + implementation + runtimeClasspath + testCompileClasspath + testImplementation + testRuntimeClasspath - name: Build and push Docker image uses: nais/docker-build-push@v0 id: docker-build-push From c213f20f8339edcf1970acebe485285d709e870c Mon Sep 17 00:00:00 2001 From: Fredrik Ingebrigtsen Date: Wed, 13 Dec 2023 09:41:13 +0100 Subject: [PATCH 13/17] Flytt info visning av fremmote data --- .../TiltaksgjennomforingDetaljer.tsx | 68 +++++++++---------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx index 34b8c313c0..28124897f5 100644 --- a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx +++ b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx @@ -1,10 +1,6 @@ import { ExclamationmarkTriangleIcon, ExternalLinkIcon } from "@navikt/aksel-icons"; import { Heading, HelpText } from "@navikt/ds-react"; -import { - Avtale, - Tiltaksgjennomforing, - TiltaksgjennomforingOppstartstype, -} from "mulighetsrommet-api-client"; +import { Avtale, Tiltaksgjennomforing } from "mulighetsrommet-api-client"; import { NOM_ANSATT_SIDE } from "mulighetsrommet-frontend-common/constants"; import { Bolk } from "../../components/detaljside/Bolk"; import { Metadata, Separator } from "../../components/detaljside/Metadata"; @@ -180,28 +176,6 @@ export function TiltaksgjennomforingDetaljer(props: Props) { } /> - - - - - - {`${fremmoteDatoFromTidspunkt( - tiltaksgjennomforing.fremmoteTidspunkt, - )} ${fremmoteTidFromTidspunkt(tiltaksgjennomforing.fremmoteTidspunkt)}`} - - } - /> - - - - - - @@ -291,16 +265,6 @@ export function TiltaksgjennomforingDetaljer(props: Props) { /> - - - - - - - {tiltaksgjennomforing.arrangor.kontaktperson && ( )} + {isTiltakMedFellesOppstart(tiltaksgjennomforing.tiltakstype.arenaKode) ? ( + <> + + + + {`${fremmoteDatoFromTidspunkt( + tiltaksgjennomforing.fremmoteTidspunkt, + )} ${fremmoteTidFromTidspunkt(tiltaksgjennomforing.fremmoteTidspunkt)}`} + + } + /> + + + + + + ) : tiltaksgjennomforing.stedForGjennomforing ? ( + <> + + + + + + ) : null} From 26a098cc67fb92a9e29da3da217e0868a0cbe879 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Wed, 13 Dec 2023 09:48:46 +0100 Subject: [PATCH 14/17] bump kafka-manager --- iac/kafka-manager/dev/kafka-manager-dev.yaml | 2 +- iac/kafka-manager/prod/kafka-manager-prod.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iac/kafka-manager/dev/kafka-manager-dev.yaml b/iac/kafka-manager/dev/kafka-manager-dev.yaml index daa3265945..7a5021aea5 100644 --- a/iac/kafka-manager/dev/kafka-manager-dev.yaml +++ b/iac/kafka-manager/dev/kafka-manager-dev.yaml @@ -6,7 +6,7 @@ metadata: labels: team: team-mulighetsrommet spec: - image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.11.01-12.52-0f2f054 + image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.12.13-06.32-bd9f953 port: 8080 webproxy: true ingresses: diff --git a/iac/kafka-manager/prod/kafka-manager-prod.yaml b/iac/kafka-manager/prod/kafka-manager-prod.yaml index a3de466630..088d8c3c26 100644 --- a/iac/kafka-manager/prod/kafka-manager-prod.yaml +++ b/iac/kafka-manager/prod/kafka-manager-prod.yaml @@ -6,7 +6,7 @@ metadata: labels: team: team-mulighetsrommet spec: - image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.11.01-12.52-0f2f054 + image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.12.13-06.32-bd9f953 port: 8080 webproxy: true ingresses: From a8f94a22db9e433aed4f6e5166ec977706f96fc4 Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Wed, 13 Dec 2023 10:50:22 +0100 Subject: [PATCH 15/17] Revert "only report dependencies for application and test" This reverts commit 7cd046b0143d488fdb439951d07eb90ed89f13d2. --- .github/workflows/mr-api.yaml | 7 ------- .github/workflows/mr-arena-adapter.yaml | 7 ------- 2 files changed, 14 deletions(-) diff --git a/.github/workflows/mr-api.yaml b/.github/workflows/mr-api.yaml index d360df8df6..9ea847f5de 100644 --- a/.github/workflows/mr-api.yaml +++ b/.github/workflows/mr-api.yaml @@ -50,13 +50,6 @@ jobs: with: gradle-build-module: :mulighetsrommet-api sub-module-mode: INDIVIDUAL - gradle-build-configuration: |- - compileClasspath - implementation - runtimeClasspath - testCompileClasspath - testImplementation - testRuntimeClasspath - name: Build and push Docker image uses: nais/docker-build-push@v0 id: docker-build-push diff --git a/.github/workflows/mr-arena-adapter.yaml b/.github/workflows/mr-arena-adapter.yaml index 0867224c30..ecc4171e8a 100644 --- a/.github/workflows/mr-arena-adapter.yaml +++ b/.github/workflows/mr-arena-adapter.yaml @@ -49,13 +49,6 @@ jobs: with: gradle-build-module: :mulighetsrommet-arena-adapter sub-module-mode: INDIVIDUAL - gradle-build-configuration: |- - compileClasspath - implementation - runtimeClasspath - testCompileClasspath - testImplementation - testRuntimeClasspath - name: Build and push Docker image uses: nais/docker-build-push@v0 id: docker-build-push From e470d0747b242236125185b82c9c0a5f7c01a90f Mon Sep 17 00:00:00 2001 From: Sondre Lefsaker Date: Wed, 13 Dec 2023 12:09:09 +0100 Subject: [PATCH 16/17] =?UTF-8?q?legg=20til=20faneinnhold=20p=C3=A5=20avta?= =?UTF-8?q?ler=20i=20db?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mulighetsrommet/api/domain/dbo/AvtaleDbo.kt | 3 +++ .../api/domain/dto/AvtaleAdminDto.kt | 3 +++ .../api/repositories/AvtaleRepository.kt | 17 ++++++++++++++--- .../api/routes/v1/AvtaleRoutes.kt | 3 +++ .../api/tasks/GenerateValidationReport.kt | 2 ++ .../db/migration/R__avtale_admin_view.sql | 4 +++- .../db/migration/V102__avtale_faneinnhold.sql | 3 +++ .../api/avtaler/AvtaleValidatorTest.kt | 4 ++++ .../api/fixtures/AvtaleFixtures.kt | 2 ++ .../repositories/VirksomhetRepositoryTest.kt | 2 ++ 10 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 mulighetsrommet-api/src/main/resources/db/migration/V102__avtale_faneinnhold.sql diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dbo/AvtaleDbo.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dbo/AvtaleDbo.kt index 6c3c1a4408..dfac03a358 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dbo/AvtaleDbo.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dbo/AvtaleDbo.kt @@ -2,6 +2,7 @@ package no.nav.mulighetsrommet.api.domain.dbo import no.nav.mulighetsrommet.domain.constants.ArenaMigrering import no.nav.mulighetsrommet.domain.dto.Avtaletype +import no.nav.mulighetsrommet.domain.dto.Faneinnhold import java.time.LocalDate import java.time.LocalDateTime import java.util.* @@ -24,4 +25,6 @@ data class AvtaleDbo( val url: String?, val administratorer: List, val updatedAt: LocalDateTime, + val beskrivelse: String?, + val faneinnhold: Faneinnhold?, ) diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/AvtaleAdminDto.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/AvtaleAdminDto.kt index 1bd885220a..dabac8c30a 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/AvtaleAdminDto.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/domain/dto/AvtaleAdminDto.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable import no.nav.mulighetsrommet.domain.constants.ArenaMigrering import no.nav.mulighetsrommet.domain.dto.Avtalestatus import no.nav.mulighetsrommet.domain.dto.Avtaletype +import no.nav.mulighetsrommet.domain.dto.Faneinnhold import no.nav.mulighetsrommet.domain.serializers.LocalDateSerializer import no.nav.mulighetsrommet.domain.serializers.LocalDateTimeSerializer import no.nav.mulighetsrommet.domain.serializers.UUIDSerializer @@ -36,6 +37,8 @@ data class AvtaleAdminDto( @Serializable(with = LocalDateTimeSerializer::class) val updatedAt: LocalDateTime, val kontorstruktur: List, + val beskrivelse: String? = null, + val faneinnhold: Faneinnhold? = null, ) { @Serializable data class Tiltakstype( diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt index 9bd4d9d293..b7a0184e47 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/repositories/AvtaleRepository.kt @@ -1,5 +1,6 @@ package no.nav.mulighetsrommet.api.repositories +import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import kotliquery.Row import kotliquery.Session @@ -43,7 +44,9 @@ class AvtaleRepository(private val db: Database) { prisbetingelser, antall_plasser, url, - opphav) + opphav, + beskrivelse, + faneinnhold) values (:id::uuid, :navn, :tiltakstype_id::uuid, @@ -56,7 +59,9 @@ class AvtaleRepository(private val db: Database) { :prisbetingelser, :antall_plasser, :url, - :opphav::opphav) + :opphav::opphav, + :beskrivelse, + :faneinnhold::jsonb) on conflict (id) do update set navn = excluded.navn, tiltakstype_id = excluded.tiltakstype_id, avtalenummer = excluded.avtalenummer, @@ -68,7 +73,9 @@ class AvtaleRepository(private val db: Database) { prisbetingelser = excluded.prisbetingelser, antall_plasser = excluded.antall_plasser, url = excluded.url, - opphav = excluded.opphav + opphav = excluded.opphav, + beskrivelse = excluded.beskrivelse, + faneinnhold = excluded.faneinnhold returning * """.trimIndent() @@ -358,6 +365,8 @@ class AvtaleRepository(private val db: Database) { "antall_plasser" to antallPlasser, "url" to url, "opphav" to opphav.name, + "beskrivelse" to beskrivelse, + "faneinnhold" to faneinnhold?.let { Json.encodeToString(it) }, ) private fun ArenaAvtaleDbo.toSqlParameters() = mapOf( @@ -443,6 +452,8 @@ class AvtaleRepository(private val db: Database) { opphav = ArenaMigrering.Opphav.valueOf(string("opphav")), updatedAt = localDateTime("updated_at"), kontorstruktur = kontorstruktur, + beskrivelse = stringOrNull("beskrivelse"), + faneinnhold = stringOrNull("faneinnhold")?.let { Json.decodeFromString(it) }, ) } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt index d1e5d19aa6..377c52e74a 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/routes/v1/AvtaleRoutes.kt @@ -137,5 +137,8 @@ data class AvtaleRequest( navEnheter = navEnheter, opphav = opphav, updatedAt = LocalDate.now().atStartOfDay(), + // TODO: frontend + beskrivelse = null, + faneinnhold = null, ) } diff --git a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/tasks/GenerateValidationReport.kt b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/tasks/GenerateValidationReport.kt index df30427014..39dff0613b 100644 --- a/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/tasks/GenerateValidationReport.kt +++ b/mulighetsrommet-api/src/main/kotlin/no/nav/mulighetsrommet/api/tasks/GenerateValidationReport.kt @@ -230,6 +230,8 @@ private fun toAvtaleDbo(dto: AvtaleAdminDto) = dto.run { url = url, administratorer = administratorer.map { it.navIdent }, updatedAt = updatedAt, + beskrivelse = null, + faneinnhold = null, ) } diff --git a/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql b/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql index 087b320747..2c366d38a3 100644 --- a/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql +++ b/mulighetsrommet-api/src/main/resources/db/migration/R__avtale_admin_view.sql @@ -38,7 +38,9 @@ select a.id, when aa.nav_ident is null then null::jsonb else jsonb_build_object('navIdent', aa.nav_ident, 'navn', concat(na.fornavn, ' ', na.etternavn)) end - ) as administratorer + ) as administratorer, + a.beskrivelse, + a.faneinnhold from avtale a join tiltakstype t on t.id = a.tiltakstype_id left join avtale_administrator aa on a.id = aa.avtale_id diff --git a/mulighetsrommet-api/src/main/resources/db/migration/V102__avtale_faneinnhold.sql b/mulighetsrommet-api/src/main/resources/db/migration/V102__avtale_faneinnhold.sql new file mode 100644 index 0000000000..ffb43b4eba --- /dev/null +++ b/mulighetsrommet-api/src/main/resources/db/migration/V102__avtale_faneinnhold.sql @@ -0,0 +1,3 @@ +alter table avtale + add column beskrivelse text, + add column faneinnhold jsonb; diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/avtaler/AvtaleValidatorTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/avtaler/AvtaleValidatorTest.kt index a023800d99..f45b64fcc4 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/avtaler/AvtaleValidatorTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/avtaler/AvtaleValidatorTest.kt @@ -51,6 +51,8 @@ class AvtaleValidatorTest : FunSpec({ opphav = ArenaMigrering.Opphav.MR_ADMIN_FLATE, antallPlasser = null, updatedAt = LocalDateTime.now(), + beskrivelse = null, + faneinnhold = null, ) lateinit var navEnheterService: NavEnhetService @@ -203,6 +205,8 @@ class AvtaleValidatorTest : FunSpec({ opphav = ArenaMigrering.Opphav.ARENA, antallPlasser = null, updatedAt = avtaleDbo.updatedAt, + beskrivelse = null, + faneinnhold = null, ) avtaler.upsert( diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/fixtures/AvtaleFixtures.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/fixtures/AvtaleFixtures.kt index 4bdac97fff..ec5240a41a 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/fixtures/AvtaleFixtures.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/fixtures/AvtaleFixtures.kt @@ -31,6 +31,8 @@ object AvtaleFixtures { antallPlasser = null, url = null, updatedAt = LocalDate.now().atStartOfDay(), + beskrivelse = null, + faneinnhold = null, ) val avtaleRequest = AvtaleRequest( diff --git a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/VirksomhetRepositoryTest.kt b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/VirksomhetRepositoryTest.kt index 38a52d0d8f..f7ec6d9113 100644 --- a/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/VirksomhetRepositoryTest.kt +++ b/mulighetsrommet-api/src/test/kotlin/no/nav/mulighetsrommet/api/repositories/VirksomhetRepositoryTest.kt @@ -242,6 +242,8 @@ class VirksomhetRepositoryTest : FunSpec({ url = null, administratorer = emptyList(), updatedAt = LocalDate.now().atStartOfDay(), + beskrivelse = null, + faneinnhold = null, ) avtaleRepository.upsert(avtale) val tiltaksgjennomforing = TiltaksgjennomforingDbo( From ced7f10537db4e53a25569a8ee3fc6ca6eebe559 Mon Sep 17 00:00:00 2001 From: Fredrik Ingebrigtsen Date: Wed, 13 Dec 2023 14:12:36 +0100 Subject: [PATCH 17/17] Fix fremmote tidspunkt parsing --- .../TiltaksgjennomforingSkjemaConst.tsx | 2 +- .../TiltaksgjennomforingDetaljer.tsx | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/mr-admin-flate/src/components/tiltaksgjennomforinger/TiltaksgjennomforingSkjemaConst.tsx b/frontend/mr-admin-flate/src/components/tiltaksgjennomforinger/TiltaksgjennomforingSkjemaConst.tsx index 9a7ca9ea47..54706b536b 100644 --- a/frontend/mr-admin-flate/src/components/tiltaksgjennomforinger/TiltaksgjennomforingSkjemaConst.tsx +++ b/frontend/mr-admin-flate/src/components/tiltaksgjennomforinger/TiltaksgjennomforingSkjemaConst.tsx @@ -99,7 +99,7 @@ export function fremmoteTidFromTidspunkt(fremmoteTidspunkt?: string): string | u if (!fremmoteTidspunkt) return undefined; const d = new Date(fremmoteTidspunkt); - return `${d.getHours()}:${d.getMinutes()}`; + return `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`; } export function utkastDataEllerDefault( diff --git a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx index 28124897f5..e0687c9ff4 100644 --- a/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx +++ b/frontend/mr-admin-flate/src/pages/tiltaksgjennomforinger/TiltaksgjennomforingDetaljer.tsx @@ -290,15 +290,19 @@ export function TiltaksgjennomforingDetaljer(props: Props) { header="Fremmøte tidspunkt" verdi={
    - {`${fremmoteDatoFromTidspunkt( - tiltaksgjennomforing.fremmoteTidspunkt, - )} ${fremmoteTidFromTidspunkt(tiltaksgjennomforing.fremmoteTidspunkt)}`} + {`${formaterDato( + fremmoteDatoFromTidspunkt(tiltaksgjennomforing.fremmoteTidspunkt), + "Ikke satt", + )} ${fremmoteTidFromTidspunkt(tiltaksgjennomforing.fremmoteTidspunkt) ?? ""}`}
    } /> - + ) : tiltaksgjennomforing.stedForGjennomforing ? (