Commit 6ef5200204b13f0a0ed31c47d34bbc7bc4ecfe9b
1 parent
6c8f4ba9ad
Exists in
master
and in
3 other branches
implement all functionality of meetingEvent and enroll student
Showing
5 changed files
with
793 additions
and
31 deletions
Show diff stats
src/api/menu.js
1 | const adminMenu = [ | 1 | const adminMenu = [ |
2 | // { header: 'Apps' }, | 2 | // { header: 'Apps' }, |
3 | { | 3 | { |
4 | title: 'Dashboard', | 4 | title: 'Dashboard', |
5 | // group: 'apps', | 5 | // group: 'apps', |
6 | name: 'Dashboard', | 6 | name: 'Dashboard', |
7 | icon: '/static/icon/dashboard.png', | 7 | icon: '/static/icon/dashboard.png', |
8 | }, | 8 | }, |
9 | { | 9 | { |
10 | title: 'Class', | 10 | title: 'Class', |
11 | // group: 'apps', | 11 | // group: 'apps', |
12 | name: 'Class', | 12 | name: 'Class', |
13 | icon: '/static/icon/class.png', | 13 | icon: '/static/icon/class.png', |
14 | }, | 14 | }, |
15 | { | 15 | { |
16 | title: 'Section', | 16 | title: 'Section', |
17 | // group: 'apps', | 17 | // group: 'apps', |
18 | name: 'Section', | 18 | name: 'Section', |
19 | icon: '/static/icon/section.png', | 19 | icon: '/static/icon/section.png', |
20 | }, | 20 | }, |
21 | // { | 21 | // { |
22 | // title: 'Subjects', | 22 | // title: 'Subjects', |
23 | // name: 'Subject', | 23 | // name: 'Subject', |
24 | // icon: '/static/icon/subject.png', | 24 | // icon: '/static/icon/subject.png', |
25 | // }, | 25 | // }, |
26 | { | 26 | { |
27 | title: 'Parents', | 27 | title: 'Parents', |
28 | // group: 'apps', | 28 | // group: 'apps', |
29 | name: 'Parents', | 29 | name: 'Parents', |
30 | icon: '/static/icon/parents.png', | 30 | icon: '/static/icon/parents.png', |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | title: 'Teachers', | 33 | title: 'Teachers', |
34 | // group: '', | 34 | // group: '', |
35 | name: 'Teachers', | 35 | name: 'Teachers', |
36 | icon: '/static/icon/teacher.png', | 36 | icon: '/static/icon/teacher.png', |
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | title: 'Students', | 39 | title: 'Students', |
40 | // group: 'apps', | 40 | // group: 'apps', |
41 | name: 'Students', | 41 | name: 'Students', |
42 | icon: '/static/icon/student.png', | 42 | icon: '/static/icon/student.png', |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | title: 'User', | 45 | title: 'User', |
46 | name: 'User', | 46 | name: 'User', |
47 | icon: '/static/icon/users.png', | 47 | icon: '/static/icon/users.png', |
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | title: 'Attendance', | 50 | title: 'Attendance', |
51 | group: 'Attendance', | 51 | group: 'Attendance', |
52 | component: 'Attendance', | 52 | component: 'Attendance', |
53 | icon: '/static/icon/attendence.png', | 53 | icon: '/static/icon/attendence.png', |
54 | items: [ | 54 | items: [ |
55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
58 | ] | 58 | ] |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | title: 'Exam', | 61 | title: 'Exam', |
62 | group: 'Exam', | 62 | group: 'Exam', |
63 | component: 'Exam', | 63 | component: 'Exam', |
64 | icon: '/static/icon/exam.png', | 64 | icon: '/static/icon/exam.png', |
65 | items: [ | 65 | items: [ |
66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, | 66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, |
67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, | 68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, |
69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
70 | ] | 70 | ] |
71 | }, | 71 | }, |
72 | { | 72 | { |
73 | title: 'Marks', | 73 | title: 'Marks', |
74 | group: 'Mark', | 74 | group: 'Mark', |
75 | component: 'Mark', | 75 | component: 'Mark', |
76 | icon: '/static/icon/marks.png', | 76 | icon: '/static/icon/marks.png', |
77 | items: [ | 77 | items: [ |
78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, | 78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, |
79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, | 79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, |
80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, | 80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, |
81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
82 | ] | 82 | ] |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | title: 'Academic', | 85 | title: 'Academic', |
86 | group: 'Academic', | 86 | group: 'Academic', |
87 | component: 'Academic', | 87 | component: 'Academic', |
88 | icon: '/static/icon/school.png', | 88 | icon: '/static/icon/school.png', |
89 | items: [ | 89 | items: [ |
90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
94 | ] | 94 | ] |
95 | }, | 95 | }, |
96 | { | 96 | { |
97 | title: 'Administrator', | 97 | title: 'Administrator', |
98 | group: 'Administrator', | 98 | group: 'Administrator', |
99 | component: 'Administrator', | 99 | component: 'Administrator', |
100 | icon: '/static/icon/adminstrator.png', | 100 | icon: '/static/icon/adminstrator.png', |
101 | items: [ | 101 | items: [ |
102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, | 102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, |
103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, | 103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, |
104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, | 104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, |
105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, | 105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, |
106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, | 106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, |
107 | 107 | ||
108 | ] | 108 | ] |
109 | }, | 109 | }, |
110 | { | 110 | { |
111 | title: 'Payroll', | 111 | title: 'Payroll', |
112 | group: 'Payroll', | 112 | group: 'Payroll', |
113 | component: 'Payroll', | 113 | component: 'Payroll', |
114 | icon: '/static/icon/dollar.png', | 114 | icon: '/static/icon/dollar.png', |
115 | items: [ | 115 | items: [ |
116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, | 116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, |
117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, | 117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, |
118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, | 118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, |
119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, | 119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, |
120 | ] | 120 | ] |
121 | }, | 121 | }, |
122 | { | 122 | { |
123 | title: 'Notice Board', | 123 | title: 'Notice Board', |
124 | name: 'Notice Board', | 124 | name: 'Notice Board', |
125 | icon: '/static/icon/notice board.png', | 125 | icon: '/static/icon/notice board.png', |
126 | }, | 126 | }, |
127 | { | 127 | { |
128 | title: 'News', | 128 | title: 'News', |
129 | name: 'News', | 129 | name: 'News', |
130 | icon: '/static/icon/news.png', | 130 | icon: '/static/icon/news.png', |
131 | }, | 131 | }, |
132 | // { | 132 | // { |
133 | // title: 'Reminder', | 133 | // title: 'Reminder', |
134 | // name: 'reminder', | 134 | // name: 'reminder', |
135 | // icon: 'alarm_add', | 135 | // icon: 'alarm_add', |
136 | // }, | 136 | // }, |
137 | { | 137 | { |
138 | title: 'Time Table', | 138 | title: 'Time Table', |
139 | name: 'Time Table', | 139 | name: 'Time Table', |
140 | icon: '/static/icon/time table.png', | 140 | icon: '/static/icon/time table.png', |
141 | }, | 141 | }, |
142 | { | 142 | { |
143 | title: 'Library', | 143 | title: 'Library', |
144 | group: 'Library', | 144 | group: 'Library', |
145 | component: 'Library', | 145 | component: 'Library', |
146 | icon: '/static/icon/library.png', | 146 | icon: '/static/icon/library.png', |
147 | items: [ | 147 | items: [ |
148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
152 | 152 | ||
153 | ] | 153 | ] |
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | title: 'Report', | 156 | title: 'Report', |
157 | group: 'Report', | 157 | group: 'Report', |
158 | component: 'Report', | 158 | component: 'Report', |
159 | icon: '/static/icon/reports.png', | 159 | icon: '/static/icon/reports.png', |
160 | items: [ | 160 | items: [ |
161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
165 | ] | 165 | ] |
166 | }, | 166 | }, |
167 | { | 167 | { |
168 | title: 'Notification', | 168 | title: 'Notification', |
169 | name: 'Notification', | 169 | name: 'Notification', |
170 | icon: '/static/icon/notification.png', | 170 | icon: '/static/icon/notification.png', |
171 | }, | 171 | }, |
172 | { | 172 | { |
173 | title: 'Social Media', | 173 | title: 'Social Media', |
174 | name: 'Social Media', | 174 | name: 'Social Media', |
175 | icon: '/static/icon/events.png', | 175 | icon: '/static/icon/events.png', |
176 | }, | 176 | }, |
177 | { | 177 | { |
178 | title: 'Gallery', | 178 | title: 'Gallery', |
179 | name: 'Gallery', | 179 | name: 'Gallery', |
180 | icon: '/static/icon/gallery.png', | 180 | icon: '/static/icon/gallery.png', |
181 | }, | 181 | }, |
182 | { | 182 | { |
183 | title: 'Event', | 183 | title: 'Event', |
184 | name: 'Event', | 184 | name: 'Event', |
185 | icon: '/static/icon/events.png', | 185 | icon: '/static/icon/events.png', |
186 | }, | 186 | }, |
187 | { | 187 | { |
188 | title: 'Account', | 188 | title: 'Account', |
189 | group: 'Account', | 189 | group: 'Account', |
190 | component: 'Account', | 190 | component: 'Account', |
191 | icon: '/static/icon/accounts.png', | 191 | icon: '/static/icon/accounts.png', |
192 | items: [ | 192 | items: [ |
193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
199 | ] | 199 | ] |
200 | }, | 200 | }, |
201 | { | 201 | { |
202 | title: 'Holiday', | 202 | title: 'Holiday', |
203 | name: 'Holiday', | 203 | name: 'Holiday', |
204 | icon: '/static/icon/holiday.png', | 204 | icon: '/static/icon/holiday.png', |
205 | }, | 205 | }, |
206 | { | 206 | { |
207 | title: 'General Setting', | 207 | title: 'General Setting', |
208 | name: 'General Setting', | 208 | name: 'General Setting', |
209 | icon: '/static/icon/settings.png', | 209 | icon: '/static/icon/settings.png', |
210 | } | 210 | } |
211 | ]; | 211 | ]; |
212 | 212 | ||
213 | const libraryMenu = [{ | 213 | const libraryMenu = [{ |
214 | title: 'Dashboard', | 214 | title: 'Dashboard', |
215 | name: 'Dashboard', | 215 | name: 'Dashboard', |
216 | icon: '/static/icon/dashboard.png', | 216 | icon: '/static/icon/dashboard.png', |
217 | }, | 217 | }, |
218 | { | 218 | { |
219 | title: 'Library', | 219 | title: 'Library', |
220 | group: 'Library', | 220 | group: 'Library', |
221 | component: 'Library', | 221 | component: 'Library', |
222 | icon: '/static/icon/library.png', | 222 | icon: '/static/icon/library.png', |
223 | items: [ | 223 | items: [ |
224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
228 | 228 | ||
229 | ] | 229 | ] |
230 | }, | 230 | }, |
231 | ]; | 231 | ]; |
232 | 232 | ||
233 | const accountMenu = [{ | 233 | const accountMenu = [{ |
234 | title: 'Dashboard', | 234 | title: 'Dashboard', |
235 | name: 'Dashboard', | 235 | name: 'Dashboard', |
236 | icon: '/static/icon/dashboard.png', | 236 | icon: '/static/icon/dashboard.png', |
237 | }, | 237 | }, |
238 | 238 | ||
239 | { | 239 | { |
240 | title: 'Account', | 240 | title: 'Account', |
241 | group: 'Account', | 241 | group: 'Account', |
242 | component: 'Account', | 242 | component: 'Account', |
243 | icon: '/static/icon/accounts.png', | 243 | icon: '/static/icon/accounts.png', |
244 | items: [ | 244 | items: [ |
245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
251 | ] | 251 | ] |
252 | }, | 252 | }, |
253 | ]; | 253 | ]; |
254 | 254 | ||
255 | const schoolMenu = [ | 255 | const schoolMenu = [ |
256 | // { header: 'Apps' }, | 256 | // { header: 'Apps' }, |
257 | { | 257 | { |
258 | title: 'Dashboard', | 258 | title: 'Dashboard', |
259 | // group: 'apps', | 259 | // group: 'apps', |
260 | name: 'View School Dashboard', | 260 | name: 'View School Dashboard', |
261 | icon: '/static/icon/dashboard.png', | 261 | icon: '/static/icon/dashboard.png', |
262 | }, | 262 | }, |
263 | { | 263 | { |
264 | title: 'School', | 264 | title: 'School', |
265 | // group: 'apps', | 265 | // group: 'apps', |
266 | name: 'School', | 266 | name: 'School', |
267 | icon: '/static/schoolIcons/Dashboard.png', | 267 | icon: '/static/schoolIcons/Dashboard.png', |
268 | } | 268 | } |
269 | ]; | 269 | ]; |
270 | 270 | ||
271 | const teacherMenu = [{ | 271 | const teacherMenu = [{ |
272 | title: 'Dashboard', | 272 | title: 'Dashboard', |
273 | name: 'Dashboard', | 273 | name: 'Dashboard', |
274 | icon: '/static/icon/dashboard.png', | 274 | icon: '/static/icon/dashboard.png', |
275 | }, | 275 | }, |
276 | { | 276 | { |
277 | title: 'Parents', | 277 | title: 'Parents', |
278 | // group: 'apps', | 278 | // group: 'apps', |
279 | name: 'Parents', | 279 | name: 'Parents', |
280 | icon: '/static/icon/parents.png', | 280 | icon: '/static/icon/parents.png', |
281 | }, | 281 | }, |
282 | { | 282 | { |
283 | title: 'Teachers', | 283 | title: 'Teachers', |
284 | // group: '', | 284 | // group: '', |
285 | name: 'Teachers', | 285 | name: 'Teachers', |
286 | icon: '/static/icon/teacher.png', | 286 | icon: '/static/icon/teacher.png', |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | title: 'Students', | 289 | title: 'Students', |
290 | // group: 'apps', | 290 | // group: 'apps', |
291 | name: 'Students', | 291 | name: 'Students', |
292 | icon: '/static/icon/student.png', | 292 | icon: '/static/icon/student.png', |
293 | }, | 293 | }, |
294 | { | 294 | { |
295 | title: 'Academic', | 295 | title: 'Academic', |
296 | group: 'Academic', | 296 | group: 'Academic', |
297 | component: 'Academic', | 297 | component: 'Academic', |
298 | icon: '/static/icon/school.png', | 298 | icon: '/static/icon/school.png', |
299 | items: [ | 299 | items: [ |
300 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 300 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
301 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 301 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
302 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 302 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
303 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 303 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
304 | ] | 304 | ] |
305 | }, | 305 | }, |
306 | { | 306 | { |
307 | title: 'Course', | 307 | title: 'Course', |
308 | group: 'Course', | 308 | group: 'Course', |
309 | component: 'Course', | 309 | component: 'Course', |
310 | icon: '/static/icon/school.png', | 310 | icon: '/static/icon/school.png', |
311 | items: [ | 311 | items: [ |
312 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, | 312 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, |
313 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, | 313 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, |
314 | { name: 'Course Detail', title: 'Course Detail', component: 'Course Detail', action: '', }, | 314 | { name: 'Course Detail', title: 'Course Detail', component: 'Course Detail', action: '', }, |
315 | // { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 315 | // { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
316 | ] | 316 | ] |
317 | }, | 317 | }, |
318 | { | 318 | { |
319 | title: 'Annoucement', | 319 | title: 'Annoucement', |
320 | // group: 'apps', | 320 | // group: 'apps', |
321 | name: 'Annoucement', | 321 | name: 'Annoucement', |
322 | icon: '/static/icon/student.png', | 322 | icon: '/static/icon/student.png', |
323 | }, | 323 | }, |
324 | { | 324 | { |
325 | title: 'Meeting Event', | ||
326 | // group: 'apps', | ||
327 | name: 'Meeting Event', | ||
328 | icon: '/static/icon/student.png', | ||
329 | }, | ||
330 | { | ||
325 | title: 'Attendance', | 331 | title: 'Attendance', |
326 | group: 'Attendance', | 332 | group: 'Attendance', |
327 | component: 'Attendance', | 333 | component: 'Attendance', |
328 | icon: '/static/icon/attendence.png', | 334 | icon: '/static/icon/attendence.png', |
329 | items: [ | 335 | items: [ |
330 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 336 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
331 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 337 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
332 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 338 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
333 | ] | 339 | ] |
334 | }, | 340 | }, |
335 | { | 341 | { |
336 | title: 'Exam', | 342 | title: 'Exam', |
337 | group: 'Exam', | 343 | group: 'Exam', |
338 | component: 'Exam', | 344 | component: 'Exam', |
339 | icon: '/static/icon/exam.png', | 345 | icon: '/static/icon/exam.png', |
340 | items: [ | 346 | items: [ |
341 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 347 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
342 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } | 348 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } |
343 | ] | 349 | ] |
344 | }, | 350 | }, |
345 | { | 351 | { |
346 | title: 'Marks', | 352 | title: 'Marks', |
347 | group: 'Mark', | 353 | group: 'Mark', |
348 | component: 'Mark', | 354 | component: 'Mark', |
349 | icon: '/static/icon/marks.png', | 355 | icon: '/static/icon/marks.png', |
350 | items: [ | 356 | items: [ |
351 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } | 357 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } |
352 | ] | 358 | ] |
353 | }, | 359 | }, |
354 | { | 360 | { |
355 | title: 'Report', | 361 | title: 'Report', |
356 | group: 'Report', | 362 | group: 'Report', |
357 | component: 'Report', | 363 | component: 'Report', |
358 | icon: '/static/icon/reports.png', | 364 | icon: '/static/icon/reports.png', |
359 | items: [ | 365 | items: [ |
360 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 366 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
361 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 367 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
362 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 368 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
363 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 369 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
364 | ] | 370 | ] |
365 | }, | 371 | }, |
366 | { | 372 | { |
367 | title: 'Library', | 373 | title: 'Library', |
368 | group: 'Library', | 374 | group: 'Library', |
369 | component: 'Library', | 375 | component: 'Library', |
370 | icon: '/static/icon/library.png', | 376 | icon: '/static/icon/library.png', |
371 | items: [ | 377 | items: [ |
372 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 378 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
373 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 379 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
374 | 380 | ||
375 | ] | 381 | ] |
376 | }, | 382 | }, |
377 | { | 383 | { |
378 | title: 'Meet', | 384 | title: 'Meet', |
379 | name: 'Meet', | 385 | name: 'Meet', |
380 | icon: '/static/icon/parents.png', | 386 | icon: '/static/icon/parents.png', |
381 | } | 387 | } |
382 | ]; | 388 | ]; |
383 | 389 | ||
384 | const parentMenu = [{ | 390 | const parentMenu = [{ |
385 | title: 'Dashboard', | 391 | title: 'Dashboard', |
386 | name: 'Dashboard', | 392 | name: 'Dashboard', |
387 | icon: '/static/icon/dashboard.png', | 393 | icon: '/static/icon/dashboard.png', |
388 | }]; | 394 | }]; |
389 | // reorder menu | 395 | // reorder menu |
390 | // Menu.forEach((item) => { | 396 | // Menu.forEach((item) => { |
391 | // if (item.items) { | 397 | // if (item.items) { |
392 | // item.items.sort((x, y) => { | 398 | // item.items.sort((x, y) => { |
393 | // let textA = x.title.toUpperCase(); | 399 | // let textA = x.title.toUpperCase(); |
394 | // let textB = y.title.toUpperCase(); | 400 | // let textB = y.title.toUpperCase(); |
395 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; | 401 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; |
396 | // }); | 402 | // }); |
397 | // } | 403 | // } |
398 | // }); | 404 | // }); |
399 | 405 | ||
400 | export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu, parentMenu }; | 406 | export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu, parentMenu }; |
src/pages/Course/courseDetail.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Edit Chapter detail ****** --> | 3 | <!-- ****** Edit Chapter detail ****** --> |
4 | <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> | 4 | <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> |
5 | <v-card class="card-style pa-2" dark> | 5 | <v-card class="card-style pa-2" dark> |
6 | <v-layout> | 6 | <v-layout> |
7 | <v-flex xs12> | 7 | <v-flex xs12> |
8 | <label class="title text-xs-center">Edit Chapter</label> | 8 | <label class="title text-xs-center">Edit Chapter</label> |
9 | <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> |
10 | </v-flex> | 10 | </v-flex> |
11 | </v-layout> | 11 | </v-layout> |
12 | <v-card-text> | 12 | <v-card-text> |
13 | <v-layout wrap> | 13 | <v-layout wrap> |
14 | <v-flex xs12 sm12> | 14 | <v-flex xs12 sm12> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex xs4 class="pt-4 subheading"> | 16 | <v-flex xs4 class="pt-4 subheading"> |
17 | <label class="right">Select Class:</label> | 17 | <label class="right">Select Class:</label> |
18 | </v-flex> | 18 | </v-flex> |
19 | <v-flex xs8 sm6 class="ml-3"> | 19 | <v-flex xs8 sm6 class="ml-3"> |
20 | <v-select | 20 | <v-select |
21 | small | 21 | small |
22 | :items="addclass" | 22 | :items="addclass" |
23 | label="Select Class" | 23 | label="Select Class" |
24 | v-model="editedCourse.classId" | 24 | v-model="editedCourse.classId" |
25 | item-text="classNum" | 25 | item-text="classNum" |
26 | item-value="_id" | 26 | item-value="_id" |
27 | name="Select Class" | 27 | name="Select Class" |
28 | @change="getCourses(getCourse.classId)" | 28 | @change="getCourses(editedCourse.classId)" |
29 | class="mr-2" | 29 | class="mr-2" |
30 | required | 30 | required |
31 | ></v-select> | 31 | ></v-select> |
32 | </v-flex> | 32 | </v-flex> |
33 | </v-layout> | 33 | </v-layout> |
34 | </v-flex> | 34 | </v-flex> |
35 | <v-flex xs12 sm12> | 35 | <v-flex xs12 sm12> |
36 | <v-layout> | 36 | <v-layout> |
37 | <v-flex xs4 class="pt-4 subheading"> | 37 | <v-flex xs4 class="pt-4 subheading"> |
38 | <label class="right">Select Course:</label> | 38 | <label class="right">Select Course:</label> |
39 | </v-flex> | 39 | </v-flex> |
40 | <v-flex xs8 sm6 class="ml-3"> | 40 | <v-flex xs8 sm6 class="ml-3"> |
41 | <v-select | 41 | <v-select |
42 | :items="courseData" | 42 | :items="courseData" |
43 | label="Select Course" | 43 | label="Select Course" |
44 | v-model="editedCourse.courseId" | 44 | v-model="editedCourse.courseId" |
45 | item-text="coursrName" | 45 | item-text="coursrName" |
46 | item-value="_id" | 46 | item-value="_id" |
47 | required | 47 | required |
48 | class="ml-2" | 48 | class="ml-2" |
49 | ></v-select> | 49 | ></v-select> |
50 | </v-flex> | 50 | </v-flex> |
51 | </v-layout> | 51 | </v-layout> |
52 | </v-flex> | 52 | </v-flex> |
53 | </v-layout> | 53 | </v-layout> |
54 | <v-layout> | 54 | <v-layout> |
55 | <v-flex xs12 sm12 md11 lg11> | 55 | <v-flex xs12 sm12 md11 lg11> |
56 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 56 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
57 | <v-spacer></v-spacer> | 57 | <v-spacer></v-spacer> |
58 | <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> | 58 | <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> |
59 | </v-card-actions> | 59 | </v-card-actions> |
60 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 60 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
61 | <v-spacer></v-spacer> | 61 | <v-spacer></v-spacer> |
62 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | 62 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> |
63 | <v-spacer></v-spacer> | 63 | <v-spacer></v-spacer> |
64 | </v-card-actions> | 64 | </v-card-actions> |
65 | </v-flex> | 65 | </v-flex> |
66 | </v-layout> | 66 | </v-layout> |
67 | </v-card-text> | 67 | </v-card-text> |
68 | </v-card> | 68 | </v-card> |
69 | </v-dialog> | 69 | </v-dialog> |
70 | <!-- ****** Edit Chapter detail ****** --> | 70 | <!-- ****** Edit Chapter detail ****** --> |
71 | <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable> | 71 | <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable> |
72 | <v-card class="card-style pa-2" dark> | 72 | <v-card class="card-style pa-2" dark> |
73 | <v-layout> | 73 | <v-layout> |
74 | <v-flex xs12> | 74 | <v-flex xs12> |
75 | <label class="title text-xs-center">Edit Chapter</label> | 75 | <label class="title text-xs-center">Edit Chapter</label> |
76 | <v-icon size="24" class="right" @click="editChapterDetailDialog = false">cancel</v-icon> | 76 | <v-icon size="24" class="right" @click="editChapterDetailDialog = false">cancel</v-icon> |
77 | </v-flex> | 77 | </v-flex> |
78 | </v-layout> | 78 | </v-layout> |
79 | <v-card-text> | 79 | <v-card-text> |
80 | <v-layout wrap> | 80 | <v-layout wrap> |
81 | <v-flex xs12 sm12> | 81 | <v-flex xs12 sm12> |
82 | <v-layout> | 82 | <v-layout> |
83 | <v-flex xs4 class="pt-4 subheading"> | 83 | <v-flex xs4 class="pt-4 subheading"> |
84 | <label class="right">Chapter Name:</label> | 84 | <label class="right">Chapter Name:</label> |
85 | </v-flex> | 85 | </v-flex> |
86 | <v-flex xs8 sm6 class="ml-3"> | 86 | <v-flex xs8 sm6 class="ml-3"> |
87 | <v-text-field | 87 | <v-text-field |
88 | v-model="editChapter.chapterName" | 88 | v-model="editChapter.chapterName" |
89 | placeholder="fill your Title" | 89 | placeholder="fill your Title" |
90 | type="text" | 90 | type="text" |
91 | required | 91 | required |
92 | ></v-text-field> | 92 | ></v-text-field> |
93 | </v-flex> | 93 | </v-flex> |
94 | </v-layout> | 94 | </v-layout> |
95 | </v-flex> | 95 | </v-flex> |
96 | <v-flex xs12 sm12> | 96 | <v-flex xs12 sm12> |
97 | <v-layout> | 97 | <v-layout> |
98 | <v-flex xs4 class="pt-4 subheading"> | 98 | <v-flex xs4 class="pt-4 subheading"> |
99 | <label class="right">Description:</label> | 99 | <label class="right">Description:</label> |
100 | </v-flex> | 100 | </v-flex> |
101 | <v-flex xs8 sm6 class="ml-3"> | 101 | <v-flex xs8 sm6 class="ml-3"> |
102 | <v-text-field | 102 | <v-text-field |
103 | placeholder="fill your Description" | 103 | placeholder="fill your Description" |
104 | v-model="editChapter.description" | 104 | v-model="editChapter.description" |
105 | type="text" | 105 | type="text" |
106 | required | 106 | required |
107 | ></v-text-field> | 107 | ></v-text-field> |
108 | </v-flex> | 108 | </v-flex> |
109 | </v-layout> | 109 | </v-layout> |
110 | </v-flex> | 110 | </v-flex> |
111 | </v-layout> | 111 | </v-layout> |
112 | <v-flex xs12 v-if="editChapter.chapterPoints !=[]"> | 112 | <v-flex xs12 v-if="editChapter.chapterPoints !=[]"> |
113 | <v-layout | 113 | <v-layout |
114 | wrap | 114 | wrap |
115 | v-for="(editChapterPoint,index) in editChapter.chapterPoints" | 115 | v-for="(editChapterPoint,index) in editChapter.chapterPoints" |
116 | :key="index" | 116 | :key="index" |
117 | > | 117 | > |
118 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> | 118 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> |
119 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> | 119 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> |
120 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> | 120 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> |
121 | </v-flex> | 121 | </v-flex> |
122 | <v-layout> | 122 | <v-layout> |
123 | <v-flex xs10 sm10 sm5 md9 class="ml-3"> | 123 | <v-flex xs10 sm10 sm5 md9 class="ml-3"> |
124 | <v-text-field :value="editChapterPoint" type="text" required></v-text-field> | 124 | <v-text-field :value="editChapterPoint" type="text" required></v-text-field> |
125 | </v-flex> | 125 | </v-flex> |
126 | <v-flex xs2 class="pt-4"> | 126 | <v-flex xs2 class="pt-4"> |
127 | <v-icon @click="deleteUrl(index)">cancel</v-icon> | 127 | <v-icon @click="deleteUrl(index)">cancel</v-icon> |
128 | <!-- <v-icon @click="update()">add_circle</v-icon> --> | 128 | <!-- <v-icon @click="update()">add_circle</v-icon> --> |
129 | </v-flex> | 129 | </v-flex> |
130 | </v-layout> | 130 | </v-layout> |
131 | </v-layout> | 131 | </v-layout> |
132 | </v-flex> | 132 | </v-flex> |
133 | <v-flex xs12> | 133 | <v-flex xs12> |
134 | <div v-for="(updateImage,index) in updates" :key="index"> | 134 | <div v-for="(updateImage,index) in updates" :key="index"> |
135 | <v-layout wrap> | 135 | <v-layout wrap> |
136 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> | 136 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> |
137 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> | 137 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> |
138 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> | 138 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> |
139 | </v-flex> | 139 | </v-flex> |
140 | <v-layout> | 140 | <v-layout> |
141 | <v-flex xs10 sm12 md9 class="ml-3"> | 141 | <v-flex xs10 sm12 md9 class="ml-3"> |
142 | <v-text-field | 142 | <v-text-field |
143 | v-model="updateImage.value" | 143 | v-model="updateImage.value" |
144 | placeholder="Upload new Chapter Points" | 144 | placeholder="Upload new Chapter Points" |
145 | required | 145 | required |
146 | ></v-text-field> | 146 | ></v-text-field> |
147 | </v-flex> | 147 | </v-flex> |
148 | <v-flex xs2 class="pt-4"> | 148 | <v-flex xs2 class="pt-4"> |
149 | <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon> | 149 | <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon> |
150 | <v-icon @click="update">add_circle</v-icon> | 150 | <v-icon @click="update">add_circle</v-icon> |
151 | </v-flex> | 151 | </v-flex> |
152 | </v-layout> | 152 | </v-layout> |
153 | </v-layout> | 153 | </v-layout> |
154 | </div> | 154 | </div> |
155 | </v-flex> | 155 | </v-flex> |
156 | <v-layout> | 156 | <v-layout> |
157 | <v-flex xs12 sm12 md11 lg11> | 157 | <v-flex xs12 sm12 md11 lg11> |
158 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 158 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
159 | <v-spacer></v-spacer> | 159 | <v-spacer></v-spacer> |
160 | <v-btn | 160 | <v-btn |
161 | round | 161 | round |
162 | dark | 162 | dark |
163 | @click="saveChapter" | 163 | @click="saveChapter" |
164 | :loading="editLoading" | 164 | :loading="editLoading" |
165 | class="add-button mr-4" | 165 | class="add-button mr-4" |
166 | >Save</v-btn> | 166 | >Save</v-btn> |
167 | </v-card-actions> | 167 | </v-card-actions> |
168 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 168 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
169 | <v-spacer></v-spacer> | 169 | <v-spacer></v-spacer> |
170 | <v-btn | 170 | <v-btn |
171 | round | 171 | round |
172 | dark | 172 | dark |
173 | @click="saveChapter" | 173 | @click="saveChapter" |
174 | :loading="editLoading" | 174 | :loading="editLoading" |
175 | class="add-button" | 175 | class="add-button" |
176 | >Save</v-btn> | 176 | >Save</v-btn> |
177 | <v-spacer></v-spacer> | 177 | <v-spacer></v-spacer> |
178 | </v-card-actions> | 178 | </v-card-actions> |
179 | </v-flex> | 179 | </v-flex> |
180 | </v-layout> | 180 | </v-layout> |
181 | </v-card-text> | 181 | </v-card-text> |
182 | </v-card> | 182 | </v-card> |
183 | </v-dialog> | 183 | </v-dialog> |
184 | <!-- ****** Add Chapter detail ****** --> | 184 | <!-- ****** Add Chapter detail ****** --> |
185 | <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable> | 185 | <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable> |
186 | <v-card class="card-style pa-2" dark> | 186 | <v-card class="card-style pa-2" dark> |
187 | <v-layout> | 187 | <v-layout> |
188 | <v-flex xs12> | 188 | <v-flex xs12> |
189 | <label class="title text-xs-center">Add Chapter Detail</label> | 189 | <label class="title text-xs-center">Add Chapter Detail</label> |
190 | <v-icon size="24" class="right" @click="addChapterDialog = false">cancel</v-icon> | 190 | <v-icon size="24" class="right" @click="addChapterDialog = false">cancel</v-icon> |
191 | </v-flex> | 191 | </v-flex> |
192 | </v-layout> | 192 | </v-layout> |
193 | <v-card-text> | 193 | <v-card-text> |
194 | <v-layout wrap> | 194 | <v-layout wrap> |
195 | <v-flex xs12 sm12> | 195 | <v-flex xs12 sm12> |
196 | <v-layout> | 196 | <v-layout> |
197 | <v-flex xs4 class="pt-4 subheading"> | 197 | <v-flex xs4 class="pt-4 subheading"> |
198 | <label class="right">Chapter Name:</label> | 198 | <label class="right">Chapter Name:</label> |
199 | </v-flex> | 199 | </v-flex> |
200 | <v-flex xs8 sm6 class="ml-3"> | 200 | <v-flex xs8 sm6 class="ml-3"> |
201 | <v-text-field | 201 | <v-text-field |
202 | v-model="addChapterItem.chapterName" | 202 | v-model="addChapterItem.chapterName" |
203 | placeholder="fill your Title" | 203 | placeholder="fill your Title" |
204 | type="text" | 204 | type="text" |
205 | required | 205 | required |
206 | ></v-text-field> | 206 | ></v-text-field> |
207 | </v-flex> | 207 | </v-flex> |
208 | </v-layout> | 208 | </v-layout> |
209 | </v-flex> | 209 | </v-flex> |
210 | <v-flex xs12 sm12> | 210 | <v-flex xs12 sm12> |
211 | <v-layout> | 211 | <v-layout> |
212 | <v-flex xs4 class="pt-4 subheading"> | 212 | <v-flex xs4 class="pt-4 subheading"> |
213 | <label class="right">Description:</label> | 213 | <label class="right">Description:</label> |
214 | </v-flex> | 214 | </v-flex> |
215 | <v-flex xs8 sm6 class="ml-3"> | 215 | <v-flex xs8 sm6 class="ml-3"> |
216 | <v-text-field | 216 | <v-text-field |
217 | placeholder="fill your Description" | 217 | placeholder="fill your Description" |
218 | v-model="addChapterItem.description" | 218 | v-model="addChapterItem.description" |
219 | type="text" | 219 | type="text" |
220 | required | 220 | required |
221 | ></v-text-field> | 221 | ></v-text-field> |
222 | </v-flex> | 222 | </v-flex> |
223 | </v-layout> | 223 | </v-layout> |
224 | </v-flex> | 224 | </v-flex> |
225 | </v-layout> | 225 | </v-layout> |
226 | <v-flex xs12> | 226 | <v-flex xs12> |
227 | <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index"> | 227 | <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index"> |
228 | <v-layout> | 228 | <v-layout> |
229 | <v-flex xs4 class="pt-4 subheading"> | 229 | <v-flex xs4 class="pt-4 subheading"> |
230 | <label class="right">Chapter Points:</label> | 230 | <label class="right">Chapter Points:</label> |
231 | </v-flex> | 231 | </v-flex> |
232 | <v-flex xs8 sm8 md6 class="ml-3"> | 232 | <v-flex xs8 sm8 md6 class="ml-3"> |
233 | <v-text-field | 233 | <v-text-field |
234 | placeholder="fill your Chapter Points" | 234 | placeholder="fill your Chapter Points" |
235 | v-model="chapterPoints.value" | 235 | v-model="chapterPoints.value" |
236 | type="text" | 236 | type="text" |
237 | name="link" | 237 | name="link" |
238 | required | 238 | required |
239 | ></v-text-field> | 239 | ></v-text-field> |
240 | </v-flex> | 240 | </v-flex> |
241 | <v-flex xs2 class="pt-4"> | 241 | <v-flex xs2 class="pt-4"> |
242 | <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon> | 242 | <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon> |
243 | <v-icon @click="addChapterPoint()">add_circle</v-icon> | 243 | <v-icon @click="addChapterPoint()">add_circle</v-icon> |
244 | </v-flex> | 244 | </v-flex> |
245 | </v-layout> | 245 | </v-layout> |
246 | </div> | 246 | </div> |
247 | </v-flex> | 247 | </v-flex> |
248 | <v-layout> | 248 | <v-layout> |
249 | <v-flex xs12 sm12 md11 lg11> | 249 | <v-flex xs12 sm12 md11 lg11> |
250 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 250 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
251 | <v-spacer></v-spacer> | 251 | <v-spacer></v-spacer> |
252 | <v-btn | 252 | <v-btn |
253 | round | 253 | round |
254 | dark | 254 | dark |
255 | @click="submitChapter" | 255 | @click="submitChapter" |
256 | :loading="editLoading" | 256 | :loading="editLoading" |
257 | class="add-button mr-4" | 257 | class="add-button mr-4" |
258 | >Submit</v-btn> | 258 | >Submit</v-btn> |
259 | </v-card-actions> | 259 | </v-card-actions> |
260 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 260 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
261 | <v-spacer></v-spacer> | 261 | <v-spacer></v-spacer> |
262 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | 262 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> |
263 | <v-spacer></v-spacer> | 263 | <v-spacer></v-spacer> |
264 | </v-card-actions> | 264 | </v-card-actions> |
265 | </v-flex> | 265 | </v-flex> |
266 | </v-layout> | 266 | </v-layout> |
267 | </v-card-text> | 267 | </v-card-text> |
268 | </v-card> | 268 | </v-card> |
269 | </v-dialog> | 269 | </v-dialog> |
270 | 270 | ||
271 | <!-- ****** PROFILE Gallery ****** --> | 271 | <!-- ****** PROFILE Gallery ****** --> |
272 | 272 | ||
273 | <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> | 273 | <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> |
274 | <v-card flat class="card-style pa-3" dark> | 274 | <v-card flat class="card-style pa-3" dark> |
275 | <v-layout> | 275 | <v-layout> |
276 | <v-flex xs12> | 276 | <v-flex xs12> |
277 | <label class="title text-xs-center">View Course Detail</label> | 277 | <label class="title text-xs-center">View Course Detail</label> |
278 | <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> | 278 | <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> |
279 | </v-flex> | 279 | </v-flex> |
280 | </v-layout> | 280 | </v-layout> |
281 | <v-card-text> | 281 | <v-card-text> |
282 | <v-container grid-list-md> | 282 | <v-container grid-list-md> |
283 | <v-layout wrap> | 283 | <v-layout wrap> |
284 | <v-flex xs12> | 284 | <v-flex xs12> |
285 | <v-layout> | 285 | <v-layout> |
286 | <v-flex xs4 sm6> | 286 | <v-flex xs4 sm6> |
287 | <h5 class="right my-1"> | 287 | <h5 class="right my-1"> |
288 | <b>Chapter Name:</b> | 288 | <b>Chapter Name:</b> |
289 | </h5> | 289 | </h5> |
290 | </v-flex> | 290 | </v-flex> |
291 | <v-flex sm6 xs8> | 291 | <v-flex sm6 xs8> |
292 | <h5 class="my-1">{{ editedItem.chapterName }}</h5> | 292 | <h5 class="my-1">{{ editedItem.chapterName }}</h5> |
293 | </v-flex> | 293 | </v-flex> |
294 | </v-layout> | 294 | </v-layout> |
295 | <v-layout> | 295 | <v-layout> |
296 | <v-flex xs4 sm6> | 296 | <v-flex xs4 sm6> |
297 | <h5 class="right my-1"> | 297 | <h5 class="right my-1"> |
298 | <b>Description:</b> | 298 | <b>Description:</b> |
299 | </h5> | 299 | </h5> |
300 | </v-flex> | 300 | </v-flex> |
301 | <v-flex sm6 xs8> | 301 | <v-flex sm6 xs8> |
302 | <h5 class="my-1">{{ editedItem.description }}</h5> | 302 | <h5 class="my-1">{{ editedItem.description }}</h5> |
303 | </v-flex> | 303 | </v-flex> |
304 | </v-layout> | 304 | </v-layout> |
305 | <v-layout> | 305 | <v-layout> |
306 | <v-flex xs5 sm6> | 306 | <v-flex xs5 sm6> |
307 | <h5 class="right my-1"> | 307 | <h5 class="right my-1"> |
308 | <b>You Tube Link Url:</b> | 308 | <b>You Tube Link Url:</b> |
309 | </h5> | 309 | </h5> |
310 | </v-flex> | 310 | </v-flex> |
311 | <v-flex sm6 xs8> | 311 | <v-flex sm6 xs8> |
312 | <h5 class="my-1"> | 312 | <h5 class="my-1"> |
313 | <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> | 313 | <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> |
314 | <li>{{ chapterPoint}}</li> | 314 | <li>{{ chapterPoint}}</li> |
315 | </ul> | 315 | </ul> |
316 | </h5> | 316 | </h5> |
317 | </v-flex> | 317 | </v-flex> |
318 | </v-layout> | 318 | </v-layout> |
319 | </v-flex> | 319 | </v-flex> |
320 | </v-layout> | 320 | </v-layout> |
321 | </v-container> | 321 | </v-container> |
322 | </v-card-text> | 322 | </v-card-text> |
323 | </v-card> | 323 | </v-card> |
324 | </v-dialog> | 324 | </v-dialog> |
325 | 325 | ||
326 | <!-- ****** Course Detail TABLE ****** --> | 326 | <!-- ****** Course Detail TABLE ****** --> |
327 | 327 | ||
328 | <v-toolbar color="transparent" flat> | 328 | <v-toolbar color="transparent" flat> |
329 | <v-btn | 329 | <v-btn |
330 | fab | 330 | fab |
331 | dark | 331 | dark |
332 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 332 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
333 | small | 333 | small |
334 | @click="addCourseDetailDialog = true" | 334 | @click="addCourseDetailDialog = true" |
335 | > | 335 | > |
336 | <v-icon dark>add</v-icon> | 336 | <v-icon dark>add</v-icon> |
337 | </v-btn> | 337 | </v-btn> |
338 | <v-btn | 338 | <v-btn |
339 | round | 339 | round |
340 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 340 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
341 | dark | 341 | dark |
342 | @click="addCourseDetailDialog = true" | 342 | @click="addCourseDetailDialog = true" |
343 | > | 343 | > |
344 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail | 344 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail |
345 | </v-btn> | 345 | </v-btn> |
346 | <v-flex xs12 sm4 md2> | 346 | <v-flex xs12 sm4 md2> |
347 | <v-select | 347 | <v-select |
348 | small | 348 | small |
349 | :items="addclass" | 349 | :items="addclass" |
350 | label="Select Class" | 350 | label="Select Class" |
351 | v-model="getCourse.classId" | 351 | v-model="getCourse.classId" |
352 | item-text="classNum" | 352 | item-text="classNum" |
353 | item-value="_id" | 353 | item-value="_id" |
354 | name="Select Class" | 354 | name="Select Class" |
355 | @change="getCourses(getCourse.classId)" | 355 | @change="getCourses(getCourse.classId)" |
356 | class="mr-2" | 356 | class="mr-2" |
357 | required | 357 | required |
358 | ></v-select> | 358 | ></v-select> |
359 | </v-flex> | 359 | </v-flex> |
360 | <v-flex xs12 sm4 md2> | 360 | <v-flex xs12 sm4 md2> |
361 | <v-select | 361 | <v-select |
362 | :items="courseData" | 362 | :items="courseData" |
363 | label="Select Course" | 363 | label="Select Course" |
364 | v-model="getCourse.courseId" | 364 | v-model="getCourse.courseId" |
365 | item-text="coursrName" | 365 | item-text="coursrName" |
366 | item-value="_id" | 366 | item-value="_id" |
367 | required | 367 | required |
368 | class="ml-2" | 368 | class="ml-2" |
369 | @change="getCourseDetailsList(getCourse.courseId)" | 369 | @change="getCourseDetailsList(getCourse.courseId)" |
370 | ></v-select> | 370 | ></v-select> |
371 | </v-flex> | 371 | </v-flex> |
372 | <v-spacer></v-spacer> | 372 | <v-spacer></v-spacer> |
373 | <v-card-title class="body-1" v-show="show"> | 373 | <v-card-title class="body-1" v-show="show"> |
374 | <v-btn icon large flat @click="displaySearch"> | 374 | <v-btn icon large flat @click="displaySearch"> |
375 | <v-avatar size="27"> | 375 | <v-avatar size="27"> |
376 | <img src="/static/icon/search.png" alt="icon" /> | 376 | <img src="/static/icon/search.png" alt="icon" /> |
377 | </v-avatar> | 377 | </v-avatar> |
378 | </v-btn> | 378 | </v-btn> |
379 | </v-card-title> | 379 | </v-card-title> |
380 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 380 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
381 | <v-layout> | 381 | <v-layout> |
382 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 382 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
383 | <v-icon @click="closeSearch" color="error">close</v-icon> | 383 | <v-icon @click="closeSearch" color="error">close</v-icon> |
384 | </v-layout> | 384 | </v-layout> |
385 | </v-flex> | 385 | </v-flex> |
386 | </v-toolbar> | 386 | </v-toolbar> |
387 | <v-data-table | 387 | <v-data-table |
388 | :headers="headers" | 388 | :headers="headers" |
389 | :items="CourseDetailsList" | 389 | :items="CourseDetailsList" |
390 | :pagination.sync="pagination" | 390 | :pagination.sync="pagination" |
391 | :search="search" | 391 | :search="search" |
392 | item-key="_id" | 392 | item-key="_id" |
393 | > | 393 | > |
394 | <template slot="items" slot-scope="props"> | 394 | <template slot="items" slot-scope="props"> |
395 | <tr class="tr" @click="courseTableRow(props.item._id)"> | 395 | <tr class="tr" @click="courseTableRow(props.item._id)"> |
396 | <td class="td td-row">{{ props.index + 1}}</td> | 396 | <td class="td td-row">{{ props.index + 1}}</td> |
397 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> | 397 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> |
398 | <td class="td td-row text-xs-center">{{ props.item.courseId.coursrName }}</td> | 398 | <td class="td td-row text-xs-center">{{ props.item.courseId.coursrName }}</td> |
399 | <td class="td td-row text-xs-center"> | 399 | <td class="td td-row text-xs-center"> |
400 | <span> | 400 | <span> |
401 | <v-tooltip top> | 401 | <v-tooltip top> |
402 | <v-icon | 402 | <v-icon |
403 | slot="activator" | 403 | slot="activator" |
404 | style="cursor:pointer;font-size:22px " | 404 | style="cursor:pointer;font-size:22px " |
405 | class="mr-3" | 405 | class="mr-3" |
406 | @click="addChapters(props.item)" | 406 | @click="addChapters(props.item)" |
407 | >add_circle_outline</v-icon> | 407 | >add_circle_outline</v-icon> |
408 | <span>Add</span> | 408 | <span>Add</span> |
409 | </v-tooltip> | 409 | </v-tooltip> |
410 | <v-tooltip top> | 410 | <v-tooltip top> |
411 | <img | 411 | <img |
412 | slot="activator" | 412 | slot="activator" |
413 | style="cursor:pointer; width:25px; height:25px; " | 413 | style="cursor:pointer; width:25px; height:25px; " |
414 | class="mr-3" | 414 | class="mr-3" |
415 | @click="props.expanded = !props.expanded" | 415 | @click="props.expanded = !props.expanded" |
416 | src="/static/icon/view.png" | 416 | src="/static/icon/view.png" |
417 | /> | 417 | /> |
418 | <span>View</span> | 418 | <span>View</span> |
419 | </v-tooltip> | 419 | </v-tooltip> |
420 | <v-tooltip top> | 420 | <v-tooltip top> |
421 | <img | 421 | <img |
422 | slot="activator" | 422 | slot="activator" |
423 | style="cursor:pointer; width:20px; height:18px; " | 423 | style="cursor:pointer; width:20px; height:18px; " |
424 | class="mr-3" | 424 | class="mr-3" |
425 | @click="editItem(props.item)" | 425 | @click="editItem(props.item)" |
426 | src="/static/icon/edit.png" | 426 | src="/static/icon/edit.png" |
427 | /> | 427 | /> |
428 | <span>Edit</span> | 428 | <span>Edit</span> |
429 | </v-tooltip> | 429 | </v-tooltip> |
430 | <v-tooltip top> | 430 | <v-tooltip top> |
431 | <img | 431 | <img |
432 | slot="activator" | 432 | slot="activator" |
433 | style="cursor:pointer; width:20px; height:20px; " | 433 | style="cursor:pointer; width:20px; height:20px; " |
434 | class="mr-3" | 434 | class="mr-3" |
435 | @click="deleteItem(props.item)" | 435 | @click="deleteItem(props.item)" |
436 | src="/static/icon/delete.png" | 436 | src="/static/icon/delete.png" |
437 | /> | 437 | /> |
438 | <span>Delete</span> | 438 | <span>Delete</span> |
439 | </v-tooltip> | 439 | </v-tooltip> |
440 | </span> | 440 | </span> |
441 | </td> | 441 | </td> |
442 | </tr> | 442 | </tr> |
443 | </template> | 443 | </template> |
444 | <template slot="expand" slot-scope="props"> | 444 | <template slot="expand" slot-scope="props"> |
445 | <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> | 445 | <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> |
446 | <template slot="items" slot-scope="props"> | 446 | <template slot="items" slot-scope="props"> |
447 | <tr class="tr" @click="props.expanded = !props.expanded"> | 447 | <tr class="tr" @click="props.expanded = !props.expanded"> |
448 | <td class="td td-row">{{ props.index + 1}}</td> | 448 | <td class="td td-row">{{ props.index + 1}}</td> |
449 | <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> | 449 | <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> |
450 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> | 450 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> |
451 | <td class="text-xs-center td td-row"> | 451 | <td class="text-xs-center td td-row"> |
452 | <v-tooltip top> | 452 | <v-tooltip top> |
453 | <img | 453 | <img |
454 | slot="activator" | 454 | slot="activator" |
455 | style="cursor:pointer; width:25px; height:25px; " | 455 | style="cursor:pointer; width:25px; height:25px; " |
456 | class="mr-3" | 456 | class="mr-3" |
457 | @click="profile(props.item)" | 457 | @click="profile(props.item)" |
458 | src="/static/icon/view.png" | 458 | src="/static/icon/view.png" |
459 | /> | 459 | /> |
460 | <span>View</span> | 460 | <span>View</span> |
461 | </v-tooltip> | 461 | </v-tooltip> |
462 | <v-tooltip top> | 462 | <v-tooltip top> |
463 | <img | 463 | <img |
464 | slot="activator" | 464 | slot="activator" |
465 | style="cursor:pointer; width:20px; height:18px; " | 465 | style="cursor:pointer; width:20px; height:18px; " |
466 | class="mr-3" | 466 | class="mr-3" |
467 | @click="editChapterItem(props.item)" | 467 | @click="editChapterItem(props.item)" |
468 | src="/static/icon/edit.png" | 468 | src="/static/icon/edit.png" |
469 | /> | 469 | /> |
470 | <span>Edit</span> | 470 | <span>Edit</span> |
471 | </v-tooltip> | 471 | </v-tooltip> |
472 | <v-tooltip top> | 472 | <v-tooltip top> |
473 | <img | 473 | <img |
474 | slot="activator" | 474 | slot="activator" |
475 | style="cursor:pointer; width:20px; height:20px; " | 475 | style="cursor:pointer; width:20px; height:20px; " |
476 | class="mr-3" | 476 | class="mr-3" |
477 | @click="deleteChapters(props.item)" | 477 | @click="deleteChapters(props.item)" |
478 | src="/static/icon/delete.png" | 478 | src="/static/icon/delete.png" |
479 | /> | 479 | /> |
480 | <span>Delete Chapter</span> | 480 | <span>Delete Chapter</span> |
481 | </v-tooltip> | 481 | </v-tooltip> |
482 | </td> | 482 | </td> |
483 | </tr> | 483 | </tr> |
484 | </template> | 484 | </template> |
485 | </v-data-table> | 485 | </v-data-table> |
486 | </template> | 486 | </template> |
487 | 487 | ||
488 | <v-alert | 488 | <v-alert |
489 | slot="no-results" | 489 | slot="no-results" |
490 | :value="true" | 490 | :value="true" |
491 | color="error" | 491 | color="error" |
492 | icon="warning" | 492 | icon="warning" |
493 | >Your search for "{{ search }}" found no results.</v-alert> | 493 | >Your search for "{{ search }}" found no results.</v-alert> |
494 | </v-data-table> | 494 | </v-data-table> |
495 | <!-- ****** ADD Course Detail ****** --> | 495 | <!-- ****** ADD Course Detail ****** --> |
496 | <v-dialog v-model="addCourseDetailDialog" max-width="600px"> | 496 | <v-dialog v-model="addCourseDetailDialog" max-width="600px"> |
497 | <v-card flat class="card-style pa-2" dark> | 497 | <v-card flat class="card-style pa-2" dark> |
498 | <v-layout> | 498 | <v-layout> |
499 | <v-flex xs12> | 499 | <v-flex xs12> |
500 | <label class="title text-xs-center">Add Course Details</label> | 500 | <label class="title text-xs-center">Add Course Details</label> |
501 | <v-icon size="24" class="right" @click="addCourseDetailDialog = false">cancel</v-icon> | 501 | <v-icon size="24" class="right" @click="addCourseDetailDialog = false">cancel</v-icon> |
502 | </v-flex> | 502 | </v-flex> |
503 | </v-layout> | 503 | </v-layout> |
504 | <v-form ref="form" v-model="valid" lazy-validation> | 504 | <v-form ref="form" v-model="valid" lazy-validation> |
505 | <v-container fluid> | 505 | <v-container fluid> |
506 | <v-flex xs12> | 506 | <v-flex xs12> |
507 | <v-layout> | 507 | <v-layout> |
508 | <v-flex xs4 class="pt-4 subheading"> | 508 | <v-flex xs4 class="pt-4 subheading"> |
509 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 509 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
510 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 510 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
511 | </v-flex> | 511 | </v-flex> |
512 | <v-flex xs8 sm8 md7 class="ml-3"> | 512 | <v-flex xs8 sm8 md7 class="ml-3"> |
513 | <v-select | 513 | <v-select |
514 | :items="addclass" | 514 | :items="addclass" |
515 | label="Select Class" | 515 | label="Select Class" |
516 | v-model="addCourseDetail.classId" | 516 | v-model="addCourseDetail.classId" |
517 | item-text="classNum" | 517 | item-text="classNum" |
518 | item-value="_id" | 518 | item-value="_id" |
519 | name="Select Class" | 519 | name="Select Class" |
520 | :rules="clsssRules" | 520 | :rules="clsssRules" |
521 | @change="getCourses(addCourseDetail.classId)" | 521 | @change="getCourses(addCourseDetail.classId)" |
522 | required | 522 | required |
523 | ></v-select> | 523 | ></v-select> |
524 | </v-flex> | 524 | </v-flex> |
525 | </v-layout> | 525 | </v-layout> |
526 | </v-flex> | 526 | </v-flex> |
527 | <v-flex xs12> | 527 | <v-flex xs12> |
528 | <v-layout> | 528 | <v-layout> |
529 | <v-flex xs4 class="pt-4 subheading"> | 529 | <v-flex xs4 class="pt-4 subheading"> |
530 | <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> | 530 | <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> |
531 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> | 531 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> |
532 | </v-flex> | 532 | </v-flex> |
533 | <v-flex xs8 sm8 md7 class="ml-3"> | 533 | <v-flex xs8 sm8 md7 class="ml-3"> |
534 | <v-select | 534 | <v-select |
535 | :items="courseData" | 535 | :items="courseData" |
536 | label="Select Course" | 536 | label="Select Course" |
537 | v-model="addCourseDetail.courseId" | 537 | v-model="addCourseDetail.courseId" |
538 | item-text="coursrName" | 538 | item-text="coursrName" |
539 | item-value="_id" | 539 | item-value="_id" |
540 | :rules="courseRules" | 540 | :rules="courseRules" |
541 | required | 541 | required |
542 | ></v-select> | 542 | ></v-select> |
543 | </v-flex> | 543 | </v-flex> |
544 | </v-layout> | 544 | </v-layout> |
545 | </v-flex> | 545 | </v-flex> |
546 | <v-flex xs12> | 546 | <v-flex xs12> |
547 | <v-layout> | 547 | <v-layout> |
548 | <v-flex xs4 class="pt-4 subheading"> | 548 | <v-flex xs4 class="pt-4 subheading"> |
549 | <label class="right">Chapter Name:</label> | 549 | <label class="right">Chapter Name:</label> |
550 | </v-flex> | 550 | </v-flex> |
551 | <v-flex xs8 sm8 md7 class="ml-3"> | 551 | <v-flex xs8 sm8 md7 class="ml-3"> |
552 | <v-text-field | 552 | <v-text-field |
553 | v-model="addCourseDetail.chapterName" | 553 | v-model="addCourseDetail.chapterName" |
554 | placeholder="fill your Title" | 554 | placeholder="fill your Title" |
555 | name="name" | 555 | name="name" |
556 | type="text" | 556 | type="text" |
557 | :rules="chapterNameRules" | 557 | :rules="chapterNameRules" |
558 | required | 558 | required |
559 | ></v-text-field> | 559 | ></v-text-field> |
560 | </v-flex> | 560 | </v-flex> |
561 | </v-layout> | 561 | </v-layout> |
562 | </v-flex> | 562 | </v-flex> |
563 | <v-flex xs12> | 563 | <v-flex xs12> |
564 | <v-layout> | 564 | <v-layout> |
565 | <v-flex xs4 class="pt-4 subheading"> | 565 | <v-flex xs4 class="pt-4 subheading"> |
566 | <label class="right">Description:</label> | 566 | <label class="right">Description:</label> |
567 | </v-flex> | 567 | </v-flex> |
568 | <v-flex xs8 sm8 md7 class="ml-3"> | 568 | <v-flex xs8 sm8 md7 class="ml-3"> |
569 | <v-text-field | 569 | <v-text-field |
570 | placeholder="fill your Description" | 570 | placeholder="fill your Description" |
571 | :rules="descriptionRules" | 571 | :rules="descriptionRules" |
572 | v-model="addCourseDetail.description" | 572 | v-model="addCourseDetail.description" |
573 | type="text" | 573 | type="text" |
574 | name="email" | 574 | name="email" |
575 | required | 575 | required |
576 | ></v-text-field> | 576 | ></v-text-field> |
577 | </v-flex> | 577 | </v-flex> |
578 | </v-layout> | 578 | </v-layout> |
579 | </v-flex> | 579 | </v-flex> |
580 | <v-layout> | 580 | <v-layout> |
581 | <v-flex xs12> | 581 | <v-flex xs12> |
582 | <div v-for="(chapterPoints,index) in finds" :key="index"> | 582 | <div v-for="(chapterPoints,index) in finds" :key="index"> |
583 | <v-layout> | 583 | <v-layout> |
584 | <v-flex xs4 class="pt-4 subheading"> | 584 | <v-flex xs4 class="pt-4 subheading"> |
585 | <label class="right">Chapter Points:</label> | 585 | <label class="right">Chapter Points:</label> |
586 | </v-flex> | 586 | </v-flex> |
587 | <v-flex xs8 sm8 md6 class="ml-3"> | 587 | <v-flex xs8 sm8 md6 class="ml-3"> |
588 | <v-text-field | 588 | <v-text-field |
589 | placeholder="fill your Chapter Points" | 589 | placeholder="fill your Chapter Points" |
590 | v-model="chapterPoints.value" | 590 | v-model="chapterPoints.value" |
591 | type="text" | 591 | type="text" |
592 | required | 592 | required |
593 | ></v-text-field> | 593 | ></v-text-field> |
594 | </v-flex> | 594 | </v-flex> |
595 | <v-flex xs2 class="pt-4"> | 595 | <v-flex xs2 class="pt-4"> |
596 | <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> | 596 | <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> |
597 | <v-icon @click="addFind">add_circle</v-icon> | 597 | <v-icon @click="addFind">add_circle</v-icon> |
598 | </v-flex> | 598 | </v-flex> |
599 | </v-layout> | 599 | </v-layout> |
600 | </div> | 600 | </div> |
601 | </v-flex> | 601 | </v-flex> |
602 | </v-layout> | 602 | </v-layout> |
603 | <v-layout> | 603 | <v-layout> |
604 | <v-flex xs12 sm12> | 604 | <v-flex xs12 sm12> |
605 | <v-layout class="right"> | 605 | <v-layout class="right"> |
606 | <v-btn @click="clear" round dark class="clear-button">Clear</v-btn> | 606 | <v-btn @click="clear" round dark class="clear-button">Clear</v-btn> |
607 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | 607 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> |
608 | </v-layout> | 608 | </v-layout> |
609 | </v-flex> | 609 | </v-flex> |
610 | </v-layout> | 610 | </v-layout> |
611 | </v-container> | 611 | </v-container> |
612 | </v-form> | 612 | </v-form> |
613 | </v-card> | 613 | </v-card> |
614 | </v-dialog> | 614 | </v-dialog> |
615 | <v-snackbar | 615 | <v-snackbar |
616 | :timeout="timeout" | 616 | :timeout="timeout" |
617 | :top="y === 'top'" | 617 | :top="y === 'top'" |
618 | :right="x === 'right'" | 618 | :right="x === 'right'" |
619 | :vertical="mode === 'vertical'" | 619 | :vertical="mode === 'vertical'" |
620 | v-model="snackbar" | 620 | v-model="snackbar" |
621 | :color="color" | 621 | :color="color" |
622 | >{{ text }}</v-snackbar> | 622 | >{{ text }}</v-snackbar> |
623 | <div class="loader" v-if="showLoader"> | 623 | <div class="loader" v-if="showLoader"> |
624 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 624 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
625 | </div> | 625 | </div> |
626 | </v-container> | 626 | </v-container> |
627 | </template> | 627 | </template> |
628 | 628 | ||
629 | <script> | 629 | <script> |
630 | import http from "@/Services/http.js"; | 630 | import http from "@/Services/http.js"; |
631 | 631 | ||
632 | export default { | 632 | export default { |
633 | data: () => ({ | 633 | data: () => ({ |
634 | snackbar: false, | 634 | snackbar: false, |
635 | y: "top", | 635 | y: "top", |
636 | x: "right", | 636 | x: "right", |
637 | mode: "", | 637 | mode: "", |
638 | timeout: 3000, | 638 | timeout: 3000, |
639 | text: "", | 639 | text: "", |
640 | loading: false, | 640 | loading: false, |
641 | color: "", | 641 | color: "", |
642 | date: null, | 642 | date: null, |
643 | search: "", | 643 | search: "", |
644 | show: true, | 644 | show: true, |
645 | addCourseDetailDialog: false, | 645 | addCourseDetailDialog: false, |
646 | showSearch: false, | 646 | showSearch: false, |
647 | showLoader: false, | 647 | showLoader: false, |
648 | editCourseDetailDialog: false, | 648 | editCourseDetailDialog: false, |
649 | editChapterDetailDialog: false, | 649 | editChapterDetailDialog: false, |
650 | viewProfileGallery: false, | 650 | viewProfileGallery: false, |
651 | valid: true, | 651 | valid: true, |
652 | editLoading: false, | 652 | editLoading: false, |
653 | addclass: [], | 653 | addclass: [], |
654 | courseData: [], | 654 | courseData: [], |
655 | addSection: [], | 655 | addSection: [], |
656 | getCourse: {}, | 656 | getCourse: {}, |
657 | finds: [{ value: "" }], | 657 | finds: [{ value: "" }], |
658 | findsChapterPoint: [{ value: "" }], | 658 | findsChapterPoint: [{ value: "" }], |
659 | updates: [{ value: "" }], | 659 | updates: [{ value: "" }], |
660 | youTubeLink: {}, | 660 | youTubeLink: {}, |
661 | addCourseDetail: { | 661 | addCourseDetail: { |
662 | chapters: [ | 662 | chapters: [ |
663 | { | 663 | { |
664 | chapterName: "", | 664 | chapterName: "", |
665 | description: "", | 665 | description: "", |
666 | chapterPoints: [] | 666 | chapterPoints: [] |
667 | } | 667 | } |
668 | ] | 668 | ] |
669 | }, | 669 | }, |
670 | chapters: [], | 670 | chapters: [], |
671 | pagination: { | 671 | pagination: { |
672 | rowsPerPage: 10 | 672 | rowsPerPage: 10 |
673 | }, | 673 | }, |
674 | editFiles: [], | 674 | editFiles: [], |
675 | files: [], | 675 | files: [], |
676 | courseData: [], | 676 | courseData: [], |
677 | token: "", | 677 | token: "", |
678 | courseId: "", | 678 | courseId: "", |
679 | clsssRules: [v => !!v || " Class is required"], | 679 | clsssRules: [v => !!v || " Class is required"], |
680 | courseRules: [v => !!v || " Course is required"], | 680 | courseRules: [v => !!v || " Course is required"], |
681 | chapterNameRules: [v => !!v || " Tilte is required"], | 681 | chapterNameRules: [v => !!v || " Tilte is required"], |
682 | descriptionRules: [v => !!v || " Description is required"], | 682 | descriptionRules: [v => !!v || " Description is required"], |
683 | headers: [ | 683 | headers: [ |
684 | { | 684 | { |
685 | align: "", | 685 | align: "", |
686 | text: "No", | 686 | text: "No", |
687 | sortable: false, | 687 | sortable: false, |
688 | value: "index" | 688 | value: "index" |
689 | }, | 689 | }, |
690 | { | 690 | { |
691 | text: "Class Name", | 691 | text: "Class Name", |
692 | value: "classNum", | 692 | value: "classNum", |
693 | sortable: false, | 693 | sortable: false, |
694 | align: "center" | 694 | align: "center" |
695 | }, | 695 | }, |
696 | { | 696 | { |
697 | text: "Course Name", | 697 | text: "Course Name", |
698 | value: "courseName", | 698 | value: "courseName", |
699 | sortable: false, | 699 | sortable: false, |
700 | align: "center" | 700 | align: "center" |
701 | }, | 701 | }, |
702 | { text: "Action", value: "", sortable: false, align: "center" } | 702 | { text: "Action", value: "", sortable: false, align: "center" } |
703 | ], | 703 | ], |
704 | CourseDetailsList: [], | 704 | CourseDetailsList: [], |
705 | editedIndex: -1, | 705 | editedIndex: -1, |
706 | editedItem: {}, | 706 | editedItem: {}, |
707 | editedCourse: {}, | 707 | editedCourse: {}, |
708 | editChapter: {}, | 708 | editChapter: {}, |
709 | index: "", | 709 | index: "", |
710 | addChapterItem: {}, | 710 | addChapterItem: {}, |
711 | addChapterDialog: false | 711 | addChapterDialog: false |
712 | }), | 712 | }), |
713 | methods: { | 713 | methods: { |
714 | getCourses(classId) { | 714 | getCourses(classId) { |
715 | this.showLoader = true; | 715 | this.showLoader = true; |
716 | http() | 716 | http() |
717 | .get("/getCourseesList", { | 717 | .get("/getCourseesList", { |
718 | params: { | 718 | params: { |
719 | classId: classId | 719 | classId: classId |
720 | } | 720 | } |
721 | }) | 721 | }) |
722 | .then(response => { | 722 | .then(response => { |
723 | this.editChapter.courseId = ""; | 723 | this.editChapter.courseId = ""; |
724 | this.courseData = response.data.data; | 724 | this.courseData = response.data.data; |
725 | console.log("this.courseData", this.courseData); | 725 | console.log("this.courseData", this.courseData); |
726 | this.showLoader = false; | 726 | this.showLoader = false; |
727 | }) | 727 | }) |
728 | .catch(err => { | 728 | .catch(err => { |
729 | console.log("err====>", err); | 729 | console.log("err====>", err); |
730 | this.showLoader = false; | 730 | this.showLoader = false; |
731 | }); | 731 | }); |
732 | }, | 732 | }, |
733 | getCourseDetailsList() { | 733 | getCourseDetailsList() { |
734 | this.showLoader = true; | 734 | this.showLoader = true; |
735 | http() | 735 | http() |
736 | .get("/getParticularCourseDetail", { | 736 | .get("/getParticularCourseDetail", { |
737 | params: { | 737 | params: { |
738 | courseId: this.getCourse.courseId | 738 | courseId: this.getCourse.courseId |
739 | } | 739 | } |
740 | }) | 740 | }) |
741 | .then(response => { | 741 | .then(response => { |
742 | this.CourseDetailsList = response.data.data; | 742 | this.CourseDetailsList = response.data.data; |
743 | this.chapters = response.data.data[0].chapters; | 743 | this.chapters = response.data.data[0].chapters; |
744 | // console.log("response.data.data", this.CourseDetailsList); | 744 | // console.log("response.data.data", this.CourseDetailsList); |
745 | this.showLoader = false; | 745 | this.showLoader = false; |
746 | }) | 746 | }) |
747 | .catch(error => { | 747 | .catch(error => { |
748 | // console.log("err====>", err); | 748 | // console.log("err====>", err); |
749 | this.showLoader = false; | 749 | this.showLoader = false; |
750 | if (error.response.status === 401) { | 750 | if (error.response.status === 401) { |
751 | this.$router.replace({ path: "/" }); | 751 | this.$router.replace({ path: "/" }); |
752 | this.$store.dispatch("setToken", null); | 752 | this.$store.dispatch("setToken", null); |
753 | this.$store.dispatch("Id", null); | 753 | this.$store.dispatch("Id", null); |
754 | } | 754 | } |
755 | }); | 755 | }); |
756 | }, | 756 | }, |
757 | courseTableRow(id) { | 757 | courseTableRow(id) { |
758 | // console.log("click7", id); | 758 | // console.log("click7", id); |
759 | this.courseId = id; | 759 | this.courseId = id; |
760 | }, | 760 | }, |
761 | addChapters(item) { | 761 | addChapters(item) { |
762 | this.files = []; | 762 | this.files = []; |
763 | this.editedIndex = this.CourseDetailsList.indexOf(item); | 763 | this.editedIndex = this.CourseDetailsList.indexOf(item); |
764 | let addChapterItem = Object.assign({}, item); | 764 | let addChapterItem = Object.assign({}, item); |
765 | this.addChapterItem.courseDetailId = addChapterItem._id; | 765 | this.addChapterItem.courseDetailId = addChapterItem._id; |
766 | this.addChapterDialog = true; | 766 | this.addChapterDialog = true; |
767 | console.log("this.addChapterItem", this.addChapterItem); | 767 | console.log("this.addChapterItem", this.addChapterItem); |
768 | }, | 768 | }, |
769 | submitChapter() { | 769 | submitChapter() { |
770 | this.addChapterItem.chapterPoints = []; | 770 | this.addChapterItem.chapterPoints = []; |
771 | for (let i = 0; i < this.findsChapterPoint.length; i++) { | 771 | for (let i = 0; i < this.findsChapterPoint.length; i++) { |
772 | this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); | 772 | this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); |
773 | } | 773 | } |
774 | // console.log("this.addChapterItem", this.addChapterItem); | 774 | // console.log("this.addChapterItem", this.addChapterItem); |
775 | this.loading = true; | 775 | this.loading = true; |
776 | http() | 776 | http() |
777 | .put("/addChapters", this.addChapterItem) | 777 | .put("/addChapters", this.addChapterItem) |
778 | .then(response => { | 778 | .then(response => { |
779 | this.addChapterDialog = false; | 779 | this.addChapterDialog = false; |
780 | this.loading = false; | 780 | this.loading = false; |
781 | this.snackbar = true; | 781 | this.snackbar = true; |
782 | this.text = response.data.message; | 782 | this.text = response.data.message; |
783 | this.color = "green"; | 783 | this.color = "green"; |
784 | this.getCourseDetailsList(); | 784 | this.getCourseDetailsList(); |
785 | this.clear(); | 785 | this.clear(); |
786 | this.findsChapterPoint = ""; | 786 | this.findsChapterPoint = ""; |
787 | }) | 787 | }) |
788 | .catch(error => { | 788 | .catch(error => { |
789 | this.snackbar = true; | 789 | this.snackbar = true; |
790 | this.text = error.response.data.message; | 790 | this.text = error.response.data.message; |
791 | this.color = "error"; | 791 | this.color = "error"; |
792 | this.loading = false; | 792 | this.loading = false; |
793 | }); | 793 | }); |
794 | }, | 794 | }, |
795 | profile(item) { | 795 | profile(item) { |
796 | this.editedIndex = this.chapters.indexOf(item); | 796 | this.editedIndex = this.chapters.indexOf(item); |
797 | this.editedItem = Object.assign({}, item); | 797 | this.editedItem = Object.assign({}, item); |
798 | this.viewProfileGallery = true; | 798 | this.viewProfileGallery = true; |
799 | }, | 799 | }, |
800 | editItem(item) { | 800 | editItem(item) { |
801 | this.editedIndex = this.CourseDetailsList.indexOf(item); | 801 | this.editedIndex = this.CourseDetailsList.indexOf(item); |
802 | this.editedCourse = Object.assign({}, item); | 802 | this.editedCourse = Object.assign({}, item); |
803 | console.log("this.editChapter", this.editedCourse); | 803 | console.log("this.editChapter", this.editedCourse); |
804 | this.editCourseDetailDialog = true; | 804 | this.editCourseDetailDialog = true; |
805 | }, | 805 | }, |
806 | editChapterItem(item) { | 806 | editChapterItem(item) { |
807 | this.editedIndex = this.chapters.indexOf(item); | 807 | this.editedIndex = this.chapters.indexOf(item); |
808 | this.editChapter = Object.assign({}, item); | 808 | this.editChapter = Object.assign({}, item); |
809 | // console.log("this.editChapter", this.editChapter); | 809 | // console.log("this.editChapter", this.editChapter); |
810 | this.editChapterDetailDialog = true; | 810 | this.editChapterDetailDialog = true; |
811 | }, | 811 | }, |
812 | deleteItem(item) { | 812 | deleteItem(item) { |
813 | let deleteGallery = { | 813 | let deleteGallery = { |
814 | courseDetailId: item._id | 814 | courseDetailId: item._id |
815 | }; | 815 | }; |
816 | http() | 816 | http() |
817 | .delete( | 817 | .delete( |
818 | "/deleteCourseDetail", | 818 | "/deleteCourseDetail", |
819 | confirm("Are you sure you want to delete this?") && { | 819 | confirm("Are you sure you want to delete this?") && { |
820 | params: deleteGallery, | 820 | params: deleteGallery, |
821 | headers: { | 821 | headers: { |
822 | Authorization: "Bearer " + this.token | 822 | Authorization: "Bearer " + this.token |
823 | } | 823 | } |
824 | } | 824 | } |
825 | ) | 825 | ) |
826 | .then(response => { | 826 | .then(response => { |
827 | this.snackbar = true; | 827 | this.snackbar = true; |
828 | this.text = "Successfully delete Course Details"; | 828 | this.text = "Successfully delete Course Details"; |
829 | this.color = "green"; | 829 | this.color = "green"; |
830 | this.getCourseDetailsList(); | 830 | this.getCourseDetailsList(); |
831 | }) | 831 | }) |
832 | .catch(error => { | 832 | .catch(error => { |
833 | // console.log(error); | 833 | // console.log(error); |
834 | this.snackbar = true; | 834 | this.snackbar = true; |
835 | this.text = error.response.data.message; | 835 | this.text = error.response.data.message; |
836 | this.color = "error"; | 836 | this.color = "error"; |
837 | }); | 837 | }); |
838 | }, | 838 | }, |
839 | deleteChapters(item) { | 839 | deleteChapters(item) { |
840 | // console.log("item", item); | 840 | // console.log("item", item); |
841 | let deleteChapters = { | 841 | let deleteChapters = { |
842 | courseDetailId: this.courseId, | 842 | courseDetailId: this.courseId, |
843 | chapterId: item._id | 843 | chapterId: item._id |
844 | }; | 844 | }; |
845 | http() | 845 | http() |
846 | .put( | 846 | .put( |
847 | "/deleteChapters", | 847 | "/deleteChapters", |
848 | confirm("Are you sure you want to delete this?") && deleteChapters | 848 | confirm("Are you sure you want to delete this?") && deleteChapters |
849 | ) | 849 | ) |
850 | .then(response => { | 850 | .then(response => { |
851 | this.snackbar = true; | 851 | this.snackbar = true; |
852 | this.text = "Successfully delete Chapters"; | 852 | this.text = "Successfully delete Chapters"; |
853 | this.color = "green"; | 853 | this.color = "green"; |
854 | this.getCourseDetailsList(); | 854 | this.getCourseDetailsList(); |
855 | }) | 855 | }) |
856 | .catch(error => { | 856 | .catch(error => { |
857 | // console.log(error); | 857 | // console.log(error); |
858 | this.snackbar = true; | 858 | this.snackbar = true; |
859 | this.text = error.response.data.message; | 859 | this.text = error.response.data.message; |
860 | this.color = "error"; | 860 | this.color = "error"; |
861 | }); | 861 | }); |
862 | }, | 862 | }, |
863 | close() { | 863 | close() { |
864 | this.editCourseDetailDialog = false; | 864 | this.editCourseDetailDialog = false; |
865 | }, | 865 | }, |
866 | closeProfileGallery() { | 866 | closeProfileGallery() { |
867 | this.viewProfileGallery = false; | 867 | this.viewProfileGallery = false; |
868 | }, | 868 | }, |
869 | submit() { | 869 | submit() { |
870 | let chapters = []; | 870 | let chapters = []; |
871 | var chapterPoints = []; | 871 | var chapterPoints = []; |
872 | for (let i = 0; i < this.finds.length; i++) { | 872 | for (let i = 0; i < this.finds.length; i++) { |
873 | chapterPoints.push(this.finds[i].value); | 873 | chapterPoints.push(this.finds[i].value); |
874 | // console.log("this.finds[i].value", this.finds[i].value); | 874 | // console.log("this.finds[i].value", this.finds[i].value); |
875 | chapters = [ | 875 | chapters = [ |
876 | { | 876 | { |
877 | chapterName: this.addCourseDetail.chapterName, | 877 | chapterName: this.addCourseDetail.chapterName, |
878 | description: this.addCourseDetail.description, | 878 | description: this.addCourseDetail.description, |
879 | chapterPoints: chapterPoints | 879 | chapterPoints: chapterPoints |
880 | } | 880 | } |
881 | ]; | 881 | ]; |
882 | } | 882 | } |
883 | if (this.$refs.form.validate()) { | 883 | if (this.$refs.form.validate()) { |
884 | // console.log("this.addCourseDetail", this.addCourseDetail); | 884 | // console.log("this.addCourseDetail", this.addCourseDetail); |
885 | var courseDetailsData = { | 885 | var courseDetailsData = { |
886 | classId: this.addCourseDetail.classId, | 886 | classId: this.addCourseDetail.classId, |
887 | courseId: this.addCourseDetail.courseId, | 887 | courseId: this.addCourseDetail.courseId, |
888 | chapters: chapters | 888 | chapters: chapters |
889 | }; | 889 | }; |
890 | this.loading = true; | 890 | this.loading = true; |
891 | http() | 891 | http() |
892 | .post("/createCourseDetail", courseDetailsData) | 892 | .post("/createCourseDetail", courseDetailsData) |
893 | .then(response => { | 893 | .then(response => { |
894 | this.addCourseDetailDialog = false; | 894 | this.addCourseDetailDialog = false; |
895 | this.loading = false; | 895 | this.loading = false; |
896 | this.snackbar = true; | 896 | this.snackbar = true; |
897 | this.text = response.data.message; | 897 | this.text = response.data.message; |
898 | this.color = "green"; | 898 | this.color = "green"; |
899 | this.clear(); | 899 | this.clear(); |
900 | this.files = ""; | 900 | this.files = ""; |
901 | }) | 901 | }) |
902 | .catch(error => { | 902 | .catch(error => { |
903 | this.snackbar = true; | 903 | this.snackbar = true; |
904 | this.text = error.response.data.message; | 904 | this.text = error.response.data.message; |
905 | this.color = "error"; | 905 | this.color = "error"; |
906 | this.loading = false; | 906 | this.loading = false; |
907 | }); | 907 | }); |
908 | } | 908 | } |
909 | }, | 909 | }, |
910 | clear() { | 910 | clear() { |
911 | this.$refs.form.reset(); | 911 | this.$refs.form.reset(); |
912 | this.files = []; | 912 | this.files = []; |
913 | }, | 913 | }, |
914 | saveChapter() { | 914 | saveChapter() { |
915 | this.editedItem.courseDetailId = this.editedItem._id; | 915 | this.editedItem.courseDetailId = this.editedItem._id; |
916 | for (let i = 0; i < this.updates.length; i++) { | 916 | for (let i = 0; i < this.updates.length; i++) { |
917 | this.editChapter.chapterPoints.push(this.updates[i].value); | 917 | this.editChapter.chapterPoints.push(this.updates[i].value); |
918 | } | 918 | } |
919 | var updateData = { | 919 | var updateData = { |
920 | courseDetailId: this.courseId, | 920 | courseDetailId: this.courseId, |
921 | chapterId: this.editChapter._id, | 921 | chapterId: this.editChapter._id, |
922 | chapterName: this.editChapter.chapterName, | 922 | chapterName: this.editChapter.chapterName, |
923 | description: this.editChapter.description, | 923 | description: this.editChapter.description, |
924 | chapterPoints: this.editChapter.chapterPoints | 924 | chapterPoints: this.editChapter.chapterPoints |
925 | }; | 925 | }; |
926 | this.editLoading = true; | 926 | this.editLoading = true; |
927 | http() | 927 | http() |
928 | .put("/updateChapters", updateData) | 928 | .put("/updateChapters", updateData) |
929 | .then(response => { | 929 | .then(response => { |
930 | this.getCourseDetailsList(); | 930 | this.getCourseDetailsList(); |
931 | this.close(); | 931 | this.close(); |
932 | this.snackbar = true; | 932 | this.snackbar = true; |
933 | this.text = response.data.message; | 933 | this.text = response.data.message; |
934 | this.color = "green"; | 934 | this.color = "green"; |
935 | this.editLoading = false; | 935 | this.editLoading = false; |
936 | // this.editChapterPointName = ""; | 936 | // this.editChapterPointName = ""; |
937 | this.editFiles = []; | 937 | this.editFiles = []; |
938 | }) | 938 | }) |
939 | .catch(error => { | 939 | .catch(error => { |
940 | this.editLoading = false; | 940 | this.editLoading = false; |
941 | this.snackbar = true; | 941 | this.snackbar = true; |
942 | this.text = error.response.data.message; | 942 | this.text = error.response.data.message; |
943 | this.color = "error"; | 943 | this.color = "error"; |
944 | }); | 944 | }); |
945 | }, | 945 | }, |
946 | save() { | 946 | save() { |
947 | // console.log("utykgigiu", this.editedCourse); | 947 | // console.log("utykgigiu", this.editedCourse); |
948 | var updateData = { | 948 | var updateData = { |
949 | courseDetailId: this.editedCourse._id, | 949 | courseDetailId: this.editedCourse._id, |
950 | courseId: this.editedCourse.courseId, | 950 | courseId: this.editedCourse.courseId, |
951 | classId: this.editedCourse.classId | 951 | classId: this.editedCourse.classId |
952 | }; | 952 | }; |
953 | this.editLoading = true; | 953 | this.editLoading = true; |
954 | http() | 954 | http() |
955 | .put("/updateCourseDetail", updateData) | 955 | .put("/updateCourseDetail", updateData) |
956 | .then(response => { | 956 | .then(response => { |
957 | this.getCourseDetailsList(); | 957 | this.getCourseDetailsList(); |
958 | this.editCourseDetailDialog = false; | 958 | this.editCourseDetailDialog = false; |
959 | this.snackbar = true; | 959 | this.snackbar = true; |
960 | this.text = response.data.message; | 960 | this.text = response.data.message; |
961 | this.color = "green"; | 961 | this.color = "green"; |
962 | this.editLoading = false; | 962 | this.editLoading = false; |
963 | // this.editChapterPointName = ""; | 963 | // this.editChapterPointName = ""; |
964 | this.editFiles = []; | 964 | this.editFiles = []; |
965 | }) | 965 | }) |
966 | .catch(error => { | 966 | .catch(error => { |
967 | this.editLoading = false; | 967 | this.editLoading = false; |
968 | this.snackbar = true; | 968 | this.snackbar = true; |
969 | this.text = error.response.data.message; | 969 | this.text = error.response.data.message; |
970 | this.color = "error"; | 970 | this.color = "error"; |
971 | }); | 971 | }); |
972 | }, | 972 | }, |
973 | getAllClasses() { | 973 | getAllClasses() { |
974 | http() | 974 | http() |
975 | .get("/getClassesList", { | 975 | .get("/getClassesList", { |
976 | headers: { Authorization: "Bearer " + this.token } | 976 | headers: { Authorization: "Bearer " + this.token } |
977 | }) | 977 | }) |
978 | .then(response => { | 978 | .then(response => { |
979 | this.addclass = response.data.data; | 979 | this.addclass = response.data.data; |
980 | }) | 980 | }) |
981 | .catch(err => { | 981 | .catch(err => { |
982 | // console.log("err====>", err); | 982 | // console.log("err====>", err); |
983 | }); | 983 | }); |
984 | }, | 984 | }, |
985 | removeChapterPoint: function() { | 985 | removeChapterPoint: function() { |
986 | this.findsChapterPoint = [{ value: "" }]; | 986 | this.findsChapterPoint = [{ value: "" }]; |
987 | }, | 987 | }, |
988 | removeAddFind: function() { | 988 | removeAddFind: function() { |
989 | this.finds = [{ value: "" }]; | 989 | this.finds = [{ value: "" }]; |
990 | }, | 990 | }, |
991 | addFind: function() { | 991 | addFind: function() { |
992 | this.finds.push({ value: "" }); | 992 | this.finds.push({ value: "" }); |
993 | }, | 993 | }, |
994 | addChapterPoint: function() { | 994 | addChapterPoint: function() { |
995 | this.findsChapterPoint.push({ value: "" }); | 995 | this.findsChapterPoint.push({ value: "" }); |
996 | }, | 996 | }, |
997 | update: function() { | 997 | update: function() { |
998 | console.log("click"); | 998 | console.log("click"); |
999 | this.updates.push({ value: "" }); | 999 | this.updates.push({ value: "" }); |
1000 | }, | 1000 | }, |
1001 | deleteFind: function(index) { | 1001 | deleteFind: function(index) { |
1002 | this.finds.splice(index, 1); | 1002 | this.finds.splice(index, 1); |
1003 | if (index === 0) this.addFind(); | 1003 | if (index === 0) this.addFind(); |
1004 | }, | 1004 | }, |
1005 | deleteChapterPoint: function(index) { | 1005 | deleteChapterPoint: function(index) { |
1006 | this.findsChapterPoint.splice(index, 1); | 1006 | this.findsChapterPoint.splice(index, 1); |
1007 | if (index === 0) this.addChapterPoint(); | 1007 | if (index === 0) this.addChapterPoint(); |
1008 | }, | 1008 | }, |
1009 | deleteUpdate: function(index) { | 1009 | deleteUpdate: function(index) { |
1010 | this.updates.splice(index, 1); | 1010 | this.updates.splice(index, 1); |
1011 | if (index === 0) this.update(); | 1011 | if (index === 0) this.update(); |
1012 | }, | 1012 | }, |
1013 | deleteUrl: function(index, youTubelinkId, id) { | 1013 | deleteUrl: function(index, youTubelinkId, id) { |
1014 | this.editChapter.chapterPoints.splice(index, 1); | 1014 | this.editChapter.chapterPoints.splice(index, 1); |
1015 | if (index === 0) this.update(); | 1015 | if (index === 0) this.update(); |
1016 | }, | 1016 | }, |
1017 | displaySearch() { | 1017 | displaySearch() { |
1018 | this.show = false; | 1018 | this.show = false; |
1019 | this.showSearch = true; | 1019 | this.showSearch = true; |
1020 | }, | 1020 | }, |
1021 | closeSearch() { | 1021 | closeSearch() { |
1022 | this.showSearch = false; | 1022 | this.showSearch = false; |
1023 | this.show = true; | 1023 | this.show = true; |
1024 | this.search = ""; | 1024 | this.search = ""; |
1025 | } | 1025 | } |
1026 | }, | 1026 | }, |
1027 | mounted() { | 1027 | mounted() { |
1028 | this.token = this.$store.state.token; | 1028 | this.token = this.$store.state.token; |
1029 | this.getAllClasses(); | 1029 | this.getAllClasses(); |
1030 | } | 1030 | } |
1031 | }; | 1031 | }; |
1032 | </script> | 1032 | </script> |
src/pages/Course/enrollStudents.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** STUDENTS TABLE ****** --> | 3 | <!-- ****** STUDENTS TABLE ****** --> |
4 | <v-toolbar color="transparent" flat> | 4 | <v-toolbar color="transparent" flat> |
5 | <v-spacer></v-spacer> | 5 | <v-spacer></v-spacer> |
6 | <v-flex xs12 sm4 md2> | 6 | <v-flex xs12 sm4 md2> |
7 | <v-select | 7 | <v-select |
8 | small | 8 | small |
9 | :items="addclass" | 9 | :items="addclass" |
10 | label="Select Class" | 10 | label="Select Class" |
11 | v-model="getReport.classId" | 11 | v-model="getReport.classId" |
12 | item-text="classNum" | 12 | item-text="classNum" |
13 | item-value="_id" | 13 | item-value="_id" |
14 | name="Select Class" | 14 | name="Select Class" |
15 | @change="getCourses(getReport.classId)" | 15 | @change="getCourses(getReport.classId)" |
16 | class="mr-2" | 16 | class="mr-2" |
17 | required | 17 | required |
18 | ></v-select> | 18 | ></v-select> |
19 | </v-flex> | 19 | </v-flex> |
20 | <v-flex xs12 sm4 md2> | 20 | <v-flex xs12 sm4 md2> |
21 | <v-select | 21 | <v-select |
22 | :items="courseData" | 22 | :items="courseData" |
23 | label="Select Course" | 23 | label="Select Course" |
24 | v-model="getReport.courseId" | 24 | v-model="getReport.courseId" |
25 | item-text="coursrName" | 25 | item-text="coursrName" |
26 | item-value="_id" | 26 | item-value="_id" |
27 | required | 27 | required |
28 | class="ml-2" | 28 | class="ml-2" |
29 | @change="getStudentTable(getReport.courseId)" | 29 | @change="getStudentTable(getReport.courseId)" |
30 | ></v-select> | 30 | ></v-select> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-card-title class="body-1" v-show="show"> | 32 | <v-card-title class="body-1" v-show="show"> |
33 | <v-btn icon large flat @click="displaySearch"> | 33 | <v-btn icon large flat @click="displaySearch"> |
34 | <v-avatar size="27"> | 34 | <v-avatar size="27"> |
35 | <img src="/static/icon/search.png" alt="icon" /> | 35 | <img src="/static/icon/search.png" alt="icon" /> |
36 | </v-avatar> | 36 | </v-avatar> |
37 | </v-btn> | 37 | </v-btn> |
38 | </v-card-title> | 38 | </v-card-title> |
39 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 39 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
40 | <v-layout> | 40 | <v-layout> |
41 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 41 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
42 | <v-icon @click="closeSearch" color="error">close</v-icon> | 42 | <v-icon @click="closeSearch" color="error">close</v-icon> |
43 | </v-layout> | 43 | </v-layout> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-toolbar> | 45 | </v-toolbar> |
46 | <v-data-table | 46 | <v-data-table |
47 | :headers="headers" | 47 | :headers="headers" |
48 | :items="studentsData" | 48 | :items="studentsData" |
49 | :pagination.sync="pagination" | 49 | :pagination.sync="pagination" |
50 | :search="search" | 50 | :search="search" |
51 | select-all | 51 | select-all |
52 | v-model="selected" | 52 | v-model="selected" |
53 | item-key="name" | 53 | item-key="name" |
54 | > | 54 | > |
55 | <template slot="items" slot-scope="props"> | 55 | <template slot="items" slot-scope="props"> |
56 | <tr class="tr" :active="props.selected" @click="props.selected = !props.selected"> | 56 | <tr class="tr" :active="props.selected" @click="props.selected = !props.selected"> |
57 | <td class="text-xs-center td td-row"> | 57 | <td class="text-xs-center td td-row"> |
58 | <v-checkbox | 58 | <v-checkbox |
59 | :input-value="props.selected" | 59 | v-model="props.item.enroll" |
60 | @change="selectParticularStudent(props.item._id)" | 60 | @change="selectParticularStudent(props.item)" |
61 | primary | 61 | primary |
62 | hide-details | 62 | hide-details |
63 | ></v-checkbox> | 63 | ></v-checkbox> |
64 | </td> | 64 | </td> |
65 | <td class="text-xs-center td td-row"> | 65 | <td class="text-xs-center td td-row"> |
66 | <v-avatar size="40"> | 66 | <v-avatar size="40"> |
67 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 67 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
68 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 68 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
69 | </v-avatar> | 69 | </v-avatar> |
70 | </td> | 70 | </td> |
71 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 71 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
72 | <td class="text-xs-center td td-row">{{ props.item.fatherCellNo}}</td> | 72 | <td class="text-xs-center td td-row">{{ props.item.fatherCellNo}}</td> |
73 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> | 73 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> |
74 | </tr> | 74 | </tr> |
75 | </template> | 75 | </template> |
76 | <template slot="headers" slot-scope="props"> | 76 | <template slot="headers" slot-scope="props"> |
77 | <tr> | 77 | <tr> |
78 | <th> | 78 | <th> |
79 | <v-checkbox | 79 | <v-checkbox |
80 | :input-value="props.all" | 80 | :input-value="props.all" |
81 | :indeterminate="props.indeterminate" | 81 | :indeterminate="props.indeterminate" |
82 | primary | 82 | primary |
83 | hide-details | 83 | hide-details |
84 | @click.native="toggleAll" | 84 | @click.native="toggleAll" |
85 | ></v-checkbox> | 85 | ></v-checkbox> |
86 | </th> | 86 | </th> |
87 | <th | 87 | <th |
88 | v-for="header in props.headers" | 88 | v-for="header in props.headers" |
89 | :key="header.text" | 89 | :key="header.text" |
90 | :class="['column sortable', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']" | 90 | :class="['column sortable', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']" |
91 | @click="changeSort(header.value)" | 91 | @click="changeSort(header.value)" |
92 | > | 92 | > |
93 | <v-icon small>arrow_upward</v-icon> | 93 | <v-icon small>arrow_upward</v-icon> |
94 | {{ header.text }} | 94 | {{ header.text }} |
95 | </th> | 95 | </th> |
96 | </tr> | 96 | </tr> |
97 | </template> | 97 | </template> |
98 | <v-alert | 98 | <v-alert |
99 | slot="no-results" | 99 | slot="no-results" |
100 | :value="true" | 100 | :value="true" |
101 | color="error" | 101 | color="error" |
102 | icon="warning" | 102 | icon="warning" |
103 | >Your search for "{{ search }}" found no results.</v-alert> | 103 | >Your search for "{{ search }}" found no results.</v-alert> |
104 | </v-data-table> | 104 | </v-data-table> |
105 | <v-snackbar | 105 | <v-snackbar |
106 | :timeout="timeout" | 106 | :timeout="timeout" |
107 | :top="y === 'top'" | 107 | :top="y === 'top'" |
108 | :right="x === 'right'" | 108 | :right="x === 'right'" |
109 | :vertical="mode === 'vertical'" | 109 | :vertical="mode === 'vertical'" |
110 | v-model="snackbar" | 110 | v-model="snackbar" |
111 | color="success" | 111 | color="success" |
112 | >{{ text }}</v-snackbar> | 112 | >{{ text }}</v-snackbar> |
113 | <div class="loader" v-if="showLoader"> | 113 | <div class="loader" v-if="showLoader"> |
114 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 114 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
115 | </div> | 115 | </div> |
116 | </v-container> | 116 | </v-container> |
117 | </template> | 117 | </template> |
118 | 118 | ||
119 | <script> | 119 | <script> |
120 | import http from "@/Services/http.js"; | 120 | import http from "@/Services/http.js"; |
121 | import moment from "moment"; | 121 | import moment from "moment"; |
122 | 122 | ||
123 | export default { | 123 | export default { |
124 | data: () => ({ | 124 | data: () => ({ |
125 | snackbar: false, | 125 | snackbar: false, |
126 | y: "top", | 126 | y: "top", |
127 | x: "right", | 127 | x: "right", |
128 | mode: "", | 128 | mode: "", |
129 | timeout: 3000, | 129 | timeout: 3000, |
130 | text: "", | 130 | text: "", |
131 | show: true, | 131 | show: true, |
132 | showSearch: false, | 132 | showSearch: false, |
133 | showLoader: false, | 133 | showLoader: false, |
134 | loading: false, | 134 | loading: false, |
135 | date: null, | 135 | date: null, |
136 | search: "", | 136 | search: "", |
137 | addclass: [], | 137 | addclass: [], |
138 | pagination: { | 138 | pagination: { |
139 | rowsPerPage: 10 | 139 | rowsPerPage: 10 |
140 | }, | 140 | }, |
141 | headers: [ | 141 | headers: [ |
142 | { | 142 | { |
143 | text: "Profile Pic", | 143 | text: "Profile Pic", |
144 | value: "profilprofilePicUrlePicUrl", | 144 | value: "profilprofilePicUrlePicUrl", |
145 | sortable: false, | 145 | sortable: false, |
146 | align: "center" | 146 | align: "center" |
147 | }, | 147 | }, |
148 | { text: "Name", value: "name", sortable: false, align: "center" }, | 148 | { text: "Name", value: "name", sortable: false, align: "center" }, |
149 | { | 149 | { |
150 | text: "Mobile No", | 150 | text: "Mobile No", |
151 | value: "fatherCellNo", | 151 | value: "fatherCellNo", |
152 | sortable: false, | 152 | sortable: false, |
153 | align: "center" | 153 | align: "center" |
154 | }, | 154 | }, |
155 | { text: "Email", value: "email", sortable: false, align: "center" } | 155 | { text: "Email", value: "email", sortable: false, align: "center" } |
156 | // { text: "Action", value: "", sortable: false, align: "center" } | 156 | // { text: "Action", value: "", sortable: false, align: "center" } |
157 | ], | 157 | ], |
158 | token: "", | 158 | token: "", |
159 | selectStudents: { | 159 | selectStudents: { |
160 | select: "", | 160 | select: "", |
161 | selectSection: "" | 161 | selectSection: "" |
162 | }, | 162 | }, |
163 | 163 | ||
164 | role: "", | 164 | role: "", |
165 | schoolRole: "", | 165 | schoolRole: "", |
166 | menu: false, | 166 | menu: false, |
167 | valid: true, | 167 | valid: true, |
168 | 168 | ||
169 | getReport: {}, | 169 | getReport: {}, |
170 | studentsData: [], | 170 | studentsData: [], |
171 | courseData: [], | 171 | courseData: [], |
172 | addSection: [], | 172 | addSection: [], |
173 | selected: [], | 173 | selected: [] |
174 | SectionName: ["A", "B", "C", "D", "E", "F"], | ||
175 | classRules: [v => !!v || "Class is required"], | ||
176 | sectionRules: [v => !!v || "Class is required"], | ||
177 | studentRules: [v => !!v || "Student is required"], | ||
178 | dataValid: [v => !!v || "Date is required"] | ||
179 | }), | 174 | }), |
180 | methods: { | 175 | methods: { |
181 | save(date) { | 176 | save(date) { |
182 | this.$refs.menu.save(date); | 177 | this.$refs.menu.save(date); |
183 | }, | 178 | }, |
184 | getAllClass() { | 179 | getAllClass() { |
185 | http() | 180 | http() |
186 | .get("/getClassesList", { | 181 | .get("/getClassesList", { |
187 | headers: { Authorization: "Bearer " + this.token } | 182 | headers: { Authorization: "Bearer " + this.token } |
188 | }) | 183 | }) |
189 | .then(response => { | 184 | .then(response => { |
190 | this.addclass = response.data.data; | 185 | this.addclass = response.data.data; |
191 | }) | 186 | }) |
192 | .catch(error => { | 187 | .catch(error => { |
193 | // console.log("err====>", err); | 188 | // console.log("err====>", err); |
194 | // this.$router.replace({ path: "/" }); | 189 | // this.$router.replace({ path: "/" }); |
195 | }); | 190 | }); |
196 | }, | 191 | }, |
197 | getCourses(classId) { | 192 | getCourses(classId) { |
198 | this.showLoader = true; | 193 | this.showLoader = true; |
199 | http() | 194 | http() |
200 | .get("/getCourseesList", { | 195 | .get("/getCourseesList", { |
201 | params: { | 196 | params: { |
202 | classId: classId | 197 | classId: classId |
203 | } | 198 | } |
204 | }) | 199 | }) |
205 | .then(response => { | 200 | .then(response => { |
206 | this.courseData = response.data.data; | 201 | this.courseData = response.data.data; |
207 | this.showLoader = false; | 202 | this.showLoader = false; |
208 | }) | 203 | }) |
209 | .catch(err => { | 204 | .catch(err => { |
210 | console.log("err====>", err); | 205 | console.log("err====>", err); |
211 | this.showLoader = false; | 206 | this.showLoader = false; |
212 | }); | 207 | }); |
213 | }, | 208 | }, |
214 | getStudents() { | 209 | getStudents() { |
215 | this.showLoader = true; | 210 | this.showLoader = true; |
216 | http() | 211 | http() |
217 | .get("/getStudentsList", { | 212 | .get("/getStudentsList", { |
218 | params: { | 213 | params: { |
219 | classId: this.getReport.classId | 214 | classId: this.getReport.classId |
220 | } | 215 | } |
221 | }) | 216 | }) |
222 | .then(response => { | 217 | .then(response => { |
223 | this.studentsData = response.data.data; | 218 | this.studentsData = response.data.data; |
224 | this.showLoader = false; | 219 | this.showLoader = false; |
225 | // this.addStudentAttendenceDialog = false; | 220 | // this.addStudentAttendenceDialog = false; |
226 | var attendence = ""; | 221 | var attendence = ""; |
227 | for (let i = 0; i < this.studentsData.length; i++) { | 222 | for (let i = 0; i < this.studentsData.length; i++) { |
228 | this.studentsData[i].attendence = true; | 223 | this.studentsData[i].attendence = true; |
229 | } | 224 | } |
225 | this.getParticularCourse(); | ||
230 | }) | 226 | }) |
231 | .catch(error => { | 227 | .catch(error => { |
232 | console.log("err====>", error); | 228 | console.log("err====>", error); |
233 | this.showLoader = false; | 229 | this.showLoader = false; |
234 | }); | 230 | }); |
235 | }, | 231 | }, |
236 | getStudentTable(id) { | 232 | getStudentTable(id) { |
237 | console.log("id", this.getReport.courseId); | 233 | // console.log("id", this.getReport.courseId); |
238 | this.getStudents(); | 234 | this.getStudents(); |
239 | this.getParticularCourse(); | ||
240 | }, | 235 | }, |
241 | update() { | 236 | update() { |
242 | var studentsAttendence = []; | 237 | var studentsAttendence = []; |
243 | for (var j = 0; j < this.studentsData.length; j++) { | 238 | for (var j = 0; j < this.studentsData.length; j++) { |
244 | studentsAttendence.push({ | 239 | studentsAttendence.push({ |
245 | studentId: this.studentsData[j]._id, | 240 | studentId: this.studentsData[j]._id, |
246 | isPresent: this.studentsData[j].attendence | 241 | isPresent: this.studentsData[j].attendence |
247 | }); | 242 | }); |
248 | } | 243 | } |
249 | if (this.$refs.form.validate()) { | 244 | if (this.$refs.form.validate()) { |
250 | let attendanceData = { | 245 | let attendanceData = { |
251 | sectionId: this.getReport.sectionId, | 246 | sectionId: this.getReport.sectionId, |
252 | date: this.date, | 247 | date: this.date, |
253 | students: studentsAttendence | 248 | students: studentsAttendence |
254 | }; | 249 | }; |
255 | http() | 250 | http() |
256 | .put("/updateAttendance", attendanceData) | 251 | .put("/updateAttendance", attendanceData) |
257 | .then(response => { | 252 | .then(response => { |
258 | this.snackbar = true; | 253 | this.snackbar = true; |
259 | this.text = response.data.message; | 254 | this.text = response.data.message; |
260 | this.addStudentAttendenceDialog = false; | 255 | this.addStudentAttendenceDialog = false; |
261 | }) | 256 | }) |
262 | .catch(error => { | 257 | .catch(error => { |
263 | this.snackbar = true; | 258 | this.snackbar = true; |
264 | this.text = error.response.data.message; | 259 | this.text = error.response.data.message; |
265 | }); | 260 | }); |
266 | } | 261 | } |
267 | }, | 262 | }, |
268 | toggleAll() { | 263 | toggleAll() { |
269 | if (this.selected.length) this.selected = []; | 264 | if (this.selected.length) this.selected = []; |
270 | else this.selected = this.studentsData.slice(); | 265 | else this.selected = this.studentsData.slice(); |
271 | console.log("this.selected", this.selected); | ||
272 | console.log("selected====", selected); | ||
273 | let selectedStudentsArray = []; | 266 | let selectedStudentsArray = []; |
274 | selectedStudentsArray.push({ studentId: selected.id }); | 267 | for (let i = 0; i < this.selected.length; i++) { |
268 | selectedStudentsArray.push({ studentId: this.selected[i]._id }); | ||
269 | } | ||
270 | // console.log("selectedStudentsArray", selectedStudentsArray); | ||
275 | var payload = { | 271 | var payload = { |
276 | courseId: this.getReport.courseId, | 272 | courseId: this.getReport.courseId, |
277 | enrollStudents: selectedStudentsArray | 273 | enrollStudents: selectedStudentsArray |
278 | }; | 274 | }; |
279 | http() | 275 | http() |
280 | .put("/enrollStudents", payload) | 276 | .put("/enrollStudents", payload) |
281 | .then(response => { | 277 | .then(response => { |
282 | this.snackbar = true; | 278 | this.snackbar = true; |
283 | this.text = response.data.message; | 279 | this.text = response.data.message; |
280 | this.getParticularCourse() | ||
284 | }) | 281 | }) |
285 | .catch(error => { | 282 | .catch(error => { |
286 | this.snackbar = true; | 283 | this.snackbar = true; |
287 | this.text = error.response.data.message; | 284 | this.text = error.response.data.message; |
288 | }); | 285 | }); |
289 | }, | 286 | }, |
290 | selectParticularStudent(selected) { | 287 | selectParticularStudent(selected) { |
291 | console.log("selected====", selected); | 288 | console.log("selected", selected); |
292 | let selectedStudentsArray = []; | 289 | let selectedStudentsArray = []; |
293 | selectedStudentsArray.push({ studentId: selected }); | 290 | selectedStudentsArray.push({ studentId: selected._id }); |
294 | var payload = { | 291 | if ( |
295 | courseId: this.getReport.courseId, | 292 | selected.enroll === true && |
296 | enrollStudents: selectedStudentsArray | 293 | selected.enroll === undefined && |
297 | }; | 294 | selected.enroll === null |
298 | http() | 295 | ) { |
299 | .put("/enrollStudents", payload) | 296 | var payload = { |
300 | .then(response => { | 297 | courseId: this.getReport.courseId, |
301 | this.snackbar = true; | 298 | enrollStudents: selectedStudentsArray |
302 | this.text = response.data.message; | 299 | }; |
303 | }) | 300 | http() |
304 | .catch(error => { | 301 | .put("/enrollStudents", payload) |
305 | this.snackbar = true; | 302 | .then(response => { |
306 | this.text = error.response.data.message; | 303 | this.snackbar = true; |
307 | }); | 304 | this.text = response.data.message; |
305 | }) | ||
306 | .catch(error => { | ||
307 | this.snackbar = true; | ||
308 | this.text = error.response.data.message; | ||
309 | }); | ||
310 | } | ||
311 | if ( | ||
312 | selected.enroll == false && | ||
313 | selected.enroll != undefined && | ||
314 | selected.enroll != null | ||
315 | ) { | ||
316 | var payloadDeleteStudents = { | ||
317 | courseId: this.getReport.courseId, | ||
318 | enrollStudentsId: selected.enrollId | ||
319 | }; | ||
320 | http() | ||
321 | .put("/deleteStudents", payloadDeleteStudents) | ||
322 | .then(response => { | ||
323 | this.snackbar = true; | ||
324 | this.text = response.data.message; | ||
325 | }) | ||
326 | .catch(error => { | ||
327 | this.snackbar = true; | ||
328 | this.text = error.response.data.message; | ||
329 | }); | ||
330 | } | ||
308 | }, | 331 | }, |
309 | getParticularCourse() { | 332 | getParticularCourse() { |
310 | var payload = { | 333 | var payload = { |
311 | courseId: this.getReport.courseId | 334 | courseId: this.getReport.courseId |
312 | }; | 335 | }; |
313 | http() | 336 | http() |
314 | .get("/getParticularCourse", { | 337 | .get("/getParticularCourse", { |
315 | params: payload | 338 | params: payload |
316 | }) | 339 | }) |
317 | .then(response => { | 340 | .then(response => { |
318 | conso.log("DTAAAAA", response.data.data); | 341 | for (let i = 0; i < response.data.data.enrollStudents.length; i++) { |
342 | var studentId = {}; | ||
343 | studentId = response.data.data.enrollStudents[i]; | ||
344 | for (let j = 0; j < this.studentsData.length; j++) { | ||
345 | if (studentId.studentId == this.studentsData[j]._id) { | ||
346 | console.log("studentId._id", studentId._id); | ||
347 | this.studentsData[j].enroll = true; | ||
348 | this.studentsData[j].enrollId = studentId._id; | ||
349 | } | ||
350 | } | ||
351 | } | ||
319 | this.snackbar = true; | 352 | this.snackbar = true; |
320 | this.text = response.data.message; | 353 | this.text = response.data.message; |
321 | }) | 354 | }) |
322 | .catch(error => { | 355 | .catch(error => { |
323 | this.snackbar = true; | 356 | this.snackbar = true; |
324 | this.text = error.response.data.message; | 357 | this.text = error.response.data.message; |
325 | }); | 358 | }); |
326 | }, | 359 | }, |
327 | changeSort(column) { | 360 | changeSort(column) { |
328 | if (this.pagination.sortBy === column) { | 361 | if (this.pagination.sortBy === column) { |
329 | this.pagination.descending = !this.pagination.descending; | 362 | this.pagination.descending = !this.pagination.descending; |
330 | } else { | 363 | } else { |
331 | this.pagination.sortBy = column; | 364 | this.pagination.sortBy = column; |
332 | this.pagination.descending = false; | 365 | this.pagination.descending = false; |
333 | } | 366 | } |
334 | }, | 367 | }, |
335 | displaySearch() { | 368 | displaySearch() { |
336 | this.show = false; | 369 | this.show = false; |
337 | this.showSearch = true; | 370 | this.showSearch = true; |
338 | }, | 371 | }, |
339 | closeSearch() { | 372 | closeSearch() { |
340 | this.showSearch = false; | 373 | this.showSearch = false; |
341 | this.show = true; | 374 | this.show = true; |
342 | this.search = ""; | 375 | this.search = ""; |
343 | } | 376 | } |
344 | }, | 377 | }, |
src/pages/meetingEvent/meetingEvent.vue
File was created | 1 | <template> | |
2 | <v-container fluid class="body-color"> | ||
3 | <!-- ****** EDITS EVENT ****** --> | ||
4 | <v-dialog v-model="editEventdialog" max-width="500px"> | ||
5 | <v-card flat class="card-style pa-2" dark> | ||
6 | <v-layout> | ||
7 | <v-flex xs12> | ||
8 | <label class="title text-xs-center">Edit Meeting Event</label> | ||
9 | <v-icon size="24" class="right" @click="editEventdialog = false">cancel</v-icon> | ||
10 | </v-flex> | ||
11 | </v-layout> | ||
12 | <v-container fluid> | ||
13 | <v-flex xs12 sm12> | ||
14 | <v-layout> | ||
15 | <v-flex xs4 class="pt-4 subheading"> | ||
16 | <label class="right">Title:</label> | ||
17 | </v-flex> | ||
18 | <v-flex xs7 class="ml-3"> | ||
19 | <v-text-field v-model="editedItem.title" type="text"></v-text-field> | ||
20 | </v-flex> | ||
21 | </v-layout> | ||
22 | </v-flex> | ||
23 | <v-flex xs12 sm12> | ||
24 | <v-layout> | ||
25 | <v-flex xs4 class="pt-4 subheading"> | ||
26 | <label class="right">Date:</label> | ||
27 | </v-flex> | ||
28 | <v-flex xs7 class="ml-3"> | ||
29 | <v-menu | ||
30 | ref="menu" | ||
31 | :close-on-content-click="false" | ||
32 | v-model="menuEditDate" | ||
33 | :nudge-right="40" | ||
34 | lazy | ||
35 | transition="scale-transition" | ||
36 | offset-y | ||
37 | full-width | ||
38 | min-width="290px" | ||
39 | > | ||
40 | <v-text-field | ||
41 | slot="activator" | ||
42 | v-model="editedItem.dateOfEvent" | ||
43 | placeholder="Select date" | ||
44 | ></v-text-field> | ||
45 | <v-date-picker | ||
46 | color="info" | ||
47 | ref="picker" | ||
48 | v-model="editedItem.dateOfEvent" | ||
49 | @input="$refs.menu.save(editedItem.dateOfEvent)" | ||
50 | ></v-date-picker> | ||
51 | </v-menu> | ||
52 | </v-flex> | ||
53 | </v-layout> | ||
54 | </v-flex> | ||
55 | <v-flex xs12 sm12> | ||
56 | <v-layout> | ||
57 | <v-flex xs4 class="pt-4 subheading"> | ||
58 | <label class="right">Start Time:</label> | ||
59 | </v-flex> | ||
60 | <v-flex xs7 class="ml-3"> | ||
61 | <v-menu | ||
62 | ref="menuEdit" | ||
63 | :close-on-content-click="false" | ||
64 | v-model="menuEditTime" | ||
65 | :nudge-right="40" | ||
66 | :return-value.sync="editedItem.startTime" | ||
67 | lazy | ||
68 | transition="scale-transition" | ||
69 | offset-y | ||
70 | full-width | ||
71 | max-width="290px" | ||
72 | min-width="290px" | ||
73 | > | ||
74 | <v-text-field | ||
75 | slot="activator" | ||
76 | v-model="editedItem.startTime" | ||
77 | append-icon="access_time" | ||
78 | readonly | ||
79 | ></v-text-field> | ||
80 | <v-time-picker | ||
81 | v-model="editedItem.startTime" | ||
82 | @change="$refs.menuEdit.save(editedItem.startTime)" | ||
83 | ></v-time-picker> | ||
84 | </v-menu> | ||
85 | </v-flex> | ||
86 | </v-layout> | ||
87 | </v-flex> | ||
88 | <v-flex xs12 sm12> | ||
89 | <v-layout> | ||
90 | <v-flex xs4 class="pt-4 subheading"> | ||
91 | <label class="right">Duration:</label> | ||
92 | </v-flex> | ||
93 | <v-flex xs7 class="ml-3"> | ||
94 | <v-text-field v-model="editedItem.duration" type="text"></v-text-field> | ||
95 | </v-flex> | ||
96 | </v-layout> | ||
97 | </v-flex> | ||
98 | <v-layout> | ||
99 | <v-flex xs12> | ||
100 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | ||
101 | <v-spacer></v-spacer> | ||
102 | <v-btn round dark @click="save" class="add-button">Save</v-btn> | ||
103 | </v-card-actions> | ||
104 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | ||
105 | <v-spacer></v-spacer> | ||
106 | <v-btn round dark @click="save" class="add-button">Save</v-btn> | ||
107 | <v-spacer></v-spacer> | ||
108 | </v-card-actions> | ||
109 | </v-flex> | ||
110 | </v-layout> | ||
111 | </v-container> | ||
112 | </v-card> | ||
113 | </v-dialog> | ||
114 | <!-- ****** PROFILE VIEW EVENT ****** --> | ||
115 | <v-dialog v-model="viewEventdialog" max-width="500px"> | ||
116 | <v-card flat class="card-style pa-3" dark> | ||
117 | <v-layout> | ||
118 | <v-flex xs12> | ||
119 | <label class="title text-xs-center">View Meeting Event</label> | ||
120 | <v-icon size="24" class="right" @click="viewEventdialog = false">cancel</v-icon> | ||
121 | </v-flex> | ||
122 | </v-layout> | ||
123 | <v-card-text> | ||
124 | <v-container grid-list-md> | ||
125 | <v-layout wrap> | ||
126 | <v-flex> | ||
127 | <v-layout> | ||
128 | <v-flex xs4 sm6> | ||
129 | <h5 class="right my-1"> | ||
130 | <b>Title:</b> | ||
131 | </h5> | ||
132 | </v-flex> | ||
133 | <v-flex sm6 xs8> | ||
134 | <h5 class="my-1">{{ editedItem.title }}</h5> | ||
135 | </v-flex> | ||
136 | </v-layout> | ||
137 | <v-layout> | ||
138 | <v-flex xs4 sm6> | ||
139 | <h5 class="right my-1"> | ||
140 | <b>Date:</b> | ||
141 | </h5> | ||
142 | </v-flex> | ||
143 | <v-flex sm6 xs8> | ||
144 | <h5 class="my-1">{{ dates(editedItem.dateOfEvent) }}</h5> | ||
145 | </v-flex> | ||
146 | </v-layout> | ||
147 | <v-layout> | ||
148 | <v-flex xs4 sm6> | ||
149 | <h5 class="right my-1"> | ||
150 | <b>Start Time:</b> | ||
151 | </h5> | ||
152 | </v-flex> | ||
153 | <v-flex sm6 xs8> | ||
154 | <h5 class="my-1">{{ editedItem.startTime }}</h5> | ||
155 | </v-flex> | ||
156 | </v-layout> | ||
157 | <v-layout> | ||
158 | <v-flex xs4 sm6> | ||
159 | <h5 class="right my-1"> | ||
160 | <b>Type Of Event:</b> | ||
161 | </h5> | ||
162 | </v-flex> | ||
163 | <v-flex sm6 xs8> | ||
164 | <h5 class="my-1">{{ editedItem.typeOfEvent }}</h5> | ||
165 | </v-flex> | ||
166 | </v-layout> | ||
167 | <v-layout v-if="editedItem.classId"> | ||
168 | <v-flex xs4 sm6> | ||
169 | <h5 class="right my-1"> | ||
170 | <b>Class:</b> | ||
171 | </h5> | ||
172 | </v-flex> | ||
173 | <v-flex sm6 xs8> | ||
174 | <h5 class="my-1">{{ editedItem.classId.classNum }}</h5> | ||
175 | </v-flex> | ||
176 | </v-layout> | ||
177 | <v-layout> | ||
178 | <v-flex xs4 sm6> | ||
179 | <h5 class="right my-1"> | ||
180 | <b>Duration:</b> | ||
181 | </h5> | ||
182 | </v-flex> | ||
183 | <v-flex sm6 xs8> | ||
184 | <h5 class="my-1">{{ editedItem.duration }}</h5> | ||
185 | </v-flex> | ||
186 | </v-layout> | ||
187 | </v-flex> | ||
188 | </v-layout> | ||
189 | </v-container> | ||
190 | </v-card-text> | ||
191 | </v-card> | ||
192 | </v-dialog> | ||
193 | |||
194 | <!-- ****** EVENT TABLE ****** --> | ||
195 | |||
196 | <v-toolbar color="transparent" flat> | ||
197 | <v-btn | ||
198 | fab | ||
199 | dark | ||
200 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | ||
201 | small | ||
202 | @click="meetEventDialog = true" | ||
203 | > | ||
204 | <v-icon dark>add</v-icon> | ||
205 | </v-btn> | ||
206 | <v-btn | ||
207 | round | ||
208 | class="open-dialog-button hidden-sm-only hidden-xs-only" | ||
209 | dark | ||
210 | @click="meetEventDialog = true" | ||
211 | > | ||
212 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Event | ||
213 | </v-btn> | ||
214 | <v-spacer></v-spacer> | ||
215 | <v-card-title class="body-1" v-show="show"> | ||
216 | <v-btn icon large flat @click="displaySearch"> | ||
217 | <v-avatar size="27"> | ||
218 | <img src="/static/icon/search.png" alt="icon" /> | ||
219 | </v-avatar> | ||
220 | </v-btn> | ||
221 | </v-card-title> | ||
222 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | ||
223 | <v-layout> | ||
224 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | ||
225 | <v-icon @click="closeSearch" color="error">close</v-icon> | ||
226 | </v-layout> | ||
227 | </v-flex> | ||
228 | </v-toolbar> | ||
229 | <v-data-table :headers="headers" :items="events" :pagination.sync="pagination" :search="search"> | ||
230 | <template slot="items" slot-scope="props"> | ||
231 | <tr class="tr"> | ||
232 | <td class="td td-row">{{ props.index + 1}}</td> | ||
233 | <td | ||
234 | class="td td-row text-xs-center" | ||
235 | >{{ props.item.classId ? props.item.classId.classNum : "-" }}</td> | ||
236 | <td class="td td-row text-xs-center">{{ props.item.title }}</td> | ||
237 | <td class="td td-row text-xs-center">{{ dates(props.item.dateOfEvent) }}</td> | ||
238 | <td class="td td-row text-xs-center">{{ props.item.startTime }}</td> | ||
239 | <td class="td td-row text-xs-center"> | ||
240 | <span> | ||
241 | <v-tooltip top> | ||
242 | <img | ||
243 | slot="activator" | ||
244 | style="cursor:pointer; width:25px; height:25px; " | ||
245 | class="mr-3" | ||
246 | @click="profile(props.item)" | ||
247 | src="/static/icon/view.png" | ||
248 | /> | ||
249 | <span>View</span> | ||
250 | </v-tooltip> | ||
251 | <v-tooltip top> | ||
252 | <img | ||
253 | slot="activator" | ||
254 | style="cursor:pointer; width:20px; height:18px; " | ||
255 | class="mr-3" | ||
256 | @click="editItem(props.item)" | ||
257 | src="/static/icon/edit.png" | ||
258 | /> | ||
259 | <span>Edit</span> | ||
260 | </v-tooltip> | ||
261 | <v-tooltip top> | ||
262 | <img | ||
263 | slot="activator" | ||
264 | style="cursor:pointer; width:20px; height:20px; " | ||
265 | class="mr-3" | ||
266 | @click="deleteItem(props.item)" | ||
267 | src="/static/icon/delete.png" | ||
268 | /> | ||
269 | <span>Delete</span> | ||
270 | </v-tooltip> | ||
271 | </span> | ||
272 | </td> | ||
273 | </tr> | ||
274 | </template> | ||
275 | <v-alert | ||
276 | slot="no-results" | ||
277 | :value="true" | ||
278 | color="error" | ||
279 | icon="warning" | ||
280 | >Your search for "{{ search }}" found no results.</v-alert> | ||
281 | </v-data-table> | ||
282 | <!-- ****** ADD MULTIPLE EVENT ****** --> | ||
283 | <v-dialog v-model="meetEventDialog" max-width="500px"> | ||
284 | <v-card flat class="card-style pa-2" dark> | ||
285 | <v-layout> | ||
286 | <v-flex xs12> | ||
287 | <label class="title text-xs-center">Add Meeting Event</label> | ||
288 | <v-icon size="24" class="right" @click="meetEventDialog = false">cancel</v-icon> | ||
289 | </v-flex> | ||
290 | </v-layout> | ||
291 | <v-form ref="form" v-model="valid" lazy-validation> | ||
292 | <v-container fluid> | ||
293 | <v-flex xs12> | ||
294 | <v-layout> | ||
295 | <v-flex xs4 class="pt-4 subheading"> | ||
296 | <label class="right">Title:</label> | ||
297 | </v-flex> | ||
298 | <v-flex xs8 sm8 class="ml-3"> | ||
299 | <v-text-field | ||
300 | v-model="meetEvent.title" | ||
301 | placeholder="fill your Title" | ||
302 | type="text" | ||
303 | :rules="titleRules" | ||
304 | required | ||
305 | ></v-text-field> | ||
306 | </v-flex> | ||
307 | </v-layout> | ||
308 | </v-flex> | ||
309 | <v-flex xs12> | ||
310 | <v-layout> | ||
311 | <v-flex xs4 class="pt-4 subheading"> | ||
312 | <label class="right">Date:</label> | ||
313 | </v-flex> | ||
314 | <v-flex xs8 sm8 class="ml-3"> | ||
315 | <v-menu | ||
316 | ref="menu1" | ||
317 | :close-on-content-click="false" | ||
318 | v-model="menu1" | ||
319 | :nudge-right="40" | ||
320 | :return-value.sync="meetEvent.dateOfEvent" | ||
321 | app | ||
322 | lazy | ||
323 | transition="scale-transition" | ||
324 | offset-y | ||
325 | full-width | ||
326 | min-width="290px" | ||
327 | > | ||
328 | <v-text-field | ||
329 | slot="activator" | ||
330 | :rules="dateRules" | ||
331 | v-model="meetEvent.dateOfEvent" | ||
332 | append-icon="event" | ||
333 | placeholder="Select date" | ||
334 | ></v-text-field> | ||
335 | <v-date-picker | ||
336 | color="info" | ||
337 | v-model="meetEvent.dateOfEvent" | ||
338 | @input="$refs.menu1.save(meetEvent.dateOfEvent)" | ||
339 | ></v-date-picker> | ||
340 | </v-menu> | ||
341 | </v-flex> | ||
342 | </v-layout> | ||
343 | </v-flex> | ||
344 | <v-flex xs12> | ||
345 | <v-layout> | ||
346 | <v-flex xs4 class="pt-4 subheading"> | ||
347 | <label class="right">Start Time:</label> | ||
348 | </v-flex> | ||
349 | <v-flex xs8 sm8 class="ml-3"> | ||
350 | <v-menu | ||
351 | ref="menuA" | ||
352 | :close-on-content-click="false" | ||
353 | v-model="menu2" | ||
354 | :nudge-right="40" | ||
355 | :return-value.sync="meetEvent.startTime" | ||
356 | lazy | ||
357 | transition="scale-transition" | ||
358 | offset-y | ||
359 | full-width | ||
360 | max-width="290px" | ||
361 | min-width="290px" | ||
362 | > | ||
363 | <v-text-field | ||
364 | slot="activator" | ||
365 | v-model="meetEvent.startTime" | ||
366 | placeholder="Select Start time" | ||
367 | append-icon="access_time" | ||
368 | :rules="startTimeRules" | ||
369 | readonly | ||
370 | ></v-text-field> | ||
371 | <v-time-picker | ||
372 | v-model="meetEvent.startTime" | ||
373 | @change="$refs.menuA.save(meetEvent.startTime)" | ||
374 | ></v-time-picker> | ||
375 | </v-menu> | ||
376 | </v-flex> | ||
377 | </v-layout> | ||
378 | </v-flex> | ||
379 | <v-flex xs12> | ||
380 | <v-layout> | ||
381 | <v-flex xs4 class="pt-4 subheading"> | ||
382 | <label class="right">Type Of Event:</label> | ||
383 | </v-flex> | ||
384 | <v-flex xs8 sm8 class="ml-3"> | ||
385 | <v-select | ||
386 | :items="typeOfEvent" | ||
387 | label="Select Type Of Event" | ||
388 | v-model="meetEvent.typeOfEvent" | ||
389 | :rules="typeOfEventRules" | ||
390 | @change="getSelectOption(meetEvent.typeOfEvent)" | ||
391 | ></v-select> | ||
392 | </v-flex> | ||
393 | </v-layout> | ||
394 | </v-flex> | ||
395 | <v-flex xs12 v-show="classShow"> | ||
396 | <v-layout> | ||
397 | <v-flex xs4 class="pt-4 subheading"> | ||
398 | <label class="right">Class:</label> | ||
399 | </v-flex> | ||
400 | <v-flex xs8 sm8 class="ml-3"> | ||
401 | <v-select | ||
402 | :items="addclass" | ||
403 | label="Select Class" | ||
404 | v-model="meetEvent.classId" | ||
405 | item-text="classNum" | ||
406 | item-value="_id" | ||
407 | @change="getCourses(meetEvent.classNum)" | ||
408 | ></v-select> | ||
409 | </v-flex> | ||
410 | </v-layout> | ||
411 | </v-flex> | ||
412 | <v-flex xs12 v-show="courseShow"> | ||
413 | <v-layout> | ||
414 | <v-flex xs4 class="pt-4 subheading"> | ||
415 | <label class="right">Courses:</label> | ||
416 | </v-flex> | ||
417 | <v-flex xs8 sm8 class="ml-3"> | ||
418 | <v-select | ||
419 | :items="courseData" | ||
420 | label="Select Course" | ||
421 | v-model="meetEvent.courseId" | ||
422 | item-text="coursrName" | ||
423 | item-value="_id" | ||
424 | required | ||
425 | ></v-select> | ||
426 | </v-flex> | ||
427 | </v-layout> | ||
428 | </v-flex> | ||
429 | <v-flex xs12> | ||
430 | <v-layout> | ||
431 | <v-flex xs4 class="pt-4 subheading"> | ||
432 | <label class="right">Duration</label> | ||
433 | </v-flex> | ||
434 | <v-flex xs8 sm8 class="ml-3"> | ||
435 | <v-text-field | ||
436 | placeholder="fill your Description" | ||
437 | :rules="descriptionRules" | ||
438 | v-model="meetEvent.duration" | ||
439 | type="text" | ||
440 | required | ||
441 | ></v-text-field> | ||
442 | </v-flex> | ||
443 | </v-layout> | ||
444 | </v-flex> | ||
445 | <v-layout> | ||
446 | <v-flex xs12> | ||
447 | <v-layout class="right"> | ||
448 | <v-btn @click="clear" round class="clear-button" dark>clear</v-btn> | ||
449 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | ||
450 | </v-layout> | ||
451 | </v-flex> | ||
452 | </v-layout> | ||
453 | </v-container> | ||
454 | </v-form> | ||
455 | </v-card> | ||
456 | </v-dialog> | ||
457 | <v-snackbar | ||
458 | :timeout="timeout" | ||
459 | :top="y === 'top'" | ||
460 | :right="x === 'right'" | ||
461 | :vertical="mode === 'vertical'" | ||
462 | v-model="snackbar" | ||
463 | :color="color" | ||
464 | >{{ text }}</v-snackbar> | ||
465 | <div class="loader" v-if="showLoader"> | ||
466 | <v-progress-circular indeterminate color="white"></v-progress-circular> | ||
467 | </div> | ||
468 | </v-container> | ||
469 | </template> | ||
470 | |||
471 | <script> | ||
472 | import http from "@/Services/http.js"; | ||
473 | import moment from "moment"; | ||
474 | |||
475 | export default { | ||
476 | data: () => ({ | ||
477 | snackbar: false, | ||
478 | y: "top", | ||
479 | x: "right", | ||
480 | mode: "", | ||
481 | timeout: 5000, | ||
482 | text: "", | ||
483 | color: "", | ||
484 | loading: false, | ||
485 | date: null, | ||
486 | search: "", | ||
487 | color: "", | ||
488 | show: true, | ||
489 | meetEventDialog: false, | ||
490 | showSearch: false, | ||
491 | showLoader: false, | ||
492 | editEventdialog: false, | ||
493 | viewEventdialog: false, | ||
494 | valid: true, | ||
495 | addclass: [], | ||
496 | courseData: [], | ||
497 | pagination: { | ||
498 | rowsPerPage: 10 | ||
499 | }, | ||
500 | date: null, | ||
501 | menu1: false, | ||
502 | menu: false, | ||
503 | menuEditTime: false, | ||
504 | menuEditDate: false, | ||
505 | titleRules: [v => !!v || " Tilte is required"], | ||
506 | descriptionRules: [v => !!v || " Discription is required"], | ||
507 | dateRules: [v => !!v || "Date of event is required"], | ||
508 | startTimeRules: [v => !!v || "Start Time is required"], | ||
509 | typeOfEventRules: [v => !!v || "Type of event is required"], | ||
510 | headers: [ | ||
511 | { | ||
512 | text: "No", | ||
513 | align: "", | ||
514 | sortable: false, | ||
515 | value: "No" | ||
516 | }, | ||
517 | { | ||
518 | text: "Class", | ||
519 | value: "classNum", | ||
520 | sortable: false, | ||
521 | align: "center" | ||
522 | }, | ||
523 | { text: "Title", value: "title", sortable: false, align: "center" }, | ||
524 | { | ||
525 | text: "Date Of Event", | ||
526 | value: "dateOfEvent", | ||
527 | sortable: false, | ||
528 | align: "center" | ||
529 | }, | ||
530 | { | ||
531 | text: "Start Time", | ||
532 | value: "startTime", | ||
533 | sortable: false, | ||
534 | align: "center" | ||
535 | }, | ||
536 | { text: "Action", value: "", sortable: false, align: "center" } | ||
537 | ], | ||
538 | events: [], | ||
539 | typeOfEvent: ["Class", "Course"], | ||
540 | editedIndex: -1, | ||
541 | meetEvent: { | ||
542 | startTime: null | ||
543 | }, | ||
544 | editedItem: {}, | ||
545 | menu1: false, | ||
546 | menu2: false, | ||
547 | classShow: false, | ||
548 | courseShow: false, | ||
549 | loginId: "" | ||
550 | }), | ||
551 | methods: { | ||
552 | dates: function(date) { | ||
553 | return moment(date).format("MMMM DD, YYYY"); | ||
554 | }, | ||
555 | getEvents() { | ||
556 | this.showLoader = true; | ||
557 | var token = this.$store.state.token; | ||
558 | http() | ||
559 | .get("/getMeetingEventesList", { | ||
560 | params: { teacherId: this.loginId }, | ||
561 | headers: { Authorization: "Bearer " + token } | ||
562 | }) | ||
563 | .then(response => { | ||
564 | this.events = response.data.data; | ||
565 | this.showLoader = false; | ||
566 | }) | ||
567 | .catch(error => { | ||
568 | // console.log("err====>", err); | ||
569 | this.showLoader = false; | ||
570 | if (error.response.status === 401) { | ||
571 | this.$router.replace({ path: "/" }); | ||
572 | this.$store.dispatch("setToken", null); | ||
573 | this.$store.dispatch("Id", null); | ||
574 | } | ||
575 | }); | ||
576 | }, | ||
577 | editItem(item) { | ||
578 | this.editedIndex = this.events.indexOf(item); | ||
579 | this.editedItem = Object.assign({}, item); | ||
580 | this.editedItem.meetingEventId = item._id; | ||
581 | this.editEventdialog = true; | ||
582 | }, | ||
583 | profile(item) { | ||
584 | this.editedIndex = this.events.indexOf(item); | ||
585 | this.editedItem = Object.assign({}, item); | ||
586 | this.viewEventdialog = true; | ||
587 | }, | ||
588 | |||
589 | deleteItem(item) { | ||
590 | let deleteEvent = { | ||
591 | meetingEventId: item._id | ||
592 | }; | ||
593 | http() | ||
594 | .delete( | ||
595 | "/deleteMeetingEvent", | ||
596 | confirm("Are you sure you want to delete this?") && { | ||
597 | params: deleteEvent | ||
598 | } | ||
599 | ) | ||
600 | .then(response => { | ||
601 | this.snackbar = true; | ||
602 | this.text = response.data.message; | ||
603 | this.getEvents(); | ||
604 | this.snackbar = true; | ||
605 | this.color = "green"; | ||
606 | this.text = response.data.message; | ||
607 | }) | ||
608 | .catch(error => { | ||
609 | this.snackbar = true; | ||
610 | this.text = error.response.data.message; | ||
611 | this.color = "error"; | ||
612 | this.loading = false; | ||
613 | }); | ||
614 | }, | ||
615 | getSelectOption(type) { | ||
616 | if (type == "Class") { | ||
617 | this.classShow = true; | ||
618 | this.courseShow = false; | ||
619 | } else if (type == "Course") { | ||
620 | this.courseShow = true; | ||
621 | } | ||
622 | }, | ||
623 | getAllClass() { | ||
624 | http() | ||
625 | .get("/getClassesList") | ||
626 | .then(response => { | ||
627 | this.addclass = response.data.data; | ||
628 | }) | ||
629 | .catch(error => { | ||
630 | // console.log("err====>", err); | ||
631 | // this.$router.replace({ path: "/" }); | ||
632 | }); | ||
633 | }, | ||
634 | getCourses(classId) { | ||
635 | this.showLoader = true; | ||
636 | http() | ||
637 | .get("/getCourseesList", { | ||
638 | params: { | ||
639 | classId: classId | ||
640 | } | ||
641 | }) | ||
642 | .then(response => { | ||
643 | this.courseData = response.data.data; | ||
644 | this.showLoader = false; | ||
645 | }) | ||
646 | .catch(err => { | ||
647 | console.log("err====>", err); | ||
648 | this.showLoader = false; | ||
649 | }); | ||
650 | }, | ||
651 | close() { | ||
652 | this.editEventdialog = false; | ||
653 | }, | ||
654 | submit() { | ||
655 | if (this.$refs.form.validate()) { | ||
656 | this.loading = true; | ||
657 | http() | ||
658 | .post("/createMeetingEvent", this.meetEvent) | ||
659 | .then(response => { | ||
660 | this.snackbar = true; | ||
661 | this.text = response.data.message; | ||
662 | this.color = "green"; | ||
663 | this.getEvents(); | ||
664 | this.clear(); | ||
665 | this.loading = false; | ||
666 | this.meetEventDialog = false; | ||
667 | }) | ||
668 | .catch(error => { | ||
669 | this.snackbar = true; | ||
670 | this.text = error.response.data.message; | ||
671 | this.color = "error"; | ||
672 | this.loading = false; | ||
673 | }); | ||
674 | } | ||
675 | }, | ||
676 | clear() { | ||
677 | this.$refs.form.reset(); | ||
678 | }, | ||
679 | save() { | ||
680 | delete this.editedItem.classId; | ||
681 | http() | ||
682 | .put("/updateMeetingEvent", this.editedItem) | ||
683 | .then(response => { | ||
684 | this.snackbar = true; | ||
685 | this.text = response.data.message; | ||
686 | this.color = "green"; | ||
687 | this.getEvents(); | ||
688 | this.close(); | ||
689 | }) | ||
690 | .catch(error => { | ||
691 | this.snackbar = true; | ||
692 | this.text = error.response.data.message; | ||
693 | this.color = "error"; | ||
694 | }); | ||
695 | }, | ||
696 | displaySearch() { | ||
697 | (this.show = false), (this.showSearch = true); | ||
698 | }, | ||
699 | closeSearch() { | ||
700 | this.showSearch = false; | ||
701 | this.show = true; | ||
702 | this.search = ""; | ||
703 | } | ||
704 | }, | ||
705 | mounted() { | ||
706 | this.loginId = this.$store.state.id; | ||
707 | this.getEvents(); | ||
708 | this.getAllClass(); | ||
709 | } | ||
710 | }; | ||
711 | </script> |
src/router/paths.js
1 | export default [{ | 1 | export default [{ |
2 | path: '*', | 2 | path: '*', |
3 | meta: { | 3 | meta: { |
4 | public: true, | 4 | public: true, |
5 | }, | 5 | }, |
6 | redirect: { | 6 | redirect: { |
7 | path: '/404' | 7 | path: '/404' |
8 | } | 8 | } |
9 | }, | 9 | }, |
10 | { | 10 | { |
11 | path: '/404', | 11 | path: '/404', |
12 | meta: { | 12 | meta: { |
13 | public: true, | 13 | public: true, |
14 | }, | 14 | }, |
15 | name: 'NotFound', | 15 | name: 'NotFound', |
16 | component: () => | 16 | component: () => |
17 | import ( | 17 | import ( |
18 | /* webpackChunkName: "routes" */ | 18 | /* webpackChunkName: "routes" */ |
19 | /* webpackMode: "lazy-once" */ | 19 | /* webpackMode: "lazy-once" */ |
20 | `@/pages/NotFound/NotFound.vue` | 20 | `@/pages/NotFound/NotFound.vue` |
21 | ) | 21 | ) |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | path: '*', | 24 | path: '*', |
25 | meta: {}, | 25 | meta: {}, |
26 | name: 'dashboardAdmin', | 26 | name: 'dashboardAdmin', |
27 | props: (route) => ({ type: route.query.type }), | 27 | props: (route) => ({ type: route.query.type }), |
28 | component: () => | 28 | component: () => |
29 | import ( | 29 | import ( |
30 | /* webpackChunkName: "routes" */ | 30 | /* webpackChunkName: "routes" */ |
31 | /* webpackMode: "lazy-once" */ | 31 | /* webpackMode: "lazy-once" */ |
32 | `@/pages/Dashboard/dashboard.vue` | 32 | `@/pages/Dashboard/dashboard.vue` |
33 | ) | 33 | ) |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | path: '/500', | 36 | path: '/500', |
37 | meta: { | 37 | meta: { |
38 | public: true, | 38 | public: true, |
39 | }, | 39 | }, |
40 | name: 'ServerError', | 40 | name: 'ServerError', |
41 | component: () => | 41 | component: () => |
42 | import ( | 42 | import ( |
43 | /* webpackChunkName: "routes" */ | 43 | /* webpackChunkName: "routes" */ |
44 | /* webpackMode: "lazy-once" */ | 44 | /* webpackMode: "lazy-once" */ |
45 | `@/pages/NotFound/Error.vue` | 45 | `@/pages/NotFound/Error.vue` |
46 | ) | 46 | ) |
47 | }, | 47 | }, |
48 | { | 48 | { |
49 | path: '/changepassword', | 49 | path: '/changepassword', |
50 | meta: {}, | 50 | meta: {}, |
51 | name: 'changepassword', | 51 | name: 'changepassword', |
52 | props: (route) => ({ type: route.query.type }), | 52 | props: (route) => ({ type: route.query.type }), |
53 | component: () => | 53 | component: () => |
54 | import ( | 54 | import ( |
55 | /* webpackChunkName: "routes" */ | 55 | /* webpackChunkName: "routes" */ |
56 | /* webpackMode: "lazy-once" */ | 56 | /* webpackMode: "lazy-once" */ |
57 | `@/pages/Authentication/changepassword.vue` | 57 | `@/pages/Authentication/changepassword.vue` |
58 | ) | 58 | ) |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | path: '/teachers', | 61 | path: '/teachers', |
62 | meta: { breadcrumb: false }, | 62 | meta: { breadcrumb: false }, |
63 | name: 'Teachers', | 63 | name: 'Teachers', |
64 | component: () => | 64 | component: () => |
65 | import ( | 65 | import ( |
66 | /* webpackChunkName: "routes" */ | 66 | /* webpackChunkName: "routes" */ |
67 | /* webpackMode: "lazy-once" */ | 67 | /* webpackMode: "lazy-once" */ |
68 | `@/pages/Teachers/teachers.vue` | 68 | `@/pages/Teachers/teachers.vue` |
69 | ) | 69 | ) |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | path: '/', | 72 | path: '/', |
73 | meta: { | 73 | meta: { |
74 | public: true, | 74 | public: true, |
75 | }, | 75 | }, |
76 | name: 'Login', | 76 | name: 'Login', |
77 | component: () => | 77 | component: () => |
78 | import ( | 78 | import ( |
79 | /* webpackChunkName: "routes" */ | 79 | /* webpackChunkName: "routes" */ |
80 | /* webpackMode: "lazy-once" */ | 80 | /* webpackMode: "lazy-once" */ |
81 | `@/pages/Authentication/Login.vue` | 81 | `@/pages/Authentication/Login.vue` |
82 | ) | 82 | ) |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | path: '/forgetpassword', | 85 | path: '/forgetpassword', |
86 | meta: { | 86 | meta: { |
87 | public: true, | 87 | public: true, |
88 | }, | 88 | }, |
89 | name: 'forgetpassword', | 89 | name: 'forgetpassword', |
90 | component: () => | 90 | component: () => |
91 | import ( | 91 | import ( |
92 | /* webpackChunkName: "routes" */ | 92 | /* webpackChunkName: "routes" */ |
93 | /* webpackMode: "lazy-once" */ | 93 | /* webpackMode: "lazy-once" */ |
94 | `@/pages/Authentication/forgetpassword.vue` | 94 | `@/pages/Authentication/forgetpassword.vue` |
95 | ) | 95 | ) |
96 | }, | 96 | }, |
97 | { | 97 | { |
98 | path: '/students', | 98 | path: '/students', |
99 | meta: {}, | 99 | meta: {}, |
100 | name: 'Students', | 100 | name: 'Students', |
101 | props: (route) => ({ type: route.query.type }), | 101 | props: (route) => ({ type: route.query.type }), |
102 | component: () => | 102 | component: () => |
103 | import ( | 103 | import ( |
104 | /* webpackChunkName: "routes" */ | 104 | /* webpackChunkName: "routes" */ |
105 | /* webpackMode: "lazy-once" */ | 105 | /* webpackMode: "lazy-once" */ |
106 | `@/pages/Students/students.vue` | 106 | `@/pages/Students/students.vue` |
107 | ) | 107 | ) |
108 | }, | 108 | }, |
109 | { | 109 | { |
110 | path: '/class', | 110 | path: '/class', |
111 | meta: {}, | 111 | meta: {}, |
112 | name: 'Class', | 112 | name: 'Class', |
113 | props: (route) => ({ type: route.query.type }), | 113 | props: (route) => ({ type: route.query.type }), |
114 | component: () => | 114 | component: () => |
115 | import ( | 115 | import ( |
116 | /* webpackChunkName: "routes" */ | 116 | /* webpackChunkName: "routes" */ |
117 | /* webpackMode: "lazy-once" */ | 117 | /* webpackMode: "lazy-once" */ |
118 | `@/pages/Class/addclass.vue` | 118 | `@/pages/Class/addclass.vue` |
119 | ) | 119 | ) |
120 | }, | 120 | }, |
121 | { | 121 | { |
122 | path: '/section', | 122 | path: '/section', |
123 | meta: {}, | 123 | meta: {}, |
124 | name: 'Section', | 124 | name: 'Section', |
125 | props: (route) => ({ type: route.query.type }), | 125 | props: (route) => ({ type: route.query.type }), |
126 | component: () => | 126 | component: () => |
127 | import ( | 127 | import ( |
128 | /* webpackChunkName: "routes" */ | 128 | /* webpackChunkName: "routes" */ |
129 | /* webpackMode: "lazy-once" */ | 129 | /* webpackMode: "lazy-once" */ |
130 | `@/pages/Section/section.vue` | 130 | `@/pages/Section/section.vue` |
131 | ) | 131 | ) |
132 | }, | 132 | }, |
133 | { | 133 | { |
134 | path: '/noticeBoard', | 134 | path: '/noticeBoard', |
135 | meta: {}, | 135 | meta: {}, |
136 | name: 'Notice Board', | 136 | name: 'Notice Board', |
137 | props: (route) => ({ type: route.query.type }), | 137 | props: (route) => ({ type: route.query.type }), |
138 | component: () => | 138 | component: () => |
139 | import ( | 139 | import ( |
140 | /* webpackChunkName: "routes" */ | 140 | /* webpackChunkName: "routes" */ |
141 | /* webpackMode: "lazy-once" */ | 141 | /* webpackMode: "lazy-once" */ |
142 | `@/pages/NoticeBoard/noticeBoard.vue` | 142 | `@/pages/NoticeBoard/noticeBoard.vue` |
143 | ) | 143 | ) |
144 | }, | 144 | }, |
145 | { | 145 | { |
146 | path: '/news', | 146 | path: '/news', |
147 | meta: {}, | 147 | meta: {}, |
148 | name: 'News', | 148 | name: 'News', |
149 | props: (route) => ({ type: route.query.type }), | 149 | props: (route) => ({ type: route.query.type }), |
150 | component: () => | 150 | component: () => |
151 | import ( | 151 | import ( |
152 | /* webpackChunkName: "routes" */ | 152 | /* webpackChunkName: "routes" */ |
153 | /* webpackMode: "lazy-once" */ | 153 | /* webpackMode: "lazy-once" */ |
154 | `@/pages/News/news.vue` | 154 | `@/pages/News/news.vue` |
155 | ) | 155 | ) |
156 | }, | 156 | }, |
157 | // { | 157 | // { |
158 | // path: '/reminder', | 158 | // path: '/reminder', |
159 | // meta: { }, | 159 | // meta: { }, |
160 | // name: 'reminder', | 160 | // name: 'reminder', |
161 | // props: (route) => ({ type: route.query.type }), | 161 | // props: (route) => ({ type: route.query.type }), |
162 | // component: () => import( | 162 | // component: () => import( |
163 | // /* webpackChunkName: "routes" */ | 163 | // /* webpackChunkName: "routes" */ |
164 | // /* webpackMode: "lazy-once" */ | 164 | // /* webpackMode: "lazy-once" */ |
165 | // `@/pages/Reminder/reminder.vue` | 165 | // `@/pages/Reminder/reminder.vue` |
166 | // ) | 166 | // ) |
167 | // }, | 167 | // }, |
168 | { | 168 | { |
169 | path: '/timeTable', | 169 | path: '/timeTable', |
170 | meta: {}, | 170 | meta: {}, |
171 | name: 'Time Table', | 171 | name: 'Time Table', |
172 | props: (route) => ({ type: route.query.type }), | 172 | props: (route) => ({ type: route.query.type }), |
173 | component: () => | 173 | component: () => |
174 | import ( | 174 | import ( |
175 | /* webpackChunkName: "routes" */ | 175 | /* webpackChunkName: "routes" */ |
176 | /* webpackMode: "lazy-once" */ | 176 | /* webpackMode: "lazy-once" */ |
177 | `@/pages/TimeTable/timeTable.vue` | 177 | `@/pages/TimeTable/timeTable.vue` |
178 | ) | 178 | ) |
179 | }, | 179 | }, |
180 | { | 180 | { |
181 | path: '/notification', | 181 | path: '/notification', |
182 | meta: {}, | 182 | meta: {}, |
183 | name: 'Notification', | 183 | name: 'Notification', |
184 | props: (route) => ({ type: route.query.type }), | 184 | props: (route) => ({ type: route.query.type }), |
185 | component: () => | 185 | component: () => |
186 | import ( | 186 | import ( |
187 | /* webpackChunkName: "routes" */ | 187 | /* webpackChunkName: "routes" */ |
188 | /* webpackMode: "lazy-once" */ | 188 | /* webpackMode: "lazy-once" */ |
189 | `@/pages/Notification/notification.vue` | 189 | `@/pages/Notification/notification.vue` |
190 | ) | 190 | ) |
191 | }, | 191 | }, |
192 | { | 192 | { |
193 | path: '/parents', | 193 | path: '/parents', |
194 | meta: {}, | 194 | meta: {}, |
195 | name: 'Parents', | 195 | name: 'Parents', |
196 | props: (route) => ({ type: route.query.type }), | 196 | props: (route) => ({ type: route.query.type }), |
197 | component: () => | 197 | component: () => |
198 | import ( | 198 | import ( |
199 | /* webpackChunkName: "routes" */ | 199 | /* webpackChunkName: "routes" */ |
200 | /* webpackMode: "lazy-once" */ | 200 | /* webpackMode: "lazy-once" */ |
201 | `@/pages/Parent/parents.vue` | 201 | `@/pages/Parent/parents.vue` |
202 | ) | 202 | ) |
203 | }, | 203 | }, |
204 | // { | 204 | // { |
205 | // path: '/subject', | 205 | // path: '/subject', |
206 | // meta: {}, | 206 | // meta: {}, |
207 | // name: 'Subject', | 207 | // name: 'Subject', |
208 | // props: (route) => ({ type: route.query.type }), | 208 | // props: (route) => ({ type: route.query.type }), |
209 | // component: () => | 209 | // component: () => |
210 | // import ( | 210 | // import ( |
211 | // /* webpackChunkName: "routes" */ | 211 | // /* webpackChunkName: "routes" */ |
212 | // /* webpackMode: "lazy-once" */ | 212 | // /* webpackMode: "lazy-once" */ |
213 | // `@/pages/Subjects/subjects.vue` | 213 | // `@/pages/Subjects/subjects.vue` |
214 | // ) | 214 | // ) |
215 | // }, | 215 | // }, |
216 | { | 216 | { |
217 | path: '/dashboard', | 217 | path: '/dashboard', |
218 | meta: {}, | 218 | meta: {}, |
219 | name: 'Dashboard', | 219 | name: 'Dashboard', |
220 | props: (route) => ({ type: route.query.type }), | 220 | props: (route) => ({ type: route.query.type }), |
221 | component: () => | 221 | component: () => |
222 | import ( | 222 | import ( |
223 | /* webpackChunkName: "routes" */ | 223 | /* webpackChunkName: "routes" */ |
224 | /* webpackMode: "lazy-once" */ | 224 | /* webpackMode: "lazy-once" */ |
225 | `@/pages/Dashboard/dashboard.vue` | 225 | `@/pages/Dashboard/dashboard.vue` |
226 | ) | 226 | ) |
227 | }, | 227 | }, |
228 | { | 228 | { |
229 | path: '/socialMedia', | 229 | path: '/socialMedia', |
230 | meta: {}, | 230 | meta: {}, |
231 | name: 'Social Media', | 231 | name: 'Social Media', |
232 | props: (route) => ({ type: route.query.type }), | 232 | props: (route) => ({ type: route.query.type }), |
233 | component: () => | 233 | component: () => |
234 | import ( | 234 | import ( |
235 | /* webpackChunkName: "routes" */ | 235 | /* webpackChunkName: "routes" */ |
236 | /* webpackMode: "lazy-once" */ | 236 | /* webpackMode: "lazy-once" */ |
237 | `@/pages/socialMedia/socialMedia.vue` | 237 | `@/pages/socialMedia/socialMedia.vue` |
238 | ) | 238 | ) |
239 | }, | 239 | }, |
240 | { | 240 | { |
241 | path: '/gallery', | 241 | path: '/gallery', |
242 | meta: {}, | 242 | meta: {}, |
243 | name: 'Gallery', | 243 | name: 'Gallery', |
244 | props: (route) => ({ type: route.query.type }), | 244 | props: (route) => ({ type: route.query.type }), |
245 | component: () => | 245 | component: () => |
246 | import ( | 246 | import ( |
247 | /* webpackChunkName: "routes" */ | 247 | /* webpackChunkName: "routes" */ |
248 | /* webpackMode: "lazy-once" */ | 248 | /* webpackMode: "lazy-once" */ |
249 | `@/pages/Gallery/gallery.vue` | 249 | `@/pages/Gallery/gallery.vue` |
250 | ) | 250 | ) |
251 | }, | 251 | }, |
252 | { | 252 | { |
253 | path: '/event', | 253 | path: '/event', |
254 | meta: {}, | 254 | meta: {}, |
255 | name: 'Event', | 255 | name: 'Event', |
256 | props: (route) => ({ type: route.query.type }), | 256 | props: (route) => ({ type: route.query.type }), |
257 | component: () => | 257 | component: () => |
258 | import ( | 258 | import ( |
259 | /* webpackChunkName: "routes" */ | 259 | /* webpackChunkName: "routes" */ |
260 | /* webpackMode: "lazy-once" */ | 260 | /* webpackMode: "lazy-once" */ |
261 | `@/pages/Event/event.vue` | 261 | `@/pages/Event/event.vue` |
262 | ) | 262 | ) |
263 | }, | 263 | }, |
264 | { | 264 | { |
265 | path: '/holiday', | 265 | path: '/holiday', |
266 | meta: {}, | 266 | meta: {}, |
267 | name: 'Holiday', | 267 | name: 'Holiday', |
268 | props: (route) => ({ type: route.query.type }), | 268 | props: (route) => ({ type: route.query.type }), |
269 | component: () => | 269 | component: () => |
270 | import ( | 270 | import ( |
271 | /* webpackChunkName: "routes" */ | 271 | /* webpackChunkName: "routes" */ |
272 | /* webpackMode: "lazy-once" */ | 272 | /* webpackMode: "lazy-once" */ |
273 | `@/pages/Holiday/holiday.vue` | 273 | `@/pages/Holiday/holiday.vue` |
274 | ) | 274 | ) |
275 | }, | 275 | }, |
276 | { | 276 | { |
277 | path: '/user', | 277 | path: '/user', |
278 | meta: {}, | 278 | meta: {}, |
279 | name: 'User', | 279 | name: 'User', |
280 | props: (route) => ({ type: route.query.type }), | 280 | props: (route) => ({ type: route.query.type }), |
281 | component: () => | 281 | component: () => |
282 | import ( | 282 | import ( |
283 | /* webpackChunkName: "routes" */ | 283 | /* webpackChunkName: "routes" */ |
284 | /* webpackMode: "lazy-once" */ | 284 | /* webpackMode: "lazy-once" */ |
285 | `@/pages/User/user.vue` | 285 | `@/pages/User/user.vue` |
286 | ) | 286 | ) |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | path: '/AttendenceStudent', | 289 | path: '/AttendenceStudent', |
290 | meta: {}, | 290 | meta: {}, |
291 | name: 'Student Attendence', | 291 | name: 'Student Attendence', |
292 | props: (route) => ({ type: route.query.type }), | 292 | props: (route) => ({ type: route.query.type }), |
293 | component: () => | 293 | component: () => |
294 | import ( | 294 | import ( |
295 | /* webpackChunkName: "routes" */ | 295 | /* webpackChunkName: "routes" */ |
296 | /* webpackMode: "lazy-once" */ | 296 | /* webpackMode: "lazy-once" */ |
297 | `@/pages/Attendence/studentAttendence.vue` | 297 | `@/pages/Attendence/studentAttendence.vue` |
298 | ) | 298 | ) |
299 | }, | 299 | }, |
300 | { | 300 | { |
301 | path: '/AttendenceTeacher', | 301 | path: '/AttendenceTeacher', |
302 | meta: {}, | 302 | meta: {}, |
303 | name: 'Teacher Attendence', | 303 | name: 'Teacher Attendence', |
304 | props: (route) => ({ type: route.query.type }), | 304 | props: (route) => ({ type: route.query.type }), |
305 | component: () => | 305 | component: () => |
306 | import ( | 306 | import ( |
307 | /* webpackChunkName: "routes" */ | 307 | /* webpackChunkName: "routes" */ |
308 | /* webpackMode: "lazy-once" */ | 308 | /* webpackMode: "lazy-once" */ |
309 | `@/pages/Attendence/teacherAttendence.vue` | 309 | `@/pages/Attendence/teacherAttendence.vue` |
310 | ) | 310 | ) |
311 | }, | 311 | }, |
312 | { | 312 | { |
313 | path: '/salaryTemplate', | 313 | path: '/salaryTemplate', |
314 | meta: {}, | 314 | meta: {}, |
315 | name: 'Salary Template', | 315 | name: 'Salary Template', |
316 | props: (route) => ({ type: route.query.type }), | 316 | props: (route) => ({ type: route.query.type }), |
317 | component: () => | 317 | component: () => |
318 | import ( | 318 | import ( |
319 | `@/pages/Payroll/salaryTemplate.vue` | 319 | `@/pages/Payroll/salaryTemplate.vue` |
320 | ) | 320 | ) |
321 | }, | 321 | }, |
322 | { | 322 | { |
323 | path: '/hourlyTemplate', | 323 | path: '/hourlyTemplate', |
324 | meta: {}, | 324 | meta: {}, |
325 | name: 'Hourly Template', | 325 | name: 'Hourly Template', |
326 | props: (route) => ({ type: route.query.type }), | 326 | props: (route) => ({ type: route.query.type }), |
327 | component: () => | 327 | component: () => |
328 | import ( | 328 | import ( |
329 | `@/pages/Payroll/hourlyTemplate.vue` | 329 | `@/pages/Payroll/hourlyTemplate.vue` |
330 | ) | 330 | ) |
331 | }, | 331 | }, |
332 | { | 332 | { |
333 | path: '/manageSalary', | 333 | path: '/manageSalary', |
334 | meta: {}, | 334 | meta: {}, |
335 | name: 'Manage Salary', | 335 | name: 'Manage Salary', |
336 | props: (route) => ({ type: route.query.type }), | 336 | props: (route) => ({ type: route.query.type }), |
337 | component: () => | 337 | component: () => |
338 | import ( | 338 | import ( |
339 | `@/pages/Payroll/manageSalary.vue` | 339 | `@/pages/Payroll/manageSalary.vue` |
340 | ) | 340 | ) |
341 | }, | 341 | }, |
342 | // { | 342 | // { |
343 | // path: '/makePayment', | 343 | // path: '/makePayment', |
344 | // meta: {}, | 344 | // meta: {}, |
345 | // name: 'Make Payment', | 345 | // name: 'Make Payment', |
346 | // props: (route) => ({ type: route.query.type }), | 346 | // props: (route) => ({ type: route.query.type }), |
347 | // component: () => | 347 | // component: () => |
348 | // import ( | 348 | // import ( |
349 | // `@/pages/Payroll/makePayment.vue` | 349 | // `@/pages/Payroll/makePayment.vue` |
350 | // ) | 350 | // ) |
351 | // }, | 351 | // }, |
352 | { | 352 | { |
353 | path: '/AttendenceUser', | 353 | path: '/AttendenceUser', |
354 | meta: {}, | 354 | meta: {}, |
355 | name: 'User Attendence', | 355 | name: 'User Attendence', |
356 | props: (route) => ({ type: route.query.type }), | 356 | props: (route) => ({ type: route.query.type }), |
357 | component: () => | 357 | component: () => |
358 | import ( | 358 | import ( |
359 | /* webpackChunkName: "routes" */ | 359 | /* webpackChunkName: "routes" */ |
360 | /* webpackMode: "lazy-once" */ | 360 | /* webpackMode: "lazy-once" */ |
361 | `@/pages/Attendence/userAttendence.vue` | 361 | `@/pages/Attendence/userAttendence.vue` |
362 | ) | 362 | ) |
363 | }, | 363 | }, |
364 | { | 364 | { |
365 | path: '/feeTypes', | 365 | path: '/feeTypes', |
366 | meta: {}, | 366 | meta: {}, |
367 | name: 'Fee Types', | 367 | name: 'Fee Types', |
368 | props: (route) => ({ type: route.query.type }), | 368 | props: (route) => ({ type: route.query.type }), |
369 | component: () => | 369 | component: () => |
370 | import ( | 370 | import ( |
371 | /* webpackChunkName: "routes" */ | 371 | /* webpackChunkName: "routes" */ |
372 | /* webpackMode: "lazy-once" */ | 372 | /* webpackMode: "lazy-once" */ |
373 | `@/pages/Account/feeTypes.vue` | 373 | `@/pages/Account/feeTypes.vue` |
374 | ) | 374 | ) |
375 | }, | 375 | }, |
376 | { | 376 | { |
377 | path: '/invoice', | 377 | path: '/invoice', |
378 | meta: {}, | 378 | meta: {}, |
379 | name: 'Invoice', | 379 | name: 'Invoice', |
380 | props: (route) => ({ type: route.query.type }), | 380 | props: (route) => ({ type: route.query.type }), |
381 | component: () => | 381 | component: () => |
382 | import ( | 382 | import ( |
383 | /* webpackChunkName: "routes" */ | 383 | /* webpackChunkName: "routes" */ |
384 | /* webpackMode: "lazy-once" */ | 384 | /* webpackMode: "lazy-once" */ |
385 | `@/pages/Account/invoice.vue` | 385 | `@/pages/Account/invoice.vue` |
386 | ) | 386 | ) |
387 | }, | 387 | }, |
388 | { | 388 | { |
389 | path: '/paymentHistory', | 389 | path: '/paymentHistory', |
390 | meta: {}, | 390 | meta: {}, |
391 | name: 'Payment History', | 391 | name: 'Payment History', |
392 | props: (route) => ({ type: route.query.type }), | 392 | props: (route) => ({ type: route.query.type }), |
393 | component: () => | 393 | component: () => |
394 | import ( | 394 | import ( |
395 | /* webpackChunkName: "routes" */ | 395 | /* webpackChunkName: "routes" */ |
396 | /* webpackMode: "lazy-once" */ | 396 | /* webpackMode: "lazy-once" */ |
397 | `@/pages/Account/paymentHistory.vue` | 397 | `@/pages/Account/paymentHistory.vue` |
398 | ) | 398 | ) |
399 | }, | 399 | }, |
400 | { | 400 | { |
401 | path: '/expense', | 401 | path: '/expense', |
402 | meta: {}, | 402 | meta: {}, |
403 | name: 'Expense', | 403 | name: 'Expense', |
404 | props: (route) => ({ type: route.query.type }), | 404 | props: (route) => ({ type: route.query.type }), |
405 | component: () => | 405 | component: () => |
406 | import ( | 406 | import ( |
407 | /* webpackChunkName: "routes" */ | 407 | /* webpackChunkName: "routes" */ |
408 | /* webpackMode: "lazy-once" */ | 408 | /* webpackMode: "lazy-once" */ |
409 | `@/pages/Account/expense.vue` | 409 | `@/pages/Account/expense.vue` |
410 | ) | 410 | ) |
411 | }, | 411 | }, |
412 | { | 412 | { |
413 | path: '/income', | 413 | path: '/income', |
414 | meta: {}, | 414 | meta: {}, |
415 | name: 'Income', | 415 | name: 'Income', |
416 | props: (route) => ({ type: route.query.type }), | 416 | props: (route) => ({ type: route.query.type }), |
417 | component: () => | 417 | component: () => |
418 | import ( | 418 | import ( |
419 | /* webpackChunkName: "routes" */ | 419 | /* webpackChunkName: "routes" */ |
420 | /* webpackMode: "lazy-once" */ | 420 | /* webpackMode: "lazy-once" */ |
421 | `@/pages/Account/income.vue` | 421 | `@/pages/Account/income.vue` |
422 | ) | 422 | ) |
423 | }, | 423 | }, |
424 | { | 424 | { |
425 | path: '/libraryMember', | 425 | path: '/libraryMember', |
426 | meta: {}, | 426 | meta: {}, |
427 | name: 'Library Member', | 427 | name: 'Library Member', |
428 | props: (route) => ({ type: route.query.type }), | 428 | props: (route) => ({ type: route.query.type }), |
429 | component: () => | 429 | component: () => |
430 | import ( | 430 | import ( |
431 | /* webpackChunkName: "routes" */ | 431 | /* webpackChunkName: "routes" */ |
432 | /* webpackMode: "lazy-once" */ | 432 | /* webpackMode: "lazy-once" */ |
433 | `@/pages/Library/member.vue` | 433 | `@/pages/Library/member.vue` |
434 | ) | 434 | ) |
435 | }, | 435 | }, |
436 | { | 436 | { |
437 | path: '/books', | 437 | path: '/books', |
438 | meta: {}, | 438 | meta: {}, |
439 | name: 'Books', | 439 | name: 'Books', |
440 | props: (route) => ({ type: route.query.type }), | 440 | props: (route) => ({ type: route.query.type }), |
441 | component: () => | 441 | component: () => |
442 | import ( | 442 | import ( |
443 | /* webpackChunkName: "routes" */ | 443 | /* webpackChunkName: "routes" */ |
444 | /* webpackMode: "lazy-once" */ | 444 | /* webpackMode: "lazy-once" */ |
445 | `@/pages/Library/books.vue` | 445 | `@/pages/Library/books.vue` |
446 | ) | 446 | ) |
447 | }, | 447 | }, |
448 | { | 448 | { |
449 | path: '/issue', | 449 | path: '/issue', |
450 | meta: {}, | 450 | meta: {}, |
451 | name: 'Issue', | 451 | name: 'Issue', |
452 | props: (route) => ({ type: route.query.type }), | 452 | props: (route) => ({ type: route.query.type }), |
453 | component: () => | 453 | component: () => |
454 | import ( | 454 | import ( |
455 | /* webpackChunkName: "routes" */ | 455 | /* webpackChunkName: "routes" */ |
456 | /* webpackMode: "lazy-once" */ | 456 | /* webpackMode: "lazy-once" */ |
457 | `@/pages/Library/issue.vue` | 457 | `@/pages/Library/issue.vue` |
458 | ) | 458 | ) |
459 | }, | 459 | }, |
460 | { | 460 | { |
461 | path: '/e-books', | 461 | path: '/e-books', |
462 | meta: {}, | 462 | meta: {}, |
463 | name: 'E-Books', | 463 | name: 'E-Books', |
464 | props: (route) => ({ type: route.query.type }), | 464 | props: (route) => ({ type: route.query.type }), |
465 | component: () => | 465 | component: () => |
466 | import ( | 466 | import ( |
467 | /* webpackChunkName: "routes" */ | 467 | /* webpackChunkName: "routes" */ |
468 | /* webpackMode: "lazy-once" */ | 468 | /* webpackMode: "lazy-once" */ |
469 | `@/pages/Library/eBook.vue` | 469 | `@/pages/Library/eBook.vue` |
470 | ) | 470 | ) |
471 | }, | 471 | }, |
472 | { | 472 | { |
473 | path: '/editInvoice/:invoiceid', | 473 | path: '/editInvoice/:invoiceid', |
474 | meta: {}, | 474 | meta: {}, |
475 | name: 'Edit Invoice', | 475 | name: 'Edit Invoice', |
476 | // props: (route) => ({ type: route.query.type }), | 476 | // props: (route) => ({ type: route.query.type }), |
477 | component: () => | 477 | component: () => |
478 | import ( | 478 | import ( |
479 | /* webpackChunkName: "routes" */ | 479 | /* webpackChunkName: "routes" */ |
480 | /* webpackMode: "lazy-once" */ | 480 | /* webpackMode: "lazy-once" */ |
481 | `@/pages/Account/editInvoice.vue` | 481 | `@/pages/Account/editInvoice.vue` |
482 | ) | 482 | ) |
483 | }, | 483 | }, |
484 | { | 484 | { |
485 | path: '/StudentsAttendence/:id', | 485 | path: '/StudentsAttendence/:id', |
486 | meta: {}, | 486 | meta: {}, |
487 | name: 'View Students Attendence', | 487 | name: 'View Students Attendence', |
488 | props: (route) => ({ type: route.query.type }), | 488 | props: (route) => ({ type: route.query.type }), |
489 | component: () => | 489 | component: () => |
490 | import ( | 490 | import ( |
491 | /* webpackChunkName: "routes" */ | 491 | /* webpackChunkName: "routes" */ |
492 | /* webpackMode: "lazy-once" */ | 492 | /* webpackMode: "lazy-once" */ |
493 | `@/pages/Attendence/viewStudentsAttendence.vue` | 493 | `@/pages/Attendence/viewStudentsAttendence.vue` |
494 | ) | 494 | ) |
495 | }, | 495 | }, |
496 | { | 496 | { |
497 | path: '/TeacherAttendence/:teacherId', | 497 | path: '/TeacherAttendence/:teacherId', |
498 | meta: {}, | 498 | meta: {}, |
499 | name: 'View Teacher Attendence', | 499 | name: 'View Teacher Attendence', |
500 | props: (route) => ({ type: route.query.type }), | 500 | props: (route) => ({ type: route.query.type }), |
501 | component: () => | 501 | component: () => |
502 | import ( | 502 | import ( |
503 | /* webpackChunkName: "routes" */ | 503 | /* webpackChunkName: "routes" */ |
504 | /* webpackMode: "lazy-once" */ | 504 | /* webpackMode: "lazy-once" */ |
505 | `@/pages/Attendence/viewTeacherAttendence.vue` | 505 | `@/pages/Attendence/viewTeacherAttendence.vue` |
506 | ) | 506 | ) |
507 | }, | 507 | }, |
508 | { | 508 | { |
509 | path: '/viewInvoice/:viewInvoiceId', | 509 | path: '/viewInvoice/:viewInvoiceId', |
510 | meta: {}, | 510 | meta: {}, |
511 | name: 'View Invoice', | 511 | name: 'View Invoice', |
512 | props: (route) => ({ type: route.query.type }), | 512 | props: (route) => ({ type: route.query.type }), |
513 | component: () => | 513 | component: () => |
514 | import ( | 514 | import ( |
515 | /* webpackChunkName: "routes" */ | 515 | /* webpackChunkName: "routes" */ |
516 | /* webpackMode: "lazy-once" */ | 516 | /* webpackMode: "lazy-once" */ |
517 | `@/pages/Account/viewInvoice.vue` | 517 | `@/pages/Account/viewInvoice.vue` |
518 | ) | 518 | ) |
519 | }, | 519 | }, |
520 | { | 520 | { |
521 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', | 521 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', |
522 | meta: {}, | 522 | meta: {}, |
523 | name: 'View Payment Invoice', | 523 | name: 'View Payment Invoice', |
524 | props: (route) => ({ type: route.query.type }), | 524 | props: (route) => ({ type: route.query.type }), |
525 | component: () => | 525 | component: () => |
526 | import ( | 526 | import ( |
527 | /* webpackChunkName: "routes" */ | 527 | /* webpackChunkName: "routes" */ |
528 | /* webpackMode: "lazy-once" */ | 528 | /* webpackMode: "lazy-once" */ |
529 | `@/pages/Account/viewPaymentInvoice.vue` | 529 | `@/pages/Account/viewPaymentInvoice.vue` |
530 | ) | 530 | ) |
531 | }, | 531 | }, |
532 | { | 532 | { |
533 | path: '/globalPayment', | 533 | path: '/globalPayment', |
534 | meta: {}, | 534 | meta: {}, |
535 | name: 'Global Payment', | 535 | name: 'Global Payment', |
536 | props: (route) => ({ type: route.query.type }), | 536 | props: (route) => ({ type: route.query.type }), |
537 | component: () => | 537 | component: () => |
538 | import ( | 538 | import ( |
539 | /* webpackChunkName: "routes" */ | 539 | /* webpackChunkName: "routes" */ |
540 | /* webpackMode: "lazy-once" */ | 540 | /* webpackMode: "lazy-once" */ |
541 | `@/pages/Account/globalPayment.vue` | 541 | `@/pages/Account/globalPayment.vue` |
542 | ) | 542 | ) |
543 | }, | 543 | }, |
544 | { | 544 | { |
545 | path: '/exam', | 545 | path: '/exam', |
546 | meta: {}, | 546 | meta: {}, |
547 | name: 'Exam', | 547 | name: 'Exam', |
548 | props: (route) => ({ type: route.query.type }), | 548 | props: (route) => ({ type: route.query.type }), |
549 | component: () => | 549 | component: () => |
550 | import ( | 550 | import ( |
551 | /* webpackChunkName: "routes" */ | 551 | /* webpackChunkName: "routes" */ |
552 | /* webpackMode: "lazy-once" */ | 552 | /* webpackMode: "lazy-once" */ |
553 | `@/pages/Exam/exam.vue` | 553 | `@/pages/Exam/exam.vue` |
554 | ) | 554 | ) |
555 | }, | 555 | }, |
556 | { | 556 | { |
557 | path: '/grade', | 557 | path: '/grade', |
558 | meta: {}, | 558 | meta: {}, |
559 | name: 'Grade', | 559 | name: 'Grade', |
560 | props: (route) => ({ type: route.query.type }), | 560 | props: (route) => ({ type: route.query.type }), |
561 | component: () => | 561 | component: () => |
562 | import ( | 562 | import ( |
563 | /* webpackChunkName: "routes" */ | 563 | /* webpackChunkName: "routes" */ |
564 | /* webpackMode: "lazy-once" */ | 564 | /* webpackMode: "lazy-once" */ |
565 | `@/pages/Exam/grade.vue` | 565 | `@/pages/Exam/grade.vue` |
566 | ) | 566 | ) |
567 | }, | 567 | }, |
568 | { | 568 | { |
569 | path: '/examSchedule', | 569 | path: '/examSchedule', |
570 | meta: {}, | 570 | meta: {}, |
571 | name: 'Exam Schedule', | 571 | name: 'Exam Schedule', |
572 | props: (route) => ({ type: route.query.type }), | 572 | props: (route) => ({ type: route.query.type }), |
573 | component: () => | 573 | component: () => |
574 | import ( | 574 | import ( |
575 | /* webpackChunkName: "routes" */ | 575 | /* webpackChunkName: "routes" */ |
576 | /* webpackMode: "lazy-once" */ | 576 | /* webpackMode: "lazy-once" */ |
577 | `@/pages/Exam/examSchedule.vue` | 577 | `@/pages/Exam/examSchedule.vue` |
578 | ) | 578 | ) |
579 | }, | 579 | }, |
580 | { | 580 | { |
581 | path: '/examAttendence', | 581 | path: '/examAttendence', |
582 | meta: {}, | 582 | meta: {}, |
583 | name: 'Exam Attendence', | 583 | name: 'Exam Attendence', |
584 | props: (route) => ({ type: route.query.type }), | 584 | props: (route) => ({ type: route.query.type }), |
585 | component: () => | 585 | component: () => |
586 | import ( | 586 | import ( |
587 | /* webpackChunkName: "routes" */ | 587 | /* webpackChunkName: "routes" */ |
588 | /* webpackMode: "lazy-once" */ | 588 | /* webpackMode: "lazy-once" */ |
589 | `@/pages/Exam/examAttendence.vue` | 589 | `@/pages/Exam/examAttendence.vue` |
590 | ) | 590 | ) |
591 | }, | 591 | }, |
592 | { | 592 | { |
593 | path: '/mark', | 593 | path: '/mark', |
594 | meta: {}, | 594 | meta: {}, |
595 | name: 'Mark', | 595 | name: 'Mark', |
596 | props: (route) => ({ type: route.query.type }), | 596 | props: (route) => ({ type: route.query.type }), |
597 | component: () => | 597 | component: () => |
598 | import ( | 598 | import ( |
599 | /* webpackChunkName: "routes" */ | 599 | /* webpackChunkName: "routes" */ |
600 | /* webpackMode: "lazy-once" */ | 600 | /* webpackMode: "lazy-once" */ |
601 | `@/pages/Mark/mark.vue` | 601 | `@/pages/Mark/mark.vue` |
602 | ) | 602 | ) |
603 | }, | 603 | }, |
604 | { | 604 | { |
605 | path: '/viewMark/:markId', | 605 | path: '/viewMark/:markId', |
606 | meta: {}, | 606 | meta: {}, |
607 | name: 'view Mark', | 607 | name: 'view Mark', |
608 | props: (route) => ({ type: route.query.type }), | 608 | props: (route) => ({ type: route.query.type }), |
609 | component: () => | 609 | component: () => |
610 | import ( | 610 | import ( |
611 | /* webpackChunkName: "routes" */ | 611 | /* webpackChunkName: "routes" */ |
612 | /* webpackMode: "lazy-once" */ | 612 | /* webpackMode: "lazy-once" */ |
613 | `@/pages/Mark/viewMark.vue` | 613 | `@/pages/Mark/viewMark.vue` |
614 | ) | 614 | ) |
615 | }, | 615 | }, |
616 | { | 616 | { |
617 | path: '/markDistribution', | 617 | path: '/markDistribution', |
618 | meta: {}, | 618 | meta: {}, |
619 | name: 'Mark Distribution', | 619 | name: 'Mark Distribution', |
620 | props: (route) => ({ type: route.query.type }), | 620 | props: (route) => ({ type: route.query.type }), |
621 | component: () => | 621 | component: () => |
622 | import ( | 622 | import ( |
623 | /* webpackChunkName: "routes" */ | 623 | /* webpackChunkName: "routes" */ |
624 | /* webpackMode: "lazy-once" */ | 624 | /* webpackMode: "lazy-once" */ |
625 | `@/pages/Mark/markDistribution.vue` | 625 | `@/pages/Mark/markDistribution.vue` |
626 | ) | 626 | ) |
627 | }, | 627 | }, |
628 | { | 628 | { |
629 | path: '/meet', | 629 | path: '/meet', |
630 | meta: {}, | 630 | meta: {}, |
631 | name: 'Meet', | 631 | name: 'Meet', |
632 | props: (route) => ({ type: route.query.type }), | 632 | props: (route) => ({ type: route.query.type }), |
633 | component: () => | 633 | component: () => |
634 | import ( | 634 | import ( |
635 | /* webpackChunkName: "routes" */ | 635 | /* webpackChunkName: "routes" */ |
636 | /* webpackMode: "lazy-once" */ | 636 | /* webpackMode: "lazy-once" */ |
637 | `@/pages/Meet/meet.vue` | 637 | `@/pages/Meet/meet.vue` |
638 | ) | 638 | ) |
639 | }, | 639 | }, |
640 | { | 640 | { |
641 | path: '/academicYear', | 641 | path: '/academicYear', |
642 | meta: {}, | 642 | meta: {}, |
643 | name: 'Academic Year', | 643 | name: 'Academic Year', |
644 | props: (route) => ({ type: route.query.type }), | 644 | props: (route) => ({ type: route.query.type }), |
645 | component: () => | 645 | component: () => |
646 | import ( | 646 | import ( |
647 | /* webpackChunkName: "routes" */ | 647 | /* webpackChunkName: "routes" */ |
648 | /* webpackMode: "lazy-once" */ | 648 | /* webpackMode: "lazy-once" */ |
649 | `@/pages/Administrator/academicYear.vue` | 649 | `@/pages/Administrator/academicYear.vue` |
650 | ) | 650 | ) |
651 | }, | 651 | }, |
652 | { | 652 | { |
653 | path: '/systemAdmin', | 653 | path: '/systemAdmin', |
654 | meta: {}, | 654 | meta: {}, |
655 | name: 'System Admin', | 655 | name: 'System Admin', |
656 | props: (route) => ({ type: route.query.type }), | 656 | props: (route) => ({ type: route.query.type }), |
657 | component: () => | 657 | component: () => |
658 | import ( | 658 | import ( |
659 | /* webpackChunkName: "routes" */ | 659 | /* webpackChunkName: "routes" */ |
660 | /* webpackMode: "lazy-once" */ | 660 | /* webpackMode: "lazy-once" */ |
661 | `@/pages/Administrator/systemAdmin.vue` | 661 | `@/pages/Administrator/systemAdmin.vue` |
662 | ) | 662 | ) |
663 | }, | 663 | }, |
664 | { | 664 | { |
665 | path: '/resetPassword', | 665 | path: '/resetPassword', |
666 | meta: {}, | 666 | meta: {}, |
667 | name: 'Change Password', | 667 | name: 'Change Password', |
668 | props: (route) => ({ type: route.query.type }), | 668 | props: (route) => ({ type: route.query.type }), |
669 | component: () => | 669 | component: () => |
670 | import ( | 670 | import ( |
671 | /* webpackChunkName: "routes" */ | 671 | /* webpackChunkName: "routes" */ |
672 | /* webpackMode: "lazy-once" */ | 672 | /* webpackMode: "lazy-once" */ |
673 | `@/pages/Administrator/resetPassword.vue` | 673 | `@/pages/Administrator/resetPassword.vue` |
674 | ) | 674 | ) |
675 | }, | 675 | }, |
676 | { | 676 | { |
677 | path: '/role', | 677 | path: '/role', |
678 | meta: {}, | 678 | meta: {}, |
679 | name: 'Role', | 679 | name: 'Role', |
680 | props: (route) => ({ type: route.query.type }), | 680 | props: (route) => ({ type: route.query.type }), |
681 | component: () => | 681 | component: () => |
682 | import ( | 682 | import ( |
683 | /* webpackChunkName: "routes" */ | 683 | /* webpackChunkName: "routes" */ |
684 | /* webpackMode: "lazy-once" */ | 684 | /* webpackMode: "lazy-once" */ |
685 | `@/pages/Administrator/role.vue` | 685 | `@/pages/Administrator/role.vue` |
686 | ) | 686 | ) |
687 | }, | 687 | }, |
688 | { | 688 | { |
689 | path: '/bulkImport', | 689 | path: '/bulkImport', |
690 | meta: {}, | 690 | meta: {}, |
691 | name: 'Bulk Import', | 691 | name: 'Bulk Import', |
692 | props: (route) => ({ type: route.query.type }), | 692 | props: (route) => ({ type: route.query.type }), |
693 | component: () => | 693 | component: () => |
694 | import ( | 694 | import ( |
695 | /* webpackChunkName: "routes" */ | 695 | /* webpackChunkName: "routes" */ |
696 | /* webpackMode: "lazy-once" */ | 696 | /* webpackMode: "lazy-once" */ |
697 | `@/pages/Administrator/bulkImport.vue` | 697 | `@/pages/Administrator/bulkImport.vue` |
698 | ) | 698 | ) |
699 | }, | 699 | }, |
700 | { | 700 | { |
701 | path: '/studentReport', | 701 | path: '/studentReport', |
702 | meta: {}, | 702 | meta: {}, |
703 | name: 'Student Report', | 703 | name: 'Student Report', |
704 | props: (route) => ({ type: route.query.type }), | 704 | props: (route) => ({ type: route.query.type }), |
705 | component: () => | 705 | component: () => |
706 | import ( | 706 | import ( |
707 | /* webpackChunkName: "routes" */ | 707 | /* webpackChunkName: "routes" */ |
708 | /* webpackMode: "lazy-once" */ | 708 | /* webpackMode: "lazy-once" */ |
709 | `@/pages/Report/studentReport.vue` | 709 | `@/pages/Report/studentReport.vue` |
710 | ) | 710 | ) |
711 | }, | 711 | }, |
712 | { | 712 | { |
713 | path: '/progressCardReport', | 713 | path: '/progressCardReport', |
714 | meta: {}, | 714 | meta: {}, |
715 | name: 'Progress Card Report', | 715 | name: 'Progress Card Report', |
716 | props: (route) => ({ type: route.query.type }), | 716 | props: (route) => ({ type: route.query.type }), |
717 | component: () => | 717 | component: () => |
718 | import ( | 718 | import ( |
719 | /* webpackChunkName: "routes" */ | 719 | /* webpackChunkName: "routes" */ |
720 | /* webpackMode: "lazy-once" */ | 720 | /* webpackMode: "lazy-once" */ |
721 | `@/pages/Report/progressCardReport.vue` | 721 | `@/pages/Report/progressCardReport.vue` |
722 | ) | 722 | ) |
723 | }, | 723 | }, |
724 | { | 724 | { |
725 | path: '/idCard', | 725 | path: '/idCard', |
726 | meta: {}, | 726 | meta: {}, |
727 | name: 'Id Card Report', | 727 | name: 'Id Card Report', |
728 | props: (route) => ({ type: route.query.type }), | 728 | props: (route) => ({ type: route.query.type }), |
729 | component: () => | 729 | component: () => |
730 | import ( | 730 | import ( |
731 | `@/pages/Report/idCard.vue` | 731 | `@/pages/Report/idCard.vue` |
732 | ) | 732 | ) |
733 | }, | 733 | }, |
734 | { | 734 | { |
735 | path: '/admitCard', | 735 | path: '/admitCard', |
736 | meta: {}, | 736 | meta: {}, |
737 | name: 'Admit Card Report', | 737 | name: 'Admit Card Report', |
738 | props: (route) => ({ type: route.query.type }), | 738 | props: (route) => ({ type: route.query.type }), |
739 | component: () => | 739 | component: () => |
740 | import ( | 740 | import ( |
741 | `@/pages/Report/admitCard.vue` | 741 | `@/pages/Report/admitCard.vue` |
742 | ) | 742 | ) |
743 | }, | 743 | }, |
744 | { | 744 | { |
745 | path: '/generalSetting', | 745 | path: '/generalSetting', |
746 | meta: {}, | 746 | meta: {}, |
747 | name: 'General Setting', | 747 | name: 'General Setting', |
748 | props: (route) => ({ type: route.query.type }), | 748 | props: (route) => ({ type: route.query.type }), |
749 | component: () => | 749 | component: () => |
750 | import ( | 750 | import ( |
751 | /* webpackChunkName: "routes" */ | 751 | /* webpackChunkName: "routes" */ |
752 | /* webpackMode: "lazy-once" */ | 752 | /* webpackMode: "lazy-once" */ |
753 | `@/pages/generalSetting/generalSetting.vue` | 753 | `@/pages/generalSetting/generalSetting.vue` |
754 | ) | 754 | ) |
755 | }, | 755 | }, |
756 | { | 756 | { |
757 | path: '/assignment', | 757 | path: '/assignment', |
758 | meta: {}, | 758 | meta: {}, |
759 | name: 'Assignment', | 759 | name: 'Assignment', |
760 | props: (route) => ({ type: route.query.type }), | 760 | props: (route) => ({ type: route.query.type }), |
761 | component: () => | 761 | component: () => |
762 | import ( | 762 | import ( |
763 | `@/pages/Academic/assignment.vue` | 763 | `@/pages/Academic/assignment.vue` |
764 | ) | 764 | ) |
765 | }, | 765 | }, |
766 | { | 766 | { |
767 | path: '/routine', | 767 | path: '/routine', |
768 | meta: {}, | 768 | meta: {}, |
769 | name: 'Routine', | 769 | name: 'Routine', |
770 | props: (route) => ({ type: route.query.type }), | 770 | props: (route) => ({ type: route.query.type }), |
771 | component: () => | 771 | component: () => |
772 | import ( | 772 | import ( |
773 | `@/pages/Academic/routine.vue` | 773 | `@/pages/Academic/routine.vue` |
774 | ) | 774 | ) |
775 | }, | 775 | }, |
776 | { | 776 | { |
777 | path: '/subject', | 777 | path: '/subject', |
778 | meta: {}, | 778 | meta: {}, |
779 | name: 'Subject', | 779 | name: 'Subject', |
780 | props: (route) => ({ type: route.query.type }), | 780 | props: (route) => ({ type: route.query.type }), |
781 | component: () => | 781 | component: () => |
782 | import ( | 782 | import ( |
783 | `@/pages/Academic/subject.vue` | 783 | `@/pages/Academic/subject.vue` |
784 | ) | 784 | ) |
785 | }, | 785 | }, |
786 | { | 786 | { |
787 | path: '/syllabus', | 787 | path: '/syllabus', |
788 | meta: {}, | 788 | meta: {}, |
789 | name: 'Syllabus', | 789 | name: 'Syllabus', |
790 | props: (route) => ({ type: route.query.type }), | 790 | props: (route) => ({ type: route.query.type }), |
791 | component: () => | 791 | component: () => |
792 | import ( | 792 | import ( |
793 | `@/pages/Academic/syllabus.vue` | 793 | `@/pages/Academic/syllabus.vue` |
794 | ) | 794 | ) |
795 | }, | 795 | }, |
796 | { | 796 | { |
797 | path: '/course', | 797 | path: '/course', |
798 | meta: {}, | 798 | meta: {}, |
799 | name: 'Course', | 799 | name: 'Course', |
800 | props: (route) => ({ type: route.query.type }), | 800 | props: (route) => ({ type: route.query.type }), |
801 | component: () => | 801 | component: () => |
802 | import ( | 802 | import ( |
803 | /* webpackChunkName: "routes" */ | 803 | /* webpackChunkName: "routes" */ |
804 | /* webpackMode: "lazy-once" */ | 804 | /* webpackMode: "lazy-once" */ |
805 | `@/pages/Course/course.vue` | 805 | `@/pages/Course/course.vue` |
806 | ) | 806 | ) |
807 | }, | 807 | }, |
808 | { | 808 | { |
809 | path: '/courseDetail', | 809 | path: '/courseDetail', |
810 | meta: {}, | 810 | meta: {}, |
811 | name: 'Course Detail', | 811 | name: 'Course Detail', |
812 | props: (route) => ({ type: route.query.type }), | 812 | props: (route) => ({ type: route.query.type }), |
813 | component: () => | 813 | component: () => |
814 | import ( | 814 | import ( |
815 | /* webpackChunkName: "routes" */ | 815 | /* webpackChunkName: "routes" */ |
816 | /* webpackMode: "lazy-once" */ | 816 | /* webpackMode: "lazy-once" */ |
817 | `@/pages/Course/courseDetail.vue` | 817 | `@/pages/Course/courseDetail.vue` |
818 | ) | 818 | ) |
819 | }, | 819 | }, |
820 | { | 820 | { |
821 | path: '/enrollStudents', | 821 | path: '/enrollStudents', |
822 | meta: {}, | 822 | meta: {}, |
823 | name: 'Enroll Students', | 823 | name: 'Enroll Students', |
824 | props: (route) => ({ type: route.query.type }), | 824 | props: (route) => ({ type: route.query.type }), |
825 | component: () => | 825 | component: () => |
826 | import ( | 826 | import ( |
827 | /* webpackChunkName: "routes" */ | 827 | /* webpackChunkName: "routes" */ |
828 | /* webpackMode: "lazy-once" */ | 828 | /* webpackMode: "lazy-once" */ |
829 | `@/pages/Course/enrollStudents.vue` | 829 | `@/pages/Course/enrollStudents.vue` |
830 | ) | 830 | ) |
831 | }, | 831 | }, |
832 | { | 832 | { |
833 | path: '/changeStudents', | 833 | path: '/changeStudents', |
834 | meta: {}, | 834 | meta: {}, |
835 | name: 'Change Students', | 835 | name: 'Change Students', |
836 | props: (route) => ({ type: route.query.type }), | 836 | props: (route) => ({ type: route.query.type }), |
837 | component: () => | 837 | component: () => |
838 | import ( | 838 | import ( |
839 | /* webpackChunkName: "routes" */ | 839 | /* webpackChunkName: "routes" */ |
840 | /* webpackMode: "lazy-once" */ | 840 | /* webpackMode: "lazy-once" */ |
841 | `@/pages/changeStudents/changeStudents.vue` | 841 | `@/pages/changeStudents/changeStudents.vue` |
842 | ) | 842 | ) |
843 | }, | 843 | }, |
844 | { | 844 | { |
845 | path: '/annoucement', | 845 | path: '/annoucement', |
846 | meta: {}, | 846 | meta: {}, |
847 | name: 'Annoucement', | 847 | name: 'Annoucement', |
848 | props: (route) => ({ type: route.query.type }), | 848 | props: (route) => ({ type: route.query.type }), |
849 | component: () => | 849 | component: () => |
850 | import ( | 850 | import ( |
851 | /* webpackChunkName: "routes" */ | 851 | /* webpackChunkName: "routes" */ |
852 | /* webpackMode: "lazy-once" */ | 852 | /* webpackMode: "lazy-once" */ |
853 | `@/pages/Annoucement/annoucement.vue` | 853 | `@/pages/Annoucement/annoucement.vue` |
854 | ) | 854 | ) |
855 | }, | 855 | }, |
856 | { | ||
857 | path: '/meetingEvent', | ||
858 | meta: {}, | ||
859 | name: 'Meeting Event', | ||
860 | props: (route) => ({ type: route.query.type }), | ||
861 | component: () => | ||
862 | import ( | ||
863 | /* webpackChunkName: "routes" */ | ||
864 | /* webpackMode: "lazy-once" */ | ||
865 | `@/pages/meetingEvent/meetingEvent.vue` | ||
866 | ) | ||
867 | }, | ||
856 | //////SCHOOL | 868 | //////SCHOOL |
857 | 869 | ||
858 | { | 870 | { |
859 | path: '/school', | 871 | path: '/school', |
860 | meta: {}, | 872 | meta: {}, |
861 | name: 'School', | 873 | name: 'School', |
862 | props: (route) => ({ type: route.query.type }), | 874 | props: (route) => ({ type: route.query.type }), |
863 | component: () => | 875 | component: () => |
864 | import ( | 876 | import ( |
865 | /* webpackChunkName: "routes" */ | 877 | /* webpackChunkName: "routes" */ |
866 | /* webpackMode: "lazy-once" */ | 878 | /* webpackMode: "lazy-once" */ |
867 | `@/pages/School/school.vue` | 879 | `@/pages/School/school.vue` |
868 | ) | 880 | ) |
869 | }, | 881 | }, |
870 | { | 882 | { |
871 | path: '/schooldashboard', | 883 | path: '/schooldashboard', |
872 | meta: {}, | 884 | meta: {}, |
873 | name: 'View School Dashboard', | 885 | name: 'View School Dashboard', |
874 | props: (route) => ({ type: route.query.type }), | 886 | props: (route) => ({ type: route.query.type }), |
875 | component: () => | 887 | component: () => |
876 | import ( | 888 | import ( |
877 | /* webpackChunkName: "routes" */ | 889 | /* webpackChunkName: "routes" */ |
878 | /* webpackMode: "lazy-once" */ | 890 | /* webpackMode: "lazy-once" */ |
879 | `@/pages/School/viewSchoolDashboard.vue` | 891 | `@/pages/School/viewSchoolDashboard.vue` |
880 | ) | 892 | ) |
881 | } | 893 | } |
882 | ]; | 894 | ]; |