feat: добавил кабинеты преподавателя и администратора
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 8s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 38s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Successful in 18s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 6s

This commit is contained in:
2026-05-11 01:58:09 +03:00
parent 779b6aba77
commit 610c15c9fd
11 changed files with 399 additions and 90 deletions
+5
View File
@@ -45,6 +45,11 @@ router.beforeEach(async (to) => {
if (!to.meta.public && !auth.isAuthenticated) {
return '/login'
}
if (to.meta.role && auth.user && auth.user.role !== to.meta.role) {
if (auth.user.role === 'teacher') return '/teacher'
if (auth.user.role === 'admin') return '/admin'
return '/'
}
})
export default router