-
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.
* Bruker medisinsk vilkår som pakke * Om barnet * etablert tilsyn * inntektsmelding * omsorgen for * omsorgsdager * uttak * fikset feil * bumpet pakker * Fjernet den siste bruken av mikrofrontender Rettet opp i props som blir sendt ned, fjernet ubrukte * fjernet ubrukte komponenter og typer * La til pakke * Fjernet referanser til mikrofrontends * bump pakker
- Loading branch information
1 parent
dc769b3
commit 1bc5895
Showing
62 changed files
with
2,074 additions
and
3,748 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
67 changes: 15 additions & 52 deletions
67
packages/behandling-omsorgspenger/src/components/Inntektsmelding.tsx
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 |
---|---|---|
@@ -1,71 +1,34 @@ | ||
import React from 'react'; | ||
import { findEndpointsForMicrofrontend, httpErrorHandler as httpErrorHandlerFn } from '@fpsak-frontend/utils'; | ||
import { useRestApiErrorDispatcher } from '@k9-sak-web/rest-api-hooks'; | ||
import { ArbeidsgiverOpplysningerPerId, Dokument, SimpleEndpoints } from '@k9-sak-web/types'; | ||
import { | ||
MicroFrontend, | ||
httpErrorHandler as httpErrorHandlerFn, | ||
findEndpointsForMicrofrontend, | ||
} from '@fpsak-frontend/utils'; | ||
|
||
const initializeInntektsmeldingApp = ( | ||
elementId, | ||
httpErrorHandler, | ||
endpoints: SimpleEndpoints, | ||
arbeidsforhold: ArbeidsgiverOpplysningerPerId, | ||
dokumenter: Dokument[], | ||
løsAksjonspunkt, | ||
readOnly, | ||
saksbehandlere, | ||
aksjonspunkter, | ||
) => { | ||
(window as any).renderKompletthetApp(elementId, { | ||
httpErrorHandler, | ||
arbeidsforhold, | ||
dokumenter, | ||
readOnly, | ||
onFinished: løsAksjonspunkt, | ||
endpoints, | ||
saksbehandlere, | ||
aksjonspunkter, | ||
}); | ||
}; | ||
import React from 'react'; | ||
import { Inntektsmelding } from '@navikt/k9-fe-inntektsmelding'; | ||
|
||
const inntektsmeldingAppId = 'inntektsmeldingApp'; | ||
export default ({ | ||
behandling, | ||
readOnly, | ||
arbeidsgiverOpplysningerPerId, | ||
dokumenter, | ||
aksjonspunkter, | ||
submitCallback, | ||
saksbehandlere, | ||
}) => { | ||
const { addErrorMessage } = useRestApiErrorDispatcher(); | ||
const httpErrorHandlerCaller = (status: number, locationHeader?: string) => | ||
httpErrorHandlerFn(status, addErrorMessage, locationHeader); | ||
|
||
const løsAksjonspunkt = aksjonspunktArgs => submitCallback([{ ...aksjonspunktArgs }]); | ||
return ( | ||
<MicroFrontend | ||
id={inntektsmeldingAppId} | ||
jsSrc="/k9/microfrontend/psb-inntektsmelding/1/app.js" | ||
stylesheetSrc="/k9/microfrontend/psb-inntektsmelding/1/styles.css" | ||
noCache | ||
onReady={() => | ||
initializeInntektsmeldingApp( | ||
inntektsmeldingAppId, | ||
httpErrorHandlerCaller, | ||
findEndpointsForMicrofrontend(behandling.links, [ | ||
{ rel: 'kompletthet-beregning', desiredName: 'kompletthetBeregning' }, | ||
]), | ||
arbeidsgiverOpplysningerPerId, | ||
dokumenter, | ||
løsAksjonspunkt, | ||
readOnly, | ||
saksbehandlere || {}, | ||
aksjonspunkter, | ||
) | ||
} | ||
<Inntektsmelding | ||
data={{ | ||
httpErrorHandler: httpErrorHandlerCaller, | ||
arbeidsforhold: arbeidsgiverOpplysningerPerId, | ||
dokumenter, | ||
readOnly, | ||
onFinished: løsAksjonspunkt, | ||
endpoints: findEndpointsForMicrofrontend(behandling.links, [ | ||
{ rel: 'kompletthet-beregning', desiredName: 'kompletthetBeregning' }, | ||
]), | ||
aksjonspunkter, | ||
}} | ||
/> | ||
); | ||
}; |
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
Oops, something went wrong.