route rename
This commit is contained in:
parent
9d96a3f921
commit
84e1d42041
21 changed files with 102 additions and 95 deletions
|
@ -1,12 +1,11 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import router from "@/router";
|
||||
import type { PermissionSection } from "../../types/permissionTypes";
|
||||
|
||||
export interface navigationModel {
|
||||
club: navigationSplitModel;
|
||||
settings: navigationSplitModel;
|
||||
user: navigationSplitModel;
|
||||
}
|
||||
export type navigationModel = {
|
||||
[key in topLevelNavigationType]: navigationSplitModel;
|
||||
};
|
||||
|
||||
export interface navigationSplitModel {
|
||||
topTitle?: string;
|
||||
|
@ -15,7 +14,7 @@ export interface navigationSplitModel {
|
|||
main: Array<navigationLinkModel>;
|
||||
}
|
||||
|
||||
export type topLevelNavigationType = "club" | "settings" | "user";
|
||||
export type topLevelNavigationType = PermissionSection;
|
||||
|
||||
export interface topLevelNavigationModel {
|
||||
key: topLevelNavigationType;
|
||||
|
@ -61,8 +60,8 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
...(abilityStore.canSection("read", "configuration")
|
||||
? [
|
||||
{
|
||||
key: "settings",
|
||||
title: "Einstellungen",
|
||||
key: "configuration",
|
||||
title: "Konfiguration",
|
||||
levelDefault: "salutation",
|
||||
} as topLevelNavigationModel,
|
||||
]
|
||||
|
@ -70,8 +69,8 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
...(abilityStore.canSection("read", "management")
|
||||
? [
|
||||
{
|
||||
key: "user",
|
||||
title: "Benutzer",
|
||||
key: "management",
|
||||
title: "Verwaltung",
|
||||
levelDefault: "user",
|
||||
} as topLevelNavigationModel,
|
||||
]
|
||||
|
@ -95,7 +94,7 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
...(abilityStore.can("read", "club", "query") ? [{ key: "query_builder", title: "Query Builder" }] : []),
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
configuration: {
|
||||
mainTitle: "Einstellungen",
|
||||
main: [
|
||||
{ key: "divider1", title: "Mitgliederdaten" },
|
||||
|
@ -131,7 +130,7 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
: []),
|
||||
],
|
||||
},
|
||||
user: {
|
||||
management: {
|
||||
mainTitle: "Benutzer",
|
||||
main: [
|
||||
...(abilityStore.can("read", "management", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue