28 lines
1.0 KiB
Vue
28 lines
1.0 KiB
Vue
<script setup>
|
|
import { setPageLayout } from "#app"
|
|
import DashboardHome from "~/components/DashboardHome.vue"
|
|
|
|
setPageLayout("default")
|
|
const auth = useAuthStore()
|
|
</script>
|
|
|
|
<template>
|
|
<DashboardHome v-if="auth.activeTenant > 0" :key="auth.activeTenant" />
|
|
<template v-else>
|
|
<UDashboardNavbar title="Home" />
|
|
<UDashboardPanelContent>
|
|
<UCard class="mx-auto mt-8 max-w-lg">
|
|
<div class="space-y-4">
|
|
<h1 class="text-lg font-semibold">Mandant auswählen</h1>
|
|
<template v-if="auth.tenants.length">
|
|
<p class="text-sm text-muted">Wähle zuerst einen Mandanten, um dessen Dashboard zu laden.</p>
|
|
<TenantDropdown class="w-full" />
|
|
</template>
|
|
<p v-else class="text-sm text-muted">Deinem Benutzer ist noch kein Mandant zugeordnet.</p>
|
|
<UButton v-if="auth.user?.is_admin" to="/administration/tenants" variant="outline">Mandanten verwalten</UButton>
|
|
</div>
|
|
</UCard>
|
|
</UDashboardPanelContent>
|
|
</template>
|
|
</template>
|