-
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.
UPDATE: create endpoint for tiltak and add view tiltak accordion list…
… content
- Loading branch information
1 parent
7618540
commit 8b39ac7
Showing
4 changed files
with
51 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { BodyLong, Label } from '@navikt/ds-react' | ||
import { ITiltak } from '../../constants' | ||
|
||
interface IProps { | ||
tiltak: ITiltak | ||
} | ||
|
||
export const TiltakView = (props: IProps) => { | ||
const { tiltak } = props | ||
|
||
return ( | ||
<div> | ||
<div className="my-3"> | ||
<BodyLong>{tiltak.beskrivelse}</BodyLong> | ||
</div> | ||
<div className="flex gap-2"> | ||
<Label>Tiltaksansvarlig</Label> | ||
<BodyLong>{tiltak.ansvarlig.fullName}</BodyLong> | ||
</div> | ||
<div className="mt-3 flex gap-2"> | ||
<Label>Tiltaksfrist</Label> | ||
<BodyLong>{tiltak.frist}</BodyLong> | ||
</div> | ||
|
||
<div className="mt-3"> | ||
<Label>Tiltaket er gjenbrukt ved følgende scenarioer: </Label> | ||
{tiltak.risikoscenarioIds.length === 0 && ( | ||
<BodyLong>Tiltaket er ikke gjenbrukt ved andre risikoscenarioer</BodyLong> | ||
)} | ||
|
||
{tiltak.risikoscenarioIds.length !== 0 && | ||
tiltak.risikoscenarioIds.map((id) => <BodyLong key={id}>id</BodyLong>)} | ||
</div> | ||
</div> | ||
) | ||
} | ||
export default TiltakView |