265 lines
7.3 KiB
JavaScript
265 lines
7.3 KiB
JavaScript
// /src/router/routes.js
|
|
import DashboardLayout from '@/layouts/DashboardLayout.vue';
|
|
import AuthLayout from '@/layouts/AuthLayout.vue';
|
|
|
|
export const routes = [
|
|
{
|
|
path: '/login',
|
|
component: AuthLayout,
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'Login',
|
|
component: () => import('@/views/auth/LoginView.vue'),
|
|
meta: { requiresAuth: false }
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/',
|
|
component: DashboardLayout,
|
|
meta: { requiresAuth: true },
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'DashboardHome',
|
|
component: () => import('@/views/dashboard/DashboardHomeView.vue')
|
|
},
|
|
{
|
|
path: 'profile',
|
|
name: 'Profile',
|
|
component: () => import('@/views/profile/ProfileView.vue'),
|
|
meta: { title: 'پروفایل' }
|
|
},
|
|
|
|
// Users
|
|
{
|
|
path: 'users',
|
|
name: 'UserList',
|
|
component: () => import('@/views/users/UserListView.vue')
|
|
},
|
|
{
|
|
path: 'users/create',
|
|
name: 'UserCreate',
|
|
component: () => import('@/views/users/UserFormView.vue')
|
|
},
|
|
{
|
|
path: 'users/edit/:id',
|
|
name: 'UserEdit',
|
|
component: () => import('@/views/users/UserFormView.vue')
|
|
},
|
|
{
|
|
path: 'users/:id',
|
|
name: 'UserDetail',
|
|
component: () => import('@/views/users/UserDetailView.vue')
|
|
},
|
|
|
|
// Professors
|
|
{
|
|
path: 'professors',
|
|
name: 'ProfessorList',
|
|
component: () => import('@/views/professors/ProfessorListView.vue')
|
|
},
|
|
{
|
|
path: 'professors/create',
|
|
name: 'ProfessorCreate',
|
|
component: () => import('@/views/professors/ProfessorFormView.vue')
|
|
},
|
|
{
|
|
path: 'professors/edit/:id',
|
|
name: 'ProfessorEdit',
|
|
component: () => import('@/views/professors/ProfessorFormView.vue')
|
|
},
|
|
|
|
// Courses
|
|
{
|
|
path: 'courses',
|
|
name: 'CourseList',
|
|
component: () => import('@/views/courses/CourseListView.vue')
|
|
},
|
|
{
|
|
path: 'courses/create',
|
|
name: 'CourseCreate',
|
|
component: () => import('@/views/courses/CourseFormView.vue')
|
|
},
|
|
{
|
|
path: 'courses/edit/:id',
|
|
name: 'CourseEdit',
|
|
component: () => import('@/views/courses/CourseFormView.vue')
|
|
},
|
|
{
|
|
path: 'courses/view/:id',
|
|
name: 'CourseDetail',
|
|
component: () => import('@/views/courses/CourseDetailView.vue')
|
|
},
|
|
|
|
// Classes
|
|
{
|
|
path: 'classes',
|
|
name: 'ClassList',
|
|
component: () => import('@/views/classes/ClassListView.vue')
|
|
},
|
|
{
|
|
path: 'classes/create',
|
|
name: 'ClassCreate',
|
|
component: () => import('@/views/classes/ClassFormView.vue')
|
|
},
|
|
{
|
|
path: 'classes/edit/:id',
|
|
name: 'ClassEdit',
|
|
component: () => import('@/views/classes/ClassFormView.vue')
|
|
},
|
|
{
|
|
path: 'classes/view/:id',
|
|
name: 'ClassDetail',
|
|
component: () => import('@/views/classes/ClassDetailView.vue')
|
|
},
|
|
|
|
// Waitlist
|
|
{
|
|
path: 'waitlist',
|
|
name: 'Waitlist',
|
|
component: () => import('@/views/waitlist/WaitlistListView.vue'),
|
|
meta: { title: 'لیست انتظار', permission: 'waitlist:read' }
|
|
},
|
|
|
|
// Sessions
|
|
{
|
|
path: 'sessions',
|
|
name: 'SessionList',
|
|
component: () => import('@/views/sessions/SessionListView.vue')
|
|
},
|
|
{
|
|
path: 'sessions/create',
|
|
name: 'SessionCreate',
|
|
component: () => import('@/views/sessions/SessionFormView.vue')
|
|
},
|
|
{
|
|
path: 'sessions/edit/:id',
|
|
name: 'SessionEdit',
|
|
component: () => import('@/views/sessions/SessionFormView.vue')
|
|
},
|
|
{
|
|
path: 'sessions/attendance/:id',
|
|
name: 'AttendanceEntry',
|
|
component: () => import('@/views/attendances/AttendanceEntryView.vue')
|
|
},
|
|
{
|
|
path: 'attendance',
|
|
name: 'AttendanceList',
|
|
component: () => import('@/views/attendances/AttendanceListView.vue'),
|
|
meta: { title: 'حضور و غیاب', permission: 'sessions:attendance' }
|
|
},
|
|
|
|
{
|
|
path: 'interface',
|
|
name: 'InterfaceSettings',
|
|
component: () => import('@/views/interface/InterfaceSettingsView.vue'),
|
|
meta: { title: 'رابط کاربری' }
|
|
},
|
|
|
|
// Payments
|
|
{
|
|
path: 'payments',
|
|
name: 'PaymentList',
|
|
component: () => import('@/views/payments/PaymentListView.vue')
|
|
},
|
|
{
|
|
path: 'payments/view/:id',
|
|
name: 'PaymentDetail',
|
|
component: () => import('@/views/payments/PaymentDetailView.vue')
|
|
},
|
|
|
|
// Financial reports & institutional expenses
|
|
{
|
|
path: 'financial-reports',
|
|
name: 'FinancialReports',
|
|
component: () => import('@/views/financialReports/FinancialReportsView.vue'),
|
|
meta: { title: 'گزارشهای مالی', permission: 'financial_reports:read' }
|
|
},
|
|
{
|
|
path: 'expenses',
|
|
name: 'ExpenseList',
|
|
component: () => import('@/views/expenses/ExpenseListView.vue'),
|
|
meta: { title: 'هزینههای موسسه', permission: 'expenses:read' }
|
|
},
|
|
|
|
// Roles
|
|
{
|
|
path: 'roles',
|
|
name: 'RoleList',
|
|
component: () => import('@/views/roles/RoleListView.vue')
|
|
},
|
|
{
|
|
path: 'roles/create',
|
|
name: 'RoleCreate',
|
|
component: () => import('@/views/roles/RoleFormView.vue')
|
|
},
|
|
{
|
|
path: 'roles/edit/:id',
|
|
name: 'RoleEdit',
|
|
component: () => import('@/views/roles/RoleFormView.vue')
|
|
},
|
|
|
|
// Notifications
|
|
{
|
|
path: 'notifications',
|
|
name: 'NotificationList',
|
|
component: () => import('@/views/notifications/NotificationListView.vue')
|
|
},
|
|
|
|
// Contact inquiries
|
|
{
|
|
path: 'contact-inquiries',
|
|
name: 'ContactInquiryList',
|
|
component: () => import('@/views/contactInquiries/ContactInquiryListView.vue')
|
|
},
|
|
{
|
|
path: 'contact-inquiries/view/:id',
|
|
name: 'ContactInquiryDetail',
|
|
component: () => import('@/views/contactInquiries/ContactInquiryDetailView.vue')
|
|
},
|
|
|
|
// Pending student registrations
|
|
{
|
|
path: 'pending-students',
|
|
name: 'PendingStudentList',
|
|
component: () => import('@/views/pendingStudents/PendingStudentListView.vue'),
|
|
meta: { permission: 'pending_students:read' }
|
|
},
|
|
{
|
|
path: 'pending-students/view/:id',
|
|
name: 'PendingStudentDetail',
|
|
component: () => import('@/views/pendingStudents/PendingStudentDetailView.vue'),
|
|
meta: { permission: 'pending_students:read' }
|
|
},
|
|
|
|
{
|
|
path: 'logs',
|
|
name: 'LogList',
|
|
component: () => import('@/views/logs/LogListView.vue'),
|
|
meta: { permission: 'logs:read' }
|
|
},
|
|
|
|
{
|
|
path: 'settings',
|
|
name: 'Settings',
|
|
component: () => import('@/views/settings/SettingsView.vue'),
|
|
meta: { title: 'تنظیمات', superAdminOnly: true }
|
|
},
|
|
|
|
// Errors
|
|
{
|
|
path: '403',
|
|
name: 'Forbidden',
|
|
component: () => import('@/views/errors/ForbiddenView.vue')
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/:pathMatch(.*)*',
|
|
name: 'NotFound',
|
|
component: () => import('@/views/errors/NotFoundView.vue')
|
|
}
|
|
];
|