diff --git a/frontend/src/components/smart-editor/new-document/new-document.tsx b/frontend/src/components/smart-editor/new-document/new-document.tsx index 832ed0066..850ee14d6 100644 --- a/frontend/src/components/smart-editor/new-document/new-document.tsx +++ b/frontend/src/components/smart-editor/new-document/new-document.tsx @@ -6,13 +6,13 @@ import { useHasDocumentsAccess } from '@app/hooks/use-has-documents-access'; import { useIsFeilregistrert } from '@app/hooks/use-is-feilregistrert'; import { useIsRol } from '@app/hooks/use-is-rol'; import { useIsSaksbehandler } from '@app/hooks/use-is-saksbehandler'; -import { NOTAT_TEMPLATE, getGenereltBrevTemplate } from '@app/plate/templates/simple-templates'; import { ANKE_I_TRYGDERETTEN_TEMPLATES, ANKE_TEMPLATES, BEHANDLING_ETTER_TR_OPPHEVET_TEMPLATES, KLAGE_TEMPLATES, OMGJØRINGSKRAVVEDTAK_TEMPLATES, + getFinishedBehandlingTemplates, } from '@app/plate/templates/templates'; import { useCreateSmartDocumentMutation } from '@app/redux-api/collaboration'; import { useGetDocumentsQuery } from '@app/redux-api/oppgaver/queries/documents'; @@ -113,7 +113,7 @@ const useTemplates = (oppgave: IOppgavebehandling | undefined) => { const { isAvsluttetAvSaksbehandler, typeId } = oppgave; if (isAvsluttetAvSaksbehandler) { - return [getGenereltBrevTemplate(false, user.navIdent), NOTAT_TEMPLATE]; + return getFinishedBehandlingTemplates(user.navIdent); } if (isSaksbehandler || isRol) { diff --git a/frontend/src/plate/templates/templates.ts b/frontend/src/plate/templates/templates.ts index 919dcdb15..9e1de8645 100644 --- a/frontend/src/plate/templates/templates.ts +++ b/frontend/src/plate/templates/templates.ts @@ -11,6 +11,7 @@ import { ROL_ANSWERS_TEMPLATE, ROL_QUESTIONS_TEMPLATE, ROL_TILSVARSBREV_TEMPLATE, + getGenereltBrevTemplate, } from '@app/plate/templates/simple-templates'; import { SVAR_PÅ_INNSYNSBEGJÆRING_TEMPLATE } from '@app/plate/templates/svar-på-innsynsbegjæring'; @@ -77,3 +78,7 @@ export const OMGJØRINGSKRAVVEDTAK_TEMPLATES = [ FORENKLET_BESLUTNING_OM_IKKE_Å_OMGJØRE_TEMPLATE, SVAR_PÅ_INNSYNSBEGJÆRING_TEMPLATE, ]; + +export const getFinishedBehandlingTemplates = (navIdent: string) => { + return [getGenereltBrevTemplate(false, navIdent), NOTAT_TEMPLATE, SVAR_PÅ_INNSYNSBEGJÆRING_TEMPLATE]; +};