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

@ -12,7 +12,14 @@ export async function abilityAndNavUpdate(to: any, from: any, next: any) {
let section = to.meta.section;
let module = to.meta.module;
if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
if (to.name == "admin-default") {
navigation.activeNavigation = "club";
navigation.activeLink = null;
navigation.updateTopLevel();
navigation.updateNavigation();
NProgress.done();
next();
} else if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
NProgress.done();
navigation.activeNavigation = to.name.split("-")[1];
navigation.activeLink = to.name.split("-")[2];

View file

@ -15,7 +15,7 @@ const router = createRouter({
routes: [
{
path: "/",
redirect: { name: "admin" },
redirect: { name: "admin-default" },
},
{
path: "/login",
@ -76,12 +76,13 @@ const router = createRouter({
path: "/admin",
name: "admin",
component: () => import("@/views/admin/View.vue"),
beforeEnter: [isAuthenticated],
beforeEnter: [isAuthenticated, abilityAndNavUpdate],
children: [
{
path: "",
name: "admin-default",
component: () => import("@/views/admin/ViewSelect.vue"),
beforeEnter: [abilityAndNavUpdate],
},
{
path: "club",