diff --git a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/Bestillingsdata.tsx b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/Bestillingsdata.tsx index 6bca63017a0..3275a7ed80d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/Bestillingsdata.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/bestilling/sammendrag/Bestillingsdata.tsx @@ -52,6 +52,7 @@ import { Krrstub } from '@/components/fagsystem/krrstub/bestilling/Krrstub' import { Medl } from '@/components/fagsystem/medl/bestilling/Medl' import { Udistub } from '@/components/fagsystem/udistub/bestilling/Udistub' import { Dokarkiv } from '@/components/fagsystem/dokarkiv/bestilling/Dokarkiv' +import { Histark } from '@/components/fagsystem/histark/bestilling/Histark' export const BestillingTitle = styled.h4` margin: 5px 0 15px 0; @@ -152,6 +153,7 @@ export const Bestillingsdata = ({ bestilling }: any) => { + ) } diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/HistarkTypes.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/HistarkTypes.tsx new file mode 100644 index 00000000000..241d2f18c42 --- /dev/null +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/HistarkTypes.tsx @@ -0,0 +1,14 @@ +export type HistarkTypes = { + dokumenter: [ + { + temakoder: Array + enhetsnavn: string + startYear: number + endYear: number + skanningsTidspunkt: Date + skanner: string + skannested: string + tittel: string + }, + ] +} diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/bestilling/Histark.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/bestilling/Histark.tsx new file mode 100644 index 00000000000..70201c06994 --- /dev/null +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/histark/bestilling/Histark.tsx @@ -0,0 +1,46 @@ +import { isEmpty } from '@/components/fagsystem/pdlf/form/partials/utils' +import { ErrorBoundary } from '@/components/ui/appError/ErrorBoundary' +import { BestillingData, BestillingTitle } from '@/components/bestilling/sammendrag/Bestillingsdata' +import { TitleValue } from '@/components/ui/titleValue/TitleValue' +import { arrayToString, formatDateTime, showKodeverkLabel } from '@/utils/DataFormatter' +import React from 'react' +import { Kodeverk } from '@/components/fagsystem/dokarkiv/form/DokarkivForm' +import { HistarkTypes } from '@/components/fagsystem/histark/HistarkTypes' + +type HistarkProps = { + histark: HistarkTypes +} + +export const Histark = ({ histark }: HistarkProps) => { + if (!histark || isEmpty(histark)) { + return null + } + + const dokument = histark.dokumenter?.[0] + + return ( +
+ + Dokumenter (Histark) + + showKodeverkLabel(Kodeverk.TEMA, kode)), + )} + /> + + + + + + + + + +
+ ) +}