feat: show active organisation name as sidebar section title
Made-with: Cursor
This commit is contained in:
@@ -5,10 +5,19 @@ import { useAuthStore } from '@/stores/useAuthStore'
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const navItems = computed(() => {
|
||||
const orgName = authStore.currentOrganisation?.name ?? 'Beheer'
|
||||
|
||||
const orgItems = orgNavItems.map(item => {
|
||||
if ('heading' in item && item.heading === 'Beheer') {
|
||||
return { ...item, heading: orgName }
|
||||
}
|
||||
return item
|
||||
})
|
||||
|
||||
if (authStore.isSuperAdmin) {
|
||||
return [...orgNavItems, ...platformNavItems]
|
||||
return [...orgItems, ...platformNavItems]
|
||||
}
|
||||
return orgNavItems
|
||||
return orgItems
|
||||
})
|
||||
|
||||
// Components
|
||||
|
||||
Reference in New Issue
Block a user