change: ui sorting

This commit is contained in:
Julian Krauser 2025-01-12 18:17:50 +01:00
parent 3da0f4cd49
commit 22359c3bea
5 changed files with 130 additions and 114 deletions

View file

@ -98,30 +98,32 @@ export const useNavigationStore = defineStore("navigation", {
settings: {
mainTitle: "Einstellungen",
main: [
...(abilityStore.can("read", "settings", "qualification")
? [{ key: "qualification", title: "Qualifikationen" }]
: []),
{ key: "divider1", title: "Mitgliederdaten" },
...(abilityStore.can("read", "settings", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
...(abilityStore.can("read", "settings", "executive_position")
? [{ key: "executive_position", title: "Vereinsämter" }]
: []),
...(abilityStore.can("read", "settings", "communication_type")
? [{ key: "communication_type", title: "Kommunikationsarten" }]
: []),
...(abilityStore.can("read", "settings", "membership_status")
? [{ key: "membership_status", title: "Mitgliedsstatus" }]
: []),
...(abilityStore.can("read", "settings", "calendar_type")
? [{ key: "calendar_type", title: "Terminarten" }]
...(abilityStore.can("read", "settings", "qualification")
? [{ key: "qualification", title: "Qualifikationen" }]
: []),
...(abilityStore.can("read", "settings", "executive_position")
? [{ key: "executive_position", title: "Vereinsämter" }]
: []),
{ key: "divider2", title: "Einstellungen" },
...(abilityStore.can("read", "settings", "newsletter_config")
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
: []),
...(abilityStore.can("read", "settings", "query") ? [{ key: "query_store", title: "Query Store" }] : []),
...(abilityStore.can("read", "settings", "template") ? [{ key: "template", title: "Templates" }] : []),
...(abilityStore.can("read", "settings", "template_usage")
? [{ key: "template_usage", title: "Template-Verwendung" }]
: []),
...(abilityStore.can("read", "settings", "newsletter_config")
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
...(abilityStore.can("read", "settings", "calendar_type")
? [{ key: "calendar_type", title: "Terminarten" }]
: []),
...(abilityStore.can("read", "settings", "query") ? [{ key: "query_store", title: "Query Store" }] : []),
],
},
user: {

View file

@ -16,13 +16,15 @@
/>
</template>
<template #list>
<RoutingLink
v-for="item in activeNavigationObject.main"
:key="item.key"
:title="item.title"
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
:active="activeLink == item.key"
/>
<div v-for="item in activeNavigationObject.main" :key="item.key">
<RoutingLink
v-if="!item.key.includes('divider')"
:title="item.title"
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
:active="activeLink == item.key"
/>
<p v-else class="pt-4 border-b border-gray-300">{{ item.title }}</p>
</div>
</template>
</SidebarTemplate>
</template>