Skip to content

Commit

Permalink
Only show 'Bruk forkortede navn' checkbox if medunderskriver is inclu…
Browse files Browse the repository at this point in the history
…ded (or signature is not anonymous)
  • Loading branch information
eriksson-daniel committed Jan 14, 2025
1 parent 5844b69 commit eff9eda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/plate/components/signature/signature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export const Signature = (props: PlateElementProps<SignatureElement>) => {

const isRolAnswers = templateId === TemplateIdEnum.ROL_ANSWERS;

const { children, element, editor } = props;
const hasMedunderskriver = oppgave.medunderskriver.employee !== null;
const showMedunderskriverCheckbox = hasMedunderskriver && !isRolAnswers;
const showForkortedeNavnCheckbox = hasMedunderskriver || !signature.anonymous;
const showForkortedeNavnCheckbox = element.includeMedunderskriver || !signature.anonymous;
const showSuffixCheckbox = !(signature.anonymous || isRolAnswers);
const showUseMyNameCheckbox = oppgave.avsluttetAvSaksbehandlerDate !== null;

const hideAll = !(showForkortedeNavnCheckbox || showSuffixCheckbox || hasMedunderskriver);

const { children, element, editor } = props;
const overriddenWithSelf = element.overriddenSaksbehandler === user.navIdent;

const options: SetNodesOptions = { at: [], voids: true, mode: 'lowest', match: (n) => n === element };
Expand Down

0 comments on commit eff9eda

Please sign in to comment.