diff --git a/apps/app/src/layouts/components/DefaultLayoutWithVerticalNav.vue b/apps/app/src/layouts/components/DefaultLayoutWithVerticalNav.vue index d9d855ab..a80c309e 100644 --- a/apps/app/src/layouts/components/DefaultLayoutWithVerticalNav.vue +++ b/apps/app/src/layouts/components/DefaultLayoutWithVerticalNav.vue @@ -25,27 +25,25 @@ const navItems = computed(() => { const orgName = authStore.currentOrganisation?.name ?? 'Beheer' let orgItems = orgNavItems.map(item => { - if ('heading' in item && item.heading === 'Beheer') + if ('heading' in item && item.heading === 'Beheer') return { ...item, heading: orgName } - - -return item + + return item }) // During impersonation: hide org-dependent items if user has no organisation if (impersonationStore.isImpersonating && !hasOrganisation.value) { orgItems = orgItems.filter(item => { - if ('heading' in item) -return false - -return 'to' in item && item.to?.name === 'dashboard' + if ('heading' in item) + return false + + return 'to' in item && item.to?.name === 'dashboard' }) } // Platform items: only for super_admin AND only when NOT impersonating - if (authStore.isSuperAdmin && !impersonationStore.isImpersonating) + if (authStore.isSuperAdmin && !impersonationStore.isImpersonating) return [...orgItems, ...platformNavItems] - return orgItems })