-
Notifications
You must be signed in to change notification settings - Fork 8
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
01268e5
commit edfae8b
Showing
4 changed files
with
79 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { SenOppfolgingFormResponseDTOV2 } from "@/data/senoppfolging/senOppfolgingTypes"; | ||
import { tilLesbarDatoMedArUtenManedNavn } from "@/utils/datoUtils"; | ||
import { BodyShort, Box, Heading, Label } from "@navikt/ds-react"; | ||
import React from "react"; | ||
|
||
const texts = { | ||
heading: "Sykmeldtes svar", | ||
}; | ||
|
||
interface KandidatSvarProps { | ||
svar: SenOppfolgingFormResponseDTOV2; | ||
} | ||
|
||
export function KandidatSvar({ svar }: KandidatSvarProps) { | ||
const svardato = svar && tilLesbarDatoMedArUtenManedNavn(svar.createdAt); | ||
return ( | ||
<Box | ||
background="surface-default" | ||
padding="6" | ||
className="flex flex-col gap-4 mb-2" | ||
> | ||
<Heading size="medium">{texts.heading}</Heading> | ||
<BodyShort size="small">Den sykmeldte svarte {svardato}.</BodyShort> | ||
{svar && | ||
svar?.questionResponses.map((response, index) => ( | ||
<div key={index}> | ||
<Label size="small">{response.questionText}</Label> | ||
<BodyShort size="small">{response.answerText}</BodyShort> | ||
</div> | ||
))} | ||
</Box> | ||
); | ||
} |
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,40 @@ | ||
import { Box, Heading, List, Textarea } from "@navikt/ds-react"; | ||
import { VurderSenOppfolging } from "@/sider/senoppfolging/VurderSenOppfolging"; | ||
import React from "react"; | ||
import { SenOppfolgingKandidatResponseDTO } from "@/data/senoppfolging/senOppfolgingTypes"; | ||
|
||
const texts = { | ||
oppfolging: "Vurder videre oppfølging", | ||
vurderFolgende: "Basert på svarene kan du vurdere følgende", | ||
rutine: [ | ||
"§ 14a-vedtak: Hvis den sykmeldte har svart at han eller hun trenger oppfølging, skal det gjøres et § 14a-vedtak i Arena", | ||
"Dialogmøte: Vurder om det burde kalles inn til et dialogmøte", | ||
"Kontakt bruker: Ta kontakt med den sykmeldte for å avklare behov for videre oppfølging", | ||
"Kontakt arbeidsgiver: Ta kontakt med arbeidsgiver for å avklare muligheter for tilrettelegging", | ||
"Kontakt behandler: Ta kontakt med behandler for å innhente medisinske opplysninger", | ||
"AAP: Vurder om den sykmeldte bør søke om AAP", | ||
], | ||
}; | ||
|
||
interface Props { | ||
kandidat: SenOppfolgingKandidatResponseDTO; | ||
} | ||
|
||
export function Vurdering({ kandidat }: Props) { | ||
return ( | ||
<Box | ||
background="surface-default" | ||
padding="6" | ||
className="flex flex-col gap-4 mb-2" | ||
> | ||
<Heading size="medium">{texts.oppfolging}</Heading> | ||
<List as="ul" title={texts.vurderFolgende} size="small"> | ||
{texts.rutine.map((text, index) => ( | ||
<List.Item key={index}>{text}</List.Item> | ||
))} | ||
</List> | ||
<Textarea label="Begrunnelse (obligatorisk)" /> | ||
{kandidat && <VurderSenOppfolging kandidat={kandidat} />} | ||
</Box> | ||
); | ||
} |