fix
Deploy banu-front / deploy (push) Successful in 1m27s

This commit is contained in:
sajjadtalkhabi
2026-07-07 17:36:43 +03:30
parent b9ef684b51
commit 38a396ba21
89 changed files with 1815 additions and 478 deletions
@@ -1,3 +1,4 @@
import { ROLE_HOME_ROUTES } from '@/enums'
import { useAuthStore } from '@/store/auth'
import { useRoute, useRouter } from 'vue-router'
@@ -12,8 +13,7 @@ export const useRedirectAfterLogin = () => {
router.push(redirect).catch(() => router.push('/'))
return
}
const target =
auth.role === 'admin' ? { name: 'admin-dashboard' } : { name: 'student-dashboard' }
const target = { name: ROLE_HOME_ROUTES[auth.role] || 'student-dashboard' }
router.push(target).catch(() => router.push('/'))
}
}