Commit acb6c9e2b20d8a920e0a8ccc2ea29d23c1125152

Authored by Shikha Mishra
1 parent 461ae23300

issues solved related to bugs

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 ] 120 ]
120 }, 121 },
121 { 122 {
122 title: 'Notice Board', 123 title: 'Notice Board',
123 name: 'Notice Board', 124 name: 'Notice Board',
124 icon: '/static/icon/notice board.png', 125 icon: '/static/icon/notice board.png',
125 }, 126 },
126 { 127 {
127 title: 'News', 128 title: 'News',
128 name: 'News', 129 name: 'News',
129 icon: '/static/icon/news.png', 130 icon: '/static/icon/news.png',
130 }, 131 },
131 // { 132 // {
132 // title: 'Reminder', 133 // title: 'Reminder',
133 // name: 'reminder', 134 // name: 'reminder',
134 // icon: 'alarm_add', 135 // icon: 'alarm_add',
135 // }, 136 // },
136 { 137 {
137 title: 'Time Table', 138 title: 'Time Table',
138 name: 'Time Table', 139 name: 'Time Table',
139 icon: '/static/icon/time table.png', 140 icon: '/static/icon/time table.png',
140 }, 141 },
141 { 142 {
142 title: 'Library', 143 title: 'Library',
143 group: 'Library', 144 group: 'Library',
144 component: 'Library', 145 component: 'Library',
145 icon: '/static/icon/library.png', 146 icon: '/static/icon/library.png',
146 items: [ 147 items: [
147 { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, 148 { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', },
148 { name: 'Books', title: 'Books', component: 'Books', action: '', }, 149 { name: 'Books', title: 'Books', component: 'Books', action: '', },
149 { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, 150 { name: 'Issue', title: ' Issue', component: 'Issue', action: '', },
150 { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } 151 { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', }
151 152
152 ] 153 ]
153 }, 154 },
154 { 155 {
155 title: 'Report', 156 title: 'Report',
156 group: 'Report', 157 group: 'Report',
157 component: 'Report', 158 component: 'Report',
158 icon: '/static/icon/reports.png', 159 icon: '/static/icon/reports.png',
159 items: [ 160 items: [
160 { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, 161 { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', },
161 { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, 162 { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', },
162 { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, 163 { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', },
163 { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } 164 { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', }
164 ] 165 ]
165 }, 166 },
166 { 167 {
167 title: 'Notification', 168 title: 'Notification',
168 name: 'Notification', 169 name: 'Notification',
169 icon: '/static/icon/notification.png', 170 icon: '/static/icon/notification.png',
170 }, 171 },
171 { 172 {
172 title: 'Social Media', 173 title: 'Social Media',
173 name: 'Social Media', 174 name: 'Social Media',
174 icon: '/static/icon/events.png', 175 icon: '/static/icon/events.png',
175 }, 176 },
176 { 177 {
177 title: 'Gallery', 178 title: 'Gallery',
178 name: 'Gallery', 179 name: 'Gallery',
179 icon: '/static/icon/gallery.png', 180 icon: '/static/icon/gallery.png',
180 }, 181 },
181 { 182 {
182 title: 'Event', 183 title: 'Event',
183 name: 'Event', 184 name: 'Event',
184 icon: '/static/icon/events.png', 185 icon: '/static/icon/events.png',
185 }, 186 },
186 { 187 {
187 title: 'Account', 188 title: 'Account',
188 group: 'Account', 189 group: 'Account',
189 component: 'Account', 190 component: 'Account',
190 icon: '/static/icon/accounts.png', 191 icon: '/static/icon/accounts.png',
191 items: [ 192 items: [
192 { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, 193 { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', },
193 { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, 194 { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', },
194 { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, 195 { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', },
195 { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, 196 { name: 'Expense', title: 'Expense', component: 'Expense', action: '', },
196 { name: 'Income', title: 'Income', component: 'Income', action: '', }, 197 { name: 'Income', title: 'Income', component: 'Income', action: '', },
197 { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } 198 { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', }
198 ] 199 ]
199 }, 200 },
200 { 201 {
201 title: 'Holiday', 202 title: 'Holiday',
202 name: 'Holiday', 203 name: 'Holiday',
203 icon: '/static/icon/holiday.png', 204 icon: '/static/icon/holiday.png',
204 }, 205 },
205 { 206 {
206 title: 'General Setting', 207 title: 'General Setting',
207 name: 'General Setting', 208 name: 'General Setting',
208 icon: '/static/icon/settings.png', 209 icon: '/static/icon/settings.png',
209 } 210 }
210 ]; 211 ];
211 212
212 const libraryMenu = [{ 213 const libraryMenu = [{
213 title: 'Library', 214 title: 'Dashboard',
214 group: 'Library', 215 name: 'Dashboard',
215 component: 'Library', 216 icon: '/static/icon/dashboard.png',
216 icon: '/static/schoolIcons/Library.png', 217 },
217 items: [ 218 {
218 { name: 'libraryMember', title: ' Library Member', component: 'libraryMember', action: '', }, 219 title: 'Library',
219 { name: 'Books', title: 'Books', component: 'Books', action: '', }, 220 group: 'Library',
220 { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, 221 component: 'Library',
221 { name: 'eBooks', title: 'E-Books', component: 'eBooks', action: '', } 222 icon: '/static/icon/library.png',
223 items: [
224 { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', },
225 { name: 'Books', title: 'Books', component: 'Books', action: '', },
226 { name: 'Issue', title: ' Issue', component: 'Issue', action: '', },
227 { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', }
222 228
223 ] 229 ]
224 }]; 230 },
231 ];
225 232
226 const accountMenu = [{ 233 const accountMenu = [{
227 title: 'Account', 234 title: 'Dashboard',
228 group: 'Account', 235 name: 'Dashboard',
229 component: 'Account', 236 icon: '/static/icon/dashboard.png',
230 icon: '/static/schoolIcons/Account.png', 237 },
231 items: [ 238
232 { name: 'feeTypes', title: 'Fee Types', component: 'feeTypes', action: '', }, 239 {
233 { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, 240 title: 'Account',
234 { name: 'paymentHistory', title: 'Payment History', component: 'paymentHistory', action: '', }, 241 group: 'Account',
235 { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, 242 component: 'Account',
236 { name: 'Income', title: 'Income', component: 'Income', action: '', }, 243 icon: '/static/icon/accounts.png',
237 { name: 'GlobalPayment', title: 'Global Payment', component: 'GlobalPayment', action: '', } 244 items: [
238 ] 245 { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', },
239 }]; 246 { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', },
247 { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', },
248 { name: 'Expense', title: 'Expense', component: 'Expense', action: '', },
249 { name: 'Income', title: 'Income', component: 'Income', action: '', },
250 { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', }
251 ]
252 },
253 ];
240 254
241 const schoolMenu = [ 255 const schoolMenu = [
242 // { header: 'Apps' }, 256 // { header: 'Apps' },
243 { 257 {
244 title: 'Dashboard', 258 title: 'Dashboard',
245 // group: 'apps', 259 // group: 'apps',
246 name: 'View School Dashboard', 260 name: 'View School Dashboard',
247 icon: '/static/icon/dashboard.png', 261 icon: '/static/icon/dashboard.png',
248 }, 262 },
249 { 263 {
250 title: 'School', 264 title: 'School',
251 // group: 'apps', 265 // group: 'apps',
252 name: 'School', 266 name: 'School',
253 icon: '/static/schoolIcons/Dashboard.png', 267 icon: '/static/schoolIcons/Dashboard.png',
254 } 268 }
255 ]; 269 ];
256 270
257 const teacherMenu = [{ 271 const teacherMenu = [{
258 title: 'Dashboard', 272 title: 'Dashboard',
259 name: 'School', 273 name: 'School',
260 icon: '/static/icon/dashboard.png', 274 icon: '/static/icon/dashboard.png',
261 }, 275 },
262 { 276 {
263 title: 'Parents', 277 title: 'Parents',
264 // group: 'apps', 278 // group: 'apps',
265 name: 'Parents', 279 name: 'Parents',
266 icon: '/static/icon/parents.png', 280 icon: '/static/icon/parents.png',
267 }, 281 },
268 { 282 {
269 title: 'Teachers', 283 title: 'Teachers',
270 // group: '', 284 // group: '',
271 name: 'Teachers', 285 name: 'Teachers',
272 icon: '/static/icon/teacher.png', 286 icon: '/static/icon/teacher.png',
273 }, 287 },
274 { 288 {
275 title: 'Students', 289 title: 'Students',
276 // group: 'apps', 290 // group: 'apps',
277 name: 'Students', 291 name: 'Students',
278 icon: '/static/icon/student.png', 292 icon: '/static/icon/student.png',
279 }, 293 },
280 { 294 {
281 title: 'Academic', 295 title: 'Academic',
282 group: 'Academic', 296 group: 'Academic',
283 component: 'Academic', 297 component: 'Academic',
284 icon: '/static/icon/school.png', 298 icon: '/static/icon/school.png',
285 items: [ 299 items: [
286 { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, 300 { name: 'Subject', title: 'Subject', component: 'Subject', action: '', },
287 { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, 301 { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', },
288 { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, 302 { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', },
289 { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, 303 { name: 'Routine', title: 'Routine', component: 'Routine', action: '', },
290 ] 304 ]
291 }, 305 },
292 { 306 {
293 title: 'Attendance', 307 title: 'Attendance',
294 group: 'Attendance', 308 group: 'Attendance',
295 component: 'Attendance', 309 component: 'Attendance',
296 icon: '/static/icon/attendence.png', 310 icon: '/static/icon/attendence.png',
297 items: [ 311 items: [
298 { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, 312 { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', },
299 { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, 313 { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', },
300 // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, 314 // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', },
301 ] 315 ]
302 }, 316 },
303 { 317 {
304 title: 'Exam', 318 title: 'Exam',
305 group: 'Exam', 319 group: 'Exam',
306 component: 'Exam', 320 component: 'Exam',
307 icon: '/static/icon/exam.png', 321 icon: '/static/icon/exam.png',
308 items: [ 322 items: [
309 { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, 323 { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', },
310 { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } 324 { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', }
311 ] 325 ]
312 }, 326 },
313 { 327 {
314 title: 'Marks', 328 title: 'Marks',
315 group: 'Mark', 329 group: 'Mark',
316 component: 'Mark', 330 component: 'Mark',
317 icon: '/static/icon/marks.png', 331 icon: '/static/icon/marks.png',
318 items: [ 332 items: [
319 { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } 333 { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }
320 ] 334 ]
321 }, 335 },
322 { 336 {
323 title: 'Report', 337 title: 'Report',
324 group: 'Report', 338 group: 'Report',
325 component: 'Report', 339 component: 'Report',
326 icon: '/static/icon/reports.png', 340 icon: '/static/icon/reports.png',
327 items: [ 341 items: [
328 { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, 342 { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', },
329 { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, 343 { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', },
330 { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, 344 { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', },
331 { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } 345 { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', }
332 ] 346 ]
333 }, 347 },
334 { 348 {
335 title: 'Library', 349 title: 'Library',
336 group: 'Library', 350 group: 'Library',
337 component: 'Library', 351 component: 'Library',
338 icon: '/static/icon/library.png', 352 icon: '/static/icon/library.png',
339 items: [ 353 items: [
340 { name: 'Books', title: 'Books', component: 'Books', action: '', }, 354 { name: 'Books', title: 'Books', component: 'Books', action: '', },
341 { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } 355 { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', }
342 356
343 ] 357 ]
344 }, 358 },
345 ]; 359 ];
346 360
347 // reorder menu 361 // reorder menu
348 // Menu.forEach((item) => { 362 // Menu.forEach((item) => {
349 // if (item.items) { 363 // if (item.items) {
350 // item.items.sort((x, y) => { 364 // item.items.sort((x, y) => {
351 // let textA = x.title.toUpperCase(); 365 // let textA = x.title.toUpperCase();
352 // let textB = y.title.toUpperCase(); 366 // let textB = y.title.toUpperCase();
353 // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; 367 // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
354 // }); 368 // });
355 // } 369 // }
356 // }); 370 // });
357 371
358 export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu }; 372 export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu };
src/components/pageHeader/AppDrawer.vue
1 <template> 1 <template>
2 <v-navigation-drawer 2 <v-navigation-drawer
3 id="appDrawer" 3 id="appDrawer"
4 :mini-variant.sync="mini" 4 :mini-variant.sync="mini"
5 fixed 5 fixed
6 :dark="$vuetify.dark" 6 :dark="$vuetify.dark"
7 app 7 app
8 v-model="drawer" 8 v-model="drawer"
9 hide-overlay 9 hide-overlay
10 width="260" 10 width="260"
11 > 11 >
12 <img 12 <img
13 v-bind:src="computeLogo" 13 v-bind:src="computeLogo"
14 height="40" 14 height="40"
15 width="130" 15 width="130"
16 class="imgLogo mb-3 mt-3" 16 class="imgLogo mb-3 mt-3"
17 alt="logo" 17 alt="logo"
18 style="margin: auto; 18 style="margin: auto;
19 display: block;" 19 display: block;"
20 /> 20 />
21 <!-- <v-toolbar class="white" flat> 21 <!-- <v-toolbar class="white" flat>
22 <img 22 <img
23 v-bind:src="computeLogo" 23 v-bind:src="computeLogo"
24 height="40" 24 height="40"
25 width="140" 25 width="140"
26 class="imgLogo" 26 class="imgLogo"
27 alt="logo" 27 alt="logo"
28 style="15px 0px 0px 40px !important;" 28 style="15px 0px 0px 40px !important;"
29 /> 29 />
30 </v-toolbar>--> 30 </v-toolbar>-->
31 <vue-perfect-scrollbar 31 <vue-perfect-scrollbar
32 class="drawer-menu--scroll side-bar-color mt-3" 32 class="drawer-menu--scroll side-bar-color mt-3"
33 :settings="scrollSettings" 33 :settings="scrollSettings"
34 > 34 >
35 <v-list dense expand class="white--text"> 35 <v-list dense expand class="white--text">
36 <template v-for="(item, i) in menus" v-if="role === 'ADMIN'"> 36 <template v-for="(item, i) in menus" v-if="role === 'ADMIN'">
37 <!-- {{menus}} --> 37 <!-- {{menus}} -->
38 <!--group with subitems--> 38 <!--group with subitems-->
39 <v-list-group 39 <v-list-group
40 v-if="item.items" 40 v-if="item.items"
41 :key="item.name" 41 :key="item.name"
42 :group="item.group" 42 :group="item.group"
43 no-action="no-action" 43 no-action="no-action"
44 > 44 >
45 <v-list-tile slot="activator" ripple="ripple"> 45 <v-list-tile slot="activator" ripple="ripple">
46 <v-list-tile-action v-if="item.icon"> 46 <v-list-tile-action v-if="item.icon">
47 <img :src="item.icon" width="22" alt="icons" /> 47 <img :src="item.icon" width="22" alt="icons" />
48 </v-list-tile-action> 48 </v-list-tile-action>
49 <v-list-tile-content> 49 <v-list-tile-content>
50 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 50 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
51 </v-list-tile-content> 51 </v-list-tile-content>
52 </v-list-tile> 52 </v-list-tile>
53 <template v-for="(subItem, i) in item.items"> 53 <template v-for="(subItem, i) in item.items">
54 <!--sub group--> 54 <!--sub group-->
55 <v-list-group 55 <v-list-group
56 v-if="subItem.items" 56 v-if="subItem.items"
57 :key="subItem.name" 57 :key="subItem.name"
58 :group="subItem.group" 58 :group="subItem.group"
59 sub-group="sub-group" 59 sub-group="sub-group"
60 > 60 >
61 <v-list-tile slot="activator" ripple="ripple"> 61 <v-list-tile slot="activator" ripple="ripple">
62 <v-list-tile-content> 62 <v-list-tile-content>
63 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> 63 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
64 </v-list-tile-content> 64 </v-list-tile-content>
65 </v-list-tile> 65 </v-list-tile>
66 <v-list-tile 66 <v-list-tile
67 v-for="(grand, i) in subItem.children" 67 v-for="(grand, i) in subItem.children"
68 :key="i" 68 :key="i"
69 :to="genChildTarget(item, grand)" 69 :to="genChildTarget(item, grand)"
70 :href="grand.href" 70 :href="grand.href"
71 ripple="ripple" 71 ripple="ripple"
72 > 72 >
73 <v-list-tile-content> 73 <v-list-tile-content>
74 <v-list-tile-title>{{ grand.title }}</v-list-tile-title> 74 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
75 </v-list-tile-content> 75 </v-list-tile-content>
76 </v-list-tile> 76 </v-list-tile>
77 </v-list-group> 77 </v-list-group>
78 <!--child item--> 78 <!--child item-->
79 <v-list-tile 79 <v-list-tile
80 v-else 80 v-else
81 :key="i" 81 :key="i"
82 :to="genChildTarget(item, subItem)" 82 :to="genChildTarget(item, subItem)"
83 :href="subItem.href" 83 :href="subItem.href"
84 :disabled="subItem.disabled" 84 :disabled="subItem.disabled"
85 :target="subItem.target" 85 :target="subItem.target"
86 ripple="ripple" 86 ripple="ripple"
87 > 87 >
88 <v-list-tile-action v-if="subItem.action"> 88 <v-list-tile-action v-if="subItem.action">
89 <img 89 <img
90 width="30" 90 width="30"
91 :src="subItem.action" 91 :src="subItem.action"
92 :class="[subItem.actionClass || 'success--text']" 92 :class="[subItem.actionClass || 'success--text']"
93 /> 93 />
94 </v-list-tile-action> 94 </v-list-tile-action>
95 <v-list-tile-content> 95 <v-list-tile-content>
96 <v-list-tile-title class="body-2"> 96 <v-list-tile-title class="body-2">
97 <span>{{ subItem.title }}</span> 97 <span>{{ subItem.title }}</span>
98 </v-list-tile-title> 98 </v-list-tile-title>
99 </v-list-tile-content> 99 </v-list-tile-content>
100 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> 100 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
101 </v-list-tile> 101 </v-list-tile>
102 </template> 102 </template>
103 </v-list-group> 103 </v-list-group>
104 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> 104 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
105 <v-divider v-else-if="item.divider" :key="i"></v-divider> 105 <v-divider v-else-if="item.divider" :key="i"></v-divider>
106 <!--top-level link--> 106 <!--top-level link-->
107 <v-list-tile 107 <v-list-tile
108 v-else 108 v-else
109 ripple="ripple" 109 ripple="ripple"
110 :disabled="item.disabled" 110 :disabled="item.disabled"
111 :target="item.target" 111 :target="item.target"
112 rel="noopener" 112 rel="noopener"
113 :key="item.name" 113 :key="item.name"
114 :to="!item.href ? { name: item.name } : null" 114 :to="!item.href ? { name: item.name } : null"
115 :href="item.href" 115 :href="item.href"
116 > 116 >
117 <!-- <a :href="item.path"> --> 117 <!-- <a :href="item.path"> -->
118 <v-list-tile-action v-if="item.icon"> 118 <v-list-tile-action v-if="item.icon">
119 <img :src="item.icon" width="22" alt="icons" /> 119 <img :src="item.icon" width="22" alt="icons" />
120 </v-list-tile-action> 120 </v-list-tile-action>
121 <v-list-tile-content class="pt-2"> 121 <v-list-tile-content class="pt-2">
122 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 122 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
123 </v-list-tile-content> 123 </v-list-tile-content>
124 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> 124 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
125 <v-list-tile-action v-if="item.subAction"> 125 <v-list-tile-action v-if="item.subAction">
126 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> 126 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
127 <!-- <img :src="item.icon" width="40" alt="icons" /> --> 127 <!-- <img :src="item.icon" width="40" alt="icons" /> -->
128 </v-list-tile-action> 128 </v-list-tile-action>
129 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> 129 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
130 <!-- </a> --> 130 <!-- </a> -->
131 </v-list-tile> 131 </v-list-tile>
132 </template> 132 </template>
133 <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'">
134 <!-- {{menus}} -->
135 <!--group with subitems-->
136 <v-list-group
137 v-if="item.items"
138 :key="item.name"
139 :group="item.group"
140 no-action="no-action"
141 >
142 <v-list-tile slot="activator" ripple="ripple">
143 <v-list-tile-action v-if="item.icon">
144 <img :src="item.icon" width="22" alt="icons" />
145 </v-list-tile-action>
146 <v-list-tile-content>
147 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
148 </v-list-tile-content>
149 </v-list-tile>
150 <template v-for="(subItem, i) in item.items">
151 <!--sub group-->
152 <v-list-group
153 v-if="subItem.items"
154 :key="subItem.name"
155 :group="subItem.group"
156 sub-group="sub-group"
157 >
158 <v-list-tile slot="activator" ripple="ripple">
159 <v-list-tile-content>
160 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
161 </v-list-tile-content>
162 </v-list-tile>
163 <v-list-tile
164 v-for="(grand, i) in subItem.children"
165 :key="i"
166 :to="genChildTarget(item, grand)"
167 :href="grand.href"
168 ripple="ripple"
169 >
170 <v-list-tile-content>
171 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
172 </v-list-tile-content>
173 </v-list-tile>
174 </v-list-group>
175 <!--child item-->
176 <v-list-tile
177 v-else
178 :key="i"
179 :to="genChildTarget(item, subItem)"
180 :href="subItem.href"
181 :disabled="subItem.disabled"
182 :target="subItem.target"
183 ripple="ripple"
184 >
185 <v-list-tile-action v-if="subItem.action">
186 <img
187 width="30"
188 :src="subItem.action"
189 :class="[subItem.actionClass || 'success--text']"
190 />
191 </v-list-tile-action>
192 <v-list-tile-content>
193 <v-list-tile-title class="body-2">
194 <span>{{ subItem.title }}</span>
195 </v-list-tile-title>
196 </v-list-tile-content>
197 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
198 </v-list-tile>
199 </template>
200 </v-list-group>
201 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
202 <v-divider v-else-if="item.divider" :key="i"></v-divider>
203 <!--top-level link-->
204 <v-list-tile
205 v-else
206 ripple="ripple"
207 :disabled="item.disabled"
208 :target="item.target"
209 rel="noopener"
210 :key="item.name"
211 :to="!item.href ? { name: item.name } : null"
212 :href="item.href"
213 >
214 <!-- <a :href="item.path"> -->
215 <v-list-tile-action v-if="item.icon">
216 <img :src="item.icon" width="22" alt="icons" />
217 </v-list-tile-action>
218 <v-list-tile-content class="pt-2">
219 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
220 </v-list-tile-content>
221 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
222 <v-list-tile-action v-if="item.subAction">
223 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
224 <!-- <img :src="item.icon" width="40" alt="icons" /> -->
225 </v-list-tile-action>
226 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
227 <!-- </a> -->
228 </v-list-tile>
229 </template>
230 <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'">
231 <!-- {{menus}} -->
232 <!--group with subitems-->
233 <v-list-group
234 v-if="item.items"
235 :key="item.name"
236 :group="item.group"
237 no-action="no-action"
238 >
239 <v-list-tile slot="activator" ripple="ripple">
240 <v-list-tile-action v-if="item.icon">
241 <img :src="item.icon" width="22" alt="icons" />
242 </v-list-tile-action>
243 <v-list-tile-content>
244 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
245 </v-list-tile-content>
246 </v-list-tile>
247 <template v-for="(subItem, i) in item.items">
248 <!--sub group-->
249 <v-list-group
250 v-if="subItem.items"
251 :key="subItem.name"
252 :group="subItem.group"
253 sub-group="sub-group"
254 >
255 <v-list-tile slot="activator" ripple="ripple">
256 <v-list-tile-content>
257 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
258 </v-list-tile-content>
259 </v-list-tile>
260 <v-list-tile
261 v-for="(grand, i) in subItem.children"
262 :key="i"
263 :to="genChildTarget(item, grand)"
264 :href="grand.href"
265 ripple="ripple"
266 >
267 <v-list-tile-content>
268 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
269 </v-list-tile-content>
270 </v-list-tile>
271 </v-list-group>
272 <!--child item-->
273 <v-list-tile
274 v-else
275 :key="i"
276 :to="genChildTarget(item, subItem)"
277 :href="subItem.href"
278 :disabled="subItem.disabled"
279 :target="subItem.target"
280 ripple="ripple"
281 >
282 <v-list-tile-action v-if="subItem.action">
283 <img
284 width="30"
285 :src="subItem.action"
286 :class="[subItem.actionClass || 'success--text']"
287 />
288 </v-list-tile-action>
289 <v-list-tile-content>
290 <v-list-tile-title class="body-2">
291 <span>{{ subItem.title }}</span>
292 </v-list-tile-title>
293 </v-list-tile-content>
294 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
295 </v-list-tile>
296 </template>
297 </v-list-group>
298 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
299 <v-divider v-else-if="item.divider" :key="i"></v-divider>
300 <!--top-level link-->
301 <v-list-tile
302 v-else
303 ripple="ripple"
304 :disabled="item.disabled"
305 :target="item.target"
306 rel="noopener"
307 :key="item.name"
308 :to="!item.href ? { name: item.name } : null"
309 :href="item.href"
310 >
311 <!-- <a :href="item.path"> -->
312 <v-list-tile-action v-if="item.icon">
313 <img :src="item.icon" width="22" alt="icons" />
314 </v-list-tile-action>
315 <v-list-tile-content class="pt-2">
316 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
317 </v-list-tile-content>
318 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
319 <v-list-tile-action v-if="item.subAction">
320 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
321 <!-- <img :src="item.icon" width="40" alt="icons" /> -->
322 </v-list-tile-action>
323 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
324 <!-- </a> -->
325 </v-list-tile>
326 </template>
133 <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'"> 327 <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'">
134 <!-- {{menus}} --> 328 <!-- {{menus}} -->
135 <!--group with subitems--> 329 <!--group with subitems-->
136 <v-list-group 330 <v-list-group
137 v-if="item.items" 331 v-if="item.items"
138 :key="item.name" 332 :key="item.name"
139 :group="item.group" 333 :group="item.group"
140 no-action="no-action" 334 no-action="no-action"
141 > 335 >
142 <v-list-tile slot="activator" ripple="ripple"> 336 <v-list-tile slot="activator" ripple="ripple">
143 <v-list-tile-action v-if="item.icon"> 337 <v-list-tile-action v-if="item.icon">
144 <img :src="item.icon" width="22" alt="icons" /> 338 <img :src="item.icon" width="22" alt="icons" />
145 </v-list-tile-action> 339 </v-list-tile-action>
146 <v-list-tile-content> 340 <v-list-tile-content>
147 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 341 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
148 </v-list-tile-content> 342 </v-list-tile-content>
149 </v-list-tile> 343 </v-list-tile>
150 <template v-for="(subItem, i) in item.items"> 344 <template v-for="(subItem, i) in item.items">
151 <!--sub group--> 345 <!--sub group-->
152 <v-list-group 346 <v-list-group
153 v-if="subItem.items" 347 v-if="subItem.items"
154 :key="subItem.name" 348 :key="subItem.name"
155 :group="subItem.group" 349 :group="subItem.group"
156 sub-group="sub-group" 350 sub-group="sub-group"
157 > 351 >
158 <v-list-tile slot="activator" ripple="ripple"> 352 <v-list-tile slot="activator" ripple="ripple">
159 <v-list-tile-content> 353 <v-list-tile-content>
160 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> 354 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
161 </v-list-tile-content> 355 </v-list-tile-content>
162 </v-list-tile> 356 </v-list-tile>
163 <v-list-tile 357 <v-list-tile
164 v-for="(grand, i) in subItem.children" 358 v-for="(grand, i) in subItem.children"
165 :key="i" 359 :key="i"
166 :to="genChildTarget(item, grand)" 360 :to="genChildTarget(item, grand)"
167 :href="grand.href" 361 :href="grand.href"
168 ripple="ripple" 362 ripple="ripple"
169 > 363 >
170 <v-list-tile-content> 364 <v-list-tile-content>
171 <v-list-tile-title>{{ grand.title }}</v-list-tile-title> 365 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
172 </v-list-tile-content> 366 </v-list-tile-content>
173 </v-list-tile> 367 </v-list-tile>
174 </v-list-group> 368 </v-list-group>
175 <!--child item--> 369 <!--child item-->
176 <v-list-tile 370 <v-list-tile
177 v-else 371 v-else
178 :key="i" 372 :key="i"
179 :to="genChildTarget(item, subItem)" 373 :to="genChildTarget(item, subItem)"
180 :href="subItem.href" 374 :href="subItem.href"
181 :disabled="subItem.disabled" 375 :disabled="subItem.disabled"
182 :target="subItem.target" 376 :target="subItem.target"
183 ripple="ripple" 377 ripple="ripple"
184 > 378 >
185 <v-list-tile-action v-if="subItem.action"> 379 <v-list-tile-action v-if="subItem.action">
186 <img 380 <img
187 width="30" 381 width="30"
188 :src="subItem.action" 382 :src="subItem.action"
189 :class="[subItem.actionClass || 'success--text']" 383 :class="[subItem.actionClass || 'success--text']"
190 /> 384 />
191 </v-list-tile-action> 385 </v-list-tile-action>
192 <v-list-tile-content> 386 <v-list-tile-content>
193 <v-list-tile-title class="body-2"> 387 <v-list-tile-title class="body-2">
194 <span>{{ subItem.title }}</span> 388 <span>{{ subItem.title }}</span>
195 </v-list-tile-title> 389 </v-list-tile-title>
196 </v-list-tile-content> 390 </v-list-tile-content>
197 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> 391 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
198 </v-list-tile> 392 </v-list-tile>
199 </template> 393 </template>
200 </v-list-group> 394 </v-list-group>
201 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> 395 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
202 <v-divider v-else-if="item.divider" :key="i"></v-divider> 396 <v-divider v-else-if="item.divider" :key="i"></v-divider>
203 <!--top-level link--> 397 <!--top-level link-->
204 <v-list-tile 398 <v-list-tile
205 v-else 399 v-else
206 ripple="ripple" 400 ripple="ripple"
207 :disabled="item.disabled" 401 :disabled="item.disabled"
208 :target="item.target" 402 :target="item.target"
209 rel="noopener" 403 rel="noopener"
210 :key="item.name" 404 :key="item.name"
211 :to="!item.href ? { name: item.name } : null" 405 :to="!item.href ? { name: item.name } : null"
212 :href="item.href" 406 :href="item.href"
213 > 407 >
214 <!-- <a :href="item.path"> --> 408 <!-- <a :href="item.path"> -->
215 <v-list-tile-action v-if="item.icon"> 409 <v-list-tile-action v-if="item.icon">
216 <img :src="item.icon" width="22" alt="icons" /> 410 <img :src="item.icon" width="22" alt="icons" />
217 </v-list-tile-action> 411 </v-list-tile-action>
218 <v-list-tile-content class="pt-2"> 412 <v-list-tile-content class="pt-2">
219 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 413 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
220 </v-list-tile-content> 414 </v-list-tile-content>
221 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> 415 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
222 <v-list-tile-action v-if="item.subAction"> 416 <v-list-tile-action v-if="item.subAction">
223 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> 417 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
224 <!-- <img :src="item.icon" width="40" alt="icons" /> --> 418 <!-- <img :src="item.icon" width="40" alt="icons" /> -->
225 </v-list-tile-action> 419 </v-list-tile-action>
226 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> 420 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
227 <!-- </a> --> 421 <!-- </a> -->
228 </v-list-tile> 422 </v-list-tile>
229 </template> 423 </template>
230 <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'"> 424 <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'">
231 <!-- {{menus}} --> 425 <!-- {{menus}} -->
232 <!--group with subitems--> 426 <!--group with subitems-->
233 <v-list-group 427 <v-list-group
234 v-if="item.items" 428 v-if="item.items"
235 :key="item.name" 429 :key="item.name"
236 :group="item.group" 430 :group="item.group"
237 no-action="no-action" 431 no-action="no-action"
238 > 432 >
239 <v-list-tile slot="activator" ripple="ripple"> 433 <v-list-tile slot="activator" ripple="ripple">
240 <v-list-tile-action v-if="item.icon"> 434 <v-list-tile-action v-if="item.icon">
241 <img :src="item.icon" width="22" alt="icons" /> 435 <img :src="item.icon" width="22" alt="icons" />
242 </v-list-tile-action> 436 </v-list-tile-action>
243 <v-list-tile-content> 437 <v-list-tile-content>
244 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 438 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
245 </v-list-tile-content> 439 </v-list-tile-content>
246 </v-list-tile> 440 </v-list-tile>
247 <template v-for="(subItem, i) in item.items"> 441 <template v-for="(subItem, i) in item.items">
248 <!--sub group--> 442 <!--sub group-->
249 <v-list-group 443 <v-list-group
250 v-if="subItem.items" 444 v-if="subItem.items"
251 :key="subItem.name" 445 :key="subItem.name"
252 :group="subItem.group" 446 :group="subItem.group"
253 sub-group="sub-group" 447 sub-group="sub-group"
254 > 448 >
255 <v-list-tile slot="activator" ripple="ripple"> 449 <v-list-tile slot="activator" ripple="ripple">
256 <v-list-tile-content> 450 <v-list-tile-content>
257 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> 451 <v-list-tile-title>{{ subItem.title }}</v-list-tile-title>
258 </v-list-tile-content> 452 </v-list-tile-content>
259 </v-list-tile> 453 </v-list-tile>
260 <v-list-tile 454 <v-list-tile
261 v-for="(grand, i) in subItem.children" 455 v-for="(grand, i) in subItem.children"
262 :key="i" 456 :key="i"
263 :to="genChildTarget(item, grand)" 457 :to="genChildTarget(item, grand)"
264 :href="grand.href" 458 :href="grand.href"
265 ripple="ripple" 459 ripple="ripple"
266 > 460 >
267 <v-list-tile-content> 461 <v-list-tile-content>
268 <v-list-tile-title>{{ grand.title }}</v-list-tile-title> 462 <v-list-tile-title>{{ grand.title }}</v-list-tile-title>
269 </v-list-tile-content> 463 </v-list-tile-content>
270 </v-list-tile> 464 </v-list-tile>
271 </v-list-group> 465 </v-list-group>
272 <!--child item--> 466 <!--child item-->
273 <v-list-tile 467 <v-list-tile
274 v-else 468 v-else
275 :key="i" 469 :key="i"
276 :to="genChildTarget(item, subItem)" 470 :to="genChildTarget(item, subItem)"
277 :href="subItem.href" 471 :href="subItem.href"
278 :disabled="subItem.disabled" 472 :disabled="subItem.disabled"
279 :target="subItem.target" 473 :target="subItem.target"
280 ripple="ripple" 474 ripple="ripple"
281 > 475 >
282 <v-list-tile-action v-if="subItem.action"> 476 <v-list-tile-action v-if="subItem.action">
283 <img 477 <img
284 width="30" 478 width="30"
285 :src="subItem.action" 479 :src="subItem.action"
286 :class="[subItem.actionClass || 'success--text']" 480 :class="[subItem.actionClass || 'success--text']"
287 /> 481 />
288 </v-list-tile-action> 482 </v-list-tile-action>
289 <v-list-tile-content> 483 <v-list-tile-content>
290 <v-list-tile-title class="body-2"> 484 <v-list-tile-title class="body-2">
291 <span>{{ subItem.title }}</span> 485 <span>{{ subItem.title }}</span>
292 </v-list-tile-title> 486 </v-list-tile-title>
293 </v-list-tile-content> 487 </v-list-tile-content>
294 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> 488 <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> -->
295 </v-list-tile> 489 </v-list-tile>
296 </template> 490 </template>
297 </v-list-group> 491 </v-list-group>
298 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> 492 <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader>
299 <v-divider v-else-if="item.divider" :key="i"></v-divider> 493 <v-divider v-else-if="item.divider" :key="i"></v-divider>
300 <!--top-level link--> 494 <!--top-level link-->
301 <v-list-tile 495 <v-list-tile
302 v-else 496 v-else
303 ripple="ripple" 497 ripple="ripple"
304 :disabled="item.disabled" 498 :disabled="item.disabled"
305 :target="item.target" 499 :target="item.target"
306 rel="noopener" 500 rel="noopener"
307 :key="item.name" 501 :key="item.name"
308 :to="!item.href ? { name: item.name } : null" 502 :to="!item.href ? { name: item.name } : null"
309 :href="item.href" 503 :href="item.href"
310 > 504 >
311 <!-- <a :href="item.path"> --> 505 <!-- <a :href="item.path"> -->
312 <v-list-tile-action v-if="item.icon"> 506 <v-list-tile-action v-if="item.icon">
313 <img :src="item.icon" width="22" alt="icons" /> 507 <img :src="item.icon" width="22" alt="icons" />
314 </v-list-tile-action> 508 </v-list-tile-action>
315 <v-list-tile-content class="pt-2"> 509 <v-list-tile-content class="pt-2">
316 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 510 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
317 </v-list-tile-content> 511 </v-list-tile-content>
318 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> 512 <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> -->
319 <v-list-tile-action v-if="item.subAction"> 513 <v-list-tile-action v-if="item.subAction">
320 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> 514 <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> -->
321 <!-- <img :src="item.icon" width="40" alt="icons" /> --> 515 <!-- <img :src="item.icon" width="40" alt="icons" /> -->
322 </v-list-tile-action> 516 </v-list-tile-action>
323 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> 517 <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> -->
324 <!-- </a> --> 518 <!-- </a> -->
325 </v-list-tile> 519 </v-list-tile>
326 </template> 520 </template>
327 </v-list> 521 </v-list>
328 </vue-perfect-scrollbar> 522 </vue-perfect-scrollbar>
329 </v-navigation-drawer> 523 </v-navigation-drawer>
330 </template> 524 </template>
331 <script> 525 <script>
332 import menu from "@/api/menu"; 526 import menu from "@/api/menu";
333 import VuePerfectScrollbar from "vue-perfect-scrollbar"; 527 import VuePerfectScrollbar from "vue-perfect-scrollbar";
334 export default { 528 export default {
335 name: "app-drawer", 529 name: "app-drawer",
336 components: { 530 components: {
337 VuePerfectScrollbar 531 VuePerfectScrollbar
338 }, 532 },
339 props: { 533 props: {
340 expanded: { 534 expanded: {
341 type: Boolean, 535 type: Boolean,
342 default: true 536 default: true
343 } 537 }
344 }, 538 },
345 data: () => ({ 539 data: () => ({
346 mini: false, 540 mini: false,
347 drawer: true, 541 drawer: true,
348 menus: [], 542 menus: [],
349 menuSchool: [], 543 menuSchool: [],
350 menuTeacher: [], 544 menuTeacher: [],
545 menuAccount: [],
546 menuLibrarian: [],
351 schoolRole: "", 547 schoolRole: "",
352 role: "", 548 role: "",
353 scrollSettings: { 549 scrollSettings: {
354 maxScrollbarLength: 160 550 maxScrollbarLength: 160
355 } 551 }
356 }), 552 }),
357 computed: { 553 computed: {
358 computeGroupActive() { 554 computeGroupActive() {
359 return true; 555 return true;
360 }, 556 },
361 computeLogo() { 557 computeLogo() {
362 return "/static/icon.png"; 558 return "/static/icon.png";
363 }, 559 },
364 560
365 sideToolbarColor() { 561 sideToolbarColor() {
366 return this.$vuetify.options.extra.sideNav; 562 return this.$vuetify.options.extra.sideNav;
367 } 563 }
368 }, 564 },
369 created() { 565 created() {
370 this.schoolRole = this.$store.state.schoolRole; 566 this.schoolRole = this.$store.state.schoolRole;
371 this.role = this.$store.state.role; 567 this.role = this.$store.state.role;
372 this.menus = menu.adminMenu; 568 this.menus = menu.adminMenu;
373 this.menuSchool = menu.schoolMenu; 569 this.menuSchool = menu.schoolMenu;
374 this.menuTeacher = menu.teacherMenu; 570 this.menuTeacher = menu.teacherMenu;
571 this.menuAccount = menu.accountMenu;
572 this.menuLibrarian = menu.libraryMenu
375 // console.log("this.$route.name", this.$route.name); 573 // console.log("this.$route.name", this.$route.name);
376 // if (this.$route.name === "School") { 574 // if (this.$route.name === "School") {
377 // localStorage.setItem("SchoolName", this.$route.name); 575 // localStorage.setItem("SchoolName", this.$route.name);
378 // } 576 // }
379 // if (this.$route.name === "Dashboard") { 577 // if (this.$route.name === "Dashboard") {
380 // localStorage.setItem("AdminName", this.$route.name); 578 // localStorage.setItem("AdminName", this.$route.name);
381 // } 579 // }
382 // console.log("SN", localStorage.getItem("SchoolName")); 580 // console.log("SN", localStorage.getItem("SchoolName"));
383 // if (localStorage.getItem("SchoolName") === "School") { 581 // if (localStorage.getItem("SchoolName") === "School") {
384 // if (this.$store.state.schoolRole === "SUPERADMIN") { 582 // if (this.$store.state.schoolRole === "SUPERADMIN") {
385 // console.log("rolA", this.$store.state.schoolRole); 583 // console.log("rolA", this.$store.state.schoolRole);
386 // if (this.$store.state.schoolRole === "SUPERADMIN") { 584 // if (this.$store.state.schoolRole === "SUPERADMIN") {
387 // } 585 // }
388 // console.log("this.menus", this.menus); 586 // console.log("this.menus", this.menus);
389 // } 587 // }
390 // // } 588 // // }
391 // // console.log("AN", localStorage.getItem("AdminName")); 589 // // console.log("AN", localStorage.getItem("AdminName"));
392 // // if (localStorage.getItem("AdminName") === "Dashboard") { 590 // // if (localStorage.getItem("AdminName") === "Dashboard") {
393 // if (this.$store.state.role === "ADMIN") { 591 // if (this.$store.state.role === "ADMIN") {
394 // console.log("role", this.$store.state.role); 592 // console.log("role", this.$store.state.role);
395 // else if (this.$store.state.role === "ADMIN") { 593 // else if (this.$store.state.role === "ADMIN") {
396 // } 594 // }
397 // // } 595 // // }
398 // } 596 // }
399 597
400 // else if (this.$store.state.role === "LIBRARIAN") { 598 // else if (this.$store.state.role === "LIBRARIAN") {
401 // this.menus = menu.libraryMenu; 599 // this.menus = menu.libraryMenu;
402 // } else if (this.$store.state.role === "ACCOUNTANT") { 600 // } else if (this.$store.state.role === "ACCOUNTANT") {
403 // this.menus = menu.accountMenu; 601 // this.menus = menu.accountMenu;
404 // } 602 // }
405 window.getApp.$on("APP_DRAWER_TOGGLED", () => { 603 window.getApp.$on("APP_DRAWER_TOGGLED", () => {
406 this.drawer = !this.drawer; 604 this.drawer = !this.drawer;
407 }); 605 });
408 }, 606 },
409 methods: { 607 methods: {
410 genChildTarget(item, subItem) { 608 genChildTarget(item, subItem) {
411 if (subItem.href) return; 609 if (subItem.href) return;
412 if (subItem.component) { 610 if (subItem.component) {
413 return { 611 return {
414 name: subItem.component 612 name: subItem.component
415 }; 613 };
416 } 614 }
417 return { name: `${item.group}/${subItem.name}` }; 615 return { name: `${item.group}/${subItem.name}` };
418 } 616 }
419 }, 617 },
420 mounted() { 618 mounted() {
421 if (this.$store.state.role === "ADMIN") { 619 if (this.$store.state.role === "ADMIN") {
422 this.token = this.$store.state.token; 620 this.token = this.$store.state.token;
423 } if (this.$store.state.schoolRole === "SUPERADMIN") { 621 } if (this.$store.state.schoolRole === "SUPERADMIN") {
424 this.token = this.$store.schoolToken; 622 this.token = this.$store.schoolToken;
425 } if (this.$store.state.role === "TEACHER") { 623 } if (this.$store.state.role === "TEACHER") {
426 this.token = this.$store.state.token; 624 this.token = this.$store.state.token;
427 // console.log("token",this.token); 625 }if (this.$store.state.role === "ACCOUNTANT") {
626 this.token = this.$store.state.token;
627 }if (this.$store.state.role === "LIBRARIAN") {
628 this.token = this.$store.state.token;
428 } 629 }
429 } 630 }
430 }; 631 };
431 </script> 632 </script>
432 633
433 634
434 <style lang="stylus"> 635 <style lang="stylus">
435 // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; 636 // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl';
436 #appDrawer { 637 #appDrawer {
437 overflow: hidden; 638 overflow: hidden;
438 639
439 .drawer-menu--scroll { 640 .drawer-menu--scroll {
440 height: calc(100vh - 48px); 641 height: calc(100vh - 48px);
441 overflow: auto; 642 overflow: auto;
442 } 643 }
443 } 644 }
444 645
445 .v-list__group__items--no-action .v-list__tile { 646 .v-list__group__items--no-action .v-list__tile {
446 padding-left: 72px !important; 647 padding-left: 72px !important;
447 } 648 }
448 649
449 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { 650 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
450 height: 54px; 651 height: 54px;
451 font-size: 17px; 652 font-size: 17px;
452 } 653 }
453 654
454 .v-list__tile__action { 655 .v-list__tile__action {
455 min-width: 36px; 656 min-width: 36px;
456 } 657 }
457 658
458 // .theme--light .v-icon, .application .theme--light.v-icon { 659 // .theme--light .v-icon, .application .theme--light.v-icon {
459 // color: #f1f1f1; 660 // color: #f1f1f1;
460 // } 661 // }
461 .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y { 662 .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y {
462 background-color: #f5f5f5; 663 background-color: #f5f5f5;
463 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148))); 664 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
464 width: 8px !important; 665 width: 8px !important;
465 } 666 }
466 667
467 .ps>.ps__scrollbar-y-rail { 668 .ps>.ps__scrollbar-y-rail {
468 width: 0px !important; 669 width: 0px !important;
469 } 670 }
470 671
471 .ps:hover > .ps__scrollbar-y-rail:hover { 672 .ps:hover > .ps__scrollbar-y-rail:hover {
472 background-color: #5f2171 !important; 673 background-color: #5f2171 !important;
473 opacity: 0.9; 674 opacity: 0.9;
474 } 675 }
475 676
476 .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { 677 .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y {
477 width: 8px !important; 678 width: 8px !important;
478 background-color: #f5f5f5; 679 background-color: #f5f5f5;
479 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148))); 680 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
480 } 681 }
481 682
482 .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { 683 .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y {
483 // background-color: #5f2171 !important; 684 // background-color: #5f2171 !important;
484 width: 8px !important; 685 width: 8px !important;
485 background-color: #f5f5f5; 686 background-color: #f5f5f5;
486 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148))); 687 background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.44, rgb(122, 153, 217)), color-stop(0.72, rgb(73, 125, 189)), color-stop(0.86, rgb(28, 58, 148)));
487 } 688 }
488 689
489 .v-list__tile--active { 690 .v-list__tile--active {
490 color: #71d9ea !important; 691 color: #71d9ea !important;
491 } 692 }
492 693
493 .my-1 { 694 .my-1 {
494 text-align: left !important; 695 text-align: left !important;
495 } 696 }
496 697
497 .title { 698 .title {
498 line-height: 2 !important; 699 line-height: 2 !important;
499 } 700 }
500 701
501 // .v-list__tile--hover { 702 // .v-list__tile--hover {
502 // color: white !important; 703 // color: white !important;
503 // background: red !important; 704 // background: red !important;
504 // } 705 // }
505 .v-list .v-list__tile--link:hover, .v-list .v-list__tile--highlighted, .v-list .v-list__group__header:hover, .v-list .v-list__group--active:before, .v-list .v-list__group--active:after { 706 .v-list .v-list__tile--link:hover, .v-list .v-list__tile--highlighted, .v-list .v-list__group__header:hover, .v-list .v-list__group--active:before, .v-list .v-list__group--active:after {
506 background: #7f62f8 !important; 707 background: #7f62f8 !important;
507 color: #71d9ea !important; 708 color: #71d9ea !important;
508 box-shadow: 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12) !important; 709 box-shadow: 0 3px 3px -2px rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12) !important;
509 // border-radius: 12px !important; 710 // border-radius: 12px !important;
510 } 711 }
511 712
512 @media screen and (max-width: 420px) { 713 @media screen and (max-width: 420px) {
513 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { 714 .v-list--dense .v-list__tile:not(.v-list__tile--avatar) {
514 font-size: 14px; 715 font-size: 14px;
515 } 716 }
516 717
517 .imgLogo { 718 .imgLogo {
518 height: 32px; 719 height: 32px;
519 width: 120px; 720 width: 120px;
520 } 721 }
521 } 722 }
522 </style> 723 </style>
523 724
524 725
525 <style scoped> 726 <style scoped>
526 .theme--light .v-icon, 727 .theme--light .v-icon,
527 .application .theme--light.v-icon { 728 .application .theme--light.v-icon {
528 color: #39b982; 729 color: #39b982;
529 } 730 }
530 .side-bar-color { 731 .side-bar-color {
531 background: #827bfa !important; 732 background: #827bfa !important;
532 border-top-right-radius: 74px !important; 733 border-top-right-radius: 74px !important;
533 } 734 }
534 /* a { 735 /* a {
535 text-decoration: none; 736 text-decoration: none;
536 display: inherit; 737 display: inherit;
537 color: black; 738 color: black;
538 } */ 739 } */
539 .hover:hover { 740 .hover:hover {
540 color: red !important; 741 color: red !important;
541 background: red !important; 742 background: red !important;
542 } 743 }
543 /* a:active { 744 /* a:active {
544 color: red !important; 745 color: red !important;
545 } */ 746 } */
546 /* a:visited { 747 /* a:visited {
547 border-left: 4px solid black; 748 border-left: 4px solid black;
548 border-radius: 4px; 749 border-radius: 4px;
549 } */ 750 } */
550 /* visited link */ 751 /* visited link */
551 /* a:visited { 752 /* a:visited {
552 color: black !important; 753 color: black !important;
553 border-left: 4px solid black; 754 border-left: 4px solid black;
554 border-radius: 4px; 755 border-radius: 4px;
555 } 756 }
556 a:active { 757 a:active {
557 color: black !important; 758 color: black !important;
558 border-left: 4px solid black; 759 border-left: 4px solid black;
559 border-radius: 4px; 760 border-radius: 4px;
560 } */ 761 } */
561 </style> 762 </style>
562 763
563 764
564 765
1 export default [{ 1 export default [{
2 name: 'APP_LOGIN_SUCCESS', 2 name: 'APP_LOGIN_SUCCESS',
3 callback: function(e) { 3 callback: function(e) {
4 this.$router.push({ path: 'dashboard' }); 4 this.$router.push({ path: 'dashboard' });
5 } 5 }
6 }, 6 },
7 { 7 {
8 name: 'APP_LOGOUT', 8 name: 'APP_LOGOUT',
9 callback: function(e) { 9 callback: function(e) {
10 this.snackbar = { 10 this.snackbar = {
11 show: true, 11 show: true,
12 color: 'green', 12 color: 'green',
13 text: 'Logout successfully.' 13 text: 'Logout successfully.'
14 }; 14 };
15 // console.log("roteeeeeeeeeeeeeee", this.$store.state.isUserLoggedIn) 15 // console.log("roteeeeeeeeeeeeeee", this.$store.state.isUserLoggedIn)
16 if (this.$store.state.role === "ADMIN") { 16 if (this.$store.state.role === "ADMIN") {
17 this.$store.dispatch('setToken', null) 17 this.$store.dispatch('setToken', null)
18 this.$store.dispatch('Id', null) 18 this.$store.dispatch('Id', null)
19 this.$store.dispatch('Role', null) 19 this.$store.dispatch('Role', null)
20 this.$store.dispatch('setSchoolToken', null) 20 this.$store.dispatch('setSchoolToken', null)
21 this.$store.dispatch('setSchoolRole', null) 21 this.$store.dispatch('setSchoolRole', null)
22 this.$router.replace({ path: '/' }); 22 this.$router.replace({ path: '/' });
23 } else if (this.$store.state.schoolRole === "SUPERADMIN") { 23 } else if (this.$store.state.schoolRole === "SUPERADMIN") {
24 this.$store.dispatch('setSchoolToken', null) 24 this.$store.dispatch('setSchoolToken', null)
25 this.$store.dispatch('setSchoolRole', null) 25 this.$store.dispatch('setSchoolRole', null)
26 this.$router.replace({ path: '/' }); 26 this.$router.replace({ path: '/' });
27 } else if (this.$store.state.role === "TEACHER") { 27 } else if (this.$store.state.role === "TEACHER") {
28 this.$store.dispatch('setToken', null) 28 this.$store.dispatch('setToken', null)
29 this.$store.dispatch('Id', null) 29 this.$store.dispatch('Id', null)
30 this.$store.dispatch('Role', null) 30 this.$store.dispatch('Role', null)
31 this.$store.dispatch('setSchoolToken', null) 31 this.$store.dispatch('setSchoolToken', null)
32 this.$store.dispatch('setSchoolRole', null) 32 this.$store.dispatch('setSchoolRole', null)
33 this.$router.replace({ path: '/' }); 33 this.$router.replace({ path: '/' });
34 } else if (this.$store.state.role === "ACCOUNTANT") {
35 this.$store.dispatch('setToken', null)
36 this.$store.dispatch('Id', null)
37 this.$store.dispatch('Role', null)
38 this.$store.dispatch('setSchoolToken', null)
39 this.$store.dispatch('setSchoolRole', null)
40 this.$router.replace({ path: '/' });
41 } else if (this.$store.state.role === "LIBRARIAN") {
42 this.$store.dispatch('setToken', null)
43 this.$store.dispatch('Id', null)
44 this.$store.dispatch('Role', null)
45 this.$store.dispatch('setSchoolToken', null)
46 this.$store.dispatch('setSchoolRole', null)
47 this.$router.replace({ path: '/' });
34 } 48 }
35 } 49 }
36 }, 50 },
37 { 51 {
38 name: 'APP_CHANGE', 52 name: 'APP_CHANGE',
39 callback: function(e) { 53 callback: function(e) {
40 this.snackbar = { 54 this.snackbar = {
41 show: true, 55 show: true,
42 color: 'green', 56 color: 'green',
43 text: 'Logout successfully.' 57 text: 'Logout successfully.'
44 }; 58 };
45 this.$router.replace({ 59 this.$router.replace({
46 path: '/' 60 path: '/'
47 }); 61 });
48 } 62 }
49 }, 63 },
50 { 64 {
51 name: 'APP_PAGE_LOADED', 65 name: 'APP_PAGE_LOADED',
52 callback: function(e) {} 66 callback: function(e) {}
53 }, 67 },
54 { 68 {
55 name: 'APP_AUTH_FAILED', 69 name: 'APP_AUTH_FAILED',
56 callback: function(e) { 70 callback: function(e) {
57 this.$router.push('/login'); 71 this.$router.push('/login');
58 this.$message.error('Token has expired'); 72 this.$message.error('Token has expired');
59 } 73 }
60 }, 74 },
61 { 75 {
62 name: 'APP_BAD_REQUEST', 76 name: 'APP_BAD_REQUEST',
63 // @error api response data 77 // @error api response data
64 callback: function(msg) { 78 callback: function(msg) {
65 this.$message.error(msg); 79 this.$message.error(msg);
66 } 80 }
67 }, 81 },
68 { 82 {
69 name: 'APP_ACCESS_DENIED', 83 name: 'APP_ACCESS_DENIED',
70 // @error api response data 84 // @error api response data
71 callback: function(msg) { 85 callback: function(msg) {
72 this.$message.error(msg); 86 this.$message.error(msg);
73 this.$router.push('/forbidden'); 87 this.$router.push('/forbidden');
74 } 88 }
75 }, 89 },
76 { 90 {
77 name: 'APP_RESOURCE_DELETED', 91 name: 'APP_RESOURCE_DELETED',
78 // @error api response data 92 // @error api response data
79 callback: function(msg) { 93 callback: function(msg) {
80 this.$message.success(msg); 94 this.$message.success(msg);
81 } 95 }
82 }, 96 },
83 { 97 {
84 name: 'APP_RESOURCE_UPDATED', 98 name: 'APP_RESOURCE_UPDATED',
85 // @error api response data 99 // @error api response data
86 callback: function(msg) { 100 callback: function(msg) {
87 this.$message.success(msg); 101 this.$message.success(msg);
88 } 102 }
89 }, 103 },
90 104
91 ]; 105 ];
src/pages/Account/feeTypes.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- ****** EDIT SECTION ****** --> 3 <!-- ****** EDIT SECTION ****** -->
4 <v-dialog v-model="editFeeTypeDialog" max-width="600px"> 4 <v-dialog v-model="editFeeTypeDialog" max-width="600px">
5 <v-card flat class="card-style pa-2" dark> 5 <v-card flat 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 Fee Type</label> 8 <label class="title text-xs-center">Edit Fee Type</label>
9 <v-icon size="24" class="right" @click="editFeeTypeDialog = false">cancel</v-icon> 9 <v-icon size="24" class="right" @click="editFeeTypeDialog = false">cancel</v-icon>
10 </v-flex> 10 </v-flex>
11 </v-layout> 11 </v-layout>
12 <v-container fluid> 12 <v-container fluid>
13 <v-layout wrap justify-center> 13 <v-layout wrap justify-center>
14 <v-flex xs12 sm11> 14 <v-flex xs12 sm11>
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">Fee Type:</label> 17 <label class="right">Fee Type:</label>
18 </v-flex> 18 </v-flex>
19 <v-flex xs8> 19 <v-flex xs8>
20 <v-text-field 20 <v-text-field
21 class="ml-3" 21 class="ml-3"
22 v-model="editedItem.feeType" 22 v-model="editedItem.feeType"
23 placeholder="fill your Fee Type" 23 placeholder="fill your Fee Type"
24 required 24 required
25 ></v-text-field> 25 ></v-text-field>
26 </v-flex> 26 </v-flex>
27 </v-layout> 27 </v-layout>
28 <v-layout> 28 <v-layout>
29 <v-flex xs4 class="pt-4 subheading"> 29 <v-flex xs4 class="pt-4 subheading">
30 <label class="right">Note:</label> 30 <label class="right">Note:</label>
31 </v-flex> 31 </v-flex>
32 <v-flex xs8> 32 <v-flex xs8>
33 <v-textarea 33 <v-textarea
34 name="input-7-1" 34 name="input-7-1"
35 class="ml-3" 35 class="ml-3"
36 v-model="editedItem.note" 36 v-model="editedItem.note"
37 placeholder="fill your Note" 37 placeholder="fill your Note"
38 multi-line 38 multi-line
39 required 39 required
40 ></v-textarea> 40 ></v-textarea>
41 </v-flex> 41 </v-flex>
42 </v-layout> 42 </v-layout>
43 <v-card-actions class="hidden-xs-only hidden-sm-only "> 43 <v-card-actions class="hidden-xs-only hidden-sm-only ">
44 <v-spacer></v-spacer> 44 <v-spacer></v-spacer>
45 <v-btn round dark @click="save" class="add-button">Save</v-btn> 45 <v-btn round dark @click="save" class="add-button">Save</v-btn>
46 </v-card-actions> 46 </v-card-actions>
47 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> 47 <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only">
48 <v-spacer></v-spacer> 48 <v-spacer></v-spacer>
49 <v-btn round dark @click="save" class="add-button">Save</v-btn> 49 <v-btn round dark @click="save" class="add-button">Save</v-btn>
50 <v-spacer></v-spacer> 50 <v-spacer></v-spacer>
51 </v-card-actions> 51 </v-card-actions>
52 </v-flex> 52 </v-flex>
53 </v-layout> 53 </v-layout>
54 </v-container> 54 </v-container>
55 </v-card> 55 </v-card>
56 </v-dialog> 56 </v-dialog>
57 57
58 <!-- ****** PROFILE VIEW FEE TYPE DATA ****** --> 58 <!-- ****** PROFILE VIEW FEE TYPE DATA ****** -->
59 59
60 <v-dialog v-model="viewFeeTypeDialog" max-width="400px"> 60 <v-dialog v-model="viewFeeTypeDialog" max-width="400px">
61 <v-card flat class="card-style pa-3" dark> 61 <v-card flat class="card-style pa-3" dark>
62 <v-layout> 62 <v-layout>
63 <v-flex xs12> 63 <v-flex xs12>
64 <label class="title text-xs-center">View Fee Type</label> 64 <label class="title text-xs-center">View Fee Type</label>
65 <v-icon size="24" class="right" @click="viewFeeTypeDialog = false">cancel</v-icon> 65 <v-icon size="24" class="right" @click="viewFeeTypeDialog = false">cancel</v-icon>
66 </v-flex> 66 </v-flex>
67 </v-layout> 67 </v-layout>
68 <v-container grid-list-md> 68 <v-container grid-list-md>
69 <v-layout wrap> 69 <v-layout wrap>
70 <v-flex> 70 <v-flex>
71 <v-layout> 71 <v-layout>
72 <v-flex xs5 sm6> 72 <v-flex xs5 sm6>
73 <h5 class="right my-1"> 73 <h5 class="right my-1">
74 <b>Fee Type:</b> 74 <b>Fee Type:</b>
75 </h5> 75 </h5>
76 </v-flex> 76 </v-flex>
77 <v-flex sm6 xs8> 77 <v-flex sm6 xs8>
78 <h5 class="my-1">{{ editedItem.feeType }}</h5> 78 <h5 class="my-1">{{ editedItem.feeType }}</h5>
79 </v-flex> 79 </v-flex>
80 </v-layout> 80 </v-layout>
81 <v-layout> 81 <v-layout>
82 <v-flex xs5 sm6> 82 <v-flex xs5 sm6>
83 <h5 class="right my-1"> 83 <h5 class="right my-1">
84 <b>Note:</b> 84 <b>Note:</b>
85 </h5> 85 </h5>
86 </v-flex> 86 </v-flex>
87 <v-flex sm6 xs8> 87 <v-flex sm6 xs8>
88 <h5 class="my-1">{{ editedItem.note }}</h5> 88 <h5 class="my-1">{{ editedItem.note }}</h5>
89 </v-flex> 89 </v-flex>
90 </v-layout> 90 </v-layout>
91 </v-flex> 91 </v-flex>
92 </v-layout> 92 </v-layout>
93 </v-container> 93 </v-container>
94 </v-card> 94 </v-card>
95 </v-dialog> 95 </v-dialog>
96 96
97 <!-- ****** EXISTING-FEETYPE TABLE ****** --> 97 <!-- ****** EXISTING-FEETYPE TABLE ****** -->
98 <v-toolbar color="transparent" flat> 98 <v-toolbar color="transparent" flat>
99 <v-btn 99 <v-btn
100 fab 100 fab
101 dark 101 dark
102 class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" 102 class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only"
103 small 103 small
104 @click="addFeeTypeDialog = true" 104 @click="addFeeTypeDialog = true"
105 > 105 >
106 <v-icon dark>add</v-icon> 106 <v-icon dark>add</v-icon>
107 </v-btn> 107 </v-btn>
108 <v-btn 108 <v-btn
109 round 109 round
110 class="open-dialog-button hidden-sm-only hidden-xs-only" 110 class="open-dialog-button hidden-sm-only hidden-xs-only"
111 dark 111 dark
112 @click="addFeeTypeDialog = true" 112 @click="addFeeTypeDialog = true"
113 > 113 >
114 <v-icon class="white--text pr-1" size="20">add</v-icon>Add Fee Type 114 <v-icon class="white--text pr-1" size="20">add</v-icon>Add Fee Type
115 </v-btn> 115 </v-btn>
116 <v-spacer></v-spacer> 116 <v-spacer></v-spacer>
117 <v-card-title class="body-1" v-show="show"> 117 <v-card-title class="body-1" v-show="show">
118 <v-btn icon large flat @click="displaySearch"> 118 <v-btn icon large flat @click="displaySearch">
119 <v-avatar size="27"> 119 <v-avatar size="27">
120 <img src="/static/icon/search.png" alt="icon" /> 120 <img src="/static/icon/search.png" alt="icon" />
121 </v-avatar> 121 </v-avatar>
122 </v-btn> 122 </v-btn>
123 </v-card-title> 123 </v-card-title>
124 <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> 124 <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
125 <v-layout> 125 <v-layout>
126 <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> 126 <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
127 <v-icon @click="closeSearch" color="error">close</v-icon> 127 <v-icon @click="closeSearch" color="error">close</v-icon>
128 </v-layout> 128 </v-layout>
129 </v-flex> 129 </v-flex>
130 </v-toolbar> 130 </v-toolbar>
131 <v-data-table 131 <v-data-table
132 :headers="headers" 132 :headers="headers"
133 :items="feeTypeList" 133 :items="feeTypeList"
134 :pagination.sync="pagination" 134 :pagination.sync="pagination"
135 :search="search" 135 :search="search"
136 > 136 >
137 <template slot="items" slot-scope="props"> 137 <template slot="items" slot-scope="props">
138 <tr class="tr"> 138 <tr class="tr">
139 <td class="td td-row">{{ props.index + 1}}</td> 139 <td class="td td-row">{{ props.index + 1}}</td>
140 <td class="text-xs-center td td-row">{{ props.item.feeType }}</td> 140 <td class="text-xs-center td td-row">{{ props.item.feeType }}</td>
141 <td class="text-xs-center td td-row">{{ props.item.note }}</td> 141 <td class="text-xs-center td td-row">{{ props.item.note }}</td>
142 <!-- <td id="td" class="text-xs-center">{{ props.item.session}}</td> --> 142 <!-- <td id="td" class="text-xs-center">{{ props.item.session}}</td> -->
143 143
144 <td class="text-xs-center td td-row"> 144 <td class="text-xs-center td td-row">
145 <!-- <span> --> 145 <!-- <span> -->
146 <v-tooltip top> 146 <v-tooltip top>
147 <img 147 <img
148 slot="activator" 148 slot="activator"
149 style="cursor:pointer; width:25px; height:25px; " 149 style="cursor:pointer; width:25px; height:25px; "
150 class="mr-3" 150 class="mr-3"
151 @click="profile(props.item)" 151 @click="profile(props.item)"
152 src="/static/icon/view.png" 152 src="/static/icon/view.png"
153 /> 153 />
154 <span>View</span> 154 <span>View</span>
155 </v-tooltip> 155 </v-tooltip>
156 <v-tooltip top> 156 <v-tooltip top>
157 <img 157 <img
158 slot="activator" 158 slot="activator"
159 style="cursor:pointer; width:20px; height:18px; " 159 style="cursor:pointer; width:20px; height:18px; "
160 class="mr-3" 160 class="mr-3"
161 @click="editItem(props.item)" 161 @click="editItem(props.item)"
162 src="/static/icon/edit.png" 162 src="/static/icon/edit.png"
163 /> 163 />
164 <span>Edit</span> 164 <span>Edit</span>
165 </v-tooltip> 165 </v-tooltip>
166 <v-tooltip top> 166 <v-tooltip top>
167 <img 167 <img
168 slot="activator" 168 slot="activator"
169 style="cursor:pointer; width:20px; height:20px; " 169 style="cursor:pointer; width:20px; height:20px; "
170 @click="deleteItem(props.item)" 170 @click="deleteItem(props.item)"
171 class="mr-3" 171 class="mr-3"
172 src="/static/icon/delete.png" 172 src="/static/icon/delete.png"
173 /> 173 />
174 <span>Delete</span> 174 <span>Delete</span>
175 </v-tooltip> 175 </v-tooltip>
176 <!-- </span> --> 176 <!-- </span> -->
177 </td> 177 </td>
178 </tr> 178 </tr>
179 </template> 179 </template>
180 <v-alert 180 <v-alert
181 slot="no-results" 181 slot="no-results"
182 :value="true" 182 :value="true"
183 color="error" 183 color="error"
184 icon="warning" 184 icon="warning"
185 >Your search for "{{ search }}" found no results.</v-alert> 185 >Your search for "{{ search }}" found no results.</v-alert>
186 </v-data-table> 186 </v-data-table>
187 187
188 <!-- ****** ADD Fee Type ****** --> 188 <!-- ****** ADD Fee Type ****** -->
189 <v-dialog v-model="addFeeTypeDialog" max-width="500px"> 189 <v-dialog v-model="addFeeTypeDialog" max-width="500px">
190 <v-card flat class="card-style pa-2" dark> 190 <v-card flat class="card-style pa-2" dark>
191 <v-layout> 191 <v-layout>
192 <v-flex xs12> 192 <v-flex xs12>
193 <label class="title text-xs-center">Add Fee Type</label> 193 <label class="title text-xs-center">Add Fee Type</label>
194 <v-icon size="24" class="right" @click="addFeeTypeDialog = false">cancel</v-icon> 194 <v-icon size="24" class="right" @click="addFeeTypeDialog = false">cancel</v-icon>
195 </v-flex> 195 </v-flex>
196 </v-layout> 196 </v-layout>
197 <v-container fluid fill-height> 197 <v-container fluid fill-height>
198 <v-layout align-center> 198 <v-layout align-center>
199 <v-flex xs12 class="mt-4"> 199 <v-flex xs12 class="mt-4">
200 <v-form ref="form" v-model="valid" lazy-validation> 200 <v-form ref="form" v-model="valid" lazy-validation>
201 <v-layout> 201 <v-layout>
202 <v-flex xs4 class="pt-4 subheading"> 202 <v-flex xs4 class="pt-4 subheading">
203 <label class="right">Fee Type:</label> 203 <label class="right">Fee Type:</label>
204 </v-flex> 204 </v-flex>
205 <v-flex xs7 class="ml-3"> 205 <v-flex xs7 class="ml-3">
206 <v-text-field 206 <v-text-field
207 v-model="feeTypeData.feeType" 207 v-model="feeTypeData.feeType"
208 placeholder="fill your Fee Type" 208 placeholder="fill your Fee Type"
209 type="text" 209 type="text"
210 :rules="feetTypeRules" 210 :rules="feetTypeRules"
211 required 211 required
212 ></v-text-field> 212 ></v-text-field>
213 </v-flex> 213 </v-flex>
214 </v-layout> 214 </v-layout>
215 <v-layout> 215 <v-layout>
216 <v-flex xs4 class="pt-4 subheading"> 216 <v-flex xs4 class="pt-4 subheading">
217 <label class="right">Note:</label> 217 <label class="right">Note:</label>
218 </v-flex> 218 </v-flex>
219 <v-flex xs7 class="ml-3"> 219 <v-flex xs7 class="ml-3">
220 <v-textarea 220 <v-textarea
221 name="input-7-1" 221 name="input-7-1"
222 v-model="feeTypeData.note" 222 v-model="feeTypeData.note"
223 placeholder="fill your Note" 223 placeholder="fill your Note"
224 type="text" 224 type="text"
225 multi-line 225 multi-line
226 required 226 required
227 ></v-textarea> 227 ></v-textarea>
228 </v-flex> 228 </v-flex>
229 </v-layout> 229 </v-layout>
230 <!-- <v-layout> 230 <!-- <v-layout>
231 <v-flex xs4 class="pt-4 subheading"> 231 <v-flex xs4 class="pt-4 subheading">
232 <label class="right">Monthly:</label> 232 <label class="right">Monthly:</label>
233 </v-flex> 233 </v-flex>
234 <v-flex xs6 class="ml-3"> 234 <v-flex xs6 class="ml-3">
235 <v-checkbox 235 <v-checkbox
236 v-model="feeTypeData.monthly" 236 v-model="feeTypeData.monthly"
237 :rules="monthlyRules" 237 :rules="monthlyRules"
238 multi-line 238 multi-line
239 required 239 required
240 ></v-checkbox> 240 ></v-checkbox>
241 </v-flex> 241 </v-flex>
242 </v-layout>--> 242 </v-layout>-->
243 <v-layout> 243 <v-layout>
244 <v-flex xs12> 244 <v-flex xs12>
245 <v-card-actions> 245 <v-card-actions>
246 <v-spacer></v-spacer> 246 <v-spacer></v-spacer>
247 <v-btn @click="clear" round dark class="clear-button">clear</v-btn> 247 <v-btn @click="clear" round dark class="clear-button">clear</v-btn>
248 <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> 248 <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn>
249 </v-card-actions> 249 </v-card-actions>
250 </v-flex> 250 </v-flex>
251 </v-layout> 251 </v-layout>
252 </v-form> 252 </v-form>
253 </v-flex> 253 </v-flex>
254 </v-layout> 254 </v-layout>
255 </v-container> 255 </v-container>
256 </v-card> 256 </v-card>
257 </v-dialog> 257 </v-dialog>
258 <div class="loader" v-if="showLoader"> 258 <div class="loader" v-if="showLoader">
259 <v-progress-circular indeterminate color="white"></v-progress-circular> 259 <v-progress-circular indeterminate color="white"></v-progress-circular>
260 </div> 260 </div>
261 <v-snackbar 261 <v-snackbar
262 :timeout="timeout" 262 :timeout="timeout"
263 :top="y === 'top'" 263 :top="y === 'top'"
264 :right="x === 'right'" 264 :right="x === 'right'"
265 :vertical="mode === 'vertical'" 265 :vertical="mode === 'vertical'"
266 v-model="snackbar" 266 v-model="snackbar"
267 :color="color" 267 :color="color"
268 >{{ text }}</v-snackbar> 268 >{{ text }}</v-snackbar>
269 </v-container> 269 </v-container>
270 </template> 270 </template>
271 271
272 <script> 272 <script>
273 import http from "@/Services/http.js"; 273 import http from "@/Services/http.js";
274 274
275 export default { 275 export default {
276 data: () => ({ 276 data: () => ({
277 snackbar: false, 277 snackbar: false,
278 y: "top", 278 y: "top",
279 x: "right", 279 x: "right",
280 mode: "", 280 mode: "",
281 timeout: 5000, 281 timeout: 5000,
282 text: "", 282 text: "",
283 color: "", 283 color: "",
284 showLoader: false, 284 showLoader: false,
285 loading: false, 285 loading: false,
286 date: null, 286 date: null,
287 search: "", 287 search: "",
288 editFeeTypeDialog: false, 288 editFeeTypeDialog: false,
289 viewFeeTypeDialog: false, 289 viewFeeTypeDialog: false,
290 valid: true, 290 valid: true,
291 show: true, 291 show: true,
292 showSearch: false, 292 showSearch: false,
293 addFeeTypeDialog: false, 293 addFeeTypeDialog: false,
294 validEdit: true, 294 validEdit: true,
295 pagination: { 295 pagination: {
296 rowsPerPage: 10 296 rowsPerPage: 10
297 }, 297 },
298 feetTypeRules: [v => !!v || " Fee Type Name is required"], 298 feetTypeRules: [v => !!v || " Fee Type Name is required"],
299 monthlyRules: [v => !!v || " Select Monthly"], 299 monthlyRules: [v => !!v || " Select Monthly"],
300 noteRules: [v => !!v || " Note is required"], 300 noteRules: [v => !!v || " Note is required"],
301 headers: [ 301 headers: [
302 { 302 {
303 text: "No", 303 text: "No",
304 align: "", 304 align: "",
305 sortable: false, 305 sortable: false,
306 value: "No" 306 value: "No"
307 }, 307 },
308 { 308 {
309 text: "fee Type", 309 text: "fee Type",
310 value: "feeType", 310 value: "feeType",
311 sortable: false, 311 sortable: false,
312 align: "center" 312 align: "center"
313 }, 313 },
314 { text: "Note", value: "note", sortable: false, align: "center" }, 314 { text: "Note", value: "note", sortable: false, align: "center" },
315 // { text: "Session", value: "session", sortable: false, align: "center" }, 315 // { text: "Session", value: "session", sortable: false, align: "center" },
316 { text: "Action", value: "", sortable: false, align: "center" } 316 { text: "Action", value: "", sortable: false, align: "center" }
317 ], 317 ],
318 feeTypeList: [], 318 feeTypeList: [],
319 select: "", 319 select: "",
320 token: "", 320 token: "",
321 editedItem: {}, 321 editedItem: {},
322 feeTypeData: {} 322 feeTypeData: {}
323 }), 323 }),
324 methods: { 324 methods: {
325 getFeeTypeList() { 325 getFeeTypeList() {
326 this.showLoader = true; 326 this.showLoader = true;
327 http() 327 http()
328 .get("/getFeesList", { 328 .get("/getFeesList", {
329 params: { schoolId: this.$store.state.schoolId }, 329 params: { schoolId: this.$store.state.schoolId },
330 headers: { Authorization: "Bearer " + this.token } 330 headers: { Authorization: "Bearer " + this.token }
331 }) 331 })
332 .then(response => { 332 .then(response => {
333 this.feeTypeList = response.data.data; 333 this.feeTypeList = response.data.data;
334 this.showLoader = false; 334 this.showLoader = false;
335 }) 335 })
336 .catch(error => { 336 .catch(error => {
337 this.showLoader = false; 337 this.showLoader = false;
338 if (error.response.status === 401) { 338 if (error.response.status === 401) {
339 this.$router.replace({ path: "/" }); 339 this.$router.replace({ path: "/" });
340 this.$store.dispatch("setToken", null); 340 this.$store.dispatch("setToken", null);
341 this.$store.dispatch("Id", null); 341 this.$store.dispatch("Id", null);
342 this.$store.dispatch("Role", null); 342 this.$store.dispatch("Role", null);
343 } 343 }
344 }); 344 });
345 }, 345 },
346 editItem(item) { 346 editItem(item) {
347 this.editedIndex = this.feeTypeList.indexOf(item); 347 this.editedIndex = this.feeTypeList.indexOf(item);
348 this.editedItem = Object.assign({}, item); 348 this.editedItem = Object.assign({}, item);
349 this.editFeeTypeDialog = true; 349 this.editFeeTypeDialog = true;
350 }, 350 },
351 profile(item) { 351 profile(item) {
352 this.editedIndex = this.feeTypeList.indexOf(item); 352 this.editedIndex = this.feeTypeList.indexOf(item);
353 this.editedItem = Object.assign({}, item); 353 this.editedItem = Object.assign({}, item);
354 this.viewFeeTypeDialog = true; 354 this.viewFeeTypeDialog = true;
355 }, 355 },
356 deleteItem(item) { 356 deleteItem(item) {
357 let deleteFeeType = { 357 let deleteFeeType = {
358 feeId: item._id 358 feeId: item._id
359 }; 359 };
360 http() 360 http()
361 .delete( 361 .delete(
362 "/deleteFee", 362 "/deleteFee",
363 confirm("Are you sure you want to delete this?") && { 363 confirm("Are you sure you want to delete this?") && {
364 params: deleteFeeType 364 params: deleteFeeType
365 } 365 }
366 ) 366 )
367 .then(response => { 367 .then(response => {
368 this.snackbar = true; 368 this.snackbar = true;
369 this.text = response.data.message; 369 this.text = response.data.message;
370 this.color = "green"; 370 this.color = "green";
371 this.getFeeTypeList(); 371 this.getFeeTypeList();
372 }) 372 })
373 .catch(error => { 373 .catch(error => {
374 this.snackbar = true; 374 this.snackbar = true;
375 this.color = "error"; 375 this.color = "error";
376 this.text = error.response.data.message; 376 this.text = error.response.data.message;
377 }); 377 });
378 }, 378 },
379 close() { 379 close() {
380 this.dialog = false; 380 this.dialog = false;
381 }, 381 },
382 close1() { 382 close1() {
383 this.dialog1 = false; 383 this.dialog1 = false;
384 }, 384 },
385 close2() { 385 close2() {
386 this.dialog2 = false; 386 this.dialog2 = false;
387 }, 387 },
388 submit() { 388 submit() {
389 if (this.$refs.form.validate()) { 389 if (this.$refs.form.validate()) {
390 this.loading = true; 390 this.loading = true;
391 this.schoolId = this.$store.state.schoolId; 391 this.schoolId = this.$store.state.schoolId;
392 http() 392 http()
393 .post("/createFee", this.feeTypeData) 393 .post("/createFee", this.feeTypeData)
394 .then(response => { 394 .then(response => {
395 this.getFeeTypeList(); 395 this.getFeeTypeList();
396 this.snackbar = true; 396 this.snackbar = true;
397 this.text = response.data.message; 397 this.text = response.data.message;
398 this.color = "green"; 398 this.color = "green";
399 this.clear(); 399 this.clear();
400 this.addFeeTypeDialog = false; 400 this.addFeeTypeDialog = false;
401 this.loading = false; 401 this.loading = false;
402 }) 402 })
403 .catch(error => { 403 .catch(error => {
404 // console.log(error); 404 // console.log(error);
405 this.snackbar = true; 405 this.snackbar = true;
406 this.color = "error"; 406 this.color = "error";
407 this.text = error.response.data.message; 407 this.text = error.response.data.message;
408 this.loading = false; 408 this.loading = false;
409 }); 409 });
410 } 410 }
411 }, 411 },
412 clear() { 412 clear() {
413 this.$refs.form.reset(); 413 this.$refs.form.reset();
414 }, 414 },
415 save() { 415 save() {
416 this.editedItem.feeId = this.editedItem._id; 416 this.editedItem.feeId = this.editedItem._id;
417 http() 417 http()
418 .put("/updateFee", this.editedItem) 418 .put("/updateFee", this.editedItem)
419 .then(response => { 419 .then(response => {
420 this.snackbar = true; 420 this.snackbar = true;
421 this.text = response.data.message; 421 this.text = response.data.message;
422 this.color = "green"; 422 this.color = "green";
423 this.getFeeTypeList(); 423 this.getFeeTypeList();
424 this.editFeeTypeDialog = false;
424 this.close(); 425 this.close();
425 }) 426 })
426 .catch(error => { 427 .catch(error => {
427 this.snackbar = true; 428 this.snackbar = true;
428 this.color = "error"; 429 this.color = "error";
429 this.text = error.response.data.message; 430 this.text = error.response.data.message;
430 }); 431 });
431 }, 432 },
432 displaySearch() { 433 displaySearch() {
433 (this.show = false), (this.showSearch = true); 434 (this.show = false), (this.showSearch = true);
434 }, 435 },
435 closeSearch() { 436 closeSearch() {
436 this.showSearch = false; 437 this.showSearch = false;
437 this.show = true; 438 this.show = true;
438 this.search = ""; 439 this.search = "";
439 } 440 }
440 }, 441 },
441 mounted() { 442 mounted() {
442 this.token = this.$store.state.token; 443 this.token = this.$store.state.token;
443 this.getFeeTypeList(); 444 this.getFeeTypeList();
444 } 445 }
445 }; 446 };
446 </script> 447 </script>
src/pages/Account/paymentHistory.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- ****** PAYMENT HOISTORY TABLE ****** --> 3 <!-- ****** Edit Payment History ****** -->
4 <v-dialog v-model="editPaymentDialog" max-width="400px">
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 Payment History</label>
9 <v-icon size="24" class="right" @click="editPaymentDialog = false">cancel</v-icon>
10 </v-flex>
11 </v-layout>
12 <v-form ref="form">
13 <v-container fluid>
14 <v-flex xs12 sm12>
15 <v-layout>
16 <v-flex xs3 class="pt-4 subheading">
17 <label class="right">Amount:</label>
18 </v-flex>
19 <v-flex xs8 sm7 class="ml-3">
20 <v-text-field
21 v-model="editedItem.totalPaidAmount"
22 placeholder="please fill this field"
23 ></v-text-field>
24 </v-flex>
25 </v-layout>
26 </v-flex>
27 <v-flex xs12 sm12>
28 <v-layout>
29 <v-flex xs3 class="pt-4 subheading">
30 <label class="right">Method:</label>
31 </v-flex>
32 <v-flex xs8 sm7 class="ml-3">
33 <v-select
34 :items="paymentMethod"
35 v-model="editedItem.paymentMethod"
36 label="please fill this field"
37 required
38 ></v-select>
39 </v-flex>
40 </v-layout>
41 </v-flex>
42 <v-layout>
43 <v-flex xs12>
44 <v-layout>
45 <v-spacer></v-spacer>
46 <v-btn round dark @click="save" class="add-button">Update Payment History</v-btn>
47 <v-spacer></v-spacer>
48 </v-layout>
49 </v-flex>
50 </v-layout>
51 </v-container>
52 </v-form>
53 </v-card>
54 </v-dialog>
55
56 <!-- ****** PAYMENT HISTORY TABLE ****** -->
4 <v-toolbar color="transparent" flat> 57 <v-toolbar color="transparent" flat>
5 <v-spacer></v-spacer> 58 <v-spacer></v-spacer>
6 <v-card-title class="body-1" v-show="show"> 59 <v-card-title class="body-1" v-show="show">
7 <v-btn icon large flat @click="displaySearch"> 60 <v-btn icon large flat @click="displaySearch">
8 <v-avatar size="27"> 61 <v-avatar size="27">
9 <img src="/static/icon/search.png" alt="icon" /> 62 <img src="/static/icon/search.png" alt="icon" />
10 </v-avatar> 63 </v-avatar>
11 </v-btn> 64 </v-btn>
12 </v-card-title> 65 </v-card-title>
13 <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> 66 <v-flex xs8 sm8 md3 lg2 v-show="showSearch">
14 <v-layout> 67 <v-layout>
15 <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> 68 <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field>
16 <v-icon @click="closeSearch" color="error">close</v-icon> 69 <v-icon @click="closeSearch" color="error">close</v-icon>
17 </v-layout> 70 </v-layout>
18 </v-flex> 71 </v-flex>
19 </v-toolbar> 72 </v-toolbar>
20 <v-data-table 73 <v-data-table
21 :headers="headers" 74 :headers="headers"
22 :items="paymentHistory" 75 :items="paymentHistory"
23 :pagination.sync="pagination" 76 :pagination.sync="pagination"
24 :search="search" 77 :search="search"
25 > 78 >
26 <template slot="items" slot-scope="props"> 79 <template slot="items" slot-scope="props">
27 <tr class="tr"> 80 <tr class="tr">
28 <td class="td td-row ">{{ props.index + 1 }}</td> 81 <td class="td td-row">{{ props.index + 1 }}</td>
29 <!-- <td class="td td-row text-xs-center">{{ props.item.studentId.name }}</td> --> 82 <td class="td td-row text-xs-center">{{ props.item.studentId.name }}</td>
30 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> 83 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td>
31 <td class="td td-row text-xs-center">{{ props.item.feeType[0].feeTypeName }}</td> 84 <td class="td td-row text-xs-center">{{ props.item.feeType.feeTypeName }}</td>
32 <td class="td td-row text-xs-center">{{ props.item.paymentMethod }}</td> 85 <td class="td td-row text-xs-center">{{ props.item.paymentMethod }}</td>
33 <td class="td td-row text-xs-center">{{ props.item.totalPaidAmount }}</td> 86 <td class="td td-row text-xs-center">{{ props.item.totalPaidAmount }}</td>
34 <td class="td td-row text-xs-center">{{ dates(props.item.date) }}</td> 87 <td class="td td-row text-xs-center">{{ dates(props.item.date) }}</td>
35 <!-- <td class="text-xs-center"> 88 <td class="td td-row text-xs-center">
36 <span> 89 <span>
37 <v-tooltip top> 90 <v-tooltip top>
38 <img 91 <img
39 slot="activator" 92 slot="activator"
40 style="cursor:pointer; width:20px; height:18px; " 93 style="cursor:pointer; width:20px; height:18px; "
41 class="mr-5" 94 class="mr-5"
42 @click="editItem(props.item)" 95 @click="editItem(props.item)"
43 src="/static/icon/edit1.png" 96 src="/static/icon/edit1.png"
44 /> 97 />
45 <span>Edit</span> 98 <span>Edit</span>
46 </v-tooltip> 99 </v-tooltip>
47 <v-tooltip top> 100 <v-tooltip top>
48 <img 101 <img
49 slot="activator" 102 slot="activator"
50 style="cursor:pointer;width:20px; height:20px; " 103 style="cursor:pointer;width:20px; height:20px; "
51 class="mr-5" 104 class="mr-5"
52 @click="deleteItem(props.item)" 105 @click="deleteItem(props.item)"
53 src="/static/icon/delete1.png" 106 src="/static/icon/delete1.png"
54 /> 107 />
55 <span>Delete</span> 108 <span>Delete</span>
56 </v-tooltip> 109 </v-tooltip>
57 </span> 110 </span>
58 </td>--> 111 </td>
59 </tr> 112 </tr>
60 </template> 113 </template>
61 <v-alert 114 <v-alert
62 slot="no-results" 115 slot="no-results"
63 :value="true" 116 :value="true"
64 color="error" 117 color="error"
65 icon="warning" 118 icon="warning"
66 >Your search for "{{ search }}" found no results.</v-alert> 119 >Your search for "{{ search }}" found no results.</v-alert>
67 </v-data-table> 120 </v-data-table>
68 <div class="loader" v-if="showLoader"> 121 <div class="loader" v-if="showLoader">
69 <v-progress-circular indeterminate color="white"></v-progress-circular> 122 <v-progress-circular indeterminate color="white"></v-progress-circular>
70 </div> 123 </div>
71 </v-container> 124 </v-container>
72 </template> 125 </template>
73 126
74 <script> 127 <script>
75 import http from "@/Services/http.js"; 128 import http from "@/Services/http.js";
76 import moment from "moment"; 129 import moment from "moment";
77 130
78 export default { 131 export default {
79 data: () => ({ 132 data: () => ({
133 snackbar: false,
80 showLoader: false, 134 showLoader: false,
81 search: "", 135 search: "",
82 show: true, 136 show: true,
83 showSearch: false, 137 showSearch: false,
84 pagination: { 138 pagination: {
85 rowsPerPage: 10 139 rowsPerPage: 10
86 }, 140 },
141 paymentMethod: ["Cash", "Cheque"],
87 headers: [ 142 headers: [
88 { 143 {
89 text: "No", 144 text: "No",
90 align: "", 145 align: "",
91 sortable: false, 146 sortable: false,
92 value: "No" 147 value: "No"
93 }, 148 },
94 // { 149 {
95 // text: "Student", 150 text: "Student",
96 // value: "student", 151 value: "name",
97 // sortable: false, 152 sortable: false,
98 // align: "center" 153 align: "center"
99 // }, 154 },
100 { text: "Class", value: "class", sortable: false, align: "center" }, 155 { text: "Class", value: "class", sortable: false, align: "center" },
101 { 156 {
102 text: "Fee Type", 157 text: "Fee Type",
103 value: "feeTypeName", 158 value: "feeTypeName",
104 sortable: false, 159 sortable: false,
105 align: "center" 160 align: "center"
106 }, 161 },
107 { 162 {
108 text: "Method", 163 text: "Method",
109 value: "paymentMethod", 164 value: "paymentMethod",
110 sortable: false, 165 sortable: false,
111 align: "center" 166 align: "center"
112 }, 167 },
113 { 168 {
114 text: "Paid Amount", 169 text: "Paid Amount",
115 value: "totalPaidAmount", 170 value: "totalPaidAmount",
116 sortable: false, 171 sortable: false,
117 align: "center" 172 align: "center"
118 }, 173 },
119 { 174 {
120 text: "Date", 175 text: "Date",
121 value: "date", 176 value: "date",
122 sortable: false, 177 sortable: false,
123 align: "center" 178 align: "center"
124 } 179 },
125 // { text: "Action", value: "", sortable: false, align: "center" } 180 { text: "Action", value: "", sortable: false, align: "center" }
126 ], 181 ],
127 paymentHistory: [], 182 paymentHistory: [],
128 addPaymentHistoryDialog: "" 183 addPaymentHistoryDialog: "",
184 editPaymentDialog: false,
185 editedItem: {}
129 }), 186 }),
130 methods: { 187 methods: {
188 editItem(item) {
189 this.editedIndex = this.paymentHistory.indexOf(item);
190 this.editedItem = Object.assign({}, item);
191 this.editPaymentDialog = true;
192 },
193 deleteItem(item) {
194 let deleteGrade = {
195 invoiceId: item._id,
196 feeTypeId: item.feeType._id,
197 };
198 http()
199 .put(
200 "/deleteFeeType",
201 confirm("Are you sure you want to delete this?") &&
202 deleteGrade,
203 {
204 headers: {
205 Authorization: "Bearer " + this.token
206 }
207 }
208 )
209 .then(response => {
210 this.snackbar = true;
211 // this.text = "Successfully Delete Salary ";
212 this.text = response.data.message;
213 this.color = "green";
214 this.getPaymentHistory();
215 })
216 .catch(error => {
217 console.log("error", error);
218 this.snackbar = true;
219 this.text = error.response.data.message;
220 this.color = "red";
221 });
222 },
223
131 dates: function(date) { 224 dates: function(date) {
132 return moment(date).format("MMMM DD, YYYY"); 225 return moment(date).format("MMMM DD, YYYY");
133 }, 226 },
134 getPaymentHistory() { 227 getPaymentHistory() {
135 this.showLoader = true; 228 this.showLoader = true;
136 var token = this.$store.state.token; 229 var token = this.$store.state.token;
137 http() 230 http()
138 .get("/getInvoicesList", { 231 .get("/getPaymentHistory", {
139 params: { 232 params: {
140 paymentStatus: "FULLY_PAID", 233 paymentStatus: "FULLY_PAID",
141 schoolId: this.$store.state.schoolId 234 schoolId: this.$store.state.schoolId
142 }, 235 },
143 headers: { Authorization: "Bearer " + token } 236 headers: { Authorization: "Bearer " + token }
144 }) 237 })
145 .then(response => { 238 .then(response => {
146 this.paymentHistory = response.data.data; 239 this.paymentHistory = response.data.data;
147 this.showLoader = false; 240 this.showLoader = false;
148 }) 241 })
149 .catch(error => { 242 .catch(error => {
150 this.showLoader = false; 243 this.showLoader = false;
151 if (error.response.status === 401) { 244 if (error.response.status === 401) {
152 this.$router.replace({ path: "/" }); 245 this.$router.replace({ path: "/" });
153 this.$store.dispatch("setToken", null); 246 this.$store.dispatch("setToken", null);
154 this.$store.dispatch("Id", null); 247 this.$store.dispatch("Id", null);
155 this.$store.dispatch("Role", null); 248 this.$store.dispatch("Role", null);
156 } 249 }
157 }); 250 });
158 }, 251 },
252 save() {
253 var updatePayment = {
254 invoiceId: this.editedItem._id,
255 feeTypeId: this.editedItem.feeType._id,
256 paidAmount: this.editedItem.totalPaidAmount,
257 paymentMethod: this.editedItem.paymentMethod
258 };
259 http()
260 .put("/updateFeeType", updatePayment, {
261 headers: {
262 Authorization: "Bearer " + this.token
263 }
264 })
265 .then(response => {
266 this.getPaymentHistory();
267 this.snackbar = true;
268 this.text = response.data.message;
269 this.color = "green";
270 this.editPaymentDialog = false;
271 })
272 .catch(error => {
273 console.log("error", error);
274 this.snackbar = true;
275 this.color = "red";
276 });
277 },
159 displaySearch() { 278 displaySearch() {
160 (this.show = false), (this.showSearch = true); 279 (this.show = false), (this.showSearch = true);
161 }, 280 },
162 closeSearch() { 281 closeSearch() {
163 this.showSearch = false; 282 this.showSearch = false;
164 this.show = true; 283 this.show = true;
165 this.search = ""; 284 this.search = "";
166 } 285 }
167 // getRole() {
168 // this.showLoader = true;
169 // var token = this.$store.state.token;
170 // http()
171 // .get("/getRolesList", {
172 // headers: { Authorization: "Bearer " + token }
173 // })
src/pages/Dashboard/dashboard.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> 3 <!-- ****** VIEW PROFIL NOTICE BOARD ****** -->
4 <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> 4 <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable>
5 <v-card> 5 <v-card>
6 <v-toolbar color="grey lighten-2" flat> 6 <v-toolbar color="grey lighten-2" flat>
7 <v-spacer></v-spacer> 7 <v-spacer></v-spacer>
8 <v-toolbar-title> 8 <v-toolbar-title>
9 <h3>Notice Board</h3> 9 <h3>Notice Board</h3>
10 </v-toolbar-title> 10 </v-toolbar-title>
11 <v-spacer></v-spacer> 11 <v-spacer></v-spacer>
12 <v-icon @click="closeNotice">close</v-icon> 12 <v-icon @click="closeNotice">close</v-icon>
13 </v-toolbar> 13 </v-toolbar>
14 <v-card-text> 14 <v-card-text>
15 <v-layout> 15 <v-layout>
16 <v-flex align-center justify-center layout text-xs-center class="mt-2"> 16 <v-flex align-center justify-center layout text-xs-center class="mt-2">
17 <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> 17 <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" />
18 <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> 18 <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" />
19 </v-flex> 19 </v-flex>
20 </v-layout> 20 </v-layout>
21 <v-container grid-list-md> 21 <v-container grid-list-md>
22 <v-layout wrap> 22 <v-layout wrap>
23 <v-flex> 23 <v-flex>
24 <v-layout> 24 <v-layout>
25 <v-flex xs5 sm6> 25 <v-flex xs5 sm6>
26 <h5 class="right my-1"> 26 <h5 class="right my-1">
27 <b>Title:</b> 27 <b>Title:</b>
28 </h5> 28 </h5>
29 </v-flex> 29 </v-flex>
30 <v-flex sm6 xs8> 30 <v-flex sm6 xs8>
31 <h5 class="my-1">{{ notice.title }}</h5> 31 <h5 class="my-1">{{ notice.title }}</h5>
32 </v-flex> 32 </v-flex>
33 </v-layout> 33 </v-layout>
34 <v-layout> 34 <v-layout>
35 <v-flex xs5 sm6> 35 <v-flex xs5 sm6>
36 <h5 class="right my-1"> 36 <h5 class="right my-1">
37 <b>Description:</b> 37 <b>Description:</b>
38 </h5> 38 </h5>
39 </v-flex> 39 </v-flex>
40 <v-flex sm6 xs8> 40 <v-flex sm6 xs8>
41 <h5 class="my-1">{{ notice.description }}</h5> 41 <h5 class="my-1">{{ notice.description }}</h5>
42 </v-flex> 42 </v-flex>
43 </v-layout> 43 </v-layout>
44 </v-flex> 44 </v-flex>
45 </v-layout> 45 </v-layout>
46 </v-container> 46 </v-container>
47 </v-card-text> 47 </v-card-text>
48 </v-card> 48 </v-card>
49 </v-dialog>--> 49 </v-dialog>-->
50 <!-- <v-container fluid grid-list-xl> --> 50 <!-- <v-container fluid grid-list-xl> -->
51 <v-layout wrap> 51 <v-layout wrap>
52 <v-flex xs12> 52 <v-flex xs12>
53 <v-layout wrap row> 53 <v-layout wrap row>
54 <!-- ***** Total Students ***** --> 54 <!-- ***** Total Students ***** -->
55 <v-flex xs12 sm12 md9> 55 <v-flex xs12 sm12 md9>
56 <v-container fluid grid-list-xl> 56 <v-container fluid grid-list-xl>
57 <v-flex xs12 sm12 md12> 57 <v-flex xs12 sm12 md12>
58 <v-layout wrap class> 58 <v-layout wrap class>
59 <v-flex xs12 sm12 md3> 59 <v-flex xs12 sm12 md3>
60 <router-link :to="{ name:'Students' }"> 60 <router-link :to="{ name:'Students' }">
61 <v-card class="card pink-bgcolor"> 61 <v-card class="card pink-bgcolor">
62 <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> 62 <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title>
63 <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> 63 <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" />
64 <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> 64 <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title>
65 </v-card> 65 </v-card>
66 </router-link> 66 </router-link>
67 </v-flex> 67 </v-flex>
68 <!-- ***** Total Teachers***** --> 68 <!-- ***** Total Teachers***** -->
69 <v-flex xs12 sm12 md3> 69 <v-flex xs12 sm12 md3>
70 <router-link :to="{ name:'Teachers' }"> 70 <router-link :to="{ name:'Teachers' }">
71 <v-card flat class="card elevation-2 firozi-bgcolor"> 71 <v-card flat class="card elevation-2 firozi-bgcolor">
72 <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> 72 <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title>
73 <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> 73 <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" />
74 74
75 <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> 75 <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title>
76 </v-card> 76 </v-card>
77 </router-link> 77 </router-link>
78 </v-flex> 78 </v-flex>
79 <!-- ***** Total Parents ***** --> 79 <!-- ***** Total Parents ***** -->
80 <v-flex xs12 sm12 md3> 80 <v-flex xs12 sm12 md3>
81 <router-link :to="{ name:'Parents' }"> 81 <router-link :to="{ name:'Parents' }">
82 <v-card flat class="card yellow darken-3"> 82 <v-card flat class="card yellow darken-3">
83 <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> 83 <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title>
84 <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> 84 <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" />
85 <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> 85 <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title>
86 </v-card> 86 </v-card>
87 </router-link> 87 </router-link>
88 </v-flex> 88 </v-flex>
89 <!-- ***** Total Class***** --> 89 <!-- ***** Total Class***** -->
90 <v-flex xs12 sm12 md3> 90 <v-flex xs12 sm12 md3>
91 <router-link :to="{ name:'Class' }"> 91 <router-link :to="{ name:'Class' }">
92 <v-card flat class="card darkBlue-bgcolor"> 92 <v-card flat class="card darkBlue-bgcolor">
93 <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> 93 <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title>
94 <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> 94 <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" />
95 <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> 95 <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title>
96 </v-card> 96 </v-card>
97 </router-link> 97 </router-link>
98 </v-flex> 98 </v-flex>
99 </v-layout> 99 </v-layout>
100 </v-flex> 100 </v-flex>
101 <v-layout> 101 <v-layout>
102 <v-flex xs12> 102 <v-flex xs12>
103 <v-card class="card mt-2 account-Card"> 103 <v-card class="card mt-2 account-Card">
104 <h4> 104 <h4>
105 <b>Account</b> 105 <b>Account</b>
106 </h4> 106 </h4>
107 <v-layout wrap> 107 <v-layout wrap>
108 <v-flex xs12 sm12 md3> 108 <v-flex xs12 sm12 md3>
109 <v-list two-line> 109 <v-list two-line>
110 <template> 110 <template>
111 <v-list-tile> 111 <v-list-tile>
112 <v-list-tile-avatar> 112 <v-list-tile-avatar>
113 <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> 113 <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon>
114 </v-list-tile-avatar> 114 </v-list-tile-avatar>
115 <v-list-tile-content> 115 <v-list-tile-content>
116 <v-list-tile-title class="mt-2"> 116 <v-list-tile-title class="mt-2">
117 <p class="subheading font-color">Fees</p> 117 <p class="subheading font-color">Fees</p>
118 </v-list-tile-title> 118 </v-list-tile-title>
119 <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> 119 <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title>
120 </v-list-tile-content> 120 </v-list-tile-content>
121 </v-list-tile> 121 </v-list-tile>
122 <v-list-tile> 122 <v-list-tile>
123 <v-list-tile-avatar> 123 <v-list-tile-avatar>
124 <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> 124 <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon>
125 </v-list-tile-avatar> 125 </v-list-tile-avatar>
126 <v-list-tile-content> 126 <v-list-tile-content>
127 <v-list-tile-title class="mt-2"> 127 <v-list-tile-title class="mt-2">
128 <p class="subheading font-color">Collection</p> 128 <p class="subheading font-color">Collection</p>
129 </v-list-tile-title> 129 </v-list-tile-title>
130 <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> 130 <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title>
131 </v-list-tile-content> 131 </v-list-tile-content>
132 </v-list-tile> 132 </v-list-tile>
133 <v-list-tile> 133 <v-list-tile>
134 <v-list-tile-avatar> 134 <v-list-tile-avatar>
135 <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> 135 <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon>
136 </v-list-tile-avatar> 136 </v-list-tile-avatar>
137 <v-list-tile-content> 137 <v-list-tile-content>
138 <v-list-tile-title class="mt-2"> 138 <v-list-tile-title class="mt-2">
139 <p class="subheading font-color">Expences</p> 139 <p class="subheading font-color">Expences</p>
140 </v-list-tile-title> 140 </v-list-tile-title>
141 <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> 141 <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title>
142 </v-list-tile-content> 142 </v-list-tile-content>
143 </v-list-tile> 143 </v-list-tile>
144 </template> 144 </template>
145 </v-list> 145 </v-list>
146 </v-flex> 146 </v-flex>
147 <v-flex xs12 sm12 md9 lg9> 147 <v-flex xs12 sm12 md9 lg9>
148 <div id="chart"> 148 <div id="chart">
149 <div v-if="this.series"> 149 <div v-if="this.series">
150 <apexchart 150 <apexchart
151 type="bar" 151 type="bar"
152 height="250" 152 height="250"
153 style="max-width: 800px !important" 153 style="max-width: 800px !important"
154 :options="chartOptions" 154 :options="chartOptions"
155 :series="series" 155 :series="series"
156 v-show="true" 156 v-show="true"
157 ></apexchart> 157 ></apexchart>
158 </div> 158 </div>
159 </div> 159 </div>
160 </v-flex> 160 </v-flex>
161 </v-layout> 161 </v-layout>
162 </v-card> 162 </v-card>
163 </v-flex> 163 </v-flex>
164 </v-layout> 164 </v-layout>
165 <v-card class="mt-2 card"> 165 <v-card class="mt-2 card">
166 <!-- <full-calendar 166 <!-- <full-calendar
167 ref="calendar" 167 ref="calendar"
168 defaultView="month" 168 defaultView="month"
169 droppable="false" 169 droppable="false"
170 :events="events" 170 :events="events"
171 :config="config" 171 :config="config"
172 ></full-calendar>--> 172 ></full-calendar>-->
173 <h4 class="pa-3"> 173 <h4 class="pa-3">
174 <b>Notice</b> 174 <b>Notice</b>
175 </h4> 175 </h4>
176 176
177 <v-data-table 177 <v-data-table
178 :items="noticeData" 178 :items="noticeData"
179 class="elevation-0" 179 class="elevation-0"
180 flat 180 flat
181 hide-actions 181 hide-actions
182 hide-headers 182 hide-headers
183 style="border-spacing: 0 !important;" 183 style="border-spacing: 0 !important;"
184 > 184 >
185 <template 185 <template
186 slot="items" 186 slot="items"
187 slot-scope="props" 187 slot-scope="props"
188 v-if="props.index < 5" 188 v-if="props.index < 5"
189 style="border-spacing: 0 !important;" 189 style="border-spacing: 0 !important;"
190 > 190 >
191 <tr class="td-notice"> 191 <tr class="td-notice">
192 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> 192 <td class="grey--text" style="width:18px">{{ props.index + 1}}</td>
193 <td> 193 <td>
194 <span class="grey--text caption">{{ date(props.item.created) }}</span> 194 <span class="grey--text caption">{{ date(props.item.created) }}</span>
195 <br /> 195 <br />
196 <span class="body-2">{{ props.item.title}}</span> 196 <span class="body-2">{{ props.item.title}}</span>
197 </td> 197 </td>
198 <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> 198 <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td>
199 199
200 <td class="text-xs-center"> 200 <td class="text-xs-center">
201 <span> 201 <span>
202 <v-tooltip top> 202 <v-tooltip top>
203 <img 203 <img
204 slot="activator" 204 slot="activator"
205 style="cursor:pointer; width:25px; height:25px; " 205 style="cursor:pointer; width:25px; height:25px; "
206 @click="profile" 206 @click="profile"
207 src="/static/icon/view.png" 207 src="/static/icon/view.png"
208 /> 208 />
209 <span>View</span> 209 <span>View</span>
210 </v-tooltip> 210 </v-tooltip>
211 </span> 211 </span>
212 </td> 212 </td>
213 </tr> 213 </tr>
214 </template> 214 </template>
215 </v-data-table> 215 </v-data-table>
216 </v-card> 216 </v-card>
217 </v-container> 217 </v-container>
218 </v-flex> 218 </v-flex>
219 <v-flex xs12 sm12 md3> 219 <v-flex xs12 sm12 md3>
220 <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> 220 <v-card height="100%" class="elevation-0 mt-3 profileDasboard">
221 <v-card-text> 221 <v-card-text>
222 <h4 class="text-xs-center py-3"> 222 <h4 class="text-xs-center py-3">
223 <b>Profile</b> 223 <b>Profile</b>
224 </h4> 224 </h4>
225 <v-flex xs12 class="py-3"> 225 <v-flex xs12 class="py-3">
226 <v-layout wrap> 226 <v-layout wrap>
227 <v-flex xs12 sm12 md4> 227 <v-flex xs12 sm12 md4>
228 <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> 228 <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" />
229 <img 229 <img
230 :src="userData.schoolLogoUrl" 230 :src="userData.schoolLogoUrl"
231 v-else-if="userData.schoolLogoUrl" 231 v-else-if="userData.schoolLogoUrl"
232 width="80" 232 width="80"
233 /> 233 />
234 </v-flex> 234 </v-flex>
235 <v-flex xs12 sm12 md6> 235 <v-flex xs12 sm12 md6>
236 <p class="mb-0 body-1"> 236 <p class="mb-0 body-1">
237 <i>{{ userData.name }}</i> 237 <i>{{ userData.name }}</i>
238 </p> 238 </p>
239 <p class="mb-0 caption grey--text">{{ userData.email }}</p> 239 <p class="mb-0 caption grey--text">{{ userData.email }}</p>
240 <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> 240 <p class="mb-0 caption grey--text">{{ userData.mobile }}</p>
241 <address class="caption grey--text mb-3">{{ userData.address }}</address> 241 <address class="caption grey--text mb-3">{{ userData.address }}</address>
242 </v-flex> 242 </v-flex>
243 </v-layout> 243 </v-layout>
244 </v-flex> 244 </v-flex>
245 <hr /> 245 <hr />
246 <h4 class="text-xs-center py-3"> 246 <h4 class="text-xs-center py-3">
247 <b>Calender</b> 247 <b>Calender</b>
248 </h4> 248 </h4>
249 <vue-event-calendar :events="demoEvents"></vue-event-calendar> 249 <vue-event-calendar :events="demoEvents"></vue-event-calendar>
250 </v-card-text> 250 </v-card-text>
251 </v-card> 251 </v-card>
252 </v-flex> 252 </v-flex>
253 </v-layout> 253 </v-layout>
254 </v-flex> 254 </v-flex>
255 </v-layout> 255 </v-layout>
256 <v-dialog v-model="dialog" max-width="500"> 256 <v-dialog v-model="dialog" max-width="500">
257 <v-card color="grey lighten-4" flat> 257 <v-card color="grey lighten-4" flat>
258 <v-toolbar dark color="fixcolors"> 258 <v-toolbar dark color="fixcolors">
259 <v-spacer></v-spacer> 259 <v-spacer></v-spacer>
260 <v-btn icon @click="dialog= false"> 260 <v-btn icon @click="dialog= false">
261 <v-icon>close</v-icon> 261 <v-icon>close</v-icon>
262 </v-btn> 262 </v-btn>
263 </v-toolbar> 263 </v-toolbar>
264 <v-flex class="py-4"> 264 <v-flex class="py-4">
265 <v-list-tile> 265 <v-list-tile>
266 <v-list-tile-action> 266 <v-list-tile-action>
267 <v-icon>edit</v-icon> 267 <v-icon>edit</v-icon>
268 </v-list-tile-action> 268 </v-list-tile-action>
269 <v-list-tile-content> 269 <v-list-tile-content>
270 <v-list-tile-title>{{ selected.title }}</v-list-tile-title> 270 <v-list-tile-title>{{ selected.title }}</v-list-tile-title>
271 </v-list-tile-content> 271 </v-list-tile-content>
272 </v-list-tile> 272 </v-list-tile>
273 <v-list-tile> 273 <v-list-tile>
274 <v-list-tile-action> 274 <v-list-tile-action>
275 <v-icon>access_time</v-icon> 275 <v-icon>access_time</v-icon>
276 </v-list-tile-action> 276 </v-list-tile-action>
277 <v-list-tile-content> 277 <v-list-tile-content>
278 <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> 278 <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title>
279 </v-list-tile-content> 279 </v-list-tile-content>
280 </v-list-tile> 280 </v-list-tile>
281 </v-flex> 281 </v-flex>
282 </v-card> 282 </v-card>
283 </v-dialog> 283 </v-dialog>
284 <div class="loader" v-if="showLoader"> 284 <div class="loader" v-if="showLoader">
285 <v-progress-circular indeterminate color="white"></v-progress-circular> 285 <v-progress-circular indeterminate color="white"></v-progress-circular>
286 </div> 286 </div>
287 </v-app> 287 </v-app>
288 </template> 288 </template>
289 289
290 <script> 290 <script>
291 import http from "@/Services/http.js"; 291 import http from "@/Services/http.js";
292 import moment from "moment"; 292 import moment from "moment";
293 // import { FunctionalCalendar } from "vue-functional-calendar"; 293 // import { FunctionalCalendar } from "vue-functional-calendar";
294 294
295 export default { 295 export default {
296 components: { 296 components: {
297 // FunctionalCalendar 297 // FunctionalCalendar
298 }, 298 },
299 data() { 299 data() {
300 return { 300 return {
301 // data: { 301 // data: {
302 // clieckedToday: false 302 // clieckedToday: false
303 // }, 303 // },
304 // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], 304 // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"],
305 // calendarData: {}, 305 // calendarData: {},
306 // calendar: {}, 306 // calendar: {},
307 demoEvents: [ 307 demoEvents: [
308 { 308 {
309 date: "2020/01/10", // Required 309 date: "2020/01/10", // Required
310 title: "Foo" // Required 310 title: "Foo" // Required
311 }, 311 },
312 { 312 {
313 date: "2020/01/12", 313 date: "2020/01/12",
314 title: "Bar", 314 title: "Bar",
315 desc: "description", 315 desc: "description",
316 customClass: "disabled highlight" // Custom classes to an calendar cell 316 customClass: "disabled highlight" // Custom classes to an calendar cell
317 } 317 }
318 ], 318 ],
319 319
320 showLoader: false, 320 showLoader: false,
321 calendarData: {}, 321 calendarData: {},
322 dialog: false, 322 dialog: false,
323 dialogNotice: false, 323 dialogNotice: false,
324 HolidaysList: [], 324 HolidaysList: [],
325 EventsList: [], 325 EventsList: [],
326 events: [], 326 events: [],
327 config: { 327 config: {
328 eventClick: event => { 328 eventClick: event => {
329 this.selected = event; 329 this.selected = event;
330 this.dialog = true; 330 this.dialog = true;
331 } 331 }
332 }, 332 },
333 selected: {}, 333 selected: {},
334 barGraph: [], 334 barGraph: [],
335 // notice: {}, 335 // notice: {},
336 userData: {}, 336 userData: {},
337 dated: new Date(2018, 0, 9), 337 dated: new Date(2018, 0, 9),
338 userList: [], 338 userList: [],
339 sectionList: [], 339 sectionList: [],
340 students: "", 340 students: "",
341 parents: "", 341 parents: "",
342 teachers: "", 342 teachers: "",
343 classes: "", 343 classes: "",
344 noticeData: [], 344 noticeData: [],
345 expenseData: [], 345 expenseData: [],
346 feeData: [], 346 feeData: [],
347 collectionData: [], 347 collectionData: [],
348 348
349 attrs: [ 349 attrs: [
350 { 350 {
351 key: "today", 351 key: "today",
352 highlight: true, 352 highlight: true,
353 dates: new Date() 353 dates: new Date()
354 } 354 }
355 ], 355 ],
356 drawer: true, 356 drawer: true,
357 items: [ 357 items: [
358 { title: "Home", icon: "dashboard" }, 358 { title: "Home", icon: "dashboard" },
359 { title: "About", icon: "question_answer" } 359 { title: "About", icon: "question_answer" }
360 ], 360 ],
361 right: null, 361 right: null,
362 362
363 series: [ 363 series: [
364 { 364 {
365 name: "Total", 365 name: "Total",
366 data: [] 366 data: []
367 } 367 }
368 ], 368 ],
369 chartOptions: { 369 chartOptions: {
370 chart: { 370 chart: {
371 type: "bar", 371 type: "bar",
372 height: 150, 372 height: 150,
373 stacked: true 373 stacked: true
374 // animations: { 374 // animations: {
375 // enabled: true, 375 // enabled: true,
376 // easing: "easeinout", 376 // easing: "easeinout",
377 // speed: 1200, 377 // speed: 1200,
378 // animateGradually: { 378 // animateGradually: {
379 // enabled: true, 379 // enabled: true,
380 // delay: 450 380 // delay: 450
381 // }, 381 // },
382 // dynamicAnimation: { 382 // dynamicAnimation: {
383 // enabled: true, 383 // enabled: true,
384 // speed: 450 384 // speed: 450
385 // } 385 // }
386 // } 386 // }
387 }, 387 },
388 plotOptions: { 388 plotOptions: {
389 bar: { 389 bar: {
390 horizontal: false, 390 horizontal: false,
391 columnWidth: "25%", 391 columnWidth: "25%",
392 // endingShape: "rounded", 392 // endingShape: "rounded",
393 distributed: true 393 distributed: true
394 } 394 }
395 }, 395 },
396 responsive: [ 396 responsive: [
397 { 397 {
398 breakpoint: 480, 398 breakpoint: 480,
399 options: { 399 options: {
400 legend: { 400 legend: {
401 position: "bottom", 401 position: "bottom",
402 offsetX: -10, 402 offsetX: -10,
403 offsetY: 0 403 offsetY: 0
404 } 404 }
405 } 405 }
406 } 406 }
407 ], 407 ],
408 legend: { 408 legend: {
409 show: false 409 show: false
410 }, 410 },
411 colors: ["#7852cc", "#f9a825", "#ff8a89"], 411 colors: ["#7852cc", "#f9a825", "#ff8a89"],
412 dataLabels: { 412 dataLabels: {
413 enabled: false 413 enabled: false
414 }, 414 },
415 stroke: { 415 stroke: {
416 show: true, 416 show: true,
417 width: 2, 417 width: 2,
418 colors: ["transparent"] 418 colors: ["transparent"]
419 }, 419 },
420 xaxis: { 420 xaxis: {
421 categories: ["Fee", "Collections", "Expences"] 421 categories: ["Fee", "Collections", "Expences"]
422 }, 422 },
423 yaxis: { 423 yaxis: {
424 title: { 424 title: {
425 text: "" 425 text: ""
426 } 426 }
427 }, 427 },
428 fill: { 428 fill: {
429 opacity: 1 429 opacity: 1
430 }, 430 },
431 tooltip: { 431 tooltip: {
432 y: { 432 y: {
433 formatter: function(val, opts) { 433 formatter: function(val, opts) {
434 // console.log("opts",opts.w.config.xaxis.categories) 434 // console.log("opts",opts.w.config.xaxis.categories)
435 return "" + val + " "; 435 return "" + val + " ";
436 } 436 }
437 } 437 }
438 } 438 }
439 } 439 }
440 }; 440 };
441 }, 441 },
442 mounted() { 442 mounted() {
443 // = this.$store.state.schoolToken; 443 // = this.$store.state.schoolToken;
444 // console.log("this.$store.state.role", this.token); 444 // console.log("this.$store.state.role", this.token);
445 if (this.$store.state.role === "ADMIN") { 445 if (this.$store.state.role === "ADMIN") {
446 this.token = this.$store.state.token; 446 this.token = this.$store.state.token;
447 } else if (this.$store.state.schoolRole === "SUPERADMIN") { 447 } else if (this.$store.state.schoolRole === "SUPERADMIN") {
448 this.token = this.$store.state.schoolToken; 448 this.token = this.$store.state.schoolToken;
449 } else if (this.$store.state.role === "TEACHER") { 449 } else if (this.$store.state.role === "TEACHER") {
450 this.token = this.$store.state.token; 450 this.token = this.$store.state.token;
451 } else if (this.$store.state.role === "ACCOUNTANT") {
452 this.token = this.$store.state.token;
453 } else if (this.$store.state.role === "LIBRARIAN") {
454 this.token = this.$store.state.token;
451 } 455 }
452 // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken); 456 // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken);
453 // this.getData(); 457 // this.getData();
454 this.getStudents(); 458 this.getStudents();
455 this.getTeachers(); 459 this.getTeachers();
456 this.getParents(); 460 this.getParents();
457 this.getClasses(); 461 this.getClasses();
458 this.getNoticeData(); 462 this.getNoticeData();
459 this.getUserData(); 463 this.getUserData();
460 this.getFeesAndCollectionsData(); 464 this.getFeesAndCollectionsData();
461 this.getExpensesData(); 465 this.getExpensesData();
462 // this.getUsersList(); 466 // this.getUsersList();
463 }, 467 },
464 methods: { 468 methods: {
465 closeNotice() { 469 closeNotice() {
466 this.dialogNotice = false; 470 this.dialogNotice = false;
467 }, 471 },
468 profile() { 472 profile() {
469 // this.editedIndex = this.desserts.indexOf(item); 473 // this.editedIndex = this.desserts.indexOf(item);
470 // this.notice = Object.assign({}, item); 474 // this.notice = Object.assign({}, item);
471 // this.dialogNotice = true; 475 // this.dialogNotice = true;
472 this.$router.push({ name: "NoticeBoard" }); 476 this.$router.push({ name: "NoticeBoard" });
473 }, 477 },
474 date: function(date) { 478 date: function(date) {
475 return moment(date).format("MMMM DD, YYYY HH:mm"); 479 return moment(date).format("MMMM DD, YYYY HH:mm");
476 }, 480 },
477 refreshEvents() { 481 refreshEvents() {
478 this.$refs.calendar.$emit("refetch-events"); 482 this.$refs.calendar.$emit("refetch-events");
479 }, 483 },
480 removeEvent() { 484 removeEvent() {
481 this.$refs.calendar.$emit("remove-event", this.selected); 485 this.$refs.calendar.$emit("remove-event", this.selected);
482 this.selected = {}; 486 this.selected = {};
483 }, 487 },
484 eventSelected(event) { 488 eventSelected(event) {
485 this.selected = event; 489 this.selected = event;
486 console.log("this.selected", this.selected); 490 console.log("this.selected", this.selected);
487 }, 491 },
488 // eventDropStart: function(event) { 492 // eventDropStart: function(event) {
489 // event.editable = false; 493 // event.editable = false;
490 // }, 494 // },
491 eventCreated(...test) { 495 eventCreated(...test) {
492 console.log(test); 496 console.log(test);
493 }, 497 },
494 getStudents() { 498 getStudents() {
495 http() 499 http()
496 .get("/getStudentsList", { 500 .get("/getStudentsList", {
497 headers: { 501 headers: {
498 Authorization: "Bearer " + this.token 502 Authorization: "Bearer " + this.token
499 } 503 }
500 }) 504 })
501 .then(response => { 505 .then(response => {
502 this.students = response.data.data; 506 this.students = response.data.data;
503 this.showLoader = false; 507 this.showLoader = false;
504 }) 508 })
505 .catch(error => { 509 .catch(error => {
506 // console.log("err====>", err); 510 // console.log("err====>", err);
507 this.showLoader = false; 511 this.showLoader = false;
508 // if (error.response.status === 401) { 512 // if (error.response.status === 401) {
509 // this.$router.replace({ path: "/" }); 513 // this.$router.replace({ path: "/" });
510 // this.$store.dispatch("setToken", null); 514 // this.$store.dispatch("setToken", null);
511 // this.$store.dispatch("Id", null); 515 // this.$store.dispatch("Id", null);
512 // } 516 // }
513 }); 517 });
514 }, 518 },
515 getParents() { 519 getParents() {
516 http() 520 http()
517 .get("/getParentsList", { 521 .get("/getParentsList", {
518 headers: { 522 headers: {
519 Authorization: "Bearer " + this.token 523 Authorization: "Bearer " + this.token
520 } 524 }
521 }) 525 })
522 .then(response => { 526 .then(response => {
523 this.parents = response.data.data; 527 this.parents = response.data.data;
524 this.showLoader = false; 528 this.showLoader = false;
525 }) 529 })
526 .catch(error => { 530 .catch(error => {
527 // console.log("err====>", err); 531 // console.log("err====>", err);
528 this.showLoader = false; 532 this.showLoader = false;
529 // if (error.response.status === 401) { 533 // if (error.response.status === 401) {
530 // this.$router.replace({ path: "/" }); 534 // this.$router.replace({ path: "/" });
531 // this.$store.dispatch("setToken", null); 535 // this.$store.dispatch("setToken", null);
532 // this.$store.dispatch("Id", null); 536 // this.$store.dispatch("Id", null);
533 // } 537 // }
534 }); 538 });
535 }, 539 },
536 getTeachers() { 540 getTeachers() {
537 http() 541 http()
538 .get("/getTeachersList", { 542 .get("/getTeachersList", {
539 headers: { 543 headers: {
540 Authorization: "Bearer " + this.token 544 Authorization: "Bearer " + this.token
541 } 545 }
542 }) 546 })
543 .then(response => { 547 .then(response => {
544 this.teachers = response.data.data; 548 this.teachers = response.data.data;
545 this.showLoader = false; 549 this.showLoader = false;
546 }) 550 })
547 .catch(error => { 551 .catch(error => {
548 // console.log("err====>", err); 552 // console.log("err====>", err);
549 this.showLoader = false; 553 this.showLoader = false;
550 // if (error.response.status === 401) { 554 // if (error.response.status === 401) {
551 // this.$router.replace({ path: "/" }); 555 // this.$router.replace({ path: "/" });
552 // this.$store.dispatch("setToken", null); 556 // this.$store.dispatch("setToken", null);
553 // this.$store.dispatch("Id", null); 557 // this.$store.dispatch("Id", null);
554 // } 558 // }
555 }); 559 });
556 }, 560 },
557 getClasses() { 561 getClasses() {
558 http() 562 http()
559 .get("/getClassesList", { 563 .get("/getClassesList", {
560 headers: { 564 headers: {
561 Authorization: "Bearer " + this.token 565 Authorization: "Bearer " + this.token
562 } 566 }
563 }) 567 })
564 .then(response => { 568 .then(response => {
565 this.classes = response.data.data; 569 this.classes = response.data.data;
566 this.showLoader = false; 570 this.showLoader = false;
567 }) 571 })
568 .catch(error => { 572 .catch(error => {
569 this.showLoader = false; 573 this.showLoader = false;
570 // if (error.response.status === 401) { 574 // if (error.response.status === 401) {
571 // this.$router.replace({ path: "/" }); 575 // this.$router.replace({ path: "/" });
572 // this.$store.dispatch("setToken", null); 576 // this.$store.dispatch("setToken", null);
573 // this.$store.dispatch("Id", null); 577 // this.$store.dispatch("Id", null);
574 // this.$store.dispatch("Role", null); 578 // this.$store.dispatch("Role", null);
575 // } 579 // }
576 }); 580 });
577 }, 581 },
578 getNoticeData() { 582 getNoticeData() {
579 this.showLoader = true; 583 this.showLoader = true;
580 http() 584 http()
581 .get("/getEventsList", { 585 .get("/getEventsList", {
582 headers: { 586 headers: {
583 Authorization: "Bearer " + this.token 587 Authorization: "Bearer " + this.token
584 } 588 }
585 }) 589 })
586 .then(response => { 590 .then(response => {
587 this.noticeData = response.data.data; 591 this.noticeData = response.data.data;
588 this.showLoader = false; 592 this.showLoader = false;
589 }) 593 })
590 .catch(error => { 594 .catch(error => {
591 this.showLoader = false; 595 this.showLoader = false;
592 // if (error.response.status === 401) { 596 // if (error.response.status === 401) {
593 // this.$router.replace({ path: "/" }); 597 // this.$router.replace({ path: "/" });
594 // this.$store.dispatch("setToken", null); 598 // this.$store.dispatch("setToken", null);
595 // this.$store.dispatch("Id", null); 599 // this.$store.dispatch("Id", null);
596 // } 600 // }
597 }); 601 });
598 }, 602 },
599 getUserData() { 603 getUserData() {
600 // this.showLoader = true; 604 // this.showLoader = true;
601 http() 605 http()
602 .get("/getParticularUserDetail", { 606 .get("/getParticularUserDetail", {
603 headers: { 607 headers: {
604 Authorization: "Bearer " + this.token 608 Authorization: "Bearer " + this.token
605 } 609 }
606 }) 610 })
607 .then(response => { 611 .then(response => {
608 this.userData = response.data.data; 612 this.userData = response.data.data;
609 this.showLoader = false; 613 this.showLoader = false;
610 }) 614 })
611 .catch(error => { 615 .catch(error => {
612 this.showLoader = false; 616 this.showLoader = false;
613 // if (error.response.status === 401) { 617 // if (error.response.status === 401) {
614 // this.$router.replace({ path: "/" }); 618 // this.$router.replace({ path: "/" });
615 // this.$store.dispatch("setToken", null); 619 // this.$store.dispatch("setToken", null);
616 // this.$store.dispatch("Id", null); 620 // this.$store.dispatch("Id", null);
617 // } 621 // }
618 }); 622 });
619 }, 623 },
620 624
621 getFeesAndCollectionsData() { 625 getFeesAndCollectionsData() {
622 http() 626 http()
623 .get("/getTotalFeesAndCollections", { 627 .get("/getTotalFeesAndCollections", {
624 headers: { 628 headers: {
625 Authorization: "Bearer " + this.token 629 Authorization: "Bearer " + this.token
626 } 630 }
627 }) 631 })
628 .then(response => { 632 .then(response => {
629 this.feeData = response.data.data; 633 this.feeData = response.data.data;
630 // this.collectionData = response.data.data; 634 // this.collectionData = response.data.data;
631 this.series[0].data[0] = this.feeData.totalFees; 635 this.series[0].data[0] = this.feeData.totalFees;
632 this.series[0].data[1] = this.feeData.totalCollection; 636 this.series[0].data[1] = this.feeData.totalCollection;
633 console.log("this.series====", this.series); 637 console.log("this.series====", this.series);
634 638
635 this.showLoader = false; 639 this.showLoader = false;
636 }) 640 })
637 .catch(error => { 641 .catch(error => {
638 this.showLoader = false; 642 this.showLoader = false;
639 }); 643 });
640 }, 644 },
641 getExpensesData() { 645 getExpensesData() {
642 http() 646 http()
643 .get("/getTotalExpenses", { 647 .get("/getTotalExpenses", {
644 headers: { 648 headers: {
645 Authorization: "Bearer " + this.token 649 Authorization: "Bearer " + this.token
646 } 650 }
647 }) 651 })
648 .then(response => { 652 .then(response => {
649 this.expenseData = response.data.data; 653 this.expenseData = response.data.data;
650 // var array = response.data.data.sum; 654 // var array = response.data.data.sum;
651 this.series[0].data[2] = this.expenseData.sum; 655 this.series[0].data[2] = this.expenseData.sum;
652 // this.series = [ 656 // this.series = [
653 // { 657 // {
654 // name: "Total", 658 // name: "Total",
655 // data: array 659 // data: array
656 // } 660 // }
657 // ]; 661 // ];
658 // console.log("this.series====", this.series); 662 // console.log("this.series====", this.series);
659 this.showLoader = false; 663 this.showLoader = false;
660 }) 664 })
661 .catch(error => { 665 .catch(error => {
662 this.showLoader = false; 666 this.showLoader = false;
663 }); 667 });
664 } 668 }
665 } 669 }
666 }; 670 };
667 </script> 671 </script>
668 672
669 <style scoped> 673 <style scoped>
670 @import "fullcalendar/dist/fullcalendar.css"; 674 @import "fullcalendar/dist/fullcalendar.css";
671 </style> 675 </style>
src/pages/Report/studentReport.vue
1 <template> 1 <template>
2 <v-container fluid class="body-color"> 2 <v-container fluid class="body-color">
3 <!-- ****** Student Report TABLE****** --> 3 <!-- ****** Student Report TABLE****** -->
4 <v-card flat class="elevation-0 transparent"> 4 <v-card flat class="elevation-0 transparent">
5 <v-form ref="form" v-model="valid" lazy-validation> 5 <v-form ref="form" v-model="valid" lazy-validation>
6 <v-flex xs12 sm12 lg12> 6 <v-flex xs12 sm12 lg12>
7 <v-layout wrap> 7 <v-layout wrap>
8 <v-flex xs12 sm12 lg4> 8 <v-flex xs12 sm12 lg4>
9 <v-layout> 9 <v-layout>
10 <v-flex xs4 sm4 lg3 class="subheading mt-4"> 10 <v-flex xs4 sm4 lg3 class="subheading mt-4">
11 <label class="right">Report For :</label> 11 <label class="right">Report For :</label>
12 </v-flex> 12 </v-flex>
13 <v-flex xs7 sm6 lg8 class="ml-2"> 13 <v-flex xs7 sm6 lg8 class="ml-2">
14 <v-autocomplete 14 <v-autocomplete
15 v-model="report.form" 15 v-model="report.form"
16 label="Select your report for" 16 label="Select your report for"
17 :items="formList" 17 :items="formList"
18 item-text="name" 18 item-text="name"
19 item-value="value" 19 item-value="value"
20 @change="getReport(report.form)" 20 @change="getReport(report.form)"
21 :rules="formRules" 21 :rules="formRules"
22 required 22 required
23 ></v-autocomplete> 23 ></v-autocomplete>
24 </v-flex> 24 </v-flex>
25 </v-layout> 25 </v-layout>
26 </v-flex> 26 </v-flex>
27 <v-flex xs12 sm12 lg4 v-if="bloodGroup"> 27 <v-flex xs12 sm12 lg4 v-if="bloodGroup">
28 <v-layout> 28 <v-layout>
29 <v-flex xs4 sm4 lg4 class="subheading mt-4"> 29 <v-flex xs4 sm4 lg4 class="subheading mt-4">
30 <label class="right">Blood Group :</label> 30 <label class="right">Blood Group :</label>
31 </v-flex> 31 </v-flex>
32 <v-flex xs7 sm6 lg8 class="ml-2"> 32 <v-flex xs7 sm6 lg8 class="ml-2">
33 <v-autocomplete 33 <v-autocomplete
34 v-model="report.bloodGroup" 34 v-model="report.bloodGroup"
35 label="Select your Blood Group " 35 label="Select your Blood Group "
36 :items="bloodGroupList" 36 :items="bloodGroupList"
37 :rules="bloodGroupRules" 37 :rules="bloodGroupRules"
38 required 38 required
39 ></v-autocomplete> 39 ></v-autocomplete>
40 </v-flex> 40 </v-flex>
41 </v-layout> 41 </v-layout>
42 </v-flex> 42 </v-flex>
43 <v-flex xs12 sm12 lg4 v-if="genderShow"> 43 <v-flex xs12 sm12 lg4 v-if="genderShow">
44 <v-layout> 44 <v-layout>
45 <v-flex xs4 sm4 lg4 class="subheading mt-4"> 45 <v-flex xs4 sm4 lg4 class="subheading mt-4">
46 <label class="right">Gender:</label> 46 <label class="right">Gender:</label>
47 </v-flex> 47 </v-flex>
48 <v-flex xs7 sm6 lg8 class="ml-2"> 48 <v-flex xs7 sm6 lg8 class="ml-2">
49 <v-autocomplete 49 <v-autocomplete
50 v-model="report.gender" 50 v-model="report.gender"
51 label="Select your gender " 51 label="Select your gender "
52 :items="gender" 52 :items="gender"
53 :rules="genderRules" 53 :rules="genderRules"
54 required 54 required
55 ></v-autocomplete> 55 ></v-autocomplete>
56 </v-flex> 56 </v-flex>
57 </v-layout> 57 </v-layout>
58 </v-flex> 58 </v-flex>
59 <v-flex xs12 sm12 lg4 v-if="TransportShow"> 59 <v-flex xs12 sm12 lg4 v-if="TransportShow">
60 <v-layout> 60 <v-layout>
61 <v-flex xs4 sm4 lg4 class="subheading mt-4"> 61 <v-flex xs4 sm4 lg4 class="subheading mt-4">
62 <label class="right">Route:</label> 62 <label class="right">Route:</label>
63 </v-flex> 63 </v-flex>
64 <v-flex xs7 sm6 lg8 class="ml-2"> 64 <v-flex xs7 sm6 lg8 class="ml-2">
65 <v-autocomplete 65 <v-autocomplete
66 v-model="report.route" 66 v-model="report.route"
67 label="Select your gender " 67 label="Select your gender "
68 :items="route" 68 :items="route"
69 :rules="routeRules" 69 :rules="routeRules"
70 required 70 required
71 ></v-autocomplete> 71 ></v-autocomplete>
72 </v-flex> 72 </v-flex>
73 </v-layout> 73 </v-layout>
74 </v-flex> 74 </v-flex>
75 <v-flex xs12 sm12 lg4 v-if="HostelShow"> 75 <v-flex xs12 sm12 lg4 v-if="HostelShow">
76 <v-layout> 76 <v-layout>
77 <v-flex xs4 sm4 lg4 class="subheading mt-4"> 77 <v-flex xs4 sm4 lg4 class="subheading mt-4">
78 <label class="right">Hostel:</label> 78 <label class="right">Hostel:</label>
79 </v-flex> 79 </v-flex>
80 <v-flex xs7 sm6 lg8 class="ml-2"> 80 <v-flex xs7 sm6 lg8 class="ml-2">
81 <v-autocomplete 81 <v-autocomplete
82 v-model="report.route" 82 v-model="report.route"
83 label="Select your hostel " 83 label="Select your hostel "
84 :items="hostelList" 84 :items="hostelList"
85 :rules="hostelRules" 85 :rules="hostelRules"
86 required 86 required
87 ></v-autocomplete> 87 ></v-autocomplete>
88 </v-flex> 88 </v-flex>
89 </v-layout> 89 </v-layout>
90 </v-flex> 90 </v-flex>
91 <v-flex xs12 sm12 lg4 v-if="countryShow"> 91 <v-flex xs12 sm12 lg4 v-if="countryShow">
92 <v-layout> 92 <v-layout>
93 <v-flex xs4 sm4 lg4 class="subheading mt-4"> 93 <v-flex xs4 sm4 lg4 class="subheading mt-4">
94 <label class="right">Country :</label> 94 <label class="right">Country :</label>
95 </v-flex> 95 </v-flex>
96 <v-flex xs7 sm6 lg8 class="ml-2"> 96 <v-flex xs7 sm6 lg8 class="ml-2">
97 <v-autocomplete 97 <v-autocomplete
98 v-model="report.country" 98 v-model="report.country"
99 label="Select your Country " 99 label="Select your Country "
100 :items="countryList" 100 :items="countryList"
101 :rules="countryRules" 101 :rules="countryRules"
102 required 102 required
103 ></v-autocomplete> 103 ></v-autocomplete>
104 </v-flex> 104 </v-flex>
105 </v-layout> 105 </v-layout>
106 </v-flex> 106 </v-flex>
107 <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow"> 107 <!-- <v-flex xs12 sm12 lg4 v-show="BirthdayShow">
108 <v-layout> 108 <v-layout>
109 <v-flex xs3 sm6 lg4 class="subheading mt-4"> 109 <v-flex xs3 sm6 lg4 class="subheading mt-4">
110 <label class="right">Country :</label> 110 <label class="right">Country :</label>
111 </v-flex> 111 </v-flex>
112 <v-flex xs12 sm12 lg8 class="ml-2"> 112 <v-flex xs12 sm12 lg8 class="ml-2">
113 <v-select 113 <v-select
114 v-model="report.country" 114 v-model="report.country"
115 label="Select your Country " 115 label="Select your Country "
116 :items="countryList" 116 :items="countryList"
117 required 117 required
118 ></v-select> 118 ></v-select>
119 </v-flex> 119 </v-flex>
120 </v-layout> 120 </v-layout>
121 </v-flex>--> 121 </v-flex>-->
122 <v-flex xs12 sm12 lg4 v-if="classShow"> 122 <v-flex xs12 sm12 lg4 v-if="classShow">
123 <v-layout> 123 <v-layout>
124 <v-flex xs4 sm4 lg3 class="subheading mt-4"> 124 <v-flex xs4 sm4 lg3 class="subheading mt-4">
125 <label class="right">Class:</label> 125 <label class="right">Class:</label>
126 </v-flex> 126 </v-flex>
127 <v-flex xs7 sm6 lg8 class="ml-2"> 127 <v-flex xs7 sm6 lg8 class="ml-2">
128 <v-autocomplete 128 <v-autocomplete
129 v-model="report.classId" 129 v-model="report.classId"
130 label="Select your class" 130 label="Select your class"
131 type="text" 131 type="text"
132 :rules="classRules" 132 :rules="classRules"
133 :items="classList" 133 :items="classList"
134 item-text="classNum" 134 item-text="classNum"
135 item-value="_id" 135 item-value="_id"
136 @change="getSections(report.classId)" 136 @change="getSections(report.classId)"
137 required 137 required
138 ></v-autocomplete> 138 ></v-autocomplete>
139 </v-flex> 139 </v-flex>
140 </v-layout> 140 </v-layout>
141 </v-flex> 141 </v-flex>
142 <v-flex xs12 sm12 lg4 v-if="sectionShow"> 142 <v-flex xs12 sm12 lg4 v-if="sectionShow">
143 <v-layout> 143 <v-layout>
144 <v-flex xs4 sm4 lg3 class="subheading mt-4"> 144 <v-flex xs4 sm4 lg3 class="subheading mt-4">
145 <label class="right">Section:</label> 145 <label class="right">Section:</label>
146 </v-flex> 146 </v-flex>
147 <v-flex xs7 sm6 lg8 class="ml-2"> 147 <v-flex xs7 sm6 lg8 class="ml-2">
148 <v-autocomplete 148 <v-autocomplete
149 :items="addSection" 149 :items="addSection"
150 label="Select your Section" 150 label="Select your Section"
151 v-model="report.sectionId" 151 v-model="report.sectionId"
152 :rules="sectionRules" 152 :rules="sectionRules"
153 item-text="name" 153 item-text="name"
154 item-value="_id" 154 item-value="_id"
155 name="Select Section" 155 name="Select Section"
156 required 156 required
157 ></v-autocomplete> 157 ></v-autocomplete>
158 </v-flex> 158 </v-flex>
159 </v-layout> 159 </v-layout>
160 </v-flex> 160 </v-flex>
161 <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5"> 161 <v-flex xs12 sm12 lg4 class="hidden-xs-only hidden-sm-only pl-5">
162 <v-btn 162 <v-btn
163 @click="getStudents" 163 @click="getStudents"
164 round 164 round
165 dark 165 dark
166 :loading="loading" 166 :loading="loading"
167 class="open-dialog-button mt-3 ml-5" 167 class="open-dialog-button mt-3 ml-5"
168 >Get Report</v-btn> 168 >Get Report</v-btn>
169 </v-flex> 169 </v-flex>
170 <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only"> 170 <v-flex xs12 sm12 lg4 class="hidden-lg-only hidden-md-only hidden-xl-only">
171 <v-btn 171 <v-btn
172 @click="getStudents" 172 @click="getStudents"
173 round 173 round
174 dark 174 dark
175 :loading="loading" 175 :loading="loading"
176 class="mt-3 right" 176 class="mt-3 right"
177 >Get Report</v-btn> 177 >Get Report</v-btn>
178 </v-flex> 178 </v-flex>
179 </v-layout> 179 </v-layout>
180 </v-flex> 180 </v-flex>
181 </v-form> 181 </v-form>
182 </v-card> 182 </v-card>
183 <v-layout v-show="showTable"> 183 <v-layout v-show="showTable">
184 <v-flex xs12> 184 <v-flex xs12>
185 <v-card class="transparent elevation-0"> 185 <v-card class="transparent elevation-0">
186 <v-layout> 186 <v-layout>
187 <v-flex xs12> 187 <v-flex xs12>
188 <v-btn class="open-dialog-button right" round dark @click="printStudentReport()"> 188 <v-btn class="open-dialog-button right" round dark @click="printStudentReport()">
189 Print 189 Print
190 <v-icon right dark>print</v-icon> 190 <v-icon right dark>print</v-icon>
191 </v-btn> 191 </v-btn>
192 </v-flex> 192 </v-flex>
193 </v-layout> 193 </v-layout>
194 <v-layout> 194 <v-layout>
195 <v-flex xs12 sm12 md12 class="text-xs-center"> 195 <v-flex xs12 sm12 md12 class="text-xs-center">
196 <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> 196 <!-- <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> -->
197 <v-avatar>
198 <img :src="userData.schoolLogoUrl" v-if="userData.schoolLogoUrl" />
199 <img src="/static/schoolIcons/INTRACK_White.png" v-else-if="!userData.schoolLogoUrl" />
200 </v-avatar>
197 <p class="title">{{ userData.name }}</p> 201 <p class="title">{{ userData.name }}</p>
198 <p>{{ userData.address }}</p> 202 <p>{{ userData.address }}</p>
199 </v-flex> 203 </v-flex>
200 <v-flex xs12 sm12 md12 class="text-xs-center" v-for="(studentReport,i) in getStudentsReportList" :key="i"> 204 <v-flex xs12 sm12 md12 class="text-xs-center" v-for="(studentReport,i) in getStudentsReportList" :key="i">
201 <v-avatar> 205 <v-avatar>
202 <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> 206 <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" />
203 <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> 207 <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" />
204 </v-avatar> 208 </v-avatar>
205 <p 209 <p
206 style="font-size:20px;margin:0px;margin-bottom:4px;" 210 style="font-size:20px;margin:0px;margin-bottom:4px;"
207 >{{ studentReport.name }}</p> 211 >{{ studentReport.name }}</p>
208 <p 212 <p
209 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" 213 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;"
210 > Class : {{ studentReport.classId.classNum }}</p> 214 > Class : {{ studentReport.classId.classNum }}</p>
211 <p 215 <p
212 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" 216 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;"
213 > Section : {{ studentReport.sectionId.name }}</p> 217 > Section : {{ studentReport.sectionId.name }}</p>
214 <p 218 <p
215 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;" 219 style="font-size:20px;color: #707478;margin:0px;margin-bottom:4px;"
216 > RollNo : {{ studentReport.rollNo }}</p> 220 > RollNo : {{ studentReport.rollNo }}</p>
217 </v-flex> 221 </v-flex>
218 </v-layout> 222 </v-layout>
219 <v-data-table 223 <v-data-table
220 :headers="headers" 224 :headers="headers"
221 :items="getStudentsReportList" 225 :items="getStudentsReportList"
222 :pagination.sync="pagination" 226 :pagination.sync="pagination"
223 :search="search" 227 :search="search"
224 > 228 >
225 <template slot="items" slot-scope="props"> 229 <template slot="items" slot-scope="props">
226 <tr class="tr"> 230 <tr class="tr">
227 <td class="td td-row">{{ props.index + 1}}</td> 231 <td class="td td-row">{{ props.index + 1}}</td>
228 <td id="td" class="text-xs-center"> 232 <td id="td" class="text-xs-center">
229 <v-avatar> 233 <v-avatar>
230 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> 234 <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" />
231 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> 235 <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" />
232 </v-avatar> 236 </v-avatar>
233 </td> 237 </td>
234 <td class="td td-row text-xs-center">{{ props.item.name}}</td> 238 <td class="td td-row text-xs-center">{{ props.item.name}}</td>
235 <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> 239 <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td>
236 <td class="td td-row text-xs-center">{{ props.item.email }}</td> 240 <td class="td td-row text-xs-center">{{ props.item.email }}</td>
237 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> 241 <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td>
238 <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> 242 <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td>
239 </tr> 243 </tr>
240 </template> 244 </template>
241 <v-alert 245 <v-alert
242 slot="no-results" 246 slot="no-results"
243 :value="true" 247 :value="true"
244 color="error" 248 color="error"
245 icon="warning" 249 icon="warning"
246 >Your search for "{{ search }}" found no results.</v-alert> 250 >Your search for "{{ search }}" found no results.</v-alert>
247 </v-data-table> 251 </v-data-table>
248 </v-card> 252 </v-card>
249 <v-flex xs12 id="printMe" v-show="hidePrintStudentReport"> 253 <v-flex xs12 id="printMe" v-show="hidePrintStudentReport">
250 <v-layout> 254 <v-layout>
251 <v-flex xs12 style="text-align:center;margin-bottom:10px"> 255 <v-flex xs12 style="text-align:center;margin-bottom:10px">
252 <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> 256 <img :src="userData.schoolLogoUrl" width="140" alt="logo" />
253 <p class="title">{{ userData.name }}</p> 257 <p class="title">{{ userData.name }}</p>
254 <p>{{ userData.address }}</p> 258 <p>{{ userData.address }}</p>
255 </v-flex> 259 </v-flex>
256 </v-layout> 260 </v-layout>
257 <table 261 <table
258 class="mb-5 tableRsponsive feeTypeTable" 262 class="mb-5 tableRsponsive feeTypeTable"
259 style="border: 1px solid lightgrey; 263 style="border: 1px solid lightgrey;
260 border-collapse: collapse;!important 264 border-collapse: collapse;!important
261 table-layout: auto !important; 265 table-layout: auto !important;
262 width: 100% !important;" 266 width: 100% !important;"
263 > 267 >
264 <thead style="border: 1px solid lightgrey !important;"> 268 <thead style="border: 1px solid lightgrey !important;">
265 <tr style="border: 1px solid lightgrey !important;padding:4px;"> 269 <tr style="border: 1px solid lightgrey !important;padding:4px;">
266 <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td> 270 <td style="border: 1px solid lightgrey !important;padding: 6px;">Profile Pic</td>
267 <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td> 271 <td style="border: 1px solid lightgrey !important;padding: 6px;">Name</td>
268 <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td> 272 <td style="border: 1px solid lightgrey !important;padding: 6px;">Roll No</td>
269 <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td> 273 <td style="border: 1px solid lightgrey !important;padding: 6px;">Email</td>
270 <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td> 274 <td style="border: 1px solid lightgrey !important;padding: 6px;">Class</td>
271 <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td> 275 <td style="border: 1px solid lightgrey !important;padding: 6px;">Section</td>
272 </tr> 276 </tr>
273 </thead> 277 </thead>
274 <tbody style="border: 1px solid lightgrey !important;"> 278 <tbody style="border: 1px solid lightgrey !important;">
275 <tr v-for="(studentReport,i) in getStudentsReportList" :key="i"> 279 <tr v-for="(studentReport,i) in getStudentsReportList" :key="i">
276 <td style="border: 1px solid lightgrey !important;padding: 6px;"> 280 <td style="border: 1px solid lightgrey !important;padding: 6px;">
277 <v-avatar> 281 <v-avatar>
278 <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" /> 282 <img :src="studentReport.profilePicUrl" v-if="studentReport.profilePicUrl" />
279 <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" /> 283 <img src="/static/icon/user.png" v-else-if="!studentReport.profilePicUrl" />
280 </v-avatar> 284 </v-avatar>
281 </td> 285 </td>
282 <td 286 <td
283 style="border: 1px solid lightgrey !important;padding: 6px;" 287 style="border: 1px solid lightgrey !important;padding: 6px;"
284 >{{ studentReport.name }}</td> 288 >{{ studentReport.name }}</td>
285 <!-- <td 289 <!-- <td
286 style="border: 1px solid lightgrey !important;padding: 6px;" 290 style="border: 1px solid lightgrey !important;padding: 6px;"
287 >{{ studentReport.rollNo }}</td>--> 291 >{{ studentReport.rollNo }}</td>-->
288 <td 292 <td
289 style="border: 1px solid lightgrey !important;padding: 6px;" 293 style="border: 1px solid lightgrey !important;padding: 6px;"
290 >{{ studentReport.email }}</td> 294 >{{ studentReport.email }}</td>
291 <td 295 <td
292 style="border: 1px solid lightgrey !important;padding: 6px;" 296 style="border: 1px solid lightgrey !important;padding: 6px;"
293 >{{ studentReport.classId.classNum }}</td> 297 >{{ studentReport.classId.classNum }}</td>
294 <td 298 <td
295 style="border: 1px solid lightgrey !important;padding: 6px;" 299 style="border: 1px solid lightgrey !important;padding: 6px;"
296 >{{ studentReport.sectionId.name }}</td> 300 >{{ studentReport.sectionId.name }}</td>
297 </tr> 301 </tr>
298 </tbody> 302 </tbody>
299 </table> 303 </table>
300 </v-flex> 304 </v-flex>
301 </v-flex> 305 </v-flex>
302 </v-layout> 306 </v-layout>
303 <div class="loader" v-if="showLoader"> 307 <div class="loader" v-if="showLoader">
304 <v-progress-circular indeterminate color="white"></v-progress-circular> 308 <v-progress-circular indeterminate color="white"></v-progress-circular>
305 </div> 309 </div>
306 </v-container> 310 </v-container>
307 </template> 311 </template>
308 312
309 <script> 313 <script>
310 import http from "@/Services/http.js"; 314 import http from "@/Services/http.js";
311 import countryList from "@/script/country.js"; 315 import countryList from "@/script/country.js";
312 316
313 import moment from "moment"; 317 import moment from "moment";
314 318
315 export default { 319 export default {
316 data: () => ({ 320 data: () => ({
317 snackbar: false, 321 snackbar: false,
318 color: "", 322 color: "",
319 y: "top", 323 y: "top",
320 x: "right", 324 x: "right",
321 mode: "", 325 mode: "",
322 timeout: 10000, 326 timeout: 10000,
323 text: "", 327 text: "",
324 loading: false, 328 loading: false,
325 valid: true, 329 valid: true,
326 search: "", 330 search: "",
327 showLoader: false, 331 showLoader: false,
328 bloodGroup: false, 332 bloodGroup: false,
329 genderShow: false, 333 genderShow: false,
330 countryShow: false, 334 countryShow: false,
331 TransportShow: false, 335 TransportShow: false,
332 HostelShow: false, 336 HostelShow: false,
333 BirthdayShow: false, 337 BirthdayShow: false,
334 sectionShow: false, 338 sectionShow: false,
335 showTable: false, 339 showTable: false,
336 classShow: true, 340 classShow: true,
337 hidePrintStudentReport: false, 341 hidePrintStudentReport: false,
338 addSection: [], 342 addSection: [],
339 pagination: { 343 pagination: {
340 rowsPerPage: 10 344 rowsPerPage: 10
341 }, 345 },
342 formRules: [v => !!v || "Form For is required"], 346 formRules: [v => !!v || "Form For is required"],
343 bloodGroupRules: [v => !!v || "Blood group is required"], 347 bloodGroupRules: [v => !!v || "Blood group is required"],
344 classRules: [v => !!v || "Class is required"], 348 classRules: [v => !!v || "Class is required"],
345 sectionRules: [v => !!v || "Class is required"], 349 sectionRules: [v => !!v || "Class is required"],
346 genderRules: [v => !!v || "Gender is required"], 350 genderRules: [v => !!v || "Gender is required"],
347 routeRules: [v => !!v || "RouteI is required"], 351 routeRules: [v => !!v || "RouteI is required"],
348 hostelRules: [v => !!v || "Hostel is required"], 352 hostelRules: [v => !!v || "Hostel is required"],
349 countryRules: [v => !!v || "Country is required"], 353 countryRules: [v => !!v || "Country is required"],
350 headers: [ 354 headers: [
351 { 355 {
352 align: "", 356 align: "",
353 text: "No", 357 text: "No",
354 sortable: false, 358 sortable: false,
355 value: "No" 359 value: "No"
356 }, 360 },
357 { 361 {
358 text: "Profile Pic", 362 text: "Profile Pic",
359 vaue: "profilePicUrl", 363 vaue: "profilePicUrl",
360 sortable: false, 364 sortable: false,
361 align: "center" 365 align: "center"
362 }, 366 },
363 { 367 {
364 text: "Name", 368 text: "Name",
365 vaue: "name", 369 vaue: "name",
366 sortable: false, 370 sortable: false,
367 align: "center" 371 align: "center"
368 }, 372 },
369 { 373 {
370 text: "Roll No.", 374 text: "Roll No.",
371 value: "rollNo", 375 value: "rollNo",
372 sortable: false, 376 sortable: false,
373 align: "center" 377 align: "center"
374 }, 378 },
375 { 379 {
376 text: "Email", 380 text: "Email",
377 value: "email", 381 value: "email",
378 sortable: false, 382 sortable: false,
379 align: "center" 383 align: "center"
380 }, 384 },
381 { 385 {
382 text: "Class", 386 text: "Class",
383 value: "classId", 387 value: "classId",
384 sortable: false, 388 sortable: false,
385 align: "center" 389 align: "center"
386 }, 390 },
387 { 391 {
388 text: "Section", 392 text: "Section",
389 value: "sectionId", 393 value: "sectionId",
390 sortable: false, 394 sortable: false,
391 align: "center" 395 align: "center"
392 } 396 }
393 ], 397 ],
394 classList: [], 398 classList: [],
395 report: {}, 399 report: {},
396 userData: {}, 400 userData: {},
397 markData: [], 401 markData: [],
398 formList: [ 402 formList: [
399 { 403 {
400 name: "Blood Group", 404 name: "Blood Group",
401 value: "bloodGroup" 405 value: "bloodGroup"
402 }, 406 },
403 "Country", 407 "Country",
404 "Gender", 408 "Gender",
405 "Transport", 409 "Transport",
406 "Hostel" 410 "Hostel"
407 // "Birthday" 411 // "Birthday"
408 ], 412 ],
409 bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], 413 bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"],
410 gender: ["Male", "female"], 414 gender: ["Male", "female"],
411 getStudentsReportList: [], 415 getStudentsReportList: [],
412 studentReort: "", 416 studentReort: "",
413 countryList: [], 417 countryList: [],
414 route: [], 418 route: [],
415 Hostel: [], 419 Hostel: [],
416 hostelList: [], 420 hostelList: [],
417 token: "" 421 token: ""
418 }), 422 }),
419 methods: { 423 methods: {
420 clear() { 424 clear() {
421 this.$refs.form.reset(); 425 this.$refs.form.reset();
422 }, 426 },
423 getClass() { 427 getClass() {
424 this.showLoader = true; 428 this.showLoader = true;
425 http() 429 http()
426 .get("/getClassesList", { 430 .get("/getClassesList", {
427 headers: { Authorization: "Bearer " + this.token } 431 headers: { Authorization: "Bearer " + this.token }
428 }) 432 })
429 .then(response => { 433 .then(response => {
430 this.classList = response.data.data; 434 this.classList = response.data.data;
431 this.showLoader = false; 435 this.showLoader = false;
432 }) 436 })
433 .catch(err => { 437 .catch(err => {
434 this.showLoader = false; 438 this.showLoader = false;
435 if (error.response.status === 401) { 439 if (error.response.status === 401) {
436 this.$router.replace({ path: "/" }); 440 this.$router.replace({ path: "/" });
437 this.$store.dispatch("setToken", null); 441 this.$store.dispatch("setToken", null);
438 this.$store.dispatch("Id", null); 442 this.$store.dispatch("Id", null);
439 this.$store.dispatch("Role", null); 443 this.$store.dispatch("Role", null);
440 } 444 }
441 }); 445 });
442 }, 446 },
443 getReport() { 447 getReport() {
444 if (this.report.form === "bloodGroup") { 448 if (this.report.form === "bloodGroup") {
445 this.bloodGroup = true; 449 this.bloodGroup = true;
446 this.genderShow = false; 450 this.genderShow = false;
447 this.TransportShow = false; 451 this.TransportShow = false;
448 this.countryShow = false; 452 this.countryShow = false;
449 this.BirthdayShow = false; 453 this.BirthdayShow = false;
450 this.HostelShow = false; 454 this.HostelShow = false;
451 this.classShow = false; 455 this.classShow = false;
452 this.sectionShow = false; 456 this.sectionShow = false;
453 } 457 }
454 if (this.report.form === "Gender") { 458 if (this.report.form === "Gender") {
455 this.genderShow = true; 459 this.genderShow = true;
456 this.bloodGroup = false; 460 this.bloodGroup = false;
457 this.TransportShow = false; 461 this.TransportShow = false;
458 this.BirthdayShow = false; 462 this.BirthdayShow = false;
459 this.countryShow = false; 463 this.countryShow = false;
460 this.HostelShow = false; 464 this.HostelShow = false;
461 this.classShow = true; 465 this.classShow = true;
462 } 466 }
463 if (this.report.form === "Transport") { 467 if (this.report.form === "Transport") {
464 this.TransportShow = true; 468 this.TransportShow = true;
465 this.genderShow = false; 469 this.genderShow = false;
466 this.bloodGroup = false; 470 this.bloodGroup = false;
467 this.BirthdayShow = false; 471 this.BirthdayShow = false;
468 this.countryShow = false; 472 this.countryShow = false;
469 this.HostelShow = false; 473 this.HostelShow = false;
470 this.classShow = true; 474 this.classShow = true;
471 } 475 }
472 if (this.report.form === "Country") { 476 if (this.report.form === "Country") {
473 this.countryShow = true; 477 this.countryShow = true;
474 this.TransportShow = false; 478 this.TransportShow = false;
475 this.genderShow = false; 479 this.genderShow = false;
476 this.bloodGroup = false; 480 this.bloodGroup = false;
477 this.BirthdayShow = false; 481 this.BirthdayShow = false;
478 this.HostelShow = false; 482 this.HostelShow = false;
479 this.classShow = true; 483 this.classShow = true;
480 } 484 }
481 if (this.report.form === "Hostel") { 485 if (this.report.form === "Hostel") {
482 this.HostelShow = true; 486 this.HostelShow = true;
483 this.TransportShow = false; 487 this.TransportShow = false;
484 this.genderShow = false; 488 this.genderShow = false;
485 this.bloodGroup = false; 489 this.bloodGroup = false;
486 this.countryShow = false; 490 this.countryShow = false;
487 this.BirthdayShow = false; 491 this.BirthdayShow = false;
488 this.classShow = true; 492 this.classShow = true;
489 } 493 }
490 if (this.report.form === "Birthday") { 494 if (this.report.form === "Birthday") {
491 this.BirthdayShow = true; 495 this.BirthdayShow = true;
492 this.TransportShow = false; 496 this.TransportShow = false;
493 this.genderShow = false; 497 this.genderShow = false;
494 this.HostelShow = false; 498 this.HostelShow = false;
495 this.bloodGroup = false; 499 this.bloodGroup = false;
496 this.countryShow = false; 500 this.countryShow = false;
497 this.classShow = true; 501 this.classShow = true;
498 } 502 }
499 }, 503 },
500 getStudents() { 504 getStudents() {
501 if (this.$refs.form.validate()) { 505 if (this.$refs.form.validate()) {
502 this.showLoader = true; 506 this.showLoader = true;
503 http() 507 http()
504 .get("/getStudentReport", { 508 .get("/getStudentReport", {
505 params: { 509 params: {
506 bloodGroup: this.report.bloodGroup, 510 bloodGroup: this.report.bloodGroup,
507 country: this.report.country, 511 country: this.report.country,
508 gender: this.report.gender, 512 gender: this.report.gender,
509 classId: this.report.classId, 513 classId: this.report.classId,
510 sectionId: this.report.sectionId 514 sectionId: this.report.sectionId
511 }, 515 },
512 headers: { Authorization: "Bearer " + this.token } 516 headers: { Authorization: "Bearer " + this.token }
513 }) 517 })
514 .then(response => { 518 .then(response => {
515 this.getStudentsReportList = response.data.data; 519 this.getStudentsReportList = response.data.data;
516 this.showTable = true; 520 this.showTable = true;
517 this.showLoader = false; 521 this.showLoader = false;
518 this.clear(); 522 this.clear();
519 // console.log("getSectionsList=====>", response.data.data); 523 // console.log("getSectionsList=====>", response.data.data);
520 }) 524 })
521 .catch(error => { 525 .catch(error => {
522 console.log("err====>", error); 526 console.log("err====>", error);
523 this.showLoader = false; 527 this.showLoader = false;
524 }); 528 });
525 } 529 }
526 }, 530 },
527 getSections() { 531 getSections() {
528 this.sectionShow = true; 532 this.sectionShow = true;
529 this.showLoader = true; 533 this.showLoader = true;
530 http() 534 http()
531 .get( 535 .get(
532 "/getSectionsList", 536 "/getSectionsList",
533 { params: { classId: this.report.classId } }, 537 { params: { classId: this.report.classId } },
534 { 538 {
535 headers: { Authorization: "Bearer " + this.token } 539 headers: { Authorization: "Bearer " + this.token }
536 } 540 }
537 ) 541 )
538 .then(response => { 542 .then(response => {
539 this.addSection = response.data.data; 543 this.addSection = response.data.data;
540 this.showLoader = false; 544 this.showLoader = false;
541 }) 545 })
542 .catch(error => { 546 .catch(error => {
543 console.log("err====>", error); 547 console.log("err====>", error);
544 this.showLoader = false; 548 this.showLoader = false;
545 }); 549 });
546 }, 550 },
547 // getFormList() { 551 // getFormList() {
548 // this.showLoader = true; 552 // this.showLoader = true;
549 // http() 553 // http()
550 // .get("/getExamsList", { 554 // .get("/getExamsList", {
551 // headers: { Authorization: "Bearer " + this.token } 555 // headers: { Authorization: "Bearer " + this.token }
552 // }) 556 // })
553 // .then(response => { 557 // .then(response => {
554 // this.formList = response.data.data; 558 // this.formList = response.data.data;
555 // this.showLoader = false; 559 // this.showLoader = false;
556 // }) 560 // })
557 // .catch(error => { 561 // .catch(error => {
558 // // console.log("err====>", err); 562 // // console.log("err====>", err);
559 // this.showLoader = false; 563 // this.showLoader = false;
560 // this.snackbar = true; 564 // this.snackbar = true;
561 // this.text = error.response.data.message; 565 // this.text = error.response.data.message;
562 // if (error.response.status === 401) { 566 // if (error.response.status === 401) {
563 // this.$router.replace({ path: "/" }); 567 // this.$router.replace({ path: "/" });
564 // this.$store.dispatch("setToken", null); 568 // this.$store.dispatch("setToken", null);
565 // this.$store.dispatch("Id", null); 569 // this.$store.dispatch("Id", null);
566 // } 570 // }
567 // }); 571 // });
568 // } 572 // }
569 printStudentReport() { 573 printStudentReport() {
570 this.$htmlToPaper("printMe"); 574 this.$htmlToPaper("printMe");
571 }, 575 },
572 getUserData() { 576 getUserData() {
573 http() 577 http()
574 .get("/getParticularUserDetail") 578 .get("/getParticularUserDetail")
575 .then(response => { 579 .then(response => {
576 this.userData = response.data.data; 580 this.userData = response.data.data;
577 }) 581 })
578 .catch(error => { 582 .catch(error => {
579 // if (error.response.status === 401) { 583 // if (error.response.status === 401) {
580 // this.$router.replace({ path: "/" }); 584 // this.$router.replace({ path: "/" });
581 // this.$store.dispatch("setToken", null); 585 // this.$store.dispatch("setToken", null);
582 // this.$store.dispatch("Id", null); 586 // this.$store.dispatch("Id", null);
583 // } 587 // }
584 }); 588 });
585 } 589 }
586 }, 590 },
587 mounted() { 591 mounted() {
588 this.token = this.$store.state.token; 592 this.token = this.$store.state.token;
589 const getCountryList = countryList(); 593 const getCountryList = countryList();
590 this.countryList = getCountryList; 594 this.countryList = getCountryList;
591 this.getUserData(); 595 this.getUserData();
592 // console.log("getindustryList", this.countryList); 596 // console.log("getindustryList", this.countryList);
593 // this.getExamList(); 597 // this.getExamList();
594 this.getClass(); 598 this.getClass();
595 }, 599 },
596 created() { 600 created() {
597 this.$root.$on("app:search", search => { 601 this.$root.$on("app:search", search => {
598 this.search = search; 602 this.search = search;
599 }); 603 });
600 }, 604 },
601 beforeDestroy() { 605 beforeDestroy() {
602 // dont forget to remove the listener 606 // dont forget to remove the listener
603 this.$root.$off("app:search"); 607 this.$root.$off("app:search");
604 } 608 }
605 }; 609 };
606 </script> 610 </script>
607 <style scoped> 611 <style scoped>
608 .active { 612 .active {
609 background-color: gray; 613 background-color: gray;
610 color: white !important; 614 color: white !important;
611 } 615 }
612 .activebtn { 616 .activebtn {
613 color: black !important; 617 color: black !important;
614 } 618 }
615 </style> 619 </style>
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',
344 meta: {},
345 name: 'Make Payment',
346 props: (route) => ({ type: route.query.type }),
347 component: () =>
348 import (
349 `@/pages/Payroll/makePayment.vue`
350 )
351 },
352 {
343 path: '/AttendenceUser', 353 path: '/AttendenceUser',
344 meta: {}, 354 meta: {},
345 name: 'User Attendence', 355 name: 'User Attendence',
346 props: (route) => ({ type: route.query.type }), 356 props: (route) => ({ type: route.query.type }),
347 component: () => 357 component: () =>
348 import ( 358 import (
349 /* webpackChunkName: "routes" */ 359 /* webpackChunkName: "routes" */
350 /* webpackMode: "lazy-once" */ 360 /* webpackMode: "lazy-once" */
351 `@/pages/Attendence/userAttendence.vue` 361 `@/pages/Attendence/userAttendence.vue`
352 ) 362 )
353 }, 363 },
354 { 364 {
355 path: '/feeTypes', 365 path: '/feeTypes',
356 meta: {}, 366 meta: {},
357 name: 'Fee Types', 367 name: 'Fee Types',
358 props: (route) => ({ type: route.query.type }), 368 props: (route) => ({ type: route.query.type }),
359 component: () => 369 component: () =>
360 import ( 370 import (
361 /* webpackChunkName: "routes" */ 371 /* webpackChunkName: "routes" */
362 /* webpackMode: "lazy-once" */ 372 /* webpackMode: "lazy-once" */
363 `@/pages/Account/feeTypes.vue` 373 `@/pages/Account/feeTypes.vue`
364 ) 374 )
365 }, 375 },
366 { 376 {
367 path: '/invoice', 377 path: '/invoice',
368 meta: {}, 378 meta: {},
369 name: 'Invoice', 379 name: 'Invoice',
370 props: (route) => ({ type: route.query.type }), 380 props: (route) => ({ type: route.query.type }),
371 component: () => 381 component: () =>
372 import ( 382 import (
373 /* webpackChunkName: "routes" */ 383 /* webpackChunkName: "routes" */
374 /* webpackMode: "lazy-once" */ 384 /* webpackMode: "lazy-once" */
375 `@/pages/Account/invoice.vue` 385 `@/pages/Account/invoice.vue`
376 ) 386 )
377 }, 387 },
378 { 388 {
379 path: '/paymentHistory', 389 path: '/paymentHistory',
380 meta: {}, 390 meta: {},
381 name: 'Payment History', 391 name: 'Payment History',
382 props: (route) => ({ type: route.query.type }), 392 props: (route) => ({ type: route.query.type }),
383 component: () => 393 component: () =>
384 import ( 394 import (
385 /* webpackChunkName: "routes" */ 395 /* webpackChunkName: "routes" */
386 /* webpackMode: "lazy-once" */ 396 /* webpackMode: "lazy-once" */
387 `@/pages/Account/paymentHistory.vue` 397 `@/pages/Account/paymentHistory.vue`
388 ) 398 )
389 }, 399 },
390 { 400 {
391 path: '/expense', 401 path: '/expense',
392 meta: {}, 402 meta: {},
393 name: 'Expense', 403 name: 'Expense',
394 props: (route) => ({ type: route.query.type }), 404 props: (route) => ({ type: route.query.type }),
395 component: () => 405 component: () =>
396 import ( 406 import (
397 /* webpackChunkName: "routes" */ 407 /* webpackChunkName: "routes" */
398 /* webpackMode: "lazy-once" */ 408 /* webpackMode: "lazy-once" */
399 `@/pages/Account/expense.vue` 409 `@/pages/Account/expense.vue`
400 ) 410 )
401 }, 411 },
402 { 412 {
403 path: '/income', 413 path: '/income',
404 meta: {}, 414 meta: {},
405 name: 'Income', 415 name: 'Income',
406 props: (route) => ({ type: route.query.type }), 416 props: (route) => ({ type: route.query.type }),
407 component: () => 417 component: () =>
408 import ( 418 import (
409 /* webpackChunkName: "routes" */ 419 /* webpackChunkName: "routes" */
410 /* webpackMode: "lazy-once" */ 420 /* webpackMode: "lazy-once" */
411 `@/pages/Account/income.vue` 421 `@/pages/Account/income.vue`
412 ) 422 )
413 }, 423 },
414 { 424 {
415 path: '/libraryMember', 425 path: '/libraryMember',
416 meta: {}, 426 meta: {},
417 name: 'Library Member', 427 name: 'Library Member',
418 props: (route) => ({ type: route.query.type }), 428 props: (route) => ({ type: route.query.type }),
419 component: () => 429 component: () =>
420 import ( 430 import (
421 /* webpackChunkName: "routes" */ 431 /* webpackChunkName: "routes" */
422 /* webpackMode: "lazy-once" */ 432 /* webpackMode: "lazy-once" */
423 `@/pages/Library/member.vue` 433 `@/pages/Library/member.vue`
424 ) 434 )
425 }, 435 },
426 { 436 {
427 path: '/books', 437 path: '/books',
428 meta: {}, 438 meta: {},
429 name: 'Books', 439 name: 'Books',
430 props: (route) => ({ type: route.query.type }), 440 props: (route) => ({ type: route.query.type }),
431 component: () => 441 component: () =>
432 import ( 442 import (
433 /* webpackChunkName: "routes" */ 443 /* webpackChunkName: "routes" */
434 /* webpackMode: "lazy-once" */ 444 /* webpackMode: "lazy-once" */
435 `@/pages/Library/books.vue` 445 `@/pages/Library/books.vue`
436 ) 446 )
437 }, 447 },
438 { 448 {
439 path: '/issue', 449 path: '/issue',
440 meta: {}, 450 meta: {},
441 name: 'Issue', 451 name: 'Issue',
442 props: (route) => ({ type: route.query.type }), 452 props: (route) => ({ type: route.query.type }),
443 component: () => 453 component: () =>
444 import ( 454 import (
445 /* webpackChunkName: "routes" */ 455 /* webpackChunkName: "routes" */
446 /* webpackMode: "lazy-once" */ 456 /* webpackMode: "lazy-once" */
447 `@/pages/Library/issue.vue` 457 `@/pages/Library/issue.vue`
448 ) 458 )
449 }, 459 },
450 { 460 {
451 path: '/e-books', 461 path: '/e-books',
452 meta: {}, 462 meta: {},
453 name: 'E-Books', 463 name: 'E-Books',
454 props: (route) => ({ type: route.query.type }), 464 props: (route) => ({ type: route.query.type }),
455 component: () => 465 component: () =>
456 import ( 466 import (
457 /* webpackChunkName: "routes" */ 467 /* webpackChunkName: "routes" */
458 /* webpackMode: "lazy-once" */ 468 /* webpackMode: "lazy-once" */
459 `@/pages/Library/eBook.vue` 469 `@/pages/Library/eBook.vue`
460 ) 470 )
461 }, 471 },
462 { 472 {
463 path: '/invoiceId/:invoiceid', 473 path: '/invoiceId/:invoiceid',
464 meta: {}, 474 meta: {},
465 name: 'Edit Invoice', 475 name: 'Edit Invoice',
466 // props: (route) => ({ type: route.query.type }), 476 // props: (route) => ({ type: route.query.type }),
467 component: () => 477 component: () =>
468 import ( 478 import (
469 /* webpackChunkName: "routes" */ 479 /* webpackChunkName: "routes" */
470 /* webpackMode: "lazy-once" */ 480 /* webpackMode: "lazy-once" */
471 `@/pages/Account/editInvoice.vue` 481 `@/pages/Account/editInvoice.vue`
472 ) 482 )
473 }, 483 },
474 { 484 {
475 path: '/StudentsAttendence/:id', 485 path: '/StudentsAttendence/:id',
476 meta: {}, 486 meta: {},
477 name: 'View Students Attendence', 487 name: 'View Students Attendence',
478 props: (route) => ({ type: route.query.type }), 488 props: (route) => ({ type: route.query.type }),
479 component: () => 489 component: () =>
480 import ( 490 import (
481 /* webpackChunkName: "routes" */ 491 /* webpackChunkName: "routes" */
482 /* webpackMode: "lazy-once" */ 492 /* webpackMode: "lazy-once" */
483 `@/pages/Attendence/viewStudentsAttendence.vue` 493 `@/pages/Attendence/viewStudentsAttendence.vue`
484 ) 494 )
485 }, 495 },
486 { 496 {
487 path: '/TeacherAttendence/:teacherId', 497 path: '/TeacherAttendence/:teacherId',
488 meta: {}, 498 meta: {},
489 name: 'View Teacher Attendence', 499 name: 'View Teacher Attendence',
490 props: (route) => ({ type: route.query.type }), 500 props: (route) => ({ type: route.query.type }),
491 component: () => 501 component: () =>
492 import ( 502 import (
493 /* webpackChunkName: "routes" */ 503 /* webpackChunkName: "routes" */
494 /* webpackMode: "lazy-once" */ 504 /* webpackMode: "lazy-once" */
495 `@/pages/Attendence/viewTeacherAttendence.vue` 505 `@/pages/Attendence/viewTeacherAttendence.vue`
496 ) 506 )
497 }, 507 },
498 { 508 {
499 path: '/viewInvoice/:viewInvoiceId', 509 path: '/viewInvoice/:viewInvoiceId',
500 meta: {}, 510 meta: {},
501 name: 'View Invoice', 511 name: 'View Invoice',
502 props: (route) => ({ type: route.query.type }), 512 props: (route) => ({ type: route.query.type }),
503 component: () => 513 component: () =>
504 import ( 514 import (
505 /* webpackChunkName: "routes" */ 515 /* webpackChunkName: "routes" */
506 /* webpackMode: "lazy-once" */ 516 /* webpackMode: "lazy-once" */
507 `@/pages/Account/viewInvoice.vue` 517 `@/pages/Account/viewInvoice.vue`
508 ) 518 )
509 }, 519 },
510 { 520 {
521 path: '/viewPaymentInvoice/:viewPaymentInvoiceId',
522 meta: {},
523 name: 'View Payment Invoice',
524 props: (route) => ({ type: route.query.type }),
525 component: () =>
526 import (
527 /* webpackChunkName: "routes" */
528 /* webpackMode: "lazy-once" */
529 `@/pages/Account/viewPaymentInvoice.vue`
530 )
531 },
532 {
511 path: '/globalPayment', 533 path: '/globalPayment',
512 meta: {}, 534 meta: {},
513 name: 'Global Payment', 535 name: 'Global Payment',
514 props: (route) => ({ type: route.query.type }), 536 props: (route) => ({ type: route.query.type }),
515 component: () => 537 component: () =>
516 import ( 538 import (
517 /* webpackChunkName: "routes" */ 539 /* webpackChunkName: "routes" */
518 /* webpackMode: "lazy-once" */ 540 /* webpackMode: "lazy-once" */
519 `@/pages/Account/globalPayment.vue` 541 `@/pages/Account/globalPayment.vue`
520 ) 542 )
521 }, 543 },
522 { 544 {
523 path: '/exam', 545 path: '/exam',
524 meta: {}, 546 meta: {},
525 name: 'Exam', 547 name: 'Exam',
526 props: (route) => ({ type: route.query.type }), 548 props: (route) => ({ type: route.query.type }),
527 component: () => 549 component: () =>
528 import ( 550 import (
529 /* webpackChunkName: "routes" */ 551 /* webpackChunkName: "routes" */
530 /* webpackMode: "lazy-once" */ 552 /* webpackMode: "lazy-once" */
531 `@/pages/Exam/exam.vue` 553 `@/pages/Exam/exam.vue`
532 ) 554 )
533 }, 555 },
534 { 556 {
535 path: '/grade', 557 path: '/grade',
536 meta: {}, 558 meta: {},
537 name: 'Grade', 559 name: 'Grade',
538 props: (route) => ({ type: route.query.type }), 560 props: (route) => ({ type: route.query.type }),
539 component: () => 561 component: () =>
540 import ( 562 import (
541 /* webpackChunkName: "routes" */ 563 /* webpackChunkName: "routes" */
542 /* webpackMode: "lazy-once" */ 564 /* webpackMode: "lazy-once" */
543 `@/pages/Exam/grade.vue` 565 `@/pages/Exam/grade.vue`
544 ) 566 )
545 }, 567 },
546 { 568 {
547 path: '/examSchedule', 569 path: '/examSchedule',
548 meta: {}, 570 meta: {},
549 name: 'Exam Schedule', 571 name: 'Exam Schedule',
550 props: (route) => ({ type: route.query.type }), 572 props: (route) => ({ type: route.query.type }),
551 component: () => 573 component: () =>
552 import ( 574 import (
553 /* webpackChunkName: "routes" */ 575 /* webpackChunkName: "routes" */
554 /* webpackMode: "lazy-once" */ 576 /* webpackMode: "lazy-once" */
555 `@/pages/Exam/examSchedule.vue` 577 `@/pages/Exam/examSchedule.vue`
556 ) 578 )
557 }, 579 },
558 { 580 {
559 path: '/examAttendence', 581 path: '/examAttendence',
560 meta: {}, 582 meta: {},
561 name: 'Exam Attendence', 583 name: 'Exam Attendence',
562 props: (route) => ({ type: route.query.type }), 584 props: (route) => ({ type: route.query.type }),
563 component: () => 585 component: () =>
564 import ( 586 import (
565 /* webpackChunkName: "routes" */ 587 /* webpackChunkName: "routes" */
566 /* webpackMode: "lazy-once" */ 588 /* webpackMode: "lazy-once" */
567 `@/pages/Exam/examAttendence.vue` 589 `@/pages/Exam/examAttendence.vue`
568 ) 590 )
569 }, 591 },
570 { 592 {
571 path: '/mark', 593 path: '/mark',
572 meta: {}, 594 meta: {},
573 name: 'Mark', 595 name: 'Mark',
574 props: (route) => ({ type: route.query.type }), 596 props: (route) => ({ type: route.query.type }),
575 component: () => 597 component: () =>
576 import ( 598 import (
577 /* webpackChunkName: "routes" */ 599 /* webpackChunkName: "routes" */
578 /* webpackMode: "lazy-once" */ 600 /* webpackMode: "lazy-once" */
579 `@/pages/Mark/mark.vue` 601 `@/pages/Mark/mark.vue`
580 ) 602 )
581 }, 603 },
582 { 604 {
583 path: '/viewMark/:markId', 605 path: '/viewMark/:markId',
584 meta: {}, 606 meta: {},
585 name: 'view Mark', 607 name: 'view Mark',
586 props: (route) => ({ type: route.query.type }), 608 props: (route) => ({ type: route.query.type }),
587 component: () => 609 component: () =>
588 import ( 610 import (
589 /* webpackChunkName: "routes" */ 611 /* webpackChunkName: "routes" */
590 /* webpackMode: "lazy-once" */ 612 /* webpackMode: "lazy-once" */
591 `@/pages/Mark/viewMark.vue` 613 `@/pages/Mark/viewMark.vue`
592 ) 614 )
593 }, 615 },
594 { 616 {
595 path: '/markDistribution', 617 path: '/markDistribution',
596 meta: {}, 618 meta: {},
597 name: 'Mark Distribution', 619 name: 'Mark Distribution',
598 props: (route) => ({ type: route.query.type }), 620 props: (route) => ({ type: route.query.type }),
599 component: () => 621 component: () =>
600 import ( 622 import (
601 /* webpackChunkName: "routes" */ 623 /* webpackChunkName: "routes" */
602 /* webpackMode: "lazy-once" */ 624 /* webpackMode: "lazy-once" */
603 `@/pages/Mark/markDistribution.vue` 625 `@/pages/Mark/markDistribution.vue`
604 ) 626 )
605 }, 627 },
606 { 628 {
607 path: '/promotion', 629 path: '/promotion',
608 meta: {}, 630 meta: {},
609 name: 'Promotion', 631 name: 'Promotion',
610 props: (route) => ({ type: route.query.type }), 632 props: (route) => ({ type: route.query.type }),
611 component: () => 633 component: () =>
612 import ( 634 import (
613 /* webpackChunkName: "routes" */ 635 /* webpackChunkName: "routes" */
614 /* webpackMode: "lazy-once" */ 636 /* webpackMode: "lazy-once" */
615 `@/pages/Mark/promotion.vue` 637 `@/pages/Mark/promotion.vue`
616 ) 638 )
617 }, 639 },
618 { 640 {
619 path: '/academicYear', 641 path: '/academicYear',
620 meta: {}, 642 meta: {},
621 name: 'Academic Year', 643 name: 'Academic Year',
622 props: (route) => ({ type: route.query.type }), 644 props: (route) => ({ type: route.query.type }),
623 component: () => 645 component: () =>
624 import ( 646 import (
625 /* webpackChunkName: "routes" */ 647 /* webpackChunkName: "routes" */
626 /* webpackMode: "lazy-once" */ 648 /* webpackMode: "lazy-once" */
627 `@/pages/Administrator/academicYear.vue` 649 `@/pages/Administrator/academicYear.vue`
628 ) 650 )
629 }, 651 },
630 { 652 {
631 path: '/systemAdmin', 653 path: '/systemAdmin',
632 meta: {}, 654 meta: {},
633 name: 'System Admin', 655 name: 'System Admin',
634 props: (route) => ({ type: route.query.type }), 656 props: (route) => ({ type: route.query.type }),
635 component: () => 657 component: () =>
636 import ( 658 import (
637 /* webpackChunkName: "routes" */ 659 /* webpackChunkName: "routes" */
638 /* webpackMode: "lazy-once" */ 660 /* webpackMode: "lazy-once" */
639 `@/pages/Administrator/systemAdmin.vue` 661 `@/pages/Administrator/systemAdmin.vue`
640 ) 662 )
641 }, 663 },
642 { 664 {
643 path: '/resetPassword', 665 path: '/resetPassword',
644 meta: {}, 666 meta: {},
645 name: 'Change Password', 667 name: 'Change Password',
646 props: (route) => ({ type: route.query.type }), 668 props: (route) => ({ type: route.query.type }),
647 component: () => 669 component: () =>
648 import ( 670 import (
649 /* webpackChunkName: "routes" */ 671 /* webpackChunkName: "routes" */
650 /* webpackMode: "lazy-once" */ 672 /* webpackMode: "lazy-once" */
651 `@/pages/Administrator/resetPassword.vue` 673 `@/pages/Administrator/resetPassword.vue`
652 ) 674 )
653 }, 675 },
654 { 676 {
655 path: '/role', 677 path: '/role',
656 meta: {}, 678 meta: {},
657 name: 'Role', 679 name: 'Role',
658 props: (route) => ({ type: route.query.type }), 680 props: (route) => ({ type: route.query.type }),
659 component: () => 681 component: () =>
660 import ( 682 import (
661 /* webpackChunkName: "routes" */ 683 /* webpackChunkName: "routes" */
662 /* webpackMode: "lazy-once" */ 684 /* webpackMode: "lazy-once" */
663 `@/pages/Administrator/role.vue` 685 `@/pages/Administrator/role.vue`
664 ) 686 )
665 }, 687 },
666 { 688 {
667 path: '/bulkImport', 689 path: '/bulkImport',
668 meta: {}, 690 meta: {},
669 name: 'Bulk Import', 691 name: 'Bulk Import',
670 props: (route) => ({ type: route.query.type }), 692 props: (route) => ({ type: route.query.type }),
671 component: () => 693 component: () =>
672 import ( 694 import (
673 /* webpackChunkName: "routes" */ 695 /* webpackChunkName: "routes" */
674 /* webpackMode: "lazy-once" */ 696 /* webpackMode: "lazy-once" */
675 `@/pages/Administrator/bulkImport.vue` 697 `@/pages/Administrator/bulkImport.vue`
676 ) 698 )
677 }, 699 },
678 { 700 {
679 path: '/studentReport', 701 path: '/studentReport',
680 meta: {}, 702 meta: {},
681 name: 'Student Report', 703 name: 'Student Report',
682 props: (route) => ({ type: route.query.type }), 704 props: (route) => ({ type: route.query.type }),
683 component: () => 705 component: () =>
684 import ( 706 import (
685 /* webpackChunkName: "routes" */ 707 /* webpackChunkName: "routes" */
686 /* webpackMode: "lazy-once" */ 708 /* webpackMode: "lazy-once" */
687 `@/pages/Report/studentReport.vue` 709 `@/pages/Report/studentReport.vue`
688 ) 710 )
689 }, 711 },
690 { 712 {
691 path: '/progressCardReport', 713 path: '/progressCardReport',
692 meta: {}, 714 meta: {},
693 name: 'Progress Card Report', 715 name: 'Progress Card Report',
694 props: (route) => ({ type: route.query.type }), 716 props: (route) => ({ type: route.query.type }),
695 component: () => 717 component: () =>
696 import ( 718 import (
697 /* webpackChunkName: "routes" */ 719 /* webpackChunkName: "routes" */
698 /* webpackMode: "lazy-once" */ 720 /* webpackMode: "lazy-once" */
699 `@/pages/Report/progressCardReport.vue` 721 `@/pages/Report/progressCardReport.vue`
700 ) 722 )
701 }, 723 },
702 { 724 {
703 path: '/idCard', 725 path: '/idCard',
704 meta: {}, 726 meta: {},
705 name: 'Id Card Report', 727 name: 'Id Card Report',
706 props: (route) => ({ type: route.query.type }), 728 props: (route) => ({ type: route.query.type }),
707 component: () => 729 component: () =>
708 import ( 730 import (
709 `@/pages/Report/idCard.vue` 731 `@/pages/Report/idCard.vue`
710 ) 732 )
711 }, 733 },
712 { 734 {
713 path: '/admitCard', 735 path: '/admitCard',
714 meta: {}, 736 meta: {},
715 name: 'Admit Card Report', 737 name: 'Admit Card Report',
716 props: (route) => ({ type: route.query.type }), 738 props: (route) => ({ type: route.query.type }),
717 component: () => 739 component: () =>
718 import ( 740 import (
719 `@/pages/Report/admitCard.vue` 741 `@/pages/Report/admitCard.vue`
720 ) 742 )
721 }, 743 },
722 { 744 {
723 path: '/generalSetting', 745 path: '/generalSetting',
724 meta: {}, 746 meta: {},
725 name: 'General Setting', 747 name: 'General Setting',
726 props: (route) => ({ type: route.query.type }), 748 props: (route) => ({ type: route.query.type }),
727 component: () => 749 component: () =>
728 import ( 750 import (
729 /* webpackChunkName: "routes" */ 751 /* webpackChunkName: "routes" */
730 /* webpackMode: "lazy-once" */ 752 /* webpackMode: "lazy-once" */
731 `@/pages/generalSetting/generalSetting.vue` 753 `@/pages/generalSetting/generalSetting.vue`
732 ) 754 )
733 }, 755 },
734 { 756 {
735 path: '/assignment', 757 path: '/assignment',
736 meta: {}, 758 meta: {},
737 name: 'Assignment', 759 name: 'Assignment',
738 props: (route) => ({ type: route.query.type }), 760 props: (route) => ({ type: route.query.type }),
739 component: () => 761 component: () =>
740 import ( 762 import (
741 `@/pages/Academic/assignment.vue` 763 `@/pages/Academic/assignment.vue`
742 ) 764 )
743 }, 765 },
744 { 766 {
745 path: '/routine', 767 path: '/routine',
746 meta: {}, 768 meta: {},
747 name: 'Routine', 769 name: 'Routine',
748 props: (route) => ({ type: route.query.type }), 770 props: (route) => ({ type: route.query.type }),
749 component: () => 771 component: () =>
750 import ( 772 import (
751 `@/pages/Academic/routine.vue` 773 `@/pages/Academic/routine.vue`
752 ) 774 )
753 }, 775 },
754 { 776 {
755 path: '/subject', 777 path: '/subject',
756 meta: {}, 778 meta: {},
757 name: 'Subject', 779 name: 'Subject',
758 props: (route) => ({ type: route.query.type }), 780 props: (route) => ({ type: route.query.type }),
759 component: () => 781 component: () =>
760 import ( 782 import (
761 `@/pages/Academic/subject.vue` 783 `@/pages/Academic/subject.vue`
762 ) 784 )
763 }, 785 },
764 { 786 {
765 path: '/syllabus', 787 path: '/syllabus',
766 meta: {}, 788 meta: {},
767 name: 'Syllabus', 789 name: 'Syllabus',
768 props: (route) => ({ type: route.query.type }), 790 props: (route) => ({ type: route.query.type }),
769 component: () => 791 component: () =>
770 import ( 792 import (
771 `@/pages/Academic/syllabus.vue` 793 `@/pages/Academic/syllabus.vue`
772 ) 794 )
773 }, 795 },
774 796
775 //////SCHOOL 797 //////SCHOOL
776 798
777 { 799 {
778 path: '/school', 800 path: '/school',
779 meta: {}, 801 meta: {},
780 name: 'School', 802 name: 'School',
781 props: (route) => ({ type: route.query.type }), 803 props: (route) => ({ type: route.query.type }),
782 component: () => 804 component: () =>
783 import ( 805 import (
784 /* webpackChunkName: "routes" */ 806 /* webpackChunkName: "routes" */
785 /* webpackMode: "lazy-once" */ 807 /* webpackMode: "lazy-once" */
786 `@/pages/School/school.vue` 808 `@/pages/School/school.vue`
787 ) 809 )
788 }, 810 },
789 { 811 {
790 path: '/schooldashboard', 812 path: '/schooldashboard',
791 meta: {}, 813 meta: {},
792 name: 'View School Dashboard', 814 name: 'View School Dashboard',
793 props: (route) => ({ type: route.query.type }), 815 props: (route) => ({ type: route.query.type }),
794 component: () => 816 component: () =>
795 import ( 817 import (
796 /* webpackChunkName: "routes" */ 818 /* webpackChunkName: "routes" */
797 /* webpackMode: "lazy-once" */ 819 /* webpackMode: "lazy-once" */
798 `@/pages/School/viewSchoolDashboard.vue` 820 `@/pages/School/viewSchoolDashboard.vue`
799 ) 821 )
800 } 822 }
801 ]; 823 ];