Merge branch 'dev' of ssh://git.codelfi.com:2202/telemedpro/hgh_admin into dev
This commit is contained in:
commit
e422699e7c
@ -4,9 +4,24 @@ const emailRouteComponent = () => import('@/pages/apps/email/index.vue')
|
|||||||
export const redirects = [
|
export const redirects = [
|
||||||
// ℹ️ We are redirecting to different pages based on role.
|
// ℹ️ We are redirecting to different pages based on role.
|
||||||
// NOTE: Role is just for UI purposes. ACL is based on abilities.
|
// NOTE: Role is just for UI purposes. ACL is based on abilities.
|
||||||
|
{
|
||||||
|
path: '/admin',
|
||||||
|
// name: 'index',
|
||||||
|
redirect: to => {
|
||||||
|
// TODO: Get type from backend
|
||||||
|
const userData = useCookie('userData')
|
||||||
|
const userRole = userData.value?.role
|
||||||
|
if (userRole === 'admin')
|
||||||
|
return { name: 'admin-dashboard' }
|
||||||
|
if (userRole === 'client')
|
||||||
|
return { name: 'access-control' }
|
||||||
|
|
||||||
|
return { name: 'login', query: to.query }
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'index',
|
// name: 'index',
|
||||||
redirect: to => {
|
redirect: to => {
|
||||||
// TODO: Get type from backend
|
// TODO: Get type from backend
|
||||||
const userData = useCookie('userData')
|
const userData = useCookie('userData')
|
||||||
|
Loading…
Reference in New Issue
Block a user