diff --git a/Dockerfile b/Dockerfile
index 8eb52f7d7..3fcea065f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM ghcr.io/navikt/modialogin/modialogin-frontend:4da23e180b24161b5b23f9b425ba8e007a0251a8
+FROM ghcr.io/navikt/modialogin/modialogin-frontend:51338869e1398b8c18358eeddfa373fe8327e824
ADD proxy-config.json /proxy-config.json
ADD preprod-proxy-config.json /preprod-proxy-config.json
COPY build /www
diff --git a/package-lock.json b/package-lock.json
index a5ac7299f..871e98bd4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,6 @@
"version": "0.4.2",
"license": "MIT",
"dependencies": {
- "@navikt/ds-icons": "^2.0.1",
"@navikt/fnrvalidator": "^1.1.3",
"@navikt/navspa": "^4.0.0",
"@navikt/tag-input": "^2.0.1",
@@ -3608,9 +3607,9 @@
}
},
"node_modules/@types/eslint-scope": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz",
- "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==",
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
+ "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
"dev": true,
"dependencies": {
"@types/eslint": "*",
@@ -3618,9 +3617,9 @@
}
},
"node_modules/@types/estree": {
- "version": "0.0.50",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
- "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
+ "version": "0.0.51",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
+ "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
"dev": true
},
"node_modules/@types/faker": {
@@ -4530,9 +4529,9 @@
}
},
"node_modules/acorn": {
- "version": "8.6.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz",
- "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==",
+ "version": "8.8.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -5855,9 +5854,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001352",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001352.tgz",
- "integrity": "sha512-GUgH8w6YergqPQDGWhJGt8GDRnY0L/iJVQcU3eJ46GYf52R8tk0Wxp0PymuFVZboJYXGiCqwozAYZNRjVj6IcA==",
+ "version": "1.0.30001480",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz",
+ "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==",
"dev": true,
"funding": [
{
@@ -5867,6 +5866,10 @@
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
}
]
},
@@ -7797,9 +7800,9 @@
}
},
"node_modules/enhanced-resolve": {
- "version": "5.8.3",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
- "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==",
+ "version": "5.12.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+ "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.4",
@@ -10107,9 +10110,9 @@
}
},
"node_modules/graceful-fs": {
- "version": "4.2.6",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
- "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
"dev": true
},
"node_modules/gzip-size": {
@@ -21691,9 +21694,9 @@
}
},
"node_modules/watchpack": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
- "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"dev": true,
"dependencies": {
"glob-to-regexp": "^0.4.1",
@@ -21722,41 +21725,50 @@
}
},
"node_modules/webpack": {
- "version": "5.65.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz",
- "integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==",
+ "version": "5.76.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz",
+ "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==",
"dev": true,
"dependencies": {
- "@types/eslint-scope": "^3.7.0",
- "@types/estree": "^0.0.50",
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^0.0.51",
"@webassemblyjs/ast": "1.11.1",
"@webassemblyjs/wasm-edit": "1.11.1",
"@webassemblyjs/wasm-parser": "1.11.1",
- "acorn": "^8.4.1",
+ "acorn": "^8.7.1",
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.8.3",
+ "enhanced-resolve": "^5.10.0",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
- "graceful-fs": "^4.2.4",
- "json-parse-better-errors": "^1.0.2",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
"neo-async": "^2.6.2",
"schema-utils": "^3.1.0",
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
- "watchpack": "^2.3.1",
- "webpack-sources": "^3.2.2"
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
},
"bin": {
"webpack": "bin/webpack.js"
},
"engines": {
"node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependenciesMeta": {
+ "webpack-cli": {
+ "optional": true
+ }
}
},
"node_modules/webpack-dev-middleware": {
@@ -21964,9 +21976,9 @@
}
},
"node_modules/webpack-sources": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz",
- "integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==",
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
"dev": true,
"engines": {
"node": ">=10.13.0"
@@ -25361,9 +25373,9 @@
}
},
"@types/eslint-scope": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz",
- "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==",
+ "version": "3.7.4",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
+ "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
"dev": true,
"requires": {
"@types/eslint": "*",
@@ -25371,9 +25383,9 @@
}
},
"@types/estree": {
- "version": "0.0.50",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
- "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
+ "version": "0.0.51",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
+ "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
"dev": true
},
"@types/faker": {
@@ -26138,9 +26150,9 @@
}
},
"acorn": {
- "version": "8.6.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz",
- "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==",
+ "version": "8.8.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
+ "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
"dev": true
},
"acorn-globals": {
@@ -27236,9 +27248,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30001352",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001352.tgz",
- "integrity": "sha512-GUgH8w6YergqPQDGWhJGt8GDRnY0L/iJVQcU3eJ46GYf52R8tk0Wxp0PymuFVZboJYXGiCqwozAYZNRjVj6IcA==",
+ "version": "1.0.30001480",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz",
+ "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==",
"dev": true
},
"capture-exit": {
@@ -28825,9 +28837,9 @@
}
},
"enhanced-resolve": {
- "version": "5.8.3",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
- "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==",
+ "version": "5.12.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
+ "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.4",
@@ -30658,9 +30670,9 @@
}
},
"graceful-fs": {
- "version": "4.2.6",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
- "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
"dev": true
},
"gzip-size": {
@@ -40075,9 +40087,9 @@
}
},
"watchpack": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
- "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
"dev": true,
"requires": {
"glob-to-regexp": "^0.4.1",
@@ -40100,35 +40112,35 @@
"dev": true
},
"webpack": {
- "version": "5.65.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz",
- "integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==",
+ "version": "5.76.1",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.1.tgz",
+ "integrity": "sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ==",
"dev": true,
"requires": {
- "@types/eslint-scope": "^3.7.0",
- "@types/estree": "^0.0.50",
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^0.0.51",
"@webassemblyjs/ast": "1.11.1",
"@webassemblyjs/wasm-edit": "1.11.1",
"@webassemblyjs/wasm-parser": "1.11.1",
- "acorn": "^8.4.1",
+ "acorn": "^8.7.1",
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.8.3",
+ "enhanced-resolve": "^5.10.0",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
- "graceful-fs": "^4.2.4",
- "json-parse-better-errors": "^1.0.2",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
"neo-async": "^2.6.2",
"schema-utils": "^3.1.0",
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
- "watchpack": "^2.3.1",
- "webpack-sources": "^3.2.2"
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
},
"dependencies": {
"eslint-scope": {
@@ -40335,9 +40347,9 @@
}
},
"webpack-sources": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz",
- "integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==",
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
"dev": true
},
"websocket-driver": {
diff --git a/src/app/internarbeidsflatedecorator/Decorator.tsx b/src/app/internarbeidsflatedecorator/Decorator.tsx
index c4ff92e28..1e4f905a1 100644
--- a/src/app/internarbeidsflatedecorator/Decorator.tsx
+++ b/src/app/internarbeidsflatedecorator/Decorator.tsx
@@ -130,7 +130,7 @@ function getHotkeys(): Hotkey[] {
* Evt kan bruken av `useHotkey` hooken føre til at dette blir registrert i en global context som kan brukes her
*/
const isProd = window.location.host === 'app.adeo.no';
- const naisInternNavDomain = isProd ? '.intern.nav.no' : '.dev.intern.nav.no';
+ const naisInternNavDomain = isProd ? '.intern.nav.no' : '.intern.dev.nav.no';
return [
{
key: { char: 'O', altKey: true },
diff --git a/src/app/personside/dialogpanel/DialogPanel.tsx b/src/app/personside/dialogpanel/DialogPanel.tsx
index 36be9d8bd..1fa0bc47b 100644
--- a/src/app/personside/dialogpanel/DialogPanel.tsx
+++ b/src/app/personside/dialogpanel/DialogPanel.tsx
@@ -8,11 +8,6 @@ import useVisTraadTilknyttetPlukketOppgave from './fortsettDialog/useVisTraadTil
import { OppgavelisteValg } from './sendMelding/SendNyMelding';
import LazySpinner from '../../../components/LazySpinner';
import innstillingerResource from '../../../rest/resources/innstillingerResource';
-import IfFeatureToggleOn from '../../../components/featureToggle/IfFeatureToggleOn';
-import { FeatureToggles } from '../../../components/featureToggle/toggleIDs';
-import IfFeatureToggleOff from '../../../components/featureToggle/IfFeatureToggleOff';
-import NyFortsettDialogContainer from './fortsettDialog/NyFortsettDialogContainer';
-import NySendNyMeldingContainer from './sendMelding/NySendNyMeldingContainer';
const DialogPanelWrapper = styled.div`
flex-grow: 1;
@@ -38,31 +33,13 @@ function DialogPanel() {
{dialogpanelTraad ? (
- <>
-
-
-
-
-
-
- >
+
) : (
- <>
-
-
-
-
-
-
- >
+
)}
diff --git a/src/app/personside/dialogpanel/__snapshots__/DialogPanel.test.tsx.snap b/src/app/personside/dialogpanel/__snapshots__/DialogPanel.test.tsx.snap
index 8402db63b..99cf067e1 100644
--- a/src/app/personside/dialogpanel/__snapshots__/DialogPanel.test.tsx.snap
+++ b/src/app/personside/dialogpanel/__snapshots__/DialogPanel.test.tsx.snap
@@ -100,6 +100,21 @@ exports[`viser dialogpanel 1`] = `
padding-left: 2.25rem;
}
+.c16 {
+ margin-top: 1rem;
+}
+
+.c16 label {
+ position: absolute !important;
+ height: 1px;
+ width: 1px;
+ overflow: hidden;
+ -webkit-clip: rect(1px 1px 1px 1px);
+ clip: rect(1px 1px 1px 1px);
+ -webkit-clip: rect(1px,1px,1px,1px);
+ clip: rect(1px,1px,1px,1px);
+}
+
.c5 {
display: -webkit-box;
display: -webkit-flex;
@@ -158,7 +173,7 @@ exports[`viser dialogpanel 1`] = `
padding: 1rem .5rem;
}
-.c16 {
+.c18 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -168,7 +183,7 @@ exports[`viser dialogpanel 1`] = `
flex-direction: column;
}
-.c16 > * {
+.c18 > * {
margin-bottom: 0.7rem;
}
@@ -176,6 +191,10 @@ exports[`viser dialogpanel 1`] = `
margin-top: 1rem;
}
+.c17 {
+ margin-top: 1rem;
+}
+
.c4 {
margin-bottom: 1rem !important;
}
@@ -477,7 +496,7 @@ exports[`viser dialogpanel 1`] = `
className="skjemaelement__label"
htmlFor="Helt tilfeldig ID"
>
- Referat telefon
+ Referat
- Referat oppmøte
-
-
-
-
-
- Spørsmål
+ Samtale
-
+
-
- Velg sak
-
-
+ Velg sak
+
+
+ Ingen valgt sak
+
+
+
- Ingen valgt sak
-
-
-
-
+ Oppgaveliste
+
+
+
+
+ Svar skal til min oppgaveliste hos
+ valgt enhet
+
+
+ Svar skal til
+ valgt enhet
+ sin oppgaveliste
+
+
+
+
+
- info
+
+ info
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+ Gir varsel, bruker må svare
+
+
- Gir varsel, bruker kan ikke svare
+
+
+ Avslutt samtale etter sending
+
void;
traad?: Traad;
meldingstatus: SendNyMeldingStatus;
@@ -99,12 +99,14 @@ export function DialogpanelKvittering(props: {
)}
-
+ {props.traad && (
+
+ )}
{props.meldingstatus !== SendNyMeldingStatus.ERROR && (
diff --git a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialog.tsx b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialog.tsx
index b2a0131b1..ddfa90cc7 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialog.tsx
+++ b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialog.tsx
@@ -1,37 +1,38 @@
import * as React from 'react';
import { FormEvent } from 'react';
-import { AlertStripeInfo } from 'nav-frontend-alertstriper';
-import { Meldingstype, Traad } from '../../../../models/meldinger/meldinger';
+import { AlertStripeFeil, AlertStripeInfo } from 'nav-frontend-alertstriper';
+import { Traad, TraadType } from '../../../../models/meldinger/meldinger';
import TidligereMeldinger from './tidligereMeldinger/TidligereMeldinger';
-import VelgDialogType from './VelgDialogType';
import TekstFelt from '../sendMelding/TekstFelt';
import { UnmountClosed } from 'react-collapse';
import { Hovedknapp } from 'nav-frontend-knapper';
import { DialogpanelFeilmelding, FormStyle } from '../fellesStyling';
import KnappMedBekreftPopup from '../../../../components/KnappMedBekreftPopup';
-import BrukerKanSvare from './BrukerKanSvare';
import styled from 'styled-components/macro';
import { FortsettDialogValidator } from './validatorer';
import { DialogPanelStatus, FortsettDialogPanelState, FortsettDialogState } from './FortsettDialogTypes';
-import {
- eldsteMelding,
- erJournalfort,
- erMeldingstypeSamtalereferat
-} from '../../infotabs/meldinger/utils/meldingerUtils';
+import { erJournalfort } from '../../infotabs/meldinger/utils/meldingerUtils';
import { capitalizeName } from '../../../../utils/string-utils';
import persondataResource from '../../../../rest/resources/persondataResource';
+import { Checkbox, SkjemaelementFeilmelding } from 'nav-frontend-skjema';
+import Panel from 'nav-frontend-paneler';
+import Oppgaveliste from '../sendMelding/Oppgaveliste';
+import DialogpanelVelgSak from '../sendMelding/DialogpanelVelgSak';
const SubmitKnapp = styled(Hovedknapp)`
white-space: normal;
- margin-top: 1rem;
`;
const StyledKnappMedBekreftPopup = styled(KnappMedBekreftPopup)`
width: 100%;
`;
-const Margin = styled.div`
- /* Pga React Collapse må vi slenge på noen div'er som tar seg av marginer for å unngå hopp i animasjon */
+const StyledAlertStripeInfo = styled(AlertStripeInfo)`
+ margin-top: 1rem;
+`;
+
+const StyledCheckbox = styled(Checkbox)`
+ margin-top: 1rem;
`;
interface Props {
@@ -45,17 +46,18 @@ interface Props {
fortsettDialogPanelState: FortsettDialogPanelState;
}
-function Feilmelding(props: { status: DialogPanelStatus }) {
+function Feilmelding(props: { status: DialogPanelStatus; errors?: Error[] }) {
if (props.status === DialogPanelStatus.ERROR) {
return ;
}
- return null;
-}
-function useVarselInfotekst(meldingstype: Meldingstype): string {
- return meldingstype === Meldingstype.SVAR_SKRIFTLIG
- ? 'Gir varsel, dialogen avsluttes. Det er ikke mulig å sende flere meldinger i denne dialogen i ettertid.'
- : 'Gir varsel, bruker kan svare.';
+ if (props.errors) {
+ props.errors.map((error) => {
+ return {error.message} ;
+ });
+ }
+
+ return null;
}
export const tekstMaksLengde = 5000;
@@ -74,10 +76,11 @@ function FortsettDialog(props: Props) {
temaKode: jp.journalfortTema,
saksId: jp.journalfortSaksid
}));
- const varselInfotekst = useVarselInfotekst(state.dialogType);
- const melding = eldsteMelding(props.traad);
- const erSamtalereferat = erMeldingstypeSamtalereferat(melding.meldingstype);
+ const erSamtalereferat = props.traad.traadType === TraadType.SAMTALEREFERAT;
+ const visFeilmelding = !FortsettDialogValidator.sak(state) && state.visFeilmeldinger;
+ const visVelgSak = !erJournalfort(props.traad) && !erOksosTraad;
+
return (
@@ -92,30 +95,40 @@ function FortsettDialog(props: Props) {
: undefined
}
/>
- updateState({ dialogType: dialogType })}
- erTilknyttetOppgave={props.erTilknyttetOppgave}
- erSTOOppgave={props.erSTOOppgave}
- erOksosTraad={erOksosTraad}
- erSamtalereferat={erSamtalereferat}
- />
-
+
+
- {varselInfotekst}
-
+
+ {visVelgSak && (
+ updateState({ sak: sak })}
+ valgtSak={state.sak}
+ visFeilmelding={visFeilmelding}
+ eksisterendeSaker={eksisterendeSaker}
+ />
+ )}
+
+ {visVelgSak && visFeilmelding && (
+ Du må velge sak
+ )}
+
+ {!state.avsluttet ? (
+ updateState({ oppgaveListe: oppgaveliste })}
+ />
+ ) : (
+ Bruker kan ikke skrive mer i denne samtalen
+ )}
+ updateState({ avsluttet: !state.avsluttet })}
+ />
+
-
-
+
+
{delMedBrukerTekst}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogContainer.tsx b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogContainer.tsx
index 4507937a9..98d6fb56b 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogContainer.tsx
+++ b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogContainer.tsx
@@ -1,8 +1,7 @@
import * as React from 'react';
import { FormEvent, useRef, useState, useCallback, useMemo } from 'react';
-import FortsettDialog from './FortsettDialog';
import { FortsettDialogValidator } from './validatorer';
-import { ForsettDialogRequest, Meldingstype, Traad } from '../../../../models/meldinger/meldinger';
+import { SendMeldingRequest, Traad, TraadType } from '../../../../models/meldinger/meldinger';
import { setIngenValgtTraadDialogpanel } from '../../../../redux/oppgave/actions';
import { useFodselsnummer } from '../../../../utils/customHooks';
import { useDispatch } from 'react-redux';
@@ -32,12 +31,7 @@ import dialogResource from '../../../../rest/resources/dialogResource';
import { useValgtenhet } from '../../../../context/valgtenhet-state';
import { useQueryClient, UseQueryResult } from '@tanstack/react-query';
import journalsakResource from '../../../../rest/resources/journalsakResource';
-
-export type FortsettDialogType =
- | Meldingstype.SVAR_SKRIFTLIG
- | Meldingstype.SPORSMAL_MODIA_UTGAAENDE
- | Meldingstype.SAMTALEREFERAT_OPPMOTE
- | Meldingstype.SAMTALEREFERAT_TELEFON;
+import FortsettDialog from './FortsettDialog';
interface Props {
traad: Traad;
@@ -69,13 +63,14 @@ function FortsettDialogContainer(props: Props) {
const initialState = useMemo(
() => ({
tekst: '',
- dialogType: Meldingstype.SVAR_SKRIFTLIG as FortsettDialogType,
- tema: undefined,
+ traadType: props.traad.traadType ?? TraadType.SAMTALEREFERAT,
+ temagruppe: undefined,
visFeilmeldinger: false,
sak: undefined,
- oppgaveListe: props.defaultOppgaveDestinasjon
+ oppgaveListe: props.defaultOppgaveDestinasjon,
+ avsluttet: false
}),
- [props.defaultOppgaveDestinasjon]
+ [props.defaultOppgaveDestinasjon, props.traad.traadType]
);
const fnr = useFodselsnummer();
@@ -137,26 +132,24 @@ function FortsettDialogContainer(props: Props) {
const commonPayload = {
enhet: valgtEnhet,
fritekst: state.tekst,
- meldingstype: state.dialogType,
traadId: props.traad.traadId,
+ traadType: state.traadType,
+ temagruppe: props.traad.temagruppe,
behandlingsId: opprettHenvendelse.henvendelse.behandlingsId,
- oppgaveId: oppgaveId
+ oppgaveId: oppgaveId,
+ avsluttet: state.avsluttet
};
- if (
- FortsettDialogValidator.erGyldigSvarSkriftlig(state) ||
- FortsettDialogValidator.erGyldigSamtalereferat(state)
- ) {
+ if (FortsettDialogValidator.erGyldigSamtalereferat(state)) {
setDialogStatus({ type: DialogPanelStatus.POSTING });
- const request: ForsettDialogRequest = {
+ const request: SendMeldingRequest = {
...commonPayload,
- erOppgaveTilknyttetAnsatt: true // TODO, denne bør ikke være nødvendig å sende med her
+ erOppgaveTilknyttetAnsatt: true
};
const kvitteringsData: KvitteringsData = {
fritekst: request.fritekst,
- meldingstype: request.meldingstype,
traad: props.traad
};
- post(`${apiBaseUri}/dialog/${fnr}/fortsett/ferdigstill`, request, 'Send-Svar')
+ post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Svar')
.then(() => {
callback();
setDialogStatus({ type: DialogPanelStatus.SVAR_SENDT, kvitteringsData: kvitteringsData });
@@ -164,7 +157,7 @@ function FortsettDialogContainer(props: Props) {
.catch(() => {
setDialogStatus({ type: DialogPanelStatus.ERROR });
});
- } else if (FortsettDialogValidator.erGyldigSporsmaalSkriftlig(state, props.traad)) {
+ } else if (FortsettDialogValidator.erGyldigSamtale(state)) {
const tradErJournalfort = erJournalfort(props.traad);
const erOksos = props.traad.meldinger[0].temagruppe === Temagruppe.ØkonomiskSosial;
if (!state.sak && !tradErJournalfort && !erOksos) {
@@ -173,20 +166,20 @@ function FortsettDialogContainer(props: Props) {
);
console.error(error);
loggError(error);
+ updateState({ errors: [error], visFeilmeldinger: true });
return;
}
setDialogStatus({ type: DialogPanelStatus.POSTING });
- const request: ForsettDialogRequest = {
+ const request: SendMeldingRequest = {
...commonPayload,
- erOppgaveTilknyttetAnsatt: erOppgaveTilknyttetAnsatt,
+ erOppgaveTilknyttetAnsatt: state.avsluttet ? false : erOppgaveTilknyttetAnsatt,
sak: state.sak ? state.sak : undefined
};
const kvitteringsData: KvitteringsData = {
fritekst: request.fritekst,
- meldingstype: request.meldingstype,
traad: props.traad
};
- post(`${apiBaseUri}/dialog/${fnr}/fortsett/ferdigstill`, request, 'Svar-Med-Spørsmål')
+ post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Svar-Med-Spørsmål')
.then(() => {
callback();
queryClient.invalidateQueries(journalsakResource.queryKey(fnr));
@@ -196,14 +189,28 @@ function FortsettDialogContainer(props: Props) {
setDialogStatus({ type: DialogPanelStatus.ERROR });
});
} else {
- updateState({ visFeilmeldinger: true });
+ const error = Error('Det skjedde en feil ved sending av melding');
+ updateState({ errors: [error], visFeilmeldinger: true });
}
};
+ function traadTittel(traadType?: TraadType) {
+ switch (traadType) {
+ case TraadType.CHAT:
+ return 'Fortsett chat';
+ case TraadType.MELDINGSKJEDE:
+ return 'Fortsett samtale';
+ case TraadType.SAMTALEREFERAT:
+ return 'Påfølgende referat';
+ default:
+ return '';
+ }
+ }
+
return (
- Fortsett dialog
+ {traadTittel(props.traad.traadType)}
{
dispatch(setIngenValgtTraadDialogpanel());
diff --git a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogTypes.ts b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogTypes.ts
index c3add4725..ac965ee84 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogTypes.ts
+++ b/src/app/personside/dialogpanel/fortsettDialog/FortsettDialogTypes.ts
@@ -1,7 +1,6 @@
-import { Meldingstype, Traad } from '../../../../models/meldinger/meldinger';
+import { Traad, TraadType } from '../../../../models/meldinger/meldinger';
import { OppgavelisteValg } from '../sendMelding/SendNyMelding';
import { JournalforingsSak } from '../../infotabs/meldinger/traadvisning/verktoylinje/journalforing/JournalforingPanel';
-import { FortsettDialogType } from './FortsettDialogContainer';
import { Temagruppe } from '../../../../models/temagrupper';
export enum DialogPanelStatus {
@@ -13,7 +12,6 @@ export enum DialogPanelStatus {
export type KvitteringsData = {
fritekst: string;
- meldingstype: Meldingstype;
temagruppe?: Temagruppe;
traad: Traad;
};
@@ -35,10 +33,11 @@ export type FortsettDialogPanelState = UnderArbeid | SvarSendtSuccess;
export interface FortsettDialogState {
tekst: string;
- dialogType: FortsettDialogType;
+ traadType: TraadType;
temagruppe?: Temagruppe;
oppgaveListe: OppgavelisteValg;
sak?: JournalforingsSak;
visFeilmeldinger: boolean;
+ errors?: Error[];
avsluttet?: boolean;
}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialog.tsx b/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialog.tsx
deleted file mode 100644
index 902b97e9a..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialog.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-import * as React from 'react';
-import { FormEvent } from 'react';
-import { AlertStripeFeil, AlertStripeInfo } from 'nav-frontend-alertstriper';
-import { Traad, TraadType } from '../../../../models/meldinger/meldinger';
-import TidligereMeldinger from './tidligereMeldinger/TidligereMeldinger';
-import TekstFelt from '../sendMelding/TekstFelt';
-import { UnmountClosed } from 'react-collapse';
-import { Hovedknapp } from 'nav-frontend-knapper';
-import { DialogpanelFeilmelding, FormStyle } from '../fellesStyling';
-import KnappMedBekreftPopup from '../../../../components/KnappMedBekreftPopup';
-import styled from 'styled-components/macro';
-import { FortsettDialogValidator } from './nyValidatorer';
-import { DialogPanelStatus, FortsettDialogPanelState, FortsettDialogState } from './NyFortsettDialogTypes';
-import { erJournalfort } from '../../infotabs/meldinger/utils/meldingerUtils';
-import { capitalizeName } from '../../../../utils/string-utils';
-import persondataResource from '../../../../rest/resources/persondataResource';
-import { Checkbox, SkjemaelementFeilmelding } from 'nav-frontend-skjema';
-import Panel from 'nav-frontend-paneler';
-import Oppgaveliste from '../sendMelding/Oppgaveliste';
-import DialogpanelVelgSak from '../sendMelding/DialogpanelVelgSak';
-
-const SubmitKnapp = styled(Hovedknapp)`
- white-space: normal;
-`;
-
-const StyledKnappMedBekreftPopup = styled(KnappMedBekreftPopup)`
- width: 100%;
-`;
-
-const StyledAlertStripeInfo = styled(AlertStripeInfo)`
- margin-top: 1rem;
-`;
-
-const StyledCheckbox = styled(Checkbox)`
- margin-top: 1rem;
-`;
-
-interface Props {
- handleSubmit: (event: FormEvent) => void;
- handleAvbryt: () => void;
- state: FortsettDialogState;
- updateState: (change: Partial) => void;
- traad: Traad;
- erTilknyttetOppgave: boolean;
- erSTOOppgave: boolean;
- fortsettDialogPanelState: FortsettDialogPanelState;
-}
-
-function Feilmelding(props: { status: DialogPanelStatus; errors?: Error[] }) {
- if (props.status === DialogPanelStatus.ERROR) {
- return ;
- }
-
- if (props.errors) {
- props.errors.map((error) => {
- return {error.message} ;
- });
- }
-
- return null;
-}
-
-export const tekstMaksLengde = 5000;
-
-function NyFortsettDialog(props: Props) {
- const { state, updateState, handleAvbryt, handleSubmit } = props;
- const personResponse = persondataResource.useFetch();
-
- const navn = personResponse.data
- ? capitalizeName(personResponse.data.person.navn.firstOrNull()?.fornavn || '')
- : 'bruker';
-
- const delMedBrukerTekst = props.erTilknyttetOppgave ? `Del med ${navn} og avslutt oppgave` : `Del med ${navn}`;
- const erOksosTraad = props.traad.meldinger.some((it) => it.temagruppe === 'OKSOS');
- const eksisterendeSaker = props.traad.journalposter.map((jp) => ({
- temaKode: jp.journalfortTema,
- saksId: jp.journalfortSaksid
- }));
-
- const erSamtalereferat = props.traad.traadType === TraadType.SAMTALEREFERAT;
- const visFeilmelding = !FortsettDialogValidator.sak(state) && state.visFeilmeldinger;
- const visVelgSak = !erJournalfort(props.traad) && !erOksosTraad;
-
- return (
-
-
- updateState({ tekst: tekst })}
- feilmelding={
- !FortsettDialogValidator.tekst(state) && state.visFeilmeldinger
- ? `Du må skrive en tekst på mellom 1 og ${tekstMaksLengde} tegn`
- : undefined
- }
- />
-
-
-
-
- {visVelgSak && (
- updateState({ sak: sak })}
- valgtSak={state.sak}
- visFeilmelding={visFeilmelding}
- eksisterendeSaker={eksisterendeSaker}
- />
- )}
-
- {visVelgSak && visFeilmelding && (
- Du må velge sak
- )}
-
- {!state.avsluttet ? (
- updateState({ oppgaveListe: oppgaveliste })}
- />
- ) : (
- Bruker kan ikke skrive mer i denne samtalen
- )}
- updateState({ avsluttet: !state.avsluttet })}
- />
-
-
-
-
-
- {delMedBrukerTekst}
-
- {!props.erTilknyttetOppgave && (
-
- Avbryt
-
- )}
-
- );
-}
-
-export default NyFortsettDialog;
diff --git a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogContainer.tsx b/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogContainer.tsx
deleted file mode 100644
index 9feb00c81..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogContainer.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-import * as React from 'react';
-import { FormEvent, useRef, useState, useCallback, useMemo } from 'react';
-import { FortsettDialogValidator } from './nyValidatorer';
-import { SendMeldingRequest, Traad, TraadType } from '../../../../models/meldinger/meldinger';
-import { setIngenValgtTraadDialogpanel } from '../../../../redux/oppgave/actions';
-import { useFodselsnummer } from '../../../../utils/customHooks';
-import { useDispatch } from 'react-redux';
-import { OppgavelisteValg } from '../sendMelding/SendNyMelding';
-import { SvarSendtKvittering } from './NyFortsettDialogKvittering';
-import useOpprettHenvendelse from './useOpprettHenvendelse';
-import { erJournalfort } from '../../infotabs/meldinger/utils/meldingerUtils';
-import { loggError } from '../../../../utils/logger/frontendLogger';
-import { FetchError, post } from '../../../../api/api';
-import { apiBaseUri } from '../../../../api/config';
-import {
- DialogPanelStatus,
- FortsettDialogPanelState,
- FortsettDialogState,
- KvitteringsData
-} from './NyFortsettDialogTypes';
-import { Undertittel } from 'nav-frontend-typografi';
-import { guid } from 'nav-frontend-js-utils';
-import styled from 'styled-components';
-import theme from '../../../../styles/personOversiktTheme';
-import ReflowBoundry from '../ReflowBoundry';
-import { Temagruppe } from '../../../../models/temagrupper';
-import useDraft, { Draft } from '../use-draft';
-import { Oppgave } from '../../../../models/meldinger/oppgave';
-import tildelteoppgaver from '../../../../rest/resources/tildelteoppgaverResource';
-import dialogResource from '../../../../rest/resources/dialogResource';
-import { useValgtenhet } from '../../../../context/valgtenhet-state';
-import { useQueryClient, UseQueryResult } from '@tanstack/react-query';
-import journalsakResource from '../../../../rest/resources/journalsakResource';
-import NyFortsettDialog from './NyFortsettDialog';
-
-interface Props {
- traad: Traad;
- defaultOppgaveDestinasjon: OppgavelisteValg;
-}
-
-const StyledArticle = styled.article`
- padding: 1rem ${theme.margin.layout};
-`;
-
-export function finnPlukketOppgaveForTraad(
- traad: Traad,
- resource: UseQueryResult
-): { oppgave: Oppgave | undefined; erSTOOppgave: boolean } {
- if (!resource.data) {
- return { oppgave: undefined, erSTOOppgave: false };
- } else {
- const oppgave: Oppgave | undefined = resource.data.find(
- (oppgave: Oppgave) => oppgave.traadId === traad.traadId
- );
- const erSTOOppgave = oppgave !== undefined && oppgave.erSTOOppgave;
-
- return { oppgave, erSTOOppgave };
- }
-}
-
-function NyFortsettDialogContainer(props: Props) {
- const queryClient = useQueryClient();
- const initialState = useMemo(
- () => ({
- tekst: '',
- traadType: props.traad.traadType ?? TraadType.SAMTALEREFERAT,
- temagruppe: undefined,
- visFeilmeldinger: false,
- sak: undefined,
- oppgaveListe: props.defaultOppgaveDestinasjon,
- avsluttet: false
- }),
- [props.defaultOppgaveDestinasjon, props.traad.traadType]
- );
-
- const fnr = useFodselsnummer();
- const tittelId = useRef(guid());
- const [state, setState] = useState(initialState);
- const valgtEnhet = useValgtenhet().enhetId;
- const draftLoader = useCallback(
- (draft: Draft) => setState((current) => ({ ...current, tekst: draft.content })),
- [setState]
- );
- const draftContext = useMemo(() => ({ fnr }), [fnr]);
- const { update: updateDraft, remove: removeDraft } = useDraft(draftContext, draftLoader);
- const tildelteOppgaverResource = tildelteoppgaver.useFetch();
- const [dialogStatus, setDialogStatus] = useState({
- type: DialogPanelStatus.UNDER_ARBEID
- });
- const dispatch = useDispatch();
- const updateState = useCallback(
- (change: Partial) =>
- setState((currentState) => {
- if (change.tekst !== undefined) {
- updateDraft(change.tekst);
- }
- return { ...currentState, visFeilmeldinger: false, ...change };
- }),
- [setState, updateDraft]
- );
-
- const opprettHenvendelse = useOpprettHenvendelse(props.traad);
-
- if (dialogStatus.type === DialogPanelStatus.SVAR_SENDT) {
- return ;
- }
-
- if (opprettHenvendelse.success === false) {
- return opprettHenvendelse.placeholder;
- }
-
- const { oppgave, erSTOOppgave } = finnPlukketOppgaveForTraad(props.traad, tildelteOppgaverResource);
- const oppgaveId = oppgave ? oppgave.oppgaveId : opprettHenvendelse.henvendelse.oppgaveId;
-
- const handleAvbryt = () => {
- removeDraft();
- dispatch(setIngenValgtTraadDialogpanel());
- };
-
- const handleSubmit = (event: FormEvent) => {
- event.preventDefault();
- if (dialogStatus.type === DialogPanelStatus.POSTING) {
- return;
- }
- const callback = () => {
- removeDraft();
- tildelteOppgaverResource.refetch();
- queryClient.invalidateQueries(dialogResource.queryKey(fnr, valgtEnhet));
- };
-
- const erOppgaveTilknyttetAnsatt = state.oppgaveListe === OppgavelisteValg.MinListe;
- const commonPayload = {
- enhet: valgtEnhet,
- fritekst: state.tekst,
- traadId: props.traad.traadId,
- traadType: state.traadType,
- temagruppe: props.traad.temagruppe,
- behandlingsId: opprettHenvendelse.henvendelse.behandlingsId,
- oppgaveId: oppgaveId,
- avsluttet: state.avsluttet
- };
- if (FortsettDialogValidator.erGyldigSamtalereferat(state)) {
- setDialogStatus({ type: DialogPanelStatus.POSTING });
- const request: SendMeldingRequest = {
- ...commonPayload,
- erOppgaveTilknyttetAnsatt: true
- };
- const kvitteringsData: KvitteringsData = {
- fritekst: request.fritekst,
- traad: props.traad
- };
- post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Svar')
- .then(() => {
- callback();
- setDialogStatus({ type: DialogPanelStatus.SVAR_SENDT, kvitteringsData: kvitteringsData });
- })
- .catch(() => {
- setDialogStatus({ type: DialogPanelStatus.ERROR });
- });
- } else if (FortsettDialogValidator.erGyldigSamtale(state)) {
- const tradErJournalfort = erJournalfort(props.traad);
- const erOksos = props.traad.meldinger[0].temagruppe === Temagruppe.ØkonomiskSosial;
- if (!state.sak && !tradErJournalfort && !erOksos) {
- const error = Error(
- 'For å opprette spørsmål må meldingen være journalført, sak må være valgt, eller være på temagruppen OKSOS'
- );
- console.error(error);
- loggError(error);
- updateState({ errors: [error], visFeilmeldinger: true });
- return;
- }
- setDialogStatus({ type: DialogPanelStatus.POSTING });
- const request: SendMeldingRequest = {
- ...commonPayload,
- erOppgaveTilknyttetAnsatt: state.avsluttet ? false : erOppgaveTilknyttetAnsatt,
- sak: state.sak ? state.sak : undefined
- };
- const kvitteringsData: KvitteringsData = {
- fritekst: request.fritekst,
- traad: props.traad
- };
- post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Svar-Med-Spørsmål')
- .then(() => {
- callback();
- queryClient.invalidateQueries(journalsakResource.queryKey(fnr));
- setDialogStatus({ type: DialogPanelStatus.SVAR_SENDT, kvitteringsData: kvitteringsData });
- })
- .catch(() => {
- setDialogStatus({ type: DialogPanelStatus.ERROR });
- });
- } else {
- const error = Error('Det skjedde en feil ved sending av melding');
- updateState({ errors: [error], visFeilmeldinger: true });
- }
- };
-
- function traadTittel(traadType?: TraadType) {
- switch (traadType) {
- case TraadType.CHAT:
- return 'Fortsett chat';
- case TraadType.MELDINGSKJEDE:
- return 'Fortsett samtale';
- case TraadType.SAMTALEREFERAT:
- return 'Påfølgende referat';
- default:
- return '';
- }
- }
-
- return (
-
-
- {traadTittel(props.traad.traadType)}
-
-
-
- );
-}
-
-export default NyFortsettDialogContainer;
diff --git a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogKvittering.tsx b/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogKvittering.tsx
deleted file mode 100644
index 3de49e0ca..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogKvittering.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as React from 'react';
-import { DialogpanelKvittering } from '../nyFellesStyling';
-import { useDispatch } from 'react-redux';
-import { setIngenValgtTraadDialogpanel } from '../../../../redux/oppgave/actions';
-import { KvitteringsData } from './NyFortsettDialogTypes';
-import { SendNyMeldingStatus } from '../sendMelding/SendNyMeldingTypes';
-
-export function SvarSendtKvittering(props: { kvitteringsData: KvitteringsData }) {
- const dispatch = useDispatch();
-
- return (
- {
- dispatch(setIngenValgtTraadDialogpanel());
- }}
- meldingstatus={SendNyMeldingStatus.SVAR_SENDT}
- />
- );
-}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogTypes.ts b/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogTypes.ts
deleted file mode 100644
index ac965ee84..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/NyFortsettDialogTypes.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { Traad, TraadType } from '../../../../models/meldinger/meldinger';
-import { OppgavelisteValg } from '../sendMelding/SendNyMelding';
-import { JournalforingsSak } from '../../infotabs/meldinger/traadvisning/verktoylinje/journalforing/JournalforingPanel';
-import { Temagruppe } from '../../../../models/temagrupper';
-
-export enum DialogPanelStatus {
- UNDER_ARBEID,
- POSTING,
- ERROR,
- SVAR_SENDT
-}
-
-export type KvitteringsData = {
- fritekst: string;
- temagruppe?: Temagruppe;
- traad: Traad;
-};
-
-interface DialogStatusInterface {
- type: DialogPanelStatus;
-}
-
-interface UnderArbeid extends DialogStatusInterface {
- type: DialogPanelStatus.UNDER_ARBEID | DialogPanelStatus.POSTING | DialogPanelStatus.ERROR;
-}
-
-interface SvarSendtSuccess extends DialogStatusInterface {
- type: DialogPanelStatus.SVAR_SENDT;
- kvitteringsData: KvitteringsData;
-}
-
-export type FortsettDialogPanelState = UnderArbeid | SvarSendtSuccess;
-
-export interface FortsettDialogState {
- tekst: string;
- traadType: TraadType;
- temagruppe?: Temagruppe;
- oppgaveListe: OppgavelisteValg;
- sak?: JournalforingsSak;
- visFeilmeldinger: boolean;
- errors?: Error[];
- avsluttet?: boolean;
-}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/VelgDialogType.tsx b/src/app/personside/dialogpanel/fortsettDialog/VelgDialogType.tsx
deleted file mode 100644
index 50e2726b6..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/VelgDialogType.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import * as React from 'react';
-import { Meldingstype } from '../../../../models/meldinger/meldinger';
-import { FortsettDialogType } from './FortsettDialogContainer';
-import { Radio } from 'nav-frontend-skjema';
-import { VelgDialogtypeStyle } from '../fellesStyling';
-import { FortsettDialogState } from './FortsettDialogTypes';
-import { useJustOnceEffect } from '../../../../utils/customHooks';
-
-interface Props {
- formState: FortsettDialogState;
- updateDialogType: (dialogType: FortsettDialogType) => void;
- erTilknyttetOppgave: boolean;
- erSTOOppgave: boolean;
- erOksosTraad: boolean;
- erSamtalereferat: boolean;
-}
-
-function lagRadio(label: string, type: FortsettDialogType, props: Props): React.ReactNode {
- return (
- props.updateDialogType(type)}
- checked={props.formState.dialogType === type}
- />
- );
-}
-
-function VelgDialogType(props: Props) {
- useJustOnceEffect(
- (done) => {
- const type = props.erSamtalereferat ? Meldingstype.SAMTALEREFERAT_TELEFON : Meldingstype.SVAR_SKRIFTLIG;
- props.updateDialogType(type);
- done();
- },
- [props.erSamtalereferat]
- );
-
- if (props.erSamtalereferat) {
- return (
-
- {lagRadio('Referat telefon', Meldingstype.SAMTALEREFERAT_TELEFON, props)}
- {lagRadio('Referat oppmøte', Meldingstype.SAMTALEREFERAT_OPPMOTE, props)}
-
- );
- } else {
- return (
-
- {lagRadio('Svar', Meldingstype.SVAR_SKRIFTLIG, props)}
- {lagRadio('Spørsmål', Meldingstype.SPORSMAL_MODIA_UTGAAENDE, props)}
-
- );
- }
-}
-
-export default VelgDialogType;
diff --git a/src/app/personside/dialogpanel/fortsettDialog/nyValidatorer.ts b/src/app/personside/dialogpanel/fortsettDialog/nyValidatorer.ts
deleted file mode 100644
index 75e9860a8..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/nyValidatorer.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { tekstMaksLengde } from '../sendMelding/SendNyMelding';
-import { TraadType } from '../../../../models/meldinger/meldinger';
-import { FortsettDialogState } from './NyFortsettDialogTypes';
-
-export class FortsettDialogValidator {
- public static tekst(state: FortsettDialogState) {
- return state.tekst.length <= tekstMaksLengde && state.tekst.length > 0;
- }
- public static sak(state: FortsettDialogState) {
- return state.sak !== undefined;
- }
- public static tema(state: FortsettDialogState) {
- return state.temagruppe !== undefined;
- }
- public static erGyldigSamtale(state: FortsettDialogState) {
- return state.traadType !== TraadType.SAMTALEREFERAT && this.tekst(state);
- }
- public static erGyldigSamtalereferat(state: FortsettDialogState) {
- return state.traadType === TraadType.SAMTALEREFERAT && this.tekst(state);
- }
-}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/EnkeltMelding.tsx b/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/EnkeltMelding.tsx
index 84807498a..1e73ddb8c 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/EnkeltMelding.tsx
+++ b/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/EnkeltMelding.tsx
@@ -4,9 +4,9 @@ import styled from 'styled-components/macro';
import Tekstomrade, { defaultRules } from 'nav-frontend-tekstomrade';
import { rule as sladdRule } from '../../../../../utils/sladdrule';
import { Element, Undertekst } from 'nav-frontend-typografi';
-import { Melding } from '../../../../../models/meldinger/meldinger';
+import { Melding, Traad } from '../../../../../models/meldinger/meldinger';
import { formatterDatoTidMedMaanedsnavn } from '../../../../../utils/date-utils';
-import { meldingstittel } from '../../../infotabs/meldinger/utils/meldingerUtils';
+import { traadstittel } from '../../../infotabs/meldinger/utils/meldingerUtils';
import theme from '../../../../../styles/personOversiktTheme';
import { Avsender } from '../../../infotabs/meldinger/traadvisning/Enkeltmelding';
import { EkspanderbartpanelBase } from 'nav-frontend-ekspanderbartpanel';
@@ -30,6 +30,7 @@ const StyledEkspanderbartpanelBase = styled(EkspanderbartpanelBase)`
`;
interface Props {
+ traad: Traad;
melding: Melding;
erEnkeltstaende: boolean;
defaultApen: boolean;
@@ -43,7 +44,7 @@ function EnkeltMelding(props: Props) {
Melding {props.meldingsNummer}
{apen ? 'Åpen' : 'Lukket'}
- {meldingstittel(props.melding)}
+ {traadstittel(props.traad)}
{formatterDatoTidMedMaanedsnavn(props.melding.opprettetDato)}
diff --git a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/NyEnkeltMelding.tsx b/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/NyEnkeltMelding.tsx
deleted file mode 100644
index 1bef44f74..000000000
--- a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/NyEnkeltMelding.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import * as React from 'react';
-import { useState } from 'react';
-import styled from 'styled-components/macro';
-import Tekstomrade, { defaultRules } from 'nav-frontend-tekstomrade';
-import { rule as sladdRule } from '../../../../../utils/sladdrule';
-import { Element, Undertekst } from 'nav-frontend-typografi';
-import { Melding, Traad } from '../../../../../models/meldinger/meldinger';
-import { formatterDatoTidMedMaanedsnavn } from '../../../../../utils/date-utils';
-import { traadstittel } from '../../../infotabs/meldinger/utils/meldingerUtils';
-import theme from '../../../../../styles/personOversiktTheme';
-import { Avsender } from '../../../infotabs/meldinger/traadvisning/Enkeltmelding';
-import { EkspanderbartpanelBase } from 'nav-frontend-ekspanderbartpanel';
-
-const HeaderStyle = styled.div`
- width: 100%;
- padding-right: 1rem;
-`;
-
-const StyledTekstomrade = styled(Tekstomrade)`
- padding: 1.5rem 1rem 1rem;
- overflow-wrap: break-word;
- padding-top: 0;
-`;
-
-const StyledEkspanderbartpanelBase = styled(EkspanderbartpanelBase)`
- ${theme.resetEkspanderbartPanelStyling};
- .ekspanderbartPanel__hode:focus {
- ${theme.focusInset};
- }
-`;
-
-interface Props {
- traad: Traad;
- melding: Melding;
- erEnkeltstaende: boolean;
- defaultApen: boolean;
- meldingsNummer: number;
-}
-
-function NyEnkeltMelding(props: Props) {
- const [apen, setApen] = useState(props.defaultApen);
-
- const header = (
-
- Melding {props.meldingsNummer}
- {apen ? 'Åpen' : 'Lukket'}
- {traadstittel(props.traad)}
- {formatterDatoTidMedMaanedsnavn(props.melding.opprettetDato)}
-
-
- );
-
- return (
- setApen(!apen)} border={false}>
- {props.melding.fritekst}
-
- );
-}
-
-export default NyEnkeltMelding;
diff --git a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/TidligereMeldinger.tsx b/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/TidligereMeldinger.tsx
index 2a1d050ce..9705ad3f8 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/TidligereMeldinger.tsx
+++ b/src/app/personside/dialogpanel/fortsettDialog/tidligereMeldinger/TidligereMeldinger.tsx
@@ -7,10 +7,6 @@ import ErrorBoundary from '../../../../../components/ErrorBoundary';
import Ekspanderbartpanel from 'nav-frontend-ekspanderbartpanel';
import { Undertittel } from 'nav-frontend-typografi';
import Panel from 'nav-frontend-paneler';
-import IfFeatureToggleOn from '../../../../../components/featureToggle/IfFeatureToggleOn';
-import IfFeatureToggleOff from '../../../../../components/featureToggle/IfFeatureToggleOff';
-import { FeatureToggles } from '../../../../../components/featureToggle/toggleIDs';
-import NyEnkeltMelding from './NyEnkeltMelding';
interface Props {
traad: Traad;
@@ -52,23 +48,13 @@ function Traadpanel(props: { traad: Traad; tittel: string; defaultApen: boolean
return (
-
-
-
-
-
-
+
);
});
diff --git a/src/app/personside/dialogpanel/fortsettDialog/validatorer.ts b/src/app/personside/dialogpanel/fortsettDialog/validatorer.ts
index 4e1737516..ccde30c68 100644
--- a/src/app/personside/dialogpanel/fortsettDialog/validatorer.ts
+++ b/src/app/personside/dialogpanel/fortsettDialog/validatorer.ts
@@ -1,8 +1,6 @@
import { tekstMaksLengde } from '../sendMelding/SendNyMelding';
-import { Meldingstype, Traad } from '../../../../models/meldinger/meldinger';
-import { erJournalfort } from '../../infotabs/meldinger/utils/meldingerUtils';
+import { TraadType } from '../../../../models/meldinger/meldinger';
import { FortsettDialogState } from './FortsettDialogTypes';
-import { Temagruppe } from '../../../../models/temagrupper';
export class FortsettDialogValidator {
public static tekst(state: FortsettDialogState) {
@@ -14,25 +12,10 @@ export class FortsettDialogValidator {
public static tema(state: FortsettDialogState) {
return state.temagruppe !== undefined;
}
- public static erGyldigSvarSkriftlig(state: FortsettDialogState) {
- return state.dialogType === Meldingstype.SVAR_SKRIFTLIG && this.tekst(state);
+ public static erGyldigSamtale(state: FortsettDialogState) {
+ return state.traadType !== TraadType.SAMTALEREFERAT && this.tekst(state);
}
- public static erGyldigSporsmaalSkriftlig(state: FortsettDialogState, traad: Traad) {
- const traadTemagruppe = traad.meldinger[0].temagruppe;
- if (traadTemagruppe === Temagruppe.ØkonomiskSosial) {
- return state.dialogType === Meldingstype.SPORSMAL_MODIA_UTGAAENDE && this.tekst(state);
- }
- return (
- state.dialogType === Meldingstype.SPORSMAL_MODIA_UTGAAENDE &&
- this.tekst(state) &&
- (this.sak(state) || erJournalfort(traad))
- );
- }
-
public static erGyldigSamtalereferat(state: FortsettDialogState) {
- return (
- [Meldingstype.SAMTALEREFERAT_TELEFON, Meldingstype.SAMTALEREFERAT_OPPMOTE].includes(state.dialogType) &&
- this.tekst(state)
- );
+ return state.traadType === TraadType.SAMTALEREFERAT && this.tekst(state);
}
}
diff --git a/src/app/personside/dialogpanel/sendMelding/NySendNyMelding.tsx b/src/app/personside/dialogpanel/sendMelding/NySendNyMelding.tsx
deleted file mode 100644
index b3bbfa657..000000000
--- a/src/app/personside/dialogpanel/sendMelding/NySendNyMelding.tsx
+++ /dev/null
@@ -1,192 +0,0 @@
-import * as React from 'react';
-import { FormEvent, useRef } from 'react';
-import { TraadType } from '../../../../models/meldinger/meldinger';
-import { UnmountClosed } from 'react-collapse';
-import KnappBase from 'nav-frontend-knapper';
-import styled from 'styled-components/macro';
-import Temavelger from '../component/Temavelger';
-import KnappMedBekreftPopup from '../../../../components/KnappMedBekreftPopup';
-import { JournalforingsSak } from '../../infotabs/meldinger/traadvisning/verktoylinje/journalforing/JournalforingPanel';
-import DialogpanelVelgSak from './DialogpanelVelgSak';
-import { capitalizeName } from '../../../../utils/string-utils';
-import AlertStripeInfo from 'nav-frontend-alertstriper/lib/info-alertstripe';
-import { NyMeldingValidator } from './nyValidatorer';
-import TekstFelt from './TekstFelt';
-import { Undertittel } from 'nav-frontend-typografi';
-import Oppgaveliste from './Oppgaveliste';
-import { DialogpanelFeilmelding, FormStyle } from '../fellesStyling';
-import theme from '../../../../styles/personOversiktTheme';
-import { SendNyMeldingPanelState, SendNyMeldingStatus } from './SendNyMeldingTypes';
-import { Temagruppe, TemaSamtalereferat } from '../../../../models/temagrupper';
-import { guid } from 'nav-frontend-js-utils';
-import ReflowBoundry from '../ReflowBoundry';
-import { Checkbox, SkjemaelementFeilmelding } from 'nav-frontend-skjema';
-import persondataResource from '../../../../rest/resources/persondataResource';
-import NyVelgDialogType from './NyVelgDialogType';
-import Panel from 'nav-frontend-paneler';
-
-export enum OppgavelisteValg {
- MinListe = 'MinListe',
- EnhetensListe = 'Enhetensliste'
-}
-
-export interface NySendNyMeldingState {
- tekst: string;
- traadType: TraadType;
- tema?: Temagruppe;
- sak?: JournalforingsSak;
- oppgaveListe: OppgavelisteValg;
- visFeilmeldinger: boolean;
- avsluttet: boolean;
-}
-
-const StyledArticle = styled.article`
- padding: 1rem ${theme.margin.layout};
-`;
-
-const KnappWrapper = styled.div`
- display: flex;
- flex-direction: column;
- > * {
- margin-bottom: 0.7rem;
- }
-`;
-
-const StyledAlertStripeInfo = styled(AlertStripeInfo)`
- margin-top: 1rem;
-`;
-
-const StyledCheckbox = styled(Checkbox)`
- margin-top: 1rem;
-`;
-
-const StyledUndertittel = styled(Undertittel)`
- margin-bottom: 1rem !important;
-`;
-
-export const tekstMaksLengde = 10000;
-
-interface Props {
- handleSubmit: (event: FormEvent) => void;
- handleAvbryt: () => void;
- state: NySendNyMeldingState;
- updateState: (change: Partial) => void;
- formErEndret: boolean;
- sendNyMeldingPanelState: SendNyMeldingPanelState;
-}
-
-function Feilmelding(props: { sendNyMeldingPanelState: SendNyMeldingStatus }) {
- if (props.sendNyMeldingPanelState === SendNyMeldingStatus.ERROR) {
- return ;
- }
- return null;
-}
-
-function NySendNyMelding(props: Props) {
- const updateState = props.updateState;
- const state = props.state;
- const personResponse = persondataResource.useFetch();
- const tittelId = useRef(guid());
-
- const navn = personResponse.data
- ? capitalizeName(personResponse.data.person.navn.firstOrNull()?.fornavn || '')
- : 'bruker';
-
- const erReferat = NyMeldingValidator.erReferat(state);
- const erSamtale = NyMeldingValidator.erSamtale(state);
- const visFeilmelding = !NyMeldingValidator.sak(state) && state.visFeilmeldinger;
- return (
-
-
- Send ny melding
-
- updateState({ tekst })}
- feilmelding={
- !NyMeldingValidator.tekst(state) && state.visFeilmeldinger
- ? `Du må skrive en tekst på mellom 1 og ${tekstMaksLengde} tegn`
- : undefined
- }
- />
- updateState({ traadType, avsluttet })}
- />
-
-
- {/* hasNestedCollapse={true} for å unngå rar animasjon på feilmelding*/}
- updateState({ tema: tema })}
- valgtTema={state.tema}
- visFeilmelding={!NyMeldingValidator.tema(state) && state.visFeilmeldinger}
- temavalg={TemaSamtalereferat}
- />
- Gir ikke varsel til bruker
-
-
-
- updateState({ sak })}
- valgtSak={state.sak}
- eksisterendeSaker={[]}
- />
- {visFeilmelding ? (
- Du må velge sak
- ) : undefined}
- {!state.avsluttet && (
- <>
-
- updateState({ oppgaveListe: oppgaveliste })
- }
- />
- Gir varsel, bruker må svare
- >
- )}
- {state.avsluttet && (
-
- Bruker kan ikke skrive mer i denne samtalen
-
- )}
- {!state.avsluttet && (
- updateState({ avsluttet: !state.avsluttet })}
- />
- )}
-
-
-
-
-
-
- Del med {navn}
-
- {props.formErEndret && (
-
- Avbryt
-
- )}
-
-
-
-
- );
-}
-
-export default NySendNyMelding;
diff --git a/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingContainer.tsx b/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingContainer.tsx
deleted file mode 100644
index f043ea92c..000000000
--- a/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingContainer.tsx
+++ /dev/null
@@ -1,185 +0,0 @@
-import * as React from 'react';
-import { FormEvent, useCallback, useMemo, useState } from 'react';
-import { OppgavelisteValg, SendNyMeldingState } from './SendNyMelding';
-import { NyMeldingValidator } from './nyValidatorer';
-import { SendMeldingRequest, SendReferatRequest, Traad, TraadType } from '../../../../models/meldinger/meldinger';
-import { useFodselsnummer } from '../../../../utils/customHooks';
-import { MeldingSendtFeilet, ReferatSendtKvittering, SamtaleSendtKvittering } from './NySendNyMeldingKvittering';
-import { apiBaseUri } from '../../../../api/config';
-import { post } from '../../../../api/api';
-import { KvitteringNyMelding, SendNyMeldingPanelState, SendNyMeldingStatus } from './SendNyMeldingTypes';
-import useDraft, { Draft } from '../use-draft';
-import { feilMeldinger } from './FeilMeldinger';
-import dialogResource from '../../../../rest/resources/dialogResource';
-import { useValgtenhet } from '../../../../context/valgtenhet-state';
-import { useQueryClient } from '@tanstack/react-query';
-import journalsakResource from '../../../../rest/resources/journalsakResource';
-import NySendNyMelding, { NySendNyMeldingState } from './NySendNyMelding';
-
-interface Props {
- defaultOppgaveDestinasjon: OppgavelisteValg;
-}
-
-function NySendNyMeldingContainer(props: Props) {
- const queryClient = useQueryClient();
- const initialState: NySendNyMeldingState = useMemo(
- () => ({
- tekst: '',
- traadType: TraadType.SAMTALEREFERAT,
- tema: undefined,
- sak: undefined,
- avsluttet: false,
- oppgaveListe: props.defaultOppgaveDestinasjon,
- visFeilmeldinger: false
- }),
- [props.defaultOppgaveDestinasjon]
- );
- const fnr = useFodselsnummer();
-
- const valgtEnhet = useValgtenhet().enhetId;
- const [state, setState] = useState(initialState);
- const draftLoader = useCallback(
- (draft: Draft) => setState((current) => ({ ...current, tekst: draft.content })),
- [setState]
- );
- const draftContext = useMemo(() => ({ fnr }), [fnr]);
- const { update: updateDraft, remove: removeDraft } = useDraft(draftContext, draftLoader);
- const updateState = useCallback(
- (change: Partial) =>
- setState((currentState) => {
- if (change.tekst !== undefined) {
- updateDraft(change.tekst);
- }
- return { ...currentState, visFeilmeldinger: false, ...change };
- }),
- [setState, updateDraft]
- );
-
- const [sendNyMeldingStatus, setSendNyMeldingStatus] = useState({
- type: SendNyMeldingStatus.UNDER_ARBEID
- });
- const lukkSendtKvittering = () => {
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.UNDER_ARBEID });
- setState(initialState);
- };
-
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.REFERAT_SENDT) {
- return (
-
- );
- }
-
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.SAMTALE_SENDT) {
- return (
-
- );
- }
-
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.ERROR) {
- return ;
- }
-
- const handleAvbryt = () => {
- removeDraft();
- setState(initialState);
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.UNDER_ARBEID });
- };
-
- const handleFeilMelding = (error: Error) => {
- const feilType = JSON.parse(error.toString()).type;
- return feilMeldinger[feilType];
- };
-
- const handleSubmit = (event: FormEvent) => {
- event.preventDefault();
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.POSTING) {
- return;
- }
- const callback = () => {
- removeDraft();
- updateState(initialState);
- queryClient.invalidateQueries(dialogResource.queryKey(fnr, valgtEnhet));
- };
-
- const commonPayload = {
- traadType: state.traadType,
- enhet: valgtEnhet,
- fritekst: state.tekst
- };
-
- if (NyMeldingValidator.erGyldigReferat(state) && state.tema) {
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.POSTING });
- const request: SendMeldingRequest = {
- ...commonPayload,
- temagruppe: state.tema
- };
-
- post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Referat')
- .then((traad) => {
- const kvitteringNyMelding: KvitteringNyMelding = {
- fritekst: request.fritekst,
- traad: traad
- };
- callback();
- setSendNyMeldingStatus({
- type: SendNyMeldingStatus.REFERAT_SENDT,
- request: {} as SendReferatRequest,
- kvitteringNyMelding
- });
- })
- .catch((error) => {
- console.error('Send-Referat feilet', error);
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.ERROR, fritekst: request.fritekst });
- });
- } else if (NyMeldingValidator.erGyldigSamtale(state) && state.sak) {
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.POSTING });
- const request: SendMeldingRequest = {
- ...commonPayload,
- sak: state.sak,
- avsluttet: state.avsluttet,
- erOppgaveTilknyttetAnsatt: state.oppgaveListe === OppgavelisteValg.MinListe
- };
-
- post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Sporsmal')
- .then((traad) => {
- const kvitteringNyMelding: KvitteringNyMelding = {
- fritekst: request.fritekst,
- traad: traad
- };
- queryClient.invalidateQueries(journalsakResource.queryKey(fnr));
- callback();
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.SAMTALE_SENDT, kvitteringNyMelding });
- })
- .catch((error) => {
- callback();
- console.error('Send-Sporsmal feilet', error);
- setSendNyMeldingStatus({
- type: SendNyMeldingStatus.ERROR,
- fritekst: handleFeilMelding(error)
- });
- updateState({ visFeilmeldinger: true });
- });
- } else {
- updateState({ visFeilmeldinger: true });
- }
- };
-
- return (
-
- );
-}
-
-export default NySendNyMeldingContainer;
diff --git a/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingKvittering.tsx b/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingKvittering.tsx
deleted file mode 100644
index 9bcb0007b..000000000
--- a/src/app/personside/dialogpanel/sendMelding/NySendNyMeldingKvittering.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as React from 'react';
-import { DialogpanelKvittering } from '../nyFellesStyling';
-import { KvitteringNyMelding, SendNyMeldingStatus } from './SendNyMeldingTypes';
-
-export function ReferatSendtKvittering(props: { kvitteringNyMelding: KvitteringNyMelding; lukk: () => void }) {
- return (
-
- );
-}
-
-export function SamtaleSendtKvittering(props: { kvitteringNyMelding: KvitteringNyMelding; lukk: () => void }) {
- return (
-
- );
-}
-
-export function MeldingSendtFeilet(props: { fritekst: string; lukk: () => void }) {
- return (
-
- );
-}
diff --git a/src/app/personside/dialogpanel/sendMelding/NyVelgDialogType.tsx b/src/app/personside/dialogpanel/sendMelding/NyVelgDialogType.tsx
deleted file mode 100644
index d8ae84fe8..000000000
--- a/src/app/personside/dialogpanel/sendMelding/NyVelgDialogType.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import * as React from 'react';
-import { TraadType } from '../../../../models/meldinger/meldinger';
-import { Radio } from 'nav-frontend-skjema';
-import { VelgDialogtypeStyle } from '../fellesStyling';
-import { NySendNyMeldingState } from './NySendNyMelding';
-
-interface Props {
- formState: NySendNyMeldingState;
- updateTraadType: (traadType: TraadType, avsluttet: boolean) => void;
-}
-
-function NyVelgDialogType(props: Props) {
- return (
-
- props.updateTraadType(TraadType.SAMTALEREFERAT, false)}
- checked={props.formState.traadType === TraadType.SAMTALEREFERAT}
- name="dialogtype"
- />
- props.updateTraadType(TraadType.MELDINGSKJEDE, false)}
- checked={props.formState.traadType !== TraadType.SAMTALEREFERAT && !props.formState.avsluttet}
- name="dialogtype"
- />
- props.updateTraadType(TraadType.MELDINGSKJEDE, true)}
- checked={props.formState.traadType !== TraadType.SAMTALEREFERAT && props.formState.avsluttet}
- name="dialogtype"
- />
-
- );
-}
-
-export default NyVelgDialogType;
diff --git a/src/app/personside/dialogpanel/sendMelding/SendNyMelding.tsx b/src/app/personside/dialogpanel/sendMelding/SendNyMelding.tsx
index babed39e2..fc5be67b7 100644
--- a/src/app/personside/dialogpanel/sendMelding/SendNyMelding.tsx
+++ b/src/app/personside/dialogpanel/sendMelding/SendNyMelding.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import { FormEvent, useRef } from 'react';
-import { Meldingstype } from '../../../../models/meldinger/meldinger';
+import { TraadType } from '../../../../models/meldinger/meldinger';
import { UnmountClosed } from 'react-collapse';
import KnappBase from 'nav-frontend-knapper';
import styled from 'styled-components/macro';
@@ -10,9 +10,8 @@ import { JournalforingsSak } from '../../infotabs/meldinger/traadvisning/verktoy
import DialogpanelVelgSak from './DialogpanelVelgSak';
import { capitalizeName } from '../../../../utils/string-utils';
import AlertStripeInfo from 'nav-frontend-alertstriper/lib/info-alertstripe';
-import { NyMeldingValidator } from './validatorer';
+import { MeldingValidator } from './validatorer';
import TekstFelt from './TekstFelt';
-import VelgDialogType from './VelgDialogType';
import { Undertittel } from 'nav-frontend-typografi';
import Oppgaveliste from './Oppgaveliste';
import { DialogpanelFeilmelding, FormStyle } from '../fellesStyling';
@@ -21,27 +20,24 @@ import { SendNyMeldingPanelState, SendNyMeldingStatus } from './SendNyMeldingTyp
import { Temagruppe, TemaSamtalereferat } from '../../../../models/temagrupper';
import { guid } from 'nav-frontend-js-utils';
import ReflowBoundry from '../ReflowBoundry';
-import { SkjemaelementFeilmelding } from 'nav-frontend-skjema';
+import { Checkbox, SkjemaelementFeilmelding } from 'nav-frontend-skjema';
import persondataResource from '../../../../rest/resources/persondataResource';
+import VelgDialogType from './VelgDialogType';
+import Panel from 'nav-frontend-paneler';
export enum OppgavelisteValg {
MinListe = 'MinListe',
EnhetensListe = 'Enhetensliste'
}
-export type SendNyMeldingDialogType =
- | Meldingstype.SAMTALEREFERAT_TELEFON
- | Meldingstype.SAMTALEREFERAT_OPPMOTE
- | Meldingstype.SPORSMAL_MODIA_UTGAAENDE
- | Meldingstype.INFOMELDING_MODIA_UTGAAENDE;
-
export interface SendNyMeldingState {
tekst: string;
- dialogType: SendNyMeldingDialogType;
+ traadType: TraadType;
tema?: Temagruppe;
sak?: JournalforingsSak;
oppgaveListe: OppgavelisteValg;
visFeilmeldinger: boolean;
+ avsluttet: boolean;
}
const StyledArticle = styled.article`
@@ -60,8 +56,8 @@ const StyledAlertStripeInfo = styled(AlertStripeInfo)`
margin-top: 1rem;
`;
-const Margin = styled.div`
- /* Pga React Collapse må vi slenge på noen div'er som tar seg av marginer for å unngå hopp i animasjon */
+const StyledCheckbox = styled(Checkbox)`
+ margin-top: 1rem;
`;
const StyledUndertittel = styled(Undertittel)`
@@ -85,6 +81,7 @@ function Feilmelding(props: { sendNyMeldingPanelState: SendNyMeldingStatus }) {
}
return null;
}
+
function SendNyMelding(props: Props) {
const updateState = props.updateState;
const state = props.state;
@@ -95,10 +92,9 @@ function SendNyMelding(props: Props) {
? capitalizeName(personResponse.data.person.navn.firstOrNull()?.fornavn || '')
: 'bruker';
- const erReferat = NyMeldingValidator.erReferat(state);
- const erSporsmaal = NyMeldingValidator.erSporsmal(state);
- const erInfomelding = NyMeldingValidator.erInfomelding(state);
- const visFeilmelding = !NyMeldingValidator.sak(state) && state.visFeilmeldinger;
+ const erReferat = MeldingValidator.erReferat(state);
+ const erSamtale = MeldingValidator.erSamtale(state);
+ const visFeilmelding = !MeldingValidator.sak(state) && state.visFeilmeldinger;
return (
@@ -110,45 +106,62 @@ function SendNyMelding(props: Props) {
tekstMaksLengde={tekstMaksLengde}
updateTekst={(tekst) => updateState({ tekst })}
feilmelding={
- !NyMeldingValidator.tekst(state) && state.visFeilmeldinger
+ !MeldingValidator.tekst(state) && state.visFeilmeldinger
? `Du må skrive en tekst på mellom 1 og ${tekstMaksLengde} tegn`
: undefined
}
/>
- updateState({ dialogType })} />
-
+ updateState({ traadType, avsluttet })}
+ />
+
{/* hasNestedCollapse={true} for å unngå rar animasjon på feilmelding*/}
updateState({ tema: tema })}
valgtTema={state.tema}
- visFeilmelding={!NyMeldingValidator.tema(state) && state.visFeilmeldinger}
+ visFeilmelding={!MeldingValidator.tema(state) && state.visFeilmeldinger}
temavalg={TemaSamtalereferat}
/>
Gir ikke varsel til bruker
-
- updateState({ sak })}
- valgtSak={state.sak}
- eksisterendeSaker={[]}
- />
- {visFeilmelding ? (
- Du må velge sak
- ) : undefined}
- {erSporsmaal ? (
- <>
- updateState({ oppgaveListe: oppgaveliste })}
+
+
+ updateState({ sak })}
+ valgtSak={state.sak}
+ eksisterendeSaker={[]}
+ />
+ {visFeilmelding ? (
+ Du må velge sak
+ ) : undefined}
+ {!state.avsluttet && (
+ <>
+
+ updateState({ oppgaveListe: oppgaveliste })
+ }
+ />
+ Gir varsel, bruker må svare
+ >
+ )}
+ {state.avsluttet && (
+
+ Bruker kan ikke skrive mer i denne samtalen
+
+ )}
+ {!state.avsluttet && (
+ updateState({ avsluttet: !state.avsluttet })}
/>
- Gir varsel, bruker må svare
- >
- ) : (
- Gir varsel, bruker kan ikke svare
- )}
+ )}
+
-
+
({
tekst: '',
- dialogType: Meldingstype.SAMTALEREFERAT_TELEFON,
+ traadType: TraadType.SAMTALEREFERAT,
tema: undefined,
sak: undefined,
+ avsluttet: false,
oppgaveListe: props.defaultOppgaveDestinasjon,
visFeilmeldinger: false
}),
@@ -76,23 +66,14 @@ function SendNyMeldingContainer(props: Props) {
return (
);
}
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.SPORSMAL_SENDT) {
+ if (sendNyMeldingStatus.type === SendNyMeldingStatus.SAMTALE_SENDT) {
return (
-
- );
- }
- if (sendNyMeldingStatus.type === SendNyMeldingStatus.INFORMELDING_SENDT) {
- return (
-
@@ -125,41 +106,46 @@ function SendNyMeldingContainer(props: Props) {
queryClient.invalidateQueries(dialogResource.queryKey(fnr, valgtEnhet));
};
- if (
- NyMeldingValidator.erGyldigReferat(state) &&
- state.tema &&
- state.dialogType !== Meldingstype.SPORSMAL_MODIA_UTGAAENDE &&
- state.dialogType !== Meldingstype.INFOMELDING_MODIA_UTGAAENDE
- ) {
+ const commonPayload = {
+ traadType: state.traadType,
+ enhet: valgtEnhet,
+ fritekst: state.tekst
+ };
+
+ if (MeldingValidator.erGyldigReferat(state) && state.tema) {
setSendNyMeldingStatus({ type: SendNyMeldingStatus.POSTING });
- const request: SendReferatRequest = {
- enhet: valgtEnhet,
- fritekst: state.tekst,
- meldingstype: state.dialogType,
+ const request: SendMeldingRequest = {
+ ...commonPayload,
temagruppe: state.tema
};
- post(`${apiBaseUri}/dialog/${fnr}/sendreferat`, request, 'Send-Referat')
+
+ post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Referat')
.then((traad) => {
const kvitteringNyMelding: KvitteringNyMelding = {
fritekst: request.fritekst,
traad: traad
};
callback();
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.REFERAT_SENDT, request, kvitteringNyMelding });
+ setSendNyMeldingStatus({
+ type: SendNyMeldingStatus.REFERAT_SENDT,
+ request: {} as SendReferatRequest,
+ kvitteringNyMelding
+ });
})
.catch((error) => {
console.error('Send-Referat feilet', error);
setSendNyMeldingStatus({ type: SendNyMeldingStatus.ERROR, fritekst: request.fritekst });
});
- } else if (NyMeldingValidator.erGyldigSpørsmal(state) && state.sak) {
+ } else if (MeldingValidator.erGyldigSamtale(state) && state.sak) {
setSendNyMeldingStatus({ type: SendNyMeldingStatus.POSTING });
- const request: SendSporsmalRequest = {
- enhet: valgtEnhet,
- fritekst: state.tekst,
+ const request: SendMeldingRequest = {
+ ...commonPayload,
sak: state.sak,
+ avsluttet: state.avsluttet,
erOppgaveTilknyttetAnsatt: state.oppgaveListe === OppgavelisteValg.MinListe
};
- post(`${apiBaseUri}/dialog/${fnr}/sendsporsmal`, request, 'Send-Sporsmal')
+
+ post(`${apiBaseUri}/dialog/${fnr}/sendmelding`, request, 'Send-Sporsmal')
.then((traad) => {
const kvitteringNyMelding: KvitteringNyMelding = {
fritekst: request.fritekst,
@@ -167,7 +153,7 @@ function SendNyMeldingContainer(props: Props) {
};
queryClient.invalidateQueries(journalsakResource.queryKey(fnr));
callback();
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.SPORSMAL_SENDT, kvitteringNyMelding });
+ setSendNyMeldingStatus({ type: SendNyMeldingStatus.SAMTALE_SENDT, kvitteringNyMelding });
})
.catch((error) => {
callback();
@@ -178,33 +164,6 @@ function SendNyMeldingContainer(props: Props) {
});
updateState({ visFeilmeldinger: true });
});
- } else if (NyMeldingValidator.erGyldigInfomelding(state) && state.sak) {
- setSendNyMeldingStatus({ type: SendNyMeldingStatus.POSTING });
- const request: SendInfomeldingRequest = {
- enhet: valgtEnhet,
- fritekst: state.tekst,
- sak: state.sak
- };
- post(`${apiBaseUri}/dialog/${fnr}/sendinfomelding`, request, 'Send-Infomelding')
- .then((traad) => {
- const kvitteringNyMelding: KvitteringNyMelding = {
- fritekst: request.fritekst,
- traad: traad
- };
- callback();
- setSendNyMeldingStatus({
- type: SendNyMeldingStatus.INFORMELDING_SENDT,
- kvitteringNyMelding
- });
- })
- .catch((error) => {
- callback();
- setSendNyMeldingStatus({
- type: SendNyMeldingStatus.ERROR,
- fritekst: handleFeilMelding(error)
- });
- updateState({ visFeilmeldinger: true });
- });
} else {
updateState({ visFeilmeldinger: true });
}
diff --git a/src/app/personside/dialogpanel/sendMelding/SendNyMeldingKvittering.tsx b/src/app/personside/dialogpanel/sendMelding/SendNyMeldingKvittering.tsx
index 5ebb45594..358b0bc4f 100644
--- a/src/app/personside/dialogpanel/sendMelding/SendNyMeldingKvittering.tsx
+++ b/src/app/personside/dialogpanel/sendMelding/SendNyMeldingKvittering.tsx
@@ -1,20 +1,12 @@
import * as React from 'react';
-import { Meldingstype, SendReferatRequest } from '../../../../models/meldinger/meldinger';
import { DialogpanelKvittering } from '../fellesStyling';
-import { meldingstypeTekst } from '../../infotabs/meldinger/utils/meldingstekster';
import { KvitteringNyMelding, SendNyMeldingStatus } from './SendNyMeldingTypes';
-export function ReferatSendtKvittering(props: {
- kvitteringNyMelding: KvitteringNyMelding;
- request: SendReferatRequest;
- lukk: () => void;
-}) {
- const tittel = `${meldingstypeTekst(props.request.meldingstype)} sendt til bruker`;
+export function ReferatSendtKvittering(props: { kvitteringNyMelding: KvitteringNyMelding; lukk: () => void }) {
return (
void }) {
+export function SamtaleSendtKvittering(props: { kvitteringNyMelding: KvitteringNyMelding; lukk: () => void }) {
return (
void }) {
- return (
-
- );
-}
-
export function MeldingSendtFeilet(props: { fritekst: string; lukk: () => void }) {
return (
diff --git a/src/app/personside/dialogpanel/sendMelding/VelgDialogType.tsx b/src/app/personside/dialogpanel/sendMelding/VelgDialogType.tsx
index 554e3eb65..d0e16d3cd 100644
--- a/src/app/personside/dialogpanel/sendMelding/VelgDialogType.tsx
+++ b/src/app/personside/dialogpanel/sendMelding/VelgDialogType.tsx
@@ -1,40 +1,34 @@
import * as React from 'react';
-import { SendNyMeldingDialogType, SendNyMeldingState } from './SendNyMelding';
-import { Meldingstype } from '../../../../models/meldinger/meldinger';
+import { TraadType } from '../../../../models/meldinger/meldinger';
import { Radio } from 'nav-frontend-skjema';
import { VelgDialogtypeStyle } from '../fellesStyling';
+import { SendNyMeldingState } from './SendNyMelding';
interface Props {
formState: SendNyMeldingState;
- updateDialogType: (dialogType: SendNyMeldingDialogType) => void;
+ updateTraadType: (traadType: TraadType, avsluttet: boolean) => void;
}
function VelgDialogType(props: Props) {
return (
props.updateDialogType(Meldingstype.SAMTALEREFERAT_TELEFON)}
- checked={props.formState.dialogType === Meldingstype.SAMTALEREFERAT_TELEFON}
+ label="Referat"
+ onChange={() => props.updateTraadType(TraadType.SAMTALEREFERAT, false)}
+ checked={props.formState.traadType === TraadType.SAMTALEREFERAT}
name="dialogtype"
/>
props.updateDialogType(Meldingstype.SAMTALEREFERAT_OPPMOTE)}
- checked={props.formState.dialogType === Meldingstype.SAMTALEREFERAT_OPPMOTE}
- name="dialogtype"
- />
- props.updateDialogType(Meldingstype.SPORSMAL_MODIA_UTGAAENDE)}
- checked={props.formState.dialogType === Meldingstype.SPORSMAL_MODIA_UTGAAENDE}
+ label="Samtale"
+ onChange={() => props.updateTraadType(TraadType.MELDINGSKJEDE, false)}
+ checked={props.formState.traadType !== TraadType.SAMTALEREFERAT && !props.formState.avsluttet}
name="dialogtype"
/>
props.updateTraadType(TraadType.MELDINGSKJEDE, true)}
+ checked={props.formState.traadType !== TraadType.SAMTALEREFERAT && props.formState.avsluttet}
name="dialogtype"
- onChange={() => props.updateDialogType(Meldingstype.INFOMELDING_MODIA_UTGAAENDE)}
- checked={props.formState.dialogType === Meldingstype.INFOMELDING_MODIA_UTGAAENDE}
/>
);
diff --git a/src/app/personside/dialogpanel/sendMelding/__snapshots__/SendNyMelding.test.tsx.snap b/src/app/personside/dialogpanel/sendMelding/__snapshots__/SendNyMelding.test.tsx.snap
index 573fe6cba..e061274ae 100644
--- a/src/app/personside/dialogpanel/sendMelding/__snapshots__/SendNyMelding.test.tsx.snap
+++ b/src/app/personside/dialogpanel/sendMelding/__snapshots__/SendNyMelding.test.tsx.snap
@@ -100,6 +100,21 @@ exports[`viser send ny melding 1`] = `
padding-left: 2.25rem;
}
+.c15 {
+ margin-top: 1rem;
+}
+
+.c15 label {
+ position: absolute !important;
+ height: 1px;
+ width: 1px;
+ overflow: hidden;
+ -webkit-clip: rect(1px 1px 1px 1px);
+ clip: rect(1px 1px 1px 1px);
+ -webkit-clip: rect(1px,1px,1px,1px);
+ clip: rect(1px,1px,1px,1px);
+}
+
.c4 {
display: -webkit-box;
display: -webkit-flex;
@@ -158,7 +173,7 @@ exports[`viser send ny melding 1`] = `
padding: 1rem .5rem;
}
-.c15 {
+.c17 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -168,7 +183,7 @@ exports[`viser send ny melding 1`] = `
flex-direction: column;
}
-.c15 > * {
+.c17 > * {
margin-bottom: 0.7rem;
}
@@ -176,6 +191,10 @@ exports[`viser send ny melding 1`] = `
margin-top: 1rem;
}
+.c16 {
+ margin-top: 1rem;
+}
+
.c3 {
margin-bottom: 1rem !important;
}
@@ -466,7 +485,7 @@ exports[`viser send ny melding 1`] = `
className="skjemaelement__label"
htmlFor="Helt tilfeldig ID"
>
- Referat telefon
+ Referat
- Referat oppmøte
-
-
-
-
-
- Spørsmål
+ Samtale
-
+
-
- Velg sak
-
-
+ Velg sak
+
+
+ Ingen valgt sak
+
+
+
- Ingen valgt sak
-
-
-
-
+ Oppgaveliste
+
+
+
+
+ Svar skal til min oppgaveliste hos
+ valgt enhet
+
+
+ Svar skal til
+ valgt enhet
+ sin oppgaveliste
+
+
+
+
+
- info
+
+ info
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+ Gir varsel, bruker må svare
+
+
- Gir varsel, bruker kan ikke svare
+
+
+ Avslutt samtale etter sending
+
0;
- }
- public static tema(state: NySendNyMeldingState) {
- return state.tema !== undefined;
- }
- public static sak(state: NySendNyMeldingState) {
- return state.sak !== undefined;
- }
- public static erReferat(state: NySendNyMeldingState) {
- return state.traadType === TraadType.SAMTALEREFERAT;
- }
- public static erSamtale(state: NySendNyMeldingState) {
- return state.traadType !== TraadType.SAMTALEREFERAT;
- }
- public static erGyldigReferat(state: NySendNyMeldingState) {
- return this.erReferat(state) && this.tema(state) && this.tekst(state);
- }
- public static erGyldigSamtale(state: NySendNyMeldingState) {
- return this.erSamtale(state) && this.sak(state) && this.tekst(state);
- }
-}
diff --git a/src/app/personside/dialogpanel/sendMelding/validatorer.ts b/src/app/personside/dialogpanel/sendMelding/validatorer.ts
index 889a591db..4562df217 100644
--- a/src/app/personside/dialogpanel/sendMelding/validatorer.ts
+++ b/src/app/personside/dialogpanel/sendMelding/validatorer.ts
@@ -1,7 +1,7 @@
import { SendNyMeldingState, tekstMaksLengde } from './SendNyMelding';
-import { Meldingstype } from '../../../../models/meldinger/meldinger';
+import { TraadType } from '../../../../models/meldinger/meldinger';
-export class NyMeldingValidator {
+export class MeldingValidator {
public static tekst(state: SendNyMeldingState) {
return state.tekst.length <= tekstMaksLengde && state.tekst.length > 0;
}
@@ -12,21 +12,15 @@ export class NyMeldingValidator {
return state.sak !== undefined;
}
public static erReferat(state: SendNyMeldingState) {
- return state.dialogType !== Meldingstype.SPORSMAL_MODIA_UTGAAENDE && !this.erInfomelding(state);
+ return state.traadType === TraadType.SAMTALEREFERAT;
}
- public static erSporsmal(state: SendNyMeldingState) {
- return !this.erReferat(state) && !this.erInfomelding(state);
+ public static erSamtale(state: SendNyMeldingState) {
+ return state.traadType !== TraadType.SAMTALEREFERAT;
}
public static erGyldigReferat(state: SendNyMeldingState) {
return this.erReferat(state) && this.tema(state) && this.tekst(state);
}
- public static erGyldigSpørsmal(state: SendNyMeldingState) {
- return this.erSporsmal(state) && this.sak(state) && this.tekst(state);
- }
- public static erInfomelding(state: SendNyMeldingState) {
- return state.dialogType === Meldingstype.INFOMELDING_MODIA_UTGAAENDE;
- }
- public static erGyldigInfomelding(state: SendNyMeldingState) {
- return this.erInfomelding(state) && this.sak(state) && this.tekst(state);
+ public static erGyldigSamtale(state: SendNyMeldingState) {
+ return this.erSamtale(state) && this.sak(state) && this.tekst(state);
}
}
diff --git a/src/app/personside/infotabs/InfoTabEnum.ts b/src/app/personside/infotabs/InfoTabEnum.ts
index 4e15f72e8..4b34e982a 100644
--- a/src/app/personside/infotabs/InfoTabEnum.ts
+++ b/src/app/personside/infotabs/InfoTabEnum.ts
@@ -15,16 +15,6 @@ export interface InfotabConfig {
export type Infotabs = Record;
export const INFOTABS: Infotabs = {
- OVERSIKT: { tittel: 'Oversikt', path: 'oversikt' },
- OPPFOLGING: { tittel: 'Oppfølging', path: 'oppfolging' },
- MELDINGER: { tittel: 'Meldinger', path: 'meldinger' },
- UTBETALING: { tittel: 'Utbetaling', path: 'utbetaling' },
- SAKER: { tittel: 'Saker', path: 'saker' },
- YTELSER: { tittel: 'Ytelser', path: 'ytelser' },
- VARSLER: { tittel: 'Varsler', path: 'varsler' }
-};
-
-export const NY_INFOTABS: Infotabs = {
OVERSIKT: { tittel: 'Oversikt', path: 'oversikt' },
OPPFOLGING: { tittel: 'Oppfølging', path: 'oppfolging' },
MELDINGER: { tittel: 'Kommunikasjon', path: 'meldinger' },
diff --git a/src/app/personside/infotabs/InfoTabs.tsx b/src/app/personside/infotabs/InfoTabs.tsx
index 216fc7ec7..2ffea083d 100644
--- a/src/app/personside/infotabs/InfoTabs.tsx
+++ b/src/app/personside/infotabs/InfoTabs.tsx
@@ -22,10 +22,6 @@ import { guid } from 'nav-frontend-js-utils';
import { useOpenTab } from './utils/useOpenTab';
import { MeldingsokProvider } from '../../../context/meldingsok';
import { useVisittkortState } from '../../../context/visittkort-state';
-import IfFeatureToggleOn from '../../../components/featureToggle/IfFeatureToggleOn';
-import { FeatureToggles } from '../../../components/featureToggle/toggleIDs';
-import IfFeatureToggleOff from '../../../components/featureToggle/IfFeatureToggleOff';
-import NyTabKnapper from './NyTabKnapper';
const StyledArticle = styled.article`
display: flex;
@@ -71,12 +67,7 @@ function InfoTabs() {
return (
-
-
-
-
-
-
+
*:not(:last-child) {
- margin-right: 0.2em;
- }
- > *:not(:first-child) {
- margin-left: 0.2em;
- }
-`;
-
-const KnappWrapper = styled.li`
- flex-grow: 1;
- box-sizing: border-box;
-`;
-
-interface TabKnappProps {
- valgt: boolean;
-}
-
-const TabKnapp = styled.button`
- width: 100%;
- box-sizing: border-box;
- background-color: transparent;
- margin-top: ${pxToRem(4)};
- padding: ${theme.margin.layout};
- border: none;
- border-bottom: 4px solid ${(props) => (props.valgt ? theme.color.lenkeSelected : 'transparent')};
- ${(props) =>
- props.valgt &&
- css`
- color: ${theme.color.lenkeSelected};
- `};
- text-align: center;
- cursor: pointer;
- transition: border 0.3s;
- font-weight: bold;
- &:focus {
- ${theme.focus};
- border-radius: ${theme.borderRadius.layout};
- }
- &:hover {
- border-bottom: 4px solid ${theme.color.lenkeHover};
- }
-`;
-
-function NyTabKnapper(props: TabPanelProps) {
- const knapper = Object.keys(NY_INFOTABS).map((key) => {
- const erValgt = NY_INFOTABS[key] === props.openTab;
- return (
-
- props.onTabChange(key)}>
- {NY_INFOTABS[key].tittel}
-
-
- );
- });
-
- return (
-
- Faner
- {knapper}
-
- );
-}
-
-export default NyTabKnapper;
diff --git a/src/app/personside/infotabs/TabKnapper.tsx b/src/app/personside/infotabs/TabKnapper.tsx
index 89bde2f5e..c387fd06b 100644
--- a/src/app/personside/infotabs/TabKnapper.tsx
+++ b/src/app/personside/infotabs/TabKnapper.tsx
@@ -43,8 +43,8 @@ const TabKnapp = styled.button`
margin-top: ${pxToRem(4)};
padding: ${theme.margin.layout};
border: none;
- border-bottom: 4px solid ${props => (props.valgt ? theme.color.lenkeSelected : 'transparent')};
- ${props =>
+ border-bottom: 4px solid ${(props) => (props.valgt ? theme.color.lenkeSelected : 'transparent')};
+ ${(props) =>
props.valgt &&
css`
color: ${theme.color.lenkeSelected};
@@ -63,7 +63,7 @@ const TabKnapp = styled.button`
`;
function TabKnapper(props: TabPanelProps) {
- const knapper = Object.keys(INFOTABS).map(key => {
+ const knapper = Object.keys(INFOTABS).map((key) => {
const erValgt = INFOTABS[key] === props.openTab;
return (
diff --git a/src/app/personside/infotabs/dyplenkeTest/meldingerDyplenker.test.tsx b/src/app/personside/infotabs/dyplenkeTest/meldingerDyplenker.test.tsx
index faf2b30cd..b79633db3 100644
--- a/src/app/personside/infotabs/dyplenkeTest/meldingerDyplenker.test.tsx
+++ b/src/app/personside/infotabs/dyplenkeTest/meldingerDyplenker.test.tsx
@@ -28,7 +28,7 @@ test('bytter til riktig tab og setter fokus på riktig melding ved bruk av dyple
clickOnMeldingerIOversikt(infoTabs);
- expect(getAktivTab(infoTabs).toLowerCase()).toContain(INFOTABS.MELDINGER.path);
+ expect(getAktivTab(infoTabs)).toContain(INFOTABS.MELDINGER.tittel);
const checkedMelding = infoTabs.find('input[checked=true].' + meldingerTest.melding).html();
const expectedElement = infoTabs
diff --git a/src/app/personside/infotabs/meldinger/traadliste/NyTraadSammendrag.tsx b/src/app/personside/infotabs/meldinger/traadliste/NyTraadSammendrag.tsx
deleted file mode 100644
index 9bb3bf161..000000000
--- a/src/app/personside/infotabs/meldinger/traadliste/NyTraadSammendrag.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { Melding, Traad } from '../../../../../models/meldinger/meldinger';
-import { erFeilsendt, getFormattertMeldingsDato, nyesteMelding, traadstittel } from '../utils/meldingerUtils';
-import { useAppState } from '../../../../../utils/customHooks';
-import Meldingsikon from '../utils/Meldingsikon';
-import { Element, Normaltekst } from 'nav-frontend-typografi';
-import { UnmountClosed } from 'react-collapse';
-import { EtikettAdvarsel, EtikettFokus, EtikettSuksess } from 'nav-frontend-etiketter';
-import * as React from 'react';
-import useTildelteOppgaver from '../../../../../utils/hooks/useTildelteOppgaver';
-import { Temagruppe } from '../../../../../models/temagrupper';
-import styled from 'styled-components/macro';
-
-const ContentStyle = styled.div`
- display: flex;
- flex-direction: column;
- /* IE11-fix*/
- flex-grow: 1;
- width: 0;
- margin-left: 0.8rem;
- overflow-wrap: break-word;
- .order-first {
- order: 0;
- }
- .order-second {
- order: 1;
- }
- .order-third {
- order: 3;
- }
-`;
-
-const EtikettStyling = styled.div`
- > *:not(:last-child) {
- margin-bottom: 0.2rem;
- margin-right: 0.2rem;
- }
- display: flex;
- flex-wrap: wrap;
- align-items: flex-start;
- margin-top: 0.2rem;
-`;
-
-const UUcustomOrder = styled.div`
- display: flex;
- flex-direction: column;
- .order-first {
- order: 0;
- }
- .order-second {
- order: 1;
- }
-`;
-
-const Style = styled.div`
- display: flex;
- > *:last-child {
- flex-grow: 1;
- }
-`;
-
-const PreviewStyle = styled(Normaltekst)`
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
-`;
-
-function NyTraadSammendrag(props: { traad: Traad }) {
- const sisteMelding = nyesteMelding(props.traad);
- const underArbeid = useAppState((state) => state.oppgaver.dialogpanelTraad?.traadId === props.traad.traadId);
- const datoTekst = getFormattertMeldingsDato(sisteMelding);
- const tittel = traadstittel(props.traad);
- return (
-
- );
-}
-
-function TildeltSaksbehandlerEtikett({ traadId }: { traadId: string }) {
- const tildelteOppgaver = useTildelteOppgaver();
-
- if (tildelteOppgaver.paaBruker.map((oppgave) => oppgave.traadId).includes(traadId)) {
- return Tildelt meg ;
- }
-
- return null;
-}
-
-function FeilsendtEtikett({ traad }: { traad: Traad }) {
- if (erFeilsendt(traad)) {
- return Feilsendt ;
- }
- return null;
-}
-
-function SlettetEtikett({ melding }: { melding: Melding }) {
- if (melding.temagruppe === Temagruppe.InnholdSlettet) {
- return Slettet ;
- }
-
- return null;
-}
-
-export default NyTraadSammendrag;
diff --git a/src/app/personside/infotabs/meldinger/traadliste/TraadListe.tsx b/src/app/personside/infotabs/meldinger/traadliste/TraadListe.tsx
index dab9cb880..6ac2db707 100644
--- a/src/app/personside/infotabs/meldinger/traadliste/TraadListe.tsx
+++ b/src/app/personside/infotabs/meldinger/traadliste/TraadListe.tsx
@@ -82,7 +82,7 @@ function PrintAlleMeldinger({ traader }: { traader: Traad[] }) {
return (
<>
- printer?.triggerPrint()} />
+ printer?.triggerPrint()} />
{traader.map((traad) => (
@@ -131,7 +131,7 @@ function TraadListe(props: Props) {
);
- const meldingTekst = props.traader.length === 1 ? 'melding' : 'meldinger';
+ const meldingTekst = props.traader.length === 1 ? 'kommunikasjon' : 'kommunikasjoner';
const soketreffTekst =
props.traaderEtterSokOgFiltrering.length !== props.traader.length
? `Søket traff ${props.traaderEtterSokOgFiltrering.length} av ${props.traader.length} ${meldingTekst}`
@@ -162,8 +162,8 @@ function TraadListe(props: Props) {
}
value={meldingsok.query}
onChange={onMeldingerSok}
- label={'Søk etter melding'}
- placeholder={'Søk etter melding'}
+ label={'Søk etter kommunikasjon'}
+ placeholder={'Søk etter kommunikasjon'}
className={'move-input-label'}
/>
diff --git a/src/app/personside/infotabs/meldinger/traadliste/TraadListeElement.tsx b/src/app/personside/infotabs/meldinger/traadliste/TraadListeElement.tsx
index 49a2b652a..69fc62b97 100644
--- a/src/app/personside/infotabs/meldinger/traadliste/TraadListeElement.tsx
+++ b/src/app/personside/infotabs/meldinger/traadliste/TraadListeElement.tsx
@@ -10,10 +10,6 @@ import { HoyreChevron } from 'nav-frontend-chevron';
import TraadSammendrag from './TraadSammendrag';
import { guid } from 'nav-frontend-js-utils';
import { valgtMeldingKlasse } from './TraadListe';
-import IfFeatureToggleOff from '../../../../../components/featureToggle/IfFeatureToggleOff';
-import { FeatureToggles } from '../../../../../components/featureToggle/toggleIDs';
-import IfFeatureToggleOn from '../../../../../components/featureToggle/IfFeatureToggleOn';
-import NyTraadSammendrag from './NyTraadSammendrag';
interface Props {
traad: Traad;
@@ -87,12 +83,7 @@ function TraadListeElement(props: Props) {
{props.tillegskomponent}
-
-
-
-
-
-
+
diff --git a/src/app/personside/infotabs/meldinger/traadliste/TraadSammendrag.tsx b/src/app/personside/infotabs/meldinger/traadliste/TraadSammendrag.tsx
index d3d7a4fb1..08f4956d2 100644
--- a/src/app/personside/infotabs/meldinger/traadliste/TraadSammendrag.tsx
+++ b/src/app/personside/infotabs/meldinger/traadliste/TraadSammendrag.tsx
@@ -1,5 +1,5 @@
import { Melding, Traad } from '../../../../../models/meldinger/meldinger';
-import { erFeilsendt, getFormattertMeldingsDato, meldingstittel, nyesteMelding } from '../utils/meldingerUtils';
+import { erFeilsendt, getFormattertMeldingsDato, nyesteMelding, traadstittel } from '../utils/meldingerUtils';
import { useAppState } from '../../../../../utils/customHooks';
import Meldingsikon from '../utils/Meldingsikon';
import { Element, Normaltekst } from 'nav-frontend-typografi';
@@ -68,7 +68,7 @@ function TraadSammendrag(props: { traad: Traad }) {
const sisteMelding = nyesteMelding(props.traad);
const underArbeid = useAppState((state) => state.oppgaver.dialogpanelTraad?.traadId === props.traad.traadId);
const datoTekst = getFormattertMeldingsDato(sisteMelding);
- const tittel = meldingstittel(sisteMelding);
+ const tittel = traadstittel(props.traad);
return (
);
}
diff --git a/src/app/personside/infotabs/meldinger/traadvisning/__snapshots__/TraadVisningWrapper.test.tsx.snap b/src/app/personside/infotabs/meldinger/traadvisning/__snapshots__/TraadVisningWrapper.test.tsx.snap
index 77a9967c1..b97f044dc 100644
--- a/src/app/personside/infotabs/meldinger/traadvisning/__snapshots__/TraadVisningWrapper.test.tsx.snap
+++ b/src/app/personside/infotabs/meldinger/traadvisning/__snapshots__/TraadVisningWrapper.test.tsx.snap
@@ -7,21 +7,6 @@ exports[`Viser traad med verktøylinje 1`] = `
padding-top: 1rem;
}
-.c24 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: justify;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between;
- -webkit-align-items: flex-start;
- -webkit-box-align: flex-start;
- -ms-flex-align: flex-start;
- align-items: flex-start;
-}
-
.c4 {
position: relative;
border: none;
@@ -62,43 +47,55 @@ exports[`Viser traad med verktøylinje 1`] = `
border-color: #0067c5;
}
-.c22 .snakkeboble-panel {
+.c23 .snakkeboble-panel {
-webkit-flex-basis: 40rem;
-ms-flex-preferred-size: 40rem;
flex-basis: 40rem;
+ padding: 0.5rem 0.5rem 0.3rem;
}
-.c22 a {
+.c23 a {
word-break: break-word;
}
-.c22 .snakkeboble {
+.c23 .snakkeboble {
margin: 0;
}
.c25 {
- font-weight: 600;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ gap: 0.5rem;
}
-.c23 {
+.c24 {
text-align: left;
}
-.c23 em {
+.c24 em {
font-style: normal;
background-color: #eed28c;
box-shadow: 0 0 0 0.2rem #eed28c;
border-radius: 0.625rem;
}
-.c23 > *:not(:last-child) {
- border-bottom: solid 0.0625rem #b7b1a9;
- padding-bottom: 0.7rem;
+.c24 > *:not(:last-child) {
margin-bottom: 0.5rem;
}
-.c26 p {
- margin-bottom: 0 !important;
+.c26 {
+ font-size: 0.85rem;
+}
+
+.c27 {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ gap: 0.3rem;
+ margin-left: auto;
}
.c18 {
@@ -271,7 +268,6 @@ exports[`Viser traad med verktøylinje 1`] = `
}
.c19 {
- padding: .5rem;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
@@ -282,7 +278,7 @@ exports[`Viser traad med verktøylinje 1`] = `
margin-top: .5rem;
}
-.c20 {
+.c21 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
@@ -296,16 +292,20 @@ exports[`Viser traad med verktøylinje 1`] = `
align-items: flex-end;
}
-.c21 {
- margin-top: 0.5rem;
+.c20 {
+ margin-bottom: 0.3rem;
}
-.c21 .ekspanderbartPanel__hode,
-.c21 .ekspanderbartPanel__innhold {
- padding: 0.3rem 1rem;
+.c22 {
+ margin-top: 0.8rem;
}
-.c21 .ekspanderbartPanel__tittel {
+.c22 .ekspanderbartPanel__hode,
+.c22 .ekspanderbartPanel__innhold {
+ padding: 0.1rem 0.2rem;
+}
+
+.c22 .ekspanderbartPanel__tittel {
color: #0067c5;
}
@@ -320,19 +320,19 @@ exports[`Viser traad med verktøylinje 1`] = `
}
@media print {
- .c22 {
+ .c23 {
page-break-inside: avoid;
border: solid 0.0625rem #78706a;
margin-bottom: 2rem;
}
- .c22 .snakkeboble__snakkeboble-pil-container,
- .c22 .nav-ikon,
- .c22 .bruker-ikon {
+ .c23 .snakkeboble__snakkeboble-pil-container,
+ .c23 .nav-ikon,
+ .c23 .bruker-ikon {
display: none;
}
- .c22 .snakkeboble-panel {
+ .c23 .snakkeboble-panel {
-webkit-flex-basis: 100%;
-ms-flex-preferred-size: 100%;
flex-basis: 100%;
@@ -352,7 +352,7 @@ exports[`Viser traad med verktøylinje 1`] = `
}
@media print {
- .c21 {
+ .c22 {
display: none;
}
}
@@ -1194,73 +1194,82 @@ exports[`Viser traad med verktøylinje 1`] = `
className="c19"
>
-
- Ny melding
-
-
-
- Spørsmål fra NAV - Arbeid
-
- 13.08.2019 00:00
-
-
-
+
-
-
-
- Dialogen er journalfort på
- 2
- sak(er)
-
-
-
-
-
+ Ny melding
+
+
+
+ Ukjent meldingstype: undefined
+
+ 13.08.2019 00:00
+
-
-
- 30.07.2019: Journalført på Dagpenger (ukjent saksid) av Jenny Berg
-
-
+
+ Dialogen er journalfort på
+ 2
+ sak(er)
+
+
+
+
+
+
+
- 28.07.2019: Journalført på Arbeidsavklaringspenger (ukjent saksid) av Jenny Berg
-
+
+ 30.07.2019: Journalført på Dagpenger (ukjent saksid) av Jenny Berg
+
+
+ 28.07.2019: Journalført på Arbeidsavklaringspenger (ukjent saksid) av Jenny Berg
+
+
@@ -1268,7 +1277,7 @@ exports[`Viser traad med verktøylinje 1`] = `
aria-label="Dialog"
>
-
+
+
+ Dolores omnis ea voluptatem corrupti odit incidunt enim. Unde fugiat sed animi explicabo maiores. Nihil cum accusamus omnis officiis deserunt est. Qui quisquam unde aut magni dignissimos.
+
+
+
-
-
- Melding
- 4
-
-
- Spørsmål fra NAV - Arbeid
-
-
+ 27.07.2019 00:00
+
+
+ Skrevet av Kristoffer Fredriksen (xy70r8)
+
-
+ Lest: 23.07.2019 00:00
+
+
- Lest
-
+
+ Melding lest
+
+
+
-
- 27.07.2019 00:00
-
-
- Melding lest: 23.07.2019 00:00
-
-
- Skrevet av Kristoffer Fredriksen (xy70r8)
-
-
-
-
- Dolores omnis ea voluptatem corrupti odit incidunt enim. Unde fugiat sed animi explicabo maiores. Nihil cum accusamus omnis officiis deserunt est. Qui quisquam unde aut magni dignissimos.
-
@@ -1354,7 +1366,7 @@ exports[`Viser traad med verktøylinje 1`] = `
-
-
-
-
- Melding
- 3
-
-
- Spørsmål fra bruker - Helse
-
-
-
-
- 16.07.2019 00:00
-
-
+
+
+
+ 16.07.2019 00:00
+
+
+
+
@@ -1421,7 +1421,7 @@ exports[`Viser traad med verktøylinje 1`] = `
-
-
-
-
- Melding
- 2
-
-
- Spørsmål fra bruker - Arbeid
-
-
-
-
- 12.07.2019 00:00
-
-
+
+
+
+ 12.07.2019 00:00
+
+
+
+
@@ -1488,7 +1476,7 @@ exports[`Viser traad med verktøylinje 1`] = `
-
+
+
+ Ea laborum accusamus et ex voluptates provident eveniet voluptatem. Sunt et sed eligendi harum exercitationem. Eaque est maiores autem sunt occaecati atque ipsa ea itaque. Dolorum enim quaerat alias ut sit labore pariatur.
+
+
+
-
-
- Melding
- 1
-
-
- Samtalereferat oppmøte - Arbeid
-
-
+ 07.07.2019 00:00
+
+
+ Skrevet av Sander Hansen (nzxo4q)
+
-
+ Lest: 12.07.2019 00:00
+
+
- Lest
-
+
+ Melding lest
+
+
+
-
- 07.07.2019 00:00
-
-
- Melding lest: 12.07.2019 00:00
-
-
- Skrevet av Sander Hansen (nzxo4q)
-
-
-
-
- Ea laborum accusamus et ex voluptates provident eveniet voluptatem. Sunt et sed eligendi harum exercitationem. Eaque est maiores autem sunt occaecati atque ipsa ea itaque. Dolorum enim quaerat alias ut sit labore pariatur.
-
diff --git a/src/app/personside/infotabs/meldinger/traadvisning/verktoylinje/merk/sladdevalg/SladdMeldingerMedArsak.tsx b/src/app/personside/infotabs/meldinger/traadvisning/verktoylinje/merk/sladdevalg/SladdMeldingerMedArsak.tsx
index 267435fc3..760fbb458 100644
--- a/src/app/personside/infotabs/meldinger/traadvisning/verktoylinje/merk/sladdevalg/SladdMeldingerMedArsak.tsx
+++ b/src/app/personside/infotabs/meldinger/traadvisning/verktoylinje/merk/sladdevalg/SladdMeldingerMedArsak.tsx
@@ -15,10 +15,6 @@ import { feilmeldingReactHookForm } from '../../oppgave/feilmeldingReactHookForm
import { guid } from 'nav-frontend-js-utils';
import MeldIPortenAdvarsel from './MeldIPortenAdvarsel';
import FormSelect from '../../../../../../../../components/form/FormSelect';
-import NyEnkeltMelding from '../../../NyEnkeltmelding';
-import IfFeatureToggleOn from '../../../../../../../../components/featureToggle/IfFeatureToggleOn';
-import { FeatureToggles } from '../../../../../../../../components/featureToggle/toggleIDs';
-import IfFeatureToggleOff from '../../../../../../../../components/featureToggle/IfFeatureToggleOff';
const PreviewStyle = styled(Normaltekst)`
width: 100%;
@@ -41,24 +37,12 @@ function ValgteMeldingerPreview(props: { traad: Traad; valgte: string[] }) {
.map((melding, index) => {
const meldingnummer = props.traad.meldinger.length - index;
return (
- <>
-
-
-
-
-
-
- >
+
);
});
diff --git a/src/app/personside/infotabs/oversikt/MeldingerOversikt.tsx b/src/app/personside/infotabs/oversikt/MeldingerOversikt.tsx
index d4cf93f0d..6a0850b93 100644
--- a/src/app/personside/infotabs/oversikt/MeldingerOversikt.tsx
+++ b/src/app/personside/infotabs/oversikt/MeldingerOversikt.tsx
@@ -16,10 +16,6 @@ import { useOnMount } from '../../../../utils/customHooks';
import { temagruppeTekst } from '../../../../models/temagrupper';
import TraadSammendrag from '../meldinger/traadliste/TraadSammendrag';
import dialogResource from '../../../../rest/resources/dialogResource';
-import IfFeatureToggleOn from '../../../../components/featureToggle/IfFeatureToggleOn';
-import { FeatureToggles } from '../../../../components/featureToggle/toggleIDs';
-import NyTraadSammendrag from '../meldinger/traadliste/NyTraadSammendrag';
-import IfFeatureToggleOff from '../../../../components/featureToggle/IfFeatureToggleOff';
const ListStyle = styled.ol`
> *:not(:first-child) {
@@ -72,12 +68,7 @@ function Traadelement(props: { traad: Traad }) {
ariaDescription={'Vis meldinger for ' + tittel}
className={meldingerTest.oversikt}
>
-
-
-
-
-
-
+
);
diff --git a/src/app/personside/infotabs/oversikt/Oversikt.tsx b/src/app/personside/infotabs/oversikt/Oversikt.tsx
index 720b96bce..a5848f0f9 100644
--- a/src/app/personside/infotabs/oversikt/Oversikt.tsx
+++ b/src/app/personside/infotabs/oversikt/Oversikt.tsx
@@ -65,7 +65,7 @@ function Oversikt() {
diff --git a/src/app/personside/infotabs/oversikt/__snapshots__/Oversikt.test.tsx.snap b/src/app/personside/infotabs/oversikt/__snapshots__/Oversikt.test.tsx.snap
index 9aca748d0..2d06c6fdb 100644
--- a/src/app/personside/infotabs/oversikt/__snapshots__/Oversikt.test.tsx.snap
+++ b/src/app/personside/infotabs/oversikt/__snapshots__/Oversikt.test.tsx.snap
@@ -907,7 +907,7 @@ exports[`Viser oversikt med alt innhold 1`] = `
className="typo-undertittel"
id="Helt tilfeldig ID"
>
- Meldinger
+ Kommunikasjon
Gå til
- meldinger
+ kommunikasjon
@@ -982,7 +982,7 @@ exports[`Viser oversikt med alt innhold 1`] = `
- Spørsmål fra NAV - Arbeid
+ Ukjent meldingstype: undefined
) {
});
}
-const tidligsteDato = dayjs()
- .subtract(5, 'years')
- .startOf('year');
+const tidligsteDato = dayjs().subtract(3, 'years').startOf('year');
const senesteDato: Dayjs = dayjs();
const isoTidligsteDato = tidligsteDato.format(ISO_DATE_STRING_FORMAT);
@@ -69,8 +67,9 @@ const periodeValidering = [
function getDatoFeilmelding(fra: string, til: string) {
const fraDato = dayjs(fra, ISO_DATE_STRING_FORMAT);
const tilDato = dayjs(til, ISO_DATE_STRING_FORMAT);
- const feilmelding: string | undefined = periodeValidering.find(validering => validering.erUgyldig(fraDato, tilDato))
- ?.feilmelding;
+ const feilmelding: string | undefined = periodeValidering.find((validering) =>
+ validering.erUgyldig(fraDato, tilDato)
+ )?.feilmelding;
if (feilmelding) {
return {feilmelding} ;
}
@@ -93,7 +92,7 @@ function EgendefinertDatoInputs(props: Props) {
locale={'nb'}
inputId="utbetalinger-datovelger-fra"
value={fra}
- onChange={dato => onDatoChange(props, { fra: dato })}
+ onChange={(dato) => onDatoChange(props, { fra: dato })}
inputProps={{
name: 'Fra dato',
'aria-invalid': fra !== '' && isISODateString(fra) === false
@@ -113,7 +112,7 @@ function EgendefinertDatoInputs(props: Props) {
locale={'nb'}
inputId="utbetalinger-datovelger-til"
value={til}
- onChange={dato => onDatoChange(props, { til: dato })}
+ onChange={(dato) => onDatoChange(props, { til: dato })}
inputProps={{
name: 'Til dato',
'aria-invalid': til !== '' && isISODateString(til) === false
diff --git a/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBody.test.tsx.snap b/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBody.test.tsx.snap
index ced87429b..de7424ebc 100644
--- a/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBody.test.tsx.snap
+++ b/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBody.test.tsx.snap
@@ -1676,7 +1676,7 @@ exports[`viser info om bruker i visittkortbody 1`] = `
>
diff --git a/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBodyFeilendeSystemer.test.tsx.snap b/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBodyFeilendeSystemer.test.tsx.snap
index 35014a258..1e7f3bb32 100644
--- a/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBodyFeilendeSystemer.test.tsx.snap
+++ b/src/app/personside/visittkort-v2/body/__snapshots__/VisittkortBodyFeilendeSystemer.test.tsx.snap
@@ -1479,7 +1479,7 @@ exports[`viser info om bruker i visittkortbody 1`] = `
>
diff --git a/src/mock/baseUrls-mock.ts b/src/mock/baseUrls-mock.ts
index 21d8b77cd..f09f3ee51 100644
--- a/src/mock/baseUrls-mock.ts
+++ b/src/mock/baseUrls-mock.ts
@@ -3,7 +3,7 @@ import { BaseUrls } from '../models/baseurls';
export function mockBaseUrls(): BaseUrls {
return {
norg2Frontend: 'https://norg2-frontend.nais.preprod.local',
- personforvalter: 'https://pdl-web.dev.intern.nav.no/',
+ personforvalter: 'https://pdl-web.intern.dev.nav.no/',
drek: 'https://drek.nais.preprod.local/'
};
}
diff --git a/src/svg/ReadIcon.tsx b/src/svg/ReadIcon.tsx
index 4a4747b63..1f43ae949 100644
--- a/src/svg/ReadIcon.tsx
+++ b/src/svg/ReadIcon.tsx
@@ -15,8 +15,8 @@ function ReadIcon() {
>
Melding lest