mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
Adjusted
This commit is contained in:
@@ -8,16 +8,19 @@ import AdminLayout from '../layouts/AdminLayout'
|
||||
import AdminDashboard from '../pages/AdminDashboard'
|
||||
import ProfilePage from '@/components/generic/Profile'
|
||||
|
||||
// Users
|
||||
import UserList from '../pages/users/UserList'
|
||||
import AddUser from '../pages/users/AddStaffUser'
|
||||
import ViewUser from '../pages/users/ViewUser'
|
||||
|
||||
// User Groups
|
||||
import GroupList from '../pages/user_groups/GroupList'
|
||||
import ViewGroup from '../pages/user_groups/ViewGroup'
|
||||
import EditUser from '../pages/users/EditUser'
|
||||
import ArchivedUserList from '../pages/users/ArchivedUserList'
|
||||
import ArchivedGroupList from '../pages/user_groups/ArchivedGroupList'
|
||||
|
||||
// Assets
|
||||
import AddAsset from "../pages/assets/AddAsset";
|
||||
import ArchivedAssets from "../pages/assets/ArchivedAssets";
|
||||
import ViewImageAsset from "../pages/assets/ViewImageAsset";
|
||||
@@ -25,17 +28,32 @@ import ViewVideoAsset from "../pages/assets/ViewVideoAsset";
|
||||
import ViewDocumentAsset from "../pages/assets/ViewDocumentAsset";
|
||||
import AssetList from '../pages/assets/AssetList'
|
||||
import EditAsset from '../pages/assets/EditAsset'
|
||||
|
||||
// Courses
|
||||
import CourseList from '../pages/courses/CourseList'
|
||||
import CreateCourse from '../pages/courses/CreateCourse'
|
||||
import AddCourse from '../pages/courses/AddCourse'
|
||||
import ViewCourse from '../pages/courses/ViewCourse'
|
||||
import EditCourse from '../pages/courses/EditCourse'
|
||||
import CourseDetail from '../pages/courses/CourseDetail'
|
||||
import CreateUnit from '../pages/courses/CreateUnit'
|
||||
import UnitDetail from '../pages/courses/UnitDetail'
|
||||
import CreateLesson from '../pages/courses/CreateLesson'
|
||||
import LessonDetail from '../pages/courses/LessonDetail'
|
||||
import LessonPageBuilder from '../pages/courses/LessonPageBuilder'
|
||||
import EditUnit from '../pages/courses/EditUnit'
|
||||
import EditLesson from '../pages/courses/EditLesson'
|
||||
import ArchivedCourseList from '../pages/courses/ArchivedCourseList'
|
||||
|
||||
// Units
|
||||
import UnitsList from '../pages/courses/units/UnitsList'
|
||||
import AddUnit from '../pages/courses/units/AddUnit'
|
||||
import ViewUnit from '../pages/courses/units/ViewUnit'
|
||||
import EditUnit from '../pages/courses/units/EditUnit'
|
||||
|
||||
// Lessons
|
||||
import LessonsList from '../pages/courses/lessons/LessonsList'
|
||||
import AddLesson from '../pages/courses/lessons/AddLesson'
|
||||
import ViewLesson from '../pages/courses/lessons/ViewLesson'
|
||||
import EditLesson from '../pages/courses/lessons/EditLesson'
|
||||
|
||||
// Lesson Page Builder
|
||||
import LessonPageBuilder from '../pages/courses/lessons/LessonPageBuilder'
|
||||
import ViewLessonPage from '../pages/courses/lessons/ViewLessonPage'
|
||||
import CourseAssessment from '../pages/courses/CourseAssessment'
|
||||
import UnitQuiz from '../pages/courses/units/UnitQuiz'
|
||||
|
||||
|
||||
export const AdminRoutes = {
|
||||
element: <ProtectedRoute allowedRoles={['admin']} />,
|
||||
@@ -93,19 +111,40 @@ export const AdminRoutes = {
|
||||
element: <Outlet />,
|
||||
children: [
|
||||
{ index: true, element: <CourseList /> },
|
||||
{ path: 'create', element: <CreateCourse /> },
|
||||
{ path: ':courseId', element: <CourseDetail /> },
|
||||
{ path: 'archived', element: <ArchivedCourseList /> },
|
||||
{ path: 'add', element: <AddCourse /> },
|
||||
{ path: ':courseId/view', element: <ViewCourse /> },
|
||||
{ path: ':courseId/edit', element: <EditCourse /> },
|
||||
{ path: ':courseId/units/create', element: <CreateUnit /> },
|
||||
{ path: ':courseId/units/:unitId', element: <UnitDetail /> },
|
||||
{ path: ':courseId/units/:unitId/edit', element: <EditUnit /> },
|
||||
{ path: ':courseId/units/:unitId/lessons/create', element: <CreateLesson /> },
|
||||
{ path: ':courseId/units/:unitId/lessons/:lessonId', element: <LessonDetail /> },
|
||||
{ path: ':courseId/units/:unitId/lessons/:lessonId/edit', element: <EditLesson /> },
|
||||
{ path: ':courseId/units/:unitId/lessons/:lessonId/page', element: <LessonPageBuilder /> },
|
||||
{ path: ":courseId/assessment", element: <CourseAssessment /> },
|
||||
|
||||
// Units
|
||||
{
|
||||
path: ":courseId/units",
|
||||
element: <Outlet />,
|
||||
children: [
|
||||
{ index: true, element: <UnitsList /> },
|
||||
{ path: 'add', element: <AddUnit /> },
|
||||
{ path: ':unitId/view', element: <ViewUnit /> },
|
||||
{ path: ':unitId/edit', element: <EditUnit /> },
|
||||
{ path: ":unitId/quiz", element: <UnitQuiz /> },
|
||||
|
||||
// Lessons
|
||||
{
|
||||
path: ":unitId/lessons",
|
||||
element: <Outlet />,
|
||||
children: [
|
||||
{ index: true, element: <LessonsList /> },
|
||||
{ path: 'add', element: <AddLesson /> },
|
||||
{ path: ':lessonId/view', element: <ViewLesson /> },
|
||||
{ path: ':lessonId/edit', element: <EditLesson /> },
|
||||
{ path: ':lessonId/page', element: <LessonPageBuilder /> },
|
||||
{ path: ':lessonId/page/view', element: <ViewLessonPage /> },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
// Add here
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user