-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0b0686
commit c19332b
Showing
58 changed files
with
2,026 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<html> | ||
<head> | ||
<title>Omsorgen for</title> | ||
<style> | ||
body { | ||
font-family: 'Source Sans Pro', Arial, sans-serif; | ||
font-size: 1rem; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="app" style="padding: 2.5rem"></div> | ||
<script type="text/javascript"> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
window.renderOmsorgenForApp('app', { | ||
readOnly: false, | ||
endpoints: { | ||
omsorgsperioder: 'http://localhost:8082/mock/omsorgsperioder', | ||
}, | ||
onFinished: () => console.log('Klar til å løse aksjonspunkt'), | ||
sakstype: 'OMP', | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export { default as OmsorgenFor } from './src/ui/MainComponent'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
import { rest } from 'msw'; | ||
import mockedOmsorgsperioder from './mocked-data/mockedOmsorgsperioder'; | ||
|
||
export const handlers = [ | ||
rest.get('http://localhost:8082/mock/omsorgsperioder', (req, res, ctx) => | ||
res( | ||
ctx.status(200), | ||
ctx.json({ | ||
omsorgsperioder: mockedOmsorgsperioder, | ||
registrertSammeBosted: true, | ||
registrertForeldrerelasjon: true, | ||
tvingManuellVurdering: false, | ||
}), | ||
), | ||
), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import { setupWorker } from 'msw'; | ||
import { handlers } from './api-mock'; | ||
// This configures a Service Worker with the given request handlers. | ||
export const worker = setupWorker(...handlers); |
43 changes: 43 additions & 0 deletions
43
packages/fakta-omsorgen-for/mock/mocked-data/mockedOmsorgsperioder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Vurderingsresultat from '../../src/types/Vurderingsresultat'; | ||
|
||
const omsorgsperioder = [ | ||
{ | ||
begrunnelse: null, | ||
periode: { fom: '2021-03-20', tom: '2021-03-25' } as any, | ||
relasjon: 'Annet', | ||
relasjonsbeskrivelse: 'Nabo', | ||
resultat: Vurderingsresultat.IKKE_VURDERT, | ||
resultatEtterAutomatikk: Vurderingsresultat.IKKE_VURDERT, | ||
}, | ||
{ | ||
begrunnelse: 'Fordi foo og bar', | ||
periode: { fom: '2021-03-16', tom: '2021-03-20' } as any, | ||
relasjon: 'Annet', | ||
relasjonsbeskrivelse: 'Nabo', | ||
resultat: Vurderingsresultat.IKKE_OPPFYLT, | ||
resultatEtterAutomatikk: Vurderingsresultat.IKKE_VURDERT, | ||
}, | ||
{ | ||
periode: { fom: '2021-03-09', tom: '2021-03-15' } as any, | ||
resultat: Vurderingsresultat.IKKE_VURDERT, | ||
resultatEtterAutomatikk: Vurderingsresultat.OPPFYLT, | ||
}, | ||
{ | ||
begrunnelse: 'Fordi ditt og datt', | ||
periode: { fom: '2021-03-01', tom: '2021-03-05' } as any, | ||
relasjon: 'Far', | ||
relasjonsbeskrivelse: null, | ||
resultat: Vurderingsresultat.OPPFYLT, | ||
resultatEtterAutomatikk: Vurderingsresultat.OPPFYLT, | ||
}, | ||
{ | ||
begrunnelse: 'Fordi sånn og sånn', | ||
periode: { fom: '2021-02-01', tom: '2021-02-05' } as any, | ||
relasjon: 'Far', | ||
relasjonsbeskrivelse: null, | ||
resultat: Vurderingsresultat.OPPFYLT, | ||
resultatEtterAutomatikk: Vurderingsresultat.OPPFYLT, | ||
}, | ||
]; | ||
|
||
export default omsorgsperioder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": "@k9-sak-web/fakta-omsorgen-for", | ||
"version": "1.0.0", | ||
"module": "index.ts", | ||
"keywords": [], | ||
"author": "NAV IT", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"dev": "node webpack/webpack-config.development.js" | ||
}, | ||
"dependencies": { | ||
"@navikt/ds-css": "5.10.0", | ||
"@navikt/ds-icons": "3.4.3", | ||
"@navikt/ds-react": "5.10.0", | ||
"@navikt/fnrvalidator": "1.3.3", | ||
"@navikt/ft-plattform-komponenter": "2.3.6", | ||
"@navikt/k9-fe-array-utils": "1.0.4", | ||
"@navikt/k9-fe-date-utils": "1.0.6", | ||
"@navikt/k9-fe-form-utils": "1.0.10", | ||
"@navikt/k9-fe-http-utils": "1.0.5", | ||
"@navikt/k9-fe-period-utils": "1.0.9", | ||
"@popperjs/core": "2.11.8", | ||
"axios": "1.6.2", | ||
"classnames": "2.3.2", | ||
"dayjs": "1.11.10", | ||
"lodash.throttle": "4.1.1", | ||
"nav-frontend-alertstriper": "4.0.2", | ||
"nav-frontend-alertstriper-style": "3.0.2", | ||
"nav-frontend-chevron": "1.0.30", | ||
"nav-frontend-chevron-style": "1.0.4", | ||
"nav-frontend-core": "6.0.1", | ||
"nav-frontend-ikoner-assets": "3.0.1", | ||
"nav-frontend-ikonknapper": "2.1.3", | ||
"nav-frontend-js-utils": "1.0.20", | ||
"nav-frontend-knapper": "3.1.3", | ||
"nav-frontend-knapper-style": "2.1.2", | ||
"nav-frontend-lenker": "2.0.2", | ||
"nav-frontend-lenker-style": "2.0.2", | ||
"nav-frontend-paneler": "3.0.2", | ||
"nav-frontend-paneler-style": "2.0.2", | ||
"nav-frontend-skjema": "4.0.6", | ||
"nav-frontend-skjema-style": "3.0.3", | ||
"nav-frontend-spinner": "3.0.1", | ||
"nav-frontend-spinner-style": "1.0.2", | ||
"nav-frontend-typografi": "4.0.2", | ||
"nav-frontend-typografi-style": "2.0.2", | ||
"object-hash": "3.0.0", | ||
"react": "18.2.0", | ||
"react-collapse": "5.1.1", | ||
"react-dom": "18.2.0", | ||
"react-hook-form": "7.47.0", | ||
"react-intl": "6.5.2", | ||
"react-popper": "2.3.0" | ||
}, | ||
"msw": { | ||
"workerDirectory": "public" | ||
} | ||
} |
Oops, something went wrong.