-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IS-2649: Show content of oppfolgingsoppgave in oversikt
- Loading branch information
1 parent
d23c1e5
commit 6310dd1
Showing
12 changed files
with
192 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from 'react'; | ||
import { BodyLong, BodyShort, Label, Modal } from '@navikt/ds-react'; | ||
import { | ||
oppfolgingsgrunnToString, | ||
OppfolgingsoppgaveDTO, | ||
} from '@/api/types/personoversiktTypes'; | ||
import { toReadableDate } from '@/utils/dateUtils'; | ||
|
||
const texts = { | ||
header: 'Oppfølgingsoppgave', | ||
oppfolgingsgrunn: 'Oppfølgingsgrunn', | ||
frist: 'Frist', | ||
}; | ||
|
||
interface Props { | ||
isOpen: boolean; | ||
setOpen: (open: boolean) => void; | ||
oppfolgingsoppgave: OppfolgingsoppgaveDTO; | ||
sykmeldtNavn: string; | ||
} | ||
|
||
export default function OppfolgingsoppgaveModal({ | ||
isOpen, | ||
setOpen, | ||
oppfolgingsoppgave, | ||
sykmeldtNavn, | ||
}: Props) { | ||
return ( | ||
<Modal | ||
closeOnBackdropClick | ||
className="w-full max-w-[50rem]" | ||
aria-label="oppfølgingsoppgave" | ||
open={isOpen} | ||
onClose={() => setOpen(false)} | ||
header={{ | ||
label: sykmeldtNavn, | ||
heading: texts.header, | ||
}} | ||
> | ||
<Modal.Body> | ||
<Label size="small" as="p"> | ||
{texts.oppfolgingsgrunn} | ||
</Label> | ||
<BodyShort className="mb-4"> | ||
{oppfolgingsgrunnToString(oppfolgingsoppgave.oppfolgingsgrunn)} | ||
</BodyShort> | ||
<BodyLong className="mb-4">{oppfolgingsoppgave.tekst}</BodyLong> | ||
<Label size="small" as="p"> | ||
{texts.frist} | ||
</Label> | ||
<BodyShort>{toReadableDate(oppfolgingsoppgave.frist)}</BodyShort> | ||
</Modal.Body> | ||
</Modal> | ||
); | ||
} |
Oops, something went wrong.