Skip to content

Commit

Permalink
REMOVE: virkemiddel page from menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Oct 23, 2023
1 parent 5e9c805 commit 5f3a9ad
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions apps/frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,22 @@ const LoggedInHeader = () => {
)

const kravPages = user.isKraveier()
? [{ label: 'Forvalte og opprette krav', href: '/kravliste' }, { label: 'Forvalte og opprette virkemiddel', href: '/virkemiddelliste' }]
? [{ label: 'Forvalte og opprette krav', href: '/kravliste' },
//{ label: 'Forvalte og opprette virkemiddel', href: '/virkemiddelliste' }
]
: []
const adminPages = user.isAdmin()
? [
{ label: 'Administrere krav', href: '/admin/krav' },
{ label: 'Administrere dokumentasjon', href: '/admin/dokumentasjon' },
{ label: 'Administrere etterlevelse', href: '/admin/etterlevelse' },
{ label: 'Administrere arkivering', href: '/admin/arkiv' },
{ label: intl.audit, href: '/admin/audit' },
{ label: 'Kodeverk', href: '/admin/codelist' },
{ label: intl.questionAndAnswers, href: '/admin/messageslog' },
{ label: intl.notifications, href: '/admin/varsel' },
// { label: intl.settings, href: '/admin/settings', disabled: true },
]
{ label: 'Administrere krav', href: '/admin/krav' },
{ label: 'Administrere dokumentasjon', href: '/admin/dokumentasjon' },
{ label: 'Administrere etterlevelse', href: '/admin/etterlevelse' },
{ label: 'Administrere arkivering', href: '/admin/arkiv' },
{ label: intl.audit, href: '/admin/audit' },
{ label: 'Kodeverk', href: '/admin/codelist' },
{ label: intl.questionAndAnswers, href: '/admin/messageslog' },
{ label: intl.notifications, href: '/admin/varsel' },
// { label: intl.settings, href: '/admin/settings', disabled: true },
]
: []

return (
Expand Down Expand Up @@ -116,8 +118,8 @@ const Menu = (props: { pages: MenuItem[][]; title: React.ReactNode; icon?: React

const allPages = props.pages.length
? props.pages
.filter((p) => p.length)
.reduce((previousValue, currentValue) => [...((previousValue as MenuItem[]) || []), { label: <Dropdown.Menu.Divider /> }, ...(currentValue as MenuItem[])])
.filter((p) => p.length)
.reduce((previousValue, currentValue) => [...((previousValue as MenuItem[]) || []), { label: <Dropdown.Menu.Divider /> }, ...(currentValue as MenuItem[])])
: []

return (
Expand Down Expand Up @@ -171,7 +173,7 @@ const Header = (props: { noSearchBar?: boolean; noLoginButton?: boolean }) => {
}

React.useEffect(() => {
;(async () => {
; (async () => {
await getMeldingByType(MeldingType.SYSTEM).then((r) => {
if (r.numberOfElements > 0) {
setSystemVarsel(r.content[0])
Expand All @@ -187,7 +189,7 @@ const Header = (props: { noSearchBar?: boolean; noLoginButton?: boolean }) => {
<div className="w-full">
<InternalHeader >
<InternalHeader.Title href="/">
Etterlevelse
Etterlevelse
</InternalHeader.Title>
<Spacer />
{!props.noSearchBar && (
Expand All @@ -207,9 +209,8 @@ const Header = (props: { noSearchBar?: boolean; noLoginButton?: boolean }) => {
</div>
{systemVarsel && systemVarsel.meldingStatus === MeldingStatus.ACTIVE && (
<div
className={`flex flex-col items-center py-2 border-b border-t ${
systemVarsel.alertType === 'INFO' ? 'bg-surface-info-subtle border-surface-info' : 'bg-surface-warning-subtle border-surface-warning'
}`}
className={`flex flex-col items-center py-2 border-b border-t ${systemVarsel.alertType === 'INFO' ? 'bg-surface-info-subtle border-surface-info' : 'bg-surface-warning-subtle border-surface-warning'
}`}
aria-label="Systemvarsel"
role="complementary"
>
Expand Down

0 comments on commit 5f3a9ad

Please sign in to comment.