You've already forked isop-mirror
feat: add admin, company, and student dashboard pages with initial template structure
This commit is contained in:
3
frontend/app/pages/dashboard/admin.vue
Normal file
3
frontend/app/pages/dashboard/admin.vue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
3
frontend/app/pages/dashboard/company.vue
Normal file
3
frontend/app/pages/dashboard/company.vue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
@@ -1,3 +1,20 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { Role } from '~/types/role';
|
||||||
|
import type { User } from '~/types/user';
|
||||||
|
|
||||||
|
const user = useSanctumUser<User>();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (user.value?.role === Role.ADMIN) {
|
||||||
|
router.push('/dashboard/admin');
|
||||||
|
} else if (user.value?.role === Role.STUDENT) {
|
||||||
|
router.push('/dashboard/student');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div></div>
|
<div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
3
frontend/app/pages/dashboard/student.vue
Normal file
3
frontend/app/pages/dashboard/student.vue
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
Reference in New Issue
Block a user