New Admin Dashboard
This commit is contained in:
@@ -15,6 +15,7 @@ const showMembersNav = computed(() => {
|
||||
const showMemberRelationsNav = computed(() => {
|
||||
return tenantExtraModules.value.includes("verein") && has("members")
|
||||
})
|
||||
const isAdmin = computed(() => Boolean(auth.user?.is_admin))
|
||||
const tenantFeatures = computed(() => auth.activeTenantData?.features || {})
|
||||
const featureEnabled = (key) => tenantFeatures.value?.[key] !== false
|
||||
|
||||
@@ -248,6 +249,11 @@ const links = computed(() => {
|
||||
to: "/settings/tenant",
|
||||
icon: "i-heroicons-building-office",
|
||||
} : null,
|
||||
isAdmin.value ? {
|
||||
label: "Administration",
|
||||
to: "/settings/admin",
|
||||
icon: "i-heroicons-shield-check",
|
||||
} : null,
|
||||
featureEnabled("export") ? {
|
||||
label: "Export",
|
||||
to: "/export",
|
||||
|
||||
@@ -4,7 +4,15 @@ import {Preferences} from "@capacitor/preferences";
|
||||
|
||||
export const useAuthStore = defineStore("auth", {
|
||||
state: () => ({
|
||||
user: null as null | { user_id: string; email: string; tenant_id?: string; role?: string },
|
||||
user: null as null | {
|
||||
id?: string;
|
||||
user_id?: string;
|
||||
email: string;
|
||||
tenant_id?: string;
|
||||
role?: string;
|
||||
must_change_password?: boolean;
|
||||
is_admin?: boolean;
|
||||
},
|
||||
profile: null as null | any,
|
||||
tenants: [] as { tenant_id: string; role: string; tenants: { id: string; name: string } }[],
|
||||
permissions: [] as string[],
|
||||
|
||||
Reference in New Issue
Block a user