Skip to content

Commit

Permalink
updated navigation for Ansvarlig
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-randers committed Dec 11, 2024
1 parent 8d5d3ce commit 1b26956
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion vue/src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ onMounted(() => {
// Filter menu items based on roles
if (clientRoles.includes('Admin')) {
menuItems.value = allMenuItems
menuItems.value = allMenuItems.filter(item => item.url !== '/ansvarlig-overview')
} else if (clientRoles.includes('Ny medarbejder')) {
menuItems.value = allMenuItems.filter(item => item.url === '/' || item.url === '/view-opgaver')
} else if (clientRoles.includes('Ansvarlig')) {
menuItems.value = allMenuItems.filter(item => item.url === '/' || item.url === '/ansvarlig-overview')
} else {
menuItems.value = allMenuItems.filter(item => item.url === '/')
}
Expand Down
2 changes: 1 addition & 1 deletion vue/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const routes = [
path: '/ansvarlig-overview',
name: 'AnsvarligOverview',
component: AnsvarligOverview,
meta: { roles: ['Admin'] }
meta: { roles: ['Ansvarlig'] }
}
]

Expand Down

0 comments on commit 1b26956

Please sign in to comment.