Merge branch 'develop' into milestone/ff-admin-unit

# Conflicts:
#	src/stores/admin/navigation.ts
This commit is contained in:
Julian Krauser 2025-05-20 18:55:02 +02:00
commit b6e80b358a
62 changed files with 248 additions and 477 deletions

View file

@ -48,7 +48,7 @@ export const useNavigationStore = defineStore("navigation", {
updateTopLevel() {
const abilityStore = useAbilityStore();
this.topLevel = [
...(abilityStore.canSection("read", "club")
...(abilityStore.canAccessSection("club")
? [
{
key: "club",
@ -57,7 +57,7 @@ export const useNavigationStore = defineStore("navigation", {
} as topLevelNavigationModel,
]
: []),
...(abilityStore.canSection("read", "unit")
...(abilityStore.canAccessSection("unit")
? [
{
key: "unit",
@ -66,7 +66,7 @@ export const useNavigationStore = defineStore("navigation", {
} as topLevelNavigationModel,
]
: []),
...(abilityStore.canSection("read", "configuration")
...(abilityStore.canAccessSection("configuration")
? [
{
key: "configuration",
@ -75,7 +75,7 @@ export const useNavigationStore = defineStore("navigation", {
} as topLevelNavigationModel,
]
: []),
...(abilityStore.canSection("read", "management")
...(abilityStore.canAccessSection("management")
? [
{
key: "management",
@ -156,7 +156,8 @@ export const useNavigationStore = defineStore("navigation", {
this.activeNavigationObject.main.findIndex((e) => e.key == this.activeLink) == -1 ||
this.activeLink == "default"
) {
let link = this.activeNavigationObject.main[0].key;
let link = this.activeNavigationObject.main.filter((m) => !m.key.startsWith("divider"))[0].key;
this.activeLink = link;
router.push({ name: `admin-${this.activeNavigation}-${link}` });
}
},