-
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.
Support new oppgave type: Behandling etter Trygderetten opphevet
- Loading branch information
1 parent
85c9c9d
commit 542a374
Showing
12 changed files
with
216 additions
and
16 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
111 changes: 111 additions & 0 deletions
111
...d/src/components/behandling/behandlingsdetaljer/behandling-etter-tr-opphevet-detaljer.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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import { Heading } from '@navikt/ds-react'; | ||
import { ExtraUtfall } from '@app/components/behandling/behandlingsdetaljer/extra-utfall'; | ||
import { GosysBeskrivelse } from '@app/components/behandling/behandlingsdetaljer/gosys/beskrivelse'; | ||
import { ReadOnlyDate } from '@app/components/behandling/behandlingsdetaljer/read-only-date'; | ||
import { Saksnummer } from '@app/components/behandling/behandlingsdetaljer/saksnummer'; | ||
import { Type } from '@app/components/type/type'; | ||
import { isoDateToPretty } from '@app/domain/date'; | ||
import { useUpdateFullmektigMutation, useUpdateKlagerMutation } from '@app/redux-api/oppgaver/mutations/behandling'; | ||
import { IBehandlingEtterTryderettenOpphevet as IBehandlingEtterTrOpphevet } from '@app/types/oppgavebehandling/oppgavebehandling'; | ||
import { Part } from '../../part/part'; | ||
import { StyledBehandlingSection } from '../styled-components'; | ||
import { BehandlingSection } from './behandling-section'; | ||
import { Lovhjemmel } from './lovhjemmel/lovhjemmel'; | ||
import { MeldingFraVedtaksinstans } from './melding-fra-vedtaksinstans'; | ||
import { UtfallResultat } from './utfall-resultat'; | ||
import { Ytelse } from './ytelse'; | ||
|
||
interface Props { | ||
oppgavebehandling: IBehandlingEtterTrOpphevet; | ||
} | ||
|
||
export const BehandlingEtterTrOpphevetDetaljer = ({ oppgavebehandling }: Props) => { | ||
const [updateFullmektig, { isLoading: fullmektigIsLoading }] = useUpdateFullmektigMutation(); | ||
const [updateKlager, { isLoading: klagerIsLoading }] = useUpdateKlagerMutation(); | ||
|
||
const { | ||
typeId, | ||
fraNAVEnhetNavn, | ||
fraNAVEnhet, | ||
mottattKlageinstans, | ||
kommentarFraVedtaksinstans, | ||
oppgavebeskrivelse, | ||
resultat, | ||
ytelseId, | ||
prosessfullmektig, | ||
saksnummer, | ||
varsletFrist, | ||
kjennelseMottatt, | ||
created, | ||
} = oppgavebehandling; | ||
|
||
return ( | ||
<StyledBehandlingSection> | ||
<Heading level="1" size="medium" spacing> | ||
Behandling | ||
</Heading> | ||
|
||
<Part | ||
isDeletable={false} | ||
label="Opprinnelig klager / ankende part" | ||
part={oppgavebehandling.klager} | ||
onChange={(klager) => updateKlager({ klager, oppgaveId: oppgavebehandling.id })} | ||
isLoading={klagerIsLoading} | ||
/> | ||
|
||
<Part | ||
isDeletable | ||
label="Fullmektig" | ||
part={prosessfullmektig} | ||
onChange={(fullmektig) => updateFullmektig({ fullmektig, oppgaveId: oppgavebehandling.id })} | ||
isLoading={fullmektigIsLoading} | ||
/> | ||
|
||
<BehandlingSection label="Type"> | ||
<Type type={typeId} /> | ||
</BehandlingSection> | ||
|
||
<BehandlingSection label="Ytelse"> | ||
<Ytelse ytelseId={ytelseId} /> | ||
</BehandlingSection> | ||
|
||
<Saksnummer saksnummer={saksnummer} /> | ||
|
||
<ReadOnlyDate | ||
date={kjennelseMottatt} | ||
id="dato-for-kjennelse-fra-trygderetten-med-utfall-opphevet" | ||
label="Dato for kjennelse fra Trygderetten med utfall opphevet" | ||
/> | ||
|
||
<ReadOnlyDate | ||
date={created} | ||
id="dato-for-ny-behandling-opprettet-i-kabal" | ||
label="Dato for ny behandling opprettet i Kabal" | ||
/> | ||
|
||
<BehandlingSection label="Varslet frist"> | ||
{varsletFrist === null ? 'Ikke satt' : isoDateToPretty(varsletFrist)} | ||
</BehandlingSection> | ||
|
||
<BehandlingSection label="Fra NAV-enhet"> | ||
{fraNAVEnhetNavn} - {fraNAVEnhet} | ||
</BehandlingSection> | ||
|
||
<BehandlingSection label="Mottatt klageinstans">{isoDateToPretty(mottattKlageinstans)}</BehandlingSection> | ||
|
||
<MeldingFraVedtaksinstans kommentarFraVedtaksinstans={kommentarFraVedtaksinstans} /> | ||
|
||
<GosysBeskrivelse oppgavebeskrivelse={oppgavebeskrivelse} /> | ||
|
||
<UtfallResultat utfall={resultat.utfallId} oppgaveId={oppgavebehandling.id} /> | ||
|
||
<ExtraUtfall | ||
utfallIdSet={resultat.extraUtfallIdSet} | ||
mainUtfall={resultat.utfallId} | ||
oppgaveId={oppgavebehandling.id} | ||
/> | ||
|
||
<Lovhjemmel /> | ||
</StyledBehandlingSection> | ||
); | ||
}; |
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
57 changes: 57 additions & 0 deletions
57
frontend/src/plate/templates/behandling-etter-tr-opphevet-vedtak.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,57 @@ | ||
import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; | ||
import { deepFreeze } from '@app/functions/deep-freeze'; | ||
import { Source } from '@app/plate/components/label-content'; | ||
import { EditorValue, TextAlign } from '@app/plate/types'; | ||
import { DistribusjonsType } from '@app/types/documents/documents'; | ||
import { IMutableSmartEditorTemplate } from '@app/types/smart-editor/smart-editor'; | ||
import { TemplateIdEnum } from '@app/types/smart-editor/template-enums'; | ||
import { TemplateSections } from '../template-sections'; | ||
import { | ||
createCurrentDate, | ||
createFooter, | ||
createHeader, | ||
createLabelContent, | ||
createMaltekstseksjon, | ||
createRegelverk, | ||
createSignature, | ||
} from './helpers'; | ||
|
||
const INITIAL_SLATE_VALUE: EditorValue = [ | ||
createCurrentDate(), | ||
createHeader(), | ||
|
||
createMaltekstseksjon(TemplateSections.TITLE), | ||
|
||
{ | ||
type: ELEMENT_PARAGRAPH, | ||
align: TextAlign.LEFT, | ||
children: [ | ||
createLabelContent(Source.KLAGER_IF_EQUAL_TO_SAKEN_GJELDER_NAME, 'Ankende part'), | ||
createLabelContent(Source.SAKEN_GJELDER_IF_DIFFERENT_FROM_KLAGER_NAME, 'Saken gjelder'), | ||
createLabelContent(Source.SAKEN_GJELDER_FNR, 'Fødselsnummer'), | ||
createLabelContent(Source.KLAGER_IF_DIFFERENT_FROM_SAKEN_GJELDER_NAME, 'Ankende part'), | ||
createLabelContent(Source.SAKSNUMMER, 'Saksnummer'), | ||
], | ||
}, | ||
|
||
createMaltekstseksjon(TemplateSections.INTRODUCTION), | ||
createMaltekstseksjon(TemplateSections.AVGJOERELSE), | ||
createMaltekstseksjon(TemplateSections.ANFOERSLER), | ||
createMaltekstseksjon(TemplateSections.OPPLYSNINGER), | ||
createMaltekstseksjon(TemplateSections.VURDERINGEN), | ||
createMaltekstseksjon(TemplateSections.KONKLUSJON), | ||
createMaltekstseksjon(TemplateSections.ANKEINFO), | ||
createMaltekstseksjon(TemplateSections.SAKSKOSTNADER), | ||
createMaltekstseksjon(TemplateSections.GENERELL_INFO), | ||
|
||
createSignature(), | ||
createFooter(), | ||
createRegelverk(), | ||
]; | ||
|
||
export const BEHANDLING_ETTER_TR_OPPHEVET_TEMPLATE = deepFreeze<IMutableSmartEditorTemplate>({ | ||
templateId: TemplateIdEnum.BEHANDLING_ETTER_TR_OPPHEVET_VEDTAK, | ||
tittel: 'Vedtak/beslutning (Behandling etter Trygderetten har opphevet)', | ||
richText: INITIAL_SLATE_VALUE, | ||
dokumentTypeId: DistribusjonsType.VEDTAKSBREV, | ||
}); |
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