style: прогнать prettier по frontend

This commit is contained in:
2026-05-21 15:52:43 +05:00
parent b0cdf6207c
commit 95b8d97ccf
63 changed files with 1517 additions and 863 deletions
+15 -4
View File
@@ -22,8 +22,14 @@ router.beforeEach(async (to, from, next) => {
const adminStore = useAdminStoreHook();
const hasRoles = adminStore.roles && adminStore.roles.length > 0;
if (hasRoles) {
if (adminStore.forcePasswordChange && to.path !== "/admin/change-password") {
next({ path: "/admin/change-password", query: { redirect: to.fullPath } });
if (
adminStore.forcePasswordChange &&
to.path !== "/admin/change-password"
) {
next({
path: "/admin/change-password",
query: { redirect: to.fullPath },
});
return;
}
// Если маршрут не найден, перейти на 404
@@ -34,14 +40,19 @@ router.beforeEach(async (to, from, next) => {
}
} else {
try {
const { roles, forcePasswordChange } = await adminStore.getAdminInfo();
const { roles, forcePasswordChange } =
await adminStore.getAdminInfo();
const permissionStore = usePermissionStoreHook();
const accessRoutes = permissionStore.generateRoutes(roles);
accessRoutes.forEach((route) => {
router.addRoute(route);
});
if (forcePasswordChange && to.path !== "/admin/change-password") {
next({ path: "/admin/change-password", query: { redirect: to.fullPath }, replace: true });
next({
path: "/admin/change-password",
query: { redirect: to.fullPath },
replace: true,
});
return;
}
next({ ...to, replace: true });