new command module

This commit is contained in:
Warunee Tamkoo 2024-09-09 17:26:30 +07:00
parent 612cd87689
commit a750c4924c
13 changed files with 91 additions and 4 deletions

View file

@ -27,6 +27,7 @@ import ModuleKPI from "@/modules/14_KPI/router";
import ModuleDevelopment from "@/modules/15_development/router";
import ModuleSupport from "@/modules/00_support/router";
import ModuleActing from "@/modules/17_acting/router";
import ModuleCommand from "@/modules/18_command/router";
// TODO: ใช้หรือไม่?
import { authenticated } from "@/plugins/auth";
@ -74,6 +75,7 @@ const router = createRouter({
...ModuleDevelopment,
...ModuleSupport,
...ModuleActing,
...ModuleCommand,
],
},
/**
@ -120,11 +122,7 @@ router.beforeEach(async (to, from, next) => {
const checkAuthen = await authenticated();
if (!checkAuthen && to.meta.Auth) {
router.push({ name: "loginMain" });
} else {
next();
}
} else {
next();
}
next();
});