Skip to content

Commit

Permalink
endret navn på enheter til enhetsnumre
Browse files Browse the repository at this point in the history
  • Loading branch information
di0nys1us committed Feb 15, 2024
1 parent 4ac428b commit ecacd33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/src/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Lenke = styled.a`
`

export const Toppmeny: React.FC = () => {
const { erInnlogget, enheter, ...rest } = useInnloggetSaksbehandler()
const { erInnlogget, enhetsnumre, ...rest } = useInnloggetSaksbehandler()
const saksbehandler = erInnlogget ? rest : { navn: '', navIdent: '' }
const { setFodselsnummer } = usePersonContext()
const navigate = useNavigate()
Expand Down
2 changes: 1 addition & 1 deletion client/src/mocks/data/SaksbehandlerStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function lagSaksbehandler(saksbehandler: Partial<InnloggetSaksbehandler>): Innlo
epost: '',
navIdent: '',
grupper: [Gruppe.HOTSAK_BRUKERE, Gruppe.BRILLEADMIN_BRUKERE],
enheter: ['2970', '4710', '4711'],
enhetsnumre: ['2970', '4710', '4711'],
erInnlogget: true,
...saksbehandler,
}
Expand Down
8 changes: 4 additions & 4 deletions client/src/state/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface InnloggetSaksbehandler {
epost: string
navIdent: string
grupper: Gruppe[]
enheter: string[]
enhetsnumre: string[]
erInnlogget?: boolean
}

Expand All @@ -34,20 +34,20 @@ const innloggetSaksbehandlerState = atom<InnloggetSaksbehandler>({
epost: '',
navIdent: '',
grupper: [],
enheter: [],
enhetsnumre: [],
erInnlogget: undefined,
},
})

const visOppgavelisteTabsState = selector<boolean>({
key: 'VisOppgavelisteTabs',
get: ({ get }) => {
const { grupper, enheter } = get(innloggetSaksbehandlerState)
const { grupper, enhetsnumre } = get(innloggetSaksbehandlerState)
return (
window.appSettings.MILJO !== 'prod-gcp' ||
grupper.includes(Gruppe.TEAMDIGIHOT) ||
grupper.includes(Gruppe.BRILLEADMIN_BRUKERE) ||
enheter.includes(Enhet.NAV_VIKAFOSSEN)
enhetsnumre.includes(Enhet.NAV_VIKAFOSSEN)
)
},
})
Expand Down

0 comments on commit ecacd33

Please sign in to comment.