-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IS-2998: Add document for oppfolgingsplan foresporsel
- Loading branch information
eirikdahlen
committed
Jan 27, 2025
1 parent
eddf300
commit dcef942
Showing
4 changed files
with
156 additions
and
4 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
src/hooks/oppfolgingsplan/useOppfolgingsplanForesporselDocument.ts
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,61 @@ | ||
import { useDocumentComponents } from "@/hooks/useDocumentComponents"; | ||
import { DocumentComponentDto } from "@/data/documentcomponent/documentComponentTypes"; | ||
import { | ||
createHeaderH1, | ||
createParagraph, | ||
} from "@/utils/documentComponentUtils"; | ||
import { tilLesbarDatoMedArstall } from "@/utils/datoUtils"; | ||
|
||
export type ForesporselDocumentValues = { | ||
narmesteLeder: string; | ||
virksomhetNavn: string; | ||
}; | ||
|
||
export function useOppfolgingsplanForesporselDocument() { | ||
const { getIntroGjelder } = useDocumentComponents(); | ||
|
||
function getForesporselDocument( | ||
values: ForesporselDocumentValues | ||
): DocumentComponentDto[] { | ||
return [ | ||
createHeaderH1(oppfolgingsplanForesporselTexts.title), | ||
createParagraph(oppfolgingsplanForesporselTexts.dato), | ||
getIntroGjelder(), | ||
createParagraph( | ||
oppfolgingsplanForesporselTexts.mottaker( | ||
values.narmesteLeder, | ||
values.virksomhetNavn | ||
) | ||
), | ||
createParagraph(oppfolgingsplanForesporselTexts.body.hei), | ||
createParagraph( | ||
oppfolgingsplanForesporselTexts.body.info1, | ||
oppfolgingsplanForesporselTexts.body.info2 | ||
), | ||
createParagraph(oppfolgingsplanForesporselTexts.body.kontakt), | ||
createParagraph(oppfolgingsplanForesporselTexts.hilsen), | ||
createParagraph(oppfolgingsplanForesporselTexts.ikkeSvar), | ||
]; | ||
} | ||
|
||
return { | ||
getForesporselDocument, | ||
}; | ||
} | ||
|
||
const oppfolgingsplanForesporselTexts = { | ||
title: "Nav ber om oppfølgingsplan fra arbeidsgiver", | ||
dato: `Dato sendt: ${tilLesbarDatoMedArstall(new Date())}`, | ||
mottaker: (narmesteLeder: string, virksomhetNavn: string) => | ||
`Mottaker: ${narmesteLeder}, ${virksomhetNavn}`, | ||
body: { | ||
hei: "Hei,", | ||
info1: | ||
"Nav ber om at du sender inn oppfølgingsplan for en av dine ansatte som er sykmeldt.", | ||
info2: | ||
"Logg inn på 'Min side - arbeidsgiver'. I 'bjella' ser du hvem det gjelder.", | ||
kontakt: "Har du spørsmål, kan du kontakte oss på 55 55 33 36.", | ||
}, | ||
hilsen: "Vennlig hilsen Nav.", | ||
ikkeSvar: "Du kan ikke svare på denne meldingen.", | ||
}; |
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,59 @@ | ||
import { | ||
DocumentComponentDto, | ||
DocumentComponentType, | ||
} from "@/data/documentcomponent/documentComponentTypes"; | ||
import { tilLesbarDatoMedArstall } from "@/utils/datoUtils"; | ||
import { ForesporselDocumentValues } from "@/hooks/oppfolgingsplan/useOppfolgingsplanForesporselDocument"; | ||
import { | ||
ARBEIDSTAKER_DEFAULT, | ||
ARBEIDSTAKER_DEFAULT_FULL_NAME, | ||
} from "@/mocks/common/mockConstants"; | ||
|
||
export const getExpectedForesporselDocument = ({ | ||
narmesteLeder, | ||
virksomhetNavn, | ||
}: ForesporselDocumentValues): DocumentComponentDto[] => { | ||
return [ | ||
{ | ||
texts: ["Nav ber om oppfølgingsplan fra arbeidsgiver"], | ||
type: DocumentComponentType.HEADER_H1, | ||
}, | ||
{ | ||
texts: [`Dato sendt: ${tilLesbarDatoMedArstall(new Date())}`], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: [ | ||
`Gjelder ${ARBEIDSTAKER_DEFAULT_FULL_NAME}, f.nr. ${ARBEIDSTAKER_DEFAULT.personIdent}`, | ||
], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: [`Mottaker: ${narmesteLeder}, ${virksomhetNavn}`], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: ["Hei,"], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: [ | ||
"Nav ber om at du sender inn oppfølgingsplan for en av dine ansatte som er sykmeldt.", | ||
"Logg inn på 'Min side - arbeidsgiver'. I 'bjella' ser du hvem det gjelder.", | ||
], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: ["Har du spørsmål, kan du kontakte oss på 55 55 33 36."], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: ["Vennlig hilsen Nav."], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
{ | ||
texts: ["Du kan ikke svare på denne meldingen."], | ||
type: DocumentComponentType.PARAGRAPH, | ||
}, | ||
]; | ||
}; |