Refactor Protected and Public Routes for Consistent Loading UI; Enhance HomePage with User Company and Branch Details; Update LoginPage Layout; Introduce User Relations in Auth Services

This commit is contained in:
2025-10-03 17:52:56 +05:00
parent 531e2d2e7e
commit 0b024af454
31 changed files with 1770 additions and 115 deletions
+1 -4
View File
@@ -30,9 +30,7 @@ export const registerService = {
// Определить роль для нового пользователя
// Только администраторы могут указывать кастомную роль
const role =
callerRole === "admin" && data.role
? data.role
: DEFAULT_ROLE_NAME;
callerRole === "admin" && data.role ? data.role : DEFAULT_ROLE_NAME;
// Создать пользователя
const newUser = await userService.create({
@@ -45,4 +43,3 @@ export const registerService = {
return userService.sanitize(newUser);
},
};