diff --git a/apps/portal/components/AppLauncher.vue b/apps/portal/components/AppLauncher.vue index b7c0745..b322b1f 100644 --- a/apps/portal/components/AppLauncher.vue +++ b/apps/portal/components/AppLauncher.vue @@ -9,6 +9,7 @@ import type { IconName } from './UiIcon.vue' const launcher = useAppLauncher() const route = useRoute() const partnerMode = usePartnerMode() +const { isTenantAdmin } = useMe() interface Tile { key: string @@ -38,8 +39,15 @@ const tiles = computed(() => { { key: 'cal', name: 'Kalender', icon: 'calendar', ext: 'cal.dezky.com' }, { key: 'contacts', name: 'Kontakter', icon: 'users', ext: 'contacts.dezky.com' }, ] - if (isAdmin) { - base.push({ key: 'admin', name: 'Admin', icon: 'shield', ext: 'admin.dezky.com', current: !isPartner }) + // Admin tile is the entry point to the workspace-admin surface. Show it to any + // tenant admin/owner (so they can get TO /admin from the personal shell), not + // only when already on the admin section. Marked "HERE" when on /admin. Pair it + // with a Personal tile so the launcher is a clean two-way toggle between the + // admin and personal surfaces — clicking either crosses over, "HERE" shows + // which side you're on. + if (isAdmin || isTenantAdmin.value) { + base.push({ key: 'home', name: 'Personal', icon: 'home', ext: 'app.dezky.com', current: section.value === 'user' }) + base.push({ key: 'admin', name: 'Admin', icon: 'shield', ext: 'admin.dezky.com', current: isAdmin && !isPartner }) } if (isPartner) { base.push({ key: 'partner', name: 'Partner', icon: 'briefcase', ext: 'partner.nordicmsp.dk', current: true }) @@ -51,6 +59,7 @@ const tiles = computed(() => { const toast = useToast() function open(t: Tile) { launcher.hide() + if (t.key === 'home') return navigateTo('/') if (t.key === 'admin') return navigateTo('/admin') if (t.key === 'partner') return navigateTo('/partner') toast.info(`Opening ${t.name}…`, t.ext) @@ -73,7 +82,7 @@ onMounted(() => {
Apps -
Open in new tab
+
Jump to