-
Notifications
You must be signed in to change notification settings - Fork 2
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
38e7ce9
commit 6397b09
Showing
3 changed files
with
42 additions
and
2 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
29 changes: 29 additions & 0 deletions
29
...olly-frontend/src/main/js/src/components/fagsystem/pdlf/bestilling/partials/Skjerming.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,29 @@ | ||
import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' | ||
import { BestillingTitle } from '@/components/bestilling/sammendrag/Bestillingsdata' | ||
import React from 'react' | ||
import { TitleValue } from '@/components/ui/titleValue/TitleValue' | ||
import { formatDate } from '@/utils/DataFormatter' | ||
|
||
type SkjermingTypes = { | ||
skjerming: { | ||
egenAnsattDatoFom: string | ||
egenAnsattDatoTom?: string | ||
} | ||
} | ||
export const Skjerming = ({ skjerming }: SkjermingTypes) => { | ||
if (!skjerming) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className="person-visning"> | ||
<ErrorBoundary> | ||
<BestillingTitle>Skjerming</BestillingTitle> | ||
<div className="flexbox--flex-wrap" style={{ marginBottom: '10px' }}> | ||
<TitleValue title="Skjerming fra" value={formatDate(skjerming.egenAnsattDatoFom)} /> | ||
<TitleValue title="Skjerming til" value={formatDate(skjerming.egenAnsattDatoTom)} /> | ||
</div> | ||
</ErrorBoundary> | ||
</div> | ||
) | ||
} |