Skip to content

Commit

Permalink
omsorgen for
Browse files Browse the repository at this point in the history
  • Loading branch information
hallvardastark committed Nov 21, 2023
1 parent e0b0686 commit c19332b
Show file tree
Hide file tree
Showing 58 changed files with 2,026 additions and 63 deletions.
2 changes: 1 addition & 1 deletion packages/behandling-omsorgspenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@k9-sak-web/fakta-barn-og-overfoeringsdager": "1.0.0",
"@k9-sak-web/fakta-barn-oms": "1.0.0",
"@k9-sak-web/fakta-inntektsmelding": "1.0.0",
"@k9-sak-web/fakta-omsorgen-for": "1.0.0",
"@k9-sak-web/konstanter": "1.0.0",
"@k9-sak-web/prosess-aarskvantum-oms": "1.0.0",
"@k9-sak-web/prosess-vilkar-soknadsfrist": "1.0.0",
Expand All @@ -36,7 +37,6 @@
"@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.16",
"@navikt/ft-prosess-beregningsgrunnlag": "6.3.16",
"@navikt/k9-fe-http-utils": "1.0.6",
"@navikt/k9-fe-omsorgen-for": "0.0.8",
"nav-frontend-popover": "2.0.4",
"react": "18.2.0",
"react-intl": "6.5.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { findAksjonspunkt, findEndpointsForMicrofrontend, httpErrorHandler } fro
import { useRestApiErrorDispatcher } from '@k9-sak-web/rest-api-hooks';
import { Aksjonspunkt, BehandlingAppKontekst, Fagsak } from '@k9-sak-web/types';
import React from 'react';
import { OmsorgenFor } from '@navikt/k9-fe-omsorgen-for';
import { OmsorgenFor } from '@k9-sak-web/fakta-omsorgen-for';

interface OmsorgenForProps {
behandling: BehandlingAppKontekst;
Expand Down
2 changes: 1 addition & 1 deletion packages/behandling-opplaeringspenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@k9-sak-web/fakta-institusjon": "1.0.0",
"@k9-sak-web/fakta-medisinsk-vilkar": "1.0.0",
"@k9-sak-web/fakta-om-barnet": "1.0.0",
"@k9-sak-web/fakta-omsorgen-for": "1.0.0",
"@k9-sak-web/konstanter": "1.0.0",
"@k9-sak-web/prosess-vilkar-soknadsfrist": "1.0.0",
"@k9-sak-web/prosess-vilkar-sykdom": "1.0.0",
Expand All @@ -42,7 +43,6 @@
"@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.16",
"@navikt/ft-prosess-beregningsgrunnlag": "6.3.16",
"@navikt/k9-fe-http-utils": "1.0.6",
"@navikt/k9-fe-omsorgen-for": "0.0.8",
"@navikt/k9-fe-uttak": "0.0.8",
"axios": "1.6.2",
"nav-frontend-alertstriper": "4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { findAksjonspunkt, findEndpointsForMicrofrontend, httpErrorHandler } fro
import { useRestApiErrorDispatcher } from '@k9-sak-web/rest-api-hooks';
import { Aksjonspunkt, BehandlingAppKontekst } from '@k9-sak-web/types';
import React from 'react';
import { OmsorgenFor } from '@navikt/k9-fe-omsorgen-for';
import { OmsorgenFor } from '@k9-sak-web/fakta-omsorgen-for';

interface OmsorgenForProps {
behandling: BehandlingAppKontekst;
Expand Down
2 changes: 1 addition & 1 deletion packages/behandling-pleiepenger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@k9-sak-web/fakta-inntektsmelding": "1.0.0",
"@k9-sak-web/fakta-medisinsk-vilkar": "1.0.0",
"@k9-sak-web/fakta-om-barnet": "1.0.0",
"@k9-sak-web/fakta-omsorgen-for": "1.0.0",
"@k9-sak-web/fakta-utenlandsopphold": "1.0.0",
"@k9-sak-web/konstanter": "1.0.0",
"@k9-sak-web/prosess-vilkar-soknadsfrist": "1.0.0",
Expand All @@ -43,7 +44,6 @@
"@navikt/ft-fakta-fordel-beregningsgrunnlag": "7.3.16",
"@navikt/ft-prosess-beregningsgrunnlag": "6.3.16",
"@navikt/k9-fe-http-utils": "1.0.6",
"@navikt/k9-fe-omsorgen-for": "0.0.8",
"@navikt/k9-fe-uttak": "0.0.8",
"axios": "1.6.2",
"nav-frontend-alertstriper": "4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import aksjonspunktCodes from '@fpsak-frontend/kodeverk/src/aksjonspunktCodes';
import { findAksjonspunkt, findEndpointsForMicrofrontend, httpErrorHandler } from '@fpsak-frontend/utils';
import { useRestApiErrorDispatcher } from '@k9-sak-web/rest-api-hooks';
import { Aksjonspunkt, BehandlingAppKontekst } from '@k9-sak-web/types';
import { OmsorgenFor } from '@navikt/k9-fe-omsorgen-for';
import { OmsorgenFor } from '@k9-sak-web/fakta-omsorgen-for';
import React from 'react';

interface OmsorgenForProps {
Expand Down
26 changes: 26 additions & 0 deletions packages/fakta-omsorgen-for/index.html
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>
2 changes: 2 additions & 0 deletions packages/fakta-omsorgen-for/index.ts
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';
17 changes: 17 additions & 0 deletions packages/fakta-omsorgen-for/mock/api-mock.ts
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,
}),
),
),
];
6 changes: 6 additions & 0 deletions packages/fakta-omsorgen-for/mock/browser.ts
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);
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;
59 changes: 59 additions & 0 deletions packages/fakta-omsorgen-for/package.json
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"
}
}
Loading

0 comments on commit c19332b

Please sign in to comment.