-
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
d1b2471
commit aafc168
Showing
4 changed files
with
58 additions
and
1 deletion.
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
51 changes: 51 additions & 0 deletions
51
apps/dolly-frontend/src/main/js/src/components/fagsystem/dokarkiv/bestilling/Dokarkiv.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,51 @@ | ||
import React from 'react' | ||
import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' | ||
import { BestillingData, BestillingTitle } from '@/components/bestilling/sammendrag/Bestillingsdata' | ||
import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' | ||
import { TitleValue } from '@/components/ui/titleValue/TitleValue' | ||
import { oversettBoolean, showLabel } from '@/utils/DataFormatter' | ||
import { Kodeverk } from '@/components/fagsystem/dokarkiv/form/DokarkivForm' | ||
import { Journalpost } from '@/service/services/JoarkDokumentService' | ||
|
||
type DokarkivProps = { | ||
dokarkiv: Journalpost | ||
} | ||
|
||
export const Dokarkiv = ({ dokarkiv }: DokarkivProps) => { | ||
if (!dokarkiv || isEmpty(dokarkiv)) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className="person-visning"> | ||
<ErrorBoundary> | ||
<BestillingTitle>Dokumenter (Joark)</BestillingTitle> | ||
<BestillingData> | ||
<TitleValue title="Brevkode" value={dokarkiv.dokumenter?.[0]?.brevkode} /> | ||
<TitleValue title="Tittel" value={dokarkiv.tittel} /> | ||
<TitleValue title="Tema" value={dokarkiv.tema} kodeverk={Kodeverk.TEMA} /> | ||
<TitleValue | ||
title="Behandlingstema" | ||
value={dokarkiv.behandlingstema} | ||
kodeverk={Kodeverk.BEHANDLINGSTEMA} | ||
/> | ||
<TitleValue title="Journalførende enhet" value={dokarkiv.journalfoerendeEnhet} /> | ||
<TitleValue title="Sakstype" value={showLabel('sakstype', dokarkiv.sak?.sakstype)} /> | ||
<TitleValue | ||
title="Fagsaksystem" | ||
value={showLabel('fagsaksystem', dokarkiv.sak?.fagsaksystem)} | ||
/> | ||
<TitleValue title="Fagsak-ID" value={dokarkiv.sak?.fagsakId} /> | ||
<TitleValue | ||
title="Ferdigstill journalpost" | ||
value={oversettBoolean(dokarkiv.ferdigstill)} | ||
/> | ||
<TitleValue title="Avsender type" value={dokarkiv.avsenderMottaker?.idType} /> | ||
<TitleValue title="Avsender ID" value={dokarkiv.avsenderMottaker?.id} /> | ||
<TitleValue title="Avsender navn" value={dokarkiv.avsenderMottaker?.navn} /> | ||
<TitleValue title="Antall vedlegg" value={dokarkiv.vedlegg?.length || '0'} /> | ||
</BestillingData> | ||
</ErrorBoundary> | ||
</div> | ||
) | ||
} |
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