Commit 1e1e364f193fd7b4e3a588fef38b89026916ff3f
Exists in
master
and in
2 other branches
implement meet functinlaity and id card issues
Showing
16 changed files
Show diff stats
src/api/menu.js
1 | const adminMenu = [ | 1 | const adminMenu = [ |
2 | // { header: 'Apps' }, | 2 | // { header: 'Apps' }, |
3 | { | 3 | { |
4 | title: 'Dashboard', | 4 | title: 'Dashboard', |
5 | // group: 'apps', | 5 | // group: 'apps', |
6 | name: 'Dashboard', | 6 | name: 'Dashboard', |
7 | icon: '/static/icon/dashboard.png', | 7 | icon: '/static/icon/dashboard.png', |
8 | }, | 8 | }, |
9 | { | 9 | { |
10 | title: 'Class', | 10 | title: 'Class', |
11 | // group: 'apps', | 11 | // group: 'apps', |
12 | name: 'Class', | 12 | name: 'Class', |
13 | icon: '/static/icon/class.png', | 13 | icon: '/static/icon/class.png', |
14 | }, | 14 | }, |
15 | { | 15 | { |
16 | title: 'Section', | 16 | title: 'Section', |
17 | // group: 'apps', | 17 | // group: 'apps', |
18 | name: 'Section', | 18 | name: 'Section', |
19 | icon: '/static/icon/section.png', | 19 | icon: '/static/icon/section.png', |
20 | }, | 20 | }, |
21 | // { | 21 | // { |
22 | // title: 'Subjects', | 22 | // title: 'Subjects', |
23 | // name: 'Subject', | 23 | // name: 'Subject', |
24 | // icon: '/static/icon/subject.png', | 24 | // icon: '/static/icon/subject.png', |
25 | // }, | 25 | // }, |
26 | { | 26 | { |
27 | title: 'Parents', | 27 | title: 'Parents', |
28 | // group: 'apps', | 28 | // group: 'apps', |
29 | name: 'Parents', | 29 | name: 'Parents', |
30 | icon: '/static/icon/parents.png', | 30 | icon: '/static/icon/parents.png', |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | title: 'Teachers', | 33 | title: 'Teachers', |
34 | // group: '', | 34 | // group: '', |
35 | name: 'Teachers', | 35 | name: 'Teachers', |
36 | icon: '/static/icon/teacher.png', | 36 | icon: '/static/icon/teacher.png', |
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | title: 'Students', | 39 | title: 'Students', |
40 | // group: 'apps', | 40 | // group: 'apps', |
41 | name: 'Students', | 41 | name: 'Students', |
42 | icon: '/static/icon/student.png', | 42 | icon: '/static/icon/student.png', |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | title: 'User', | 45 | title: 'User', |
46 | name: 'User', | 46 | name: 'User', |
47 | icon: '/static/icon/users.png', | 47 | icon: '/static/icon/users.png', |
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | title: 'Attendance', | 50 | title: 'Attendance', |
51 | group: 'Attendance', | 51 | group: 'Attendance', |
52 | component: 'Attendance', | 52 | component: 'Attendance', |
53 | icon: '/static/icon/attendence.png', | 53 | icon: '/static/icon/attendence.png', |
54 | items: [ | 54 | items: [ |
55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
58 | ] | 58 | ] |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | title: 'Exam', | 61 | title: 'Exam', |
62 | group: 'Exam', | 62 | group: 'Exam', |
63 | component: 'Exam', | 63 | component: 'Exam', |
64 | icon: '/static/icon/exam.png', | 64 | icon: '/static/icon/exam.png', |
65 | items: [ | 65 | items: [ |
66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, | 66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, |
67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, | 68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, |
69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
70 | ] | 70 | ] |
71 | }, | 71 | }, |
72 | { | 72 | { |
73 | title: 'Marks', | 73 | title: 'Marks', |
74 | group: 'Mark', | 74 | group: 'Mark', |
75 | component: 'Mark', | 75 | component: 'Mark', |
76 | icon: '/static/icon/marks.png', | 76 | icon: '/static/icon/marks.png', |
77 | items: [ | 77 | items: [ |
78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, | 78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, |
79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, | 79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, |
80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, | 80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, |
81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
82 | ] | 82 | ] |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | title: 'Academic', | 85 | title: 'Academic', |
86 | group: 'Academic', | 86 | group: 'Academic', |
87 | component: 'Academic', | 87 | component: 'Academic', |
88 | icon: '/static/icon/school.png', | 88 | icon: '/static/icon/school.png', |
89 | items: [ | 89 | items: [ |
90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
94 | ] | 94 | ] |
95 | }, | 95 | }, |
96 | { | 96 | { |
97 | title: 'Administrator', | 97 | title: 'Administrator', |
98 | group: 'Administrator', | 98 | group: 'Administrator', |
99 | component: 'Administrator', | 99 | component: 'Administrator', |
100 | icon: '/static/icon/adminstrator.png', | 100 | icon: '/static/icon/adminstrator.png', |
101 | items: [ | 101 | items: [ |
102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, | 102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, |
103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, | 103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, |
104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, | 104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, |
105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, | 105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, |
106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, | 106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, |
107 | 107 | ||
108 | ] | 108 | ] |
109 | }, | 109 | }, |
110 | { | 110 | { |
111 | title: 'Payroll', | 111 | title: 'Payroll', |
112 | group: 'Payroll', | 112 | group: 'Payroll', |
113 | component: 'Payroll', | 113 | component: 'Payroll', |
114 | icon: '/static/icon/dollar.png', | 114 | icon: '/static/icon/dollar.png', |
115 | items: [ | 115 | items: [ |
116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, | 116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, |
117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, | 117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, |
118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, | 118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, |
119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, | 119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, |
120 | ] | 120 | ] |
121 | }, | 121 | }, |
122 | { | 122 | { |
123 | title: 'Notice Board', | 123 | title: 'Notice Board', |
124 | name: 'Notice Board', | 124 | name: 'Notice Board', |
125 | icon: '/static/icon/notice board.png', | 125 | icon: '/static/icon/notice board.png', |
126 | }, | 126 | }, |
127 | { | 127 | { |
128 | title: 'News', | 128 | title: 'News', |
129 | name: 'News', | 129 | name: 'News', |
130 | icon: '/static/icon/news.png', | 130 | icon: '/static/icon/news.png', |
131 | }, | 131 | }, |
132 | // { | 132 | // { |
133 | // title: 'Reminder', | 133 | // title: 'Reminder', |
134 | // name: 'reminder', | 134 | // name: 'reminder', |
135 | // icon: 'alarm_add', | 135 | // icon: 'alarm_add', |
136 | // }, | 136 | // }, |
137 | { | 137 | { |
138 | title: 'Time Table', | 138 | title: 'Time Table', |
139 | name: 'Time Table', | 139 | name: 'Time Table', |
140 | icon: '/static/icon/time table.png', | 140 | icon: '/static/icon/time table.png', |
141 | }, | 141 | }, |
142 | { | 142 | { |
143 | title: 'Library', | 143 | title: 'Library', |
144 | group: 'Library', | 144 | group: 'Library', |
145 | component: 'Library', | 145 | component: 'Library', |
146 | icon: '/static/icon/library.png', | 146 | icon: '/static/icon/library.png', |
147 | items: [ | 147 | items: [ |
148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
152 | 152 | ||
153 | ] | 153 | ] |
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | title: 'Report', | 156 | title: 'Report', |
157 | group: 'Report', | 157 | group: 'Report', |
158 | component: 'Report', | 158 | component: 'Report', |
159 | icon: '/static/icon/reports.png', | 159 | icon: '/static/icon/reports.png', |
160 | items: [ | 160 | items: [ |
161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
165 | ] | 165 | ] |
166 | }, | 166 | }, |
167 | { | 167 | { |
168 | title: 'Notification', | 168 | title: 'Notification', |
169 | name: 'Notification', | 169 | name: 'Notification', |
170 | icon: '/static/icon/notification.png', | 170 | icon: '/static/icon/notification.png', |
171 | }, | 171 | }, |
172 | { | 172 | { |
173 | title: 'Social Media', | 173 | title: 'Social Media', |
174 | name: 'Social Media', | 174 | name: 'Social Media', |
175 | icon: '/static/icon/events.png', | 175 | icon: '/static/icon/events.png', |
176 | }, | 176 | }, |
177 | { | 177 | { |
178 | title: 'Gallery', | 178 | title: 'Gallery', |
179 | name: 'Gallery', | 179 | name: 'Gallery', |
180 | icon: '/static/icon/gallery.png', | 180 | icon: '/static/icon/gallery.png', |
181 | }, | 181 | }, |
182 | { | 182 | { |
183 | title: 'Event', | 183 | title: 'Event', |
184 | name: 'Event', | 184 | name: 'Event', |
185 | icon: '/static/icon/events.png', | 185 | icon: '/static/icon/events.png', |
186 | }, | 186 | }, |
187 | { | 187 | { |
188 | title: 'Account', | 188 | title: 'Account', |
189 | group: 'Account', | 189 | group: 'Account', |
190 | component: 'Account', | 190 | component: 'Account', |
191 | icon: '/static/icon/accounts.png', | 191 | icon: '/static/icon/accounts.png', |
192 | items: [ | 192 | items: [ |
193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
199 | ] | 199 | ] |
200 | }, | 200 | }, |
201 | { | 201 | { |
202 | title: 'Holiday', | 202 | title: 'Holiday', |
203 | name: 'Holiday', | 203 | name: 'Holiday', |
204 | icon: '/static/icon/holiday.png', | 204 | icon: '/static/icon/holiday.png', |
205 | }, | 205 | }, |
206 | { | 206 | { |
207 | title: 'General Setting', | 207 | title: 'General Setting', |
208 | name: 'General Setting', | 208 | name: 'General Setting', |
209 | icon: '/static/icon/settings.png', | 209 | icon: '/static/icon/settings.png', |
210 | } | 210 | } |
211 | ]; | 211 | ]; |
212 | 212 | ||
213 | const libraryMenu = [{ | 213 | const libraryMenu = [{ |
214 | title: 'Dashboard', | 214 | title: 'Dashboard', |
215 | name: 'Dashboard', | 215 | name: 'Dashboard', |
216 | icon: '/static/icon/dashboard.png', | 216 | icon: '/static/icon/dashboard.png', |
217 | }, | 217 | }, |
218 | { | 218 | { |
219 | title: 'Library', | 219 | title: 'Library', |
220 | group: 'Library', | 220 | group: 'Library', |
221 | component: 'Library', | 221 | component: 'Library', |
222 | icon: '/static/icon/library.png', | 222 | icon: '/static/icon/library.png', |
223 | items: [ | 223 | items: [ |
224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
228 | 228 | ||
229 | ] | 229 | ] |
230 | }, | 230 | }, |
231 | ]; | 231 | ]; |
232 | 232 | ||
233 | const accountMenu = [{ | 233 | const accountMenu = [{ |
234 | title: 'Dashboard', | 234 | title: 'Dashboard', |
235 | name: 'Dashboard', | 235 | name: 'Dashboard', |
236 | icon: '/static/icon/dashboard.png', | 236 | icon: '/static/icon/dashboard.png', |
237 | }, | 237 | }, |
238 | 238 | ||
239 | { | 239 | { |
240 | title: 'Account', | 240 | title: 'Account', |
241 | group: 'Account', | 241 | group: 'Account', |
242 | component: 'Account', | 242 | component: 'Account', |
243 | icon: '/static/icon/accounts.png', | 243 | icon: '/static/icon/accounts.png', |
244 | items: [ | 244 | items: [ |
245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
251 | ] | 251 | ] |
252 | }, | 252 | }, |
253 | ]; | 253 | ]; |
254 | 254 | ||
255 | const schoolMenu = [ | 255 | const schoolMenu = [ |
256 | // { header: 'Apps' }, | 256 | // { header: 'Apps' }, |
257 | { | 257 | { |
258 | title: 'Dashboard', | 258 | title: 'Dashboard', |
259 | // group: 'apps', | 259 | // group: 'apps', |
260 | name: 'View School Dashboard', | 260 | name: 'View School Dashboard', |
261 | icon: '/static/icon/dashboard.png', | 261 | icon: '/static/icon/dashboard.png', |
262 | }, | 262 | }, |
263 | { | 263 | { |
264 | title: 'School', | 264 | title: 'School', |
265 | // group: 'apps', | 265 | // group: 'apps', |
266 | name: 'School', | 266 | name: 'School', |
267 | icon: '/static/schoolIcons/Dashboard.png', | 267 | icon: '/static/icon/school.png', |
268 | } | 268 | }, |
269 | { | ||
270 | title: 'App Version', | ||
271 | name: 'App Version', | ||
272 | icon: '/static/icon/phone.png', | ||
273 | } | ||
269 | ]; | 274 | ]; |
270 | 275 | ||
271 | const teacherMenu = [{ | 276 | const teacherMenu = [{ |
272 | title: 'Dashboard', | 277 | title: 'Dashboard', |
273 | name: 'Dashboard', | 278 | name: 'Dashboard', |
274 | icon: '/static/icon/dashboard.png', | 279 | icon: '/static/icon/dashboard.png', |
275 | }, | 280 | }, |
276 | { | 281 | { |
277 | title: 'Parents', | 282 | title: 'Parents', |
278 | // group: 'apps', | 283 | // group: 'apps', |
279 | name: 'Parents', | 284 | name: 'Parents', |
280 | icon: '/static/icon/parents.png', | 285 | icon: '/static/icon/parents.png', |
281 | }, | 286 | }, |
282 | { | 287 | { |
283 | title: 'Teachers', | 288 | title: 'Teachers', |
284 | // group: '', | 289 | // group: '', |
285 | name: 'Teachers', | 290 | name: 'Teachers', |
286 | icon: '/static/icon/teacher.png', | 291 | icon: '/static/icon/teacher.png', |
287 | }, | 292 | }, |
288 | { | 293 | { |
289 | title: 'Students', | 294 | title: 'Students', |
290 | // group: 'apps', | 295 | // group: 'apps', |
291 | name: 'Students', | 296 | name: 'Students', |
292 | icon: '/static/icon/student.png', | 297 | icon: '/static/icon/student.png', |
293 | }, | 298 | }, |
294 | { | 299 | { |
295 | title: 'Academic', | 300 | title: 'Academic', |
296 | group: 'Academic', | 301 | group: 'Academic', |
297 | component: 'Academic', | 302 | component: 'Academic', |
298 | icon: '/static/icon/school.png', | 303 | icon: '/static/icon/school.png', |
299 | items: [ | 304 | items: [ |
300 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 305 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
301 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 306 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
302 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 307 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
303 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 308 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
304 | ] | 309 | ] |
305 | }, | 310 | }, |
306 | { | 311 | { |
307 | title: 'Course', | 312 | title: 'Course', |
308 | group: 'Course', | 313 | group: 'Course', |
309 | component: 'Course', | 314 | component: 'Course', |
310 | icon: '/static/icon/school.png', | 315 | icon: '/static/icon/school.png', |
311 | items: [ | 316 | items: [ |
312 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, | 317 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, |
313 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, | 318 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, |
314 | { name: 'Course Detail', title: 'Course Detail', component: 'Course Detail', action: '', }, | 319 | { name: 'Course Detail', title: 'Course Detail', component: 'Course Detail', action: '', }, |
315 | { name: 'Course Discussion', title: 'Course Discussion', component: 'Course Discussion', action: '', }, | 320 | { name: 'Course Discussion', title: 'Course Discussion', component: 'Course Discussion', action: '', }, |
316 | ] | 321 | ] |
317 | }, | 322 | }, |
318 | { | 323 | { |
319 | title: 'Annoucement', | 324 | title: 'Annoucement', |
320 | // group: 'apps', | 325 | // group: 'apps', |
321 | name: 'Annoucement', | 326 | name: 'Annoucement', |
322 | icon: '/static/icon/student.png', | 327 | icon: '/static/icon/student.png', |
323 | }, | 328 | }, |
324 | { | 329 | { |
325 | title: 'Meeting Event', | 330 | title: 'Meeting Event', |
326 | // group: 'apps', | 331 | // group: 'apps', |
327 | name: 'Meeting Event', | 332 | name: 'Meeting Event', |
328 | icon: '/static/icon/student.png', | 333 | icon: '/static/icon/student.png', |
329 | }, | 334 | }, |
330 | { | 335 | { |
331 | title: 'Attendance', | 336 | title: 'Attendance', |
332 | group: 'Attendance', | 337 | group: 'Attendance', |
333 | component: 'Attendance', | 338 | component: 'Attendance', |
334 | icon: '/static/icon/attendence.png', | 339 | icon: '/static/icon/attendence.png', |
335 | items: [ | 340 | items: [ |
336 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 341 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
337 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 342 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
338 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 343 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
339 | ] | 344 | ] |
340 | }, | 345 | }, |
341 | { | 346 | { |
342 | title: 'Exam', | 347 | title: 'Exam', |
343 | group: 'Exam', | 348 | group: 'Exam', |
344 | component: 'Exam', | 349 | component: 'Exam', |
345 | icon: '/static/icon/exam.png', | 350 | icon: '/static/icon/exam.png', |
346 | items: [ | 351 | items: [ |
347 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 352 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
348 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } | 353 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } |
349 | ] | 354 | ] |
350 | }, | 355 | }, |
351 | { | 356 | { |
352 | title: 'Marks', | 357 | title: 'Marks', |
353 | group: 'Mark', | 358 | group: 'Mark', |
354 | component: 'Mark', | 359 | component: 'Mark', |
355 | icon: '/static/icon/marks.png', | 360 | icon: '/static/icon/marks.png', |
356 | items: [ | 361 | items: [ |
357 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } | 362 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } |
358 | ] | 363 | ] |
359 | }, | 364 | }, |
360 | { | 365 | { |
361 | title: 'Report', | 366 | title: 'Report', |
362 | group: 'Report', | 367 | group: 'Report', |
363 | component: 'Report', | 368 | component: 'Report', |
364 | icon: '/static/icon/reports.png', | 369 | icon: '/static/icon/reports.png', |
365 | items: [ | 370 | items: [ |
366 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 371 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
367 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 372 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
368 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 373 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
369 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 374 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
370 | ] | 375 | ] |
371 | }, | 376 | }, |
372 | { | 377 | { |
373 | title: 'Library', | 378 | title: 'Library', |
374 | group: 'Library', | 379 | group: 'Library', |
375 | component: 'Library', | 380 | component: 'Library', |
376 | icon: '/static/icon/library.png', | 381 | icon: '/static/icon/library.png', |
377 | items: [ | 382 | items: [ |
378 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 383 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
379 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 384 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
380 | 385 | ||
381 | ] | 386 | ] |
382 | }, | 387 | }, |
383 | { | 388 | { |
384 | title: 'Meet', | 389 | title: 'Meet', |
385 | name: 'Meet', | 390 | name: 'Meet', |
386 | icon: '/static/icon/meet_icon_navigation.png', | 391 | icon: '/static/icon/meet_icon_navigation.png', |
387 | } | 392 | } |
388 | ]; | 393 | ]; |
389 | 394 | ||
390 | const parentMenu = [{ | 395 | const parentMenu = [{ |
391 | title: 'Dashboard', | 396 | title: 'Dashboard', |
392 | name: 'Dashboard', | 397 | name: 'Dashboard', |
393 | icon: '/static/icon/dashboard.png', | 398 | icon: '/static/icon/dashboard.png', |
394 | }, | 399 | }, |
395 | { | 400 | { |
396 | title: "Change Student", | 401 | title: "Change Student", |
397 | name: 'Change Students', | 402 | name: 'Change Students', |
398 | Vicon: "face", | 403 | Vicon: "face", |
399 | click: e => { | 404 | click: e => { |
400 | console.log(e); | 405 | console.log(e); |
401 | } | 406 | } |
402 | }]; | 407 | }]; |
403 | // reorder menu | 408 | // reorder menu |
404 | // Menu.forEach((item) => { | 409 | // Menu.forEach((item) => { |
405 | // if (item.items) { | 410 | // if (item.items) { |
406 | // item.items.sort((x, y) => { | 411 | // item.items.sort((x, y) => { |
407 | // let textA = x.title.toUpperCase(); | 412 | // let textA = x.title.toUpperCase(); |
408 | // let textB = y.title.toUpperCase(); | 413 | // let textB = y.title.toUpperCase(); |
409 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; | 414 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; |
410 | // }); | 415 | // }); |
411 | // } | 416 | // } |
412 | // }); | 417 | // }); |
413 | 418 | ||
414 | export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu, parentMenu }; | 419 | export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu, parentMenu }; |
src/components/pageHeader/AppDrawer.vue
1 | <template> | 1 | <template> |
2 | <v-navigation-drawer | 2 | <v-navigation-drawer |
3 | id="appDrawer" | 3 | id="appDrawer" |
4 | app | 4 | app |
5 | fixed | 5 | fixed |
6 | :mini-variant.sync="mini" | 6 | :mini-variant.sync="mini" |
7 | :dark="$vuetify.dark" | 7 | :dark="$vuetify.dark" |
8 | v-model="drawer" | 8 | v-model="drawer" |
9 | hide-overlay | 9 | hide-overlay |
10 | width="260" | 10 | width="260" |
11 | class="white--text side-bar-color" | 11 | class="white--text side-bar-color" |
12 | style="height: 100%; overflow: scroll;" | 12 | style="height: 100%; overflow: scroll;" |
13 | > | 13 | > |
14 | <!-- <vue-perfect-scrollbar | 14 | <!-- <vue-perfect-scrollbar |
15 | class="drawer-menu--scroll side-bar-color mt-3" | 15 | class="drawer-menu--scroll side-bar-color mt-3" |
16 | :settings="scrollSettings" | 16 | :settings="scrollSettings" |
17 | >--> | 17 | >--> |
18 | <v-toolbar class="white" flat> | 18 | <v-toolbar class="white" flat> |
19 | <img | 19 | <img |
20 | v-bind:src="computeLogo" | 20 | v-bind:src="computeLogo" |
21 | height="40" | 21 | height="40" |
22 | width="130" | 22 | width="130" |
23 | class="imgLogo mb-3 mt-3" | 23 | class="imgLogo mb-3 mt-3" |
24 | alt="logo" | 24 | alt="logo" |
25 | style="margin: auto; | 25 | style="margin: auto; |
26 | display: block;" | 26 | display: block;" |
27 | /> | 27 | /> |
28 | </v-toolbar> | 28 | </v-toolbar> |
29 | <v-list dense dark> | 29 | <v-list dense dark> |
30 | <template v-for="(item, i) in menus" v-if="role === 'ADMIN'"> | 30 | <template v-for="(item, i) in menus" v-if="role === 'ADMIN'"> |
31 | <!-- {{menus}} --> | 31 | <!-- {{menus}} --> |
32 | <!--group with subitems--> | 32 | <!--group with subitems--> |
33 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action> | 33 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action> |
34 | <v-list-tile slot="activator" ripple="ripple"> | 34 | <v-list-tile slot="activator" ripple="ripple"> |
35 | <v-list-tile-action v-if="item.icon"> | 35 | <v-list-tile-action v-if="item.icon"> |
36 | <img :src="item.icon" width="22" alt="icons" /> | 36 | <img :src="item.icon" width="22" alt="icons" /> |
37 | </v-list-tile-action> | 37 | </v-list-tile-action> |
38 | <v-list-tile-content> | 38 | <v-list-tile-content> |
39 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 39 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
40 | </v-list-tile-content> | 40 | </v-list-tile-content> |
41 | </v-list-tile> | 41 | </v-list-tile> |
42 | <template v-for="(subItem, i) in item.items"> | 42 | <template v-for="(subItem, i) in item.items"> |
43 | <!--sub group--> | 43 | <!--sub group--> |
44 | <v-list-group | 44 | <v-list-group |
45 | v-if="subItem.items" | 45 | v-if="subItem.items" |
46 | :key="subItem.name" | 46 | :key="subItem.name" |
47 | :group="subItem.group" | 47 | :group="subItem.group" |
48 | sub-group="sub-group" | 48 | sub-group="sub-group" |
49 | > | 49 | > |
50 | <v-list-tile slot="activator" ripple="ripple"> | 50 | <v-list-tile slot="activator" ripple="ripple"> |
51 | <v-list-tile-content> | 51 | <v-list-tile-content> |
52 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 52 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
53 | </v-list-tile-content> | 53 | </v-list-tile-content> |
54 | </v-list-tile> | 54 | </v-list-tile> |
55 | <v-list-tile | 55 | <v-list-tile |
56 | v-for="(grand, i) in subItem.children" | 56 | v-for="(grand, i) in subItem.children" |
57 | :key="i" | 57 | :key="i" |
58 | :to="genChildTarget(item, grand)" | 58 | :to="genChildTarget(item, grand)" |
59 | :href="grand.href" | 59 | :href="grand.href" |
60 | ripple="ripple" | 60 | ripple="ripple" |
61 | > | 61 | > |
62 | <v-list-tile-content> | 62 | <v-list-tile-content> |
63 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 63 | <v-list-tile-title>{{ grand.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-group> | 66 | </v-list-group> |
67 | <!--child item--> | 67 | <!--child item--> |
68 | <v-list-tile | 68 | <v-list-tile |
69 | v-else | 69 | v-else |
70 | :key="i" | 70 | :key="i" |
71 | :to="genChildTarget(item, subItem)" | 71 | :to="genChildTarget(item, subItem)" |
72 | :href="subItem.href" | 72 | :href="subItem.href" |
73 | :disabled="subItem.disabled" | 73 | :disabled="subItem.disabled" |
74 | :target="subItem.target" | 74 | :target="subItem.target" |
75 | ripple="ripple" | 75 | ripple="ripple" |
76 | > | 76 | > |
77 | <v-list-tile-action v-if="subItem.action"> | 77 | <v-list-tile-action v-if="subItem.action"> |
78 | <img | 78 | <img |
79 | width="30" | 79 | width="30" |
80 | :src="subItem.action" | 80 | :src="subItem.action" |
81 | :class="[subItem.actionClass || 'success--text']" | 81 | :class="[subItem.actionClass || 'success--text']" |
82 | /> | 82 | /> |
83 | </v-list-tile-action> | 83 | </v-list-tile-action> |
84 | <v-list-tile-content> | 84 | <v-list-tile-content> |
85 | <v-list-tile-title class="body-2"> | 85 | <v-list-tile-title class="body-2"> |
86 | <span>{{ subItem.title }}</span> | 86 | <span>{{ subItem.title }}</span> |
87 | </v-list-tile-title> | 87 | </v-list-tile-title> |
88 | </v-list-tile-content> | 88 | </v-list-tile-content> |
89 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 89 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
90 | </v-list-tile> | 90 | </v-list-tile> |
91 | </template> | 91 | </template> |
92 | </v-list-group> | 92 | </v-list-group> |
93 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 93 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
94 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 94 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
95 | <!--top-level link--> | 95 | <!--top-level link--> |
96 | <v-list-tile | 96 | <v-list-tile |
97 | v-else | 97 | v-else |
98 | ripple="ripple" | 98 | ripple="ripple" |
99 | :disabled="item.disabled" | 99 | :disabled="item.disabled" |
100 | :target="item.target" | 100 | :target="item.target" |
101 | rel="noopener" | 101 | rel="noopener" |
102 | :key="item.name" | 102 | :key="item.name" |
103 | :to="!item.href ? { name: item.name } : null" | 103 | :to="!item.href ? { name: item.name } : null" |
104 | :href="item.href" | 104 | :href="item.href" |
105 | > | 105 | > |
106 | <!-- <a :href="item.path"> --> | 106 | <!-- <a :href="item.path"> --> |
107 | <v-list-tile-action v-if="item.icon"> | 107 | <v-list-tile-action v-if="item.icon"> |
108 | <img :src="item.icon" width="22" alt="icons" /> | 108 | <img :src="item.icon" width="22" alt="icons" /> |
109 | </v-list-tile-action> | 109 | </v-list-tile-action> |
110 | <v-list-tile-content class="pt-2"> | 110 | <v-list-tile-content class="pt-2"> |
111 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 111 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
112 | </v-list-tile-content> | 112 | </v-list-tile-content> |
113 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 113 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
114 | <v-list-tile-action v-if="item.subAction"> | 114 | <v-list-tile-action v-if="item.subAction"> |
115 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 115 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
116 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 116 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
117 | </v-list-tile-action> | 117 | </v-list-tile-action> |
118 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 118 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
119 | <!-- </a> --> | 119 | <!-- </a> --> |
120 | </v-list-tile> | 120 | </v-list-tile> |
121 | </template> | 121 | </template> |
122 | <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'"> | 122 | <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'"> |
123 | <!-- {{menus}} --> | 123 | <!-- {{menus}} --> |
124 | <!--group with subitems--> | 124 | <!--group with subitems--> |
125 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 125 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
126 | <v-list-tile slot="activator" ripple="ripple"> | 126 | <v-list-tile slot="activator" ripple="ripple"> |
127 | <v-list-tile-action v-if="item.icon"> | 127 | <v-list-tile-action v-if="item.icon"> |
128 | <img :src="item.icon" width="22" alt="icons" /> | 128 | <img :src="item.icon" width="22" alt="icons" /> |
129 | </v-list-tile-action> | 129 | </v-list-tile-action> |
130 | <v-list-tile-content> | 130 | <v-list-tile-content> |
131 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 131 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
132 | </v-list-tile-content> | 132 | </v-list-tile-content> |
133 | </v-list-tile> | 133 | </v-list-tile> |
134 | <template v-for="(subItem, i) in item.items"> | 134 | <template v-for="(subItem, i) in item.items"> |
135 | <!--sub group--> | 135 | <!--sub group--> |
136 | <v-list-group | 136 | <v-list-group |
137 | v-if="subItem.items" | 137 | v-if="subItem.items" |
138 | :key="subItem.name" | 138 | :key="subItem.name" |
139 | :group="subItem.group" | 139 | :group="subItem.group" |
140 | sub-group="sub-group" | 140 | sub-group="sub-group" |
141 | > | 141 | > |
142 | <v-list-tile slot="activator" ripple="ripple"> | 142 | <v-list-tile slot="activator" ripple="ripple"> |
143 | <v-list-tile-content> | 143 | <v-list-tile-content> |
144 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 144 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
145 | </v-list-tile-content> | 145 | </v-list-tile-content> |
146 | </v-list-tile> | 146 | </v-list-tile> |
147 | <v-list-tile | 147 | <v-list-tile |
148 | v-for="(grand, i) in subItem.children" | 148 | v-for="(grand, i) in subItem.children" |
149 | :key="i" | 149 | :key="i" |
150 | :to="genChildTarget(item, grand)" | 150 | :to="genChildTarget(item, grand)" |
151 | :href="grand.href" | 151 | :href="grand.href" |
152 | ripple="ripple" | 152 | ripple="ripple" |
153 | > | 153 | > |
154 | <v-list-tile-content> | 154 | <v-list-tile-content> |
155 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 155 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
156 | </v-list-tile-content> | 156 | </v-list-tile-content> |
157 | </v-list-tile> | 157 | </v-list-tile> |
158 | </v-list-group> | 158 | </v-list-group> |
159 | <!--child item--> | 159 | <!--child item--> |
160 | <v-list-tile | 160 | <v-list-tile |
161 | v-else | 161 | v-else |
162 | :key="i" | 162 | :key="i" |
163 | :to="genChildTarget(item, subItem)" | 163 | :to="genChildTarget(item, subItem)" |
164 | :href="subItem.href" | 164 | :href="subItem.href" |
165 | :disabled="subItem.disabled" | 165 | :disabled="subItem.disabled" |
166 | :target="subItem.target" | 166 | :target="subItem.target" |
167 | ripple="ripple" | 167 | ripple="ripple" |
168 | > | 168 | > |
169 | <v-list-tile-action v-if="subItem.action"> | 169 | <v-list-tile-action v-if="subItem.action"> |
170 | <img | 170 | <img |
171 | width="30" | 171 | width="30" |
172 | :src="subItem.action" | 172 | :src="subItem.action" |
173 | :class="[subItem.actionClass || 'success--text']" | 173 | :class="[subItem.actionClass || 'success--text']" |
174 | /> | 174 | /> |
175 | </v-list-tile-action> | 175 | </v-list-tile-action> |
176 | <v-list-tile-content> | 176 | <v-list-tile-content> |
177 | <v-list-tile-title class="body-2"> | 177 | <v-list-tile-title class="body-2"> |
178 | <span>{{ subItem.title }}</span> | 178 | <span>{{ subItem.title }}</span> |
179 | </v-list-tile-title> | 179 | </v-list-tile-title> |
180 | </v-list-tile-content> | 180 | </v-list-tile-content> |
181 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 181 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
182 | </v-list-tile> | 182 | </v-list-tile> |
183 | </template> | 183 | </template> |
184 | </v-list-group> | 184 | </v-list-group> |
185 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 185 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
186 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 186 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
187 | <!--top-level link--> | 187 | <!--top-level link--> |
188 | <v-list-tile | 188 | <v-list-tile |
189 | v-else | 189 | v-else |
190 | ripple="ripple" | 190 | ripple="ripple" |
191 | :disabled="item.disabled" | 191 | :disabled="item.disabled" |
192 | :target="item.target" | 192 | :target="item.target" |
193 | rel="noopener" | 193 | rel="noopener" |
194 | :key="item.name" | 194 | :key="item.name" |
195 | :to="!item.href ? { name: item.name } : null" | 195 | :to="!item.href ? { name: item.name } : null" |
196 | :href="item.href" | 196 | :href="item.href" |
197 | > | 197 | > |
198 | <!-- <a :href="item.path"> --> | 198 | <!-- <a :href="item.path"> --> |
199 | <v-list-tile-action v-if="item.icon"> | 199 | <v-list-tile-action v-if="item.icon"> |
200 | <img :src="item.icon" width="22" alt="icons" /> | 200 | <img :src="item.icon" width="22" alt="icons" /> |
201 | </v-list-tile-action> | 201 | </v-list-tile-action> |
202 | <v-list-tile-content class="pt-2"> | 202 | <v-list-tile-content class="pt-2"> |
203 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 203 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
204 | </v-list-tile-content> | 204 | </v-list-tile-content> |
205 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 205 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
206 | <v-list-tile-action v-if="item.subAction"> | 206 | <v-list-tile-action v-if="item.subAction"> |
207 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 207 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
208 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 208 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
209 | </v-list-tile-action> | 209 | </v-list-tile-action> |
210 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 210 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
211 | <!-- </a> --> | 211 | <!-- </a> --> |
212 | </v-list-tile> | 212 | </v-list-tile> |
213 | </template> | 213 | </template> |
214 | <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'"> | 214 | <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'"> |
215 | <!-- {{menus}} --> | 215 | <!-- {{menus}} --> |
216 | <!--group with subitems--> | 216 | <!--group with subitems--> |
217 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 217 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
218 | <v-list-tile slot="activator" ripple="ripple"> | 218 | <v-list-tile slot="activator" ripple="ripple"> |
219 | <v-list-tile-action v-if="item.icon"> | 219 | <v-list-tile-action v-if="item.icon"> |
220 | <img :src="item.icon" width="22" alt="icons" /> | 220 | <img :src="item.icon" width="22" alt="icons" /> |
221 | </v-list-tile-action> | 221 | </v-list-tile-action> |
222 | <v-list-tile-content> | 222 | <v-list-tile-content> |
223 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 223 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
224 | </v-list-tile-content> | 224 | </v-list-tile-content> |
225 | </v-list-tile> | 225 | </v-list-tile> |
226 | <template v-for="(subItem, i) in item.items"> | 226 | <template v-for="(subItem, i) in item.items"> |
227 | <!--sub group--> | 227 | <!--sub group--> |
228 | <v-list-group | 228 | <v-list-group |
229 | v-if="subItem.items" | 229 | v-if="subItem.items" |
230 | :key="subItem.name" | 230 | :key="subItem.name" |
231 | :group="subItem.group" | 231 | :group="subItem.group" |
232 | sub-group="sub-group" | 232 | sub-group="sub-group" |
233 | > | 233 | > |
234 | <v-list-tile slot="activator" ripple="ripple"> | 234 | <v-list-tile slot="activator" ripple="ripple"> |
235 | <v-list-tile-content> | 235 | <v-list-tile-content> |
236 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 236 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
237 | </v-list-tile-content> | 237 | </v-list-tile-content> |
238 | </v-list-tile> | 238 | </v-list-tile> |
239 | <v-list-tile | 239 | <v-list-tile |
240 | v-for="(grand, i) in subItem.children" | 240 | v-for="(grand, i) in subItem.children" |
241 | :key="i" | 241 | :key="i" |
242 | :to="genChildTarget(item, grand)" | 242 | :to="genChildTarget(item, grand)" |
243 | :href="grand.href" | 243 | :href="grand.href" |
244 | ripple="ripple" | 244 | ripple="ripple" |
245 | > | 245 | > |
246 | <v-list-tile-content> | 246 | <v-list-tile-content> |
247 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 247 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
248 | </v-list-tile-content> | 248 | </v-list-tile-content> |
249 | </v-list-tile> | 249 | </v-list-tile> |
250 | </v-list-group> | 250 | </v-list-group> |
251 | <!--child item--> | 251 | <!--child item--> |
252 | <v-list-tile | 252 | <v-list-tile |
253 | v-else | 253 | v-else |
254 | :key="i" | 254 | :key="i" |
255 | :to="genChildTarget(item, subItem)" | 255 | :to="genChildTarget(item, subItem)" |
256 | :href="subItem.href" | 256 | :href="subItem.href" |
257 | :disabled="subItem.disabled" | 257 | :disabled="subItem.disabled" |
258 | :target="subItem.target" | 258 | :target="subItem.target" |
259 | ripple="ripple" | 259 | ripple="ripple" |
260 | > | 260 | > |
261 | <v-list-tile-action v-if="subItem.action"> | 261 | <v-list-tile-action v-if="subItem.action"> |
262 | <img | 262 | <img |
263 | width="30" | 263 | width="30" |
264 | :src="subItem.action" | 264 | :src="subItem.action" |
265 | :class="[subItem.actionClass || 'success--text']" | 265 | :class="[subItem.actionClass || 'success--text']" |
266 | /> | 266 | /> |
267 | </v-list-tile-action> | 267 | </v-list-tile-action> |
268 | <v-list-tile-content> | 268 | <v-list-tile-content> |
269 | <v-list-tile-title class="body-2"> | 269 | <v-list-tile-title class="body-2"> |
270 | <span>{{ subItem.title }}</span> | 270 | <span>{{ subItem.title }}</span> |
271 | </v-list-tile-title> | 271 | </v-list-tile-title> |
272 | </v-list-tile-content> | 272 | </v-list-tile-content> |
273 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 273 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
274 | </v-list-tile> | 274 | </v-list-tile> |
275 | </template> | 275 | </template> |
276 | </v-list-group> | 276 | </v-list-group> |
277 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 277 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
278 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 278 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
279 | <!--top-level link--> | 279 | <!--top-level link--> |
280 | <v-list-tile | 280 | <v-list-tile |
281 | v-else | 281 | v-else |
282 | ripple="ripple" | 282 | ripple="ripple" |
283 | :disabled="item.disabled" | 283 | :disabled="item.disabled" |
284 | :target="item.target" | 284 | :target="item.target" |
285 | rel="noopener" | 285 | rel="noopener" |
286 | :key="item.name" | 286 | :key="item.name" |
287 | :to="!item.href ? { name: item.name } : null" | 287 | :to="!item.href ? { name: item.name } : null" |
288 | :href="item.href" | 288 | :href="item.href" |
289 | > | 289 | > |
290 | <!-- <a :href="item.path"> --> | 290 | <!-- <a :href="item.path"> --> |
291 | <v-list-tile-action v-if="item.icon"> | 291 | <v-list-tile-action v-if="item.icon"> |
292 | <img :src="item.icon" width="22" alt="icons" /> | 292 | <img :src="item.icon" width="22" alt="icons" /> |
293 | </v-list-tile-action> | 293 | </v-list-tile-action> |
294 | <v-list-tile-content class="pt-2"> | 294 | <v-list-tile-content class="pt-2"> |
295 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 295 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
296 | </v-list-tile-content> | 296 | </v-list-tile-content> |
297 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 297 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
298 | <v-list-tile-action v-if="item.subAction"> | 298 | <v-list-tile-action v-if="item.subAction"> |
299 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 299 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
300 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 300 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
301 | </v-list-tile-action> | 301 | </v-list-tile-action> |
302 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 302 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
303 | <!-- </a> --> | 303 | <!-- </a> --> |
304 | </v-list-tile> | 304 | </v-list-tile> |
305 | </template> | 305 | </template> |
306 | <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'"> | 306 | <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'"> |
307 | <!-- {{menus}} --> | 307 | <!-- {{menus}} --> |
308 | <!--group with subitems--> | 308 | <!--group with subitems--> |
309 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 309 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
310 | <v-list-tile slot="activator" ripple="ripple"> | 310 | <v-list-tile slot="activator" ripple="ripple"> |
311 | <v-list-tile-action v-if="item.icon"> | 311 | <v-list-tile-action v-if="item.icon"> |
312 | <img :src="item.icon" width="22" alt="icons" /> | 312 | <img :src="item.icon" width="22" alt="icons" /> |
313 | </v-list-tile-action> | 313 | </v-list-tile-action> |
314 | <v-list-tile-content> | 314 | <v-list-tile-content> |
315 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 315 | <!-- <v-list-tile-title>{{ item.title }}</v-list-tile-title> --> |
316 | </v-list-tile-content> | 316 | </v-list-tile-content> |
317 | </v-list-tile> | 317 | </v-list-tile> |
318 | <template v-for="(subItem, i) in item.items"> | 318 | <template v-for="(subItem, i) in item.items"> |
319 | <!--sub group--> | 319 | <!--sub group--> |
320 | <v-list-group | 320 | <v-list-group |
321 | v-if="subItem.items" | 321 | v-if="subItem.items" |
322 | :key="subItem.name" | 322 | :key="subItem.name" |
323 | :group="subItem.group" | 323 | :group="subItem.group" |
324 | sub-group="sub-group" | 324 | sub-group="sub-group" |
325 | > | 325 | > |
326 | <v-list-tile slot="activator" ripple="ripple"> | 326 | <v-list-tile slot="activator" ripple="ripple"> |
327 | <v-list-tile-content> | 327 | <v-list-tile-content> |
328 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 328 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
329 | </v-list-tile-content> | 329 | </v-list-tile-content> |
330 | </v-list-tile> | 330 | </v-list-tile> |
331 | <v-list-tile | 331 | <v-list-tile |
332 | v-for="(grand, i) in subItem.children" | 332 | v-for="(grand, i) in subItem.children" |
333 | :key="i" | 333 | :key="i" |
334 | :to="genChildTarget(item, grand)" | 334 | :to="genChildTarget(item, grand)" |
335 | :href="grand.href" | 335 | :href="grand.href" |
336 | ripple="ripple" | 336 | ripple="ripple" |
337 | > | 337 | > |
338 | <v-list-tile-content> | 338 | <v-list-tile-content> |
339 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 339 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
340 | </v-list-tile-content> | 340 | </v-list-tile-content> |
341 | </v-list-tile> | 341 | </v-list-tile> |
342 | </v-list-group> | 342 | </v-list-group> |
343 | <!--child item--> | 343 | <!--child item--> |
344 | <v-list-tile | 344 | <v-list-tile |
345 | v-else | 345 | v-else |
346 | :key="i" | 346 | :key="i" |
347 | :to="genChildTarget(item, subItem)" | 347 | :to="genChildTarget(item, subItem)" |
348 | :href="subItem.href" | 348 | :href="subItem.href" |
349 | :disabled="subItem.disabled" | 349 | :disabled="subItem.disabled" |
350 | :target="subItem.target" | 350 | :target="subItem.target" |
351 | ripple="ripple" | 351 | ripple="ripple" |
352 | > | 352 | > |
353 | <v-list-tile-action v-if="subItem.action"> | 353 | <v-list-tile-action v-if="subItem.action"> |
354 | <img | 354 | <img |
355 | width="30" | 355 | width="30" |
356 | :src="subItem.action" | 356 | :src="subItem.action" |
357 | :class="[subItem.actionClass || 'success--text']" | 357 | :class="[subItem.actionClass || 'success--text']" |
358 | /> | 358 | /> |
359 | </v-list-tile-action> | 359 | </v-list-tile-action> |
360 | <v-list-tile-content> | 360 | <v-list-tile-content> |
361 | <v-list-tile-title class="body-2"> | 361 | <v-list-tile-title class="body-2"> |
362 | <span>{{ subItem.title }}</span> | 362 | <span>{{ subItem.title }}</span> |
363 | </v-list-tile-title> | 363 | </v-list-tile-title> |
364 | </v-list-tile-content> | 364 | </v-list-tile-content> |
365 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 365 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
366 | </v-list-tile> | 366 | </v-list-tile> |
367 | </template> | 367 | </template> |
368 | </v-list-group> | 368 | </v-list-group> |
369 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 369 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
370 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 370 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
371 | <!--top-level link--> | 371 | <!--top-level link--> |
372 | <v-list-tile | 372 | <v-list-tile |
373 | v-else | 373 | v-else |
374 | ripple="ripple" | 374 | ripple="ripple" |
375 | :disabled="item.disabled" | 375 | :disabled="item.disabled" |
376 | :target="item.target" | 376 | :target="item.target" |
377 | rel="noopener" | 377 | rel="noopener" |
378 | :key="item.name" | 378 | :key="item.name" |
379 | :to="!item.href ? { name: item.name } : null" | 379 | :to="!item.href ? { name: item.name } : null" |
380 | :href="item.href" | 380 | :href="item.href" |
381 | > | 381 | > |
382 | <!-- <a :href="item.path"> --> | 382 | <!-- <a :href="item.path"> --> |
383 | <v-list-tile-action v-if="item.icon"> | 383 | <v-list-tile-action v-if="item.icon"> |
384 | <img :src="item.icon" width="22" alt="icons" /> | 384 | <img :src="item.icon" width="22" alt="icons" /> |
385 | </v-list-tile-action> | 385 | </v-list-tile-action> |
386 | <v-list-tile-content class="pt-2"> | 386 | <v-list-tile-content class="pt-2"> |
387 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 387 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
388 | </v-list-tile-content> | 388 | </v-list-tile-content> |
389 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 389 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
390 | <v-list-tile-action v-if="item.subAction"> | 390 | <v-list-tile-action v-if="item.subAction"> |
391 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 391 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
392 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 392 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
393 | </v-list-tile-action> | 393 | </v-list-tile-action> |
394 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 394 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
395 | <!-- </a> --> | 395 | <!-- </a> --> |
396 | </v-list-tile> | 396 | </v-list-tile> |
397 | </template> | 397 | </template> |
398 | 398 | ||
399 | <!-- NAVIGATION DRAWER IF ROLE IS TEACHER --> | 399 | <!-- NAVIGATION DRAWER IF ROLE IS TEACHER --> |
400 | <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'"> | 400 | <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'"> |
401 | <!-- {{menus}} --> | 401 | <!-- {{menus}} --> |
402 | <!--group with subitems--> | 402 | <!--group with subitems--> |
403 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 403 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
404 | <v-list-tile slot="activator" ripple="ripple"> | 404 | <v-list-tile slot="activator" ripple="ripple"> |
405 | <v-list-tile-action v-if="item.icon"> | 405 | <v-list-tile-action v-if="item.icon"> |
406 | <img :src="item.icon" width="22" alt="icons" /> | 406 | <img :src="item.icon" width="22" alt="icons" /> |
407 | </v-list-tile-action> | 407 | </v-list-tile-action> |
408 | <v-list-tile-content> | 408 | <v-list-tile-content> |
409 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 409 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
410 | </v-list-tile-content> | 410 | </v-list-tile-content> |
411 | </v-list-tile> | 411 | </v-list-tile> |
412 | <template v-for="(subItem, i) in item.items"> | 412 | <template v-for="(subItem, i) in item.items"> |
413 | <!--sub group--> | 413 | <!--sub group--> |
414 | <v-list-group | 414 | <v-list-group |
415 | v-if="subItem.items" | 415 | v-if="subItem.items" |
416 | :key="subItem.name" | 416 | :key="subItem.name" |
417 | :group="subItem.group" | 417 | :group="subItem.group" |
418 | sub-group="sub-group" | 418 | sub-group="sub-group" |
419 | > | 419 | > |
420 | <v-list-tile slot="activator" ripple="ripple"> | 420 | <v-list-tile slot="activator" ripple="ripple"> |
421 | <v-list-tile-content> | 421 | <v-list-tile-content> |
422 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 422 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
423 | </v-list-tile-content> | 423 | </v-list-tile-content> |
424 | </v-list-tile> | 424 | </v-list-tile> |
425 | <v-list-tile | 425 | <v-list-tile |
426 | v-for="(grand, i) in subItem.children" | 426 | v-for="(grand, i) in subItem.children" |
427 | :key="i" | 427 | :key="i" |
428 | :to="genChildTarget(item, grand)" | 428 | :to="genChildTarget(item, grand)" |
429 | :href="grand.href" | 429 | :href="grand.href" |
430 | ripple="ripple" | 430 | ripple="ripple" |
431 | > | 431 | > |
432 | <v-list-tile-content> | 432 | <v-list-tile-content> |
433 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 433 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
434 | </v-list-tile-content> | 434 | </v-list-tile-content> |
435 | </v-list-tile> | 435 | </v-list-tile> |
436 | </v-list-group> | 436 | </v-list-group> |
437 | <!--child item--> | 437 | <!--child item--> |
438 | <v-list-tile | 438 | <v-list-tile |
439 | v-else | 439 | v-else |
440 | :key="i" | 440 | :key="i" |
441 | :to="genChildTarget(item, subItem)" | 441 | :to="genChildTarget(item, subItem)" |
442 | :href="subItem.href" | 442 | :href="subItem.href" |
443 | :disabled="subItem.disabled" | 443 | :disabled="subItem.disabled" |
444 | :target="subItem.target" | 444 | :target="subItem.target" |
445 | ripple="ripple" | 445 | ripple="ripple" |
446 | > | 446 | > |
447 | <v-list-tile-action v-if="subItem.action"> | 447 | <v-list-tile-action v-if="subItem.action"> |
448 | <img | 448 | <img |
449 | width="30" | 449 | width="30" |
450 | :src="subItem.action" | 450 | :src="subItem.action" |
451 | :class="[subItem.actionClass || 'success--text']" | 451 | :class="[subItem.actionClass || 'success--text']" |
452 | /> | 452 | /> |
453 | </v-list-tile-action> | 453 | </v-list-tile-action> |
454 | <v-list-tile-content> | 454 | <v-list-tile-content> |
455 | <v-list-tile-title class="body-2"> | 455 | <v-list-tile-title class="body-2"> |
456 | <span>{{ subItem.title }}</span> | 456 | <span>{{ subItem.title }}</span> |
457 | </v-list-tile-title> | 457 | </v-list-tile-title> |
458 | </v-list-tile-content> | 458 | </v-list-tile-content> |
459 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 459 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
460 | </v-list-tile> | 460 | </v-list-tile> |
461 | </template> | 461 | </template> |
462 | </v-list-group> | 462 | </v-list-group> |
463 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 463 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
464 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 464 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
465 | <!--top-level link--> | 465 | <!--top-level link--> |
466 | <v-list-tile | 466 | <v-list-tile |
467 | v-else | 467 | v-else |
468 | ripple="ripple" | 468 | ripple="ripple" |
469 | :disabled="item.disabled" | 469 | :disabled="item.disabled" |
470 | :target="item.target" | 470 | :target="item.target" |
471 | rel="noopener" | 471 | rel="noopener" |
472 | :key="item.name" | 472 | :key="item.name" |
473 | :to="!item.href ? { name: item.name } : null" | 473 | :to="!item.href ? { name: item.name } : null" |
474 | :href="item.href" | 474 | :href="item.href" |
475 | > | 475 | > |
476 | <!-- <a :href="item.path"> --> | 476 | <!-- <a :href="item.path"> --> |
477 | <v-list-tile-action v-if="item.icon"> | 477 | <v-list-tile-action v-if="item.icon"> |
478 | <img :src="item.icon" width="22" alt="icons" /> | 478 | <img :src="item.icon" width="22" alt="icons" /> |
479 | </v-list-tile-action> | 479 | </v-list-tile-action> |
480 | <v-list-tile-content class="pt-2"> | 480 | <v-list-tile-content class="pt-2"> |
481 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 481 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
482 | </v-list-tile-content> | 482 | </v-list-tile-content> |
483 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 483 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
484 | <v-list-tile-action v-if="item.subAction"> | 484 | <v-list-tile-action v-if="item.subAction"> |
485 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 485 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
486 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 486 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
487 | </v-list-tile-action> | 487 | </v-list-tile-action> |
488 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 488 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
489 | <!-- </a> --> | 489 | <!-- </a> --> |
490 | </v-list-tile> | 490 | </v-list-tile> |
491 | </template> | 491 | </template> |
492 | 492 | ||
493 | <!-- NAVIGATION DRAWER IF ROLE IS PARENT --> | 493 | <!-- NAVIGATION DRAWER IF ROLE IS PARENT --> |
494 | <template v-for="(item, i) in menuParent" v-if="role === 'PARENT'"> | 494 | <template v-for="(item, i) in menuParent" v-if="role === 'PARENT'"> |
495 | <!-- {{menus}} --> | 495 | <!-- {{menus}} --> |
496 | <!--group with subitems--> | 496 | <!--group with subitems--> |
497 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 497 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
498 | <v-list-tile slot="activator" ripple="ripple"> | 498 | <v-list-tile slot="activator" ripple="ripple"> |
499 | <v-list-tile-action v-if="item.icon"> | 499 | <v-list-tile-action v-if="item.icon"> |
500 | <img :src="item.icon" width="22" alt="icons" /> | 500 | <img :src="item.icon" width="22" alt="icons" /> |
501 | </v-list-tile-action> | 501 | </v-list-tile-action> |
502 | <v-list-tile-content> | 502 | <v-list-tile-content> |
503 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 503 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
504 | </v-list-tile-content> | 504 | </v-list-tile-content> |
505 | </v-list-tile> | 505 | </v-list-tile> |
506 | <template v-for="(subItem, i) in item.items"> | 506 | <template v-for="(subItem, i) in item.items"> |
507 | <!--sub group--> | 507 | <!--sub group--> |
508 | <v-list-group | 508 | <v-list-group |
509 | v-if="subItem.items" | 509 | v-if="subItem.items" |
510 | :key="subItem.name" | 510 | :key="subItem.name" |
511 | :group="subItem.group" | 511 | :group="subItem.group" |
512 | sub-group="sub-group" | 512 | sub-group="sub-group" |
513 | > | 513 | > |
514 | <v-list-tile slot="activator" ripple="ripple"> | 514 | <v-list-tile slot="activator" ripple="ripple"> |
515 | <v-list-tile-content> | 515 | <v-list-tile-content> |
516 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 516 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
517 | </v-list-tile-content> | 517 | </v-list-tile-content> |
518 | </v-list-tile> | 518 | </v-list-tile> |
519 | <v-list-tile | 519 | <v-list-tile |
520 | v-for="(grand, i) in subItem.children" | 520 | v-for="(grand, i) in subItem.children" |
521 | :key="i" | 521 | :key="i" |
522 | :to="genChildTarget(item, grand)" | 522 | :to="genChildTarget(item, grand)" |
523 | :href="grand.href" | 523 | :href="grand.href" |
524 | ripple="ripple" | 524 | ripple="ripple" |
525 | > | 525 | > |
526 | <v-list-tile-content> | 526 | <v-list-tile-content> |
527 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 527 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
528 | </v-list-tile-content> | 528 | </v-list-tile-content> |
529 | </v-list-tile> | 529 | </v-list-tile> |
530 | </v-list-group> | 530 | </v-list-group> |
531 | <!--child item--> | 531 | <!--child item--> |
532 | <v-list-tile | 532 | <v-list-tile |
533 | v-else | 533 | v-else |
534 | :key="i" | 534 | :key="i" |
535 | :to="genChildTarget(item, subItem)" | 535 | :to="genChildTarget(item, subItem)" |
536 | :href="subItem.href" | 536 | :href="subItem.href" |
537 | :disabled="subItem.disabled" | 537 | :disabled="subItem.disabled" |
538 | :target="subItem.target" | 538 | :target="subItem.target" |
539 | ripple="ripple" | 539 | ripple="ripple" |
540 | > | 540 | > |
541 | <v-list-tile-action v-if="subItem.action"> | 541 | <v-list-tile-action v-if="subItem.action"> |
542 | <img | 542 | <img |
543 | width="30" | 543 | width="30" |
544 | :src="subItem.action" | 544 | :src="subItem.action" |
545 | :class="[subItem.actionClass || 'success--text']" | 545 | :class="[subItem.actionClass || 'success--text']" |
546 | /> | 546 | /> |
547 | </v-list-tile-action> | 547 | </v-list-tile-action> |
548 | <v-list-tile-content> | 548 | <v-list-tile-content> |
549 | <v-list-tile-title class="body-2"> | 549 | <v-list-tile-title class="body-2"> |
550 | <span>{{ subItem.title }}</span> | 550 | <span>{{ subItem.title }}</span> |
551 | </v-list-tile-title> | 551 | </v-list-tile-title> |
552 | </v-list-tile-content> | 552 | </v-list-tile-content> |
553 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 553 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
554 | </v-list-tile> | 554 | </v-list-tile> |
555 | </template> | 555 | </template> |
556 | </v-list-group> | 556 | </v-list-group> |
557 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 557 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
558 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 558 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
559 | <!--top-level link--> | 559 | <!--top-level link--> |
560 | <v-list-tile | 560 | <v-list-tile |
561 | v-else | 561 | v-else |
562 | ripple="ripple" | 562 | ripple="ripple" |
563 | :disabled="item.disabled" | 563 | :disabled="item.disabled" |
564 | :target="item.target" | 564 | :target="item.target" |
565 | rel="noopener" | 565 | rel="noopener" |
566 | :key="item.name" | 566 | :key="item.name" |
567 | :to="!item.href ? { name: item.name } : null" | 567 | :to="!item.href ? { name: item.name } : null" |
568 | :href="item.href" | 568 | :href="item.href" |
569 | > | 569 | > |
570 | <!-- <a :href="item.path"> --> | 570 | <!-- <a :href="item.path"> --> |
571 | <v-list-tile-action v-if="item.icon"> | 571 | <v-list-tile-action v-if="item.icon"> |
572 | <img :src="item.icon" width="22" alt="icons" /> | 572 | <img :src="item.icon" width="22" alt="icons" /> |
573 | </v-list-tile-action> | 573 | </v-list-tile-action> |
574 | <v-list-tile-action v-if="item.Vicon"> | 574 | <v-list-tile-action v-if="item.Vicon"> |
575 | <div style="position: relative; top: 3px;"> | 575 | <div style="position: relative; top: 3px;"> |
576 | <v-icon color="white" size="25">{{item.Vicon}}</v-icon> | 576 | <v-icon color="white" size="25">{{item.Vicon}}</v-icon> |
577 | </div> | 577 | </div> |
578 | </v-list-tile-action> | 578 | </v-list-tile-action> |
579 | <v-list-tile-content class="pt-2"> | 579 | <v-list-tile-content class="pt-2"> |
580 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 580 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
581 | </v-list-tile-content> | 581 | </v-list-tile-content> |
582 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 582 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
583 | <v-list-tile-action v-if="item.subAction"> | 583 | <v-list-tile-action v-if="item.subAction"> |
584 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 584 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
585 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 585 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
586 | </v-list-tile-action> | 586 | </v-list-tile-action> |
587 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 587 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
588 | <!-- </a> --> | 588 | <!-- </a> --> |
589 | </v-list-tile> | 589 | </v-list-tile> |
590 | </template> | 590 | </template> |
591 | </v-list> | 591 | </v-list> |
592 | <!-- </vue-perfect-scrollbar> --> | 592 | <!-- </vue-perfect-scrollbar> --> |
593 | </v-navigation-drawer> | 593 | </v-navigation-drawer> |
594 | </template> | 594 | </template> |
595 | <script> | 595 | <script> |
596 | import menu from "@/api/menu"; | 596 | import menu from "@/api/menu"; |
597 | import VuePerfectScrollbar from "vue-perfect-scrollbar"; | 597 | import VuePerfectScrollbar from "vue-perfect-scrollbar"; |
598 | export default { | 598 | export default { |
599 | name: "app-drawer", | 599 | name: "app-drawer", |
600 | components: { | 600 | components: { |
601 | VuePerfectScrollbar, | 601 | VuePerfectScrollbar, |
602 | }, | 602 | }, |
603 | props: { | 603 | props: { |
604 | expanded: { | 604 | expanded: { |
605 | type: Boolean, | 605 | type: Boolean, |
606 | default: true, | 606 | default: true, |
607 | }, | 607 | }, |
608 | }, | 608 | }, |
609 | data: () => ({ | 609 | data: () => ({ |
610 | mini: false, | 610 | mini: false, |
611 | drawer: true, | 611 | drawer: true, |
612 | menus: [], | 612 | menus: [], |
613 | menuSchool: [], | 613 | menuSchool: [], |
614 | menuTeacher: [], | 614 | menuTeacher: [], |
615 | menuAccount: [], | 615 | menuAccount: [], |
616 | menuLibrarian: [], | 616 | menuLibrarian: [], |
617 | menuParent: [], | 617 | menuParent: [], |
618 | schoolRole: "", | 618 | schoolRole: "", |
619 | role: "", | 619 | role: "", |
620 | scrollSettings: { | 620 | scrollSettings: { |
621 | maxScrollbarLength: 160, | 621 | maxScrollbarLength: 160, |
622 | }, | 622 | }, |
623 | }), | 623 | }), |
624 | computed: { | 624 | computed: { |
625 | computeGroupActive() { | 625 | computeGroupActive() { |
626 | return true; | 626 | return true; |
627 | }, | 627 | }, |
628 | computeLogo() { | 628 | computeLogo() { |
629 | return "/static/icon.png"; | 629 | return "/static/icon.png"; |
630 | }, | 630 | }, |
631 | 631 | ||
632 | sideToolbarColor() { | 632 | sideToolbarColor() { |
633 | return this.$vuetify.options.extra.sideNav; | 633 | return this.$vuetify.options.extra.sideNav; |
634 | }, | 634 | }, |
635 | }, | 635 | }, |
636 | created() { | 636 | created() { |
637 | this.schoolRole = this.$store.state.schoolRole; | 637 | this.schoolRole = this.$store.state.schoolRole; |
638 | this.role = this.$store.state.role; | 638 | this.role = this.$store.state.role; |
639 | this.menus = menu.adminMenu; | 639 | this.menus = menu.adminMenu; |
640 | this.menuSchool = menu.schoolMenu; | 640 | this.menuSchool = menu.schoolMenu; |
641 | this.menuTeacher = menu.teacherMenu; | 641 | this.menuTeacher = menu.teacherMenu; |
642 | this.menuAccount = menu.accountMenu; | 642 | this.menuAccount = menu.accountMenu; |
643 | this.menuLibrarian = menu.libraryMenu; | 643 | this.menuLibrarian = menu.libraryMenu; |
644 | this.menuParent = menu.parentMenu; | 644 | this.menuParent = menu.parentMenu; |
645 | // console.log("this.$route.name", this.$route.name); | 645 | // console.log("this.$route.name", this.$route.name); |
646 | // if (this.$route.name === "School") { | 646 | // if (this.$route.name === "School") { |
647 | // localStorage.setItem("SchoolName", this.$route.name); | 647 | // localStorage.setItem("SchoolName", this.$route.name); |
648 | // } | 648 | // } |
649 | // if (this.$route.name === "Dashboard") { | 649 | // if (this.$route.name === "Dashboard") { |
650 | // localStorage.setItem("AdminName", this.$route.name); | 650 | // localStorage.setItem("AdminName", this.$route.name); |
651 | // } | 651 | // } |
652 | // console.log("SN", localStorage.getItem("SchoolName")); | 652 | // console.log("SN", localStorage.getItem("SchoolName")); |
653 | // if (localStorage.getItem("SchoolName") === "School") { | 653 | // if (localStorage.getItem("SchoolName") === "School") { |
654 | // if (this.$store.state.schoolRole === "SUPERADMIN") { | 654 | // if (this.$store.state.schoolRole === "SUPERADMIN") { |
655 | // console.log("rolA", this.$store.state.schoolRole); | 655 | // console.log("rolA", this.$store.state.schoolRole); |
656 | // if (this.$store.state.schoolRole === "SUPERADMIN") { | 656 | // if (this.$store.state.schoolRole === "SUPERADMIN") { |
657 | // } | 657 | // } |
658 | // console.log("this.menus", this.menus); | 658 | // console.log("this.menus", this.menus); |
659 | // } | 659 | // } |
660 | // // } | 660 | // // } |
661 | // // console.log("AN", localStorage.getItem("AdminName")); | 661 | // // console.log("AN", localStorage.getItem("AdminName")); |
662 | // // if (localStorage.getItem("AdminName") === "Dashboard") { | 662 | // // if (localStorage.getItem("AdminName") === "Dashboard") { |
663 | // if (this.$store.state.role === "ADMIN") { | 663 | // if (this.$store.state.role === "ADMIN") { |
664 | // console.log("role", this.$store.state.role); | 664 | // console.log("role", this.$store.state.role); |
665 | // else if (this.$store.state.role === "ADMIN") { | 665 | // else if (this.$store.state.role === "ADMIN") { |
666 | // } | 666 | // } |
667 | // // } | 667 | // // } |
668 | // } | 668 | // } |
669 | 669 | ||
670 | // else if (this.$store.state.role === "LIBRARIAN") { | 670 | // else if (this.$store.state.role === "LIBRARIAN") { |
671 | // this.menus = menu.libraryMenu; | 671 | // this.menus = menu.libraryMenu; |
672 | // } else if (this.$store.state.role === "ACCOUNTANT") { | 672 | // } else if (this.$store.state.role === "ACCOUNTANT") { |
673 | // this.menus = menu.accountMenu; | 673 | // this.menus = menu.accountMenu; |
674 | // } | 674 | // } |
675 | window.getApp.$on("APP_DRAWER_TOGGLED", () => { | 675 | window.getApp.$on("APP_DRAWER_TOGGLED", () => { |
676 | this.drawer = !this.drawer; | 676 | this.drawer = !this.drawer; |
677 | }); | 677 | }); |
678 | }, | 678 | }, |
679 | methods: { | 679 | methods: { |
680 | genChildTarget(item, subItem) { | 680 | genChildTarget(item, subItem) { |
681 | if (subItem.href) return; | 681 | if (subItem.href) return; |
682 | if (subItem.component) { | 682 | if (subItem.component) { |
683 | return { | 683 | return { |
684 | name: subItem.component, | 684 | name: subItem.component, |
685 | }; | 685 | }; |
686 | } | 686 | } |
687 | return { name: `${item.group}/${subItem.name}` }; | 687 | return { name: `${item.group}/${subItem.name}` }; |
688 | }, | 688 | }, |
689 | }, | 689 | }, |
690 | mounted() { | 690 | mounted() { |
691 | if (this.$store.state.role === "ADMIN") { | 691 | if (this.$store.state.role === "ADMIN") { |
692 | this.token = this.$store.state.token; | 692 | this.token = this.$store.state.token; |
693 | } | 693 | } |
694 | if (this.$store.state.schoolRole === "SUPERADMIN") { | 694 | if (this.$store.state.schoolRole === "SUPERADMIN") { |
695 | this.token = this.$store.schoolToken; | 695 | this.token = this.$store.schoolToken; |
696 | } | 696 | } |
697 | if (this.$store.state.role === "TEACHER") { | 697 | if (this.$store.state.role === "TEACHER") { |
698 | this.token = this.$store.state.token; | 698 | this.token = this.$store.state.token; |
699 | } | 699 | } |
700 | if (this.$store.state.role === "ACCOUNTANT") { | 700 | if (this.$store.state.role === "ACCOUNTANT") { |
701 | this.token = this.$store.state.token; | 701 | this.token = this.$store.state.token; |
702 | } | 702 | } |
703 | if (this.$store.state.role === "LIBRARIAN") { | 703 | if (this.$store.state.role === "LIBRARIAN") { |
704 | this.token = this.$store.state.token; | 704 | this.token = this.$store.state.token; |
705 | } | 705 | } |
706 | if (this.$store.state.role === "PARENT") { | 706 | if (this.$store.state.role === "PARENT") { |
707 | this.token = this.$store.state.token; | 707 | this.token = this.$store.state.token; |
708 | } | 708 | } |
709 | }, | 709 | }, |
710 | }; | 710 | }; |
711 | </script> | 711 | </script> |
712 | 712 | ||
713 | 713 | ||
714 | <style lang="stylus"> | 714 | <style lang="stylus"> |
715 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; | 715 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; |
716 | #appDrawer { | 716 | #appDrawer { |
717 | overflow: hidden; | 717 | overflow: hidden; |
718 | 718 | ||
719 | .drawer-menu--scroll { | 719 | .drawer-menu--scroll { |
720 | height: calc(100vh - 48px); | 720 | height: calc(100vh - 48px); |
721 | overflow: auto; | 721 | overflow: auto; |
722 | } | 722 | } |
723 | } | 723 | } |
724 | 724 | ||
725 | .v-list__group__items--no-action .v-list__tile { | 725 | .v-list__group__items--no-action .v-list__tile { |
726 | padding-left: 72px !important; | 726 | padding-left: 72px !important; |
727 | } | 727 | } |
728 | 728 | ||
729 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 729 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
730 | height: 54px; | 730 | height: 54px; |
731 | font-size: 17px; | 731 | font-size: 17px; |
732 | } | 732 | } |
733 | 733 | ||
734 | .v-list__tile__action { | 734 | .v-list__tile__action { |
735 | min-width: 36px; | 735 | min-width: 36px; |
736 | } | 736 | } |
737 | 737 | ||
738 | // .theme--light .v-icon, .application .theme--light.v-icon { | 738 | // .theme--light .v-icon, .application .theme--light.v-icon { |
739 | // color: #f1f1f1; | 739 | // color: #f1f1f1; |
740 | // } | 740 | // } |
741 | .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y { | 741 | .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y { |
742 | background-color: #f5f5f5; | 742 | background-color: #f5f5f5; |
743 | 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))); | 743 | 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))); |
744 | width: 8px !important; | 744 | width: 8px !important; |
745 | } | 745 | } |
746 | 746 | ||
747 | .ps>.ps__scrollbar-y-rail { | 747 | .ps>.ps__scrollbar-y-rail { |
748 | width: 0px !important; | 748 | width: 0px !important; |
749 | } | 749 | } |
750 | 750 | ||
751 | .ps:hover > .ps__scrollbar-y-rail:hover { | 751 | .ps:hover > .ps__scrollbar-y-rail:hover { |
752 | background-color: #5f2171 !important; | 752 | background-color: #5f2171 !important; |
753 | opacity: 0.9; | 753 | opacity: 0.9; |
754 | } | 754 | } |
755 | 755 | ||
756 | .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { | 756 | .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { |
757 | width: 8px !important; | 757 | width: 8px !important; |
758 | background-color: #f5f5f5; | 758 | background-color: #f5f5f5; |
759 | 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))); | 759 | 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))); |
760 | } | 760 | } |
761 | 761 | ||
762 | .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { | 762 | .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { |
763 | // background-color: #5f2171 !important; | 763 | // background-color: #5f2171 !important; |
764 | width: 8px !important; | 764 | width: 8px !important; |
765 | background-color: #f5f5f5; | 765 | background-color: #f5f5f5; |
766 | 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))); | 766 | 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))); |
767 | } | 767 | } |
768 | 768 | ||
769 | .v-list__tile--active { | 769 | .v-list__tile--active { |
770 | color: #71d9ea !important; | 770 | color: #71d9ea !important; |
771 | } | 771 | } |
772 | 772 | ||
773 | .my-1 { | 773 | .my-1 { |
774 | text-align: left !important; | 774 | text-align: left !important; |
775 | } | 775 | } |
776 | 776 | ||
777 | .title { | 777 | .title { |
778 | line-height: 2 !important; | 778 | line-height: 2 !important; |
779 | } | 779 | } |
780 | 780 | ||
781 | // .v-list__tile--hover { | 781 | // .v-list__tile--hover { |
782 | // color: white !important; | 782 | // color: white !important; |
783 | // background: red !important; | 783 | // background: red !important; |
784 | // } | 784 | // } |
785 | .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 { | 785 | .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 { |
786 | background: #7f62f8 !important; | 786 | background: #7f62f8 !important; |
787 | color: #71d9ea !important; | 787 | color: #71d9ea !important; |
788 | 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; | 788 | 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; |
789 | // border-radius: 12px !important; | 789 | // border-radius: 12px !important; |
790 | } | 790 | } |
791 | 791 | ||
792 | @media screen and (max-width: 420px) { | 792 | @media screen and (max-width: 420px) { |
793 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 793 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
794 | font-size: 14px; | 794 | font-size: 14px; |
795 | } | 795 | } |
796 | 796 | ||
797 | .imgLogo { | 797 | .imgLogo { |
798 | height: 32px; | 798 | height: 32px; |
799 | width: 120px; | 799 | width: 120px; |
800 | } | 800 | } |
801 | } | 801 | } |
802 | </style> | 802 | </style> |
803 | 803 | ||
804 | 804 | ||
805 | <style scoped> | 805 | <style scoped> |
806 | .theme--light .v-icon, | 806 | .theme--light .v-icon, |
807 | .application .theme--light.v-icon { | 807 | .application .theme--light.v-icon { |
808 | color: #39b982; | 808 | color: #39b982; |
809 | } | 809 | } |
810 | .side-bar-color { | 810 | .side-bar-color { |
811 | background: #827bfa !important; | 811 | background: #827bfa !important; |
812 | /* border-top-right-radius: 74px !important; */ | 812 | /* border-top-right-radius: 74px !important; */ |
813 | } | 813 | } |
814 | .v-navigation-drawer--fixed { | 814 | .v-navigation-drawer--fixed { |
815 | /* position: absolute !important; */ | 815 | /* position: absolute !important; */ |
816 | 816 | ||
817 | /* min-height: calc(2000px - 64px - 50px - 81px) !important; */ | 817 | /* min-height: calc(2000px - 64px - 50px - 81px) !important; */ |
818 | /* max-height: inherit !important; */ | 818 | /* max-height: inherit !important; */ |
819 | } | 819 | } |
820 | .hover:hover { | 820 | .hover:hover { |
821 | color: red !important; | 821 | color: red !important; |
822 | background: red !important; | 822 | background: red !important; |
823 | } | 823 | } |
824 | </style> | 824 | </style> |
825 | 825 | ||
826 | 826 | ||
827 | 827 |
src/pages/Academic/assignment.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EDIT Assignment ****** --> | 3 | <!-- ****** EDIT Assignment ****** --> |
4 | <v-dialog v-model="editAssignmentDialog" max-width="400px"> | 4 | <v-dialog v-model="editAssignmentDialog" max-width="400px"> |
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 Assignment</label> | 8 | <label class="title text-xs-center">Edit Assignment</label> |
9 | <v-icon size="24" class="right" @click="editAssignmentDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editAssignmentDialog = 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-form ref="formEditAssignment" v-model="validEditAssignment" lazy-validation> | 13 | <v-form ref="formEditAssignment" v-model="validEditAssignment" lazy-validation> |
14 | <v-layout> | 14 | <v-layout> |
15 | <v-flex xs4 class="pt-4 subheading"> | 15 | <v-flex xs4 class="pt-4 subheading"> |
16 | <label class="right">Title:</label> | 16 | <label class="right">Title:</label> |
17 | </v-flex> | 17 | </v-flex> |
18 | <v-flex xs8 class="ml-3"> | 18 | <v-flex xs8 class="ml-3"> |
19 | <v-text-field v-model="editedItem.title" type="text" :rules="titleRules" required></v-text-field> | 19 | <v-text-field v-model="editedItem.title" type="text" :rules="titleRules" required></v-text-field> |
20 | </v-flex> | 20 | </v-flex> |
21 | </v-layout> | 21 | </v-layout> |
22 | <v-layout> | 22 | <v-layout> |
23 | <v-flex xs4 class="pt-4 subheading"> | 23 | <v-flex xs4 class="pt-4 subheading"> |
24 | <label class="right">Description:</label> | 24 | <label class="right">Description:</label> |
25 | </v-flex> | 25 | </v-flex> |
26 | <v-flex xs8 class="ml-3"> | 26 | <v-flex xs8 class="ml-3"> |
27 | <v-text-field | 27 | <v-text-field |
28 | v-model="editedItem.description" | 28 | v-model="editedItem.description" |
29 | type="text" | 29 | type="text" |
30 | :rules="deadlineRules" | 30 | :rules="deadlineRules" |
31 | required | 31 | required |
32 | ></v-text-field> | 32 | ></v-text-field> |
33 | </v-flex> | 33 | </v-flex> |
34 | </v-layout> | 34 | </v-layout> |
35 | <v-layout> | 35 | <v-layout> |
36 | <v-flex xs4 class="pt-4 subheading"> | 36 | <v-flex xs4 class="pt-4 subheading"> |
37 | <label class="right">Deadline:</label> | 37 | <label class="right">Deadline:</label> |
38 | </v-flex> | 38 | </v-flex> |
39 | <v-flex xs8 class="ml-3"> | 39 | <v-flex xs8 class="ml-3"> |
40 | <v-menu | 40 | <v-menu |
41 | ref="menu1" | 41 | ref="menu1" |
42 | :close-on-content-click="false" | 42 | :close-on-content-click="false" |
43 | v-model="menu1" | 43 | v-model="menu1" |
44 | :nudge-right="40" | 44 | :nudge-right="40" |
45 | :return-value.sync="menu1" | 45 | :return-value.sync="menu1" |
46 | lazy | 46 | lazy |
47 | transition="scale-transition" | 47 | transition="scale-transition" |
48 | offset-y | 48 | offset-y |
49 | full-width | 49 | full-width |
50 | min-width="290px" | 50 | min-width="290px" |
51 | > | 51 | > |
52 | <v-text-field | 52 | <v-text-field |
53 | slot="activator" | 53 | slot="activator" |
54 | v-model="editedItem.deadline" | 54 | v-model="editedItem.deadline" |
55 | placeholder="Select Date" | 55 | placeholder="Select Date" |
56 | :rules="deadlineRules" | 56 | :rules="deadlineRules" |
57 | append-icon="event" | 57 | append-icon="event" |
58 | required | 58 | required |
59 | ></v-text-field> | 59 | ></v-text-field> |
60 | <v-date-picker v-model="editedItem.date" @input="menu1 = false"></v-date-picker> | 60 | <v-date-picker v-model="editedItem.date" @input="menu1 = false"></v-date-picker> |
61 | </v-menu> | 61 | </v-menu> |
62 | </v-flex> | 62 | </v-flex> |
63 | </v-layout> | 63 | </v-layout> |
64 | <v-layout> | 64 | <v-layout> |
65 | <v-flex xs4 class="pt-4 subheading"> | 65 | <v-flex xs4 class="pt-4 subheading"> |
66 | <label class="right">Class:</label> | 66 | <label class="right">Class:</label> |
67 | </v-flex> | 67 | </v-flex> |
68 | <v-flex xs8 class="ml-3"> | 68 | <v-flex xs8 class="ml-3"> |
69 | <v-select | 69 | <v-select |
70 | :items="classList" | 70 | :items="classList" |
71 | item-text="classNum" | 71 | item-text="classNum" |
72 | item-value="_id" | 72 | item-value="_id" |
73 | :rules="classRules" | 73 | :rules="classRules" |
74 | v-model="editedItem.classId" | 74 | v-model="editedItem.classId" |
75 | @change="getSections(editedItem.classId)" | 75 | @change="getSections(editedItem.classId)" |
76 | required | 76 | required |
77 | ></v-select> | 77 | ></v-select> |
78 | </v-flex> | 78 | </v-flex> |
79 | </v-layout> | 79 | </v-layout> |
80 | <v-layout> | 80 | <v-layout> |
81 | <v-flex xs4 class="pt-4 subheading"> | 81 | <v-flex xs4 class="pt-4 subheading"> |
82 | <label class="right">Section:</label> | 82 | <label class="right">Section:</label> |
83 | </v-flex> | 83 | </v-flex> |
84 | <v-flex xs8 class="ml-3"> | 84 | <v-flex xs8 class="ml-3"> |
85 | <v-select | 85 | <v-select |
86 | :items="addSection" | 86 | :items="addSection" |
87 | item-text="name" | 87 | item-text="name" |
88 | item-value="_id" | 88 | item-value="_id" |
89 | v-model="editedItem.sectionId" | 89 | v-model="editedItem.sectionId" |
90 | :rules="sectionRules" | 90 | :rules="sectionRules" |
91 | @change="getClassSubject(editedItem.classId)" | 91 | @change="getClassSubject(editedItem.classId)" |
92 | required | 92 | required |
93 | ></v-select> | 93 | ></v-select> |
94 | </v-flex> | 94 | </v-flex> |
95 | </v-layout> | 95 | </v-layout> |
96 | <v-layout> | 96 | <v-layout> |
97 | <v-flex xs4 class="pt-4 subheading"> | 97 | <v-flex xs4 class="pt-4 subheading"> |
98 | <label class="right">Subject</label> | 98 | <label class="right">Subject</label> |
99 | </v-flex> | 99 | </v-flex> |
100 | <v-flex xs8 class="ml-3"> | 100 | <v-flex xs8 class="ml-3"> |
101 | <v-select | 101 | <v-select |
102 | :items="subjectList.subjects" | 102 | :items="subjectList.subjects" |
103 | v-model="editedItem.subjectName" | 103 | v-model="editedItem.subjectName" |
104 | item-text="subjectName" | 104 | item-text="subjectName" |
105 | item-value="_id" | 105 | item-value="_id" |
106 | :rules="subjectRules" | 106 | :rules="subjectRules" |
107 | required | 107 | required |
108 | ></v-select> | 108 | ></v-select> |
109 | </v-flex> | 109 | </v-flex> |
110 | </v-layout> | 110 | </v-layout> |
111 | <v-layout> | 111 | <v-layout> |
112 | <v-flex xs4 class="pt-4 subheading"> | 112 | <v-flex xs4 class="pt-4 subheading"> |
113 | <label class="right hidden-xs-only hidden-sm-only">Uplaod File:</label> | 113 | <label class="right hidden-xs-only hidden-sm-only">Uplaod File:</label> |
114 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">File :</label> | 114 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">File :</label> |
115 | </v-flex> | 115 | </v-flex> |
116 | <v-flex xs8 sm8 class="ml-3"> | 116 | <v-flex xs8 sm8 class="ml-3"> |
117 | <v-text-field | 117 | <v-text-field |
118 | label="Select File" | 118 | label="Select File" |
119 | @click="pickFile" | 119 | @click="pickFile" |
120 | v-model="imageName" | 120 | v-model="imageName" |
121 | append-icon="attach_file" | 121 | append-icon="attach_file" |
122 | ></v-text-field> | 122 | ></v-text-field> |
123 | <input | 123 | <input |
124 | type="file" | 124 | type="file" |
125 | style="display:none" | 125 | style="display:none" |
126 | ref="image" | 126 | ref="image" |
127 | accept="image/*" | 127 | accept="image/*" |
128 | @change="onFilePicked" | 128 | @change="onFilePicked" |
129 | /> | 129 | /> |
130 | </v-flex> | 130 | </v-flex> |
131 | </v-layout> | 131 | </v-layout> |
132 | <v-flex xs12 sm12> | 132 | <v-flex xs12 sm12> |
133 | <v-card-actions> | 133 | <v-card-actions> |
134 | <v-spacer></v-spacer> | 134 | <v-spacer></v-spacer> |
135 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | 135 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> |
136 | </v-card-actions> | 136 | </v-card-actions> |
137 | </v-flex> | 137 | </v-flex> |
138 | </v-form> | 138 | </v-form> |
139 | </v-container> | 139 | </v-container> |
140 | </v-card> | 140 | </v-card> |
141 | </v-dialog> | 141 | </v-dialog> |
142 | 142 | ||
143 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> | 143 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> |
144 | <v-dialog v-model="viewAssignmentDialog" max-width="500px"> | 144 | <v-dialog v-model="viewAssignmentDialog" max-width="500px"> |
145 | <v-card flat class="card-style pa-3" dark> | 145 | <v-card flat class="card-style pa-3" dark> |
146 | <v-layout> | 146 | <v-layout> |
147 | <v-flex xs12> | 147 | <v-flex xs12> |
148 | <label class="title text-xs-center">View Attendence</label> | 148 | <label class="title text-xs-center">View Attendence</label> |
149 | <v-icon size="24" class="right" @click="viewAssignmentDialog = false">cancel</v-icon> | 149 | <v-icon size="24" class="right" @click="viewAssignmentDialog = false">cancel</v-icon> |
150 | </v-flex> | 150 | </v-flex> |
151 | </v-layout> | 151 | </v-layout> |
152 | <v-card-text> | 152 | <v-card-text> |
153 | <v-container grid-list-md> | 153 | <v-container grid-list-md> |
154 | <v-layout wrap> | 154 | <v-layout wrap> |
155 | <v-flex> | 155 | <v-flex> |
156 | <v-layout> | 156 | <v-layout> |
157 | <v-flex xs6 sm4> | 157 | <v-flex xs6 sm4> |
158 | <h5 class="right my-1"> | 158 | <h5 class="right my-1"> |
159 | <b>Title:</b> | 159 | <b>Title:</b> |
160 | </h5> | 160 | </h5> |
161 | </v-flex> | 161 | </v-flex> |
162 | <v-flex sm8 xs6> | 162 | <v-flex sm8 xs6> |
163 | <h5 class="my-1">{{ editedItem.title }}</h5> | 163 | <h5 class="my-1">{{ editedItem.title }}</h5> |
164 | </v-flex> | 164 | </v-flex> |
165 | </v-layout> | 165 | </v-layout> |
166 | <v-layout> | 166 | <v-layout> |
167 | <v-flex xs6 sm4> | 167 | <v-flex xs6 sm4> |
168 | <h5 class="right my-1"> | 168 | <h5 class="right my-1"> |
169 | <b>Description:</b> | 169 | <b>Description:</b> |
170 | </h5> | 170 | </h5> |
171 | </v-flex> | 171 | </v-flex> |
172 | <v-flex sm8 xs6> | 172 | <v-flex sm8 xs6> |
173 | <h5 class="my-1">{{ editedItem.description }}</h5> | 173 | <h5 class="my-1">{{ editedItem.description }}</h5> |
174 | </v-flex> | 174 | </v-flex> |
175 | </v-layout> | 175 | </v-layout> |
176 | <v-layout> | 176 | <v-layout> |
177 | <v-flex xs6 sm4> | 177 | <v-flex xs6 sm4> |
178 | <h5 class="right my-1"> | 178 | <h5 class="right my-1"> |
179 | <b>Deadline:</b> | 179 | <b>Deadline:</b> |
180 | </h5> | 180 | </h5> |
181 | </v-flex> | 181 | </v-flex> |
182 | <v-flex sm8 xs6> | 182 | <v-flex sm8 xs6> |
183 | <h5 class="my-1">{{ dates(editedItem.deadline) }}</h5> | 183 | <h5 class="my-1">{{ dates(editedItem.deadline) }}</h5> |
184 | </v-flex> | 184 | </v-flex> |
185 | </v-layout> | 185 | </v-layout> |
186 | </v-flex> | 186 | </v-flex> |
187 | </v-layout> | 187 | </v-layout> |
188 | </v-container> | 188 | </v-container> |
189 | </v-card-text> | 189 | </v-card-text> |
190 | </v-card> | 190 | </v-card> |
191 | </v-dialog> | 191 | </v-dialog> |
192 | 192 | ||
193 | <!-- ****** EXISTING ASSIGNMENT TABLE ****** --> | 193 | <!-- ****** EXISTING ASSIGNMENT TABLE ****** --> |
194 | <v-toolbar color="transparent" flat> | 194 | <v-toolbar color="transparent" flat> |
195 | <v-btn | 195 | <v-btn |
196 | fab | 196 | fab |
197 | dark | 197 | dark |
198 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 198 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
199 | small | 199 | small |
200 | @click="addAssignmentDialog = true" | 200 | @click="addAssignmentDialog = true" |
201 | > | 201 | > |
202 | <v-icon dark>add</v-icon> | 202 | <v-icon dark>add</v-icon> |
203 | </v-btn> | 203 | </v-btn> |
204 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> | 204 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> |
205 | <v-btn round class="open-dialog-button" dark @click="addAssignmentDialog = true"> | 205 | <v-btn round class="open-dialog-button" dark @click="addAssignmentDialog = true"> |
206 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Assignment | 206 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Assignment |
207 | </v-btn> | 207 | </v-btn> |
208 | </v-flex> | 208 | </v-flex> |
209 | <v-spacer></v-spacer> | 209 | <v-spacer></v-spacer> |
210 | <v-flex lg2 md2 xs12 v-show="show"> | 210 | <v-flex lg2 md2 xs12 v-show="show"> |
211 | <v-select | 211 | <v-select |
212 | :items="classList" | 212 | :items="classList" |
213 | placeholder="Select Your Class" | 213 | placeholder="Select Your Class" |
214 | v-model="showAssignment.classId" | 214 | v-model="showAssignment.classId" |
215 | item-text="classNum" | 215 | item-text="classNum" |
216 | item-value="_id" | 216 | item-value="_id" |
217 | name="Select Class" | 217 | name="Select Class" |
218 | :rules="classRules" | 218 | :rules="classRules" |
219 | @change="getAssignmentList()" | 219 | @change="getAssignmentList()" |
220 | class="pl-2" | 220 | class="pl-2" |
221 | required | 221 | required |
222 | ></v-select> | 222 | ></v-select> |
223 | </v-flex> | 223 | </v-flex> |
224 | <v-card-title class="body-1" v-show="show"> | 224 | <v-card-title class="body-1" v-show="show"> |
225 | <v-btn icon flat @click="displaySearch"> | 225 | <v-btn icon flat @click="displaySearch"> |
226 | <v-avatar size="27"> | 226 | <v-avatar size="27"> |
227 | <img src="/static/icon/search.png" alt="icon" /> | 227 | <img src="/static/icon/search.png" alt="icon" /> |
228 | </v-avatar> | 228 | </v-avatar> |
229 | </v-btn> | 229 | </v-btn> |
230 | </v-card-title> | 230 | </v-card-title> |
231 | <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch"> | 231 | <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch"> |
232 | <v-layout> | 232 | <v-layout> |
233 | <v-text-field | 233 | <v-text-field |
234 | v-model="search" | 234 | v-model="search" |
235 | placeholder="Search" | 235 | placeholder="Search" |
236 | prepend-inner-icon="search" | 236 | prepend-inner-icon="search" |
237 | color="primary" | 237 | color="primary" |
238 | autofocus | 238 | autofocus |
239 | style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important" | 239 | style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important" |
240 | ></v-text-field> | 240 | ></v-text-field> |
241 | <v-icon @click="closeSearch" color="error">close</v-icon> | 241 | <v-icon @click="closeSearch" color="error">close</v-icon> |
242 | </v-layout> | 242 | </v-layout> |
243 | </v-flex> | 243 | </v-flex> |
244 | </v-toolbar> | 244 | </v-toolbar> |
245 | <v-data-table | 245 | <v-data-table |
246 | :headers="headers" | 246 | :headers="headers" |
247 | :items="assignmentData" | 247 | :items="assignmentData" |
248 | :pagination.sync="pagination" | 248 | :pagination.sync="pagination" |
249 | :search="search" | 249 | :search="search" |
250 | > | 250 | > |
251 | <template slot="items" slot-scope="props"> | 251 | <template slot="items" slot-scope="props"> |
252 | <tr class="tr"> | 252 | <tr class="tr"> |
253 | <td class="td-row td">{{ props.index + 1 }}</td> | 253 | <td class="td-row td">{{ props.index + 1 }}</td> |
254 | <td class="text-xs-center td td-row">{{ props.item.title }}</td> | 254 | <td class="text-xs-center td td-row">{{ props.item.title }}</td> |
255 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> | 255 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> |
256 | <td class="text-xs-center td td-row">{{ props.item.deadline }}</td> | 256 | <td class="text-xs-center td td-row">{{ props.item.deadline }}</td> |
257 | <td class="text-xs-center td td-row">{{ props.item.sectionId.name }}</td> | 257 | <td class="text-xs-center td td-row">{{ props.item.sectionId.name }}</td> |
258 | <td | 258 | <td |
259 | class="text-xs-center td td-row" | 259 | class="text-xs-center td td-row" |
260 | v-if="role != 'TEACHER' " | 260 | v-if="role === 'TEACHER'" |
261 | >{{ props.item.teacherId.name }}</td> | 261 | >{{ props.item.teacherId.name }}</td> |
262 | <td | 262 | <td |
263 | class="text-xs-center td td-row" | 263 | class="text-xs-center td td-row" |
264 | v-if="role != 'ADMIN'" | 264 | v-if="role === 'ADMIN'" |
265 | >{{ props.item.schoolId .name }}</td> | 265 | >{{ props.item.schoolId.name }}</td> |
266 | <td class="text-xs-center td td-row"> | 266 | <td class="text-xs-center td td-row"> |
267 | <v-btn | 267 | <a :href="props.item.fileName" target="_blank" style="text-decoration: none!important;"> |
268 | class="add-button" | 268 | <v-btn flat block @click="generatePDF2Canvas(props.item)" :loading="loadingPdf"> |
269 | @click="generatePDF2Canvas(props.item)" | 269 | <span> |
270 | :loading="loadingPdf" | 270 | <h5>{{props.item.fileName}}</h5> |
271 | dark | 271 | </span> |
272 | >{{ props.item.fileType }}</v-btn> | 272 | </v-btn> |
273 | </a> | ||
273 | </td> | 274 | </td> |
274 | <td class="text-xs-center td td-row"> | 275 | <td class="text-xs-center td td-row"> |
275 | <span> | 276 | <span> |
276 | <v-tooltip top> | 277 | <v-tooltip top> |
277 | <img | 278 | <img |
278 | slot="activator" | 279 | slot="activator" |
279 | style="cursor:pointer; width:25px; height:25px; " | 280 | style="cursor:pointer; width:25px; height:25px; " |
280 | class="mr-3" | 281 | class="mr-3" |
281 | @click="profile(props.item)" | 282 | @click="profile(props.item)" |
282 | src="/static/icon/view.png" | 283 | src="/static/icon/view.png" |
283 | /> | 284 | /> |
284 | <span>View</span> | 285 | <span>View</span> |
285 | </v-tooltip> | 286 | </v-tooltip> |
286 | <v-tooltip top> | 287 | <v-tooltip top> |
287 | <img | 288 | <img |
288 | slot="activator" | 289 | slot="activator" |
289 | style="cursor:pointer; width:20px; height:18px; " | 290 | style="cursor:pointer; width:20px; height:18px; " |
290 | class="mr-3" | 291 | class="mr-3" |
291 | @click="editItem(props.item)" | 292 | @click="editItem(props.item)" |
292 | src="/static/icon/edit.png" | 293 | src="/static/icon/edit.png" |
293 | /> | 294 | /> |
294 | <span>Edit</span> | 295 | <span>Edit</span> |
295 | </v-tooltip> | 296 | </v-tooltip> |
296 | <v-tooltip top> | 297 | <v-tooltip top> |
297 | <img | 298 | <img |
298 | slot="activator" | 299 | slot="activator" |
299 | style="cursor:pointer; width:20px; height:20px; " | 300 | style="cursor:pointer; width:20px; height:20px; " |
300 | class="mr-3" | 301 | class="mr-3" |
301 | @click="deleteItem(props.item)" | 302 | @click="deleteItem(props.item)" |
302 | src="/static/icon/delete.png" | 303 | src="/static/icon/delete.png" |
303 | /> | 304 | /> |
304 | <span>Delete</span> | 305 | <span>Delete</span> |
305 | </v-tooltip> | 306 | </v-tooltip> |
306 | </span> | 307 | </span> |
307 | </td> | 308 | </td> |
308 | </tr> | 309 | </tr> |
309 | </template> | 310 | </template> |
310 | <v-alert | 311 | <v-alert |
311 | slot="no-results" | 312 | slot="no-results" |
312 | :value="true" | 313 | :value="true" |
313 | color="error" | 314 | color="error" |
314 | icon="warning" | 315 | icon="warning" |
315 | >Your search for "{{ search }}" found no results.</v-alert> | 316 | >Your search for "{{ search }}" found no results.</v-alert> |
316 | </v-data-table> | 317 | </v-data-table> |
317 | <!-- ****** ADD MULTIPLE Subject ****** --> | 318 | <!-- ****** ADD MULTIPLE Subject ****** --> |
318 | <v-snackbar | 319 | <v-snackbar |
319 | :timeout="timeout" | 320 | :timeout="timeout" |
320 | :top="y === 'top'" | 321 | :top="y === 'top'" |
321 | :right="x === 'right'" | 322 | :right="x === 'right'" |
322 | :vertical="mode === 'vertical'" | 323 | :vertical="mode === 'vertical'" |
323 | v-model="snackbar" | 324 | v-model="snackbar" |
324 | :color="color" | 325 | :color="color" |
325 | >{{ text }}</v-snackbar> | 326 | >{{ text }}</v-snackbar> |
326 | <v-dialog v-model="addAssignmentDialog" max-width="400px" v-if="addAssignmentDialog"> | 327 | <v-dialog v-model="addAssignmentDialog" max-width="400px" v-if="addAssignmentDialog"> |
327 | <v-card flat class="card-style pa-2" dark> | 328 | <v-card flat class="card-style pa-2" dark> |
328 | <v-layout> | 329 | <v-layout> |
329 | <v-flex xs12> | 330 | <v-flex xs12> |
330 | <label class="title text-xs-center">Add Assignment</label> | 331 | <label class="title text-xs-center">Add Assignment</label> |
331 | <v-icon size="24" class="right" @click="closeAddAssignmentModel">cancel</v-icon> | 332 | <v-icon size="24" class="right" @click="closeAddAssignmentModel">cancel</v-icon> |
332 | </v-flex> | 333 | </v-flex> |
333 | </v-layout> | 334 | </v-layout> |
334 | <v-container fluid fill-height> | 335 | <v-container fluid fill-height> |
335 | <v-layout align-center> | 336 | <v-layout align-center> |
336 | <v-flex xs12> | 337 | <v-flex xs12> |
337 | <v-form ref="form" v-model="valid" lazy-validation> | 338 | <v-form ref="form" v-model="valid" lazy-validation> |
338 | <v-layout> | 339 | <v-layout> |
339 | <v-flex xs4 sm4 class="pt-4 subheading"> | 340 | <v-flex xs4 sm4 class="pt-4 subheading"> |
340 | <label class="right">Title :</label> | 341 | <label class="right">Title :</label> |
341 | </v-flex> | 342 | </v-flex> |
342 | <v-flex xs8 sm8 class="ml-3"> | 343 | <v-flex xs8 sm8 class="ml-3"> |
343 | <v-text-field | 344 | <v-text-field |
344 | name="name" | 345 | name="name" |
345 | type="text" | 346 | type="text" |
346 | placeholder="Select Title" | 347 | placeholder="Select Title" |
347 | :rules="titleRules" | 348 | :rules="titleRules" |
348 | v-model="addAssignment.title" | 349 | v-model="addAssignment.title" |
349 | required | 350 | required |
350 | ></v-text-field> | 351 | ></v-text-field> |
351 | </v-flex> | 352 | </v-flex> |
352 | </v-layout> | 353 | </v-layout> |
353 | <v-layout> | 354 | <v-layout> |
354 | <v-flex xs4 sm4 class="pt-4 subheading"> | 355 | <v-flex xs4 sm4 class="pt-4 subheading"> |
355 | <label class="right">Description :</label> | 356 | <label class="right">Description :</label> |
356 | </v-flex> | 357 | </v-flex> |
357 | <v-flex xs8 sm8 class="ml-3"> | 358 | <v-flex xs8 sm8 class="ml-3"> |
358 | <v-text-field | 359 | <v-text-field |
359 | name="name" | 360 | name="name" |
360 | type="text" | 361 | type="text" |
361 | placeholder="Select Description" | 362 | placeholder="Select Description" |
362 | :rules="descriptionRules" | 363 | :rules="descriptionRules" |
363 | v-model="addAssignment.description" | 364 | v-model="addAssignment.description" |
364 | required | 365 | required |
365 | ></v-text-field> | 366 | ></v-text-field> |
366 | </v-flex> | 367 | </v-flex> |
367 | </v-layout> | 368 | </v-layout> |
368 | <v-layout> | 369 | <v-layout> |
369 | <v-flex xs4 sm4 class="pt-4 subheading"> | 370 | <v-flex xs4 sm4 class="pt-4 subheading"> |
370 | <label class="right">Deadline :</label> | 371 | <label class="right">Deadline :</label> |
371 | </v-flex> | 372 | </v-flex> |
372 | <v-flex xs8 sm7 class="ml-3"> | 373 | <v-flex xs8 sm7 class="ml-3"> |
373 | <v-menu | 374 | <v-menu |
374 | ref="menu2" | 375 | ref="menu2" |
375 | :close-on-content-click="false" | 376 | :close-on-content-click="false" |
376 | v-model="menu2" | 377 | v-model="menu2" |
377 | :nudge-right="40" | 378 | :nudge-right="40" |
378 | :return-value.sync="addAssignment.date" | 379 | :return-value.sync="addAssignment.date" |
379 | lazy | 380 | lazy |
380 | transition="scale-transition" | 381 | transition="scale-transition" |
381 | offset-y | 382 | offset-y |
382 | full-width | 383 | full-width |
383 | min-width="290px" | 384 | min-width="290px" |
384 | > | 385 | > |
385 | <v-text-field | 386 | <v-text-field |
386 | slot="activator" | 387 | slot="activator" |
387 | v-model="addAssignment.deadline" | 388 | v-model="addAssignment.deadline" |
388 | :rules="deadlineRules" | 389 | :rules="deadlineRules" |
389 | placeholder="Select Date" | 390 | placeholder="Select Date" |
390 | append-icon="event" | 391 | append-icon="event" |
391 | readonly | 392 | readonly |
392 | ></v-text-field> | 393 | ></v-text-field> |
393 | <v-date-picker | 394 | <v-date-picker |
394 | v-model="addAssignment.deadline" | 395 | v-model="addAssignment.deadline" |
395 | @input="$refs.menu2.save(addAssignment.date)" | 396 | @input="$refs.menu2.save(addAssignment.date)" |
396 | ></v-date-picker> | 397 | ></v-date-picker> |
397 | </v-menu> | 398 | </v-menu> |
398 | </v-flex> | 399 | </v-flex> |
399 | </v-layout> | 400 | </v-layout> |
400 | <v-layout> | 401 | <v-layout> |
401 | <v-flex xs4 sm4 class="pt-4 subheading"> | 402 | <v-flex xs4 sm4 class="pt-4 subheading"> |
402 | <label class="right">Class :</label> | 403 | <label class="right">Class :</label> |
403 | </v-flex> | 404 | </v-flex> |
404 | <v-flex xs8 sm8 class="ml-3"> | 405 | <v-flex xs8 sm8 class="ml-3"> |
405 | <v-select | 406 | <v-select |
406 | :items="classList" | 407 | :items="classList" |
407 | placeholder="Select Class" | 408 | placeholder="Select Class" |
408 | item-text="classNum" | 409 | item-text="classNum" |
409 | item-value="_id" | 410 | item-value="_id" |
410 | v-model="addAssignment.classId" | 411 | v-model="addAssignment.classId" |
411 | name="Select Class" | 412 | name="Select Class" |
412 | :rules="classRules" | 413 | :rules="classRules" |
413 | @change="getSections(addAssignment.classId)" | 414 | @change="getSections(addAssignment.classId)" |
414 | class="pl-2" | 415 | class="pl-2" |
415 | required | 416 | required |
416 | ></v-select> | 417 | ></v-select> |
417 | </v-flex> | 418 | </v-flex> |
418 | </v-layout> | 419 | </v-layout> |
419 | <v-layout> | 420 | <v-layout> |
420 | <v-flex xs4 sm4 class="pt-4 subheading"> | 421 | <v-flex xs4 sm4 class="pt-4 subheading"> |
421 | <label class="right">Section :</label> | 422 | <label class="right">Section :</label> |
422 | </v-flex> | 423 | </v-flex> |
423 | <v-flex xs8 sm8 class="ml-3"> | 424 | <v-flex xs8 sm8 class="ml-3"> |
424 | <v-select | 425 | <v-select |
425 | :items="addSection" | 426 | :items="addSection" |
426 | placeholder="Select Section" | 427 | placeholder="Select Section" |
427 | item-text="name" | 428 | item-text="name" |
428 | item-value="_id" | 429 | item-value="_id" |
429 | v-model="addAssignment.sectionId" | 430 | v-model="addAssignment.sectionId" |
430 | name="Select Section" | 431 | name="Select Section" |
431 | :rules="sectionRules" | 432 | :rules="sectionRules" |
432 | @change="getClassSubject(addAssignment.classId)" | 433 | @change="getClassSubject(addAssignment.classId)" |
433 | class="px-2" | 434 | class="px-2" |
434 | required | 435 | required |
435 | ></v-select> | 436 | ></v-select> |
436 | </v-flex> | 437 | </v-flex> |
437 | </v-layout> | 438 | </v-layout> |
438 | <v-layout> | 439 | <v-layout> |
439 | <v-flex xs3 sm4 class="pt-4 subheading"> | 440 | <v-flex xs3 sm4 class="pt-4 subheading"> |
440 | <label class="right">Subject :</label> | 441 | <label class="right">Subject :</label> |
441 | </v-flex> | 442 | </v-flex> |
442 | <v-flex xs8 sm8 class="ml-2"> | 443 | <v-flex xs8 sm8 class="ml-2"> |
443 | <v-select | 444 | <v-select |
444 | :items="subjectList.subjects" | 445 | :items="subjectList.subjects" |
445 | placeholder="Select your subject" | 446 | placeholder="Select your subject" |
446 | v-model="addAssignment.subjectName" | 447 | v-model="addAssignment.subjectName" |
447 | item-text="subjectName" | 448 | item-text="subjectName" |
448 | item-value="_id" | 449 | item-value="_id" |
449 | :rules="subjectRules" | 450 | :rules="subjectRules" |
450 | required | 451 | required |
451 | ></v-select> | 452 | ></v-select> |
452 | </v-flex> | 453 | </v-flex> |
453 | </v-layout> | 454 | </v-layout> |
454 | <v-layout> | 455 | <v-layout> |
455 | <v-flex xs4 class="pt-4 subheading"> | 456 | <v-flex xs4 class="pt-4 subheading"> |
456 | <label class="right hidden-xs-only hidden-sm-only">Uplaod File:</label> | 457 | <label class="right hidden-xs-only hidden-sm-only">Uplaod File:</label> |
457 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">File:</label> | 458 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">File:</label> |
458 | </v-flex> | 459 | </v-flex> |
459 | <v-flex xs8 class="ml-3"> | 460 | <v-flex xs8 class="ml-3"> |
460 | <v-text-field | 461 | <v-text-field |
461 | placeholder="Select File" | 462 | placeholder="Select File" |
462 | @click="pickFile" | 463 | @click="pickFile" |
463 | v-model="imageName" | 464 | v-model="imageName" |
464 | append-icon="attach_file" | 465 | append-icon="attach_file" |
465 | ></v-text-field> | 466 | ></v-text-field> |
466 | <input | 467 | <input |
467 | type="file" | 468 | type="file" |
468 | style="display:none" | 469 | style="display:none" |
469 | ref="image" | 470 | ref="image" |
470 | accept="image/*" | 471 | accept="image/*" |
471 | @change="onFilePicked" | 472 | @change="onFilePicked" |
472 | /> | 473 | /> |
473 | </v-flex> | 474 | </v-flex> |
474 | </v-layout> | 475 | </v-layout> |
475 | <v-layout> | 476 | <v-layout> |
476 | <v-flex xs12 sm12> | 477 | <v-flex xs12 sm12> |
477 | <v-card-actions> | 478 | <v-card-actions> |
478 | <v-spacer></v-spacer> | 479 | <v-spacer></v-spacer> |
479 | <v-btn | 480 | <v-btn |
480 | @click="submit" | 481 | @click="submit" |
481 | round | 482 | round |
482 | dark | 483 | dark |
483 | :loading="loading" | 484 | :loading="loading" |
484 | class="add-button" | 485 | class="add-button" |
485 | >Add Assignment</v-btn> | 486 | >Add Assignment</v-btn> |
486 | </v-card-actions> | 487 | </v-card-actions> |
487 | </v-flex> | 488 | </v-flex> |
488 | </v-layout> | 489 | </v-layout> |
489 | </v-form> | 490 | </v-form> |
490 | </v-flex> | 491 | </v-flex> |
491 | </v-layout> | 492 | </v-layout> |
492 | </v-container> | 493 | </v-container> |
493 | </v-card> | 494 | </v-card> |
494 | </v-dialog> | 495 | </v-dialog> |
495 | <div class="loader" v-if="showLoader"> | 496 | <div class="loader" v-if="showLoader"> |
496 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 497 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
497 | </div> | 498 | </div> |
498 | </v-container> | 499 | </v-container> |
499 | </template> | 500 | </template> |
500 | 501 | ||
501 | <script> | 502 | <script> |
502 | import http from "@/Services/http.js"; | 503 | import http from "@/Services/http.js"; |
503 | import Util from "@/util"; | 504 | import Util from "@/util"; |
504 | import moment from "moment"; | 505 | import moment from "moment"; |
505 | import jsPDF from "jspdf"; | 506 | import jsPDF from "jspdf"; |
506 | import { saveAs } from "file-saver"; | 507 | import { saveAs } from "file-saver"; |
507 | 508 | ||
508 | export default { | 509 | export default { |
509 | data: () => ({ | 510 | data: () => ({ |
510 | snackbar: false, | 511 | snackbar: false, |
511 | role: "", | 512 | role: "", |
512 | menu1: false, | 513 | menu1: false, |
513 | menu2: false, | 514 | menu2: false, |
514 | y: "top", | 515 | y: "top", |
515 | x: "right", | 516 | x: "right", |
516 | mode: "", | 517 | mode: "", |
517 | timeout: 3000, | 518 | timeout: 3000, |
518 | text: "", | 519 | text: "", |
519 | color: "", | 520 | color: "", |
520 | show: true, | 521 | show: true, |
521 | showSearch: false, | 522 | showSearch: false, |
522 | showLoader: false, | 523 | showLoader: false, |
523 | loading: false, | 524 | loading: false, |
524 | editLoading: false, | 525 | editLoading: false, |
525 | date: null, | 526 | date: null, |
526 | search: "", | 527 | search: "", |
527 | viewAssignmentDialog: false, | 528 | viewAssignmentDialog: false, |
528 | editAssignmentDialog: false, | 529 | editAssignmentDialog: false, |
529 | valid: true, | 530 | valid: true, |
530 | validEditAssignment: true, | 531 | validEditAssignment: true, |
531 | addAssignmentDialog: false, | 532 | addAssignmentDialog: false, |
532 | 533 | ||
533 | pagination: { | 534 | pagination: { |
534 | rowsPerPage: 10, | 535 | rowsPerPage: 10, |
535 | }, | 536 | }, |
536 | token: "", | 537 | token: "", |
537 | headers: [ | 538 | headers: [ |
538 | { | 539 | { |
539 | text: "No", | 540 | text: "No", |
540 | align: "", | 541 | align: "", |
541 | sortable: false, | 542 | sortable: false, |
542 | value: "No", | 543 | value: "No", |
543 | }, | 544 | }, |
544 | { | 545 | { |
545 | text: "Title", | 546 | text: "Title", |
546 | value: "title", | 547 | value: "title", |
547 | sortable: false, | 548 | sortable: false, |
548 | align: "center", | 549 | align: "center", |
549 | }, | 550 | }, |
550 | { | 551 | { |
551 | text: "Description", | 552 | text: "Description", |
552 | value: "description", | 553 | value: "description", |
553 | sortable: false, | 554 | sortable: false, |
554 | align: "center", | 555 | align: "center", |
555 | }, | 556 | }, |
556 | { | 557 | { |
557 | text: "Deadline", | 558 | text: "Deadline", |
558 | value: "deadline", | 559 | value: "deadline", |
559 | sortable: false, | 560 | sortable: false, |
560 | align: "center", | 561 | align: "center", |
561 | }, | 562 | }, |
562 | { | 563 | { |
563 | text: "Section", | 564 | text: "Section", |
564 | value: "name", | 565 | value: "name", |
565 | sortable: false, | 566 | sortable: false, |
566 | align: "center", | 567 | align: "center", |
567 | }, | 568 | }, |
568 | { | 569 | { |
569 | text: "Uploader", | 570 | text: "Uploader", |
570 | value: "name", | 571 | value: "name", |
571 | sortable: false, | 572 | sortable: false, |
572 | align: "center", | 573 | align: "center", |
573 | }, | 574 | }, |
574 | { | 575 | { |
575 | text: "File", | 576 | text: "File", |
576 | value: "file", | 577 | value: "file", |
577 | sortable: false, | 578 | sortable: false, |
578 | align: "center", | 579 | align: "center", |
579 | }, | 580 | }, |
580 | { text: "Action", value: "", sortable: false, align: "center" }, | 581 | { text: "Action", value: "", sortable: false, align: "center" }, |
581 | ], | 582 | ], |
582 | 583 | ||
583 | showPdfData: false, | 584 | showPdfData: false, |
584 | loadingPdf: false, | 585 | loadingPdf: false, |
585 | hideData: true, | 586 | hideData: true, |
586 | 587 | ||
587 | assignmentData: [], | 588 | assignmentData: [], |
588 | subjectList: [], | 589 | subjectList: [], |
589 | classList: [], | 590 | classList: [], |
590 | addSection: [], | 591 | addSection: [], |
591 | editedIndex: -1, | 592 | editedIndex: -1, |
592 | addSubject: {}, | 593 | addSubject: {}, |
593 | 594 | ||
594 | editedItem: { | 595 | editedItem: { |
595 | title: "", | 596 | title: "", |
596 | description: "", | 597 | description: "", |
597 | deadline: "", | 598 | deadline: "", |
598 | classId: "", | 599 | classId: "", |
599 | sectionId: "", | 600 | sectionId: "", |
600 | subjectName: "", | 601 | subjectName: "", |
601 | fileType: "", | 602 | fileType: "", |
602 | }, | 603 | }, |
603 | addAssignment: {}, | 604 | addAssignment: {}, |
604 | showAssignment: {}, | 605 | showAssignment: {}, |
605 | 606 | ||
606 | imageData: {}, | 607 | imageData: {}, |
607 | imageName: "", | 608 | imageName: "", |
608 | imageUrl: "", | 609 | imageUrl: "", |
609 | imageFile: "", | 610 | imageFile: "", |
610 | 611 | ||
611 | titleRules: [(v) => !!v || " Title is required"], | 612 | titleRules: [(v) => !!v || " Title is required"], |
612 | descriptionRules: [(v) => !!v || " Description is required"], | 613 | descriptionRules: [(v) => !!v || " Description is required"], |
613 | deadlineRules: [(v) => !!v || " Deadline is required"], | 614 | deadlineRules: [(v) => !!v || " Deadline is required"], |
614 | classRules: [(v) => !!v || "Class is required"], | 615 | classRules: [(v) => !!v || "Class is required"], |
615 | sectionRules: [(v) => !!v || "Section is required"], | 616 | sectionRules: [(v) => !!v || "Section is required"], |
616 | subjectRules: [(v) => !!v || "Student is required"], | 617 | subjectRules: [(v) => !!v || "Student is required"], |
617 | fileRules: [(v) => !!v || "File is required"], | 618 | fileRules: [(v) => !!v || "File is required"], |
618 | }), | 619 | }), |
619 | watch: { | 620 | watch: { |
620 | addAssignmentDialog: function (val) { | 621 | addAssignmentDialog: function (val) { |
621 | if (!val) { | 622 | if (!val) { |
622 | this.addAssignment = []; | 623 | this.addAssignment = []; |
623 | this.imageName = ""; | 624 | this.imageName = ""; |
624 | } | 625 | } |
625 | }, | 626 | }, |
626 | }, | 627 | }, |
627 | methods: { | 628 | methods: { |
628 | dates: function (date) { | 629 | dates: function (date) { |
629 | return moment(date).format("MMMM DD, YYYY"); | 630 | return moment(date).format("MMMM DD, YYYY"); |
630 | }, | 631 | }, |
631 | pickFile() { | 632 | pickFile() { |
632 | this.$refs.image.click(); | 633 | this.$refs.image.click(); |
633 | }, | 634 | }, |
634 | editItem(item) { | 635 | editItem(item) { |
635 | this.editedIndex = this.assignmentData; | 636 | this.editedIndex = this.assignmentData; |
636 | this.editedItem = Object.assign({}, item); | 637 | this.editedItem = Object.assign({}, item); |
637 | this.dialog = true; | 638 | this.dialog = true; |
638 | this.editAssignmentDialog = true; | 639 | this.editAssignmentDialog = true; |
639 | }, | 640 | }, |
640 | profile(item) { | 641 | profile(item) { |
641 | this.editedIndex = this.assignmentData; | 642 | this.editedIndex = this.assignmentData; |
642 | this.editedItem = Object.assign({}, item); | 643 | this.editedItem = Object.assign({}, item); |
643 | this.dialog1 = true; | 644 | this.dialog1 = true; |
644 | this.viewAssignmentDialog = true; | 645 | this.viewAssignmentDialog = true; |
645 | }, | 646 | }, |
646 | deleteItem(item) { | 647 | deleteItem(item) { |
647 | let deleteAssignment = { | 648 | let deleteAssignment = { |
648 | assignmentId: item._id, | 649 | assignmentId: item._id, |
649 | }; | 650 | }; |
650 | http() | 651 | http() |
651 | .delete( | 652 | .delete( |
652 | "/deleteAssignment", | 653 | "/deleteAssignment", |
653 | confirm("Are you sure you want to delete this?") && { | 654 | confirm("Are you sure you want to delete this?") && { |
654 | params: deleteAssignment, | 655 | params: deleteAssignment, |
655 | }, | 656 | }, |
656 | { | 657 | { |
657 | headers: { Authorization: "Bearer " + this.token }, | 658 | headers: { Authorization: "Bearer " + this.token }, |
658 | } | 659 | } |
659 | ) | 660 | ) |
660 | .then((response) => { | 661 | .then((response) => { |
661 | this.getAssignmentList(); | 662 | this.getAssignmentList(); |
662 | this.snackbar = true; | 663 | this.snackbar = true; |
663 | this.text = "Successfully delete Existing Assignment"; | 664 | this.text = "Successfully delete Existing Assignment"; |
664 | this.color = "green"; | 665 | this.color = "green"; |
665 | }) | 666 | }) |
666 | .catch((error) => { | 667 | .catch((error) => { |
667 | this.snackbar = true; | 668 | this.snackbar = true; |
668 | this.text = error.response.data.message; | 669 | this.text = error.response.data.message; |
669 | this.color = "error"; | 670 | this.color = "error"; |
670 | }); | 671 | }); |
671 | }, | 672 | }, |
672 | close() { | 673 | close() { |
673 | this.editAssignmentDialog = false; | 674 | this.editAssignmentDialog = false; |
674 | }, | 675 | }, |
675 | close1() { | 676 | close1() { |
676 | this.viewAssignmentDialog = false; | 677 | this.viewAssignmentDialog = false; |
677 | }, | 678 | }, |
678 | closeAddAssignmentModel() { | 679 | closeAddAssignmentModel() { |
679 | this.addAssignmentDialog = false; | 680 | this.addAssignmentDialog = false; |
680 | // this.assignmentData = []; | 681 | // this.assignmentData = []; |
681 | this.addAssignment = []; | 682 | this.addAssignment = []; |
682 | this.imageName = ""; | 683 | this.imageName = ""; |
683 | }, | 684 | }, |
684 | submit() { | 685 | submit() { |
685 | var addAssignment = { | 686 | var addAssignment = { |
686 | title: this.addAssignment.title, | 687 | title: this.addAssignment.title, |
687 | description: this.addAssignment.description, | 688 | description: this.addAssignment.description, |
688 | deadline: this.addAssignment.deadline, | 689 | deadline: this.addAssignment.deadline, |
689 | classId: this.addAssignment.classId, | 690 | classId: this.addAssignment.classId, |
690 | sectionId: this.addAssignment.sectionId, | 691 | sectionId: this.addAssignment.sectionId, |
691 | subjectName: this.addAssignment.subjectName, | 692 | subjectName: this.addAssignment.subjectName, |
692 | file: this.addAssignment.imageName, | 693 | file: this.addAssignment.imageName, |
693 | fileName: this.imageName, | 694 | fileName: this.imageName, |
694 | }; | 695 | }; |
695 | var signatures = { | 696 | var signatures = { |
696 | JVBERi0: "other", | 697 | JVBERi0: "other", |
697 | iVBORw0KGgo: "image", | 698 | iVBORw0KGgo: "image", |
698 | UEsDBBQ: "other", | 699 | UEsDBBQ: "other", |
699 | "/": "image", | 700 | "/": "image", |
700 | AAABAA: "image", | 701 | AAABAA: "image", |
701 | IywiV2hhdC: "other", | 702 | IywiV2hhdC: "other", |
702 | bmFtZSxl: "other", | 703 | bmFtZSxl: "other", |
703 | }; | 704 | }; |
704 | function detectMimeType(b64) { | 705 | function detectMimeType(b64) { |
705 | for (var s in signatures) { | 706 | for (var s in signatures) { |
706 | if (b64.indexOf(s) === 0) { | 707 | if (b64.indexOf(s) === 0) { |
707 | return signatures[s]; | 708 | return signatures[s]; |
708 | } | 709 | } |
709 | } | 710 | } |
710 | } | 711 | } |
711 | if (this.$refs.form.validate()) { | 712 | if (this.$refs.form.validate()) { |
712 | if (this.imageUrl) { | 713 | if (this.imageUrl) { |
713 | var str = this.imageUrl; | 714 | var str = this.imageUrl; |
714 | const [baseUrl, imageUrl] = str.split(/,/); | 715 | const [baseUrl, imageUrl] = str.split(/,/); |
715 | addAssignment.upload = imageUrl; | 716 | addAssignment.upload = imageUrl; |
716 | addAssignment.fileType = detectMimeType(imageUrl); | 717 | addAssignment.fileType = detectMimeType(imageUrl); |
717 | } | 718 | } |
718 | console.log("data===>", addAssignment); | 719 | // console.log("data===>", addAssignment); |
719 | http() | 720 | http() |
720 | .post("/createAssignment", addAssignment) | 721 | .post("/createAssignment", addAssignment) |
721 | .then((response) => { | 722 | .then((response) => { |
722 | this.getAssignmentList(); | 723 | this.getAssignmentList(); |
723 | this.snackbar = true; | 724 | this.snackbar = true; |
724 | this.text = "Syllabus added successfully"; | 725 | this.text = "Assignment added successfully"; |
725 | this.color = "green"; | 726 | this.color = "green"; |
726 | this.addAssignmentDialog = false; | 727 | this.addAssignmentDialog = false; |
727 | this.clear(); | 728 | this.clear(); |
728 | }) | 729 | }) |
729 | .catch((error) => { | 730 | .catch((error) => { |
730 | // console.log(error); | 731 | // console.log(error); |
731 | this.snackbar = true; | 732 | this.snackbar = true; |
732 | this.text = error.response.data.message; | 733 | this.text = error.response.data.message; |
733 | this.color = "red"; | 734 | this.color = "red"; |
734 | }); | 735 | }); |
735 | } | 736 | } |
736 | }, | 737 | }, |
737 | getAssignmentList() { | 738 | getAssignmentList() { |
738 | if (this.addAssignment.classId) { | 739 | if (this.addAssignment.classId) { |
739 | this.addAssignment.classId = this.addAssignment.classId; | 740 | this.addAssignment.classId = this.addAssignment.classId; |
740 | } | 741 | } |
741 | this.showLoader = true; | 742 | this.showLoader = true; |
742 | http() | 743 | http() |
743 | .get( | 744 | .get( |
744 | "/getAssignmentList", | 745 | "/getAssignmentList", |
745 | { | 746 | { |
746 | params: { classId: this.showAssignment.classId }, | 747 | params: { classId: this.showAssignment.classId }, |
747 | }, | 748 | }, |
748 | { | 749 | { |
749 | headers: { Authorization: "Bearer " + this.token }, | 750 | headers: { Authorization: "Bearer " + this.token }, |
750 | } | 751 | } |
751 | ) | 752 | ) |
752 | .then((response) => { | 753 | .then((response) => { |
753 | this.assignmentData = response.data.data; | 754 | this.assignmentData = response.data.data; |
754 | this.showLoader = false; | 755 | this.showLoader = false; |
755 | this.loadingSearch = false; | 756 | this.loadingSearch = false; |
756 | }) | 757 | }) |
757 | .catch((error) => { | 758 | .catch((error) => { |
758 | // console.log("err====>", err); | 759 | // console.log("err====>", err); |
759 | this.showLoader = false; | 760 | this.showLoader = false; |
760 | this.loadingSearch = false; | 761 | this.loadingSearch = false; |
761 | this.snackbar = true; | 762 | this.snackbar = true; |
762 | this.text = error.response.data.message; | 763 | this.text = error.response.data.message; |
763 | if (error.response.status === 401) { | 764 | if (error.response.status === 401) { |
764 | this.$router.replace({ path: "/" }); | 765 | this.$router.replace({ path: "/" }); |
765 | this.$store.dispatch("setToken", null); | 766 | this.$store.dispatch("setToken", null); |
766 | this.$store.dispatch("Id", null); | 767 | this.$store.dispatch("Id", null); |
767 | } | 768 | } |
768 | }); | 769 | }); |
769 | }, | 770 | }, |
770 | clear() { | 771 | clear() { |
771 | this.$refs.form.reset(); | 772 | this.$refs.form.reset(); |
772 | }, | 773 | }, |
773 | save() { | 774 | save() { |
774 | if (this.$refs.formEditAssignment.validate()) { | 775 | if (this.$refs.formEditAssignment.validate()) { |
775 | let editAssignment = { | 776 | let editAssignment = { |
776 | assignmentId: this.editedItem._id, | 777 | assignmentId: this.editedItem._id, |
777 | title: this.addAssignment.title, | 778 | title: this.addAssignment.title, |
778 | description: this.addAssignment.description, | 779 | description: this.addAssignment.description, |
779 | deadline: this.addAssignment.deadline, | 780 | deadline: this.addAssignment.deadline, |
780 | classId: this.addAssignment.classId, | 781 | classId: this.addAssignment.classId, |
781 | sectionId: this.addAssignment.sectionId, | 782 | sectionId: this.addAssignment.sectionId, |
782 | subjectName: this.addAssignment.subjectName, | 783 | subjectName: this.addAssignment.subjectName, |
783 | file: this.addAssignment.imageName, | 784 | file: this.addAssignment.imageName, |
784 | fileName: this.imageName, | 785 | fileName: this.imageName, |
785 | }; | 786 | }; |
786 | this.editLoading = true; | 787 | this.editLoading = true; |
787 | var signatures = { | 788 | var signatures = { |
788 | JVBERi0: "other", | 789 | JVBERi0: "other", |
789 | iVBORw0KGgo: "image", | 790 | iVBORw0KGgo: "image", |
790 | UEsDBBQ: "other", | 791 | UEsDBBQ: "other", |
791 | "/": "image", | 792 | "/": "image", |
792 | AAABAA: "image", | 793 | AAABAA: "image", |
793 | IywiV2hhdC: "other", | 794 | IywiV2hhdC: "other", |
794 | bmFtZSxl: "other", | 795 | bmFtZSxl: "other", |
795 | }; | 796 | }; |
796 | function detectMimeType(b64) { | 797 | function detectMimeType(b64) { |
797 | for (var s in signatures) { | 798 | for (var s in signatures) { |
798 | if (b64.indexOf(s) === 0) { | 799 | if (b64.indexOf(s) === 0) { |
799 | return signatures[s]; | 800 | return signatures[s]; |
800 | } | 801 | } |
801 | } | 802 | } |
802 | } | 803 | } |
803 | if (this.imageUrl) { | 804 | if (this.imageUrl) { |
804 | var str = this.imageUrl; | 805 | var str = this.imageUrl; |
805 | const [baseUrl, imageUrl] = str.split(/,/); | 806 | const [baseUrl, imageUrl] = str.split(/,/); |
806 | editAssignment.upload = imageUrl; | 807 | editAssignment.upload = imageUrl; |
807 | editAssignment.fileType = detectMimeType(imageUrl); | 808 | editAssignment.fileType = detectMimeType(imageUrl); |
808 | } | 809 | } |
809 | http() | 810 | http() |
810 | .put("/updateAssignment", editAssignment) | 811 | .put("/updateAssignment", editAssignment) |
811 | .then((response) => { | 812 | .then((response) => { |
812 | this.snackbar = true; | 813 | this.snackbar = true; |
813 | this.text = "Successfully Edit Existing Assignment"; | 814 | this.text = "Successfully Edit Existing Assignment"; |
814 | this.color = "green"; | 815 | this.color = "green"; |
815 | this.getAssignmentList(); | 816 | this.getAssignmentList(); |
816 | this.editLoading = false; | 817 | this.editLoading = false; |
817 | this.editAssignmentDialog = false; | 818 | this.editAssignmentDialog = false; |
818 | }) | 819 | }) |
819 | .catch((error) => { | 820 | .catch((error) => { |
820 | this.editLoading = false; | 821 | this.editLoading = false; |
821 | // console.log(error); | 822 | // console.log(error); |
822 | }); | 823 | }); |
823 | } | 824 | } |
824 | }, | 825 | }, |
825 | getClass() { | 826 | getClass() { |
826 | http() | 827 | http() |
827 | .get("/getClassesList", { | 828 | .get("/getClassesList", { |
828 | headers: { Authorization: "Bearer " + this.token }, | 829 | headers: { Authorization: "Bearer " + this.token }, |
829 | }) | 830 | }) |
830 | .then((response) => { | 831 | .then((response) => { |
831 | this.classList = response.data.data; | 832 | this.classList = response.data.data; |
832 | }) | 833 | }) |
833 | .catch((error) => { | 834 | .catch((error) => { |
834 | if (error.response.status === 401) { | 835 | if (error.response.status === 401) { |
835 | this.$router.replace({ path: "/" }); | 836 | this.$router.replace({ path: "/" }); |
836 | this.$store.dispatch("setToken", null); | 837 | this.$store.dispatch("setToken", null); |
837 | this.$store.dispatch("Id", null); | 838 | this.$store.dispatch("Id", null); |
838 | } | 839 | } |
839 | }); | 840 | }); |
840 | }, | 841 | }, |
841 | getSections(_id) { | 842 | getSections(_id) { |
842 | var token = this.$store.state.token; | 843 | var token = this.$store.state.token; |
843 | this.showLoader = true; | 844 | this.showLoader = true; |
844 | http() | 845 | http() |
845 | .get( | 846 | .get( |
846 | "/getSectionsList", | 847 | "/getSectionsList", |
847 | { params: { classId: _id } }, | 848 | { params: { classId: _id } }, |
848 | { | 849 | { |
849 | headers: { Authorization: "Bearer " + token }, | 850 | headers: { Authorization: "Bearer " + token }, |
850 | } | 851 | } |
851 | ) | 852 | ) |
852 | .then((response) => { | 853 | .then((response) => { |
853 | this.addSection = response.data.data; | 854 | this.addSection = response.data.data; |
854 | this.showLoader = false; | 855 | this.showLoader = false; |
855 | }) | 856 | }) |
856 | .catch((err) => { | 857 | .catch((err) => { |
857 | this.showLoader = false; | 858 | this.showLoader = false; |
858 | }); | 859 | }); |
859 | }, | 860 | }, |
860 | getClassSubject(_id) { | 861 | getClassSubject(_id) { |
861 | this.showLoader = true; | 862 | this.showLoader = true; |
862 | // this.classId = this.classId; | 863 | // this.classId = this.classId; |
863 | http() | 864 | http() |
864 | .get( | 865 | .get( |
865 | "/getParticularClass", | 866 | "/getParticularClass", |
866 | { params: { classId: _id } }, | 867 | { params: { classId: _id } }, |
867 | { | 868 | { |
868 | headers: { Authorization: "Bearer " + this.token }, | 869 | headers: { Authorization: "Bearer " + this.token }, |
869 | } | 870 | } |
870 | ) | 871 | ) |
871 | .then((response) => { | 872 | .then((response) => { |
872 | this.subjectList = response.data.data; | 873 | this.subjectList = response.data.data; |
873 | this.showLoader = false; | 874 | this.showLoader = false; |
874 | }) | 875 | }) |
875 | .catch((err) => { | 876 | .catch((err) => { |
876 | this.showLoader = false; | 877 | this.showLoader = false; |
877 | }); | 878 | }); |
878 | }, | 879 | }, |
879 | onFilePicked(e) { | 880 | onFilePicked(e) { |
880 | const files = e.target.files; | 881 | const files = e.target.files; |
881 | this.upload = e.target.files[0]; | 882 | this.upload = e.target.files[0]; |
882 | if (files[0] !== undefined) { | 883 | if (files[0] !== undefined) { |
883 | this.imageName = files[0].name; | 884 | this.imageName = files[0].name; |
884 | if (this.imageName.lastIndexOf(".") <= 0) { | 885 | if (this.imageName.lastIndexOf(".") <= 0) { |
885 | return; | 886 | return; |
886 | } | 887 | } |
887 | const fr = new FileReader(); | 888 | const fr = new FileReader(); |
888 | fr.readAsDataURL(files[0]); | 889 | fr.readAsDataURL(files[0]); |
889 | fr.addEventListener("load", () => { | 890 | fr.addEventListener("load", () => { |
890 | this.imageUrl = fr.result; | 891 | this.imageUrl = fr.result; |
891 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 892 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
892 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 893 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
893 | }); | 894 | }); |
894 | // console.log("this.imageName", this.imageName); | 895 | // console.log("this.imageName", this.imageName); |
895 | } else { | 896 | } else { |
896 | this.imageName = ""; | 897 | this.imageName = ""; |
897 | this.imageFile = ""; | 898 | this.imageFile = ""; |
898 | this.imageUrl = ""; | 899 | this.imageUrl = ""; |
899 | } | 900 | } |
900 | }, | 901 | }, |
901 | displaySearch() { | 902 | displaySearch() { |
902 | (this.show = false), (this.showSearch = true); | 903 | (this.show = false), (this.showSearch = true); |
903 | }, | 904 | }, |
904 | closeSearch() { | 905 | closeSearch() { |
905 | this.showSearch = false; | 906 | this.showSearch = false; |
906 | this.show = true; | 907 | this.show = true; |
907 | this.search = ""; | 908 | this.search = ""; |
908 | }, | 909 | }, |
909 | 910 | ||
910 | async generatePDF2Canvas(item) { | 911 | async generatePDF2Canvas(item) { |
911 | var dataType = ""; | 912 | var dataType = ""; |
912 | var type = ""; | 913 | var type = ""; |
913 | if (item.fileType == "image") { | 914 | if (item.fileType == "image") { |
914 | dataType = "file.jpg"; | 915 | dataType = "file.jpg"; |
915 | } else if (item.fileType == "other") { | 916 | } else if (item.fileType == "other") { |
916 | dataType = "file.pdf"; | 917 | dataType = "file.pdf"; |
917 | type = "application/pdf"; | 918 | type = "application/pdf"; |
918 | } | 919 | } |
919 | var FileSaver = require("file-saver"); | 920 | var FileSaver = require("file-saver"); |
920 | FileSaver.saveAs(item.file, "image.jpg"); | 921 | FileSaver.saveAs(item.file, "image.jpg"); |
921 | }, | 922 | }, |
922 | }, | 923 | }, |
923 | mounted() { | 924 | mounted() { |
924 | this.token = this.$store.state.token; | 925 | this.token = this.$store.state.token; |
925 | this.role = this.$store.state.role; | 926 | this.role = this.$store.state.role; |
926 | this.getClass(); | 927 | this.getClass(); |
927 | }, | 928 | }, |
928 | }; | 929 | }; |
929 | </script> | 930 | </script> |
src/pages/Academic/syllabus.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EDIT Syllabus ****** --> | 3 | <!-- ****** EDIT Syllabus ****** --> |
4 | <v-dialog v-model="editSyllabusDialog" max-width="400px"> | 4 | <v-dialog v-model="editSyllabusDialog" max-width="400px"> |
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 Syllabus</label> | 8 | <label class="title text-xs-center">Edit Syllabus</label> |
9 | <v-icon size="24" class="right" @click="editSyllabusDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editSyllabusDialog = 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-form ref="formEditSyllabus" v-model="validEditSyllabus" lazy-validation> | 13 | <v-form ref="formEditSyllabus" v-model="validEditSyllabus" lazy-validation> |
14 | <v-layout> | 14 | <v-layout> |
15 | <v-flex xs4 sm4 class="pt-4 subheading"> | 15 | <v-flex xs4 sm4 class="pt-4 subheading"> |
16 | <label class="right">Title :</label> | 16 | <label class="right">Title :</label> |
17 | </v-flex> | 17 | </v-flex> |
18 | <v-flex xs8 sm8 class="ml-3"> | 18 | <v-flex xs8 sm8 class="ml-3"> |
19 | <v-text-field v-model="editedItem.title"></v-text-field> | 19 | <v-text-field v-model="editedItem.title"></v-text-field> |
20 | </v-flex> | 20 | </v-flex> |
21 | </v-layout> | 21 | </v-layout> |
22 | <v-layout> | 22 | <v-layout> |
23 | <v-flex xs4 class="pt-4 subheading"> | 23 | <v-flex xs4 class="pt-4 subheading"> |
24 | <label class="right">Description:</label> | 24 | <label class="right">Description:</label> |
25 | </v-flex> | 25 | </v-flex> |
26 | <v-flex xs8 class="ml-3"> | 26 | <v-flex xs8 class="ml-3"> |
27 | <v-text-field v-model="editedItem.description"></v-text-field> | 27 | <v-text-field v-model="editedItem.description"></v-text-field> |
28 | </v-flex> | 28 | </v-flex> |
29 | </v-layout> | 29 | </v-layout> |
30 | <v-layout> | 30 | <v-layout> |
31 | <v-flex xs4 class="pt-4 subheading"> | 31 | <v-flex xs4 class="pt-4 subheading"> |
32 | <label class="right">Class:</label> | 32 | <label class="right">Class:</label> |
33 | </v-flex> | 33 | </v-flex> |
34 | <v-flex xs8 class="ml-3"> | 34 | <v-flex xs8 class="ml-3"> |
35 | <v-select | 35 | <v-select |
36 | :items="classList" | 36 | :items="classList" |
37 | v-model="editedItem.classId" | 37 | v-model="editedItem.classId" |
38 | label="Select Class" | 38 | label="Select Class" |
39 | item-text="classNum" | 39 | item-text="classNum" |
40 | item-value="_id" | 40 | item-value="_id" |
41 | name="Select Class" | 41 | name="Select Class" |
42 | @change="getSections(addSyllabus.classId)" | 42 | @change="getSections(addSyllabus.classId)" |
43 | required | 43 | required |
44 | ></v-select> | 44 | ></v-select> |
45 | </v-flex> | 45 | </v-flex> |
46 | </v-layout> | 46 | </v-layout> |
47 | <!-- <v-layout> | 47 | <!-- <v-layout> |
48 | <v-flex xs4 sm4 class="pt-4 subheading"> | 48 | <v-flex xs4 sm4 class="pt-4 subheading"> |
49 | <label class="right">Section :</label> | 49 | <label class="right">Section :</label> |
50 | </v-flex> | 50 | </v-flex> |
51 | <v-flex xs8 sm8 class="ml-3"> | 51 | <v-flex xs8 sm8 class="ml-3"> |
52 | <v-select | 52 | <v-select |
53 | :items="addSection" | 53 | :items="addSection" |
54 | label="Select Section" | 54 | label="Select Section" |
55 | item-text="name" | 55 | item-text="name" |
56 | item-value="_id" | 56 | item-value="_id" |
57 | v-model="editedItem.sectionId" | 57 | v-model="editedItem.sectionId" |
58 | name="Select Section" | 58 | name="Select Section" |
59 | class="px-2" | 59 | class="px-2" |
60 | required | 60 | required |
61 | ></v-select> | 61 | ></v-select> |
62 | </v-flex> | 62 | </v-flex> |
63 | </v-layout>--> | 63 | </v-layout>--> |
64 | <v-layout> | 64 | <v-layout> |
65 | <v-flex xs4 class="pt-4 subheading"> | 65 | <v-flex xs4 class="pt-4 subheading"> |
66 | <label class="right">File:</label> | 66 | <label class="right">File:</label> |
67 | </v-flex> | 67 | </v-flex> |
68 | <v-flex xs8 sm6 class="ml-3"> | 68 | <v-flex xs8 sm6 class="ml-3"> |
69 | <v-text-field | 69 | <v-text-field |
70 | label="Select file" | 70 | label="Select file" |
71 | @click="pickFile" | 71 | @click="pickFile" |
72 | v-model="imageName" | 72 | v-model="imageName" |
73 | append-icon="attach_file" | 73 | append-icon="attach_file" |
74 | ></v-text-field> | 74 | ></v-text-field> |
75 | </v-flex> | 75 | </v-flex> |
76 | <input | 76 | <input |
77 | type="file" | 77 | type="file" |
78 | style="display:none" | 78 | style="display:none" |
79 | ref="image" | 79 | ref="image" |
80 | accept="image/*" | 80 | accept="image/*" |
81 | @change="onFilePicked" | 81 | @change="onFilePicked" |
82 | /> | 82 | /> |
83 | </v-layout> | 83 | </v-layout> |
84 | <v-flex xs12 sm12> | 84 | <v-flex xs12 sm12> |
85 | <v-card-actions> | 85 | <v-card-actions> |
86 | <v-spacer></v-spacer> | 86 | <v-spacer></v-spacer> |
87 | <v-btn | 87 | <v-btn |
88 | round | 88 | round |
89 | dark | 89 | dark |
90 | @click="save" | 90 | @click="save" |
91 | :loading="editLoading" | 91 | :loading="editLoading" |
92 | class="add-button" | 92 | class="add-button" |
93 | >Update Syllabus</v-btn> | 93 | >Update Syllabus</v-btn> |
94 | </v-card-actions> | 94 | </v-card-actions> |
95 | </v-flex> | 95 | </v-flex> |
96 | </v-form> | 96 | </v-form> |
97 | </v-container> | 97 | </v-container> |
98 | </v-card> | 98 | </v-card> |
99 | </v-dialog> | 99 | </v-dialog> |
100 | 100 | ||
101 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> | 101 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> |
102 | 102 | ||
103 | <!-- <v-dialog v-model="viewSubjectDialog" max-width="600px"> | 103 | <!-- <v-dialog v-model="viewSubjectDialog" max-width="600px"> |
104 | <v-toolbar flat class="card-style pa-3" dark> | 104 | <v-toolbar flat class="card-style pa-3" dark> |
105 | <v-spacer></v-spacer> | 105 | <v-spacer></v-spacer> |
106 | <v-toolbar-title> | 106 | <v-toolbar-title> |
107 | <h3>Subject</h3> | 107 | <h3>Subject</h3> |
108 | </v-toolbar-title> | 108 | </v-toolbar-title> |
109 | <v-spacer></v-spacer> | 109 | <v-spacer></v-spacer> |
110 | <v-icon @click="close1">close</v-icon> | 110 | <v-icon @click="close1">close</v-icon> |
111 | </v-toolbar> | 111 | </v-toolbar> |
112 | <v-card> | 112 | <v-card> |
113 | <v-card-text> | 113 | <v-card-text> |
114 | <v-container grid-list-md> | 114 | <v-container grid-list-md> |
115 | <v-layout wrap> | 115 | <v-layout wrap> |
116 | <v-flex> | 116 | <v-flex> |
117 | <v-layout> | 117 | <v-layout> |
118 | <v-flex xs7 sm6> | 118 | <v-flex xs7 sm6> |
119 | <h5 class="right my-1"> | 119 | <h5 class="right my-1"> |
120 | <b>Subject Name:</b> | 120 | <b>Subject Name:</b> |
121 | </h5> | 121 | </h5> |
122 | </v-flex> | 122 | </v-flex> |
123 | <v-flex sm6 xs5> | 123 | <v-flex sm6 xs5> |
124 | <h5 class="my-1">{{ editedItem.subjectName }}</h5> | 124 | <h5 class="my-1">{{ editedItem.subjectName }}</h5> |
125 | </v-flex> | 125 | </v-flex> |
126 | </v-layout> | 126 | </v-layout> |
127 | </v-flex> | 127 | </v-flex> |
128 | </v-layout> | 128 | </v-layout> |
129 | </v-container> | 129 | </v-container> |
130 | </v-card-text> | 130 | </v-card-text> |
131 | </v-card> | 131 | </v-card> |
132 | </v-dialog>--> | 132 | </v-dialog>--> |
133 | 133 | ||
134 | <!-- ****** EXISTING SYLLABUS TABLE ****** --> | 134 | <!-- ****** EXISTING SYLLABUS TABLE ****** --> |
135 | <v-toolbar color="transparent" flat> | 135 | <v-toolbar color="transparent" flat> |
136 | <v-btn | 136 | <v-btn |
137 | fab | 137 | fab |
138 | dark | 138 | dark |
139 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 139 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
140 | small | 140 | small |
141 | @click="addSyllabusDialog = true" | 141 | @click="addSyllabusDialog = true" |
142 | > | 142 | > |
143 | <v-icon dark>add</v-icon> | 143 | <v-icon dark>add</v-icon> |
144 | </v-btn> | 144 | </v-btn> |
145 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> | 145 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> |
146 | <v-btn round class="open-dialog-button" dark @click="addSyllabusDialog = true"> | 146 | <v-btn round class="open-dialog-button" dark @click="addSyllabusDialog = true"> |
147 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Syllabus | 147 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Syllabus |
148 | </v-btn> | 148 | </v-btn> |
149 | </v-flex> | 149 | </v-flex> |
150 | <v-spacer></v-spacer> | 150 | <v-spacer></v-spacer> |
151 | <v-flex lg2 md2 xs12 v-show="show"> | 151 | <v-flex lg2 md2 xs12 v-show="show"> |
152 | <v-select | 152 | <v-select |
153 | :items="classList" | 153 | :items="classList" |
154 | label="Select Class" | 154 | label="Select Class" |
155 | v-model="showSyllabus.classId" | 155 | v-model="showSyllabus.classId" |
156 | item-text="classNum" | 156 | item-text="classNum" |
157 | item-value="_id" | 157 | item-value="_id" |
158 | name="Select Class" | 158 | name="Select Class" |
159 | :rules="classRules" | 159 | :rules="classRules" |
160 | @change="getSyallabusList" | 160 | @change="getSyallabusList" |
161 | class="pl-2" | 161 | class="pl-2" |
162 | required | 162 | required |
163 | ></v-select> | 163 | ></v-select> |
164 | </v-flex> | 164 | </v-flex> |
165 | <v-card-title class="body-1" v-show="show"> | 165 | <v-card-title class="body-1" v-show="show"> |
166 | <v-btn icon flat @click="displaySearch"> | 166 | <v-btn icon flat @click="displaySearch"> |
167 | <v-avatar size="27"> | 167 | <v-avatar size="27"> |
168 | <img src="/static/icon/search.png" alt="icon" /> | 168 | <img src="/static/icon/search.png" alt="icon" /> |
169 | </v-avatar> | 169 | </v-avatar> |
170 | </v-btn> | 170 | </v-btn> |
171 | </v-card-title> | 171 | </v-card-title> |
172 | <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch"> | 172 | <v-flex xs9 sm9 md2 lg2 xl2 v-if="showSearch"> |
173 | <v-layout> | 173 | <v-layout> |
174 | <v-text-field | 174 | <v-text-field |
175 | autofocus | 175 | autofocus |
176 | v-model="search" | 176 | v-model="search" |
177 | label="Search" | 177 | label="Search" |
178 | prepend-inner-icon="search" | 178 | prepend-inner-icon="search" |
179 | color="primary" | 179 | color="primary" |
180 | style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important" | 180 | style="transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); !important" |
181 | ></v-text-field> | 181 | ></v-text-field> |
182 | <v-icon @click="closeSearch" color="error">close</v-icon> | 182 | <v-icon @click="closeSearch" color="error">close</v-icon> |
183 | </v-layout> | 183 | </v-layout> |
184 | </v-flex> | 184 | </v-flex> |
185 | </v-toolbar> | 185 | </v-toolbar> |
186 | <v-data-table | 186 | <v-data-table |
187 | :headers="headers" | 187 | :headers="headers" |
188 | :items="syllabusList" | 188 | :items="syllabusList" |
189 | :pagination.sync="pagination" | 189 | :pagination.sync="pagination" |
190 | :search="search" | 190 | :search="search" |
191 | > | 191 | > |
192 | <template slot="items" slot-scope="props"> | 192 | <template slot="items" slot-scope="props"> |
193 | <tr class="tr"> | 193 | <tr class="tr"> |
194 | <td class="td-row td">{{ props.index + 1 }}</td> | 194 | <td class="td-row td">{{ props.index + 1 }}</td> |
195 | <td class="text-xs-center td td-row">{{ props.item.title }}</td> | 195 | <td class="text-xs-center td td-row">{{ props.item.title }}</td> |
196 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> | 196 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> |
197 | <td class="text-xs-center td td-row">{{ dates(props.item.created) }}</td> | 197 | <td class="text-xs-center td td-row">{{ dates(props.item.created) }}</td> |
198 | <td | 198 | <td |
199 | class="text-xs-center td td-row" | 199 | class="text-xs-center td td-row" |
200 | v-if="props.item.teacherId" | 200 | v-if="props.item.teacherId" |
201 | >{{ props.item.teacherId.name }}</td> | 201 | >{{ props.item.teacherId.name }}</td> |
202 | <td class="text-xs-center td td-row" v-else>{{ props.item.schoolId.name }}</td> | 202 | <td class="text-xs-center td td-row" v-else>{{ props.item.schoolId.name }}</td> |
203 | <td class="text-xs-center td td-row"> | 203 | <td class="text-xs-center td td-row"> |
204 | <v-btn | 204 | <!-- <v-btn |
205 | class="add-button" | 205 | class="add-button" |
206 | @click="generatePDF2Canvas(props.item)" | 206 | @click="generatePDF2Canvas(props.item)" |
207 | :loading="loadingPdf" | 207 | :loading="loadingPdf" |
208 | dark | 208 | dark |
209 | >{{ props.item.fileType }}</v-btn> | 209 | >{{ props.item.fileName }}</v-btn>--> |
210 | <a :href="props.item.fileName" target="_blank" style="text-decoration: none!important;"> | ||
211 | <v-btn flat block @click="generatePDF2Canvas(props.item)" :loading="loadingPdf"> | ||
212 | <span> | ||
213 | <h5>{{props.item.fileName}}</h5> | ||
214 | </span> | ||
215 | </v-btn> | ||
216 | </a> | ||
210 | </td> | 217 | </td> |
211 | <td class="text-xs-center td td-row"> | 218 | <td class="text-xs-center td td-row"> |
212 | <span> | 219 | <span> |
213 | <v-tooltip top> | 220 | <v-tooltip top> |
214 | <img | 221 | <img |
215 | slot="activator" | 222 | slot="activator" |
216 | style="cursor:pointer; width:20px; height:18px; " | 223 | style="cursor:pointer; width:20px; height:18px; " |
217 | class="mr-3" | 224 | class="mr-3" |
218 | @click="editItem(props.item)" | 225 | @click="editItem(props.item)" |
219 | src="/static/icon/edit.png" | 226 | src="/static/icon/edit.png" |
220 | /> | 227 | /> |
221 | <span>Edit</span> | 228 | <span>Edit</span> |
222 | </v-tooltip> | 229 | </v-tooltip> |
223 | <v-tooltip top> | 230 | <v-tooltip top> |
224 | <img | 231 | <img |
225 | slot="activator" | 232 | slot="activator" |
226 | style="cursor:pointer; width:20px; height:20px; " | 233 | style="cursor:pointer; width:20px; height:20px; " |
227 | class="mr-3" | 234 | class="mr-3" |
228 | @click="deleteItem(props.item)" | 235 | @click="deleteItem(props.item)" |
229 | src="/static/icon/delete.png" | 236 | src="/static/icon/delete.png" |
230 | /> | 237 | /> |
231 | <span>Delete</span> | 238 | <span>Delete</span> |
232 | </v-tooltip> | 239 | </v-tooltip> |
233 | </span> | 240 | </span> |
234 | </td> | 241 | </td> |
235 | </tr> | 242 | </tr> |
236 | </template> | 243 | </template> |
237 | <v-alert | 244 | <v-alert |
238 | slot="no-results" | 245 | slot="no-results" |
239 | :value="true" | 246 | :value="true" |
240 | color="error" | 247 | color="error" |
241 | icon="warning" | 248 | icon="warning" |
242 | >Your search for "{{ search }}" found no results.</v-alert> | 249 | >Your search for "{{ search }}" found no results.</v-alert> |
243 | </v-data-table> | 250 | </v-data-table> |
244 | <!-- ****** ADD SYLLABUS ****** --> | 251 | <!-- ****** ADD SYLLABUS ****** --> |
245 | <v-snackbar | 252 | <v-snackbar |
246 | :timeout="timeout" | 253 | :timeout="timeout" |
247 | :top="y === 'top'" | 254 | :top="y === 'top'" |
248 | :right="x === 'right'" | 255 | :right="x === 'right'" |
249 | :vertical="mode === 'vertical'" | 256 | :vertical="mode === 'vertical'" |
250 | v-model="snackbar" | 257 | v-model="snackbar" |
251 | :color="color" | 258 | :color="color" |
252 | >{{ text }}</v-snackbar> | 259 | >{{ text }}</v-snackbar> |
253 | <v-dialog v-model="addSyllabusDialog" max-width="400px" v-if="addSyllabusDialog"> | 260 | <v-dialog v-model="addSyllabusDialog" max-width="400px" v-if="addSyllabusDialog"> |
254 | <v-card flat class="card-style pa-2" dark> | 261 | <v-card flat class="card-style pa-2" dark> |
255 | <v-layout> | 262 | <v-layout> |
256 | <v-flex xs12> | 263 | <v-flex xs12> |
257 | <label class="title text-xs-center">Add Syllabus</label> | 264 | <label class="title text-xs-center">Add Syllabus</label> |
258 | <v-icon size="24" class="right" @click="closeAddStudentModel">cancel</v-icon> | 265 | <v-icon size="24" class="right" @click="closeAddStudentModel">cancel</v-icon> |
259 | </v-flex> | 266 | </v-flex> |
260 | </v-layout> | 267 | </v-layout> |
261 | <v-container fluid fill-height> | 268 | <v-container fluid fill-height> |
262 | <v-layout align-center> | 269 | <v-layout align-center> |
263 | <v-flex xs12> | 270 | <v-flex xs12> |
264 | <v-form ref="form" v-model="valid" lazy-validation> | 271 | <v-form ref="form" v-model="valid" lazy-validation> |
265 | <v-layout> | 272 | <v-layout> |
266 | <v-flex xs4 sm4 class="pt-4 subheading"> | 273 | <v-flex xs4 sm4 class="pt-4 subheading"> |
267 | <label class="right">Title :</label> | 274 | <label class="right">Title :</label> |
268 | </v-flex> | 275 | </v-flex> |
269 | <v-flex xs8 sm8 class="ml-3"> | 276 | <v-flex xs8 sm8 class="ml-3"> |
270 | <v-text-field | 277 | <v-text-field |
271 | v-model="addSyllabus.title" | 278 | v-model="addSyllabus.title" |
272 | name="name" | 279 | name="name" |
273 | type="text" | 280 | type="text" |
274 | placeholder="Add Title" | 281 | placeholder="Add Title" |
275 | :rules="titleRules" | 282 | :rules="titleRules" |
276 | required | 283 | required |
277 | ></v-text-field> | 284 | ></v-text-field> |
278 | </v-flex> | 285 | </v-flex> |
279 | </v-layout> | 286 | </v-layout> |
280 | <v-layout> | 287 | <v-layout> |
281 | <v-flex xs4 sm4 class="pt-4 subheading"> | 288 | <v-flex xs4 sm4 class="pt-4 subheading"> |
282 | <label class="right">Description :</label> | 289 | <label class="right">Description :</label> |
283 | </v-flex> | 290 | </v-flex> |
284 | <v-flex xs8 sm8 class="ml-3"> | 291 | <v-flex xs8 sm8 class="ml-3"> |
285 | <v-text-field | 292 | <v-text-field |
286 | v-model="addSyllabus.description" | 293 | v-model="addSyllabus.description" |
287 | name="name" | 294 | name="name" |
288 | type="text" | 295 | type="text" |
289 | placeholder="Add Description" | 296 | placeholder="Add Description" |
290 | :rules="descriptionRules" | 297 | :rules="descriptionRules" |
291 | required | 298 | required |
292 | ></v-text-field> | 299 | ></v-text-field> |
293 | </v-flex> | 300 | </v-flex> |
294 | </v-layout> | 301 | </v-layout> |
295 | <v-layout> | 302 | <v-layout> |
296 | <v-flex xs4 class="pt-4 subheading"> | 303 | <v-flex xs4 class="pt-4 subheading"> |
297 | <label class="right">Class:</label> | 304 | <label class="right">Class:</label> |
298 | </v-flex> | 305 | </v-flex> |
299 | <v-flex xs8 class="ml-3"> | 306 | <v-flex xs8 class="ml-3"> |
300 | <v-select | 307 | <v-select |
301 | :items="classList" | 308 | :items="classList" |
302 | v-model="addSyllabus.classId" | 309 | v-model="addSyllabus.classId" |
303 | label="Select Class" | 310 | label="Select Class" |
304 | item-text="classNum" | 311 | item-text="classNum" |
305 | item-value="_id" | 312 | item-value="_id" |
306 | name="Select Class" | 313 | name="Select Class" |
307 | @change="getSections(addSyllabus.classId)" | 314 | @change="getSections(addSyllabus.classId)" |
308 | required | 315 | required |
309 | ></v-select> | 316 | ></v-select> |
310 | </v-flex> | 317 | </v-flex> |
311 | </v-layout> | 318 | </v-layout> |
312 | <!-- <v-layout> | 319 | <!-- <v-layout> |
313 | <v-flex xs4 sm4 class="pt-4 subheading"> | 320 | <v-flex xs4 sm4 class="pt-4 subheading"> |
314 | <label class="right">Section :</label> | 321 | <label class="right">Section :</label> |
315 | </v-flex> | 322 | </v-flex> |
316 | <v-flex xs8 sm8 class="ml-3"> | 323 | <v-flex xs8 sm8 class="ml-3"> |
317 | <v-select | 324 | <v-select |
318 | :items="addSection" | 325 | :items="addSection" |
319 | label="Select Section" | 326 | label="Select Section" |
320 | item-text="name" | 327 | item-text="name" |
321 | item-value="_id" | 328 | item-value="_id" |
322 | v-model="addSyllabus.sectionId" | 329 | v-model="addSyllabus.sectionId" |
323 | name="Select Section" | 330 | name="Select Section" |
324 | class="px-2" | 331 | class="px-2" |
325 | required | 332 | required |
326 | ></v-select> | 333 | ></v-select> |
327 | </v-flex> | 334 | </v-flex> |
328 | </v-layout>--> | 335 | </v-layout>--> |
329 | <v-layout> | 336 | <v-layout> |
330 | <v-flex xs4 class="pt-4 subheading"> | 337 | <v-flex xs4 class="pt-4 subheading"> |
331 | <label class="right">File:</label> | 338 | <label class="right">File:</label> |
332 | </v-flex> | 339 | </v-flex> |
333 | <v-flex xs8 sm6 class="ml-3"> | 340 | <v-flex xs8 sm6 class="ml-3"> |
334 | <v-text-field | 341 | <v-text-field |
335 | label="Select file" | 342 | label="Select file" |
336 | @click="pickFile" | 343 | @click="pickFile" |
337 | v-model="imageName" | 344 | v-model="imageName" |
338 | append-icon="attach_file" | 345 | append-icon="attach_file" |
339 | ></v-text-field> | 346 | ></v-text-field> |
340 | <input | 347 | <input |
341 | type="file" | 348 | type="file" |
342 | style="display:none" | 349 | style="display:none" |
343 | ref="image" | 350 | ref="image" |
344 | accept="image/*" | 351 | accept="image/*" |
345 | @change="onFilePicked" | 352 | @change="onFilePicked" |
346 | /> | 353 | /> |
347 | </v-flex> | 354 | </v-flex> |
348 | </v-layout> | 355 | </v-layout> |
349 | <v-layout> | 356 | <v-layout> |
350 | <v-flex xs12 sm12> | 357 | <v-flex xs12 sm12> |
351 | <v-card-actions> | 358 | <v-card-actions> |
352 | <v-spacer></v-spacer> | 359 | <v-spacer></v-spacer> |
353 | <v-btn | 360 | <v-btn |
354 | @click="submit" | 361 | @click="submit" |
355 | round | 362 | round |
356 | dark | 363 | dark |
357 | :loading="loading" | 364 | :loading="loading" |
358 | class="add-button" | 365 | class="add-button" |
359 | >Add Syllabus</v-btn> | 366 | >Add Syllabus</v-btn> |
360 | </v-card-actions> | 367 | </v-card-actions> |
361 | </v-flex> | 368 | </v-flex> |
362 | </v-layout> | 369 | </v-layout> |
363 | </v-form> | 370 | </v-form> |
364 | </v-flex> | 371 | </v-flex> |
365 | </v-layout> | 372 | </v-layout> |
366 | </v-container> | 373 | </v-container> |
367 | </v-card> | 374 | </v-card> |
368 | </v-dialog> | 375 | </v-dialog> |
369 | <div class="loader" v-if="showLoader"> | 376 | <div class="loader" v-if="showLoader"> |
370 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 377 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
371 | </div> | 378 | </div> |
372 | </v-container> | 379 | </v-container> |
373 | </template> | 380 | </template> |
374 | 381 | ||
375 | <script> | 382 | <script> |
376 | import http from "@/Services/http.js"; | 383 | import http from "@/Services/http.js"; |
377 | import Util from "@/util"; | 384 | import Util from "@/util"; |
378 | import moment from "moment"; | 385 | import moment from "moment"; |
379 | import jsPDF from "jspdf"; | 386 | import jsPDF from "jspdf"; |
380 | import { saveAs } from "file-saver"; | 387 | import { saveAs } from "file-saver"; |
381 | 388 | ||
382 | export default { | 389 | export default { |
383 | data: () => ({ | 390 | data: () => ({ |
384 | snackbar: false, | 391 | snackbar: false, |
385 | y: "top", | 392 | y: "top", |
386 | x: "right", | 393 | x: "right", |
387 | mode: "", | 394 | mode: "", |
388 | timeout: 3000, | 395 | timeout: 3000, |
389 | text: "", | 396 | text: "", |
390 | color: "", | 397 | color: "", |
391 | show: true, | 398 | show: true, |
392 | showSearch: false, | 399 | showSearch: false, |
393 | showLoader: false, | 400 | showLoader: false, |
394 | loading: false, | 401 | loading: false, |
395 | editLoading: false, | 402 | editLoading: false, |
396 | date: null, | 403 | date: null, |
397 | search: "", | 404 | search: "", |
398 | editSyllabusDialog: false, | 405 | editSyllabusDialog: false, |
399 | valid: true, | 406 | valid: true, |
400 | validEditSyllabus: true, | 407 | validEditSyllabus: true, |
401 | addSyllabusDialog: false, | 408 | addSyllabusDialog: false, |
402 | loadingPdf: false, | 409 | loadingPdf: false, |
403 | 410 | ||
404 | pagination: { | 411 | pagination: { |
405 | rowsPerPage: 10, | 412 | rowsPerPage: 10, |
406 | }, | 413 | }, |
407 | token: "", | 414 | token: "", |
408 | upload: "", | 415 | upload: "", |
409 | titleRules: [(v) => !!v || " Title is required"], | 416 | titleRules: [(v) => !!v || " Title is required"], |
410 | descriptionRules: [(v) => !!v || " Description is required"], | 417 | descriptionRules: [(v) => !!v || " Description is required"], |
411 | classRules: [(v) => !!v || " Class Name is required"], | 418 | classRules: [(v) => !!v || " Class Name is required"], |
412 | fileRules: [(v) => !!v || " File is required"], | 419 | fileRules: [(v) => !!v || " File is required"], |
413 | headers: [ | 420 | headers: [ |
414 | { | 421 | { |
415 | text: "No", | 422 | text: "No", |
416 | align: "", | 423 | align: "", |
417 | sortable: false, | 424 | sortable: false, |
418 | value: "No", | 425 | value: "No", |
419 | }, | 426 | }, |
420 | { | 427 | { |
421 | text: "Title", | 428 | text: "Title", |
422 | value: "title", | 429 | value: "title", |
423 | sortable: false, | 430 | sortable: false, |
424 | align: "center", | 431 | align: "center", |
425 | }, | 432 | }, |
426 | { | 433 | { |
427 | text: "Description", | 434 | text: "Description", |
428 | value: "description", | 435 | value: "description", |
429 | sortable: false, | 436 | sortable: false, |
430 | align: "center", | 437 | align: "center", |
431 | }, | 438 | }, |
432 | { | 439 | { |
433 | text: "Date", | 440 | text: "Date", |
434 | value: "created", | 441 | value: "created", |
435 | sortable: false, | 442 | sortable: false, |
436 | align: "center", | 443 | align: "center", |
437 | }, | 444 | }, |
438 | { | 445 | { |
439 | text: "Uploader", | 446 | text: "Uploader", |
440 | value: "upload", | 447 | value: "upload", |
441 | sortable: false, | 448 | sortable: false, |
442 | align: "center", | 449 | align: "center", |
443 | }, | 450 | }, |
444 | { | 451 | { |
445 | text: "File", | 452 | text: "File", |
446 | value: "documentUrl", | 453 | value: "documentUrl", |
447 | sortable: false, | 454 | sortable: false, |
448 | align: "center", | 455 | align: "center", |
449 | }, | 456 | }, |
450 | { text: "Action", value: "", sortable: false, align: "center" }, | 457 | { text: "Action", value: "", sortable: false, align: "center" }, |
451 | ], | 458 | ], |
452 | syllabusList: [], | 459 | syllabusList: [], |
453 | classList: [], | 460 | classList: [], |
454 | addSection: [], | 461 | addSection: [], |
455 | editedIndex: -1, | 462 | editedIndex: -1, |
456 | addSyllabus: {}, | 463 | addSyllabus: {}, |
457 | showSyllabus: {}, | 464 | showSyllabus: {}, |
458 | 465 | ||
459 | editedItem: { | 466 | editedItem: { |
460 | subjectName: "", | 467 | subjectName: "", |
461 | }, | 468 | }, |
462 | imageData: {}, | 469 | imageData: {}, |
463 | imageName: "", | 470 | imageName: "", |
464 | imageUrl: "", | 471 | imageUrl: "", |
465 | imageFile: "", | 472 | imageFile: "", |
466 | }), | 473 | }), |
467 | 474 | ||
468 | watch: { | 475 | watch: { |
469 | addSyllabusDialog: function (val) { | 476 | addSyllabusDialog: function (val) { |
470 | if (!val) { | 477 | if (!val) { |
471 | this.addSyllabus = []; | 478 | this.addSyllabus = []; |
472 | this.imageName = ""; | 479 | this.imageName = ""; |
473 | } | 480 | } |
474 | }, | 481 | }, |
475 | }, | 482 | }, |
476 | 483 | ||
477 | methods: { | 484 | methods: { |
478 | pickFile() { | 485 | pickFile() { |
479 | this.$refs.image.click(); | 486 | this.$refs.image.click(); |
480 | }, | 487 | }, |
481 | dates: function (date) { | 488 | dates: function (date) { |
482 | return moment(date).format("MMMM DD, YYYY"); | 489 | return moment(date).format("MMMM DD, YYYY"); |
483 | }, | 490 | }, |
484 | editItem(item) { | 491 | editItem(item) { |
485 | this.editedIndex = this.syllabusList; | 492 | this.editedIndex = this.syllabusList; |
486 | this.editedItem = Object.assign({}, item); | 493 | this.editedItem = Object.assign({}, item); |
487 | this.dialog = true; | 494 | this.dialog = true; |
488 | this.editSyllabusDialog = true; | 495 | this.editSyllabusDialog = true; |
489 | }, | 496 | }, |
490 | download(item) { | 497 | download(item) { |
491 | this.editedIndex = this.syllabusList; | 498 | this.editedIndex = this.syllabusList; |
492 | this.editedItem = Object.assign({}, item); | 499 | this.editedItem = Object.assign({}, item); |
493 | this.dialog1 = true; | 500 | this.dialog1 = true; |
494 | }, | 501 | }, |
495 | deleteItem(item) { | 502 | deleteItem(item) { |
496 | let deleteSyallabus = { | 503 | let deleteSyallabus = { |
497 | syallabusId: item._id, | 504 | syallabusId: item._id, |
498 | }; | 505 | }; |
499 | http() | 506 | http() |
500 | .delete( | 507 | .delete( |
501 | "/deleteSyallabus", | 508 | "/deleteSyallabus", |
502 | confirm("Are you sure you want to delete this?") && { | 509 | confirm("Are you sure you want to delete this?") && { |
503 | params: deleteSyallabus, | 510 | params: deleteSyallabus, |
504 | } | 511 | } |
505 | ) | 512 | ) |
506 | .then((response) => { | 513 | .then((response) => { |
507 | this.getSyallabusList(); | 514 | this.getSyallabusList(); |
508 | this.snackbar = true; | 515 | this.snackbar = true; |
509 | this.color = "green"; | 516 | this.color = "green"; |
510 | this.text = "Successfully delete Existing Syllabus"; | 517 | this.text = "Successfully delete Existing Syllabus"; |
511 | }) | 518 | }) |
512 | .catch((error) => { | 519 | .catch((error) => { |
513 | this.snackbar = true; | 520 | this.snackbar = true; |
514 | this.text = error.response.data.message; | 521 | this.text = error.response.data.message; |
515 | this.color = "error"; | 522 | this.color = "error"; |
516 | }); | 523 | }); |
517 | }, | 524 | }, |
518 | close() { | 525 | close() { |
519 | this.editSyllabusDialog = false; | 526 | this.editSyllabusDialog = false; |
520 | }, | 527 | }, |
521 | closeAddStudentModel() { | 528 | closeAddStudentModel() { |
522 | this.addSyllabusDialog = false; | 529 | this.addSyllabusDialog = false; |
523 | // this.syllabusList = []; | 530 | // this.syllabusList = []; |
524 | this.addSyllabus = []; | 531 | this.addSyllabus = []; |
525 | this.imageName = ""; | 532 | this.imageName = ""; |
526 | }, | 533 | }, |
527 | 534 | ||
528 | submit() { | 535 | submit() { |
529 | // var addSyllabus = { | 536 | // var addSyllabus = { |
530 | // classId: this.addSyllabus.classId, | 537 | // classId: this.addSyllabus.classId, |
531 | // title: this.addSyllabus.title, | 538 | // title: this.addSyllabus.title, |
532 | // description: this.addSyllabus.description, | 539 | // description: this.addSyllabus.description, |
533 | // upload: this.addSyllabus.upload, | 540 | // upload: this.addSyllabus.upload, |
534 | // fileType: this.addSyllabus.fileType | 541 | // fileType: this.addSyllabus.fileType |
535 | // }; | 542 | // }; |
536 | var signatures = { | 543 | var signatures = { |
537 | JVBERi0: "other", | 544 | // JVBERi0: "other", |
538 | iVBORw0KGgo: "image", | 545 | // iVBORw0KGgo: "image", |
539 | UEsDBBQ: "other", | 546 | // UEsDBBQ: "other", |
540 | "/": "image", | 547 | // "/": "image", |
541 | AAABAA: "image", | 548 | // AAABAA: "image", |
542 | IywiV2hhdC: "other", | 549 | // IywiV2hhdC: "other", |
543 | bmFtZSxl: "other", | 550 | // bmFtZSxl: "other", |
544 | }; | 551 | }; |
545 | function detectMimeType(b64) { | 552 | function detectMimeType(b64) { |
546 | for (var s in signatures) { | 553 | for (var s in signatures) { |
547 | if (b64.indexOf(s) === 0) { | 554 | if (b64.indexOf(s) === 0) { |
548 | return signatures[s]; | 555 | return signatures[s]; |
549 | } | 556 | } |
550 | } | 557 | } |
551 | } | 558 | } |
552 | if (this.$refs.form.validate()) { | 559 | if (this.$refs.form.validate()) { |
553 | if (this.imageUrl) { | 560 | if (this.imageUrl) { |
554 | var str = this.imageUrl; | 561 | var str = this.imageUrl; |
555 | const [baseUrl, imageUrl] = str.split(/,/); | 562 | const [baseUrl, imageUrl] = str.split(/,/); |
556 | this.addSyllabus.upload = imageUrl; | 563 | this.addSyllabus.upload = imageUrl; |
557 | this.addSyllabus.fileType = detectMimeType(imageUrl); | 564 | this.addSyllabus.fileType = detectMimeType(imageUrl); |
558 | this.addSyllabus.fileName = this.imageName; | 565 | this.addSyllabus.fileName = this.imageName; |
559 | } | 566 | } |
560 | http() | 567 | http() |
561 | .post("/createSyallabus", this.addSyllabus) | 568 | .post("/createSyallabus", this.addSyllabus) |
562 | .then((response) => { | 569 | .then((response) => { |
563 | this.getSyallabusList(); | 570 | this.getSyallabusList(); |
564 | this.snackbar = true; | 571 | this.snackbar = true; |
565 | this.text = "Syllabus added successfully"; | 572 | this.text = "Syllabus added successfully"; |
566 | this.clear(); | 573 | this.clear(); |
567 | this.color = "green"; | 574 | this.color = "green"; |
568 | this.addSyllabusDialog = false; | 575 | this.addSyllabusDialog = false; |
569 | }) | 576 | }) |
570 | .catch((error) => { | 577 | .catch((error) => { |
571 | // console.log(error); | 578 | // console.log(error); |
572 | this.snackbar = true; | 579 | this.snackbar = true; |
573 | this.text = error.response.data.message; | 580 | this.text = error.response.data.message; |
574 | this.color = "error"; | 581 | this.color = "error"; |
575 | }); | 582 | }); |
576 | } | 583 | } |
577 | }, | 584 | }, |
578 | onFilePicked(e) { | 585 | onFilePicked(e) { |
579 | const files = e.target.files; | 586 | const files = e.target.files; |
580 | this.upload = e.target.files[0]; | 587 | this.upload = e.target.files[0]; |
581 | if (files[0] !== undefined) { | 588 | if (files[0] !== undefined) { |
582 | this.imageName = files[0].name; | 589 | this.imageName = files[0].name; |
583 | if (this.imageName.lastIndexOf(".") <= 0) { | 590 | if (this.imageName.lastIndexOf(".") <= 0) { |
584 | return; | 591 | return; |
585 | } | 592 | } |
586 | const fr = new FileReader(); | 593 | const fr = new FileReader(); |
587 | fr.readAsDataURL(files[0]); | 594 | fr.readAsDataURL(files[0]); |
588 | fr.addEventListener("load", () => { | 595 | fr.addEventListener("load", () => { |
589 | this.imageUrl = fr.result; | 596 | this.imageUrl = fr.result; |
590 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 597 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
591 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 598 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
592 | }); | 599 | }); |
593 | } else { | 600 | } else { |
594 | this.imageName = ""; | 601 | this.imageName = ""; |
595 | this.imageFile = ""; | 602 | this.imageFile = ""; |
596 | this.imageUrl = ""; | 603 | this.imageUrl = ""; |
597 | } | 604 | } |
598 | }, | 605 | }, |
599 | clear() { | 606 | clear() { |
600 | this.$refs.form.reset(); | 607 | this.$refs.form.reset(); |
601 | }, | 608 | }, |
602 | save() { | 609 | save() { |
603 | if (this.$refs.formEditSyllabus.validate()) { | 610 | if (this.$refs.formEditSyllabus.validate()) { |
604 | let syllabusData = { | 611 | let syllabusData = { |
605 | syallabusId: this.editedItem._id, | 612 | syallabusId: this.editedItem._id, |
606 | classId: this.editedItem.classId._id, | 613 | classId: this.editedItem.classId._id, |
607 | // sectionId: this.editedItem.sectionId, | 614 | // sectionId: this.editedItem.sectionId, |
608 | title: this.editedItem.title, | 615 | title: this.editedItem.title, |
609 | description: this.editedItem.description, | 616 | description: this.editedItem.description, |
610 | upload: this.editedItem.upload, | 617 | upload: this.editedItem.upload, |
611 | fileType: this.editedItem.fileType, | 618 | fileType: this.editedItem.fileType, |
612 | fileName: this.imageName, | 619 | fileName: this.imageName, |
613 | }; | 620 | }; |
614 | this.editLoading = true; | 621 | this.editLoading = true; |
615 | var signatures = { | 622 | var signatures = { |
616 | JVBERi0: "other", | 623 | // JVBERi0: "other", |
617 | iVBORw0KGgo: "image", | 624 | // iVBORw0KGgo: "image", |
618 | UEsDBBQ: "other", | 625 | // UEsDBBQ: "other", |
619 | "/": "image", | 626 | // "/": "image", |
620 | AAABAA: "image", | 627 | // AAABAA: "image", |
621 | IywiV2hhdC: "other", | 628 | // IywiV2hhdC: "other", |
622 | }; | 629 | }; |
623 | function detectMimeType(b64) { | 630 | function detectMimeType(b64) { |
624 | for (var s in signatures) { | 631 | for (var s in signatures) { |
625 | if (b64.indexOf(s) === 0) { | 632 | if (b64.indexOf(s) === 0) { |
626 | return signatures[s]; | 633 | return signatures[s]; |
627 | } | 634 | } |
628 | } | 635 | } |
629 | } | 636 | } |
630 | if (this.imageUrl) { | 637 | if (this.imageUrl) { |
631 | var str = this.imageUrl; | 638 | var str = this.imageUrl; |
632 | const [baseUrl, imageUrl] = str.split(/,/); | 639 | const [baseUrl, imageUrl] = str.split(/,/); |
633 | syllabusData.upload = imageUrl; | 640 | syllabusData.upload = imageUrl; |
634 | syllabusData.fileType = detectMimeType(imageUrl); | 641 | syllabusData.fileType = detectMimeType(imageUrl); |
635 | } | 642 | } |
636 | http() | 643 | http() |
637 | .put("/updateSyallabus", syllabusData) | 644 | .put("/updateSyallabus", syllabusData) |
638 | .then((response) => { | 645 | .then((response) => { |
639 | this.snackbar = true; | 646 | this.snackbar = true; |
640 | this.text = "Successfully Edit Existing Syllabus"; | 647 | this.text = "Successfully Edit Existing Syllabus"; |
641 | this.color = "green"; | 648 | this.color = "green"; |
642 | this.editLoading = false; | 649 | this.editLoading = false; |
643 | this.editSyllabusDialog = false; | 650 | this.editSyllabusDialog = false; |
644 | http() | 651 | http() |
645 | .get( | 652 | .get( |
646 | "/getSyallabusList", | 653 | "/getSyallabusList", |
647 | { params: { classId: this.addSyllabus.classId } }, | 654 | { params: { classId: this.addSyllabus.classId } }, |
648 | { | 655 | { |
649 | headers: { Authorization: "Bearer " + this.token }, | 656 | headers: { Authorization: "Bearer " + this.token }, |
650 | } | 657 | } |
651 | ) | 658 | ) |
652 | .then((response) => { | 659 | .then((response) => { |
653 | this.syllabusList = response.data.data; | 660 | this.syllabusList = response.data.data; |
654 | this.getSyallabusList(); | 661 | this.getSyallabusList(); |
655 | this.snackbar = true; | 662 | this.snackbar = true; |
656 | this.color = "green"; | 663 | this.color = "green"; |
657 | this.close(); | 664 | this.close(); |
658 | }) | 665 | }) |
659 | .catch((err) => { | 666 | .catch((err) => { |
660 | console.log("err====>", err); | 667 | console.log("err====>", err); |
661 | this.text = error.response.data.message; | 668 | this.text = error.response.data.message; |
662 | this.color = "error"; | 669 | this.color = "error"; |
663 | }); | 670 | }); |
664 | }) | 671 | }) |
665 | .catch((error) => { | 672 | .catch((error) => { |
666 | this.editLoading = false; | 673 | this.editLoading = false; |
667 | }); | 674 | }); |
668 | } | 675 | } |
669 | }, | 676 | }, |
670 | getSyallabusList() { | 677 | getSyallabusList() { |
671 | this.showLoader = true; | 678 | this.showLoader = true; |
672 | http() | 679 | http() |
673 | .get( | 680 | .get( |
674 | "/getSyallabusList", | 681 | "/getSyallabusList", |
675 | { params: { classId: this.showSyllabus.classId } }, | 682 | { params: { classId: this.showSyllabus.classId } }, |
676 | { | 683 | { |
677 | headers: { Authorization: "Bearer " + this.token }, | 684 | headers: { Authorization: "Bearer " + this.token }, |
678 | } | 685 | } |
679 | ) | 686 | ) |
680 | .then((response) => { | 687 | .then((response) => { |
681 | this.syllabusList = response.data.data; | 688 | this.syllabusList = response.data.data; |
682 | this.showLoader = false; | 689 | this.showLoader = false; |
683 | }) | 690 | }) |
684 | .catch((err) => { | 691 | .catch((err) => { |
685 | this.showLoader = false; | 692 | this.showLoader = false; |
686 | }); | 693 | }); |
687 | }, | 694 | }, |
688 | getClass() { | 695 | getClass() { |
689 | http() | 696 | http() |
690 | .get("/getClassesList", { | 697 | .get("/getClassesList", { |
691 | headers: { Authorization: "Bearer " + this.token }, | 698 | headers: { Authorization: "Bearer " + this.token }, |
692 | }) | 699 | }) |
693 | .then((response) => { | 700 | .then((response) => { |
694 | this.classList = response.data.data; | 701 | this.classList = response.data.data; |
695 | }) | 702 | }) |
696 | .catch((error) => { | 703 | .catch((error) => { |
697 | if (error.response.status === 401) { | 704 | if (error.response.status === 401) { |
698 | this.$router.replace({ path: "/" }); | 705 | this.$router.replace({ path: "/" }); |
699 | this.$store.dispatch("setToken", null); | 706 | this.$store.dispatch("setToken", null); |
700 | this.$store.dispatch("Id", null); | 707 | this.$store.dispatch("Id", null); |
701 | } | 708 | } |
702 | }); | 709 | }); |
703 | }, | 710 | }, |
704 | getSections(_id) { | 711 | getSections(_id) { |
705 | var token = this.$store.state.token; | 712 | var token = this.$store.state.token; |
706 | this.showLoader = true; | 713 | this.showLoader = true; |
707 | http() | 714 | http() |
708 | .get( | 715 | .get( |
709 | "/getSectionsList", | 716 | "/getSectionsList", |
710 | { params: { classId: _id } }, | 717 | { params: { classId: _id } }, |
711 | { | 718 | { |
712 | headers: { Authorization: "Bearer " + token }, | 719 | headers: { Authorization: "Bearer " + token }, |
713 | } | 720 | } |
714 | ) | 721 | ) |
715 | .then((response) => { | 722 | .then((response) => { |
716 | this.addSection = response.data.data; | 723 | this.addSection = response.data.data; |
717 | this.showLoader = false; | 724 | this.showLoader = false; |
718 | }) | 725 | }) |
719 | .catch((err) => { | 726 | .catch((err) => { |
720 | this.showLoader = false; | 727 | this.showLoader = false; |
721 | }); | 728 | }); |
722 | }, | 729 | }, |
723 | displaySearch() { | 730 | displaySearch() { |
724 | (this.show = false), (this.showSearch = true); | 731 | (this.show = false), (this.showSearch = true); |
725 | }, | 732 | }, |
726 | closeSearch() { | 733 | closeSearch() { |
727 | this.showSearch = false; | 734 | this.showSearch = false; |
728 | this.show = true; | 735 | this.show = true; |
729 | this.search = ""; | 736 | this.search = ""; |
730 | }, | 737 | }, |
731 | 738 | ||
732 | async generatePDF2Canvas(item) { | 739 | async generatePDF2Canvas(item) { |
733 | // console.log("documentUrl", documentUrl); | 740 | // console.log("documentUrl", documentUrl); |
734 | // this.loadingPdf = true; | 741 | // this.loadingPdf = true; |
735 | // const el = this.$refs.printMe; | 742 | // const el = this.$refs.printMe; |
736 | // add option type to get the image version | 743 | // add option type to get the image version |
737 | // if not provided the promise will return | 744 | // if not provided the promise will return |
738 | // the canvas. | 745 | // the canvas. |
739 | // const options = { | 746 | // const options = { |
740 | // type: "dataURL" | 747 | // type: "dataURL" |
741 | // }; | 748 | // }; |
742 | // this.output = await this.$html2canvas(el, options); | 749 | // this.output = await this.$html2canvas(el, options); |
743 | // console.log("el,option", this.output); | 750 | // console.log("el,option", this.output); |
744 | // if (this.output) { | 751 | // if (this.output) { |
745 | // this.loadingPdf = false; | 752 | // this.loadingPdf = false; |
746 | // } | 753 | // } |
747 | // let doc = new jsPDF(); | 754 | // let doc = new jsPDF(); |
748 | // doc.addImage(this.output,"JPEG", 5, 10, 200, 280); | 755 | // doc.addImage(this.output,"JPEG", 5, 10, 200, 280); |
749 | // doc.save("File.pdf"); | 756 | // doc.save("File.pdf"); |
750 | 757 | ||
751 | // function download(documentUrl, filename) { | 758 | // function download(documentUrl, filename) { |
752 | // fetch(documentUrl).then(function(t) { | 759 | // fetch(documentUrl).then(function(t) { |
753 | // return t.blob().then(b => { | 760 | // return t.blob().then(b => { |
754 | // var a = document.createElement("a"); | 761 | // var a = document.createElement("a"); |
755 | // a.href = URL.createObjectURL(b); | 762 | // a.href = URL.createObjectURL(b); |
756 | // a.setAttribute("download", "filename"); | 763 | // a.setAttribute("download", "filename"); |
757 | // a.click(); | 764 | // a.click(); |
758 | // }); | 765 | // }); |
759 | // }); | 766 | // }); |
760 | // } | 767 | // } |
761 | var dataType = ""; | 768 | var dataType = ""; |
762 | var type = ""; | 769 | var type = ""; |
763 | if (item.fileType == "image") { | 770 | if (item.fileType == "image") { |
764 | dataType = "file.jpg"; | 771 | dataType = "file.jpg"; |
765 | } else if (item.fileType == "other") { | 772 | } else if (item.fileType == "other") { |
766 | dataType = "file.pdf"; | 773 | dataType = "file.pdf"; |
767 | type = "application/pdf"; | 774 | type = "application/pdf"; |
768 | } | 775 | } |
769 | var FileSaver = require("file-saver"); | 776 | var FileSaver = require("file-saver"); |
770 | FileSaver.saveAs(item.documentUrl, "image.jpg"); | 777 | FileSaver.saveAs(item.documentUrl, "image.jpg"); |
771 | 778 | ||
772 | // var blob = new Blob([item.documentUrl], { | 779 | // var blob = new Blob([item.documentUrl], { |
773 | // type: type | 780 | // type: type |
774 | // }); | 781 | // }); |
775 | // FileSaver.saveAs(blob, dataType); | 782 | // FileSaver.saveAs(blob, dataType); |
776 | // const url = window.URL.createObjectURL(new Blob([item.documentUrl],{ type: type } )); | 783 | // const url = window.URL.createObjectURL(new Blob([item.documentUrl],{ type: type } )); |
777 | // console.log("document", item.documentUrl); | 784 | // console.log("document", item.documentUrl); |
778 | // const link = document.createElement("a"); | 785 | // const link = document.createElement("a"); |
779 | // link.href = url; | 786 | // link.href = url; |
780 | // link.setAttribute("download", dataType); //or any other extension | 787 | // link.setAttribute("download", dataType); //or any other extension |
781 | // document.body.appendChild(link); | 788 | // document.body.appendChild(link); |
782 | // link.click(); | 789 | // link.click(); |
783 | 790 | ||
784 | // const blob = window.URL.createObjectURL(new Blob([item.documentUrl],{ type: type } )); | 791 | // const blob = window.URL.createObjectURL(new Blob([item.documentUrl],{ type: type } )); |
785 | // const link = document.createElement('a') | 792 | // const link = document.createElement('a') |
786 | // link.href = URL.createObjectURL(blob) | 793 | // link.href = URL.createObjectURL(blob) |
787 | // link.download = dataType | 794 | // link.download = dataType |
788 | // link.click() | 795 | // link.click() |
789 | // URL.revokeObjectURL(link.href) | 796 | // URL.revokeObjectURL(link.href) |
790 | }, | 797 | }, |
791 | }, | 798 | }, |
792 | mounted() { | 799 | mounted() { |
793 | this.token = this.$store.state.token; | 800 | this.token = this.$store.state.token; |
794 | this.role = this.$store.state.role; | 801 | this.role = this.$store.state.role; |
795 | this.getClass(); | 802 | this.getClass(); |
796 | }, | 803 | }, |
797 | }; | 804 | }; |
798 | </script> | 805 | </script> |
src/pages/Account/editInvoice.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** Edit multiple INVOICE ****** --> | 3 | <!-- ****** Edit multiple INVOICE ****** --> |
4 | 4 | ||
5 | <v-snackbar | 5 | <v-snackbar |
6 | :timeout="timeout" | 6 | :timeout="timeout" |
7 | :top="y === 'top'" | 7 | :top="y === 'top'" |
8 | :right="x === 'right'" | 8 | :right="x === 'right'" |
9 | :vertical="mode === 'vertical'" | 9 | :vertical="mode === 'vertical'" |
10 | v-model="snackbar" | 10 | v-model="snackbar" |
11 | color="success" | 11 | color="success" |
12 | >{{ text }}</v-snackbar> | 12 | >{{ text }}</v-snackbar> |
13 | <v-flex xs12 sm12> | 13 | <v-flex xs12 sm12> |
14 | <v-container fluid grid-list-md> | 14 | <v-container fluid grid-list-md> |
15 | <v-layout wrap> | 15 | <v-layout wrap> |
16 | <v-flex xs12 sm12 md5 class="mt-4"> | 16 | <v-flex xs12 sm12 md5 class="mt-4"> |
17 | <v-card flat> | 17 | <v-card flat> |
18 | <v-toolbar dark class="card-styles" flat> | 18 | <v-toolbar dark class="card-styles" flat> |
19 | <v-spacer></v-spacer> | 19 | <v-spacer></v-spacer> |
20 | <v-toolbar-title> | 20 | <v-toolbar-title> |
21 | <h3>Invoice</h3> | 21 | <h3>Invoice</h3> |
22 | </v-toolbar-title> | 22 | </v-toolbar-title> |
23 | <v-spacer></v-spacer> | 23 | <v-spacer></v-spacer> |
24 | </v-toolbar> | 24 | </v-toolbar> |
25 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> | 25 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> |
26 | <v-layout> | 26 | <v-layout> |
27 | <v-flex xs4 class="pt-4 subheading"> | 27 | <v-flex xs4 class="pt-4 subheading"> |
28 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 28 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
29 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 29 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
30 | </v-flex> | 30 | </v-flex> |
31 | <v-flex xs6 class="ml-3"> | 31 | <v-flex xs6 class="ml-3"> |
32 | <v-select | 32 | <v-select |
33 | :items="addclass" | 33 | :items="addclass" |
34 | label="Select Class" | 34 | label="Select Class" |
35 | v-model="editData.classId" | 35 | v-model="editData.classId" |
36 | item-text="classNum" | 36 | item-text="classNum" |
37 | item-value="_id" | 37 | item-value="_id" |
38 | @change="getAllStudents(editData.classId)" | 38 | @change="getAllStudents(editData.classId)" |
39 | ></v-select> | 39 | ></v-select> |
40 | </v-flex> | 40 | </v-flex> |
41 | </v-layout> | 41 | </v-layout> |
42 | <v-layout> | 42 | <v-layout> |
43 | <v-flex xs4 class="pt-4 subheading"> | 43 | <v-flex xs4 class="pt-4 subheading"> |
44 | <label class="right hidden-xs-only hidden-sm-only">Select Student:</label> | 44 | <label class="right hidden-xs-only hidden-sm-only">Select Student:</label> |
45 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Student:</label> | 45 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Student:</label> |
46 | </v-flex> | 46 | </v-flex> |
47 | <v-flex xs6 class="ml-3"> | 47 | <v-flex xs6 class="ml-3"> |
48 | <v-select | 48 | <v-select |
49 | :items="studentList" | 49 | :items="studentList" |
50 | v-model="editData.studentId" | 50 | v-model="editData.studentId" |
51 | :label="editData.studentId.name" | 51 | :label="editData.studentId.name" |
52 | item-text="name" | 52 | item-text="name" |
53 | item-value="_id" | 53 | item-value="_id" |
54 | @change="getStudentId(editData.studentId)" | 54 | @change="getStudentId(editData.studentId)" |
55 | ></v-select> | 55 | ></v-select> |
56 | </v-flex> | 56 | </v-flex> |
57 | </v-layout> | 57 | </v-layout> |
58 | <v-layout> | 58 | <v-layout> |
59 | <v-flex xs4 class="pt-4 subheading"> | 59 | <v-flex xs4 class="pt-4 subheading"> |
60 | <label class="right">Date:</label> | 60 | <label class="right">Date:</label> |
61 | </v-flex> | 61 | </v-flex> |
62 | <v-flex xs6 class="ml-3"> | 62 | <v-flex xs6 class="ml-3"> |
63 | <v-menu | 63 | <v-menu |
64 | ref="menu1" | 64 | ref="menu1" |
65 | :close-on-content-click="false" | 65 | :close-on-content-click="false" |
66 | v-model="menu1" | 66 | v-model="menu1" |
67 | :nudge-right="40" | 67 | :nudge-right="40" |
68 | lazy | 68 | lazy |
69 | :return-value.sync="editData.date" | 69 | :return-value.sync="editData.date" |
70 | transition="scale-transition" | 70 | transition="scale-transition" |
71 | offset-y | 71 | offset-y |
72 | full-width | 72 | full-width |
73 | min-width="290px" | 73 | min-width="290px" |
74 | > | 74 | > |
75 | <v-text-field | 75 | <v-text-field |
76 | slot="activator" | 76 | slot="activator" |
77 | v-model="editData.date" | 77 | v-model="editData.date" |
78 | placeholder="Select date" | 78 | placeholder="Select date" |
79 | ></v-text-field> | 79 | ></v-text-field> |
80 | <v-date-picker | 80 | <v-date-picker |
81 | v-model="editData.date" | 81 | v-model="editData.date" |
82 | @input="$refs.menu1.save(editData.date)" | 82 | @input="$refs.menu1.save(editData.date)" |
83 | ></v-date-picker> | 83 | ></v-date-picker> |
84 | </v-menu> | 84 | </v-menu> |
85 | </v-flex> | 85 | </v-flex> |
86 | </v-layout> | 86 | </v-layout> |
87 | <v-layout> | 87 | <v-layout> |
88 | <v-flex xs4 class="pt-4 subheading"> | 88 | <v-flex xs4 class="pt-4 subheading"> |
89 | <label class="right hidden-xs-only hidden-sm-only">Payment Status:</label> | 89 | <label class="right hidden-xs-only hidden-sm-only">Payment Status:</label> |
90 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Payment:</label> | 90 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Payment:</label> |
91 | </v-flex> | 91 | </v-flex> |
92 | <v-flex xs6 class="ml-3"> | 92 | <v-flex xs6 class="ml-3"> |
93 | <v-select | 93 | <v-select |
94 | :items="paymentStatus" | 94 | :items="paymentStatus" |
95 | v-model="editData.paymentStatus" | 95 | v-model="editData.paymentStatus" |
96 | item-text="name" | 96 | item-text="name" |
97 | item-value="value" | 97 | item-value="value" |
98 | label="Select Payment Status" | 98 | label="Select Payment Status" |
99 | @change="getPayMethodList" | 99 | @change="getPayMethodList" |
100 | ></v-select> | 100 | ></v-select> |
101 | </v-flex> | 101 | </v-flex> |
102 | </v-layout> | 102 | </v-layout> |
103 | <v-layout v-show="showPayMethods"> | 103 | <v-layout v-show="showPayMethods"> |
104 | <v-flex xs4 class="pt-4 subheading"> | 104 | <v-flex xs4 class="pt-4 subheading"> |
105 | <label class="right">Payment Method:</label> | 105 | <label class="right">Payment Method:</label> |
106 | </v-flex> | 106 | </v-flex> |
107 | <v-flex xs6 class="ml-3"> | 107 | <v-flex xs6 class="ml-3"> |
108 | <v-select | 108 | <v-select |
109 | :items="paymentMethods" | 109 | :items="paymentMethods" |
110 | v-model="editData.paymentMethod" | 110 | v-model="editData.paymentMethod" |
111 | :rules="paymentMethodRules" | 111 | :rules="paymentMethodRules" |
112 | label="Select Payment Method" | 112 | label="Select Payment Method" |
113 | ></v-select> | 113 | ></v-select> |
114 | </v-flex> | 114 | </v-flex> |
115 | </v-layout> | 115 | </v-layout> |
116 | <v-layout> | 116 | <v-layout> |
117 | <v-flex xs12 sm11> | 117 | <v-flex xs12 sm11> |
118 | <v-card-actions> | 118 | <v-card-actions> |
119 | <v-spacer></v-spacer> | 119 | <v-spacer></v-spacer> |
120 | <v-btn | 120 | <v-btn |
121 | @click="update(editData)" | 121 | @click="update(editData)" |
122 | round | 122 | round |
123 | dark | 123 | dark |
124 | :loading="loading" | 124 | :loading="loading" |
125 | class="add-button" | 125 | class="add-button" |
126 | >Update</v-btn> | 126 | >Update</v-btn> |
127 | </v-card-actions> | 127 | </v-card-actions> |
128 | </v-flex> | 128 | </v-flex> |
129 | </v-layout> | 129 | </v-layout> |
130 | </v-form> | 130 | </v-form> |
131 | </v-card> | 131 | </v-card> |
132 | </v-flex> | 132 | </v-flex> |
133 | <v-flex xs12 sm12 md7 class="mt-4"> | 133 | <v-flex xs12 sm12 md7 class="mt-4"> |
134 | <v-card> | 134 | <v-card> |
135 | <v-toolbar dark class="card-styles" flat> | 135 | <v-toolbar dark class="card-styles" flat> |
136 | <v-spacer></v-spacer> | 136 | <v-spacer></v-spacer> |
137 | <v-toolbar-title> | 137 | <v-toolbar-title> |
138 | <h3>Fee Type List</h3> | 138 | <h3>Fee Type List</h3> |
139 | </v-toolbar-title> | 139 | </v-toolbar-title> |
140 | <v-spacer></v-spacer> | 140 | <v-spacer></v-spacer> |
141 | </v-toolbar> | 141 | </v-toolbar> |
142 | <v-layout wrap> | 142 | <v-layout wrap> |
143 | <v-flex xs12> | 143 | <v-flex xs12> |
144 | <v-layout wrap> | 144 | <v-layout wrap> |
145 | <v-flex xs12 sm2 class="mt-3"> | 145 | <v-flex xs12 sm2 class="mt-3"> |
146 | <label class="right title hidden-sm-only hidden-xs-only">Fee Type:</label> | 146 | <label class="right title hidden-sm-only hidden-xs-only">Fee Type:</label> |
147 | <label | 147 | <label |
148 | class="left pl-2 title hidden-xl-only hidden-lg-only hidden-md-only" | 148 | class="left pl-2 title hidden-xl-only hidden-lg-only hidden-md-only" |
149 | >Fee Type:</label> | 149 | >Fee Type:</label> |
150 | </v-flex> | 150 | </v-flex> |
151 | <v-flex xs12 sm4> | 151 | <v-flex xs12 sm4> |
152 | <v-select | 152 | <v-select |
153 | :items="feeTypes" | 153 | :items="feeTypes" |
154 | v-model="feeType.feeTypeName" | 154 | v-model="feeType.feeTypeName" |
155 | item-text="feeType" | 155 | item-text="feeType" |
156 | item-value="feeType" | 156 | item-value="feeType" |
157 | label="Select Fee Type" | 157 | label="Select Fee Type" |
158 | class="px-2" | 158 | class="px-2" |
159 | ></v-select> | 159 | ></v-select> |
160 | </v-flex> | 160 | </v-flex> |
161 | <v-flex xs12 sm6> | 161 | <v-flex xs12 sm6> |
162 | <v-btn | 162 | <v-btn |
163 | dark | 163 | dark |
164 | class="right mt-3 hidden-sm-only hidden-xs-only" | 164 | class="right add-button hidden-sm-only hidden-xs-only" |
165 | color="open-dialog-button" | 165 | color="open-dialog-button" |
166 | @click="selectFeeType" | 166 | @click="selectFeeType" |
167 | >ADD</v-btn> | 167 | >ADD</v-btn> |
168 | <v-btn | 168 | <v-btn |
169 | dark | 169 | dark |
170 | class="mt-3 hidden-xl-only hidden-lg-only hidden-md-only" | 170 | class="mt-3 hidden-xl-only hidden-lg-only hidden-md-only" |
171 | color="open-dialog-button" | 171 | color="open-dialog-button" |
172 | @click="selectFeeType" | 172 | @click="selectFeeType" |
173 | >ADD</v-btn> | 173 | >ADD</v-btn> |
174 | </v-flex> | 174 | </v-flex> |
175 | </v-layout> | 175 | </v-layout> |
176 | </v-flex> | 176 | </v-flex> |
177 | </v-layout> | 177 | </v-layout> |
178 | <table class="feeTypeTable tableRsponsive"> | 178 | <table class="feeTypeTable tableRsponsive"> |
179 | <tr class="info white--text"> | 179 | <tr class="info white--text"> |
180 | <th>#</th> | 180 | <th>#</th> |
181 | <th>Fee Type</th> | 181 | <th>Fee Type</th> |
182 | <th>Amount</th> | 182 | <th>Amount</th> |
183 | <th>Discount</th> | 183 | <th>Discount</th> |
184 | <th>Subtotal</th> | 184 | <th>Subtotal</th> |
185 | <th>Paid Amount</th> | 185 | <th>Paid Amount</th> |
186 | <th>Action</th> | 186 | <th>Action</th> |
187 | </tr> | 187 | </tr> |
188 | <tr | 188 | <tr |
189 | v-for="(feeType, index) in editData.feeType" | 189 | v-for="(feeType, index) in editData.feeType" |
190 | :key="index" | 190 | :key="index" |
191 | v-on:keyup="getAmmountDetails(feeType,editData.feeType)" | 191 | v-on:keyup="getAmmountDetails(feeType,editData.feeType)" |
192 | > | 192 | > |
193 | <td style="width:40px">{{ index + 1 }}</td> | 193 | <td style="width:40px">{{ index + 1 }}</td> |
194 | <td style="width:120px">{{ feeType.feeTypeName }}</td> | 194 | <td style="width:120px">{{ feeType.feeTypeName }}</td> |
195 | <td> | 195 | <td> |
196 | <v-text-field | 196 | <v-text-field |
197 | placeholder="fill your Amount" | 197 | placeholder="fill your Amount" |
198 | v-model="feeType.amount" | 198 | v-model="feeType.amount" |
199 | type="number" | 199 | type="number" |
200 | ></v-text-field> | 200 | ></v-text-field> |
201 | </td> | 201 | </td> |
202 | <td> | 202 | <td> |
203 | <v-text-field | 203 | <v-text-field |
204 | placeholder="fill your Discount" | 204 | placeholder="fill your Discount" |
205 | v-model="feeType.discount" | 205 | v-model="feeType.discount" |
206 | type="number" | 206 | type="number" |
207 | ></v-text-field> | 207 | ></v-text-field> |
208 | </td> | 208 | </td> |
209 | <td>{{ feeType.subTotal }}</td> | 209 | <td>{{ feeType.subTotal }}</td> |
210 | <td v-if="editData.paymentStatus === 'NOT_PAID'"> | 210 | <td v-if="editData.paymentStatus === 'NOT_PAID'"> |
211 | <v-text-field | 211 | <v-text-field |
212 | placeholder="fill your Paid Amount" | 212 | placeholder="fill your Paid Amount" |
213 | v-model="feeType.paidAmount" | 213 | v-model="feeType.paidAmount" |
214 | type="number" | 214 | type="number" |
215 | :disabled="disabled" | 215 | :disabled="disabled" |
216 | ></v-text-field> | 216 | ></v-text-field> |
217 | </td> | 217 | </td> |
218 | <td v-if="editData.paymentStatus != 'NOT_PAID'"> | 218 | <td v-if="editData.paymentStatus != 'NOT_PAID'"> |
219 | <v-text-field | 219 | <v-text-field |
220 | placeholder="fill your Paid Amount" | 220 | placeholder="fill your Paid Amount" |
221 | v-model="feeType.paidAmount" | 221 | v-model="feeType.paidAmount" |
222 | type="number" | 222 | type="number" |
223 | ></v-text-field> | 223 | ></v-text-field> |
224 | </td> | 224 | </td> |
225 | <td> | 225 | <td> |
226 | <v-icon | 226 | <v-icon |
227 | color="error" | 227 | color="error" |
228 | @click="deleteSelectFee(feeType,editData.feeType,index)" | 228 | @click="deleteSelectFee(feeType,editData.feeType,index)" |
229 | >delete</v-icon> | 229 | >delete</v-icon> |
230 | </td> | 230 | </td> |
231 | </tr> | 231 | </tr> |
232 | <tfoot v-if="feeType.amount != 0.00"> | 232 | <tfoot v-if="feeType.amount != 0.00"> |
233 | <tr> | 233 | <tr> |
234 | <td colspan="2">Total:</td> | 234 | <td colspan="2">Total:</td> |
235 | <td>{{ feeType.amount }}</td> | 235 | <td>{{ feeType.amount }}</td> |
236 | <td>{{ feeType.discount }}</td> | 236 | <td>{{ feeType.discount }}</td> |
237 | <td>{{ feeType.subTotal }}</td> | 237 | <td>{{ feeType.subTotal }}</td> |
238 | <td>{{ feeType.paidAmount }}</td> | 238 | <td>{{ feeType.paidAmount }}</td> |
239 | </tr> | 239 | </tr> |
240 | </tfoot> | 240 | </tfoot> |
241 | <tfoot v-else-if="feeType.amount == 0.00"> | 241 | <tfoot v-else-if="feeType.amount == 0.00"> |
242 | <tr> | 242 | <tr> |
243 | <td colspan="2">Total:</td> | 243 | <td colspan="2">Total:</td> |
244 | <td>{{ editData.totalAmount }}</td> | 244 | <td>{{ editData.totalAmount }}</td> |
245 | <td>{{ editData.totalDiscount }}</td> | 245 | <td>{{ editData.totalDiscount }}</td> |
246 | <td>{{ editData.totalSubTotal }}</td> | 246 | <td>{{ editData.totalSubTotal }}</td> |
247 | <td>{{ editData.totalPaidAmount }}</td> | 247 | <td>{{ editData.totalPaidAmount }}</td> |
248 | </tr> | 248 | </tr> |
249 | </tfoot> | 249 | </tfoot> |
250 | </table> | 250 | </table> |
251 | </v-card> | 251 | </v-card> |
252 | </v-flex> | 252 | </v-flex> |
253 | </v-layout> | 253 | </v-layout> |
254 | </v-container> | 254 | </v-container> |
255 | </v-flex> | 255 | </v-flex> |
256 | <div class="loader" v-if="showLoader"> | 256 | <div class="loader" v-if="showLoader"> |
257 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 257 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
258 | </div> | 258 | </div> |
259 | </v-app> | 259 | </v-app> |
260 | </template> | 260 | </template> |
261 | 261 | ||
262 | <script> | 262 | <script> |
263 | import http from "@/Services/http.js"; | 263 | import http from "@/Services/http.js"; |
264 | import moment from "moment"; | 264 | import moment from "moment"; |
265 | 265 | ||
266 | export default { | 266 | export default { |
267 | props: ["editData"], | 267 | props: ["editData"], |
268 | data: () => ({ | 268 | data: () => ({ |
269 | snackbar: false, | 269 | snackbar: false, |
270 | showPayMethods: false, | 270 | showPayMethods: false, |
271 | y: "top", | 271 | y: "top", |
272 | x: "right", | 272 | x: "right", |
273 | mode: "", | 273 | mode: "", |
274 | timeout: 3000, | 274 | timeout: 3000, |
275 | text: "", | 275 | text: "", |
276 | showLoader: false, | 276 | showLoader: false, |
277 | loading: false, | 277 | loading: false, |
278 | date: null, | 278 | date: null, |
279 | search: "", | 279 | search: "", |
280 | // dialog: false, | 280 | // dialog: false, |
281 | // dialog1: false, | 281 | // dialog1: false, |
282 | valid: true, | 282 | valid: true, |
283 | validEdit: true, | 283 | validEdit: true, |
284 | // isActive: true, | 284 | // isActive: true, |
285 | // newActive: false, | 285 | // newActive: false, |
286 | showFeeType: false, | 286 | showFeeType: false, |
287 | disabled: true, | 287 | disabled: true, |
288 | details: [], | 288 | details: [], |
289 | feeTypes: [], | 289 | feeTypes: [], |
290 | menu1: false, | 290 | menu1: false, |
291 | // invoiceData: {}, | 291 | // invoiceData: {}, |
292 | paymentMethods: ["Cash", "Cheque"], | 292 | paymentMethods: ["Cash", "Cheque"], |
293 | feeType: { | 293 | feeType: { |
294 | amount: "0.00", | 294 | amount: "0.00", |
295 | discount: "0.00", | 295 | discount: "0.00", |
296 | paidAmount: "0.00", | 296 | paidAmount: "0.00", |
297 | subTotal: "0.00", | 297 | subTotal: "0.00", |
298 | feeTypeName: "" | 298 | feeTypeName: "", |
299 | }, | 299 | }, |
300 | feeTypeData: [], | 300 | feeTypeData: [], |
301 | pagination: { | 301 | pagination: { |
302 | rowsPerPage: 15 | 302 | rowsPerPage: 15, |
303 | }, | 303 | }, |
304 | token: "", | 304 | token: "", |
305 | editedItem: {}, | 305 | editedItem: {}, |
306 | invoiceParticularData: {}, | 306 | invoiceParticularData: {}, |
307 | addclass: [], | 307 | addclass: [], |
308 | studentList: [], | 308 | studentList: [], |
309 | paymentMethodRules: [], | 309 | paymentMethodRules: [], |
310 | paymentStatus: [ | 310 | paymentStatus: [ |
311 | { | 311 | { |
312 | name: "Not Paid", | 312 | name: "Not Paid", |
313 | value: "NOT_PAID" | 313 | value: "NOT_PAID", |
314 | }, | 314 | }, |
315 | { | 315 | { |
316 | name: "Partially Paid", | 316 | name: "Partially Paid", |
317 | value: "PARTIALLY_PAID" | 317 | value: "PARTIALLY_PAID", |
318 | }, | 318 | }, |
319 | { | 319 | { |
320 | name: "Fully Paid", | 320 | name: "Fully Paid", |
321 | value: "FULLY_PAID" | 321 | value: "FULLY_PAID", |
322 | } | 322 | }, |
323 | ], | 323 | ], |
324 | editDataObj: {} | 324 | editDataObj: {}, |
325 | }), | 325 | }), |
326 | // watch: { | 326 | // watch: { |
327 | // menu1(val) { | 327 | // menu1(val) { |
328 | // val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 328 | // val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
329 | // } | 329 | // } |
330 | // }, | 330 | // }, |
331 | methods: { | 331 | methods: { |
332 | save(date) { | 332 | save(date) { |
333 | this.$refs.menu1.save(date); | 333 | this.$refs.menu1.save(date); |
334 | }, | 334 | }, |
335 | dates: function(date) { | 335 | dates: function (date) { |
336 | return moment(date).format("MMMM DD, YYYY"); | 336 | return moment(date).format("MMMM DD, YYYY"); |
337 | }, | 337 | }, |
338 | update(editData) { | 338 | update(editData) { |
339 | // console.log("editData-----------", editData); | 339 | // console.log("editData-----------", editData); |
340 | if (editData.classId._id) { | 340 | if (editData.classId._id) { |
341 | this.editDataObj.classNum = editData.classId._id; | 341 | this.editDataObj.classNum = editData.classId._id; |
342 | } | 342 | } |
343 | if (editData.studentId._id) { | 343 | if (editData.studentId._id) { |
344 | this.editDataObj.studentId = editData.studentId._id; | 344 | this.editDataObj.studentId = editData.studentId._id; |
345 | } | 345 | } |
346 | let feeTypeId = ""; | 346 | let feeTypeId = ""; |
347 | for (let i = 0; i < this.feeTypes.length; i++) { | 347 | for (let i = 0; i < this.feeTypes.length; i++) { |
348 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { | 348 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { |
349 | feeTypeId = this.feeTypes[i]._id; | 349 | feeTypeId = this.feeTypes[i]._id; |
350 | } | 350 | } |
351 | } | 351 | } |
352 | if (this.$refs.form.validate()) { | 352 | if (this.$refs.form.validate()) { |
353 | let editInvoiceData = { | 353 | let editInvoiceData = { |
354 | invoiceId: editData._id, | 354 | invoiceId: editData._id, |
355 | classId: this.editDataObj.classNum, | 355 | classId: this.editDataObj.classNum, |
356 | studentId: this.editDataObj.studentId, | 356 | studentId: this.editDataObj.studentId, |
357 | date: editData.date, | 357 | date: editData.date, |
358 | paymentStatus: editData.paymentStatus, | 358 | paymentStatus: editData.paymentStatus, |
359 | paymentMethod: editData.paymentMethod, | 359 | paymentMethod: editData.paymentMethod, |
360 | feeType: editData.feeType, | 360 | feeType: editData.feeType, |
361 | totalAmount: this.feeType.amount, | 361 | totalAmount: this.feeType.amount, |
362 | totalDiscount: this.feeType.discount, | 362 | totalDiscount: this.feeType.discount, |
363 | totalSubTotal: this.feeType.subTotal, | 363 | totalSubTotal: this.feeType.subTotal, |
364 | totalPaidAmount: this.feeType.paidAmount | 364 | totalPaidAmount: this.feeType.paidAmount, |
365 | }; | 365 | }; |
366 | // console.log(editInvoiceData, editInvoiceData); | 366 | // console.log(editInvoiceData, editInvoiceData); |
367 | if (feeTypeId == "") { | 367 | if (feeTypeId == "") { |
368 | delete editInvoiceData.feeType[0].feeTypeId; | 368 | delete editInvoiceData.feeType[0].feeTypeId; |
369 | } | 369 | } |
370 | if (editInvoiceData.paymentStatus == "NOT_PAID") { | 370 | if (editInvoiceData.paymentStatus == "NOT_PAID") { |
371 | delete editInvoiceData.paymentMethod; | 371 | delete editInvoiceData.paymentMethod; |
372 | } | 372 | } |
373 | if (this.feeType.paidAmount != "0.00") { | 373 | if (this.feeType.paidAmount != "0.00") { |
374 | if (this.feeType.subTotal == this.feeType.paidAmount) { | 374 | if (this.feeType.subTotal == this.feeType.paidAmount) { |
375 | editInvoiceData.paymentStatus = "FULLY_PAID"; | 375 | editInvoiceData.paymentStatus = "FULLY_PAID"; |
376 | // console.log("FULLY_PAID"); | 376 | // console.log("FULLY_PAID"); |
377 | } | 377 | } |
378 | if (editInvoiceData.totalPaidAmount) { | 378 | if (editInvoiceData.totalPaidAmount) { |
379 | if (this.feeType.subTotal != this.feeType.paidAmount) { | 379 | if (this.feeType.subTotal != this.feeType.paidAmount) { |
380 | editInvoiceData.paymentStatus = "PARTIALLY_PAID"; | 380 | editInvoiceData.paymentStatus = "PARTIALLY_PAID"; |
381 | // console.log("PARTIALLY_PAID"); | 381 | // console.log("PARTIALLY_PAID"); |
382 | } | 382 | } |
383 | } | 383 | } |
384 | } | 384 | } |
385 | if (editInvoiceData.totalSubTotal == "0.00") { | 385 | if (editInvoiceData.totalSubTotal == "0.00") { |
386 | editInvoiceData.paymentStatus = "FULLY_PAID"; | 386 | editInvoiceData.paymentStatus = "FULLY_PAID"; |
387 | } else if (editInvoiceData.totalSubTotal != "0.00") { | 387 | } else if (editInvoiceData.totalSubTotal != "0.00") { |
388 | if (this.feeType.paidAmount === "0.00") { | 388 | if (this.feeType.paidAmount === "0.00") { |
389 | editInvoiceData.paymentStatus = "NOT_PAID"; | 389 | editInvoiceData.paymentStatus = "NOT_PAID"; |
390 | } | 390 | } |
391 | } | 391 | } |
392 | // console.log("editInvoiceData", editInvoiceData); | 392 | // console.log("editInvoiceData", editInvoiceData); |
393 | 393 | ||
394 | http() | 394 | http() |
395 | .put("/updateInvoice", editInvoiceData) | 395 | .put("/updateInvoice", editInvoiceData) |
396 | .then(response => { | 396 | .then((response) => { |
397 | // this.getInvoiceList(); | 397 | // this.getInvoiceList(); |
398 | this.snackbar = true; | 398 | this.snackbar = true; |
399 | this.text = "Edit Invoice successfully"; | 399 | this.text = "Edit Invoice successfully"; |
400 | this.loading = false; | 400 | this.loading = false; |
401 | color: "red"; | 401 | color: "red"; |
402 | this.$emit("update-editInvoice"); | 402 | this.$emit("update-editInvoice"); |
403 | }) | 403 | }) |
404 | .catch(error => { | 404 | .catch((error) => { |
405 | console.log(error); | 405 | console.log(error); |
406 | this.snackbar = true; | 406 | this.snackbar = true; |
407 | this.text = error.response.data.message; | 407 | this.text = error.response.data.message; |
408 | color: "red"; | 408 | color: "red"; |
409 | this.loading = false; | 409 | this.loading = false; |
410 | }); | 410 | }); |
411 | } | 411 | } |
412 | }, | 412 | }, |
413 | clear() { | 413 | clear() { |
414 | this.$refs.form.reset(); | 414 | this.$refs.form.reset(); |
415 | }, | 415 | }, |
416 | selectFeeType() { | 416 | selectFeeType() { |
417 | this.showFeeType = true; | 417 | this.showFeeType = true; |
418 | this.editData.feeType.push({ feeTypeName: this.feeType.feeTypeName }); | 418 | this.editData.feeType.push({ feeTypeName: this.feeType.feeTypeName }); |
419 | }, | 419 | }, |
420 | deleteSelectFee: function(feeTyp, feeTypeList, index) { | 420 | deleteSelectFee: function (feeTyp, feeTypeList, index) { |
421 | this.editData.feeType.splice(index, 1); | 421 | this.editData.feeType.splice(index, 1); |
422 | this.getAmmountDetails(feeTyp, feeTypeList); | 422 | this.getAmmountDetails(feeTyp, feeTypeList); |
423 | if (this.feeTypeData.length == 0) { | 423 | if (this.feeTypeData.length == 0) { |
424 | this.feeType = { | 424 | this.feeType = { |
425 | amount: "0.00", | 425 | amount: "0.00", |
426 | discount: "0.00", | 426 | discount: "0.00", |
427 | paidAmount: "0.00", | 427 | paidAmount: "0.00", |
428 | subTotal: "0.00", | 428 | subTotal: "0.00", |
429 | feeTypeList: "" | 429 | feeTypeList: "", |
430 | }; | 430 | }; |
431 | } | 431 | } |
432 | }, | 432 | }, |
433 | getAllClasses() { | 433 | getAllClasses() { |
434 | http() | 434 | http() |
435 | .get("/getClassesList", { | 435 | .get("/getClassesList", { |
436 | headers: { Authorization: "Bearer " + this.token } | 436 | headers: { Authorization: "Bearer " + this.token }, |
437 | }) | 437 | }) |
438 | .then(response => { | 438 | .then((response) => { |
439 | this.addclass = response.data.data; | 439 | this.addclass = response.data.data; |
440 | }) | 440 | }) |
441 | .catch(error => { | 441 | .catch((error) => { |
442 | // console.log("err====>", err); | 442 | // console.log("err====>", err); |
443 | this.showLoader = false; | 443 | this.showLoader = false; |
444 | if (error.response.status === 401) { | 444 | if (error.response.status === 401) { |
445 | this.$router.replace({ path: "/" }); | 445 | this.$router.replace({ path: "/" }); |
446 | this.$store.dispatch("setToken", null); | 446 | this.$store.dispatch("setToken", null); |
447 | this.$store.dispatch("Id", null); | 447 | this.$store.dispatch("Id", null); |
448 | this.$store.dispatch("Role", null); | 448 | this.$store.dispatch("Role", null); |
449 | } | 449 | } |
450 | }); | 450 | }); |
451 | }, | 451 | }, |
452 | getAllStudents(classId) { | 452 | getAllStudents(classId) { |
453 | // console.log("classId", classId); | 453 | // console.log("classId", classId); |
454 | this.editDataObj.classNum = classId; | 454 | this.editDataObj.classNum = classId; |
455 | this.editDataObj.studentId = ""; | 455 | this.editDataObj.studentId = ""; |
456 | this.studentList = []; | 456 | this.studentList = []; |
457 | this.showLoader = true; | 457 | this.showLoader = true; |
458 | http() | 458 | http() |
459 | .get("/getStudentsList", { | 459 | .get("/getStudentsList", { |
460 | params: { classId: classId }, | 460 | params: { classId: classId }, |
461 | headers: { Authorization: "Bearer " + this.token } | 461 | headers: { Authorization: "Bearer " + this.token }, |
462 | }) | 462 | }) |
463 | .then(response => { | 463 | .then((response) => { |
464 | for (let i = 0; i < response.data.data.length; i++) { | 464 | for (let i = 0; i < response.data.data.length; i++) { |
465 | this.studentList.push({ | 465 | this.studentList.push({ |
466 | name: response.data.data[i].name, | 466 | name: response.data.data[i].name, |
467 | _id: response.data.data[i]._id | 467 | _id: response.data.data[i]._id, |
468 | }); | 468 | }); |
469 | } | 469 | } |
470 | this.showLoader = false; | 470 | this.showLoader = false; |
471 | }) | 471 | }) |
472 | .catch(err => { | 472 | .catch((err) => { |
473 | // console.log("err====>", err); | 473 | // console.log("err====>", err); |
474 | this.showLoader = false; | 474 | this.showLoader = false; |
475 | }); | 475 | }); |
476 | }, | 476 | }, |
477 | getStudentId(studentId) { | 477 | getStudentId(studentId) { |
478 | // console.log("studentId", studentId); | 478 | // console.log("studentId", studentId); |
479 | this.editDataObj.studentId = studentId; | 479 | this.editDataObj.studentId = studentId; |
480 | }, | 480 | }, |
481 | getfeeType() { | 481 | getfeeType() { |
482 | http() | 482 | http() |
483 | .get("/getFeesList", { | 483 | .get("/getFeesList", { |
484 | headers: { Authorization: "Bearer " + this.token } | 484 | headers: { Authorization: "Bearer " + this.token }, |
485 | }) | 485 | }) |
486 | .then(response => { | 486 | .then((response) => { |
487 | this.feeTypes = response.data.data; | 487 | this.feeTypes = response.data.data; |
488 | }) | 488 | }) |
489 | .catch(err => { | 489 | .catch((err) => { |
490 | // console.log("err====>", err); | 490 | // console.log("err====>", err); |
491 | }); | 491 | }); |
492 | }, | 492 | }, |
493 | getAmmountDetails(feeTyp, feeTypeList) { | 493 | getAmmountDetails(feeTyp, feeTypeList) { |
494 | this.feeTypeData = feeTypeList; | 494 | this.feeTypeData = feeTypeList; |
495 | let feeType = { | 495 | let feeType = { |
496 | amount: "", | 496 | amount: "", |
497 | discount: "", | 497 | discount: "", |
498 | subTotal: "", | 498 | subTotal: "", |
499 | subParticularTotal: "", | 499 | subParticularTotal: "", |
500 | paidAmount: "" | 500 | paidAmount: "", |
501 | }; | 501 | }; |
502 | for (let i = 0; i < this.feeTypeData.length; i++) { | 502 | for (let i = 0; i < this.feeTypeData.length; i++) { |
503 | // *********** AMOUNT *********** | 503 | // *********** AMOUNT *********** |
504 | if (this.feeTypeData[i].amount) { | 504 | if (this.feeTypeData[i].amount) { |
505 | feeType.amount = | 505 | feeType.amount = |
506 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 506 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
507 | this.feeType.amount = feeType.amount; | 507 | this.feeType.amount = feeType.amount; |
508 | this.feeType.subTotal = feeType.amount; | 508 | this.feeType.subTotal = feeType.amount; |
509 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; | 509 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; |
510 | } else if (this.feeTypeData[0].amount == "") { | 510 | } else if (this.feeTypeData[0].amount == "") { |
511 | this.feeType.amount = "0.00"; | 511 | this.feeType.amount = "0.00"; |
512 | this.feeTypeData[i].subTotal = "0.00"; | 512 | this.feeTypeData[i].subTotal = "0.00"; |
513 | this.feeType.subTotal = "0.00"; | 513 | this.feeType.subTotal = "0.00"; |
514 | } else if (this.feeTypeData[i].amount == "") { | 514 | } else if (this.feeTypeData[i].amount == "") { |
515 | this.feeType.amount = | 515 | this.feeType.amount = |
516 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 516 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
517 | this.feeTypeData[i].subTotal = | 517 | this.feeTypeData[i].subTotal = |
518 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 518 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
519 | this.feeType.subTotal = | 519 | this.feeType.subTotal = |
520 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 520 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
521 | } | 521 | } |
522 | // *********** DISCOUNT *********** | 522 | // *********** DISCOUNT *********** |
523 | if (this.feeTypeData[i].discount) { | 523 | if (this.feeTypeData[i].discount) { |
524 | if ( | 524 | if ( |
525 | Number(this.feeTypeData[i].discount) < this.feeTypeData[i].amount | 525 | Number(this.feeTypeData[i].discount) < this.feeTypeData[i].amount |
526 | ) { | 526 | ) { |
527 | feeType.discount = | 527 | feeType.discount = |
528 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); | 528 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
529 | this.feeType.discount = feeType.discount; | 529 | this.feeType.discount = feeType.discount; |
530 | feeType.subParticularTotal = | 530 | feeType.subParticularTotal = |
531 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; | 531 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; |
532 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed( | 532 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed( |
533 | 2 | 533 | 2 |
534 | ); | 534 | ); |
535 | } else if ( | 535 | } else if ( |
536 | Number(this.feeTypeData[i].discount) >= this.feeTypeData[i].amount | 536 | Number(this.feeTypeData[i].discount) >= this.feeTypeData[i].amount |
537 | ) { | 537 | ) { |
538 | this.feeTypeData[i].discount = this.feeTypeData[i].amount; | 538 | this.feeTypeData[i].discount = this.feeTypeData[i].amount; |
539 | feeType.discount = | 539 | feeType.discount = |
540 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); | 540 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
541 | this.feeType.discount = feeType.discount.toString(); | 541 | this.feeType.discount = feeType.discount.toString(); |
542 | feeType.subParticularTotal = | 542 | feeType.subParticularTotal = |
543 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; | 543 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; |
544 | this.feeTypeData[ | 544 | this.feeTypeData[ |
545 | i | 545 | i |
546 | ].subTotal = feeType.subParticularTotal.toString(); | 546 | ].subTotal = feeType.subParticularTotal.toString(); |
547 | } | 547 | } |
548 | } else if (this.feeTypeData[0].discount == "") { | 548 | } else if (this.feeTypeData[0].discount == "") { |
549 | this.feeType.discount = "0.00"; | 549 | this.feeType.discount = "0.00"; |
550 | } | 550 | } |
551 | 551 | ||
552 | // *********** SUBTOTAL *********** | 552 | // *********** SUBTOTAL *********** |
553 | if (this.feeTypeData[i].subTotal) { | 553 | if (this.feeTypeData[i].subTotal) { |
554 | feeType.subTotal = | 554 | feeType.subTotal = |
555 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); | 555 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); |
556 | this.feeType.subTotal = feeType.subTotal.toFixed(2); | 556 | this.feeType.subTotal = feeType.subTotal.toFixed(2); |
557 | } | 557 | } |
558 | 558 | ||
559 | // *********** PAID-AMOUNT *********** | 559 | // *********** PAID-AMOUNT *********** |
560 | if (this.feeTypeData[i].paidAmount) { | 560 | if (this.feeTypeData[i].paidAmount) { |
561 | feeType.paidAmount = | 561 | feeType.paidAmount = |
562 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 562 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
563 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); | 563 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); |
564 | } else if (this.feeTypeData[0].paidAmount == "") { | 564 | } else if (this.feeTypeData[0].paidAmount == "") { |
565 | this.feeType.paidAmount = "0.00"; | 565 | this.feeType.paidAmount = "0.00"; |
566 | } else if (this.feeTypeData[i].paidAmount == "") { | 566 | } else if (this.feeTypeData[i].paidAmount == "") { |
567 | this.feeType.paidAmount = feeType.paidAmount = | 567 | this.feeType.paidAmount = feeType.paidAmount = |
568 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 568 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
569 | } | 569 | } |
570 | 570 | ||
571 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. | 571 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. |
572 | if (feeType.paidAmount > feeType.subTotal) { | 572 | if (feeType.paidAmount > feeType.subTotal) { |
573 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; | 573 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; |
574 | this.feeType.paidAmount = feeType.subTotal; | 574 | this.feeType.paidAmount = feeType.subTotal; |
575 | } | 575 | } |
576 | } | 576 | } |
577 | }, | 577 | }, |
578 | getPayMethodList() { | 578 | getPayMethodList() { |
579 | if (this.editData.paymentStatus == "PARTIALLY_PAID") { | 579 | if (this.editData.paymentStatus == "PARTIALLY_PAID") { |
580 | this.showPayMethods = true; | 580 | this.showPayMethods = true; |
581 | this.paymentMethodRules = [v => !!v || "Payment Method is required"]; | 581 | this.paymentMethodRules = [(v) => !!v || "Payment Method is required"]; |
582 | } else if (this.editData.paymentStatus == "FULLY_PAID") { | 582 | } else if (this.editData.paymentStatus == "FULLY_PAID") { |
583 | this.showPayMethods = true; | 583 | this.showPayMethods = true; |
584 | this.paymentMethodRules = [v => !!v || "Payment Method is required"]; | 584 | this.paymentMethodRules = [(v) => !!v || "Payment Method is required"]; |
585 | } else if (this.editData.paymentStatus == "NOT_PAID") { | 585 | } else if (this.editData.paymentStatus == "NOT_PAID") { |
586 | for (let i = 0; i < this.feeTypeData.length; i++) { | 586 | for (let i = 0; i < this.feeTypeData.length; i++) { |
587 | this.feeTypeData[i].paidAmount = "0.00"; | 587 | this.feeTypeData[i].paidAmount = "0.00"; |
588 | this.feeType.paidAmount = "0.00"; | 588 | this.feeType.paidAmount = "0.00"; |
589 | } | 589 | } |
590 | this.paymentMethodRules = ""; | 590 | this.paymentMethodRules = ""; |
591 | this.showPayMethods = false; | 591 | this.showPayMethods = false; |
592 | } else { | 592 | } else { |
593 | this.showPayMethods = false; | 593 | this.showPayMethods = false; |
594 | } | 594 | } |
595 | } | 595 | }, |
596 | }, | 596 | }, |
597 | mounted() { | 597 | mounted() { |
598 | this.token = this.$store.state.token; | 598 | this.token = this.$store.state.token; |
599 | this.getAllClasses(); | 599 | this.getAllClasses(); |
600 | this.getfeeType(); | 600 | this.getfeeType(); |
601 | }, | 601 | }, |
602 | created() { | 602 | created() { |
603 | this.$root.$on("app:search", search => { | 603 | this.$root.$on("app:search", (search) => { |
604 | this.search = search; | 604 | this.search = search; |
605 | }); | 605 | }); |
606 | }, | 606 | }, |
607 | beforeDestroy() { | 607 | beforeDestroy() { |
608 | // dont forget to remove the listener | 608 | // dont forget to remove the listener |
609 | this.$root.$off("app:search"); | 609 | this.$root.$off("app:search"); |
610 | } | 610 | }, |
611 | }; | 611 | }; |
612 | </script> | 612 | </script> |
613 | 613 | ||
614 | 614 | ||
615 | <style scoped> | 615 | <style scoped> |
616 | .active { | 616 | .active { |
617 | background-color: gray; | 617 | background-color: gray; |
618 | color: white !important; | 618 | color: white !important; |
619 | } | 619 | } |
620 | .activebtn { | 620 | .activebtn { |
621 | color: black !important; | 621 | color: black !important; |
622 | } | 622 | } |
623 | table { | 623 | table { |
624 | border-collapse: collapse; | 624 | border-collapse: collapse; |
625 | border: 1px solid #e2e7eb; | 625 | border: 1px solid #e2e7eb; |
626 | } | 626 | } |
627 | 627 | ||
628 | th, | 628 | th, |
629 | td { | 629 | td { |
630 | border: 1px solid #e2e7eb; | 630 | border: 1px solid #e2e7eb; |
631 | padding: 10px; | 631 | padding: 10px; |
632 | text-align: center; | 632 | text-align: center; |
633 | } | 633 | } |
634 | table.feeTypeTable { | 634 | table.feeTypeTable { |
635 | table-layout: auto !important; | 635 | table-layout: auto !important; |
636 | width: 100% !important; | 636 | width: 100% !important; |
637 | } | 637 | } |
638 | @media screen and (max-width: 380px) { | 638 | @media screen and (max-width: 380px) { |
639 | .tableRsponsive { | 639 | .tableRsponsive { |
640 | display: block; | 640 | display: block; |
641 | position: relative; | 641 | position: relative; |
642 | overflow: scroll; | 642 | overflow: scroll; |
643 | } | 643 | } |
644 | } | 644 | } |
645 | </style> | 645 | </style> |
src/pages/Account/paymentTemplate.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** Edit multiple INVOICE ****** --> | 3 | <!-- ****** Edit multiple INVOICE ****** --> |
4 | 4 | ||
5 | <v-snackbar | 5 | <v-snackbar |
6 | :timeout="timeout" | 6 | :timeout="timeout" |
7 | :top="y === 'top'" | 7 | :top="y === 'top'" |
8 | :right="x === 'right'" | 8 | :right="x === 'right'" |
9 | :vertical="mode === 'vertical'" | 9 | :vertical="mode === 'vertical'" |
10 | v-model="snackbar" | 10 | v-model="snackbar" |
11 | color="success" | 11 | color="success" |
12 | >{{ text }}</v-snackbar> | 12 | >{{ text }}</v-snackbar> |
13 | <v-flex xs12 sm12> | 13 | <v-flex xs12 sm12> |
14 | <v-container fluid grid-list-md> | 14 | <v-container fluid grid-list-md> |
15 | <v-layout wrap> | 15 | <v-layout wrap> |
16 | <v-flex xs12 sm12 md4> | 16 | <v-flex xs12 sm12 md4> |
17 | <v-card flat class="mb-4"> | 17 | <v-card flat class="mb-4"> |
18 | <v-toolbar dark class="card-styles" flat> | 18 | <v-toolbar dark class="card-styles" flat> |
19 | <v-spacer></v-spacer> | 19 | <v-spacer></v-spacer> |
20 | <h3>Profile</h3> | 20 | <h3>Profile</h3> |
21 | <v-spacer></v-spacer> | 21 | <v-spacer></v-spacer> |
22 | </v-toolbar> | 22 | </v-toolbar> |
23 | <!-- Profile User--> | 23 | <!-- Profile User--> |
24 | <v-card-text> | 24 | <v-card-text> |
25 | <v-container> | 25 | <v-container> |
26 | <v-layout wrap> | 26 | <v-layout wrap> |
27 | <v-flex xs12> | 27 | <v-flex xs12> |
28 | <v-layout> | 28 | <v-layout> |
29 | <v-flex | 29 | <v-flex |
30 | xs12 | 30 | xs12 |
31 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 31 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
32 | > | 32 | > |
33 | <v-avatar size="80px"> | 33 | <v-avatar size="80px"> |
34 | <img src="/static/icon/user.png" v-if="!editPayment.profilePicUrl" /> | 34 | <img src="/static/icon/user.png" v-if="!editPayment.profilePicUrl" /> |
35 | <img | 35 | <img |
36 | :src="editPayment.profilePicUrl" | 36 | :src="editPayment.profilePicUrl" |
37 | v-else-if="editPayment.profilePicUrl" | 37 | v-else-if="editPayment.profilePicUrl" |
38 | /> | 38 | /> |
39 | </v-avatar> | 39 | </v-avatar> |
40 | </v-flex> | 40 | </v-flex> |
41 | </v-layout> | 41 | </v-layout> |
42 | <v-layout> | 42 | <v-layout> |
43 | <v-flex xs12 sm12> | 43 | <v-flex xs12 sm12> |
44 | <h3 class="text-xs-center"> | 44 | <h3 class="text-xs-center"> |
45 | <b>{{ editPayment.studentId.name }}</b> | 45 | <b>{{ editPayment.studentId.name }}</b> |
46 | </h3> | 46 | </h3> |
47 | <p class="text-xs-center grey--text">Student</p> | 47 | <p class="text-xs-center grey--text">Student</p> |
48 | </v-flex> | 48 | </v-flex> |
49 | </v-layout> | 49 | </v-layout> |
50 | <v-layout style="border: 1px solid lightgrey;"> | 50 | <v-layout style="border: 1px solid lightgrey;"> |
51 | <v-flex xs6 sm6 class="pa-0"> | 51 | <v-flex xs6 sm6 class="pa-0"> |
52 | <h4 class="right"> | 52 | <h4 class="right"> |
53 | <b>Roll No :</b> | 53 | <b>Roll No :</b> |
54 | </h4> | 54 | </h4> |
55 | </v-flex> | 55 | </v-flex> |
56 | <v-flex sm6 xs6 class="pa-0"> | 56 | <v-flex sm6 xs6 class="pa-0"> |
57 | <h4>{{ editPayment.studentId.rollNo }}</h4> | 57 | <h4>{{ editPayment.studentId.rollNo }}</h4> |
58 | </v-flex> | 58 | </v-flex> |
59 | </v-layout> | 59 | </v-layout> |
60 | <v-layout style="border: 1px solid lightgrey;"> | 60 | <v-layout style="border: 1px solid lightgrey;"> |
61 | <v-flex xs6 sm6 class="pa-0"> | 61 | <v-flex xs6 sm6 class="pa-0"> |
62 | <h4 class="right"> | 62 | <h4 class="right"> |
63 | <b>Class :</b> | 63 | <b>Class :</b> |
64 | </h4> | 64 | </h4> |
65 | </v-flex> | 65 | </v-flex> |
66 | <v-flex sm6 xs6 class="pa-0"> | 66 | <v-flex sm6 xs6 class="pa-0"> |
67 | <h4>{{ editPayment.classId.classNum }}</h4> | 67 | <h4>{{ editPayment.classId.classNum }}</h4> |
68 | </v-flex> | 68 | </v-flex> |
69 | </v-layout> | 69 | </v-layout> |
70 | </v-flex> | 70 | </v-flex> |
71 | </v-layout> | 71 | </v-layout> |
72 | </v-container> | 72 | </v-container> |
73 | </v-card-text> | 73 | </v-card-text> |
74 | </v-card> | 74 | </v-card> |
75 | <!-- Account Fee Type List User--> | 75 | <!-- Account Fee Type List User--> |
76 | <v-card flat> | 76 | <v-card flat> |
77 | <v-toolbar dark class="card-styles" flat> | 77 | <v-toolbar dark class="card-styles" flat> |
78 | <v-spacer></v-spacer> | 78 | <v-spacer></v-spacer> |
79 | <v-toolbar-title> | 79 | <v-toolbar-title> |
80 | <h3>Invoice</h3> | 80 | <h3>Invoice</h3> |
81 | </v-toolbar-title> | 81 | </v-toolbar-title> |
82 | <v-spacer></v-spacer> | 82 | <v-spacer></v-spacer> |
83 | </v-toolbar> | 83 | </v-toolbar> |
84 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> | 84 | <v-form ref="form" v-model="valid" lazy-validation class="py-4"> |
85 | <v-layout> | 85 | <v-layout> |
86 | <v-flex xs4 class="pt-4 subheading"> | 86 | <v-flex xs4 class="pt-4 subheading"> |
87 | <label class="right">Payment Method:</label> | 87 | <label class="right">Payment Method:</label> |
88 | </v-flex> | 88 | </v-flex> |
89 | <v-flex xs7 class="ml-3"> | 89 | <v-flex xs7 class="ml-3"> |
90 | <v-select | 90 | <v-select |
91 | :items="paymentMethods" | 91 | :items="paymentMethods" |
92 | v-model="editPayment.paymentMethod" | 92 | v-model="editPayment.paymentMethod" |
93 | label="Select Payment Method" | 93 | label="Select Payment Method" |
94 | ></v-select> | 94 | ></v-select> |
95 | </v-flex> | 95 | </v-flex> |
96 | </v-layout> | 96 | </v-layout> |
97 | <v-card-actions> | 97 | <v-card-actions> |
98 | <v-spacer class="hidden-xs-only"></v-spacer> | 98 | <v-spacer class="hidden-xs-only"></v-spacer> |
99 | <v-btn | 99 | <v-btn |
100 | color="open-dialog-button" | 100 | color="open-dialog-button" |
101 | dark | 101 | dark |
102 | class="right mt-3" | 102 | class="right add-button" |
103 | @click="update(editPayment)" | 103 | @click="update(editPayment)" |
104 | >Add Payment</v-btn> | 104 | >Add Payment</v-btn> |
105 | </v-card-actions> | 105 | </v-card-actions> |
106 | </v-form> | 106 | </v-form> |
107 | </v-card> | 107 | </v-card> |
108 | </v-flex> | 108 | </v-flex> |
109 | <v-flex xs12 sm12 md8> | 109 | <v-flex xs12 sm12 md8> |
110 | <v-card> | 110 | <v-card> |
111 | <v-toolbar dark class="card-styles" flat> | 111 | <v-toolbar dark class="card-styles" flat> |
112 | <v-spacer></v-spacer> | 112 | <v-spacer></v-spacer> |
113 | <v-toolbar-title> | 113 | <v-toolbar-title> |
114 | <h3>Fee Type List</h3> | 114 | <h3>Fee Type List</h3> |
115 | </v-toolbar-title> | 115 | </v-toolbar-title> |
116 | <v-spacer></v-spacer> | 116 | <v-spacer></v-spacer> |
117 | </v-toolbar> | 117 | </v-toolbar> |
118 | <table class="feeTypeTable tableRsponsive"> | 118 | <table class="feeTypeTable tableRsponsive"> |
119 | <tr class="info white--text"> | 119 | <tr class="info white--text"> |
120 | <th>#</th> | 120 | <th>#</th> |
121 | <th>Fee Type</th> | 121 | <th>Fee Type</th> |
122 | <th>Amount</th> | 122 | <th>Amount</th> |
123 | <th>Discount</th> | 123 | <th>Discount</th> |
124 | <th>Subtotal</th> | 124 | <th>Subtotal</th> |
125 | <th>Paid Amount</th> | 125 | <th>Paid Amount</th> |
126 | <th>Action</th> | 126 | <th>Action</th> |
127 | </tr> | 127 | </tr> |
128 | <tr | 128 | <tr |
129 | v-for="(feeType, index) in editPayment.feeType" | 129 | v-for="(feeType, index) in editPayment.feeType" |
130 | :key="index" | 130 | :key="index" |
131 | v-on:keyup="getAmmountDetails(feeType,editPayment.feeType)" | 131 | v-on:keyup="getAmmountDetails(feeType,editPayment.feeType)" |
132 | > | 132 | > |
133 | <td style="width:40px">{{ index + 1 }}</td> | 133 | <td style="width:40px">{{ index + 1 }}</td> |
134 | <td style="width:120px">{{ feeType.feeTypeName }}</td> | 134 | <td style="width:120px">{{ feeType.feeTypeName }}</td> |
135 | <td> | 135 | <td> |
136 | <v-text-field | 136 | <v-text-field |
137 | placeholder="fill your Amount" | 137 | placeholder="fill your Amount" |
138 | v-model="feeType.amount" | 138 | v-model="feeType.amount" |
139 | type="number" | 139 | type="number" |
140 | ></v-text-field> | 140 | ></v-text-field> |
141 | </td> | 141 | </td> |
142 | <td> | 142 | <td> |
143 | <v-text-field | 143 | <v-text-field |
144 | placeholder="fill your Discount" | 144 | placeholder="fill your Discount" |
145 | v-model="feeType.discount" | 145 | v-model="feeType.discount" |
146 | type="number" | 146 | type="number" |
147 | ></v-text-field> | 147 | ></v-text-field> |
148 | </td> | 148 | </td> |
149 | <td>{{ feeType.subTotal }}</td> | 149 | <td>{{ feeType.subTotal }}</td> |
150 | <td> | 150 | <td> |
151 | <v-text-field | 151 | <v-text-field |
152 | placeholder="fill your Paid Amount" | 152 | placeholder="fill your Paid Amount" |
153 | v-model="feeType.paidAmount" | 153 | v-model="feeType.paidAmount" |
154 | type="number" | 154 | type="number" |
155 | ></v-text-field> | 155 | ></v-text-field> |
156 | </td> | 156 | </td> |
157 | <td v-if="!editPayment.feeType"> | 157 | <td v-if="!editPayment.feeType"> |
158 | <v-icon | 158 | <v-icon |
159 | color="error" | 159 | color="error" |
160 | @click="deleteSelectFee(feeType,editPayment.feeType,index)" | 160 | @click="deleteSelectFee(feeType,editPayment.feeType,index)" |
161 | >delete</v-icon> | 161 | >delete</v-icon> |
162 | </td> | 162 | </td> |
163 | </tr> | 163 | </tr> |
164 | <tfoot v-if="feeType.amount != 0.00"> | 164 | <tfoot v-if="feeType.amount != 0.00"> |
165 | <tr> | 165 | <tr> |
166 | <td colspan="2">Total:</td> | 166 | <td colspan="2">Total:</td> |
167 | <td>{{ feeType.amount }}</td> | 167 | <td>{{ feeType.amount }}</td> |
168 | <td>{{ feeType.discount }}</td> | 168 | <td>{{ feeType.discount }}</td> |
169 | <td>{{ feeType.subTotal }}</td> | 169 | <td>{{ feeType.subTotal }}</td> |
170 | <td>{{ feeType.paidAmount }}</td> | 170 | <td>{{ feeType.paidAmount }}</td> |
171 | </tr> | 171 | </tr> |
172 | </tfoot> | 172 | </tfoot> |
173 | <tfoot v-else-if="feeType.amount == 0.00"> | 173 | <tfoot v-else-if="feeType.amount == 0.00"> |
174 | <tr> | 174 | <tr> |
175 | <td colspan="2">Total:</td> | 175 | <td colspan="2">Total:</td> |
176 | <td>{{ editPayment.totalAmount }}</td> | 176 | <td>{{ editPayment.totalAmount }}</td> |
177 | <td>{{ editPayment.totalDiscount }}</td> | 177 | <td>{{ editPayment.totalDiscount }}</td> |
178 | <td>{{ editPayment.totalSubTotal }}</td> | 178 | <td>{{ editPayment.totalSubTotal }}</td> |
179 | <td>{{ editPayment.totalPaidAmount }}</td> | 179 | <td>{{ editPayment.totalPaidAmount }}</td> |
180 | </tr> | 180 | </tr> |
181 | </tfoot> | 181 | </tfoot> |
182 | </table> | 182 | </table> |
183 | </v-card> | 183 | </v-card> |
184 | </v-flex> | 184 | </v-flex> |
185 | </v-layout> | 185 | </v-layout> |
186 | </v-container> | 186 | </v-container> |
187 | </v-flex> | 187 | </v-flex> |
188 | <div class="loader" v-if="showLoader"> | 188 | <div class="loader" v-if="showLoader"> |
189 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 189 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
190 | </div> | 190 | </div> |
191 | </v-app> | 191 | </v-app> |
192 | </template> | 192 | </template> |
193 | 193 | ||
194 | <script> | 194 | <script> |
195 | import http from "@/Services/http.js"; | 195 | import http from "@/Services/http.js"; |
196 | import moment from "moment"; | 196 | import moment from "moment"; |
197 | 197 | ||
198 | export default { | 198 | export default { |
199 | props: ["editPayment"], | 199 | props: ["editPayment"], |
200 | data: () => ({ | 200 | data: () => ({ |
201 | snackbar: false, | 201 | snackbar: false, |
202 | // showPayMethods: false, | 202 | // showPayMethods: false, |
203 | y: "top", | 203 | y: "top", |
204 | x: "right", | 204 | x: "right", |
205 | mode: "", | 205 | mode: "", |
206 | timeout: 3000, | 206 | timeout: 3000, |
207 | text: "", | 207 | text: "", |
208 | showLoader: false, | 208 | showLoader: false, |
209 | loading: false, | 209 | loading: false, |
210 | date: null, | 210 | date: null, |
211 | search: "", | 211 | search: "", |
212 | // dialog: false, | 212 | // dialog: false, |
213 | // dialog1: false, | 213 | // dialog1: false, |
214 | valid: true, | 214 | valid: true, |
215 | validEdit: true, | 215 | validEdit: true, |
216 | // isActive: true, | 216 | // isActive: true, |
217 | // newActive: false, | 217 | // newActive: false, |
218 | showFeeType: false, | 218 | showFeeType: false, |
219 | disabled: true, | 219 | disabled: true, |
220 | details: [], | 220 | details: [], |
221 | feeTypes: [], | 221 | feeTypes: [], |
222 | menu1: false, | 222 | menu1: false, |
223 | // invoiceData: {}, | 223 | // invoiceData: {}, |
224 | paymentMethods: ["Cash", "Cheque"], | 224 | paymentMethods: ["Cash", "Cheque"], |
225 | feeType: { | 225 | feeType: { |
226 | amount: "0.00", | 226 | amount: "0.00", |
227 | discount: "0.00", | 227 | discount: "0.00", |
228 | paidAmount: "0.00", | 228 | paidAmount: "0.00", |
229 | subTotal: "0.00", | 229 | subTotal: "0.00", |
230 | feeTypeName: "" | 230 | feeTypeName: "", |
231 | }, | 231 | }, |
232 | feeTypeData: [], | 232 | feeTypeData: [], |
233 | pagination: { | 233 | pagination: { |
234 | rowsPerPage: 15 | 234 | rowsPerPage: 15, |
235 | }, | 235 | }, |
236 | token: "", | 236 | token: "", |
237 | editedItem: {}, | 237 | editedItem: {}, |
238 | invoiceParticularData: {}, | 238 | invoiceParticularData: {}, |
239 | addclass: [], | 239 | addclass: [], |
240 | studentList: [], | 240 | studentList: [], |
241 | paymentStatus: [ | 241 | paymentStatus: [ |
242 | { | 242 | { |
243 | name: "Not Paid", | 243 | name: "Not Paid", |
244 | value: "NOT_PAID" | 244 | value: "NOT_PAID", |
245 | }, | 245 | }, |
246 | { | 246 | { |
247 | name: "Partially Paid", | 247 | name: "Partially Paid", |
248 | value: "PARTIALLY_PAID" | 248 | value: "PARTIALLY_PAID", |
249 | }, | 249 | }, |
250 | { | 250 | { |
251 | name: "Fully Paid", | 251 | name: "Fully Paid", |
252 | value: "FULLY_PAID" | 252 | value: "FULLY_PAID", |
253 | } | 253 | }, |
254 | ] | 254 | ], |
255 | }), | 255 | }), |
256 | // watch: { | 256 | // watch: { |
257 | // menu1(val) { | 257 | // menu1(val) { |
258 | // val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 258 | // val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
259 | // } | 259 | // } |
260 | // }, | 260 | // }, |
261 | methods: { | 261 | methods: { |
262 | save(date) { | 262 | save(date) { |
263 | this.$refs.menu1.save(date); | 263 | this.$refs.menu1.save(date); |
264 | }, | 264 | }, |
265 | dates: function(date) { | 265 | dates: function (date) { |
266 | return moment(date).format("MMMM DD, YYYY"); | 266 | return moment(date).format("MMMM DD, YYYY"); |
267 | }, | 267 | }, |
268 | update(editPayment) { | 268 | update(editPayment) { |
269 | // console.log("editPayment-----------", editPayment); | 269 | // console.log("editPayment-----------", editPayment); |
270 | let feeTypeId = ""; | 270 | let feeTypeId = ""; |
271 | for (let i = 0; i < this.feeTypes.length; i++) { | 271 | for (let i = 0; i < this.feeTypes.length; i++) { |
272 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { | 272 | if (this.feeTypes[i].feeType === this.feeType.feeTypeName) { |
273 | feeTypeId = this.feeTypes[i]._id; | 273 | feeTypeId = this.feeTypes[i]._id; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | // console.log(editPayment); | 276 | // console.log(editPayment); |
277 | let editInvoiceData = { | 277 | let editInvoiceData = { |
278 | invoiceId: editPayment._id, | 278 | invoiceId: editPayment._id, |
279 | classId: editPayment.classNum, | 279 | classId: editPayment.classNum, |
280 | studentId: editPayment.sectionId, | 280 | studentId: editPayment.sectionId, |
281 | date: editPayment.date, | 281 | date: editPayment.date, |
282 | paymentStatus: editPayment.paymentStatus, | 282 | paymentStatus: editPayment.paymentStatus, |
283 | paymentMethod: editPayment.paymentMethod, | 283 | paymentMethod: editPayment.paymentMethod, |
284 | feeType: editPayment.feeType, | 284 | feeType: editPayment.feeType, |
285 | totalAmount: this.feeType.amount.toString(), | 285 | totalAmount: this.feeType.amount.toString(), |
286 | totalDiscount: this.feeType.discount.toString(), | 286 | totalDiscount: this.feeType.discount.toString(), |
287 | totalSubTotal: this.feeType.subTotal.toString(), | 287 | totalSubTotal: this.feeType.subTotal.toString(), |
288 | totalPaidAmount: this.feeType.paidAmount | 288 | totalPaidAmount: this.feeType.paidAmount, |
289 | }; | 289 | }; |
290 | if (feeTypeId == "") { | 290 | if (feeTypeId == "") { |
291 | delete editInvoiceData.feeType[0].feeTypeId; | 291 | delete editInvoiceData.feeType[0].feeTypeId; |
292 | } | 292 | } |
293 | if (editInvoiceData.paymentStatus == "NOT_PAID") { | 293 | if (editInvoiceData.paymentStatus == "NOT_PAID") { |
294 | delete editInvoiceData.paymentMethod; | 294 | delete editInvoiceData.paymentMethod; |
295 | } | 295 | } |
296 | if (editInvoiceData.totalPaidAmount == "0") { | 296 | if (editInvoiceData.totalPaidAmount == "0") { |
297 | if (editInvoiceData.paymentStatus == "NOT_PAID") { | 297 | if (editInvoiceData.paymentStatus == "NOT_PAID") { |
298 | delete editInvoiceData.totalPaidAmount; | 298 | delete editInvoiceData.totalPaidAmount; |
299 | } | 299 | } |
300 | } | 300 | } |
301 | if (editInvoiceData.totalPaidAmount != "0.00") { | 301 | if (editInvoiceData.totalPaidAmount != "0.00") { |
302 | if (this.feeType.subTotal == this.feeType.paidAmount) { | 302 | if (this.feeType.subTotal == this.feeType.paidAmount) { |
303 | editInvoiceData.paymentStatus = "FULLY_PAID"; | 303 | editInvoiceData.paymentStatus = "FULLY_PAID"; |
304 | } | 304 | } |
305 | if (editInvoiceData.totalPaidAmount) { | 305 | if (editInvoiceData.totalPaidAmount) { |
306 | if (this.feeType.subTotal != this.feeType.paidAmount) { | 306 | if (this.feeType.subTotal != this.feeType.paidAmount) { |
307 | editInvoiceData.paymentStatus = "PARTIALLY_PAID"; | 307 | editInvoiceData.paymentStatus = "PARTIALLY_PAID"; |
308 | // console.log("PARTIALLY_PAID"); | 308 | // console.log("PARTIALLY_PAID"); |
309 | } | 309 | } |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
313 | if (editInvoiceData.totalSubTotal == "0.00") { | 313 | if (editInvoiceData.totalSubTotal == "0.00") { |
314 | editInvoiceData.paymentStatus = "FULLY_PAID"; | 314 | editInvoiceData.paymentStatus = "FULLY_PAID"; |
315 | } else if (editInvoiceData.totalSubTotal != "0.00") { | 315 | } else if (editInvoiceData.totalSubTotal != "0.00") { |
316 | if (this.feeType.paidAmount === "0.00") { | 316 | if (this.feeType.paidAmount === "0.00") { |
317 | editInvoiceData.paymentStatus = "NOT_PAID"; | 317 | editInvoiceData.paymentStatus = "NOT_PAID"; |
318 | } | 318 | } |
319 | } | 319 | } |
320 | http() | 320 | http() |
321 | .put("/updateInvoice", editInvoiceData) | 321 | .put("/updateInvoice", editInvoiceData) |
322 | .then(response => { | 322 | .then((response) => { |
323 | // this.getInvoiceList(); | 323 | // this.getInvoiceList(); |
324 | this.snackbar = true; | 324 | this.snackbar = true; |
325 | this.text = "Payment added successfully"; | 325 | this.text = "Payment added successfully"; |
326 | this.loading = false; | 326 | this.loading = false; |
327 | this.$emit("update-Payment"); | 327 | this.$emit("update-Payment"); |
328 | }) | 328 | }) |
329 | .catch(error => { | 329 | .catch((error) => { |
330 | console.log(error); | 330 | console.log(error); |
331 | this.snackbar = true; | 331 | this.snackbar = true; |
332 | this.text = error.response.data.message; | 332 | this.text = error.response.data.message; |
333 | this.loading = false; | 333 | this.loading = false; |
334 | }); | 334 | }); |
335 | }, | 335 | }, |
336 | clear() { | 336 | clear() { |
337 | this.$refs.form.reset(); | 337 | this.$refs.form.reset(); |
338 | }, | 338 | }, |
339 | deleteSelectFee: function(feeTyp, feeTypeList, index) { | 339 | deleteSelectFee: function (feeTyp, feeTypeList, index) { |
340 | this.editPayment.feeType.splice(index, 1); | 340 | this.editPayment.feeType.splice(index, 1); |
341 | this.getAmmountDetails(feeTyp, feeTypeList); | 341 | this.getAmmountDetails(feeTyp, feeTypeList); |
342 | if (this.feeTypeData.length == 0) { | 342 | if (this.feeTypeData.length == 0) { |
343 | this.feeType = { | 343 | this.feeType = { |
344 | amount: "0.00", | 344 | amount: "0.00", |
345 | discount: "0.00", | 345 | discount: "0.00", |
346 | paidAmount: "0.00", | 346 | paidAmount: "0.00", |
347 | subTotal: "0.00", | 347 | subTotal: "0.00", |
348 | feeTypeList: "" | 348 | feeTypeList: "", |
349 | }; | 349 | }; |
350 | } | 350 | } |
351 | }, | 351 | }, |
352 | getAllClasses() { | 352 | getAllClasses() { |
353 | http() | 353 | http() |
354 | .get("/getClassesList", { | 354 | .get("/getClassesList", { |
355 | headers: { Authorization: "Bearer " + this.token } | 355 | headers: { Authorization: "Bearer " + this.token }, |
356 | }) | 356 | }) |
357 | .then(response => { | 357 | .then((response) => { |
358 | this.addclass = response.data.data; | 358 | this.addclass = response.data.data; |
359 | this.getAllStudents(); | 359 | this.getAllStudents(); |
360 | }) | 360 | }) |
361 | .catch(error => { | 361 | .catch((error) => { |
362 | // console.log("err====>", err); | 362 | // console.log("err====>", err); |
363 | this.showLoader = false; | 363 | this.showLoader = false; |
364 | if (error.response.status === 401) { | 364 | if (error.response.status === 401) { |
365 | this.$router.replace({ path: "/" }); | 365 | this.$router.replace({ path: "/" }); |
366 | this.$store.dispatch("setToken", null); | 366 | this.$store.dispatch("setToken", null); |
367 | this.$store.dispatch("Id", null); | 367 | this.$store.dispatch("Id", null); |
368 | this.$store.dispatch("Role", null); | 368 | this.$store.dispatch("Role", null); |
369 | } | 369 | } |
370 | }); | 370 | }); |
371 | }, | 371 | }, |
372 | getAllStudents() { | 372 | getAllStudents() { |
373 | http() | 373 | http() |
374 | .get("/getStudentsList", { | 374 | .get("/getStudentsList", { |
375 | params: { classId: this.editPayment.classNum }, | 375 | params: { classId: this.editPayment.classNum }, |
376 | headers: { Authorization: "Bearer " + this.token } | 376 | headers: { Authorization: "Bearer " + this.token }, |
377 | }) | 377 | }) |
378 | .then(response => { | 378 | .then((response) => { |
379 | this.studentList = response.data.data; | 379 | this.studentList = response.data.data; |
380 | }) | 380 | }) |
381 | .catch(err => { | 381 | .catch((err) => { |
382 | // console.log("err====>", err); | 382 | // console.log("err====>", err); |
383 | }); | 383 | }); |
384 | }, | 384 | }, |
385 | getfeeType() { | 385 | getfeeType() { |
386 | http() | 386 | http() |
387 | .get("/getFeesList", { | 387 | .get("/getFeesList", { |
388 | headers: { Authorization: "Bearer " + this.token } | 388 | headers: { Authorization: "Bearer " + this.token }, |
389 | }) | 389 | }) |
390 | .then(response => { | 390 | .then((response) => { |
391 | this.feeTypes = response.data.data; | 391 | this.feeTypes = response.data.data; |
392 | }) | 392 | }) |
393 | .catch(err => { | 393 | .catch((err) => { |
394 | // console.log("err====>", err); | 394 | // console.log("err====>", err); |
395 | }); | 395 | }); |
396 | }, | 396 | }, |
397 | getAmmountDetails(feeTyp, feeTypeList) { | 397 | getAmmountDetails(feeTyp, feeTypeList) { |
398 | this.feeTypeData = feeTypeList; | 398 | this.feeTypeData = feeTypeList; |
399 | let feeType = { | 399 | let feeType = { |
400 | amount: "", | 400 | amount: "", |
401 | discount: "", | 401 | discount: "", |
402 | subTotal: "", | 402 | subTotal: "", |
403 | subParticularTotal: "", | 403 | subParticularTotal: "", |
404 | paidAmount: "" | 404 | paidAmount: "", |
405 | }; | 405 | }; |
406 | for (let i = 0; i < this.feeTypeData.length; i++) { | 406 | for (let i = 0; i < this.feeTypeData.length; i++) { |
407 | // *********** AMOUNT *********** | 407 | // *********** AMOUNT *********** |
408 | if (this.feeTypeData[i].amount) { | 408 | if (this.feeTypeData[i].amount) { |
409 | feeType.amount = | 409 | feeType.amount = |
410 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 410 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
411 | this.feeType.amount = feeType.amount; | 411 | this.feeType.amount = feeType.amount; |
412 | this.feeType.subTotal = feeType.amount; | 412 | this.feeType.subTotal = feeType.amount; |
413 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; | 413 | this.feeTypeData[i].subTotal = this.feeTypeData[i].amount; |
414 | } else if (this.feeTypeData[0].amount == "") { | 414 | } else if (this.feeTypeData[0].amount == "") { |
415 | this.feeType.amount = "0.00"; | 415 | this.feeType.amount = "0.00"; |
416 | this.feeTypeData[i].subTotal = "0.00"; | 416 | this.feeTypeData[i].subTotal = "0.00"; |
417 | this.feeType.subTotal = "0.00"; | 417 | this.feeType.subTotal = "0.00"; |
418 | } else if (this.feeTypeData[i].amount == "") { | 418 | } else if (this.feeTypeData[i].amount == "") { |
419 | this.feeType.amount = | 419 | this.feeType.amount = |
420 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 420 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
421 | this.feeTypeData[i].subTotal = | 421 | this.feeTypeData[i].subTotal = |
422 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 422 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
423 | this.feeType.subTotal = | 423 | this.feeType.subTotal = |
424 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); | 424 | Number(feeType.amount) + Number(this.feeTypeData[i].amount); |
425 | } | 425 | } |
426 | // *********** DISCOUNT *********** | 426 | // *********** DISCOUNT *********** |
427 | if (this.feeTypeData[i].discount) { | 427 | if (this.feeTypeData[i].discount) { |
428 | if ( | 428 | if ( |
429 | Number(this.feeTypeData[i].discount) < this.feeTypeData[i].amount | 429 | Number(this.feeTypeData[i].discount) < this.feeTypeData[i].amount |
430 | ) { | 430 | ) { |
431 | feeType.discount = | 431 | feeType.discount = |
432 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); | 432 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
433 | this.feeType.discount = feeType.discount; | 433 | this.feeType.discount = feeType.discount; |
434 | feeType.subParticularTotal = | 434 | feeType.subParticularTotal = |
435 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; | 435 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; |
436 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed( | 436 | this.feeTypeData[i].subTotal = feeType.subParticularTotal.toFixed( |
437 | 2 | 437 | 2 |
438 | ); | 438 | ); |
439 | } else if ( | 439 | } else if ( |
440 | Number(this.feeTypeData[i].discount) >= this.feeTypeData[i].amount | 440 | Number(this.feeTypeData[i].discount) >= this.feeTypeData[i].amount |
441 | ) { | 441 | ) { |
442 | this.feeTypeData[i].discount = this.feeTypeData[i].amount; | 442 | this.feeTypeData[i].discount = this.feeTypeData[i].amount; |
443 | feeType.discount = | 443 | feeType.discount = |
444 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); | 444 | Number(feeType.discount) + Number(this.feeTypeData[i].discount); |
445 | this.feeType.discount = feeType.discount.toString(); | 445 | this.feeType.discount = feeType.discount.toString(); |
446 | feeType.subParticularTotal = | 446 | feeType.subParticularTotal = |
447 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; | 447 | this.feeTypeData[i].amount - this.feeTypeData[i].discount; |
448 | this.feeTypeData[ | 448 | this.feeTypeData[ |
449 | i | 449 | i |
450 | ].subTotal = feeType.subParticularTotal.toString(); | 450 | ].subTotal = feeType.subParticularTotal.toString(); |
451 | } | 451 | } |
452 | } else if (this.feeTypeData[0].discount == "") { | 452 | } else if (this.feeTypeData[0].discount == "") { |
453 | this.feeType.discount = "0.00"; | 453 | this.feeType.discount = "0.00"; |
454 | } | 454 | } |
455 | 455 | ||
456 | // *********** SUBTOTAL *********** | 456 | // *********** SUBTOTAL *********** |
457 | if (this.feeTypeData[i].subTotal) { | 457 | if (this.feeTypeData[i].subTotal) { |
458 | feeType.subTotal = | 458 | feeType.subTotal = |
459 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); | 459 | Number(feeType.subTotal) + Number(this.feeTypeData[i].subTotal); |
460 | this.feeType.subTotal = feeType.subTotal.toFixed(2); | 460 | this.feeType.subTotal = feeType.subTotal.toFixed(2); |
461 | } | 461 | } |
462 | 462 | ||
463 | // *********** PAID-AMOUNT *********** | 463 | // *********** PAID-AMOUNT *********** |
464 | if (this.feeTypeData[i].paidAmount) { | 464 | if (this.feeTypeData[i].paidAmount) { |
465 | feeType.paidAmount = | 465 | feeType.paidAmount = |
466 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 466 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
467 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); | 467 | this.feeType.paidAmount = feeType.paidAmount.toFixed(2); |
468 | } else if (this.feeTypeData[0].paidAmount == "") { | 468 | } else if (this.feeTypeData[0].paidAmount == "") { |
469 | this.feeType.paidAmount = "0.00"; | 469 | this.feeType.paidAmount = "0.00"; |
470 | } else if (this.feeTypeData[i].paidAmount == "") { | 470 | } else if (this.feeTypeData[i].paidAmount == "") { |
471 | this.feeType.paidAmount = feeType.paidAmount = | 471 | this.feeType.paidAmount = feeType.paidAmount = |
472 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); | 472 | Number(feeType.paidAmount) + Number(this.feeTypeData[i].paidAmount); |
473 | } | 473 | } |
474 | 474 | ||
475 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. | 475 | // if paid Amount fill large of subtotal value so this condition are fixed filled subtotal value. |
476 | if (feeType.paidAmount > feeType.subTotal) { | 476 | if (feeType.paidAmount > feeType.subTotal) { |
477 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; | 477 | this.feeTypeData[i].paidAmount = this.feeTypeData[i].subTotal; |
478 | this.feeType.paidAmount = feeType.subTotal; | 478 | this.feeType.paidAmount = feeType.subTotal; |
479 | } | 479 | } |
480 | } | 480 | } |
481 | } | 481 | }, |
482 | // getPayMethodList() { | 482 | // getPayMethodList() { |
483 | // if (this.editPayment.paymentStatus == "PARTIALLY_PAID") { | 483 | // if (this.editPayment.paymentStatus == "PARTIALLY_PAID") { |
484 | // this.showPayMethods = true; | 484 | // this.showPayMethods = true; |
485 | // } else if (this.editPayment.paymentStatus == "FULLY_PAID") { | 485 | // } else if (this.editPayment.paymentStatus == "FULLY_PAID") { |
486 | // this.showPayMethods = true; | 486 | // this.showPayMethods = true; |
487 | // } else { | 487 | // } else { |
488 | // this.showPayMethods = false; | 488 | // this.showPayMethods = false; |
489 | // } | 489 | // } |
490 | // } | 490 | // } |
491 | }, | 491 | }, |
492 | mounted() { | 492 | mounted() { |
493 | this.token = this.$store.state.token; | 493 | this.token = this.$store.state.token; |
494 | this.getAllClasses(); | 494 | this.getAllClasses(); |
495 | this.getfeeType(); | 495 | this.getfeeType(); |
496 | }, | 496 | }, |
497 | created() { | 497 | created() { |
498 | this.$root.$on("app:search", search => { | 498 | this.$root.$on("app:search", (search) => { |
499 | this.search = search; | 499 | this.search = search; |
500 | }); | 500 | }); |
501 | }, | 501 | }, |
502 | beforeDestroy() { | 502 | beforeDestroy() { |
503 | // dont forget to remove the listener | 503 | // dont forget to remove the listener |
504 | this.$root.$off("app:search"); | 504 | this.$root.$off("app:search"); |
505 | } | 505 | }, |
506 | }; | 506 | }; |
507 | </script> | 507 | </script> |
508 | 508 | ||
509 | 509 | ||
510 | <style scoped> | 510 | <style scoped> |
511 | .active { | 511 | .active { |
512 | background-color: gray; | 512 | background-color: gray; |
513 | color: white !important; | 513 | color: white !important; |
514 | } | 514 | } |
515 | .activebtn { | 515 | .activebtn { |
516 | color: black !important; | 516 | color: black !important; |
517 | } | 517 | } |
518 | table { | 518 | table { |
519 | border-collapse: collapse; | 519 | border-collapse: collapse; |
520 | border: 1px solid #e2e7eb; | 520 | border: 1px solid #e2e7eb; |
521 | } | 521 | } |
522 | 522 | ||
523 | th, | 523 | th, |
524 | td { | 524 | td { |
525 | border: 1px solid #e2e7eb; | 525 | border: 1px solid #e2e7eb; |
526 | padding: 10px; | 526 | padding: 10px; |
527 | text-align: center; | 527 | text-align: center; |
528 | } | 528 | } |
529 | table.feeTypeTable { | 529 | table.feeTypeTable { |
530 | table-layout: auto !important; | 530 | table-layout: auto !important; |
531 | width: 100% !important; | 531 | width: 100% !important; |
532 | } | 532 | } |
533 | @media screen and (max-width: 380px) { | 533 | @media screen and (max-width: 380px) { |
534 | .tableRsponsive { | 534 | .tableRsponsive { |
535 | display: block; | 535 | display: block; |
536 | position: relative; | 536 | position: relative; |
537 | overflow: scroll; | 537 | overflow: scroll; |
538 | } | 538 | } |
539 | } | 539 | } |
540 | </style> | 540 | </style> |
src/pages/Course/courseDetail.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Edit Chapter detail ****** --> | 3 | <!-- ****** Edit Chapter detail ****** --> |
4 | <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> | 4 | <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> |
5 | <v-card class="card-style pa-2" dark> | 5 | <v-card class="card-style pa-2" dark> |
6 | <v-layout> | 6 | <v-layout> |
7 | <v-flex xs12> | 7 | <v-flex xs12> |
8 | <label class="title text-xs-center">Edit Chapter</label> | 8 | <label class="title text-xs-center">Edit Chapter</label> |
9 | <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> |
10 | </v-flex> | 10 | </v-flex> |
11 | </v-layout> | 11 | </v-layout> |
12 | <v-card-text> | 12 | <v-card-text> |
13 | <v-layout wrap> | 13 | <v-layout wrap> |
14 | <v-flex xs12 sm12> | 14 | <v-flex xs12 sm12> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex xs4 class="pt-4 subheading"> | 16 | <v-flex xs4 class="pt-4 subheading"> |
17 | <label class="right">Select Class:</label> | 17 | <label class="right">Select Class:</label> |
18 | </v-flex> | 18 | </v-flex> |
19 | <v-flex xs8 sm6 class="ml-3"> | 19 | <v-flex xs8 sm6 class="ml-3"> |
20 | <v-select | 20 | <v-select |
21 | small | 21 | small |
22 | :items="addclass" | 22 | :items="addclass" |
23 | label="Select Class" | 23 | label="Select Class" |
24 | v-model="editedCourse.classId" | 24 | v-model="editedCourse.classId" |
25 | item-text="classNum" | 25 | item-text="classNum" |
26 | item-value="_id" | 26 | item-value="_id" |
27 | name="Select Class" | 27 | name="Select Class" |
28 | @change="getCourses(editedCourse.classId)" | 28 | @change="getCourses(editedCourse.classId)" |
29 | class="mr-2" | 29 | class="mr-2" |
30 | required | 30 | required |
31 | ></v-select> | 31 | ></v-select> |
32 | </v-flex> | 32 | </v-flex> |
33 | </v-layout> | 33 | </v-layout> |
34 | </v-flex> | 34 | </v-flex> |
35 | <v-flex xs12 sm12> | 35 | <v-flex xs12 sm12> |
36 | <v-layout> | 36 | <v-layout> |
37 | <v-flex xs4 class="pt-4 subheading"> | 37 | <v-flex xs4 class="pt-4 subheading"> |
38 | <label class="right">Select Course:</label> | 38 | <label class="right">Select Course:</label> |
39 | </v-flex> | 39 | </v-flex> |
40 | <v-flex xs8 sm6 class="ml-3"> | 40 | <v-flex xs8 sm6 class="ml-3"> |
41 | <v-select | 41 | <v-select |
42 | :items="courseData" | 42 | :items="courseData" |
43 | label="Select Course" | 43 | label="Select Course" |
44 | v-model="editedCourse.courseId" | 44 | v-model="editedCourse.courseId" |
45 | item-text="courseName" | 45 | item-text="courseName" |
46 | item-value="_id" | 46 | item-value="_id" |
47 | required | 47 | required |
48 | class="ml-2" | 48 | class="ml-2" |
49 | ></v-select> | 49 | ></v-select> |
50 | </v-flex> | 50 | </v-flex> |
51 | </v-layout> | 51 | </v-layout> |
52 | </v-flex> | 52 | </v-flex> |
53 | </v-layout> | 53 | </v-layout> |
54 | <v-layout> | 54 | <v-layout> |
55 | <v-flex xs12 sm12 md11 lg11> | 55 | <v-flex xs12 sm12 md11 lg11> |
56 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 56 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
57 | <v-spacer></v-spacer> | 57 | <v-spacer></v-spacer> |
58 | <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> | 58 | <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> |
59 | </v-card-actions> | 59 | </v-card-actions> |
60 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 60 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
61 | <v-spacer></v-spacer> | 61 | <v-spacer></v-spacer> |
62 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | 62 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> |
63 | <v-spacer></v-spacer> | 63 | <v-spacer></v-spacer> |
64 | </v-card-actions> | 64 | </v-card-actions> |
65 | </v-flex> | 65 | </v-flex> |
66 | </v-layout> | 66 | </v-layout> |
67 | </v-card-text> | 67 | </v-card-text> |
68 | </v-card> | 68 | </v-card> |
69 | </v-dialog> | 69 | </v-dialog> |
70 | <!-- DIALOG BOX - EDIT CHAPTER--> | 70 | <!-- DIALOG BOX - EDIT CHAPTER--> |
71 | <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable> | 71 | <v-dialog v-model="editChapterDetailDialog" max-width="1000px" scrollable> |
72 | <v-card class="card-style pa-2" dark> | 72 | <v-card class="card-style pa-2" dark> |
73 | <v-layout> | 73 | <v-layout> |
74 | <v-flex xs12> | 74 | <v-flex xs12> |
75 | <label class="title text-xs-center">Edit Chapter</label> | 75 | <label class="title text-xs-center">Edit Chapter</label> |
76 | <v-icon | 76 | <v-icon |
77 | size="24" | 77 | size="24" |
78 | class="right" | 78 | class="right" |
79 | @click="editChapterDetailDialog = false; trigger = 'reset'; emptyPdf = 'reset' " | 79 | @click="editChapterDetailDialog = false; trigger = 'reset'; emptyPdf = 'reset' " |
80 | >cancel</v-icon> | 80 | >cancel</v-icon> |
81 | </v-flex> | 81 | </v-flex> |
82 | </v-layout> | 82 | </v-layout> |
83 | <v-card-text> | 83 | <v-card-text> |
84 | <v-layout wrap> | 84 | <v-layout wrap> |
85 | <!-- CHAPTER NAME --> | 85 | <!-- CHAPTER NAME --> |
86 | <v-flex xs12 sm12> | 86 | <v-flex xs12 sm12> |
87 | <v-layout> | 87 | <v-layout> |
88 | <v-flex xs4 class="pt-4 subheading"> | 88 | <v-flex xs4 class="pt-4 subheading"> |
89 | <label class="right">Chapter Name:</label> | 89 | <label class="right">Chapter Name:</label> |
90 | </v-flex> | 90 | </v-flex> |
91 | <v-flex xs8 sm6 class="ml-3"> | 91 | <v-flex xs8 sm6 class="ml-3"> |
92 | <v-text-field | 92 | <v-text-field |
93 | v-model="editChapter.chapterName" | 93 | v-model="editChapter.chapterName" |
94 | placeholder="fill your Title" | 94 | placeholder="fill your Title" |
95 | type="text" | 95 | type="text" |
96 | required | 96 | required |
97 | ></v-text-field> | 97 | ></v-text-field> |
98 | </v-flex> | 98 | </v-flex> |
99 | </v-layout> | 99 | </v-layout> |
100 | </v-flex> | 100 | </v-flex> |
101 | <!-- DESCRIPTION --> | 101 | <!-- DESCRIPTION --> |
102 | <v-flex xs12 sm12> | 102 | <v-flex xs12 sm12> |
103 | <v-layout> | 103 | <v-layout> |
104 | <v-flex xs4 class="pt-4 subheading"> | 104 | <v-flex xs4 class="pt-4 subheading"> |
105 | <label class="right">Description:</label> | 105 | <label class="right">Description:</label> |
106 | </v-flex> | 106 | </v-flex> |
107 | <v-flex xs8 sm6 class="ml-3"> | 107 | <v-flex xs8 sm6 class="ml-3"> |
108 | <v-text-field | 108 | <v-text-field |
109 | placeholder="fill your Description" | 109 | placeholder="fill your Description" |
110 | v-model="editChapter.description" | 110 | v-model="editChapter.description" |
111 | type="text" | 111 | type="text" |
112 | required | 112 | required |
113 | ></v-text-field> | 113 | ></v-text-field> |
114 | </v-flex> | 114 | </v-flex> |
115 | </v-layout> | 115 | </v-layout> |
116 | </v-flex> | 116 | </v-flex> |
117 | <!-- UPLOAD PPT --> | 117 | <!-- UPLOAD PPT --> |
118 | <!-- <v-flex xs12> | 118 | <!-- <v-flex xs12> |
119 | <v-layout> | 119 | <v-layout> |
120 | <v-flex xs4 class="pt-4 subheading"> | 120 | <v-flex xs4 class="pt-4 subheading"> |
121 | <label class="right">Upload PPT:</label> | 121 | <label class="right">Upload PPT:</label> |
122 | </v-flex> | 122 | </v-flex> |
123 | <v-flex xs8 sm6 class="ml-3"> | 123 | <v-flex xs8 sm6 class="ml-3"> |
124 | <UploadFiles | 124 | <UploadFiles |
125 | @fileSelected="fileSelected($event,'uploadPPT')" | 125 | @fileSelected="fileSelected($event,'uploadPPT')" |
126 | label="Add PPT" | 126 | label="Add PPT" |
127 | reference="EditPpt" | 127 | reference="EditPpt" |
128 | id="editPptInput" | 128 | id="editPptInput" |
129 | :trigger="trigger" | 129 | :trigger="trigger" |
130 | ></UploadFiles> | 130 | ></UploadFiles> |
131 | </v-flex> | 131 | </v-flex> |
132 | </v-layout> | 132 | </v-layout> |
133 | </v-flex>--> | 133 | </v-flex>--> |
134 | <!-- UPLOAD PDF --> | 134 | <!-- UPLOAD PDF --> |
135 | <v-flex xs12> | 135 | <v-flex xs12> |
136 | <v-layout> | 136 | <v-layout> |
137 | <v-flex xs4 class="pt-4 subheading"> | 137 | <v-flex xs4 class="pt-4 subheading"> |
138 | <label class="right">Upload PDF:</label> | 138 | <label class="right">Upload PDF:</label> |
139 | </v-flex> | 139 | </v-flex> |
140 | <v-flex xs8 sm6 class="ml-3"> | 140 | <v-flex xs8 sm6 class="ml-3"> |
141 | <UploadPdf | 141 | <UploadPdf |
142 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" | 142 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" |
143 | label="Add PDF" | 143 | label="Add PDF" |
144 | reference="editPdf" | 144 | reference="editPdf" |
145 | id="editPdfInput" | 145 | id="editPdfInput" |
146 | :emptyPdf="emptyPdf" | 146 | :emptyPdf="emptyPdf" |
147 | ></UploadPdf> | 147 | ></UploadPdf> |
148 | </v-flex> | 148 | </v-flex> |
149 | </v-layout> | 149 | </v-layout> |
150 | </v-flex> | 150 | </v-flex> |
151 | </v-layout> | 151 | </v-layout> |
152 | <!-- <v-flex xs12 v-if="editChapter.chapterPoints.length != 0"> | 152 | <!-- <v-flex xs12 v-if="editChapter.chapterPoints.length != 0"> |
153 | <v-layout | 153 | <v-layout |
154 | wrap | 154 | wrap |
155 | v-for="(editChapterPoint,index) in editChapter.chapterPoints" | 155 | v-for="(editChapterPoint,index) in editChapter.chapterPoints" |
156 | :key="index" | 156 | :key="index" |
157 | > | 157 | > |
158 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> | 158 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> |
159 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> | 159 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> |
160 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> | 160 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> |
161 | </v-flex> | 161 | </v-flex> |
162 | <v-layout> | 162 | <v-layout> |
163 | <v-flex xs10 sm10 sm5 md9 class="ml-3"> | 163 | <v-flex xs10 sm10 sm5 md9 class="ml-3"> |
164 | <v-text-field :value="editChapterPoint" type="text" required></v-text-field> | 164 | <v-text-field :value="editChapterPoint" type="text" required></v-text-field> |
165 | </v-flex> | 165 | </v-flex> |
166 | <v-flex xs2 class="pt-4"> | 166 | <v-flex xs2 class="pt-4"> |
167 | <v-icon @click="deleteUrl(index)">cancel</v-icon> | 167 | <v-icon @click="deleteUrl(index)">cancel</v-icon> |
168 | </v-flex> | 168 | </v-flex> |
169 | </v-layout> | 169 | </v-layout> |
170 | </v-layout> | 170 | </v-layout> |
171 | </v-flex>--> | 171 | </v-flex>--> |
172 | <v-flex xs12> | 172 | <v-flex xs12> |
173 | <div v-for="(updateImage,index) in updates" :key="index"> | 173 | <div v-for="(updateImage,index) in updates" :key="index"> |
174 | <v-layout wrap> | 174 | <v-layout wrap> |
175 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> | 175 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> |
176 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> | 176 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> |
177 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> | 177 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> |
178 | </v-flex> | 178 | </v-flex> |
179 | <v-layout> | 179 | <v-layout> |
180 | <v-flex xs10 sm12 md9 class="ml-3"> | 180 | <v-flex xs10 sm12 md9 class="ml-3"> |
181 | <v-text-field | 181 | <v-text-field |
182 | v-model="updateImage.value" | 182 | v-model="updateImage.value" |
183 | placeholder="Upload new Chapter Points" | 183 | placeholder="Upload new Chapter Points" |
184 | required | 184 | required |
185 | ></v-text-field> | 185 | ></v-text-field> |
186 | </v-flex> | 186 | </v-flex> |
187 | <v-flex xs2 class="pt-4"> | 187 | <v-flex xs2 class="pt-4"> |
188 | <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon> | 188 | <v-icon @click="deleteUpdate(index)" v-if="index !=0">cancel</v-icon> |
189 | <v-icon @click="update">add_circle</v-icon> | 189 | <v-icon @click="update">add_circle</v-icon> |
190 | </v-flex> | 190 | </v-flex> |
191 | </v-layout> | 191 | </v-layout> |
192 | </v-layout> | 192 | </v-layout> |
193 | </div> | 193 | </div> |
194 | </v-flex> | 194 | </v-flex> |
195 | <v-layout> | 195 | <v-layout> |
196 | <v-flex xs12 sm12 md11 lg11> | 196 | <v-flex xs12 sm12 md11 lg11> |
197 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 197 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
198 | <v-spacer></v-spacer> | 198 | <v-spacer></v-spacer> |
199 | <v-btn | 199 | <v-btn |
200 | round | 200 | round |
201 | dark | 201 | dark |
202 | @click="saveChapter" | 202 | @click="saveChapter" |
203 | :loading="editLoading" | 203 | :loading="editLoading" |
204 | class="add-button mr-4" | 204 | class="add-button mr-4" |
205 | >Save</v-btn> | 205 | >Save</v-btn> |
206 | </v-card-actions> | 206 | </v-card-actions> |
207 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 207 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
208 | <v-spacer></v-spacer> | 208 | <v-spacer></v-spacer> |
209 | <v-btn | 209 | <v-btn |
210 | round | 210 | round |
211 | dark | 211 | dark |
212 | @click="saveChapter" | 212 | @click="saveChapter" |
213 | :loading="editLoading" | 213 | :loading="editLoading" |
214 | class="add-button" | 214 | class="add-button" |
215 | >Save</v-btn> | 215 | >Save</v-btn> |
216 | <v-spacer></v-spacer> | 216 | <v-spacer></v-spacer> |
217 | </v-card-actions> | 217 | </v-card-actions> |
218 | </v-flex> | 218 | </v-flex> |
219 | </v-layout> | 219 | </v-layout> |
220 | </v-card-text> | 220 | </v-card-text> |
221 | </v-card> | 221 | </v-card> |
222 | </v-dialog> | 222 | </v-dialog> |
223 | <!-- ADD NEW CHAPTER--> | 223 | <!-- ADD NEW CHAPTER--> |
224 | <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable> | 224 | <v-dialog v-model="addChapterDialog" max-width="1000px" scrollable> |
225 | <v-card class="card-style pa-2" dark> | 225 | <v-card class="card-style pa-2" dark> |
226 | <v-layout> | 226 | <v-layout> |
227 | <v-flex xs12> | 227 | <v-flex xs12> |
228 | <label class="title text-xs-center">Add Chapter Detail</label> | 228 | <label class="title text-xs-center">Add Chapter Detail</label> |
229 | <v-icon | 229 | <v-icon |
230 | size="24" | 230 | size="24" |
231 | class="right" | 231 | class="right" |
232 | @click="addChapterDialog = false; trigger = 'reset'; emptyPdf = 'reset' " | 232 | @click="addChapterDialog = false; trigger = 'reset'; emptyPdf = 'reset' " |
233 | >cancel</v-icon> | 233 | >cancel</v-icon> |
234 | </v-flex> | 234 | </v-flex> |
235 | </v-layout> | 235 | </v-layout> |
236 | <v-card-text> | 236 | <v-card-text> |
237 | <v-layout wrap> | 237 | <v-layout wrap> |
238 | <v-flex xs12 sm12> | 238 | <v-flex xs12 sm12> |
239 | <v-layout> | 239 | <v-layout> |
240 | <v-flex xs4 class="pt-4 subheading"> | 240 | <v-flex xs4 class="pt-4 subheading"> |
241 | <label class="right">Chapter Name:</label> | 241 | <label class="right">Chapter Name:</label> |
242 | </v-flex> | 242 | </v-flex> |
243 | <v-flex xs8 sm6 class="ml-3"> | 243 | <v-flex xs8 sm6 class="ml-3"> |
244 | <v-text-field | 244 | <v-text-field |
245 | v-model="addChapterItem.chapterName" | 245 | v-model="addChapterItem.chapterName" |
246 | placeholder="fill your Title" | 246 | placeholder="fill your Title" |
247 | type="text" | 247 | type="text" |
248 | required | 248 | required |
249 | ></v-text-field> | 249 | ></v-text-field> |
250 | </v-flex> | 250 | </v-flex> |
251 | </v-layout> | 251 | </v-layout> |
252 | </v-flex> | 252 | </v-flex> |
253 | <v-flex xs12 sm12> | 253 | <v-flex xs12 sm12> |
254 | <v-layout> | 254 | <v-layout> |
255 | <v-flex xs4 class="pt-4 subheading"> | 255 | <v-flex xs4 class="pt-4 subheading"> |
256 | <label class="right">Description:</label> | 256 | <label class="right">Description:</label> |
257 | </v-flex> | 257 | </v-flex> |
258 | <v-flex xs8 sm6 class="ml-3"> | 258 | <v-flex xs8 sm6 class="ml-3"> |
259 | <v-text-field | 259 | <v-text-field |
260 | placeholder="fill your Description" | 260 | placeholder="fill your Description" |
261 | v-model="addChapterItem.description" | 261 | v-model="addChapterItem.description" |
262 | type="text" | 262 | type="text" |
263 | required | 263 | required |
264 | ></v-text-field> | 264 | ></v-text-field> |
265 | </v-flex> | 265 | </v-flex> |
266 | </v-layout> | 266 | </v-layout> |
267 | </v-flex> | 267 | </v-flex> |
268 | <!-- UPLOAD PPT --> | 268 | <!-- UPLOAD PPT --> |
269 | <!-- <v-flex xs12> | 269 | <!-- <v-flex xs12> |
270 | <v-layout> | 270 | <v-layout> |
271 | <v-flex xs4 class="pt-4 subheading"> | 271 | <v-flex xs4 class="pt-4 subheading"> |
272 | <label class="right">Upload PPT:</label> | 272 | <label class="right">Upload PPT:</label> |
273 | </v-flex> | 273 | </v-flex> |
274 | <v-flex xs8 sm6 class="ml-3"> | 274 | <v-flex xs8 sm6 class="ml-3"> |
275 | <UploadFiles | 275 | <UploadFiles |
276 | @fileSelected="fileSelected($event,'uploadPPT')" | 276 | @fileSelected="fileSelected($event,'uploadPPT')" |
277 | label="Add PPT" | 277 | label="Add PPT" |
278 | reference="newChapterPpt" | 278 | reference="newChapterPpt" |
279 | id="newChapterPptInput" | 279 | id="newChapterPptInput" |
280 | :trigger="trigger" | 280 | :trigger="trigger" |
281 | ></UploadFiles> | 281 | ></UploadFiles> |
282 | </v-flex> | 282 | </v-flex> |
283 | </v-layout> | 283 | </v-layout> |
284 | </v-flex>--> | 284 | </v-flex>--> |
285 | <!-- UPLOAD PDF --> | 285 | <!-- UPLOAD PDF --> |
286 | <v-flex xs12> | 286 | <v-flex xs12> |
287 | <v-layout> | 287 | <v-layout> |
288 | <v-flex xs4 class="pt-4 subheading"> | 288 | <v-flex xs4 class="pt-4 subheading"> |
289 | <label class="right">Upload PDF:</label> | 289 | <label class="right">Upload PDF:</label> |
290 | </v-flex> | 290 | </v-flex> |
291 | <v-flex xs8 sm6 class="ml-3"> | 291 | <v-flex xs8 sm6 class="ml-3"> |
292 | <UploadPdf | 292 | <UploadPdf |
293 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" | 293 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" |
294 | label="Add PDF" | 294 | label="Add PDF" |
295 | reference="newChapterPdf" | 295 | reference="newChapterPdf" |
296 | id="newChapterPdfInput" | 296 | id="newChapterPdfInput" |
297 | :emptyPdf="emptyPdf" | 297 | :emptyPdf="emptyPdf" |
298 | ></UploadPdf> | 298 | ></UploadPdf> |
299 | </v-flex> | 299 | </v-flex> |
300 | </v-layout> | 300 | </v-layout> |
301 | </v-flex> | 301 | </v-flex> |
302 | </v-layout> | 302 | </v-layout> |
303 | <v-flex xs12> | 303 | <v-flex xs12> |
304 | <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index"> | 304 | <div v-for="(chapterPoints,index) in findsChapterPoint" :key="index"> |
305 | <v-layout> | 305 | <v-layout> |
306 | <v-flex xs4 class="pt-4 subheading"> | 306 | <v-flex xs4 class="pt-4 subheading"> |
307 | <label class="right">Chapter Points:</label> | 307 | <label class="right">Chapter Points:</label> |
308 | </v-flex> | 308 | </v-flex> |
309 | <v-flex xs8 sm8 md6 class="ml-3"> | 309 | <v-flex xs8 sm8 md6 class="ml-3"> |
310 | <v-text-field | 310 | <v-text-field |
311 | placeholder="fill your Chapter Points" | 311 | placeholder="fill your Chapter Points" |
312 | v-model="chapterPoints.value" | 312 | v-model="chapterPoints.value" |
313 | type="text" | 313 | type="text" |
314 | name="link" | 314 | name="link" |
315 | required | 315 | required |
316 | ></v-text-field> | 316 | ></v-text-field> |
317 | </v-flex> | 317 | </v-flex> |
318 | <v-flex xs2 class="pt-4"> | 318 | <v-flex xs2 class="pt-4"> |
319 | <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon> | 319 | <v-icon @click="deleteChapterPoint(index)" v-if="index !=0 ">cancel</v-icon> |
320 | <v-icon @click="addChapterPoint()">add_circle</v-icon> | 320 | <v-icon @click="addChapterPoint()">add_circle</v-icon> |
321 | </v-flex> | 321 | </v-flex> |
322 | </v-layout> | 322 | </v-layout> |
323 | </div> | 323 | </div> |
324 | </v-flex> | 324 | </v-flex> |
325 | <v-layout> | 325 | <v-layout> |
326 | <v-flex xs12 sm12 md11 lg11> | 326 | <v-flex xs12 sm12 md11 lg11> |
327 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 327 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
328 | <v-spacer></v-spacer> | 328 | <v-spacer></v-spacer> |
329 | <v-btn | 329 | <v-btn |
330 | round | 330 | round |
331 | dark | 331 | dark |
332 | @click="submitChapter" | 332 | @click="submitChapter" |
333 | :loading="editLoading" | 333 | :loading="editLoading" |
334 | class="add-button mr-4" | 334 | class="add-button mr-4" |
335 | >Submit</v-btn> | 335 | >Submit</v-btn> |
336 | </v-card-actions> | 336 | </v-card-actions> |
337 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | 337 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> |
338 | <v-spacer></v-spacer> | 338 | <v-spacer></v-spacer> |
339 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | 339 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> |
340 | <v-spacer></v-spacer> | 340 | <v-spacer></v-spacer> |
341 | </v-card-actions> | 341 | </v-card-actions> |
342 | </v-flex> | 342 | </v-flex> |
343 | </v-layout> | 343 | </v-layout> |
344 | </v-card-text> | 344 | </v-card-text> |
345 | </v-card> | 345 | </v-card> |
346 | </v-dialog> | 346 | </v-dialog> |
347 | 347 | ||
348 | <!-- ****** PROFILE Gallery ****** --> | 348 | <!-- ****** PROFILE Gallery ****** --> |
349 | 349 | ||
350 | <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> | 350 | <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> |
351 | <v-card flat class="card-style pa-3" dark> | 351 | <v-card flat class="card-style pa-3" dark> |
352 | <v-layout> | 352 | <v-layout> |
353 | <v-flex xs12> | 353 | <v-flex xs12> |
354 | <label class="title text-xs-center">View Course Detail</label> | 354 | <label class="title text-xs-center">View Course Detail</label> |
355 | <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> | 355 | <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> |
356 | </v-flex> | 356 | </v-flex> |
357 | </v-layout> | 357 | </v-layout> |
358 | <v-card-text> | 358 | <v-card-text> |
359 | <v-container grid-list-md> | 359 | <v-container grid-list-md> |
360 | <v-layout wrap> | 360 | <v-layout wrap> |
361 | <v-flex xs12> | 361 | <v-flex xs12> |
362 | <v-layout> | 362 | <v-layout> |
363 | <v-flex xs4 sm6> | 363 | <v-flex xs4 sm6> |
364 | <h5 class="right my-1"> | 364 | <h5 class="right my-1"> |
365 | <b>Chapter Name:</b> | 365 | <b>Chapter Name:</b> |
366 | </h5> | 366 | </h5> |
367 | </v-flex> | 367 | </v-flex> |
368 | <v-flex sm6 xs8> | 368 | <v-flex sm6 xs8> |
369 | <h5 class="my-1">{{ editedItem.chapterName }}</h5> | 369 | <h5 class="my-1">{{ editedItem.chapterName }}</h5> |
370 | </v-flex> | 370 | </v-flex> |
371 | </v-layout> | 371 | </v-layout> |
372 | <v-layout> | 372 | <v-layout> |
373 | <v-flex xs4 sm6> | 373 | <v-flex xs4 sm6> |
374 | <h5 class="right my-1"> | 374 | <h5 class="right my-1"> |
375 | <b>Description:</b> | 375 | <b>Description:</b> |
376 | </h5> | 376 | </h5> |
377 | </v-flex> | 377 | </v-flex> |
378 | <v-flex sm6 xs8> | 378 | <v-flex sm6 xs8> |
379 | <h5 class="my-1">{{ editedItem.description }}</h5> | 379 | <h5 class="my-1">{{ editedItem.description }}</h5> |
380 | </v-flex> | 380 | </v-flex> |
381 | </v-layout> | 381 | </v-layout> |
382 | <v-layout> | 382 | <v-layout> |
383 | <v-flex xs5 sm6> | 383 | <v-flex xs5 sm6> |
384 | <h5 class="right my-1"> | 384 | <h5 class="right my-1"> |
385 | <b>Chapter Points:</b> | 385 | <b>Chapter Points:</b> |
386 | </h5> | 386 | </h5> |
387 | </v-flex> | 387 | </v-flex> |
388 | <v-flex sm6 xs8> | 388 | <v-flex sm6 xs8> |
389 | <h5 class="my-1"> | 389 | <h5 class="my-1"> |
390 | <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> | 390 | <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> |
391 | <li>{{ chapterPoint}}</li> | 391 | <li>{{ chapterPoint}}</li> |
392 | </ul> | 392 | </ul> |
393 | </h5> | 393 | </h5> |
394 | </v-flex> | 394 | </v-flex> |
395 | </v-layout> | 395 | </v-layout> |
396 | <!-- LINK TO PDF --> | 396 | <!-- LINK TO PDF --> |
397 | <v-layout row justify-center> | 397 | <v-layout row justify-center v-show="editedItem.pdfFileUrl != ''"> |
398 | <v-flex xs6> | 398 | <v-flex xs6> |
399 | <div style="width: 100%;"> | 399 | <div style="width: 100%;"> |
400 | <a | 400 | <a |
401 | :href="editedItem.pdfFileUrl" | 401 | :href="editedItem.pdfFileUrl" |
402 | target="_blank" | 402 | target="_blank" |
403 | style="text-decoration: none!important;" | 403 | style="text-decoration: none!important;" |
404 | > | 404 | > |
405 | <v-btn flat block> | 405 | <v-btn flat block> |
406 | <span> | 406 | <span> |
407 | <h5> | 407 | <h5> |
408 | <b>Open PDF</b> | 408 | <b>Open PDF</b> |
409 | </h5> | 409 | </h5> |
410 | </span> | 410 | </span> |
411 | </v-btn> | 411 | </v-btn> |
412 | </a> | 412 | </a> |
413 | </div> | 413 | </div> |
414 | </v-flex> | 414 | </v-flex> |
415 | </v-layout> | 415 | </v-layout> |
416 | </v-flex> | 416 | </v-flex> |
417 | </v-layout> | 417 | </v-layout> |
418 | </v-container> | 418 | </v-container> |
419 | </v-card-text> | 419 | </v-card-text> |
420 | </v-card> | 420 | </v-card> |
421 | </v-dialog> | 421 | </v-dialog> |
422 | 422 | ||
423 | <!-- ****** Course Detail TABLE ****** --> | 423 | <!-- ****** Course Detail TABLE ****** --> |
424 | <v-toolbar color="transparent" flat> | 424 | <v-toolbar color="transparent" flat> |
425 | <!-- <v-flex xs1> | 425 | <!-- <v-flex xs1> |
426 | <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true"> | 426 | <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true"> |
427 | <v-icon size="20">add</v-icon> | 427 | <v-icon size="20">add</v-icon> |
428 | <span class="hidden-sm-and-down">Add Course Detail</span> | 428 | <span class="hidden-sm-and-down">Add Course Detail</span> |
429 | <span class="hidden-md-and-up">Add</span> | 429 | <span class="hidden-md-and-up">Add</span> |
430 | </v-btn> | 430 | </v-btn> |
431 | </v-flex>--> | 431 | </v-flex>--> |
432 | <v-btn | 432 | <v-btn |
433 | fab | 433 | fab |
434 | dark | 434 | dark |
435 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 435 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
436 | small | 436 | small |
437 | @click="addCourseDetailDialog = true" | 437 | @click="addCourseDetailDialog = true" |
438 | > | 438 | > |
439 | <v-icon dark>add</v-icon> | 439 | <v-icon dark>add</v-icon> |
440 | </v-btn> | 440 | </v-btn> |
441 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> | 441 | <v-flex xs1 class="hidden-sm-only hidden-xs-only"> |
442 | <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true"> | 442 | <v-btn round class="open-dialog-button" dark @click="addCourseDetailDialog = true"> |
443 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail | 443 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail |
444 | </v-btn> | 444 | </v-btn> |
445 | </v-flex> | 445 | </v-flex> |
446 | <v-spacer></v-spacer> | 446 | <v-spacer></v-spacer> |
447 | <v-flex xs12 sm4 md2> | 447 | <v-flex xs12 sm4 md2> |
448 | <v-select | 448 | <v-select |
449 | :items="addclass" | 449 | :items="addclass" |
450 | label="Select Class" | 450 | label="Select Class" |
451 | v-model="getCourse.classId" | 451 | v-model="getCourse.classId" |
452 | item-text="classNum" | 452 | item-text="classNum" |
453 | item-value="_id" | 453 | item-value="_id" |
454 | name="Select Class" | 454 | name="Select Class" |
455 | @change="getCourses(getCourse.classId)" | 455 | @change="getCourses(getCourse.classId)" |
456 | required | 456 | required |
457 | ></v-select> | 457 | ></v-select> |
458 | </v-flex> | 458 | </v-flex> |
459 | <v-flex xs12 sm4 md2 class="ml-2"> | 459 | <v-flex xs12 sm4 md2 class="ml-2"> |
460 | <v-select | 460 | <v-select |
461 | :items="courseData" | 461 | :items="courseData" |
462 | label="Select Course" | 462 | label="Select Course" |
463 | v-model="getCourse.courseId" | 463 | v-model="getCourse.courseId" |
464 | item-text="courseName" | 464 | item-text="courseName" |
465 | item-value="_id" | 465 | item-value="_id" |
466 | required | 466 | required |
467 | @change="getCourseDetailsList(getCourse.courseId)" | 467 | @change="getCourseDetailsList(getCourse.courseId)" |
468 | ></v-select> | 468 | ></v-select> |
469 | </v-flex> | 469 | </v-flex> |
470 | 470 | ||
471 | <v-flex xs12 sm1 v-if="show"> | 471 | <v-flex xs12 sm1 v-if="show"> |
472 | <v-btn icon large flat @click="show = false;showSearch = true;"> | 472 | <v-btn icon large flat @click="show = false;showSearch = true;"> |
473 | <v-avatar size="27"> | 473 | <v-avatar size="27"> |
474 | <img src="/static/icon/search.png" alt="icon" /> | 474 | <img src="/static/icon/search.png" alt="icon" /> |
475 | </v-avatar> | 475 | </v-avatar> |
476 | </v-btn> | 476 | </v-btn> |
477 | </v-flex> | 477 | </v-flex> |
478 | 478 | ||
479 | <v-flex xs12 sm3 md3 v-if="showSearch" class="ml-2"> | 479 | <v-flex xs12 sm3 md3 v-if="showSearch" class="ml-2"> |
480 | <div style="display: inline-block;width: 70%;"> | 480 | <div style="display: inline-block;width: 70%;"> |
481 | <v-text-field | 481 | <v-text-field |
482 | autofocus | 482 | autofocus |
483 | v-model="search" | 483 | v-model="search" |
484 | label="Search" | 484 | label="Search" |
485 | prepend-inner-icon="search" | 485 | prepend-inner-icon="search" |
486 | color="primary" | 486 | color="primary" |
487 | ></v-text-field> | 487 | ></v-text-field> |
488 | </div> | 488 | </div> |
489 | <div style="display: inline-block;"> | 489 | <div style="display: inline-block;"> |
490 | <v-icon @click="closeSearch" color="error">close</v-icon> | 490 | <v-icon @click="closeSearch" color="error">close</v-icon> |
491 | </div> | 491 | </div> |
492 | </v-flex> | 492 | </v-flex> |
493 | </v-toolbar> | 493 | </v-toolbar> |
494 | 494 | ||
495 | <v-data-table | 495 | <v-data-table |
496 | :headers="headers" | 496 | :headers="headers" |
497 | :items="CourseDetailsList" | 497 | :items="CourseDetailsList" |
498 | :pagination.sync="pagination" | 498 | :pagination.sync="pagination" |
499 | :search="search" | 499 | :search="search" |
500 | item-key="_id" | 500 | item-key="_id" |
501 | > | 501 | > |
502 | <template slot="items" slot-scope="props"> | 502 | <template slot="items" slot-scope="props"> |
503 | <tr class="tr" @click="courseTableRow(props.item._id)"> | 503 | <tr class="tr" @click="courseTableRow(props.item._id)"> |
504 | <td class="td td-row">{{ props.index + 1}}</td> | 504 | <td class="td td-row">{{ props.index + 1}}</td> |
505 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> | 505 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> |
506 | <td class="td td-row text-xs-center">{{ props.item.courseId.courseName }}</td> | 506 | <td class="td td-row text-xs-center">{{ props.item.courseId.courseName }}</td> |
507 | <td class="td td-row text-xs-center"> | 507 | <td class="td td-row text-xs-center"> |
508 | <div style="vertical-align: top;"> | 508 | <div style="vertical-align: top;"> |
509 | <v-tooltip top> | 509 | <v-tooltip top> |
510 | <v-icon | 510 | <v-icon |
511 | slot="activator" | 511 | slot="activator" |
512 | style="cursor:pointer;font-size:22px;position: relative;top: -4px; " | 512 | style="cursor:pointer;font-size:22px;position: relative;top: -4px; " |
513 | class="mr-3" | 513 | class="mr-3" |
514 | @click="addChapters(props.item)" | 514 | @click="addChapters(props.item)" |
515 | >add_circle_outline</v-icon> | 515 | >add_circle_outline</v-icon> |
516 | <span>Add</span> | 516 | <span>Add</span> |
517 | </v-tooltip> | 517 | </v-tooltip> |
518 | <v-tooltip top> | 518 | <v-tooltip top> |
519 | <img | 519 | <img |
520 | slot="activator" | 520 | slot="activator" |
521 | style="cursor:pointer; width:25px; height:25px; " | 521 | style="cursor:pointer; width:25px; height:25px; " |
522 | class="mr-3" | 522 | class="mr-3" |
523 | @click="props.expanded = !props.expanded" | 523 | @click="props.expanded = !props.expanded" |
524 | src="/static/icon/view.png" | 524 | src="/static/icon/view.png" |
525 | /> | 525 | /> |
526 | <span>View</span> | 526 | <span>View</span> |
527 | </v-tooltip> | 527 | </v-tooltip> |
528 | <v-tooltip top> | 528 | <v-tooltip top> |
529 | <img | 529 | <img |
530 | slot="activator" | 530 | slot="activator" |
531 | style="cursor:pointer; width:20px; height:18px; " | 531 | style="cursor:pointer; width:20px; height:18px; " |
532 | class="mr-3" | 532 | class="mr-3" |
533 | @click="editItem(props.item)" | 533 | @click="editItem(props.item)" |
534 | src="/static/icon/edit.png" | 534 | src="/static/icon/edit.png" |
535 | /> | 535 | /> |
536 | <span>Edit</span> | 536 | <span>Edit</span> |
537 | </v-tooltip> | 537 | </v-tooltip> |
538 | <v-tooltip top> | 538 | <v-tooltip top> |
539 | <img | 539 | <img |
540 | slot="activator" | 540 | slot="activator" |
541 | style="cursor:pointer; width:20px; height:20px; " | 541 | style="cursor:pointer; width:20px; height:20px; " |
542 | class="mr-3" | 542 | class="mr-3" |
543 | @click="deleteItem(props.item)" | 543 | @click="deleteItem(props.item)" |
544 | src="/static/icon/delete.png" | 544 | src="/static/icon/delete.png" |
545 | /> | 545 | /> |
546 | <span>Delete</span> | 546 | <span>Delete</span> |
547 | </v-tooltip> | 547 | </v-tooltip> |
548 | </div> | 548 | </div> |
549 | </td> | 549 | </td> |
550 | </tr> | 550 | </tr> |
551 | </template> | 551 | </template> |
552 | <!-- CHAPTERS IN A COURSE --> | 552 | <!-- CHAPTERS IN A COURSE --> |
553 | <template slot="expand"> | 553 | <template slot="expand"> |
554 | <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> | 554 | <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> |
555 | <template slot="items" slot-scope="props"> | 555 | <template slot="items" slot-scope="props"> |
556 | <tr class="tr" @click="props.expanded = !props.expanded"> | 556 | <tr class="tr" @click="props.expanded = !props.expanded"> |
557 | <td class="td td-row">{{ props.index + 1}}</td> | 557 | <td class="td td-row">{{ props.index + 1}}</td> |
558 | <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> | 558 | <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> |
559 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> | 559 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> |
560 | <td class="text-xs-center td td-row"> | 560 | <td class="text-xs-center td td-row"> |
561 | <v-tooltip top> | 561 | <v-tooltip top> |
562 | <v-icon | 562 | <v-icon |
563 | slot="activator" | 563 | slot="activator" |
564 | style="cursor:pointer;font-size:22px;position: relative;top: -4px; " | 564 | style="cursor:pointer;font-size:22px;position: relative;top: -4px; " |
565 | class="mr-3" | 565 | class="mr-3" |
566 | @click="$router.push({name: 'Live Online Class', query: {chapterId: props.item._id, chapterName: props.item.chapterName, courseId: getCourse.courseId, classId: getCourse.classId }})" | 566 | @click="$router.push({name: 'Live Online Class', query: {chapterId: props.item._id, chapterName: props.item.chapterName, courseId: getCourse.courseId, classId: getCourse.classId }})" |
567 | >video_call</v-icon> | 567 | >video_call</v-icon> |
568 | <span>Live Session</span> | 568 | <span>Live Session</span> |
569 | </v-tooltip> | 569 | </v-tooltip> |
570 | <v-tooltip top> | 570 | <v-tooltip top> |
571 | <img | 571 | <img |
572 | slot="activator" | 572 | slot="activator" |
573 | style="cursor:pointer; width:25px; height:25px; " | 573 | style="cursor:pointer; width:25px; height:25px; " |
574 | class="mr-3" | 574 | class="mr-3" |
575 | @click="profile(props.item)" | 575 | @click="profile(props.item)" |
576 | src="/static/icon/view.png" | 576 | src="/static/icon/view.png" |
577 | /> | 577 | /> |
578 | <span>View</span> | 578 | <span>View</span> |
579 | </v-tooltip> | 579 | </v-tooltip> |
580 | <v-tooltip top> | 580 | <v-tooltip top> |
581 | <img | 581 | <img |
582 | slot="activator" | 582 | slot="activator" |
583 | style="cursor:pointer; width:20px; height:18px; " | 583 | style="cursor:pointer; width:20px; height:18px; " |
584 | class="mr-3" | 584 | class="mr-3" |
585 | @click="editChapterItem(props.item)" | 585 | @click="editChapterItem(props.item)" |
586 | src="/static/icon/edit.png" | 586 | src="/static/icon/edit.png" |
587 | /> | 587 | /> |
588 | <span>Edit</span> | 588 | <span>Edit</span> |
589 | </v-tooltip> | 589 | </v-tooltip> |
590 | <v-tooltip top> | 590 | <v-tooltip top> |
591 | <img | 591 | <img |
592 | slot="activator" | 592 | slot="activator" |
593 | style="cursor:pointer; width:20px; height:20px; " | 593 | style="cursor:pointer; width:20px; height:20px; " |
594 | class="mr-3" | 594 | class="mr-3" |
595 | @click="deleteChapters(props.item)" | 595 | @click="deleteChapters(props.item)" |
596 | src="/static/icon/delete.png" | 596 | src="/static/icon/delete.png" |
597 | /> | 597 | /> |
598 | <span>Delete Chapter</span> | 598 | <span>Delete Chapter</span> |
599 | </v-tooltip> | 599 | </v-tooltip> |
600 | </td> | 600 | </td> |
601 | </tr> | 601 | </tr> |
602 | </template> | 602 | </template> |
603 | </v-data-table> | 603 | </v-data-table> |
604 | </template> | 604 | </template> |
605 | 605 | ||
606 | <v-alert | 606 | <v-alert |
607 | slot="no-results" | 607 | slot="no-results" |
608 | :value="true" | 608 | :value="true" |
609 | color="error" | 609 | color="error" |
610 | icon="warning" | 610 | icon="warning" |
611 | >Your search for "{{ search }}" found no results.</v-alert> | 611 | >Your search for "{{ search }}" found no results.</v-alert> |
612 | </v-data-table> | 612 | </v-data-table> |
613 | <!-- ****** ADD Course Detail ****** --> | 613 | <!-- ****** ADD Course Detail ****** --> |
614 | <v-dialog v-model="addCourseDetailDialog" max-width="600px" persistent> | 614 | <v-dialog v-model="addCourseDetailDialog" max-width="600px" persistent> |
615 | <v-card flat class="card-style pa-2" dark> | 615 | <v-card flat class="card-style pa-2" dark> |
616 | <v-layout> | 616 | <v-layout> |
617 | <v-flex xs12> | 617 | <v-flex xs12> |
618 | <label class="title text-xs-center">Add Course Details</label> | 618 | <label class="title text-xs-center">Add Course Details</label> |
619 | <v-icon | 619 | <v-icon |
620 | size="24" | 620 | size="24" |
621 | class="right" | 621 | class="right" |
622 | @click="addCourseDetailDialog = false; clear() ; trigger = 'reset' ; emptyPdf = 'reset' " | 622 | @click="addCourseDetailDialog = false; clear() ; trigger = 'reset' ; emptyPdf = 'reset' " |
623 | >cancel</v-icon> | 623 | >cancel</v-icon> |
624 | </v-flex> | 624 | </v-flex> |
625 | </v-layout> | 625 | </v-layout> |
626 | <v-form ref="form" v-model="valid" lazy-validation> | 626 | <v-form ref="form" v-model="valid" lazy-validation> |
627 | <v-container fluid> | 627 | <v-container fluid> |
628 | <v-flex xs12> | 628 | <v-flex xs12> |
629 | <v-layout> | 629 | <v-layout> |
630 | <v-flex xs4 class="pt-4 subheading"> | 630 | <v-flex xs4 class="pt-4 subheading"> |
631 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 631 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
632 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 632 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
633 | </v-flex> | 633 | </v-flex> |
634 | <v-flex xs8 sm8 md7 class="ml-3"> | 634 | <v-flex xs8 sm8 md7 class="ml-3"> |
635 | <v-select | 635 | <v-select |
636 | :items="addclass" | 636 | :items="addclass" |
637 | label="Select Class" | 637 | label="Select Class" |
638 | v-model="addCourseDetail.classId" | 638 | v-model="addCourseDetail.classId" |
639 | item-text="classNum" | 639 | item-text="classNum" |
640 | item-value="_id" | 640 | item-value="_id" |
641 | name="Select Class" | 641 | name="Select Class" |
642 | :rules="clsssRules" | 642 | :rules="clsssRules" |
643 | @change="getCourses(addCourseDetail.classId)" | 643 | @change="getCourses(addCourseDetail.classId)" |
644 | required | 644 | required |
645 | ></v-select> | 645 | ></v-select> |
646 | </v-flex> | 646 | </v-flex> |
647 | </v-layout> | 647 | </v-layout> |
648 | </v-flex> | 648 | </v-flex> |
649 | <v-flex xs12> | 649 | <v-flex xs12> |
650 | <v-layout> | 650 | <v-layout> |
651 | <v-flex xs4 class="pt-4 subheading"> | 651 | <v-flex xs4 class="pt-4 subheading"> |
652 | <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> | 652 | <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> |
653 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> | 653 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> |
654 | </v-flex> | 654 | </v-flex> |
655 | <v-flex xs8 sm8 md7 class="ml-3"> | 655 | <v-flex xs8 sm8 md7 class="ml-3"> |
656 | <v-select | 656 | <v-select |
657 | :items="courseData" | 657 | :items="courseData" |
658 | label="Select Course" | 658 | label="Select Course" |
659 | v-model="addCourseDetail.courseId" | 659 | v-model="addCourseDetail.courseId" |
660 | item-text="courseName" | 660 | item-text="courseName" |
661 | item-value="_id" | 661 | item-value="_id" |
662 | :rules="courseRules" | 662 | :rules="courseRules" |
663 | required | 663 | required |
664 | ></v-select> | 664 | ></v-select> |
665 | </v-flex> | 665 | </v-flex> |
666 | </v-layout> | 666 | </v-layout> |
667 | </v-flex> | 667 | </v-flex> |
668 | <v-flex xs12> | 668 | <v-flex xs12> |
669 | <v-layout> | 669 | <v-layout> |
670 | <v-flex xs4 class="pt-4 subheading"> | 670 | <v-flex xs4 class="pt-4 subheading"> |
671 | <label class="right">Chapter Name:</label> | 671 | <label class="right">Chapter Name:</label> |
672 | </v-flex> | 672 | </v-flex> |
673 | <v-flex xs8 sm8 md7 class="ml-3"> | 673 | <v-flex xs8 sm8 md7 class="ml-3"> |
674 | <v-text-field | 674 | <v-text-field |
675 | v-model="addCourseDetail.chapterName" | 675 | v-model="addCourseDetail.chapterName" |
676 | placeholder="fill your Title" | 676 | placeholder="fill your Title" |
677 | name="name" | 677 | name="name" |
678 | type="text" | 678 | type="text" |
679 | :rules="chapterNameRules" | 679 | :rules="chapterNameRules" |
680 | required | 680 | required |
681 | ></v-text-field> | 681 | ></v-text-field> |
682 | </v-flex> | 682 | </v-flex> |
683 | </v-layout> | 683 | </v-layout> |
684 | </v-flex> | 684 | </v-flex> |
685 | <!-- DESCRIPTION --> | 685 | <!-- DESCRIPTION --> |
686 | <v-flex xs12> | 686 | <v-flex xs12> |
687 | <v-layout> | 687 | <v-layout> |
688 | <v-flex xs4 class="pt-4 subheading"> | 688 | <v-flex xs4 class="pt-4 subheading"> |
689 | <label class="right">Description:</label> | 689 | <label class="right">Description:</label> |
690 | </v-flex> | 690 | </v-flex> |
691 | <v-flex xs8 sm8 md7 class="ml-3"> | 691 | <v-flex xs8 sm8 md7 class="ml-3"> |
692 | <v-text-field | 692 | <v-text-field |
693 | placeholder="fill your Description" | 693 | placeholder="fill your Description" |
694 | :rules="descriptionRules" | 694 | :rules="descriptionRules" |
695 | v-model="addCourseDetail.description" | 695 | v-model="addCourseDetail.description" |
696 | type="text" | 696 | type="text" |
697 | name="email" | 697 | name="email" |
698 | required | 698 | required |
699 | ></v-text-field> | 699 | ></v-text-field> |
700 | </v-flex> | 700 | </v-flex> |
701 | </v-layout> | 701 | </v-layout> |
702 | </v-flex> | 702 | </v-flex> |
703 | <!-- UPLOAD PPT --> | 703 | <!-- UPLOAD PPT --> |
704 | <!-- <v-flex xs12> | 704 | <!-- <v-flex xs12> |
705 | <v-layout> | 705 | <v-layout> |
706 | <v-flex xs4 class="pt-4 subheading"> | 706 | <v-flex xs4 class="pt-4 subheading"> |
707 | <label class="right">Upload PPT:</label> | 707 | <label class="right">Upload PPT:</label> |
708 | </v-flex> | 708 | </v-flex> |
709 | <v-flex xs8 sm8 md7 class="ml-3"> | 709 | <v-flex xs8 sm8 md7 class="ml-3"> |
710 | <UploadFiles | 710 | <UploadFiles |
711 | @fileSelected="fileSelected($event,'uploadPPT')" | 711 | @fileSelected="fileSelected($event,'uploadPPT')" |
712 | label="Add PPT" | 712 | label="Add PPT" |
713 | reference="newCoursePpt" | 713 | reference="newCoursePpt" |
714 | id="newCoursePptInput" | 714 | id="newCoursePptInput" |
715 | :trigger="trigger" | 715 | :trigger="trigger" |
716 | ></UploadFiles> | 716 | ></UploadFiles> |
717 | </v-flex> | 717 | </v-flex> |
718 | </v-layout> | 718 | </v-layout> |
719 | </v-flex>--> | 719 | </v-flex>--> |
720 | <!-- UPLOAD PDF --> | 720 | <!-- UPLOAD PDF --> |
721 | <v-flex xs12> | 721 | <v-flex xs12> |
722 | <v-layout> | 722 | <v-layout> |
723 | <v-flex xs4 class="pt-4 subheading"> | 723 | <v-flex xs4 class="pt-4 subheading"> |
724 | <label class="right">Upload PDF:</label> | 724 | <label class="right">Upload PDF:</label> |
725 | </v-flex> | 725 | </v-flex> |
726 | <v-flex xs8 sm8 md7 class="ml-3"> | 726 | <v-flex xs8 sm8 md7 class="ml-3"> |
727 | <UploadPdf | 727 | <UploadPdf |
728 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" | 728 | @pdfFileSelected="pdfFileSelected($event,'uploadPDF')" |
729 | label="Add PDF" | 729 | label="Add PDF" |
730 | reference="newCoursePdf" | 730 | reference="newCoursePdf" |
731 | id="newCoursePdfInput" | 731 | id="newCoursePdfInput" |
732 | :emptyPdf="emptyPdf" | 732 | :emptyPdf="emptyPdf" |
733 | ></UploadPdf> | 733 | ></UploadPdf> |
734 | </v-flex> | 734 | </v-flex> |
735 | </v-layout> | 735 | </v-layout> |
736 | </v-flex> | 736 | </v-flex> |
737 | <v-layout> | 737 | <v-layout> |
738 | <v-flex xs12> | 738 | <v-flex xs12> |
739 | <div v-for="(chapterPoints,index) in finds" :key="index"> | 739 | <div v-for="(chapterPoints,index) in finds" :key="index"> |
740 | <v-layout> | 740 | <v-layout> |
741 | <v-flex xs4 class="pt-4 subheading"> | 741 | <v-flex xs4 class="pt-4 subheading"> |
742 | <label class="right">Chapter Points:</label> | 742 | <label class="right">Chapter Points:</label> |
743 | </v-flex> | 743 | </v-flex> |
744 | <v-flex xs8 sm8 md6 class="ml-3"> | 744 | <v-flex xs8 sm8 md6 class="ml-3"> |
745 | <v-text-field | 745 | <v-text-field |
746 | placeholder="fill your Chapter Points" | 746 | placeholder="fill your Chapter Points" |
747 | v-model="chapterPoints.value" | 747 | v-model="chapterPoints.value" |
748 | type="text" | 748 | type="text" |
749 | required | 749 | required |
750 | ></v-text-field> | 750 | ></v-text-field> |
751 | </v-flex> | 751 | </v-flex> |
752 | <v-flex xs2 class="pt-4"> | 752 | <v-flex xs2 class="pt-4"> |
753 | <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> | 753 | <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> |
754 | <v-icon @click="addFind">add_circle</v-icon> | 754 | <v-icon @click="addFind">add_circle</v-icon> |
755 | </v-flex> | 755 | </v-flex> |
756 | </v-layout> | 756 | </v-layout> |
757 | </div> | 757 | </div> |
758 | </v-flex> | 758 | </v-flex> |
759 | </v-layout> | 759 | </v-layout> |
760 | <v-layout> | 760 | <v-layout> |
761 | <v-flex xs12 sm12> | 761 | <v-flex xs12 sm12> |
762 | <v-layout class="right"> | 762 | <v-layout class="right"> |
763 | <v-btn @click="clear();" round dark class="clear-button">Clear</v-btn> | 763 | <v-btn @click="clear();" round dark class="clear-button">Clear</v-btn> |
764 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | 764 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> |
765 | </v-layout> | 765 | </v-layout> |
766 | </v-flex> | 766 | </v-flex> |
767 | </v-layout> | 767 | </v-layout> |
768 | </v-container> | 768 | </v-container> |
769 | </v-form> | 769 | </v-form> |
770 | </v-card> | 770 | </v-card> |
771 | </v-dialog> | 771 | </v-dialog> |
772 | <v-snackbar | 772 | <v-snackbar |
773 | :timeout="timeout" | 773 | :timeout="timeout" |
774 | :top="y === 'top'" | 774 | :top="y === 'top'" |
775 | :right="x === 'right'" | 775 | :right="x === 'right'" |
776 | :vertical="mode === 'vertical'" | 776 | :vertical="mode === 'vertical'" |
777 | v-model="snackbar" | 777 | v-model="snackbar" |
778 | :color="color" | 778 | :color="color" |
779 | >{{ text }}</v-snackbar> | 779 | >{{ text }}</v-snackbar> |
780 | <div class="loader" v-if="showLoader"> | 780 | <div class="loader" v-if="showLoader"> |
781 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 781 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
782 | </div> | 782 | </div> |
783 | </v-container> | 783 | </v-container> |
784 | </template> | 784 | </template> |
785 | 785 | ||
786 | <script> | 786 | <script> |
787 | import http from "@/Services/http.js"; | 787 | import http from "@/Services/http.js"; |
788 | import UploadFiles from "@/pages/Common/UploadFiles.vue"; | 788 | import UploadFiles from "@/pages/Common/UploadFiles.vue"; |
789 | import UploadPdf from "@/pages/Common/UploadPdf.vue"; | 789 | import UploadPdf from "@/pages/Common/UploadPdf.vue"; |
790 | import AllApiCalls from "@/Services/AllApiCalls.js"; | 790 | import AllApiCalls from "@/Services/AllApiCalls.js"; |
791 | 791 | ||
792 | export default { | 792 | export default { |
793 | mixins: [AllApiCalls], | 793 | mixins: [AllApiCalls], |
794 | components: { | 794 | components: { |
795 | UploadFiles, | 795 | UploadFiles, |
796 | UploadPdf, | 796 | UploadPdf, |
797 | }, | 797 | }, |
798 | data: () => ({ | 798 | data: () => ({ |
799 | snackbar: false, | 799 | snackbar: false, |
800 | y: "top", | 800 | y: "top", |
801 | x: "right", | 801 | x: "right", |
802 | mode: "", | 802 | mode: "", |
803 | timeout: 3000, | 803 | timeout: 3000, |
804 | text: "", | 804 | text: "", |
805 | loading: false, | 805 | loading: false, |
806 | color: "", | 806 | color: "", |
807 | date: null, | 807 | date: null, |
808 | search: "", | 808 | search: "", |
809 | show: true, | 809 | show: true, |
810 | addCourseDetailDialog: false, | 810 | addCourseDetailDialog: false, |
811 | showSearch: false, | 811 | showSearch: false, |
812 | showLoader: false, | 812 | showLoader: false, |
813 | editCourseDetailDialog: false, | 813 | editCourseDetailDialog: false, |
814 | editChapterDetailDialog: false, | 814 | editChapterDetailDialog: false, |
815 | viewProfileGallery: false, | 815 | viewProfileGallery: false, |
816 | valid: true, | 816 | valid: true, |
817 | editLoading: false, | 817 | editLoading: false, |
818 | addclass: [], | 818 | addclass: [], |
819 | courseData: [], | 819 | courseData: [], |
820 | addSection: [], | 820 | addSection: [], |
821 | getCourse: {}, | 821 | getCourse: {}, |
822 | finds: [{ value: "" }], | 822 | finds: [{ value: "" }], |
823 | findsChapterPoint: [{ value: "" }], | 823 | findsChapterPoint: [{ value: "" }], |
824 | updates: [], | 824 | updates: [], |
825 | youTubeLink: {}, | 825 | youTubeLink: {}, |
826 | addCourseDetail: { | 826 | addCourseDetail: { |
827 | chapters: [ | 827 | chapters: [ |
828 | { | 828 | { |
829 | chapterName: "", | 829 | chapterName: "", |
830 | description: "", | 830 | description: "", |
831 | chapterPoints: [], | 831 | chapterPoints: [], |
832 | }, | 832 | }, |
833 | ], | 833 | ], |
834 | }, | 834 | }, |
835 | chapters: [], | 835 | chapters: [], |
836 | pagination: { | 836 | pagination: { |
837 | rowsPerPage: 10, | 837 | rowsPerPage: 10, |
838 | }, | 838 | }, |
839 | editFiles: [], | 839 | editFiles: [], |
840 | files: [], | 840 | files: [], |
841 | courseData: [], | 841 | courseData: [], |
842 | token: "", | 842 | token: "", |
843 | courseId: "", | 843 | courseId: "", |
844 | clsssRules: [(v) => !!v || " Class is required"], | 844 | clsssRules: [(v) => !!v || " Class is required"], |
845 | courseRules: [(v) => !!v || " Course is required"], | 845 | courseRules: [(v) => !!v || " Course is required"], |
846 | chapterNameRules: [(v) => !!v || " Tilte is required"], | 846 | chapterNameRules: [(v) => !!v || " Tilte is required"], |
847 | descriptionRules: [(v) => !!v || " Description is required"], | 847 | descriptionRules: [(v) => !!v || " Description is required"], |
848 | headers: [ | 848 | headers: [ |
849 | { | 849 | { |
850 | align: "", | 850 | align: "", |
851 | text: "No", | 851 | text: "No", |
852 | sortable: false, | 852 | sortable: false, |
853 | value: "index", | 853 | value: "index", |
854 | }, | 854 | }, |
855 | { | 855 | { |
856 | text: "Class Name", | 856 | text: "Class Name", |
857 | value: "classNum", | 857 | value: "classNum", |
858 | sortable: false, | 858 | sortable: false, |
859 | align: "center", | 859 | align: "center", |
860 | }, | 860 | }, |
861 | { | 861 | { |
862 | text: "Course Name", | 862 | text: "Course Name", |
863 | value: "courseName", | 863 | value: "courseName", |
864 | sortable: false, | 864 | sortable: false, |
865 | align: "center", | 865 | align: "center", |
866 | }, | 866 | }, |
867 | { text: "Action", value: "", sortable: false, align: "center" }, | 867 | { text: "Action", value: "", sortable: false, align: "center" }, |
868 | ], | 868 | ], |
869 | CourseDetailsList: [], | 869 | CourseDetailsList: [], |
870 | editedIndex: -1, | 870 | editedIndex: -1, |
871 | editedItem: {}, | 871 | editedItem: {}, |
872 | editedCourse: {}, | 872 | editedCourse: {}, |
873 | editChapter: { | 873 | editChapter: { |
874 | chapterPoints: [], | 874 | chapterPoints: [], |
875 | }, | 875 | }, |
876 | index: "", | 876 | index: "", |
877 | addChapterItem: {}, | 877 | addChapterItem: {}, |
878 | addChapterItemObj: {}, | 878 | addChapterItemObj: {}, |
879 | addChapterDialog: false, | 879 | addChapterDialog: false, |
880 | showData: false, | 880 | showData: false, |
881 | }), | 881 | }), |
882 | methods: { | 882 | methods: { |
883 | getCourses(classId) { | 883 | getCourses(classId) { |
884 | this.showLoader = true; | 884 | this.showLoader = true; |
885 | http() | 885 | http() |
886 | .get("/getCourseesList", { | 886 | .get("/getCourseesList", { |
887 | params: { | 887 | params: { |
888 | classId: classId, | 888 | classId: classId, |
889 | }, | 889 | }, |
890 | }) | 890 | }) |
891 | .then((response) => { | 891 | .then((response) => { |
892 | this.editChapter.courseId = ""; | 892 | this.editChapter.courseId = ""; |
893 | this.courseData = response.data.data; | 893 | this.courseData = response.data.data; |
894 | // console.log("this.courseData", this.courseData); | 894 | // console.log("this.courseData", this.courseData); |
895 | this.showLoader = false; | 895 | this.showLoader = false; |
896 | }) | 896 | }) |
897 | .catch((err) => { | 897 | .catch((err) => { |
898 | console.log("err====>", err); | 898 | console.log("err====>", err); |
899 | this.showLoader = false; | 899 | this.showLoader = false; |
900 | }); | 900 | }); |
901 | }, | 901 | }, |
902 | getCourseDetailsList() { | 902 | getCourseDetailsList() { |
903 | this.showLoader = true; | 903 | this.showLoader = true; |
904 | http() | 904 | http() |
905 | .get("/getParticularCourseDetail", { | 905 | .get("/getParticularCourseDetail", { |
906 | params: { | 906 | params: { |
907 | courseId: this.getCourse.courseId, | 907 | courseId: this.getCourse.courseId, |
908 | }, | 908 | }, |
909 | }) | 909 | }) |
910 | .then((response) => { | 910 | .then((response) => { |
911 | this.CourseDetailsList = response.data.data; | 911 | this.CourseDetailsList = response.data.data; |
912 | if (this.CourseDetailsList.length === 0) { | 912 | if (this.CourseDetailsList.length === 0) { |
913 | this.showLoader = false; | 913 | this.showLoader = false; |
914 | this.snackbar = true; | 914 | this.snackbar = true; |
915 | this.text = "Data not found!"; | 915 | this.text = "Data not found!"; |
916 | this.color = "error"; | 916 | this.color = "error"; |
917 | return; | 917 | return; |
918 | } | 918 | } |
919 | this.showData = true; | 919 | this.showData = true; |
920 | if (response.data.data[0]) { | 920 | if (response.data.data[0]) { |
921 | this.chapters = response.data.data[0].chapters; | 921 | this.chapters = response.data.data[0].chapters; |
922 | } | 922 | } |
923 | this.showLoader = false; | 923 | this.showLoader = false; |
924 | }) | 924 | }) |
925 | .catch((error) => { | 925 | .catch((error) => { |
926 | // console.log("err====>", err); | 926 | // console.log("err====>", err); |
927 | this.showLoader = false; | 927 | this.showLoader = false; |
928 | if (error.response.status === 401) { | 928 | if (error.response.status === 401) { |
929 | this.$router.replace({ path: "/" }); | 929 | this.$router.replace({ path: "/" }); |
930 | this.$store.dispatch("setToken", null); | 930 | this.$store.dispatch("setToken", null); |
931 | this.$store.dispatch("Id", null); | 931 | this.$store.dispatch("Id", null); |
932 | } | 932 | } |
933 | }); | 933 | }); |
934 | }, | 934 | }, |
935 | courseTableRow(id) { | 935 | courseTableRow(id) { |
936 | this.courseId = id; | 936 | this.courseId = id; |
937 | }, | 937 | }, |
938 | addChapters(item) { | 938 | addChapters(item) { |
939 | this.editedIndex = this.CourseDetailsList.indexOf(item); | 939 | this.editedIndex = this.CourseDetailsList.indexOf(item); |
940 | this.addChapterItemObj = Object.assign({}, item); | 940 | this.addChapterItemObj = Object.assign({}, item); |
941 | this.addChapterItem.courseDetailId = this.addChapterItemObj._id; | 941 | this.addChapterItem.courseDetailId = this.addChapterItemObj._id; |
942 | this.addChapterDialog = true; | 942 | this.addChapterDialog = true; |
943 | }, | 943 | }, |
944 | submitChapter() { | 944 | submitChapter() { |
945 | this.addChapterItem.chapterPoints = []; | 945 | this.addChapterItem.chapterPoints = []; |
946 | for (let i = 0; i < this.findsChapterPoint.length; i++) { | 946 | for (let i = 0; i < this.findsChapterPoint.length; i++) { |
947 | this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); | 947 | this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); |
948 | } | 948 | } |
949 | this.loading = true; | 949 | this.loading = true; |
950 | http() | 950 | http() |
951 | .put("/addChapters", this.addChapterItem) | 951 | .put("/addChapters", this.addChapterItem) |
952 | .then((response) => { | 952 | .then((response) => { |
953 | this.addChapterDialog = false; | 953 | this.addChapterDialog = false; |
954 | this.loading = false; | 954 | this.loading = false; |
955 | this.snackbar = true; | 955 | this.snackbar = true; |
956 | this.text = response.data.message; | 956 | this.text = response.data.message; |
957 | this.color = "green"; | 957 | this.color = "green"; |
958 | this.addChapterItem = {}; | 958 | this.addChapterItem = {}; |
959 | this.removeChapterPoint(); | 959 | this.removeChapterPoint(); |
960 | this.getCourseDetailsList(); | 960 | this.getCourseDetailsList(); |
961 | }) | 961 | }) |
962 | .catch((error) => { | 962 | .catch((error) => { |
963 | this.snackbar = true; | 963 | this.snackbar = true; |
964 | this.text = error.response.data.message; | 964 | this.text = error.response.data.message; |
965 | this.color = "error"; | 965 | this.color = "error"; |
966 | this.loading = false; | 966 | this.loading = false; |
967 | }); | 967 | }); |
968 | }, | 968 | }, |
969 | profile(item) { | 969 | profile(item) { |
970 | console.log("chaper - ", item); | 970 | // console.log("chaper - ", item); |
971 | this.editedIndex = this.chapters.indexOf(item); | 971 | this.editedIndex = this.chapters.indexOf(item); |
972 | this.editedItem = Object.assign({}, item); | 972 | this.editedItem = Object.assign({}, item); |
973 | this.viewProfileGallery = true; | 973 | this.viewProfileGallery = true; |
974 | }, | 974 | }, |
975 | editItem(item) { | 975 | editItem(item) { |
976 | this.editedIndex = this.CourseDetailsList.indexOf(item); | 976 | this.editedIndex = this.CourseDetailsList.indexOf(item); |
977 | this.editedCourse = Object.assign({}, item); | 977 | this.editedCourse = Object.assign({}, item); |
978 | this.editCourseDetailDialog = true; | 978 | this.editCourseDetailDialog = true; |
979 | }, | 979 | }, |
980 | editChapterItem(item) { | 980 | editChapterItem(item) { |
981 | this.editedIndex = this.chapters.indexOf(item); | 981 | this.editedIndex = this.chapters.indexOf(item); |
982 | this.editChapter = Object.assign({}, item); | 982 | this.editChapter = Object.assign({}, item); |
983 | this.updates = []; | 983 | this.updates = []; |
984 | for (let i = 0; i < this.editChapter.chapterPoints.length; i++) { | 984 | for (let i = 0; i < this.editChapter.chapterPoints.length; i++) { |
985 | this.updates.push({ value: this.editChapter.chapterPoints[i] }); | 985 | this.updates.push({ value: this.editChapter.chapterPoints[i] }); |
986 | } | 986 | } |
987 | this.editChapterDetailDialog = true; | 987 | this.editChapterDetailDialog = true; |
988 | }, | 988 | }, |
989 | deleteItem(item) { | 989 | deleteItem(item) { |
990 | let deleteGallery = { | 990 | let deleteGallery = { |
991 | courseDetailId: item._id, | 991 | courseDetailId: item._id, |
992 | }; | 992 | }; |
993 | http() | 993 | http() |
994 | .delete( | 994 | .delete( |
995 | "/deleteCourseDetail", | 995 | "/deleteCourseDetail", |
996 | confirm("Are you sure you want to delete this?") && { | 996 | confirm("Are you sure you want to delete this?") && { |
997 | params: deleteGallery, | 997 | params: deleteGallery, |
998 | headers: { | 998 | headers: { |
999 | Authorization: "Bearer " + this.token, | 999 | Authorization: "Bearer " + this.token, |
1000 | }, | 1000 | }, |
1001 | } | 1001 | } |
1002 | ) | 1002 | ) |
1003 | .then((response) => { | 1003 | .then((response) => { |
1004 | this.snackbar = true; | 1004 | this.snackbar = true; |
1005 | this.text = "Successfully delete Course Details"; | 1005 | this.text = "Successfully delete Course Details"; |
1006 | this.color = "green"; | 1006 | this.color = "green"; |
1007 | this.getCourseDetailsList(); | 1007 | this.getCourseDetailsList(); |
1008 | }) | 1008 | }) |
1009 | .catch((error) => { | 1009 | .catch((error) => { |
1010 | // console.log(error); | 1010 | // console.log(error); |
1011 | this.snackbar = true; | 1011 | this.snackbar = true; |
1012 | this.text = error.response.data.message; | 1012 | this.text = error.response.data.message; |
1013 | this.color = "error"; | 1013 | this.color = "error"; |
1014 | }); | 1014 | }); |
1015 | }, | 1015 | }, |
1016 | deleteChapters(item) { | 1016 | deleteChapters(item) { |
1017 | // console.log("item", item); | 1017 | // console.log("item", item); |
1018 | let deleteChapters = { | 1018 | let deleteChapters = { |
1019 | courseDetailId: this.courseId, | 1019 | courseDetailId: this.courseId, |
1020 | chapterId: item._id, | 1020 | chapterId: item._id, |
1021 | }; | 1021 | }; |
1022 | http() | 1022 | http() |
1023 | .put( | 1023 | .put( |
1024 | "/deleteChapters", | 1024 | "/deleteChapters", |
1025 | confirm("Are you sure you want to delete this?") && deleteChapters | 1025 | confirm("Are you sure you want to delete this?") && deleteChapters |
1026 | ) | 1026 | ) |
1027 | .then((response) => { | 1027 | .then((response) => { |
1028 | this.snackbar = true; | 1028 | this.snackbar = true; |
1029 | this.text = "Successfully delete Chapters"; | 1029 | this.text = "Successfully delete Chapters"; |
1030 | this.color = "green"; | 1030 | this.color = "green"; |
1031 | this.getCourseDetailsList(); | 1031 | this.getCourseDetailsList(); |
1032 | }) | 1032 | }) |
1033 | .catch((error) => { | 1033 | .catch((error) => { |
1034 | // console.log(error); | 1034 | // console.log(error); |
1035 | this.snackbar = true; | 1035 | this.snackbar = true; |
1036 | this.text = error.response.data.message; | 1036 | this.text = error.response.data.message; |
1037 | this.color = "error"; | 1037 | this.color = "error"; |
1038 | }); | 1038 | }); |
1039 | }, | 1039 | }, |
1040 | close() { | 1040 | close() { |
1041 | this.editCourseDetailDialog = false; | 1041 | this.editCourseDetailDialog = false; |
1042 | }, | 1042 | }, |
1043 | closeProfileGallery() { | 1043 | closeProfileGallery() { |
1044 | this.viewProfileGallery = false; | 1044 | this.viewProfileGallery = false; |
1045 | }, | 1045 | }, |
1046 | submit() { | 1046 | submit() { |
1047 | let chapters = []; | 1047 | let chapters = []; |
1048 | var chapterPoints = []; | 1048 | var chapterPoints = []; |
1049 | for (let i = 0; i < this.finds.length; i++) { | 1049 | for (let i = 0; i < this.finds.length; i++) { |
1050 | chapterPoints.push(this.finds[i].value); | 1050 | chapterPoints.push(this.finds[i].value); |
1051 | // console.log("this.finds[i].value", this.finds[i].value); | 1051 | // console.log("this.finds[i].value", this.finds[i].value); |
1052 | chapters = [ | 1052 | chapters = [ |
1053 | { | 1053 | { |
1054 | chapterName: this.addCourseDetail.chapterName, | 1054 | chapterName: this.addCourseDetail.chapterName, |
1055 | description: this.addCourseDetail.description, | 1055 | description: this.addCourseDetail.description, |
1056 | chapterPoints: chapterPoints, | 1056 | chapterPoints: chapterPoints, |
1057 | uploadPdf: this.pdfFile, | 1057 | uploadPdf: this.pdfFile, |
1058 | uploadPpt: this.pptFile, | 1058 | uploadPpt: this.pptFile, |
1059 | }, | 1059 | }, |
1060 | ]; | 1060 | ]; |
1061 | } | 1061 | } |
1062 | if (this.$refs.form.validate()) { | 1062 | if (this.$refs.form.validate()) { |
1063 | // console.log("this.addCourseDetail", this.addCourseDetail); | 1063 | // console.log("this.addCourseDetail", this.addCourseDetail); |
1064 | var courseDetailsData = { | 1064 | var courseDetailsData = { |
1065 | classId: this.addCourseDetail.classId, | 1065 | classId: this.addCourseDetail.classId, |
1066 | courseId: this.addCourseDetail.courseId, | 1066 | courseId: this.addCourseDetail.courseId, |
1067 | chapters: chapters, | 1067 | chapters: chapters, |
1068 | }; | 1068 | }; |
1069 | this.loading = true; | 1069 | this.loading = true; |
1070 | http() | 1070 | http() |
1071 | .post("/createCourseDetail", courseDetailsData) | 1071 | .post("/createCourseDetail", courseDetailsData) |
1072 | .then((response) => { | 1072 | .then((response) => { |
1073 | this.addCourseDetailDialog = false; | 1073 | this.addCourseDetailDialog = false; |
1074 | this.loading = false; | 1074 | this.loading = false; |
1075 | this.snackbar = true; | 1075 | this.snackbar = true; |
1076 | this.text = response.data.message; | 1076 | this.text = response.data.message; |
1077 | this.color = "green"; | 1077 | this.color = "green"; |
1078 | this.clear(); | 1078 | this.clear(); |
1079 | this.trigger = "reset"; | 1079 | this.trigger = "reset"; |
1080 | this.emptyPdf = "reset"; | 1080 | this.emptyPdf = "reset"; |
1081 | this.removeAddFind(); | 1081 | this.removeAddFind(); |
1082 | }) | 1082 | }) |
1083 | .catch((error) => { | 1083 | .catch((error) => { |
1084 | this.snackbar = true; | 1084 | this.snackbar = true; |
1085 | this.text = error.response.data.message; | 1085 | this.text = error.response.data.message; |
1086 | this.color = "error"; | 1086 | this.color = "error"; |
1087 | this.loading = false; | 1087 | this.loading = false; |
1088 | }); | 1088 | }); |
1089 | } | 1089 | } |
1090 | }, | 1090 | }, |
1091 | clear() { | 1091 | clear() { |
1092 | this.$refs.form.reset(); | 1092 | this.$refs.form.reset(); |
1093 | }, | 1093 | }, |
1094 | saveChapter() { | 1094 | saveChapter() { |
1095 | this.editedItem.courseDetailId = this.editedItem._id; | 1095 | this.editedItem.courseDetailId = this.editedItem._id; |
1096 | // console.log("this.updates", this.updates); | 1096 | // console.log("this.updates", this.updates); |
1097 | var chapterPoints = []; | 1097 | var chapterPoints = []; |
1098 | for (let i = 0; i < this.updates.length; i++) { | 1098 | for (let i = 0; i < this.updates.length; i++) { |
1099 | chapterPoints.push(this.updates[i].value); | 1099 | chapterPoints.push(this.updates[i].value); |
1100 | } | 1100 | } |
1101 | var updateData = { | 1101 | var updateData = { |
1102 | courseDetailId: this.courseId, | 1102 | courseDetailId: this.courseId, |
1103 | chapterId: this.editChapter._id, | 1103 | chapterId: this.editChapter._id, |
1104 | chapterName: this.editChapter.chapterName, | 1104 | chapterName: this.editChapter.chapterName, |
1105 | description: this.editChapter.description, | 1105 | description: this.editChapter.description, |
1106 | chapterPoints: chapterPoints, | 1106 | chapterPoints: chapterPoints, |
1107 | uploadPdf: this.pdfFile, | 1107 | uploadPdf: this.pdfFile, |
1108 | uploadPpt: this.pptFile, | 1108 | uploadPpt: this.pptFile, |
1109 | }; | 1109 | }; |
1110 | this.editLoading = true; | 1110 | this.editLoading = true; |
1111 | http() | 1111 | http() |
1112 | .put("/updateChapters", updateData) | 1112 | .put("/updateChapters", updateData) |
1113 | .then((response) => { | 1113 | .then((response) => { |
1114 | this.editChapterDetailDialog = false; | 1114 | this.editChapterDetailDialog = false; |
1115 | this.snackbar = true; | 1115 | this.snackbar = true; |
1116 | this.text = response.data.message; | 1116 | this.text = response.data.message; |
1117 | this.color = "green"; | 1117 | this.color = "green"; |
1118 | this.editLoading = false; | 1118 | this.editLoading = false; |
1119 | // this.removeUpdatePoints(); | 1119 | // this.removeUpdatePoints(); |
1120 | this.trigger = "reset"; | 1120 | this.trigger = "reset"; |
1121 | this.emptyPdf = "reset"; | 1121 | this.emptyPdf = "reset"; |
1122 | this.getCourseDetailsList(); | 1122 | this.getCourseDetailsList(); |
1123 | }) | 1123 | }) |
1124 | .catch((error) => { | 1124 | .catch((error) => { |
1125 | this.editLoading = false; | 1125 | this.editLoading = false; |
1126 | this.snackbar = true; | 1126 | this.snackbar = true; |
1127 | this.text = error.response.data.message; | 1127 | this.text = error.response.data.message; |
1128 | this.color = "error"; | 1128 | this.color = "error"; |
1129 | }); | 1129 | }); |
1130 | }, | 1130 | }, |
1131 | save() { | 1131 | save() { |
1132 | var updateData = { | 1132 | var updateData = { |
1133 | courseDetailId: this.editedCourse._id, | 1133 | courseDetailId: this.editedCourse._id, |
1134 | courseId: this.editedCourse.courseId._id, | 1134 | courseId: this.editedCourse.courseId._id, |
1135 | classId: this.editedCourse.classId._id, | 1135 | classId: this.editedCourse.classId._id, |
1136 | }; | 1136 | }; |
1137 | this.editLoading = true; | 1137 | this.editLoading = true; |
1138 | http() | 1138 | http() |
1139 | .put("/updateCourseDetail", updateData) | 1139 | .put("/updateCourseDetail", updateData) |
1140 | .then((response) => { | 1140 | .then((response) => { |
1141 | this.getCourseDetailsList(); | 1141 | this.getCourseDetailsList(); |
1142 | this.editCourseDetailDialog = false; | 1142 | this.editCourseDetailDialog = false; |
1143 | this.snackbar = true; | 1143 | this.snackbar = true; |
1144 | this.text = response.data.message; | 1144 | this.text = response.data.message; |
1145 | this.color = "green"; | 1145 | this.color = "green"; |
1146 | this.editLoading = false; | 1146 | this.editLoading = false; |
1147 | // this.editChapterPointName = ""; | 1147 | // this.editChapterPointName = ""; |
1148 | this.editFiles = []; | 1148 | this.editFiles = []; |
1149 | }) | 1149 | }) |
1150 | .catch((error) => { | 1150 | .catch((error) => { |
1151 | this.editLoading = false; | 1151 | this.editLoading = false; |
1152 | this.snackbar = true; | 1152 | this.snackbar = true; |
1153 | this.text = error.response.data.message; | 1153 | this.text = error.response.data.message; |
1154 | this.color = "error"; | 1154 | this.color = "error"; |
1155 | }); | 1155 | }); |
1156 | }, | 1156 | }, |
1157 | getAllClasses() { | 1157 | getAllClasses() { |
1158 | http() | 1158 | http() |
1159 | .get("/getClassesList", { | 1159 | .get("/getClassesList", { |
1160 | headers: { Authorization: "Bearer " + this.token }, | 1160 | headers: { Authorization: "Bearer " + this.token }, |
1161 | }) | 1161 | }) |
1162 | .then((response) => { | 1162 | .then((response) => { |
1163 | this.addclass = response.data.data; | 1163 | this.addclass = response.data.data; |
1164 | }) | 1164 | }) |
1165 | .catch((err) => { | 1165 | .catch((err) => { |
1166 | // console.log("err====>", err); | 1166 | // console.log("err====>", err); |
1167 | }); | 1167 | }); |
1168 | }, | 1168 | }, |
1169 | removeChapterPoint: function () { | 1169 | removeChapterPoint: function () { |
1170 | this.findsChapterPoint = [{ value: "" }]; | 1170 | this.findsChapterPoint = [{ value: "" }]; |
1171 | }, | 1171 | }, |
1172 | removeAddFind: function () { | 1172 | removeAddFind: function () { |
1173 | this.finds = [{ value: "" }]; | 1173 | this.finds = [{ value: "" }]; |
1174 | }, | 1174 | }, |
1175 | addFind: function () { | 1175 | addFind: function () { |
1176 | this.finds.push({ value: "" }); | 1176 | this.finds.push({ value: "" }); |
1177 | }, | 1177 | }, |
1178 | addChapterPoint: function () { | 1178 | addChapterPoint: function () { |
1179 | this.findsChapterPoint.push({ value: "" }); | 1179 | this.findsChapterPoint.push({ value: "" }); |
1180 | }, | 1180 | }, |
1181 | update: function () { | 1181 | update: function () { |
1182 | this.updates.push({ value: "" }); | 1182 | this.updates.push({ value: "" }); |
1183 | }, | 1183 | }, |
1184 | // removeUpdatePoints: function() { | 1184 | // removeUpdatePoints: function() { |
1185 | // this.updates = [{ value: "" }]; | 1185 | // this.updates = [{ value: "" }]; |
1186 | // }, | 1186 | // }, |
1187 | deleteFind: function (index) { | 1187 | deleteFind: function (index) { |
1188 | this.finds.splice(index, 1); | 1188 | this.finds.splice(index, 1); |
1189 | if (index === 0) this.addFind(); | 1189 | if (index === 0) this.addFind(); |
1190 | }, | 1190 | }, |
1191 | deleteChapterPoint: function (index) { | 1191 | deleteChapterPoint: function (index) { |
1192 | this.findsChapterPoint.splice(index, 1); | 1192 | this.findsChapterPoint.splice(index, 1); |
1193 | if (index === 0) this.addChapterPoint(); | 1193 | if (index === 0) this.addChapterPoint(); |
1194 | }, | 1194 | }, |
1195 | deleteUpdate: function (index) { | 1195 | deleteUpdate: function (index) { |
1196 | this.updates.splice(index, 1); | 1196 | this.updates.splice(index, 1); |
1197 | if (index === 0) this.update(); | 1197 | if (index === 0) this.update(); |
1198 | }, | 1198 | }, |
1199 | deleteUrl: function (index, youTubelinkId, id) { | 1199 | deleteUrl: function (index, youTubelinkId, id) { |
1200 | this.editChapter.chapterPoints.splice(index, 1); | 1200 | this.editChapter.chapterPoints.splice(index, 1); |
1201 | if (index === 0) this.update(); | 1201 | if (index === 0) this.update(); |
1202 | }, | 1202 | }, |
1203 | displaySearch() { | 1203 | displaySearch() { |
1204 | this.show = false; | 1204 | this.show = false; |
1205 | this.showSearch = true; | 1205 | this.showSearch = true; |
1206 | }, | 1206 | }, |
1207 | closeSearch() { | 1207 | closeSearch() { |
1208 | this.showSearch = false; | 1208 | this.showSearch = false; |
1209 | this.show = true; | 1209 | this.show = true; |
1210 | this.search = ""; | 1210 | this.search = ""; |
1211 | }, | 1211 | }, |
1212 | }, | 1212 | }, |
1213 | mounted() { | 1213 | mounted() { |
1214 | this.token = this.$store.state.token; | 1214 | this.token = this.$store.state.token; |
1215 | this.getAllClasses(); | 1215 | this.getAllClasses(); |
1216 | }, | 1216 | }, |
1217 | }; | 1217 | }; |
1218 | </script> | 1218 | </script> |
src/pages/Dashboard/LiveOnlineClass.vue
1 | <template> | 1 | <template> |
2 | <div class="body-color"> | 2 | <div class="body-color"> |
3 | <!-- LOADER --> | 3 | <!-- LOADER --> |
4 | <div class="loader" v-if="showLoader"> | 4 | <div class="loader" v-if="showLoader"> |
5 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 5 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
6 | </div> | 6 | </div> |
7 | 7 | ||
8 | <!-- SNACKBAR --> | 8 | <!-- SNACKBAR --> |
9 | <v-snackbar | 9 | <v-snackbar |
10 | :timeout="timeout" | 10 | :timeout="timeout" |
11 | :top="y === 'top'" | 11 | :top="y === 'top'" |
12 | :right="x === 'right'" | 12 | :right="x === 'right'" |
13 | :vertical="mode === 'vertical'" | 13 | :vertical="mode === 'vertical'" |
14 | v-model="snackbar" | 14 | v-model="snackbar" |
15 | :color="snackbarColor" | 15 | :color="snackbarColor" |
16 | > | 16 | > |
17 | {{ text }} | 17 | {{ text }} |
18 | <v-spacer></v-spacer> | 18 | <v-spacer></v-spacer> |
19 | <v-btn flat text @click="snackbar = false">X</v-btn> | 19 | <v-btn flat text @click="snackbar = false">X</v-btn> |
20 | </v-snackbar> | 20 | </v-snackbar> |
21 | 21 | ||
22 | <v-container grid-list-xl class="pt-0"> | 22 | <v-container grid-list-xl class="pt-0"> |
23 | <v-layout row wrap class="mt-1"> | 23 | <v-layout row wrap class="mt-1"> |
24 | <!-- if logged in user is parent --> | 24 | <!-- if logged in user is parent --> |
25 | <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' "> | 25 | <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' "> |
26 | <v-layout column> | 26 | <v-layout column> |
27 | <!-- HEADING --> | 27 | <!-- HEADING --> |
28 | <v-flex> | 28 | <v-flex> |
29 | <div | 29 | <div |
30 | class="title side-bar-color font-weight-bold" | 30 | class="title side-bar-color font-weight-bold" |
31 | >Live Online Classes - {{$route.query.chapterName}}</div> | 31 | >Live Online Classes - {{$route.query.chapterName}}</div> |
32 | <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> --> | 32 | <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> --> |
33 | <!-- <div | 33 | <!-- <div |
34 | class="subheading grey--text lighten-1" | 34 | class="subheading grey--text lighten-1" |
35 | >The session started at 1:00 there is 1 moderator</div>--> | 35 | >The session started at 1:00 there is 1 moderator</div>--> |
36 | </v-flex> | 36 | </v-flex> |
37 | 37 | ||
38 | <!-- JOIN OR END SESSION --> | 38 | <!-- JOIN OR END SESSION --> |
39 | <v-flex> | 39 | <v-flex> |
40 | <div> | 40 | <div> |
41 | <v-btn | 41 | <v-btn |
42 | round | 42 | round |
43 | class="open-dialog-button" | 43 | class="open-dialog-button" |
44 | dark | 44 | dark |
45 | v-if="studentBtn" | 45 | v-if="studentBtn" |
46 | @click="startChat();" | 46 | @click="showLoader = true;startChat();" |
47 | >{{studentBtn}}</v-btn> | 47 | >{{studentBtn}}</v-btn> |
48 | <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span> | 48 | <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span> |
49 | </div> | 49 | </div> |
50 | </v-flex> | 50 | </v-flex> |
51 | <v-flex id="studentClone"> | 51 | <v-flex id="studentClone"> |
52 | <div id="jitsi-container"></div> | 52 | <div id="jitsi-container"></div> |
53 | </v-flex> | 53 | </v-flex> |
54 | </v-layout> | 54 | </v-layout> |
55 | </v-flex> | 55 | </v-flex> |
56 | 56 | ||
57 | <!-- if logged in user is teacher --> | 57 | <!-- if logged in user is teacher --> |
58 | <v-flex xs12 sm12 md12 v-else> | 58 | <v-flex xs12 sm12 md12 v-else> |
59 | <v-layout column> | 59 | <v-layout column> |
60 | <!-- HEADING --> | 60 | <!-- HEADING --> |
61 | <v-flex> | 61 | <v-flex> |
62 | <div | 62 | <div |
63 | class="title side-bar-color font-weight-bold" | 63 | class="title side-bar-color font-weight-bold" |
64 | >Live Online Classes - {{$route.query.chapterName}}</div> | 64 | >Live Online Classes - {{$route.query.chapterName}}</div> |
65 | <!-- <div class="subheading grey--text lighten-1"></div> --> | 65 | <!-- <div class="subheading grey--text lighten-1"></div> --> |
66 | <!-- <div | 66 | <!-- <div |
67 | class="subheading grey--text lighten-1" | 67 | class="subheading grey--text lighten-1" |
68 | >The session started at 1:00 there is 1 moderator</div>--> | 68 | >The session started at 1:00 there is 1 moderator</div>--> |
69 | </v-flex> | 69 | </v-flex> |
70 | 70 | ||
71 | <!-- JOIN OR END SESSION --> | 71 | <!-- JOIN OR END SESSION --> |
72 | <v-flex> | 72 | <v-flex> |
73 | <div> | 73 | <div> |
74 | <v-btn round class="open-dialog-button" dark @click="startChat()">Start Session</v-btn> | 74 | <v-btn round class="open-dialog-button" dark @click="showLoader = true;startChat()">Start Session</v-btn> |
75 | </div> | 75 | </div> |
76 | </v-flex> | 76 | </v-flex> |
77 | <v-flex id="teacherClone"> | 77 | <v-flex id="teacherClone"> |
78 | <div id="jitsi-container"></div> | 78 | <div id="jitsi-container"></div> |
79 | </v-flex> | 79 | </v-flex> |
80 | </v-layout> | 80 | </v-layout> |
81 | </v-flex> | 81 | </v-flex> |
82 | 82 | ||
83 | <v-spacer></v-spacer> | 83 | <v-spacer></v-spacer> |
84 | 84 | ||
85 | <!-- COURSES SIDE BAR- positioned to the right of the page --> | 85 | <!-- COURSES SIDE BAR- positioned to the right of the page --> |
86 | <!-- <v-flex xs3> | 86 | <!-- <v-flex xs3> |
87 | <v-card class="elevation-0 card-border" height="100%"> | 87 | <v-card class="elevation-0 card-border" height="100%"> |
88 | <CoursesSideBar></CoursesSideBar> | 88 | <CoursesSideBar></CoursesSideBar> |
89 | </v-card> | 89 | </v-card> |
90 | </v-flex>--> | 90 | </v-flex>--> |
91 | </v-layout> | 91 | </v-layout> |
92 | </v-container> | 92 | </v-container> |
93 | </div> | 93 | </div> |
94 | </template> | 94 | </template> |
95 | <script> | 95 | <script> |
96 | import AllApiCalls from "@/Services/AllApiCalls.js"; | 96 | import AllApiCalls from "@/Services/AllApiCalls.js"; |
97 | import http from "@/Services/http.js"; | 97 | import http from "@/Services/http.js"; |
98 | import moment from "moment"; | 98 | import moment from "moment"; |
99 | import Meet from "@/pages/Meet/meet.vue"; | 99 | import Meet from "@/pages/Meet/meet.vue"; |
100 | import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; | 100 | import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; |
101 | export default { | 101 | export default { |
102 | mixins: [AllApiCalls], | 102 | mixins: [AllApiCalls], |
103 | components: { | 103 | components: { |
104 | CoursesSideBar, | 104 | CoursesSideBar, |
105 | }, | 105 | }, |
106 | data() { | 106 | data() { |
107 | return { | 107 | return { |
108 | startLiveSession: "", | 108 | startLiveSession: "", |
109 | studentBtn: "", | 109 | studentBtn: "", |
110 | 110 | ||
111 | // DATA TABLE | 111 | // DATA TABLE |
112 | search: "", | 112 | search: "", |
113 | pagination: { | 113 | pagination: { |
114 | rowsPerPage: 10, | 114 | rowsPerPage: 10, |
115 | }, | 115 | }, |
116 | liveOnlineHeaders: [ | 116 | liveOnlineHeaders: [ |
117 | { | 117 | { |
118 | text: "Playback", | 118 | text: "Playback", |
119 | value: "attachementUrl", | 119 | value: "attachementUrl", |
120 | sortable: false, | 120 | sortable: false, |
121 | align: "center", | 121 | align: "center", |
122 | }, | 122 | }, |
123 | { | 123 | { |
124 | text: "Meeting", | 124 | text: "Meeting", |
125 | align: "center", | 125 | align: "center", |
126 | sortable: false, | 126 | sortable: false, |
127 | value: "", | 127 | value: "", |
128 | }, | 128 | }, |
129 | { | 129 | { |
130 | text: "Recording", | 130 | text: "Recording", |
131 | value: "", | 131 | value: "", |
132 | sortable: false, | 132 | sortable: false, |
133 | align: "center", | 133 | align: "center", |
134 | }, | 134 | }, |
135 | { | 135 | { |
136 | text: "Description Preview", | 136 | text: "Description Preview", |
137 | value: "", | 137 | value: "", |
138 | sortable: false, | 138 | sortable: false, |
139 | align: "center", | 139 | align: "center", |
140 | }, | 140 | }, |
141 | { text: "Date", value: "", sortable: false, align: "center" }, | 141 | { text: "Date", value: "", sortable: false, align: "center" }, |
142 | { text: "Duration", value: "", sortable: false, align: "center" }, | 142 | { text: "Duration", value: "", sortable: false, align: "center" }, |
143 | { text: "Toolbar", value: "", sortable: false, align: "center" }, | 143 | { text: "Toolbar", value: "", sortable: false, align: "center" }, |
144 | ], | 144 | ], |
145 | liveOnlineItems: [], | 145 | liveOnlineItems: [], |
146 | 146 | ||
147 | // JITSI CONTAINER | 147 | // JITSI CONTAINER |
148 | liveLink: "", | 148 | liveLink: "", |
149 | token: "", | 149 | token: "", |
150 | selectStudents: {}, | 150 | selectStudents: {}, |
151 | classRules: [(v) => !!v || " Class Name is required"], | 151 | classRules: [(v) => !!v || " Class Name is required"], |
152 | sectionRules: [(v) => !!v || " Section Name is required"], | 152 | sectionRules: [(v) => !!v || " Section Name is required"], |
153 | addclass: [], | 153 | addclass: [], |
154 | addSection: [], | 154 | addSection: [], |
155 | loading: false, | 155 | loading: false, |
156 | room: "", | 156 | room: "", |
157 | username: "", | 157 | username: "", |
158 | roomPassword: "", | 158 | roomPassword: "", |
159 | counter: 0, | 159 | counter: 0, |
160 | }; | 160 | }; |
161 | }, | 161 | }, |
162 | methods: { | 162 | methods: { |
163 | async startChat() { | 163 | async startChat() { |
164 | if (this.$store.state.role === "PARENT") { | 164 | if (this.$store.state.role === "PARENT") { |
165 | if (this.counter == 0) { | 165 | if (this.counter == 0) { |
166 | console.log("enter start chat"); | 166 | console.log("enter start chat"); |
167 | this.startConference(); | 167 | this.startConference(); |
168 | this.counter += 1; | 168 | this.counter += 1; |
169 | } | 169 | } |
170 | } | 170 | } |
171 | if (this.$store.state.role === "TEACHER") { | 171 | if (this.$store.state.role === "TEACHER") { |
172 | if (this.counter == 0) { | 172 | if (this.counter == 0) { |
173 | this.createRoom(); | 173 | this.createRoom(); |
174 | this.counter += 1; | 174 | this.counter += 1; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | }, | 177 | }, |
178 | // JITSI CONTAINER | 178 | // JITSI CONTAINER |
179 | startConference() { | 179 | startConference() { |
180 | console.log("yes session started"); | 180 | console.log("yes session started"); |
181 | var _this = this; | 181 | var _this = this; |
182 | try { | 182 | try { |
183 | const domain = "meet.intrack.in"; | 183 | const domain = "meet.intrack.in"; |
184 | const options = { | 184 | const options = { |
185 | audioInput: "<deviceLabel>", | 185 | audioInput: "<deviceLabel>", |
186 | audioOutput: "<deviceLabel>", | 186 | audioOutput: "<deviceLabel>", |
187 | videoInput: "<deviceLabel>", | 187 | videoInput: "<deviceLabel>", |
188 | prejoinPageEnabled: false, | 188 | prejoinPageEnabled: false, |
189 | roomName: this.room, | 189 | roomName: this.room, |
190 | height: 500, | 190 | height: 500, |
191 | parentNode: document.getElementById("jitsi-container"), | 191 | parentNode: document.getElementById("jitsi-container"), |
192 | interfaceConfigOverwrite: { | 192 | interfaceConfigOverwrite: { |
193 | filmStripOnly: false, | 193 | filmStripOnly: false, |
194 | SHOW_PROMOTIONAL_CLOSE_PAGE: false, | 194 | SHOW_PROMOTIONAL_CLOSE_PAGE: false, |
195 | SHOW_POWERED_BY: false, | 195 | SHOW_POWERED_BY: false, |
196 | SHOW_JITSI_WATERMARK: false, | 196 | SHOW_JITSI_WATERMARK: false, |
197 | TOOLBAR_BUTTONS: [ | 197 | TOOLBAR_BUTTONS: [ |
198 | "microphone", | 198 | "microphone", |
199 | "camera", | 199 | "camera", |
200 | "closedcaptions", | 200 | "closedcaptions", |
201 | "desktop", | 201 | "desktop", |
202 | "fullscreen", | 202 | "fullscreen", |
203 | "fodeviceselection", | 203 | "fodeviceselection", |
204 | "hangup", | 204 | "hangup", |
205 | "profile", | 205 | "profile", |
206 | "info", | 206 | "info", |
207 | "chat", | 207 | "chat", |
208 | "recording", | 208 | "recording", |
209 | "livestreaming", | 209 | "livestreaming", |
210 | "etherpad", | 210 | "etherpad", |
211 | "sharedvideo", | 211 | "sharedvideo", |
212 | "settings", | 212 | "settings", |
213 | "raisehand", | 213 | "raisehand", |
214 | "videoquality", | 214 | "videoquality", |
215 | "filmstrip", | 215 | "filmstrip", |
216 | "invite", | 216 | "invite", |
217 | "feedback", | 217 | "feedback", |
218 | "stats", | 218 | "stats", |
219 | "shortcuts", | 219 | "shortcuts", |
220 | "tileview", | 220 | "tileview", |
221 | ], | 221 | ], |
222 | }, | 222 | }, |
223 | configOverwrite: { | 223 | configOverwrite: { |
224 | disableSimulcast: false, | 224 | disableSimulcast: false, |
225 | }, | 225 | }, |
226 | teacherName: "", | 226 | teacherName: "", |
227 | romm: "", | 227 | romm: "", |
228 | }; | 228 | }; |
229 | _this.api = new JitsiMeetExternalAPI(domain, options); | 229 | _this.api = new JitsiMeetExternalAPI(domain, options); |
230 | console.log("this.api ", this.api); | 230 | console.log("this.api ", this.api); |
231 | _this.api.addEventListener("videoConferenceJoined", () => { | 231 | _this.api.addEventListener("videoConferenceJoined", () => { |
232 | console.log("Local User Joined"); | 232 | console.log("Local User Joined"); |
233 | 233 | ||
234 | _this.api.executeCommand("displayName", _this.username); | 234 | _this.api.executeCommand("displayName", _this.username); |
235 | _this.api.executeCommand("password", this_.roomPassword); | 235 | _this.api.executeCommand("password", this_.roomPassword); |
236 | }); | ||
236 | }); | 237 | _this.api.on("readyToClose", () => { |
237 | _this.api.on("readyToClose", () => { | 238 | this.$router.push({ name: "Refresh" }); |
238 | this.$router.push({ name: "Refresh" }); | 239 | }); |
239 | }); | 240 | } catch (error) { |
240 | } catch (error) { | 241 | console.error("Failed to load Jitsi API", error); |
241 | console.error("Failed to load Jitsi API", error); | 242 | } |
242 | } | 243 | }, |
243 | }, | 244 | openRoom() { |
244 | openRoom() { | 245 | // verify the JitsiMeetExternalAPI constructor is added to the global.. |
245 | // verify the JitsiMeetExternalAPI constructor is added to the global.. | 246 | // if (this.teacherName != "" || this.room != "") { |
246 | // if (this.teacherName != "" || this.room != "") { | 247 | // if (window.JitsiMeetExternalAPI) { |
247 | // if (window.JitsiMeetExternalAPI) { | 248 | // // var person = prompt("Please enter your name:", "Rabie"); |
248 | // // var person = prompt("Please enter your name:", "Rabie"); | 249 | // if (person != null || person != "") this.username = this.teacherName; |
249 | // if (person != null || person != "") this.username = this.teacherName; | 250 | // var room = prompt("Please enter your room:", "Test Room"); |
250 | // var room = prompt("Please enter your room:", "Test Room"); | 251 | // if (room != null || room != "") this.room = this.room; |
251 | // if (room != null || room != "") this.room = this.room; | 252 | // this.startConference(); |
252 | // this.startConference(); | 253 | // } else alert("Jitsi Meet API script not loaded"); |
253 | // } else alert("Jitsi Meet API script not loaded"); | 254 | // } |
254 | // } | 255 | }, |
255 | }, | 256 | |
256 | 257 | createRoom(classId) { | |
257 | createRoom(classId) { | 258 | this.showLoader = true; |
258 | this.showLoader = true; | 259 | var classId = { |
259 | var classId = { | 260 | classId: classId, |
260 | classId: classId, | 261 | }; |
261 | }; | 262 | http() |
262 | http() | 263 | .post("/createLiveClasses", { |
263 | .post("/createLiveClasses", { | 264 | classId: this.$route.query.classId, |
264 | classId: this.$route.query.classId, | 265 | courseId: this.$route.query.courseId, |
265 | courseId: this.$route.query.courseId, | 266 | chapterId: this.$route.query.chapterId, |
266 | chapterId: this.$route.query.chapterId, | 267 | }) |
267 | }) | 268 | .then((response) => { |
268 | .then((response) => { | 269 | // this.addSection = response.data.data; |
269 | // this.addSection = response.data.data; | 270 | console.log("CREATE___ROOOM", response.data); |
270 | console.log("CREATE___ROOOM", response.data); | 271 | var room = response.data.data.roomName; |
271 | var room = response.data.data.roomName; | 272 | var username = localStorage.getItem("teacherName") |
272 | var username = localStorage.getItem("teacherName") | 273 | var roomPassword = response.data.data.password; |
273 | var roomPassword = response.data.data.password; | 274 | console.log( |
274 | console.log( | 275 | "room", |
275 | "room", | 276 | room, |
276 | room, | 277 | "username", |
277 | "username", | 278 | username, |
278 | username, | 279 | "roomPassword", |
279 | "roomPassword", | 280 | roomPassword |
280 | roomPassword | 281 | ); |
281 | ); | 282 | var this_ = this; |
282 | var this_ = this; | 283 | if (username != "" || room != "") { |
283 | if (username != "" || room != "") { | 284 | if (window.JitsiMeetExternalAPI) { |
284 | if (window.JitsiMeetExternalAPI) { | 285 | // var person = prompt("Please enter your name:", "Rabie"); |
285 | // var person = prompt("Please enter your name:", "Rabie"); | 286 | if (username != null || username != "") { |
286 | if (username != null || username != "") { | 287 | this_.username = username; |
287 | this_.username = username; | 288 | } |
288 | } | 289 | // var room = prompt("Please enter your room:", "Test Room"); |
289 | // var room = prompt("Please enter your room:", "Test Room"); | 290 | if (room != null || room != "") { |
290 | if (room != null || room != "") { | 291 | this_.room = room; |
291 | this_.room = room; | 292 | } |
292 | } | 293 | if (roomPassword != null || roomPassword != "") { |
293 | if (roomPassword != null || roomPassword != "") { | 294 | this_.password = roomPassword; |
294 | this_.password = roomPassword; | 295 | } |
295 | } | 296 | } else alert("Jitsi Meet API script not loaded"); |
296 | } else alert("Jitsi Meet API script not loaded"); | 297 | this_.startConference(); |
297 | this_.startConference(); | 298 | } |
298 | } | 299 | this.showLoader = false; |
299 | this.showLoader = false; | 300 | }) |
300 | }) | 301 | .catch((err) => { |
301 | .catch((err) => { | 302 | this.showLoader = false; |
302 | this.showLoader = false; | 303 | }); |
303 | }); | 304 | }, |
304 | }, | 305 | async studentClasses() { |
305 | async studentClasses() { | 306 | this.liveLink = ""; |
306 | this.liveLink = ""; | 307 | this.room = ""; |
307 | this.room = ""; | 308 | this.username = ""; |
308 | this.username = ""; | 309 | this.roomPassword = ""; |
309 | this.roomPassword = ""; | 310 | /* getLiveClassesesList - To up date line under heading*/ |
310 | /* getLiveClassesesList - To up date line under heading*/ | 311 | let response = await this.getLiveClassesesList({ |
311 | let response = await this.getLiveClassesesList({ | 312 | classId: this.$route.query.classId, |
312 | classId: this.$route.query.classId, | 313 | courseId: this.$route.query.courseId, |
313 | courseId: this.$route.query.courseId, | 314 | chapterId: this.$route.query.chapterId, |
314 | chapterId: this.$route.query.chapterId, | 315 | }); |
315 | }); | 316 | console.log("response getLiveClassesesList- ", response); |
316 | console.log("response getLiveClassesesList- ", response); | 317 | |
317 | 318 | /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ | |
318 | /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ | 319 | if (response.data.data[0].sessionStatus == "ENDED") { |
319 | if (response.data.data[0].sessionStatus == "ENDED") { | 320 | // this.startLiveSession = "Start Session"; |
320 | // this.startLiveSession = "Start Session"; | 321 | this.studentBtn = ""; |
321 | this.studentBtn = ""; | 322 | } |
322 | } | 323 | if (response.data.data[0].sessionStatus == "STARTED") { |
323 | if (response.data.data[0].sessionStatus == "STARTED") { | 324 | // this.startLiveSession = "Join Session"; |
324 | // this.startLiveSession = "Join Session"; | 325 | this.studentBtn = "Join Session"; |
325 | this.studentBtn = "Join Session"; | 326 | } |
326 | } | 327 | if (response.data.data.length == 0) { |
327 | if (response.data.data.length == 0) { | 328 | this.startLiveSession = "Start Session"; |
328 | this.startLiveSession = "Start Session"; | 329 | this.studentBtn = ""; |
329 | this.studentBtn = ""; | 330 | } else { |
330 | } else { | 331 | this.liveLink = response.data.data[0].link; |
331 | this.liveLink = response.data.data[0].link; | 332 | var room = response.data.data[0].roomName; |
332 | var room = response.data.data[0].roomName; | 333 | var username = this.currentUser; |
333 | var username = this.currentUser; | 334 | var roomPassword = response.data.data[0].password; |
334 | var roomPassword = response.data.data[0].password; | 335 | var this_ = this; |
335 | var this_ = this; | 336 | // console.log(this.room, this.roomPassword, this.username); |
336 | // console.log(this.room, this.roomPassword, this.username); | 337 | |
337 | 338 | if (username != "" || room != "") { | |
338 | if (username != "" || room != "") { | 339 | if (window.JitsiMeetExternalAPI) { |
339 | if (window.JitsiMeetExternalAPI) { | 340 | // var person = prompt("Please enter your name:", "Rabie"); |
340 | // var person = prompt("Please enter your name:", "Rabie"); | 341 | if (username != null || username != "") { |
341 | if (username != null || username != "") { | 342 | this_.username = username; |
342 | this_.username = username; | 343 | } |
343 | } | 344 | if (roomPassword != null || roomPassword != "") { |
344 | if (roomPassword != null || roomPassword != "") { | 345 | this_.roomPassword = roomPassword; |
345 | this_.roomPassword = roomPassword; | 346 | } |
346 | } | 347 | // var room = prompt("Please enter your room:", "Test Room"); |
347 | // var room = prompt("Please enter your room:", "Test Room"); | 348 | if (room != null || room != "") { |
348 | if (room != null || room != "") { | 349 | this_.room = room; |
349 | this_.room = room; | 350 | } |
350 | } | 351 | // this.startConference(); |
351 | // this.startConference(); | 352 | } |
352 | } | 353 | } |
353 | } | 354 | } |
354 | } | 355 | }, |
355 | }, | 356 | }, |
356 | }, | 357 | |
357 | 358 | async created() { | |
358 | async created() { | 359 | console.log( |
359 | console.log( | 360 | "this.$store.state.studentsData", |
360 | "this.$store.state.studentsData", | 361 | this.$store.state.studentsData[0].name |
361 | this.$store.state.studentsData[0].name | 362 | ); |
362 | ); | 363 | this.currentUser = localStorage.getItem("studentName"); |
363 | this.currentUser = localStorage.getItem("studentName"); | 364 | this.token = this.$store.state.token; |
364 | this.token = this.$store.state.token; | 365 | if (this.$store.state.role === "PARENT") { |
365 | if (this.$store.state.role === "PARENT") { | 366 | await this.studentClasses(); |
366 | await this.studentClasses(); | 367 | } |
367 | } | 368 | |
368 | 369 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ | |
369 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ | 370 | if (this.$store.state.role === "PARENT") { |
370 | if (this.$store.state.role === "PARENT") { | 371 | await this.getStudentCourses({ |
371 | await this.getStudentCourses({ | 372 | classId: localStorage.getItem("parentClassId"), |
372 | classId: localStorage.getItem("parentClassId"), | 373 | studentId: localStorage.getItem("parentStudentId"), |
373 | studentId: localStorage.getItem("parentStudentId"), | 374 | }); |
374 | }); | 375 | } |
375 | } | 376 | }, |
376 | }, | 377 | }; |
377 | }; | 378 | </script> |
378 | </script> | 379 | <style scoped> |
379 | <style scoped> | 380 | .side-bar-color { |
380 | .side-bar-color { | 381 | color: #827bfa !important; |
381 | color: #827bfa !important; | 382 | /* border-top-right-radius: 74px !important; */ |
382 | /* border-top-right-radius: 74px !important; */ | 383 | } |
383 | } | 384 | .card-border { |
384 | .card-border { | 385 | border: 1px #bdbdbd solid; |
385 | border: 1px #bdbdbd solid; | 386 | border-radius: 3px; |
386 | border-radius: 3px; | 387 | } |
387 | } | 388 | .reply-desc { |
388 | .reply-desc { | 389 | border: 1px solid #f2f2f2; |
389 | border: 1px solid #f2f2f2; | 390 | } |
390 | } | 391 | .open-dialog-button { |
391 | .open-dialog-button { | 392 | background: #827bfa !important; |
392 | background: #827bfa !important; | 393 | border-color: #827bfa !important; |
393 | border-color: #827bfa !important; | 394 | text-transform: none !important; |
394 | text-transform: none !important; | 395 | } |
395 | } | 396 | |
396 | 397 | .reply-btn { | |
397 | .reply-btn { | 398 | background: #feb83c !important; |
398 | background: #feb83c !important; | 399 | border-color: #feb83c !important; |
399 | border-color: #feb83c !important; | 400 | text-transform: none !important; |
400 | text-transform: none !important; | 401 | -webkit-box-shadow: none !important; |
401 | -webkit-box-shadow: none !important; | 402 | box-shadow: none !important; |
402 | box-shadow: none !important; | 403 | } |
403 | } | 404 | #jitsi-container { |
404 | #jitsi-container { | 405 | height: 100vh; |
405 | height: 100vh; | 406 | } |
406 | } | 407 | </style> |
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 | 51 | ||
52 | <!-- LOADER --> | 52 | <!-- LOADER --> |
53 | <div class="loader" v-if="showLoader"> | 53 | <div class="loader" v-if="showLoader"> |
54 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 54 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
55 | </div> | 55 | </div> |
56 | 56 | ||
57 | <!-- SNACKBAR --> | 57 | <!-- SNACKBAR --> |
58 | <v-snackbar | 58 | <v-snackbar |
59 | :timeout="timeout" | 59 | :timeout="timeout" |
60 | :top="y === 'top'" | 60 | :top="y === 'top'" |
61 | :right="x === 'right'" | 61 | :right="x === 'right'" |
62 | :vertical="mode === 'vertical'" | 62 | :vertical="mode === 'vertical'" |
63 | v-model="snackbar" | 63 | v-model="snackbar" |
64 | :color="snackbarColor" | 64 | :color="snackbarColor" |
65 | > | 65 | > |
66 | {{ text }} | 66 | {{ text }} |
67 | <v-spacer></v-spacer> | 67 | <v-spacer></v-spacer> |
68 | <v-btn flat text @click="snackbar = false">X</v-btn> | 68 | <v-btn flat text @click="snackbar = false">X</v-btn> |
69 | </v-snackbar> | 69 | </v-snackbar> |
70 | 70 | ||
71 | <!-- DIALOG BOX EVENT DETAILS --> | 71 | <!-- DIALOG BOX EVENT DETAILS --> |
72 | <v-dialog v-model="viewEventDetails" max-width="500"> | 72 | <v-dialog v-model="viewEventDetails" max-width="500"> |
73 | <v-card flat class="card-style pa-2" dark> | 73 | <v-card flat class="card-style pa-2" dark> |
74 | <!-- TITLE --> | 74 | <!-- TITLE --> |
75 | <v-layout> | 75 | <v-layout> |
76 | <v-layout> | 76 | <v-layout> |
77 | <v-flex xs12> | 77 | <v-flex xs12> |
78 | <label class="title text-xs-center">{{particularEvent.title}}</label> | 78 | <label class="title text-xs-center">{{particularEvent.title}}</label> |
79 | <v-icon size="24" class="right" @click="viewEventDetails = false">cancel</v-icon> | 79 | <v-icon size="24" class="right" @click="viewEventDetails = false">cancel</v-icon> |
80 | </v-flex> | 80 | </v-flex> |
81 | </v-layout> | 81 | </v-layout> |
82 | </v-layout> | 82 | </v-layout> |
83 | 83 | ||
84 | <v-card-text> | 84 | <v-card-text> |
85 | <v-list dark class="card-style"> | 85 | <v-list dark class="card-style"> |
86 | <v-list-tile> | 86 | <v-list-tile> |
87 | <v-list-tile-content> | 87 | <v-list-tile-content> |
88 | <v-list-tile-title>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</v-list-tile-title> | 88 | <v-list-tile-title>Date Of Event : {{moment(particularEvent.dateOfEvent).format("DD MMMM, YYYY")}}</v-list-tile-title> |
89 | </v-list-tile-content> | 89 | </v-list-tile-content> |
90 | </v-list-tile> | 90 | </v-list-tile> |
91 | <v-list-tile> | 91 | <v-list-tile> |
92 | <v-list-tile-content> | 92 | <v-list-tile-content> |
93 | <v-list-tile-title>Start Time : {{particularEvent.startTime}}</v-list-tile-title> | 93 | <v-list-tile-title>Start Time : {{particularEvent.startTime}}</v-list-tile-title> |
94 | </v-list-tile-content> | 94 | </v-list-tile-content> |
95 | </v-list-tile> | 95 | </v-list-tile> |
96 | <v-list-tile> | 96 | <v-list-tile> |
97 | <v-list-tile-content> | 97 | <v-list-tile-content> |
98 | <v-list-tile-title>Duration : {{particularEvent.duration}}</v-list-tile-title> | 98 | <v-list-tile-title>Duration : {{particularEvent.duration}}</v-list-tile-title> |
99 | </v-list-tile-content> | 99 | </v-list-tile-content> |
100 | </v-list-tile> | 100 | </v-list-tile> |
101 | <v-list-tile> | 101 | <v-list-tile> |
102 | <v-list-tile-content> | 102 | <v-list-tile-content> |
103 | <v-list-tile-title> | 103 | <v-list-tile-title> |
104 | Link : | 104 | Link : |
105 | <a :href="particularEvent.link">{{particularEvent.link}}</a> | 105 | <a :href="particularEvent.link">{{particularEvent.link}}</a> |
106 | </v-list-tile-title> | 106 | </v-list-tile-title> |
107 | </v-list-tile-content> | 107 | </v-list-tile-content> |
108 | </v-list-tile> | 108 | </v-list-tile> |
109 | </v-list> | 109 | </v-list> |
110 | </v-card-text> | 110 | </v-card-text> |
111 | </v-card> | 111 | </v-card> |
112 | </v-dialog> | 112 | </v-dialog> |
113 | 113 | ||
114 | <v-layout wrap row> | 114 | <v-layout wrap row> |
115 | <v-flex xs12 sm12 md9> | 115 | <v-flex xs12 sm12 md9> |
116 | <v-container fluid grid-list-xl> | 116 | <v-container fluid grid-list-xl> |
117 | <!-- ***** Total Students ***** --> | 117 | <!-- ***** Total Students ***** --> |
118 | <v-layout wrap class v-if="$store.state.role != 'PARENT' "> | 118 | <v-layout wrap class v-if="$store.state.role != 'PARENT' "> |
119 | <v-flex xs12 sm12 md3> | 119 | <v-flex xs12 sm12 md3> |
120 | <router-link :to="{ name:'Students' }"> | 120 | <router-link :to="{ name:'Students' }"> |
121 | <v-card class="card pink-bgcolor"> | 121 | <v-card class="card pink-bgcolor"> |
122 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> | 122 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> |
123 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> | 123 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> |
124 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> | 124 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> |
125 | </v-card> | 125 | </v-card> |
126 | </router-link> | 126 | </router-link> |
127 | </v-flex> | 127 | </v-flex> |
128 | <!-- ***** Total Teachers***** --> | 128 | <!-- ***** Total Teachers***** --> |
129 | <v-flex xs12 sm12 md3> | 129 | <v-flex xs12 sm12 md3> |
130 | <router-link :to="{ name:'Teachers' }"> | 130 | <router-link :to="{ name:'Teachers' }"> |
131 | <v-card flat class="card elevation-2 firozi-bgcolor"> | 131 | <v-card flat class="card elevation-2 firozi-bgcolor"> |
132 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> | 132 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> |
133 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> | 133 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> |
134 | 134 | ||
135 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> | 135 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> |
136 | </v-card> | 136 | </v-card> |
137 | </router-link> | 137 | </router-link> |
138 | </v-flex> | 138 | </v-flex> |
139 | <!-- ***** Total Parents ***** --> | 139 | <!-- ***** Total Parents ***** --> |
140 | <v-flex xs12 sm12 md3> | 140 | <v-flex xs12 sm12 md3> |
141 | <router-link :to="{ name:'Parents' }"> | 141 | <router-link :to="{ name:'Parents' }"> |
142 | <v-card flat class="card yellow darken-3"> | 142 | <v-card flat class="card yellow darken-3"> |
143 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> | 143 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> |
144 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> | 144 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> |
145 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> | 145 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> |
146 | </v-card> | 146 | </v-card> |
147 | </router-link> | 147 | </router-link> |
148 | </v-flex> | 148 | </v-flex> |
149 | <!-- ***** Total Class***** --> | 149 | <!-- ***** Total Class***** --> |
150 | <v-flex xs12 sm12 md3> | 150 | <v-flex xs12 sm12 md3> |
151 | <router-link :to="{ name:'Class' }"> | 151 | <router-link :to="{ name:'Class' }"> |
152 | <v-card flat class="card darkBlue-bgcolor"> | 152 | <v-card flat class="card darkBlue-bgcolor"> |
153 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> | 153 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> |
154 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> | 154 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> |
155 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> | 155 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> |
156 | </v-card> | 156 | </v-card> |
157 | </router-link> | 157 | </router-link> |
158 | </v-flex> | 158 | </v-flex> |
159 | </v-layout> | 159 | </v-layout> |
160 | 160 | ||
161 | <p | 161 | <p |
162 | v-if="studentsData.length === 0 && role == 'PARENT'" | 162 | v-if="studentsData.length === 0 && role == 'PARENT'" |
163 | class="text-center title grey lighten-4 error--text" | 163 | class="text-center title grey lighten-4 error--text" |
164 | >You have no student registered with school</p> | 164 | >You have no student registered with school</p> |
165 | <!-- ACCOUNT --> | 165 | <!-- ACCOUNT --> |
166 | <v-layout v-if="role == 'SUPERADMIN'|| role == 'ADMIN'"> | 166 | <v-layout v-if="role == 'SUPERADMIN'|| role == 'ADMIN'"> |
167 | <v-flex xs12> | 167 | <v-flex xs12> |
168 | <v-card class="card mt-2 account-Card"> | 168 | <v-card class="card mt-2 account-Card"> |
169 | <h4> | 169 | <h4> |
170 | <b>Account</b> | 170 | <b>Account</b> |
171 | </h4> | 171 | </h4> |
172 | <v-layout wrap> | 172 | <v-layout wrap> |
173 | <v-flex xs12 sm12 md3> | 173 | <v-flex xs12 sm12 md3> |
174 | <v-list two-line> | 174 | <v-list two-line> |
175 | <template> | 175 | <template> |
176 | <v-list-tile> | 176 | <v-list-tile> |
177 | <v-list-tile-avatar> | 177 | <v-list-tile-avatar> |
178 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> | 178 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> |
179 | </v-list-tile-avatar> | 179 | </v-list-tile-avatar> |
180 | <v-list-tile-content> | 180 | <v-list-tile-content> |
181 | <v-list-tile-title class="mt-2"> | 181 | <v-list-tile-title class="mt-2"> |
182 | <p class="subheading font-color">Fees</p> | 182 | <p class="subheading font-color">Fees</p> |
183 | </v-list-tile-title> | 183 | </v-list-tile-title> |
184 | <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> | 184 | <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> |
185 | </v-list-tile-content> | 185 | </v-list-tile-content> |
186 | </v-list-tile> | 186 | </v-list-tile> |
187 | <v-list-tile> | 187 | <v-list-tile> |
188 | <v-list-tile-avatar> | 188 | <v-list-tile-avatar> |
189 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> | 189 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> |
190 | </v-list-tile-avatar> | 190 | </v-list-tile-avatar> |
191 | <v-list-tile-content> | 191 | <v-list-tile-content> |
192 | <v-list-tile-title class="mt-2"> | 192 | <v-list-tile-title class="mt-2"> |
193 | <p class="subheading font-color">Collection</p> | 193 | <p class="subheading font-color">Collection</p> |
194 | </v-list-tile-title> | 194 | </v-list-tile-title> |
195 | <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> | 195 | <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> |
196 | </v-list-tile-content> | 196 | </v-list-tile-content> |
197 | </v-list-tile> | 197 | </v-list-tile> |
198 | <v-list-tile> | 198 | <v-list-tile> |
199 | <v-list-tile-avatar> | 199 | <v-list-tile-avatar> |
200 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> | 200 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> |
201 | </v-list-tile-avatar> | 201 | </v-list-tile-avatar> |
202 | <v-list-tile-content> | 202 | <v-list-tile-content> |
203 | <v-list-tile-title class="mt-2"> | 203 | <v-list-tile-title class="mt-2"> |
204 | <p class="subheading font-color">Expences</p> | 204 | <p class="subheading font-color">Expences</p> |
205 | </v-list-tile-title> | 205 | </v-list-tile-title> |
206 | <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> | 206 | <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> |
207 | </v-list-tile-content> | 207 | </v-list-tile-content> |
208 | </v-list-tile> | 208 | </v-list-tile> |
209 | </template> | 209 | </template> |
210 | </v-list> | 210 | </v-list> |
211 | </v-flex> | 211 | </v-flex> |
212 | <v-flex xs12 sm12 md9 lg9> | 212 | <v-flex xs12 sm12 md9 lg9> |
213 | <div id="chart"> | 213 | <div id="chart"> |
214 | <div v-if="showChart"> | 214 | <div v-if="showChart"> |
215 | <apexchart | 215 | <apexchart |
216 | type="bar" | 216 | type="bar" |
217 | height="250" | 217 | height="250" |
218 | style="max-width: 800px !important" | 218 | style="max-width: 800px !important" |
219 | :options="chartOptions" | 219 | :options="chartOptions" |
220 | :series="series" | 220 | :series="series" |
221 | ></apexchart> | 221 | ></apexchart> |
222 | </div> | 222 | </div> |
223 | </div> | 223 | </div> |
224 | </v-flex> | 224 | </v-flex> |
225 | </v-layout> | 225 | </v-layout> |
226 | </v-card> | 226 | </v-card> |
227 | </v-flex> | 227 | </v-flex> |
228 | </v-layout> | 228 | </v-layout> |
229 | 229 | ||
230 | <!-- FOR ADMIN ROLE --> | 230 | <!-- FOR ADMIN ROLE --> |
231 | <v-card class="mt-2 card" v-if="role == 'ADMIN'"> | 231 | <v-card class="mt-2 card" v-if="role == 'ADMIN'"> |
232 | <!-- <full-calendar | 232 | <!-- <full-calendar |
233 | ref="calendar" | 233 | ref="calendar" |
234 | defaultView="month" | 234 | defaultView="month" |
235 | droppable="false" | 235 | droppable="false" |
236 | :events="events" | 236 | :events="events" |
237 | :config="config" | 237 | :config="config" |
238 | ></full-calendar>--> | 238 | ></full-calendar>--> |
239 | <h4 class="pa-3"> | 239 | <h4 class="pa-3"> |
240 | <b>Notice</b> | 240 | <b>Notice</b> |
241 | </h4> | 241 | </h4> |
242 | 242 | ||
243 | <v-data-table | 243 | <v-data-table |
244 | :items="noticeData" | 244 | :items="noticeData" |
245 | class="elevation-0" | 245 | class="elevation-0" |
246 | flat | 246 | flat |
247 | hide-actions | 247 | hide-actions |
248 | hide-headers | 248 | hide-headers |
249 | style="border-spacing: 0 !important;" | 249 | style="border-spacing: 0 !important;" |
250 | > | 250 | > |
251 | <template | 251 | <template |
252 | slot="items" | 252 | slot="items" |
253 | slot-scope="props" | 253 | slot-scope="props" |
254 | v-if="props.index < 5" | 254 | v-if="props.index < 5" |
255 | style="border-spacing: 0 !important;" | 255 | style="border-spacing: 0 !important;" |
256 | > | 256 | > |
257 | <tr class="td-notice"> | 257 | <tr class="td-notice"> |
258 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 258 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
259 | <td> | 259 | <td> |
260 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | 260 | <span class="grey--text caption">{{ date(props.item.created) }}</span> |
261 | <br /> | 261 | <br /> |
262 | <span class="body-2">{{ props.item.title}}</span> | 262 | <span class="body-2">{{ props.item.title}}</span> |
263 | </td> | 263 | </td> |
264 | <td class="grey--text mt-2">{{ props.item.description}}</td> | 264 | <td class="grey--text mt-2">{{ props.item.description}}</td> |
265 | 265 | ||
266 | <td class="text-xs-center"> | 266 | <td class="text-xs-center"> |
267 | <span> | 267 | <span> |
268 | <v-tooltip top> | 268 | <v-tooltip top> |
269 | <img | 269 | <img |
270 | slot="activator" | 270 | slot="activator" |
271 | style="cursor:pointer; width:25px; height:25px; " | 271 | style="cursor:pointer; width:25px; height:25px; " |
272 | @click="profile" | 272 | @click="profile" |
273 | src="/static/icon/view.png" | 273 | src="/static/icon/view.png" |
274 | /> | 274 | /> |
275 | <span>View</span> | 275 | <span>View</span> |
276 | </v-tooltip> | 276 | </v-tooltip> |
277 | </span> | 277 | </span> |
278 | </td> | 278 | </td> |
279 | </tr> | 279 | </tr> |
280 | </template> | 280 | </template> |
281 | </v-data-table> | 281 | </v-data-table> |
282 | </v-card> | 282 | </v-card> |
283 | 283 | ||
284 | <!-- FOR TEACHER ROLE --> | 284 | <!-- FOR TEACHER ROLE --> |
285 | <v-card class="mt-2 card" v-if="role == 'TEACHER'"> | 285 | <v-card class="mt-2 card" v-if="role == 'TEACHER'"> |
286 | <v-layout> | 286 | <v-layout> |
287 | <v-flex xs6 sm6 md6> | 287 | <v-flex xs6 sm6 md6> |
288 | <h4 class="pa-3"> | 288 | <h4 class="pa-3"> |
289 | <b>Notice</b> | 289 | <b>Notice</b> |
290 | </h4> | 290 | </h4> |
291 | <v-data-table | 291 | <v-data-table |
292 | :items="noticeData" | 292 | :items="noticeData" |
293 | class="elevation-0" | 293 | class="elevation-0" |
294 | flat | 294 | flat |
295 | hide-actions | 295 | hide-actions |
296 | hide-headers | 296 | hide-headers |
297 | style="border-spacing: 0 !important;" | 297 | style="border-spacing: 0 !important;" |
298 | > | 298 | > |
299 | <template | 299 | <template |
300 | slot="items" | 300 | slot="items" |
301 | slot-scope="props" | 301 | slot-scope="props" |
302 | v-if="props.index < 5" | 302 | v-if="props.index < 5" |
303 | style="border-spacing: 0 !important;" | 303 | style="border-spacing: 0 !important;" |
304 | > | 304 | > |
305 | <tr class="td-notice"> | 305 | <tr class="td-notice"> |
306 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 306 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
307 | <td> | 307 | <td> |
308 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | 308 | <span class="grey--text caption">{{ date(props.item.created) }}</span> |
309 | <br /> | 309 | <br /> |
310 | <span class="body-2">{{ props.item.title}}</span> | 310 | <span class="body-2">{{ props.item.title}}</span> |
311 | </td> | 311 | </td> |
312 | <td class="grey--text mt-2">{{ props.item.description}}</td> | 312 | <td class="grey--text mt-2">{{ props.item.description}}</td> |
313 | 313 | ||
314 | <td class="text-xs-center"> | 314 | <td class="text-xs-center"> |
315 | <span> | 315 | <span> |
316 | <v-tooltip top> | 316 | <v-tooltip top> |
317 | <img | 317 | <img |
318 | slot="activator" | 318 | slot="activator" |
319 | style="cursor:pointer; width:25px; height:25px; " | 319 | style="cursor:pointer; width:25px; height:25px; " |
320 | @click="profile" | 320 | @click="profile" |
321 | src="/static/icon/view.png" | 321 | src="/static/icon/view.png" |
322 | /> | 322 | /> |
323 | <span>View</span> | 323 | <span>View</span> |
324 | </v-tooltip> | 324 | </v-tooltip> |
325 | </span> | 325 | </span> |
326 | </td> | 326 | </td> |
327 | </tr> | 327 | </tr> |
328 | </template> | 328 | </template> |
329 | </v-data-table> | 329 | </v-data-table> |
330 | </v-flex> | 330 | </v-flex> |
331 | 331 | ||
332 | <v-flex xs6 sm6 md6> | 332 | <v-flex xs6 sm6 md6> |
333 | <v-card-text> | 333 | <v-card-text> |
334 | <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> | 334 | <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> |
335 | <div | 335 | <div |
336 | v-for="(activity,index) in activityList" | 336 | v-for="(activity,index) in activityList" |
337 | :key="index" | 337 | :key="index" |
338 | class="mt-2" | 338 | class="mt-2" |
339 | style="cursor: pointer;" | 339 | style="cursor: pointer;" |
340 | @click="seeEventDetails(activity)" | 340 | @click="seeEventDetails(activity)" |
341 | > | 341 | > |
342 | <span | 342 | <span |
343 | :style="{ 'background-color': colorsArray[index%colorsArray.length] }" | 343 | :style="{ 'background-color': colorsArray[index%colorsArray.length] }" |
344 | style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" | 344 | style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" |
345 | ></span> | 345 | ></span> |
346 | <div style="display: inline-block;" class="ml-2"> | 346 | <div style="display: inline-block;" class="ml-2"> |
347 | <div> | 347 | <div> |
348 | <div | 348 | <div |
349 | class="grey--text lighten-1 caption" | 349 | class="grey--text lighten-1 caption" |
350 | v-if="activity.dateOfEvent" | 350 | v-if="activity.dateOfEvent" |
351 | >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> | 351 | >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> |
352 | <div class="body-2" v-if="activity.title">{{activity.title}}</div> | 352 | <div class="body-2" v-if="activity.title">{{activity.title}}</div> |
353 | </div> | 353 | </div> |
354 | </div> | 354 | </div> |
355 | </div> | 355 | </div> |
356 | <div v-if="activityList.length == 0"> | 356 | <div v-if="activityList.length == 0"> |
357 | <p class="text-center title grey lighten-4 error--text">No Data Found!</p> | 357 | <p class="text-center title grey lighten-4 error--text">No Data Found!</p> |
358 | </div> | 358 | </div> |
359 | </v-card-text> | 359 | </v-card-text> |
360 | </v-flex> | 360 | </v-flex> |
361 | </v-layout> | 361 | </v-layout> |
362 | </v-card> | 362 | </v-card> |
363 | 363 | ||
364 | <!-- COURSES --> | 364 | <!-- COURSES --> |
365 | <v-layout v-if="role == 'PARENT'"> | 365 | <v-layout v-if="role == 'PARENT'"> |
366 | <v-flex xs12> | 366 | <v-flex xs12> |
367 | <v-card class="card mt-2 account-Card"> | 367 | <v-card class="card mt-2 account-Card"> |
368 | <h4> | 368 | <h4> |
369 | <b>My Courses</b> | 369 | <b>My Courses</b> |
370 | </h4> | 370 | </h4> |
371 | <v-layout wrap> | 371 | <v-layout wrap> |
372 | <v-flex xs12 sm12> | 372 | <v-flex xs12 sm12> |
373 | <v-list two-line> | 373 | <v-list two-line> |
374 | <template> | 374 | <template> |
375 | <v-list-tile v-for="(course,i) in courseData" :key="i"> | 375 | <v-list-tile v-for="(course,i) in courseData" :key="i"> |
376 | <v-list-tile-avatar> | 376 | <v-list-tile-avatar> |
377 | <v-icon | 377 | <v-icon |
378 | class="account-circle darkBlue-color" | 378 | class="account-circle darkBlue-color" |
379 | style="cursor: pointer;" | 379 | style="cursor: pointer;" |
380 | @click="routeToCourseDetails(course._id)" | 380 | @click="routeToCourseDetails(course._id)" |
381 | >panorama_fish_eye</v-icon> | 381 | >panorama_fish_eye</v-icon> |
382 | </v-list-tile-avatar> | 382 | </v-list-tile-avatar> |
383 | <v-list-tile-content> | 383 | <v-list-tile-content> |
384 | <v-list-tile-title | 384 | <v-list-tile-title |
385 | style="cursor: pointer;" | 385 | style="cursor: pointer;" |
386 | @click="routeToCourseDetails(course._id)" | 386 | @click="routeToCourseDetails(course._id)" |
387 | >{{ course.courseName }}</v-list-tile-title> | 387 | >{{ course.courseName }}</v-list-tile-title> |
388 | </v-list-tile-content> | 388 | </v-list-tile-content> |
389 | </v-list-tile> | 389 | </v-list-tile> |
390 | </template> | 390 | </template> |
391 | </v-list> | 391 | </v-list> |
392 | </v-flex> | 392 | </v-flex> |
393 | </v-layout> | 393 | </v-layout> |
394 | </v-card> | 394 | </v-card> |
395 | </v-flex> | 395 | </v-flex> |
396 | </v-layout> | 396 | </v-layout> |
397 | <v-layout v-if="role == 'PARENT'"> | 397 | <v-layout v-if="role == 'PARENT'"> |
398 | <v-flex xs6> | 398 | <v-flex xs6> |
399 | <v-card class="mt-2 card"> | 399 | <v-card class="mt-2 card"> |
400 | <h4 class="pa-3"> | 400 | <h4 class="pa-3"> |
401 | <b>Latest Annoucements</b> | 401 | <b>Latest Annoucements</b> |
402 | </h4> | 402 | </h4> |
403 | 403 | ||
404 | <v-data-table | 404 | <v-data-table |
405 | :items="annoucementData" | 405 | :items="annoucementData" |
406 | class="elevation-0" | 406 | class="elevation-0" |
407 | flat | 407 | flat |
408 | hide-actions | 408 | hide-actions |
409 | hide-headers | 409 | hide-headers |
410 | style="border-spacing: 0 !important;" | 410 | style="border-spacing: 0 !important;" |
411 | > | 411 | > |
412 | <template | 412 | <template |
413 | slot="items" | 413 | slot="items" |
414 | slot-scope="props" | 414 | slot-scope="props" |
415 | v-if="props.index < 5" | 415 | v-if="props.index < 5" |
416 | style="border-spacing: 0 !important;" | 416 | style="border-spacing: 0 !important;" |
417 | > | 417 | > |
418 | <tr class="td-notice"> | 418 | <tr class="td-notice"> |
419 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 419 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
420 | <td> | 420 | <td> |
421 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | 421 | <span class="grey--text caption">{{ date(props.item.created) }}</span> |
422 | <br /> | 422 | <br /> |
423 | <span class="body-2">{{ props.item.discussionType}}</span> | 423 | <span class="body-2">{{ props.item.discussionType}}</span> |
424 | </td> | 424 | </td> |
425 | <td class="text-xs-center"> | 425 | <td class="text-xs-center"> |
426 | <span> | 426 | <span> |
427 | <v-tooltip top> | 427 | <v-tooltip top> |
428 | <img | 428 | <img |
429 | slot="activator" | 429 | slot="activator" |
430 | style="cursor:pointer; width:25px; height:25px; " | 430 | style="cursor:pointer; width:25px; height:25px; " |
431 | src="/static/icon/view.png" | 431 | src="/static/icon/view.png" |
432 | /> | 432 | /> |
433 | <span>View</span> | 433 | <span>View</span> |
434 | </v-tooltip> | 434 | </v-tooltip> |
435 | </span> | 435 | </span> |
436 | </td> | 436 | </td> |
437 | </tr> | 437 | </tr> |
438 | </template> | 438 | </template> |
439 | </v-data-table> | 439 | </v-data-table> |
440 | </v-card> | 440 | </v-card> |
441 | </v-flex> | 441 | </v-flex> |
442 | <v-flex xs6> | 442 | <v-flex xs6> |
443 | <v-card class="mt-2 card"> | 443 | <v-card class="mt-2 card"> |
444 | <h4 class="pa-3"> | 444 | <h4 class="pa-3"> |
445 | <b>Online User</b> | 445 | <b>Online User</b> |
446 | </h4> | 446 | </h4> |
447 | 447 | ||
448 | <v-data-table | 448 | <v-data-table |
449 | :items="onlineUser" | 449 | :items="onlineUser" |
450 | class="elevation-0" | 450 | class="elevation-0" |
451 | flat | 451 | flat |
452 | hide-actions | 452 | hide-actions |
453 | hide-headers | 453 | hide-headers |
454 | style="border-spacing: 0 !important;" | 454 | style="border-spacing: 0 !important;" |
455 | > | 455 | > |
456 | <template | 456 | <template |
457 | slot="items" | 457 | slot="items" |
458 | slot-scope="props" | 458 | slot-scope="props" |
459 | v-if="props.index < 5" | 459 | v-if="props.index < 5" |
460 | style="border-spacing: 0 !important;" | 460 | style="border-spacing: 0 !important;" |
461 | > | 461 | > |
462 | <tr class="td-notice"> | 462 | <tr class="td-notice"> |
463 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 463 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
464 | <td> | 464 | <td> |
465 | <span class="body-2">{{ props.item.user }}</span> | 465 | <span class="body-2">{{ props.item.user }}</span> |
466 | </td> | 466 | </td> |
467 | <td class="text-xs-center"> | 467 | <td class="text-xs-center"> |
468 | <span> | 468 | <span> |
469 | <v-tooltip top> | 469 | <v-tooltip top> |
470 | <img | 470 | <img |
471 | slot="activator" | 471 | slot="activator" |
472 | style="cursor:pointer; width:25px; height:25px; " | 472 | style="cursor:pointer; width:25px; height:25px; " |
473 | src="/static/icon/view.png" | 473 | src="/static/icon/view.png" |
474 | /> | 474 | /> |
475 | <span>View</span> | 475 | <span>View</span> |
476 | </v-tooltip> | 476 | </v-tooltip> |
477 | </span> | 477 | </span> |
478 | </td> | 478 | </td> |
479 | </tr> | 479 | </tr> |
480 | </template> | 480 | </template> |
481 | </v-data-table> | 481 | </v-data-table> |
482 | </v-card> | 482 | </v-card> |
483 | </v-flex> | 483 | </v-flex> |
484 | </v-layout> | 484 | </v-layout> |
485 | </v-container> | 485 | </v-container> |
486 | </v-flex> | 486 | </v-flex> |
487 | <v-spacer></v-spacer> | 487 | <v-spacer></v-spacer> |
488 | <!-- SIDE BAR --> | 488 | <!-- SIDE BAR --> |
489 | <v-flex xs12 sm12 md3> | 489 | <v-flex xs12 sm12 md3> |
490 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> | 490 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> |
491 | <v-card-text class="px-2"> | 491 | <v-card-text class="px-2"> |
492 | <h4 class="text-xs-center py-3"> | 492 | <h4 class="text-xs-center py-3"> |
493 | <b>Profile</b> | 493 | <b>Profile</b> |
494 | </h4> | 494 | </h4> |
495 | <v-flex xs12 class="py-3"> | 495 | <v-flex xs12 class="py-3"> |
496 | <v-layout wrap> | 496 | <v-layout wrap> |
497 | <v-flex xs12 sm12 md4> | 497 | <v-flex xs12 sm12 md4> |
498 | <img | 498 | <img |
499 | src="/static/icon/user.png" | 499 | src="/static/icon/user.png" |
500 | v-if="!userData.profilePicUrl && !userData.schoolLogoUrl" | 500 | v-if="!userData.profilePicUrl && !userData.schoolLogoUrl" |
501 | width="80" | 501 | width="80" |
502 | /> | 502 | /> |
503 | <img | 503 | <img |
504 | :src="userData.profilePicUrl" | 504 | :src="userData.profilePicUrl" |
505 | onerror="this.src='/static/icon/user.png';" | 505 | onerror="this.src='/static/icon/user.png';" |
506 | v-if="userData.profilePicUrl" | 506 | v-if="userData.profilePicUrl" |
507 | width="80" | 507 | width="80" |
508 | /> | 508 | /> |
509 | <img | 509 | <img |
510 | :src="userData.schoolLogoUrl" | 510 | :src="userData.schoolLogoUrl" |
511 | onerror="this.src='/static/icon/user.png';" | 511 | onerror="this.src='/static/icon/user.png';" |
512 | v-if="userData.schoolLogoUrl" | 512 | v-if="userData.schoolLogoUrl" |
513 | width="80" | 513 | width="80" |
514 | /> | 514 | /> |
515 | </v-flex> | 515 | </v-flex> |
516 | <v-flex xs12 sm12 md6> | 516 | <v-flex xs12 sm12 md6> |
517 | <p class="mb-0 body-1"> | 517 | <p class="mb-0 body-1"> |
518 | <i>{{ userData.name }}</i> | 518 | <i>{{ userData.name }}</i> |
519 | </p> | 519 | </p> |
520 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> | 520 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> |
521 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> | 521 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> |
522 | <address class="caption grey--text mb-3">{{ userData.address }}</address> | 522 | <address class="caption grey--text mb-3">{{ userData.address }}</address> |
523 | </v-flex> | 523 | </v-flex> |
524 | </v-layout> | 524 | </v-layout> |
525 | </v-flex> | 525 | </v-flex> |
526 | <hr /> | 526 | <hr /> |
527 | <div class="text-xs-center py-3 subheading font-weight-bold">Calender</div> | 527 | <div class="text-xs-center py-3 subheading font-weight-bold">Calender</div> |
528 | 528 | ||
529 | <vue-event-calendar :events="activityEvents" @day-changed="handleDayChanged($event)"></vue-event-calendar> | 529 | <vue-event-calendar :events="activityEvents" @day-changed="handleDayChanged($event)"></vue-event-calendar> |
530 | 530 | ||
531 | <!-- LATEST EVENTS --> | 531 | <!-- LATEST EVENTS --> |
532 | <v-card class="my-3 elevation-0" v-if="role != 'TEACHER'"> | 532 | <v-card class="my-3 elevation-0" v-if="role != 'TEACHER'"> |
533 | <v-card-text> | 533 | <v-card-text v-if="$store.state.role === 'ADMIN' "> |
534 | <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> | 534 | <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> |
535 | <div | 535 | <div |
536 | v-for="(activity,index) in activityList" | 536 | v-for="(activity,index) in activityList" |
537 | :key="index" | 537 | :key="index" |
538 | class="mt-2" | 538 | class="mt-2" |
539 | style="cursor: pointer;" | 539 | style="cursor: pointer;" |
540 | @click="seeEventDetails(activity)" | 540 | @click="seeEventDetails(activity)" |
541 | > | 541 | > |
542 | <span | 542 | <span |
543 | :style="{ 'background-color': colorsArray[index%colorsArray.length] }" | 543 | :style="{ 'background-color': colorsArray[index%colorsArray.length] }" |
544 | style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" | 544 | style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" |
545 | ></span> | 545 | ></span> |
546 | <div style="display: inline-block;" class="ml-2"> | 546 | <div style="display: inline-block;" class="ml-2"> |
547 | <!-- LATEST EVENTS FOR PARENT --> | 547 | <div> |
548 | <div v-if="$store.state.role === 'PARENT' "> | ||
549 | <div | ||
550 | class="grey--text lighten-1 caption" | ||
551 | v-if="activity.meetingEvent" | ||
552 | >{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> | ||
553 | <div | ||
554 | class="body-2" | ||
555 | v-if="activity.meetingEvent" | ||
556 | >{{activity.meetingEvent.title}}</div> | ||
557 | </div> | ||
558 | |||
559 | <!-- LATEST EVENTS FOR TEACHER --> | ||
560 | <div v-if="role == 'TEACHER'"> | ||
561 | <div | 548 | <div |
562 | class="grey--text lighten-1 caption" | 549 | class="grey--text lighten-1 caption" |
563 | v-if="activity.dateOfEvent" | 550 | v-if="activity.dateOfEvent" |
564 | >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> | 551 | >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> |
565 | <div class="body-2" v-if="activity.title">{{activity.title}}</div> | 552 | <div class="body-2" v-if="activity.title">{{activity.title}}</div> |
566 | </div> | 553 | </div> |
567 | </div> | 554 | </div> |
568 | </div> | 555 | </div> |
569 | <div v-if="activityList.length == 0"> | 556 | <div v-if="activityList.length == 0"> |
570 | <p class="text-center title grey lighten-4 error--text">No Data Found!</p> | 557 | <p class="text-center title grey lighten-4 error--text">No Data Found!</p> |
571 | </div> | 558 | </div> |
572 | </v-card-text> | 559 | </v-card-text> |
560 | <v-card-text> | ||
561 | <!-- <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> --> | ||
562 | <!-- <div | ||
563 | v-for="(activity,index) in activityList" | ||
564 | :key="index" | ||
565 | class="mt-2" | ||
566 | style="cursor: pointer;" | ||
567 | @click="seeEventDetails(activity)" | ||
568 | > | ||
569 | <span | ||
570 | :style="{ 'background-color': colorsArray[index%colorsArray.length] }" | ||
571 | style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" | ||
572 | ></span>--> | ||
573 | <div style="display: inline-block;" class="ml-2"> | ||
574 | <!-- LATEST EVENTS FOR PARENT --> | ||
575 | <div v-if="$store.state.role === 'PARENT' "> | ||
576 | <div | ||
577 | class="grey--text lighten-1 caption" | ||
578 | v-if="activity.meetingEvent" | ||
579 | >{{moment(activity.meetingEvent.dateOfEvent).format("DD MMMM, YYYY")}}</div> | ||
580 | <div class="body-2" v-if="activity.meetingEvent">{{activity.meetingEvent.title}}</div> | ||
581 | </div> | ||
582 | |||
583 | <!-- LATEST EVENTS FOR TEACHER --> | ||
584 | <div v-if="role === 'TEACHER'"> | ||
585 | <div | ||
586 | class="grey--text lighten-1 caption" | ||
587 | v-if="activity.dateOfEvent" | ||
588 | >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> | ||
589 | <div class="body-2" v-if="activity.title">{{activity.title}}</div> | ||
590 | </div> | ||
591 | </div> | ||
592 | <div v-if="activityList.length == 0"> | ||
593 | <p class="text-center title grey lighten-4 error--text">No Data Found!</p> | ||
594 | </div> | ||
595 | <!-- </div> --> | ||
596 | </v-card-text> | ||
573 | </v-card> | 597 | </v-card> |
574 | </v-card-text> | 598 | </v-card-text> |
575 | </v-card> | 599 | </v-card> |
576 | </v-flex> | 600 | </v-flex> |
577 | </v-layout> | 601 | </v-layout> |
578 | 602 | ||
579 | <v-dialog v-model="dialog" max-width="500"> | 603 | <v-dialog v-model="dialog" max-width="500"> |
580 | <v-card color="grey lighten-4" flat> | 604 | <v-card color="grey lighten-4" flat> |
581 | <v-toolbar dark color="fixcolors"> | 605 | <v-toolbar dark color="fixcolors"> |
582 | <v-spacer></v-spacer> | 606 | <v-spacer></v-spacer> |
583 | <v-btn icon @click="dialog= false"> | 607 | <v-btn icon @click="dialog= false"> |
584 | <v-icon>close</v-icon> | 608 | <v-icon>close</v-icon> |
585 | </v-btn> | 609 | </v-btn> |
586 | </v-toolbar> | 610 | </v-toolbar> |
587 | <v-flex class="py-4"> | 611 | <v-flex class="py-4"> |
588 | <v-list-tile> | 612 | <v-list-tile> |
589 | <v-list-tile-action> | 613 | <v-list-tile-action> |
590 | <v-icon>edit</v-icon> | 614 | <v-icon>edit</v-icon> |
591 | </v-list-tile-action> | 615 | </v-list-tile-action> |
592 | <v-list-tile-content> | 616 | <v-list-tile-content> |
593 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> | 617 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> |
594 | </v-list-tile-content> | 618 | </v-list-tile-content> |
595 | </v-list-tile> | 619 | </v-list-tile> |
596 | <v-list-tile> | 620 | <v-list-tile> |
597 | <v-list-tile-action> | 621 | <v-list-tile-action> |
598 | <v-icon>access_time</v-icon> | 622 | <v-icon>access_time</v-icon> |
599 | </v-list-tile-action> | 623 | </v-list-tile-action> |
600 | <v-list-tile-content> | 624 | <v-list-tile-content> |
601 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> | 625 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> |
602 | </v-list-tile-content> | 626 | </v-list-tile-content> |
603 | </v-list-tile> | 627 | </v-list-tile> |
604 | </v-flex> | 628 | </v-flex> |
605 | </v-card> | 629 | </v-card> |
606 | </v-dialog> | 630 | </v-dialog> |
607 | </v-app> | 631 | </v-app> |
608 | </template> | 632 | </template> |
609 | 633 | ||
610 | <script> | 634 | <script> |
611 | import http from "@/Services/http.js"; | 635 | import http from "@/Services/http.js"; |
612 | import moment from "moment"; | 636 | import moment from "moment"; |
613 | import AllApiCalls from "@/Services/AllApiCalls.js"; | 637 | import AllApiCalls from "@/Services/AllApiCalls.js"; |
614 | // import { FunctionalCalendar } from "vue-functional-calendar"; | 638 | // import { FunctionalCalendar } from "vue-functional-calendar"; |
615 | 639 | ||
616 | export default { | 640 | export default { |
617 | components: { | 641 | components: { |
618 | // FunctionalCalendar | 642 | // FunctionalCalendar |
619 | }, | 643 | }, |
620 | mixins: [AllApiCalls], | 644 | mixins: [AllApiCalls], |
621 | data() { | 645 | data() { |
622 | return { | 646 | return { |
623 | // data: { | 647 | // data: { |
624 | // clieckedToday: false | 648 | // clieckedToday: false |
625 | // }, | 649 | // }, |
626 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], | 650 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], |
627 | // calendarData: {}, | 651 | // calendarData: {}, |
628 | // calendar: {}, | 652 | // calendar: {}, |
629 | 653 | ||
630 | // DIALOG BOX EVENT DETAILS | 654 | // DIALOG BOX EVENT DETAILS |
631 | viewEventDetails: false, | 655 | viewEventDetails: false, |
632 | 656 | ||
633 | // CALENDER | 657 | // CALENDER |
634 | moment: moment, | 658 | moment: moment, |
635 | activityEvents: [], | 659 | activityEvents: [], |
636 | onlineUser: [ | 660 | onlineUser: [ |
637 | { | 661 | { |
638 | user: "Student Demo", | 662 | user: "Student Demo", |
639 | }, | 663 | }, |
640 | { | 664 | { |
641 | user: "Teacher Demo", | 665 | user: "Teacher Demo", |
642 | }, | 666 | }, |
643 | { | 667 | { |
644 | user: "Priyansh Gupta", | 668 | user: "Priyansh Gupta", |
645 | }, | 669 | }, |
646 | { | 670 | { |
647 | user: "Gaurav Aggarwal", | 671 | user: "Gaurav Aggarwal", |
648 | }, | 672 | }, |
649 | { | 673 | { |
650 | user: "Approve Arorra", | 674 | user: "Approve Arorra", |
651 | }, | 675 | }, |
652 | ], | 676 | ], |
653 | showLoader: false, | 677 | showLoader: false, |
654 | calendarData: {}, | 678 | calendarData: {}, |
655 | dialog: false, | 679 | dialog: false, |
656 | dialogNotice: false, | 680 | dialogNotice: false, |
657 | HolidaysList: [], | 681 | HolidaysList: [], |
658 | EventsList: [], | 682 | EventsList: [], |
659 | events: [], | 683 | events: [], |
660 | config: { | 684 | config: { |
661 | eventClick: (event) => { | 685 | eventClick: (event) => { |
662 | this.selected = event; | 686 | this.selected = event; |
663 | this.dialog = true; | 687 | this.dialog = true; |
664 | }, | 688 | }, |
665 | }, | 689 | }, |
666 | selected: {}, | 690 | selected: {}, |
667 | barGraph: [], | 691 | barGraph: [], |
668 | // notice: {}, | 692 | // notice: {}, |
669 | userData: {}, | 693 | userData: {}, |
670 | dated: new Date(2018, 0, 9), | 694 | dated: new Date(2018, 0, 9), |
671 | userList: [], | 695 | userList: [], |
672 | sectionList: [], | 696 | sectionList: [], |
673 | students: "", | 697 | students: "", |
674 | parents: "", | 698 | parents: "", |
675 | teachers: "", | 699 | teachers: "", |
676 | classes: "", | 700 | classes: "", |
677 | noticeData: [], | 701 | noticeData: [], |
678 | expenseData: [], | 702 | expenseData: [], |
679 | feeData: [], | 703 | feeData: [], |
680 | collectionData: [], | 704 | collectionData: [], |
681 | courseData: [], | 705 | courseData: [], |
682 | studentsData: [], | 706 | studentsData: [], |
683 | annoucementData: [], | 707 | annoucementData: [], |
684 | role: "", | 708 | role: "", |
685 | attrs: [ | 709 | attrs: [ |
686 | { | 710 | { |
687 | key: "today", | 711 | key: "today", |
688 | highlight: true, | 712 | highlight: true, |
689 | dates: new Date(), | 713 | dates: new Date(), |
690 | }, | 714 | }, |
691 | ], | 715 | ], |
692 | drawer: true, | 716 | drawer: true, |
693 | items: [ | 717 | items: [ |
694 | { title: "Home", icon: "dashboard" }, | 718 | { title: "Home", icon: "dashboard" }, |
695 | { title: "About", icon: "question_answer" }, | 719 | { title: "About", icon: "question_answer" }, |
696 | ], | 720 | ], |
697 | right: null, | 721 | right: null, |
698 | 722 | ||
699 | series: [ | 723 | series: [ |
700 | { | 724 | { |
701 | name: "Total", | 725 | name: "Total", |
702 | data: [], | 726 | data: [], |
703 | }, | 727 | }, |
704 | ], | 728 | ], |
705 | showChart: false, | 729 | showChart: false, |
706 | chartOptions: { | 730 | chartOptions: { |
707 | chart: { | 731 | chart: { |
708 | type: "bar", | 732 | type: "bar", |
709 | height: 150, | 733 | height: 150, |
710 | stacked: true, | 734 | stacked: true, |
711 | // animations: { | 735 | // animations: { |
712 | // enabled: true, | 736 | // enabled: true, |
713 | // easing: "easeinout", | 737 | // easing: "easeinout", |
714 | // speed: 1200, | 738 | // speed: 1200, |
715 | // animateGradually: { | 739 | // animateGradually: { |
716 | // enabled: true, | 740 | // enabled: true, |
717 | // delay: 450 | 741 | // delay: 450 |
718 | // }, | 742 | // }, |
719 | // dynamicAnimation: { | 743 | // dynamicAnimation: { |
720 | // enabled: true, | 744 | // enabled: true, |
721 | // speed: 450 | 745 | // speed: 450 |
722 | // } | 746 | // } |
723 | // } | 747 | // } |
724 | }, | 748 | }, |
725 | plotOptions: { | 749 | plotOptions: { |
726 | bar: { | 750 | bar: { |
727 | horizontal: false, | 751 | horizontal: false, |
728 | columnWidth: "25%", | 752 | columnWidth: "25%", |
729 | // endingShape: "rounded", | 753 | // endingShape: "rounded", |
730 | distributed: true, | 754 | distributed: true, |
731 | }, | 755 | }, |
732 | }, | 756 | }, |
733 | responsive: [ | 757 | responsive: [ |
734 | { | 758 | { |
735 | breakpoint: 480, | 759 | breakpoint: 480, |
736 | options: { | 760 | options: { |
737 | legend: { | 761 | legend: { |
738 | position: "bottom", | 762 | position: "bottom", |
739 | offsetX: -10, | 763 | offsetX: -10, |
740 | offsetY: 0, | 764 | offsetY: 0, |
741 | }, | 765 | }, |
742 | }, | 766 | }, |
743 | }, | 767 | }, |
744 | ], | 768 | ], |
745 | legend: { | 769 | legend: { |
746 | show: false, | 770 | show: false, |
747 | }, | 771 | }, |
748 | colors: ["#7852cc", "#f9a825", "#ff8a89"], | 772 | colors: ["#7852cc", "#f9a825", "#ff8a89"], |
749 | dataLabels: { | 773 | dataLabels: { |
750 | enabled: false, | 774 | enabled: false, |
751 | }, | 775 | }, |
752 | stroke: { | 776 | stroke: { |
753 | show: true, | 777 | show: true, |
754 | width: 2, | 778 | width: 2, |
755 | colors: ["transparent"], | 779 | colors: ["transparent"], |
756 | }, | 780 | }, |
757 | xaxis: { | 781 | xaxis: { |
758 | categories: ["Fee", "Collections", "Expences"], | 782 | categories: ["Fee", "Collections", "Expences"], |
759 | }, | 783 | }, |
760 | yaxis: { | 784 | yaxis: { |
761 | title: { | 785 | title: { |
762 | text: "", | 786 | text: "", |
763 | }, | 787 | }, |
764 | }, | 788 | }, |
765 | fill: { | 789 | fill: { |
766 | opacity: 1, | 790 | opacity: 1, |
767 | }, | 791 | }, |
768 | tooltip: { | 792 | tooltip: { |
769 | y: { | 793 | y: { |
770 | formatter: function (val, opts) { | 794 | formatter: function (val, opts) { |
771 | return "" + val + " "; | 795 | return "" + val + " "; |
772 | }, | 796 | }, |
773 | }, | 797 | }, |
774 | }, | 798 | }, |
775 | }, | 799 | }, |
776 | 800 | ||
777 | // LATEST ACTIVITY | 801 | // LATEST ACTIVITY |
778 | colorsArray: ["#ff8a89", "#71d9ea", "#7852cc", "#F9A825"], | 802 | colorsArray: ["#ff8a89", "#71d9ea", "#7852cc", "#F9A825"], |
779 | activityList: [], | 803 | activityList: [], |
780 | }; | 804 | }; |
781 | }, | 805 | }, |
782 | 806 | ||
783 | methods: { | 807 | methods: { |
784 | test(e) { | 808 | test(e) { |
785 | console.log(" test - ", e); | 809 | console.log(" test - ", e); |
786 | }, | 810 | }, |
787 | async handleDayChanged(e) { | 811 | async handleDayChanged(e) { |
788 | await this.getParticularMeetingEvent({ | 812 | await this.getParticularMeetingEvent({ |
789 | meetingEventId: e.events[0]._id, | 813 | meetingEventId: e.events[0]._id, |
790 | }); | 814 | }); |
791 | this.viewEventDetails = true; | 815 | this.viewEventDetails = true; |
792 | }, | 816 | }, |
793 | async seeEventDetails(activity) { | 817 | async seeEventDetails(activity) { |
794 | if (this.$store.state.role === "TEACHER") { | 818 | if (this.$store.state.role === "TEACHER") { |
795 | await this.getParticularMeetingEvent({ meetingEventId: activity._id }); | 819 | await this.getParticularMeetingEvent({ meetingEventId: activity._id }); |
796 | this.viewEventDetails = true; | 820 | this.viewEventDetails = true; |
797 | } | 821 | } |
798 | if (this.$store.state.role === "PARENT") { | 822 | if (this.$store.state.role === "PARENT") { |
799 | await this.getParticularMeetingEvent({ | 823 | await this.getParticularMeetingEvent({ |
800 | meetingEventId: activity.meetingEvent._id, | 824 | meetingEventId: activity.meetingEvent._id, |
801 | }); | 825 | }); |
802 | this.viewEventDetails = true; | 826 | this.viewEventDetails = true; |
803 | } | 827 | } |
828 | if (this.$store.state.role === "ADMIN") { | ||
829 | await this.getParticularMeetingEvent({ | ||
830 | meetingEventId: activity._id, | ||
831 | }); | ||
832 | this.viewEventDetails = true; | ||
833 | } | ||
804 | }, | 834 | }, |
805 | async routeToCourseDetails(courseId) { | 835 | async routeToCourseDetails(courseId) { |
806 | /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ | 836 | /* getParticularCourseDetail- To get courseDetail - defined in GetApis.js*/ |
807 | let response = await this.getParticularCourseDetail(courseId); | 837 | let response = await this.getParticularCourseDetail(courseId); |
808 | 838 | ||
809 | /* If the response is null then dont route */ | 839 | /* If the response is null then dont route */ |
810 | if (response.data.data.length > 0) { | 840 | if (response.data.data.length > 0) { |
811 | this.$router.push({ | 841 | this.$router.push({ |
812 | name: "Course Details", | 842 | name: "Course Details", |
813 | query: { courseId: courseId }, | 843 | query: { courseId: courseId }, |
814 | }); | 844 | }); |
815 | } else { | 845 | } else { |
816 | this.seeSnackbar("No Data Available", "warning"); | 846 | this.seeSnackbar("No Data Available", "warning"); |
817 | } | 847 | } |
818 | }, | 848 | }, |
819 | 849 | ||
820 | closeNotice() { | 850 | closeNotice() { |
821 | this.dialogNotice = false; | 851 | this.dialogNotice = false; |
822 | }, | 852 | }, |
823 | profile() { | 853 | profile() { |
824 | // this.editedIndex = this.desserts.indexOf(item); | 854 | // this.editedIndex = this.desserts.indexOf(item); |
825 | // this.notice = Object.assign({}, item); | 855 | // this.notice = Object.assign({}, item); |
826 | // this.dialogNotice = true; | 856 | // this.dialogNotice = true; |
827 | this.$router.push("/noticeBoard"); | 857 | this.$router.push("/noticeBoard"); |
828 | }, | 858 | }, |
829 | date: function (date) { | 859 | date: function (date) { |
830 | return moment(date).format("MMMM DD, YYYY HH:mm"); | 860 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
831 | }, | 861 | }, |
832 | activityDate(date) { | 862 | activityDate(date) { |
833 | return moment(date).format("MMMM DD, YYYY"); | 863 | return moment(date).format("MMMM DD, YYYY"); |
834 | }, | 864 | }, |
835 | refreshEvents() { | 865 | refreshEvents() { |
836 | this.$refs.calendar.$emit("refetch-events"); | 866 | this.$refs.calendar.$emit("refetch-events"); |
837 | }, | 867 | }, |
838 | removeEvent() { | 868 | removeEvent() { |
839 | this.$refs.calendar.$emit("remove-event", this.selected); | 869 | this.$refs.calendar.$emit("remove-event", this.selected); |
840 | this.selected = {}; | 870 | this.selected = {}; |
841 | }, | 871 | }, |
842 | eventSelected(event) { | 872 | eventSelected(event) { |
843 | this.selected = event; | 873 | this.selected = event; |
844 | }, | 874 | }, |
845 | // eventDropStart: function(event) { | 875 | // eventDropStart: function(event) { |
846 | // event.editable = false; | 876 | // event.editable = false; |
847 | // }, | 877 | // }, |
848 | eventCreated(...test) { | 878 | eventCreated(...test) { |
849 | console.log(test); | 879 | console.log(test); |
850 | }, | 880 | }, |
851 | getStudents() { | 881 | getStudents() { |
852 | http() | 882 | http() |
853 | .get("/getStudentsList") | 883 | .get("/getStudentsList") |
854 | .then((response) => { | 884 | .then((response) => { |
855 | this.students = response.data.data; | 885 | this.students = response.data.data; |
856 | this.showLoader = false; | 886 | this.showLoader = false; |
857 | }) | 887 | }) |
858 | .catch((error) => { | 888 | .catch((error) => { |
859 | // console.log("err====>", err); | 889 | // console.log("err====>", err); |
860 | this.showLoader = false; | 890 | this.showLoader = false; |
861 | if (error.response.status === 401) { | 891 | if (error.response.status === 401) { |
862 | this.$router.replace({ path: "/" }); | 892 | this.$router.replace({ path: "/" }); |
863 | this.$store.dispatch("setToken", null); | 893 | this.$store.dispatch("setToken", null); |
864 | this.$store.dispatch("Id", null); | 894 | this.$store.dispatch("Id", null); |
865 | } | 895 | } |
866 | }); | 896 | }); |
867 | }, | 897 | }, |
868 | getParents() { | 898 | getParents() { |
869 | http() | 899 | http() |
870 | .get("/getParentsList") | 900 | .get("/getParentsList") |
871 | .then((response) => { | 901 | .then((response) => { |
872 | this.parents = response.data.data; | 902 | this.parents = response.data.data; |
873 | this.showLoader = false; | 903 | this.showLoader = false; |
874 | }) | 904 | }) |
875 | .catch((error) => { | 905 | .catch((error) => { |
876 | // console.log("err====>", err); | 906 | // console.log("err====>", err); |
877 | this.showLoader = false; | 907 | this.showLoader = false; |
878 | }); | 908 | }); |
879 | }, | 909 | }, |
880 | getTeachers() { | 910 | getTeachers() { |
881 | http() | 911 | http() |
882 | .get("/getTeachersList") | 912 | .get("/getTeachersList") |
883 | .then((response) => { | 913 | .then((response) => { |
884 | this.teachers = response.data.data; | 914 | this.teachers = response.data.data; |
885 | this.showLoader = false; | 915 | this.showLoader = false; |
886 | }) | 916 | }) |
887 | .catch((error) => { | 917 | .catch((error) => { |
888 | // console.log("err====>", err); | 918 | // console.log("err====>", err); |
889 | this.showLoader = false; | 919 | this.showLoader = false; |
890 | }); | 920 | }); |
891 | }, | 921 | }, |
892 | getClasses() { | 922 | getClasses() { |
893 | http() | 923 | http() |
894 | .get("/getClassesList") | 924 | .get("/getClassesList") |
895 | .then((response) => { | 925 | .then((response) => { |
896 | this.classes = response.data.data; | 926 | this.classes = response.data.data; |
897 | this.showLoader = false; | 927 | this.showLoader = false; |
898 | }) | 928 | }) |
899 | .catch((error) => { | 929 | .catch((error) => { |
900 | this.showLoader = false; | 930 | this.showLoader = false; |
901 | }); | 931 | }); |
902 | }, | 932 | }, |
903 | getNoticeData() { | 933 | getNoticeData() { |
904 | this.showLoader = true; | 934 | this.showLoader = true; |
905 | http() | 935 | http() |
906 | .get("/getEventsList") | 936 | .get("/getEventsList") |
907 | .then((response) => { | 937 | .then((response) => { |
908 | this.noticeData = response.data.data; | 938 | this.noticeData = response.data.data; |
909 | this.showLoader = false; | 939 | this.showLoader = false; |
910 | }) | 940 | }) |
911 | .catch((error) => { | 941 | .catch((error) => { |
912 | this.showLoader = false; | 942 | this.showLoader = false; |
913 | }); | 943 | }); |
914 | }, | 944 | }, |
915 | getUserData() { | 945 | getUserData() { |
916 | // this.showLoader = true; | 946 | // this.showLoader = true; |
917 | if (this.$store.state.role === "PARENT") { | 947 | if (this.$store.state.role === "PARENT") { |
918 | http() | 948 | http() |
919 | .get("/getParticularUserDetail", { | 949 | .get("/getParticularUserDetail", { |
920 | params: { | 950 | params: { |
921 | studentId: localStorage.getItem("parentStudentId"), | 951 | studentId: localStorage.getItem("parentStudentId"), |
922 | }, | 952 | }, |
923 | }) | 953 | }) |
924 | .then((response) => { | 954 | .then((response) => { |
925 | this.userData = response.data.data; | 955 | this.userData = response.data.data; |
926 | this.showLoader = false; | 956 | this.showLoader = false; |
927 | }) | 957 | }) |
928 | .catch((error) => { | 958 | .catch((error) => { |
929 | this.showLoader = false; | 959 | this.showLoader = false; |
930 | }); | 960 | }); |
931 | } else { | 961 | } else { |
932 | http() | 962 | http() |
933 | .get("/getParticularUserDetail") | 963 | .get("/getParticularUserDetail") |
934 | .then((response) => { | 964 | .then((response) => { |
935 | this.userData = response.data.data; | 965 | this.userData = response.data.data; |
936 | this.showLoader = false; | 966 | this.showLoader = false; |
937 | }) | 967 | }) |
938 | .catch((error) => { | 968 | .catch((error) => { |
939 | this.showLoader = false; | 969 | this.showLoader = false; |
940 | }); | 970 | }); |
941 | } | 971 | } |
942 | }, | 972 | }, |
943 | 973 | ||
944 | getFeesAndCollectionsData() { | 974 | getFeesAndCollectionsData() { |
945 | http() | 975 | http() |
946 | .get("/getTotalFeesAndCollections") | 976 | .get("/getTotalFeesAndCollections") |
947 | .then((response) => { | 977 | .then((response) => { |
948 | this.feeData = response.data.data; | 978 | this.feeData = response.data.data; |
949 | // this.collectionData = response.data.data; | 979 | // this.collectionData = response.data.data; |
950 | this.series[0].data[0] = this.feeData.totalFees; | 980 | this.series[0].data[0] = this.feeData.totalFees; |
951 | this.series[0].data[1] = this.feeData.totalCollection; | 981 | this.series[0].data[1] = this.feeData.totalCollection; |
952 | this.showLoader = false; | 982 | this.showLoader = false; |
953 | }) | 983 | }) |
954 | .catch((error) => { | 984 | .catch((error) => { |
955 | this.showLoader = false; | 985 | this.showLoader = false; |
956 | }); | 986 | }); |
957 | }, | 987 | }, |
958 | getExpensesData() { | 988 | getExpensesData() { |
959 | http() | 989 | http() |
960 | .get("/getTotalExpenses") | 990 | .get("/getTotalExpenses") |
961 | .then((response) => { | 991 | .then((response) => { |
962 | this.expenseData = response.data.data; | 992 | this.expenseData = response.data.data; |
963 | // var array = response.data.data.sum; | 993 | // var array = response.data.data.sum; |
964 | this.series[0].data[2] = this.expenseData.sum; | 994 | this.series[0].data[2] = this.expenseData.sum; |
965 | this.showChart = true; | 995 | this.showChart = true; |
966 | // this.series = [ | 996 | // this.series = [ |
967 | // { | 997 | // { |
968 | // name: "Total", | 998 | // name: "Total", |
969 | // data: array | 999 | // data: array |
970 | // } | 1000 | // } |
971 | // ]; | 1001 | // ]; |
972 | this.showLoader = false; | 1002 | this.showLoader = false; |
973 | }) | 1003 | }) |
974 | .catch((error) => { | 1004 | .catch((error) => { |
975 | this.showLoader = false; | 1005 | this.showLoader = false; |
976 | }); | 1006 | }); |
977 | }, | 1007 | }, |
978 | // async getparentStudents() { | 1008 | // async getparentStudents() { |
979 | // this.showLoader = true; | 1009 | // this.showLoader = true; |
980 | // await http() | 1010 | // await http() |
981 | // .get("/parentStudentsList") | 1011 | // .get("/parentStudentsList") |
982 | // .then((response) => { | 1012 | // .then((response) => { |
983 | 1013 | ||
984 | // /* set values in local storage */ | 1014 | // /* set values in local storage */ |
985 | // this.studentsData = response.data.data.students; | 1015 | // this.studentsData = response.data.data.students; |
986 | // this.showLoader = false; | 1016 | // this.showLoader = false; |
987 | // }) | 1017 | // }) |
988 | // .catch((err) => { | 1018 | // .catch((err) => { |
989 | // console.log("err====>", err); | 1019 | // console.log("err====>", err); |
990 | // this.showLoader = false; | 1020 | // this.showLoader = false; |
991 | // }); | 1021 | // }); |
992 | // await this.getCourses(parentStudentsId, classId); | 1022 | // await this.getCourses(parentStudentsId, classId); |
993 | // await this.getAnnoucementes(classId); | 1023 | // await this.getAnnoucementes(classId); |
994 | // }, | 1024 | // }, |
995 | async getCourses(parentStudentsId, classId) { | 1025 | async getCourses(parentStudentsId, classId) { |
996 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ | 1026 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
997 | await this.getStudentCourses({ | 1027 | await this.getStudentCourses({ |
998 | classId: localStorage.getItem("parentClassId"), | 1028 | classId: localStorage.getItem("parentClassId"), |
999 | studentId: localStorage.getItem("parentStudentId"), | 1029 | studentId: localStorage.getItem("parentStudentId"), |
1000 | }); | 1030 | }); |
1001 | }, | 1031 | }, |
1002 | getAnnoucementes(classId) { | 1032 | getAnnoucementes(classId) { |
1003 | this.showLoader = true; | 1033 | this.showLoader = true; |
1004 | http() | 1034 | http() |
1005 | .get("/getAnnoucementesList", { | 1035 | .get("/getAnnoucementesList", { |
1006 | params: { | 1036 | params: { |
1007 | classId: localStorage.getItem("parentClassId"), | 1037 | classId: localStorage.getItem("parentClassId"), |
1008 | }, | 1038 | }, |
1009 | }) | 1039 | }) |
1010 | .then((response) => { | 1040 | .then((response) => { |
1011 | this.annoucementData = response.data.data; | 1041 | this.annoucementData = response.data.data; |
1012 | this.showLoader = false; | 1042 | this.showLoader = false; |
1013 | }) | 1043 | }) |
1014 | .catch((err) => { | 1044 | .catch((err) => { |
1015 | console.log("err====>", err); | 1045 | console.log("err====>", err); |
1016 | this.showLoader = false; | 1046 | this.showLoader = false; |
1017 | }); | 1047 | }); |
1018 | }, | 1048 | }, |
1019 | async getMeetingEventes() { | 1049 | async getMeetingEventes() { |
1020 | if (this.role == "TEACHER") { | 1050 | if (this.role == "TEACHER" || this.role === "ADMIN") { |
1021 | this.showLoader = true; | 1051 | this.showLoader = true; |
1022 | await http() | 1052 | await http() |
1023 | .get("/getMeetingEventesList") | 1053 | .get("/getMeetingEventesList") |
1024 | .then((response) => { | 1054 | .then((response) => { |
1025 | var activityList = response.data.data; | 1055 | var activityList = response.data.data; |
1026 | this.activityList = activityList; | 1056 | this.activityList = activityList; |
1027 | this.showLoader = false; | 1057 | this.showLoader = false; |
1028 | 1058 | ||
1029 | /* set activityEvents array to highlight event dates in calender */ | 1059 | /* set activityEvents array to highlight event dates in calender */ |
1030 | for (var i = 0; i < this.activityList.length; i++) { | 1060 | for (var i = 0; i < this.activityList.length; i++) { |
1031 | let obj = {}; | 1061 | let obj = {}; |
1032 | obj.date = moment(this.activityList[i].dateOfEvent).format( | 1062 | obj.date = moment(this.activityList[i].dateOfEvent).format( |
1033 | "YYYY/MM/DD" | 1063 | "YYYY/MM/DD" |
1034 | ); | 1064 | ); |
1035 | obj.title = this.activityList[i].title; | 1065 | obj.title = this.activityList[i].title; |
1036 | obj._id = this.activityList[i]._id; | 1066 | obj._id = this.activityList[i]._id; |
1037 | this.activityEvents.push(obj); | 1067 | this.activityEvents.push(obj); |
1038 | } | 1068 | } |
1039 | }) | 1069 | }) |
1040 | .catch((error) => { | 1070 | .catch((error) => { |
1041 | this.showLoader = false; | 1071 | this.showLoader = false; |
1042 | }); | 1072 | }); |
1043 | } | 1073 | } |
1044 | }, | 1074 | }, |
1045 | }, | 1075 | }, |
1046 | 1076 | ||
1047 | mounted() { | 1077 | mounted() { |
1048 | // = this.$store.state.schoolToken; | 1078 | // = this.$store.state.schoolToken; |
1049 | // console.log("this.$store.state.role", this.token); | 1079 | // console.log("this.$store.state.role", this.token); |
1050 | // this.getUsersList(); | 1080 | // this.getUsersList(); |
1051 | }, | 1081 | }, |
1052 | 1082 | ||
1053 | async created() { | 1083 | async created() { |
1054 | if (this.$store.state.role === "ADMIN") { | 1084 | if (this.$store.state.role === "ADMIN") { |
1055 | // this.token = this.$store.state.token; | 1085 | // this.token = this.$store.state.token; |
1056 | await this.getFeesAndCollectionsData(); | 1086 | await this.getFeesAndCollectionsData(); |
1057 | await this.getExpensesData(); | 1087 | await this.getExpensesData(); |
1058 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { | 1088 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { |
1059 | // this.token = this.$store.state.schoolToken; | 1089 | // this.token = this.$store.state.schoolToken; |
1060 | await this.getFeesAndCollectionsData(); | 1090 | await this.getFeesAndCollectionsData(); |
1061 | await this.getExpensesData(); | 1091 | await this.getExpensesData(); |
1062 | } else if (this.$store.state.role === "TEACHER") { | 1092 | } else if (this.$store.state.role === "TEACHER") { |
1063 | // this.token = this.$store.state.token; | 1093 | // this.token = this.$store.state.token; |
1064 | } else if (this.$store.state.role === "ACCOUNTANT") { | 1094 | } else if (this.$store.state.role === "ACCOUNTANT") { |
1065 | // this.token = this.$store.state.token; | 1095 | // this.token = this.$store.state.token; |
1066 | } else if (this.$store.state.role === "LIBRARIAN") { | 1096 | } else if (this.$store.state.role === "LIBRARIAN") { |
1067 | // this.token = this.$store.state.token; | 1097 | // this.token = this.$store.state.token; |
1068 | } else if (this.$store.state.role === "PARENT") { | 1098 | } else if (this.$store.state.role === "PARENT") { |
1069 | // this.token = this.$store.state.token; | 1099 | // this.token = this.$store.state.token; |
1070 | // await this.getparentStudents(); | 1100 | // await this.getparentStudents(); |
1071 | this.studentsData = this.$store.getters.GET_STUDENTS_DATA; | 1101 | this.studentsData = this.$store.getters.GET_STUDENTS_DATA; |
1072 | console.log("students data - ", this.studentsData); | 1102 | console.log("students data - ", this.studentsData); |
1073 | await this.getCourses(); | 1103 | await this.getCourses(); |
1074 | await this.getAnnoucementes(); | 1104 | await this.getAnnoucementes(); |
1075 | } | 1105 | } |
1076 | this.role = this.$store.state.role; | 1106 | this.role = this.$store.state.role; |
1077 | 1107 | ||
1078 | await this.getStudents(); | 1108 | await this.getStudents(); |
1079 | await this.getTeachers(); | 1109 | await this.getTeachers(); |
1080 | await this.getParents(); | 1110 | await this.getParents(); |
1081 | await this.getClasses(); | 1111 | await this.getClasses(); |
1082 | await this.getNoticeData(); | 1112 | await this.getNoticeData(); |
1083 | await this.getUserData(); | 1113 | await this.getUserData(); |
1084 | 1114 | ||
1085 | /* get Latest events list for student login*/ | 1115 | /* get Latest events list for student login*/ |
1086 | if (this.$store.state.role == "PARENT") { | 1116 | if (this.$store.state.role == "PARENT") { |
1087 | let response = await this.studentMeetingEvents({ | 1117 | let response = await this.studentMeetingEvents({ |
1088 | studentId: localStorage.getItem("parentStudentId"), | 1118 | studentId: localStorage.getItem("parentStudentId"), |
1089 | }); | 1119 | }); |
1090 | this.activityList = response.data.data; | 1120 | this.activityList = response.data.data; |
1091 | 1121 | ||
1092 | /* set activityEvents array to highlight event dates in calender */ | 1122 | /* set activityEvents array to highlight event dates in calender */ |
1093 | for (var i = 0; i < this.activityList.length; i++) { | 1123 | for (var i = 0; i < this.activityList.length; i++) { |
1094 | let obj = {}; | 1124 | let obj = {}; |
1095 | obj.date = moment(this.activityList[i].meetingEvent.dateOfEvent).format( | 1125 | obj.date = moment(this.activityList[i].meetingEvent.dateOfEvent).format( |
1096 | "YYYY/MM/DD" | 1126 | "YYYY/MM/DD" |
1097 | ); | 1127 | ); |
1098 | obj.title = this.activityList[i].meetingEvent.title; | 1128 | obj.title = this.activityList[i].meetingEvent.title; |
1099 | obj._id = this.activityList[i].meetingEvent._id; | 1129 | obj._id = this.activityList[i].meetingEvent._id; |
1100 | this.activityEvents.push(obj); | 1130 | this.activityEvents.push(obj); |
1101 | } | 1131 | } |
1102 | } | 1132 | } |
1103 | 1133 | ||
1104 | /* get Latest events list for teacher login*/ | 1134 | /* get Latest events list for teacher login*/ |
1105 | if (this.role == "TEACHER") { | 1135 | if (this.role == "TEACHER" || this.role == "ADMIN") { |
src/pages/Report/admitCard.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- **** Admit Card Table **** --> | 3 | <!-- **** Admit Card 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 lg3> | 8 | <v-flex xs12 sm12 lg3> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs12 sm12 lg10 class="ml-2"> | 10 | <v-flex xs12 sm12 lg10 class="ml-2"> |
11 | <v-autocomplete | 11 | <v-autocomplete |
12 | v-model="getReport.examId" | 12 | v-model="getReport.examId" |
13 | label="Please Select Exam" | 13 | label="Please Select Exam" |
14 | :items="examData" | 14 | :items="examData" |
15 | item-text="examName" | 15 | item-text="examName" |
16 | item-value="_id" | 16 | item-value="_id" |
17 | :rules="examRules" | 17 | :rules="examRules" |
18 | @change="getExamList" | 18 | @change="getExamList" |
19 | required | 19 | required |
20 | ></v-autocomplete> | 20 | ></v-autocomplete> |
21 | </v-flex> | 21 | </v-flex> |
22 | </v-layout> | 22 | </v-layout> |
23 | </v-flex> | 23 | </v-flex> |
24 | 24 | ||
25 | <v-flex xs12 sm12 lg3 v-if="getReport.examId"> | 25 | <v-flex xs12 sm12 lg3 v-if="getReport.examId"> |
26 | <v-layout> | 26 | <v-layout> |
27 | <v-flex xs12 sm12 lg10 class="ml-2"> | 27 | <v-flex xs12 sm12 lg10 class="ml-2"> |
28 | <v-select | 28 | <v-select |
29 | v-model="getReport.classId" | 29 | v-model="getReport.classId" |
30 | label="Select your class" | 30 | label="Select your class" |
31 | type="text" | 31 | type="text" |
32 | :items="classList" | 32 | :items="classList" |
33 | item-text="classNum" | 33 | item-text="classNum" |
34 | item-value="_id" | 34 | item-value="_id" |
35 | :rules="classRules" | 35 | :rules="classRules" |
36 | @change="getSections(getReport.classId)" | 36 | @change="getSections(getReport.classId)" |
37 | required | 37 | required |
38 | ></v-select> | 38 | ></v-select> |
39 | </v-flex> | 39 | </v-flex> |
40 | </v-layout> | 40 | </v-layout> |
41 | </v-flex> | 41 | </v-flex> |
42 | <v-flex xs12 sm12 lg3 v-if="getReport.classId"> | 42 | <v-flex xs12 sm12 lg3 v-if="getReport.classId"> |
43 | <v-layout> | 43 | <v-layout> |
44 | <v-flex xs12 sm12 lg10 class="ml-2"> | 44 | <v-flex xs12 sm12 lg10 class="ml-2"> |
45 | <v-select | 45 | <v-select |
46 | :items="addSection" | 46 | :items="addSection" |
47 | label="Select your Section" | 47 | label="Select your Section" |
48 | v-model="getReport.sectionId" | 48 | v-model="getReport.sectionId" |
49 | item-text="name" | 49 | item-text="name" |
50 | item-value="_id" | 50 | item-value="_id" |
51 | name="Select Section" | 51 | name="Select Section" |
52 | @change="getStudents" | 52 | @change="getStudents" |
53 | :rules="sectionRules" | 53 | :rules="sectionRules" |
54 | required | 54 | required |
55 | ></v-select> | 55 | ></v-select> |
56 | </v-flex> | 56 | </v-flex> |
57 | </v-layout> | 57 | </v-layout> |
58 | </v-flex> | 58 | </v-flex> |
59 | <v-flex xs12 sm12 lg3 v-if="getReport.sectionId"> | 59 | <v-flex xs12 sm12 lg3 v-if="getReport.sectionId"> |
60 | <v-layout> | 60 | <v-layout> |
61 | <v-flex xs12 sm12 lg10 class="ml-2"> | 61 | <v-flex xs12 sm12 lg10 class="ml-2"> |
62 | <v-select | 62 | <v-select |
63 | :items="getStudentsList" | 63 | :items="getStudentsList" |
64 | label="Select your student" | 64 | label="Select your student" |
65 | v-model="getReport.studentId" | 65 | v-model="getReport.studentId" |
66 | item-text="name" | 66 | item-text="name" |
67 | item-value="_id" | 67 | item-value="_id" |
68 | :rules="studentRules" | 68 | :rules="studentRules" |
69 | required | 69 | required |
70 | ></v-select> | 70 | ></v-select> |
71 | </v-flex> | 71 | </v-flex> |
72 | </v-layout> | 72 | </v-layout> |
73 | </v-flex> | 73 | </v-flex> |
74 | 74 | ||
75 | <v-flex xs12 sm12 lg3> | 75 | <v-flex xs12 sm12 lg3> |
76 | <v-layout> | 76 | <v-layout> |
77 | <v-flex xs12 sm12 lg10 class="ml-2"> | 77 | <v-flex xs12 sm12 lg10 class="ml-2"> |
78 | <v-autocomplete | 78 | <v-autocomplete |
79 | label="Please Select View Type" | 79 | label="Please Select View Type" |
80 | type="text" | 80 | type="text" |
81 | :rules="typeRules" | 81 | :rules="typeRules" |
82 | :items="typeList" | 82 | :items="typeList" |
83 | v-model="getReport.form" | 83 | v-model="getReport.form" |
84 | item-text="name" | 84 | item-text="name" |
85 | item-value="value" | 85 | item-value="value" |
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 lg3> | 91 | <v-flex xs12 sm12 lg3> |
92 | <v-btn | 92 | <v-btn |
93 | @click="getSchedule" | 93 | @click="getSchedule" |
94 | round | 94 | round |
95 | dark | 95 | dark |
96 | :loading="loading" | 96 | :loading="loading" |
97 | class="open-dialog-button mt-3" | 97 | class="open-dialog-button mt-3" |
98 | >Get Report</v-btn> | 98 | >Get Report</v-btn> |
99 | </v-flex> | 99 | </v-flex> |
100 | </v-layout> | 100 | </v-layout> |
101 | </v-flex> | 101 | </v-flex> |
102 | </v-form> | 102 | </v-form> |
103 | </v-card> | 103 | </v-card> |
104 | <div v-show="showTable"> | 104 | <div v-show="showTable"> |
105 | <v-flex xs12 sm12 md10 style="margin:auto"> | 105 | <v-flex xs12 sm12 md10 style="margin:auto"> |
106 | <v-layout> | 106 | <v-layout> |
107 | <v-flex xs12> | 107 | <v-flex xs12> |
108 | <v-btn class="open-dialog-button right" round dark @click="printAdmitReport()"> | 108 | <v-btn class="open-dialog-button right" round dark @click="printAdmitReport()"> |
109 | 109 | ||
110 | <v-icon right dark>print</v-icon> | 110 | <v-icon right dark>print</v-icon> |
111 | </v-btn> | 111 | </v-btn> |
112 | </v-flex> | 112 | </v-flex> |
113 | </v-layout> | 113 | </v-layout> |
114 | <div id="printMe" v-if="frontPart"> | 114 | <div id="printMe" v-if="frontPart"> |
115 | <v-card | 115 | <v-card |
116 | style=" | 116 | style=" |
117 | background-color: #fff; | 117 | background-color: #fff; |
118 | border: 1px solid #ddd; | 118 | border: 1px solid #ddd; |
119 | color: rgba(0,0,0,0.87); | 119 | color: rgba(0,0,0,0.87); |
120 | overflow-x: auto; | 120 | overflow-x: auto; |
121 | display: block; | 121 | display: block; |
122 | padding:14px !important; | 122 | padding:14px !important; |
123 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; | 123 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; |
124 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" | 124 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" |
125 | > | 125 | > |
126 | <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto"> | 126 | <v-layout style="border-bottom: 1px solid #ddd;margin: 8px; auto"> |
127 | <v-flex xs3 style="margin-bottom:0px"> | 127 | <v-flex xs3 style="margin-bottom:0px"> |
128 | <img | 128 | <img |
129 | :src="userData.schoolLogoUrl" | 129 | :src="userData.schoolLogoUrl" |
130 | style="widht:80px;height:80px;" | 130 | style="widht:80px;height:80px;" |
131 | alt="logo" | 131 | alt="logo" |
132 | v-if="userData.schoolLogoUrl" | 132 | v-if="userData.schoolLogoUrl" |
133 | /> | 133 | /> |
134 | <img | 134 | <img |
135 | src="/static/default_thumb.png" | 135 | src="/static/default_thumb.png" |
136 | style="widht:80px;height:80px;" | 136 | style="widht:80px;height:80px;" |
137 | v-else-if="!userData.schoolLogoUrl" | 137 | v-else-if="!userData.schoolLogoUrl" |
138 | /> | 138 | /> |
139 | <div class="school-name"> | ||
140 | <h3>{{ schoolData.address }}</h3> | ||
141 | <p>{{ schoolData.mobile }}</p> | ||
142 | </div> | ||
139 | </v-flex> | 143 | </v-flex> |
140 | <v-flex xs5 style="text-align:center;margin-bottom:0px"> | 144 | <v-flex xs5 style="text-align:center;margin-bottom:0px"> |
141 | <p | 145 | <p |
142 | style="font-size:24px;color: #700CE8;letter-spacing:1px;margin-bottom: 4px" | 146 | style="font-size:24px;color: #700CE8;letter-spacing:1px;margin-bottom: 4px" |
143 | >{{ userData.name }}</p> | 147 | >{{ schoolData.name }}</p> |
144 | <p>{{ userData.address }} {{ userData.pinCode }}</p> | 148 | <p>{{ schoolData.email }}</p> |
149 | |||
145 | <div> | 150 | <div> |
146 | <h4>{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card</h4> | 151 | <h4>{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card</h4> |
147 | </div> | 152 | </div> |
148 | </v-flex> | 153 | </v-flex> |
149 | <v-flex xs4 style="text-align:center;margin-bottom:0px"> | 154 | <v-flex xs4 style="text-align:center;margin-bottom:0px"> |
150 | <!-- <img | 155 | <!-- <img |
151 | v-if="getScheduleList.studentData.profilePicUrl" | 156 | v-if="getScheduleList.studentData.profilePicUrl" |
152 | :src="getScheduleList.studentData.profilePicUrl" | 157 | :src="getScheduleList.studentData.profilePicUrl" |
153 | style="widht:80px;height:80px;" | 158 | style="widht:80px;height:80px;" |
154 | /> | 159 | /> |
155 | <img | 160 | <img |
156 | v-if="!getScheduleList.studentData.profilePicUrl" | 161 | v-if="!getScheduleList.studentData.profilePicUrl" |
157 | src="/static/icon/user.png" | 162 | src="/static/icon/user.png" |
158 | style="widht:80px;" | 163 | style="widht:80px;" |
159 | />--> | 164 | />--> |
160 | <img | 165 | <img |
161 | src="/static/icon/user.png" | 166 | src="/static/icon/user.png" |
162 | v-if="!getScheduleList.studentData.profilePicUrl" | 167 | v-if="!getScheduleList.studentData.profilePicUrl" |
163 | width="80" | 168 | width="80" |
164 | /> | 169 | /> |
165 | <img | 170 | <img |
166 | :src="getScheduleList.studentData.profilePicUrl" | 171 | :src="getScheduleList.studentData.profilePicUrl" |
167 | onerror="this.src='/static/icon/user.png';" | 172 | onerror="this.src='/static/icon/user.png';" |
168 | v-if="getScheduleList.studentData.profilePicUrl" | 173 | v-if="getScheduleList.studentData.profilePicUrl" |
169 | width="80" | 174 | width="80" |
170 | /> | 175 | /> |
171 | </v-flex> | 176 | </v-flex> |
172 | </v-layout> | 177 | </v-layout> |
173 | <v-layout> | 178 | <v-layout> |
174 | <v-flex xs5 style="margin-bottom:10px"> | 179 | <v-flex xs5 style="margin-bottom:10px"> |
175 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> | 180 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> |
176 | <b>Name :</b> | 181 | <b>Name :</b> |
177 | <span>{{getScheduleList.studentData.name}}</span> | 182 | <span>{{getScheduleList.studentData.name}}</span> |
178 | </p> | 183 | </p> |
179 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> | 184 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> |
180 | <b>Class :</b> | 185 | <b>Class :</b> |
181 | <span>{{getScheduleList.studentData.classId.classNum}}</span> | 186 | <span>{{getScheduleList.studentData.classId.classNum}}</span> |
182 | </p> | 187 | </p> |
183 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> | 188 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> |
184 | <b>Roll :</b> | 189 | <b>Roll :</b> |
185 | <span>{{getScheduleList.studentData.rollNo}}</span> | 190 | <span>{{getScheduleList.studentData.rollNo}}</span> |
186 | </p> | 191 | </p> |
187 | </v-flex> | 192 | </v-flex> |
188 | <v-flex xs5 style="margin-bottom:10px"> | 193 | <v-flex xs5 style="margin-bottom:10px"> |
189 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> | 194 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> |
190 | <b>Section :</b> | 195 | <b>Section :</b> |
191 | <span>{{getScheduleList.studentData.sectionId.name }}</span> | 196 | <span>{{getScheduleList.studentData.sectionId.name }}</span> |
192 | </p> | 197 | </p> |
193 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> | 198 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;"> |
194 | <b>Blood Group :</b> | 199 | <b>Blood Group :</b> |
195 | <span style="color: #707478">{{getScheduleList.studentData.bloodGroup }}</span> | 200 | <span style="color: #707478">{{getScheduleList.studentData.bloodGroup }}</span> |
196 | </p> | 201 | </p> |
197 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;">Subject in which Appearing</p> | 202 | <p style="font-size: 16px;margin:0px;margin-bottom:8px;">Subject in which Appearing</p> |
198 | </v-flex> | 203 | </v-flex> |
199 | </v-layout> | 204 | </v-layout> |
200 | <table | 205 | <table |
201 | class="mb-5 tableRsponsive feeTypeTable" | 206 | class="mb-5 tableRsponsive feeTypeTable" |
202 | style="border: 1px solid lightgrey; | 207 | style="border: 1px solid lightgrey; |
203 | border-collapse: collapse;!important | 208 | border-collapse: collapse;!important |
204 | table-layout: auto !important; | 209 | table-layout: auto !important; |
205 | width: 100% !important;" | 210 | width: 100% !important;" |
206 | > | 211 | > |
207 | <thead style="border: 1px solid lightgrey !important;"> | 212 | <thead style="border: 1px solid lightgrey !important;"> |
208 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 213 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
209 | <td style="border: 1px solid lightgrey !important;padding: 6px;">No</td> | 214 | <td style="border: 1px solid lightgrey !important;padding: 6px;">No</td> |
210 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Exam Date</td> | 215 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Exam Date</td> |
211 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Start Time</td> | 216 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Start Time</td> |
212 | <td style="border: 1px solid lightgrey !important;padding: 6px;">End Time</td> | 217 | <td style="border: 1px solid lightgrey !important;padding: 6px;">End Time</td> |
213 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Subject Name</td> | 218 | <td style="border: 1px solid lightgrey !important;padding: 6px;">Subject Name</td> |
214 | </tr> | 219 | </tr> |
215 | </thead> | 220 | </thead> |
216 | <tbody style="border: 1px solid lightgrey !important;"> | 221 | <tbody style="border: 1px solid lightgrey !important;"> |
217 | <tr v-for="(scheduleData,i) in getScheduleList.scheduleData" :key="i"> | 222 | <tr v-for="(scheduleData,i) in getScheduleList.scheduleData" :key="i"> |
218 | <td style="border:1px solid lightgrey !important; padding:6px;">{{ i + 1 }}</td> | 223 | <td style="border:1px solid lightgrey !important; padding:6px;">{{ i + 1 }}</td> |
219 | <td | 224 | <td |
220 | style="border: 1px solid lightgrey !important;padding: 6px;" | 225 | style="border: 1px solid lightgrey !important;padding: 6px;" |
221 | >{{ scheduleData.date ? scheduleData.date : '-' }}</td> | 226 | >{{ scheduleData.date ? scheduleData.date : '-' }}</td> |
222 | <td | 227 | <td |
223 | style="border: 1px solid lightgrey !important;padding: 6px;" | 228 | style="border: 1px solid lightgrey !important;padding: 6px;" |
224 | >{{ scheduleData.timeFrom ? scheduleData.timeFrom : "-" }}</td> | 229 | >{{ scheduleData.timeFrom ? scheduleData.timeFrom : "-" }}</td> |
225 | <td | 230 | <td |
226 | style="border: 1px solid lightgrey !important;padding: 6px;" | 231 | style="border: 1px solid lightgrey !important;padding: 6px;" |
227 | >{{ scheduleData.timeTo ? scheduleData.timeTo : "-"}}</td> | 232 | >{{ scheduleData.timeTo ? scheduleData.timeTo : "-"}}</td> |
228 | <td | 233 | <td |
229 | style="border: 1px solid lightgrey !important;padding: 6px;" | 234 | style="border: 1px solid lightgrey !important;padding: 6px;" |
230 | >{{ scheduleData.subjectName ? scheduleData.subjectName : "-" }}</td> | 235 | >{{ scheduleData.subjectName ? scheduleData.subjectName : "-" }}</td> |
231 | </tr> | 236 | </tr> |
232 | <tr v-if="getScheduleList.scheduleData.length === 0"> | 237 | <tr v-if="getScheduleList.scheduleData.length === 0"> |
233 | <td style="border: 1px soild lightgrey !importand;padding:6px;">-</td> | 238 | <td style="border: 1px soild lightgrey !importand;padding:6px;">-</td> |
234 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> | 239 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> |
235 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> | 240 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> |
236 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> | 241 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> |
237 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> | 242 | <td style="border: 1px solid lightgrey !important;padding: 6px;">-</td> |
238 | </tr> | 243 | </tr> |
239 | </tbody> | 244 | </tbody> |
240 | </table> | 245 | </table> |
241 | </v-card> | 246 | </v-card> |
242 | </div> | 247 | </div> |
243 | <div id="printMe" v-if="backPart"> | 248 | <div id="printMe" v-if="backPart"> |
244 | <v-card | 249 | <v-card |
245 | style=" | 250 | style=" |
246 | text-align:center | 251 | text-align:center |
247 | background-color: #fff; | 252 | background-color: #fff; |
248 | border: 1px solid #ddd; | 253 | border: 1px solid #ddd; |
249 | color: rgba(0,0,0,0.87); | 254 | color: rgba(0,0,0,0.87); |
250 | overflow-x: auto; | 255 | overflow-x: auto; |
251 | display: block; | 256 | display: block; |
252 | padding:14px !important; | 257 | padding:14px !important; |
253 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; | 258 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; |
254 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" | 259 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" |
255 | > | 260 | > |
256 | <div | 261 | <div |
257 | style=" | 262 | style=" |
258 | margin-bottom: 16px; | 263 | margin-bottom: 16px; |
259 | overflow: hidden; | 264 | overflow: hidden; |
260 | padding: 50px 90px;" | 265 | padding: 50px 90px;" |
261 | > | 266 | > |
262 | <ol style=" | 267 | <ol style=" |
263 | margin: 0; | 268 | margin: 0; |
264 | margin-bottom: 10px;"> | 269 | margin-bottom: 10px;"> |
265 | <p | 270 | <p |
266 | style=" | 271 | style=" |
267 | margin-bottom: 16px; | 272 | margin-bottom: 16px; |
268 | line-height: 20px; | 273 | line-height: 20px; |
269 | text-align: left;" | 274 | text-align: left;" |
270 | > | 275 | > |
271 | <b>1. Do not Carry these Electronic Gadgets:</b> | 276 | <b>1. Do not Carry these Electronic Gadgets:</b> |
272 | Electronic gadgets(Bluetooth devices,head phones,pen/buttonhole cameras,scanner,calculator,storage devices etc) | 277 | Electronic gadgets(Bluetooth devices,head phones,pen/buttonhole cameras,scanner,calculator,storage devices etc) |
273 | in the examination lab. These items are strictly prohibited from examination lab. | 278 | in the examination lab. These items are strictly prohibited from examination lab. |
274 | </p> | 279 | </p> |
275 | <p | 280 | <p |
276 | style=" | 281 | style=" |
277 | margin-bottom: 16px; | 282 | margin-bottom: 16px; |
278 | line-height: 20px; | 283 | line-height: 20px; |
279 | text-align: left;" | 284 | text-align: left;" |
280 | > | 285 | > |
281 | <b>2. Do not Carry these Ornaments:</b> | 286 | <b>2. Do not Carry these Ornaments:</b> |
282 | Candidates should also not wear charms,veil,items containing such as rings,bracelet,earings,nose-pin,chains, | 287 | Candidates should also not wear charms,veil,items containing such as rings,bracelet,earings,nose-pin,chains, |
283 | necklace,pendants,badge,broach,hair-pin,hair-band. | 288 | necklace,pendants,badge,broach,hair-pin,hair-band. |
284 | </p> | 289 | </p> |
285 | <p | 290 | <p |
286 | style=" | 291 | style=" |
287 | margin-bottom: 16px; | 292 | margin-bottom: 16px; |
288 | line-height: 20px; | 293 | line-height: 20px; |
289 | text-align: left;" | 294 | text-align: left;" |
290 | > | 295 | > |
291 | <b>3. What Candidates wear to Examination hall:</b> | 296 | <b>3. What Candidates wear to Examination hall:</b> |
292 | Candidates should not wear clothes with full sleeves or big button,etc. Candidates are adviced to wear open footwear | 297 | Candidates should not wear clothes with full sleeves or big button,etc. Candidates are adviced to wear open footwear |
293 | like slippers,sandals instead of shoes as the candidates could be asked to remove shoes by the frisking staff. | 298 | like slippers,sandals instead of shoes as the candidates could be asked to remove shoes by the frisking staff. |
294 | </p> | 299 | </p> |
295 | <p | 300 | <p |
296 | style=" | 301 | style=" |
297 | margin-bottom: 16px; | 302 | margin-bottom: 16px; |
298 | line-height: 20px; | 303 | line-height: 20px; |
299 | text-align: left;" | 304 | text-align: left;" |
300 | > | 305 | > |
301 | <b>4. Do not carry Stationary:</b> | 306 | <b>4. Do not carry Stationary:</b> |
302 | Pen/pencil and paper for rough work would be provided in examination lab. Electronic watch (timer)will be available | 307 | Pen/pencil and paper for rough work would be provided in examination lab. Electronic watch (timer)will be available |
303 | on the computer screen alloted to the candidates. | 308 | on the computer screen alloted to the candidates. |
304 | </p> | 309 | </p> |
305 | <p | 310 | <p |
306 | style=" | 311 | style=" |
307 | margin-bottom: 16px; | 312 | margin-bottom: 16px; |
308 | line-height: 20px; | 313 | line-height: 20px; |
309 | text-align: left;" | 314 | text-align: left;" |
310 | > | 315 | > |
311 | <b>5. Do not Carry Bags:</b> | 316 | <b>5. Do not Carry Bags:</b> |
312 | Don not Carry back pack, College bag or any other bag like hand bag. If candidates brings any bag, they must make a | 317 | Don not Carry back pack, College bag or any other bag like hand bag. If candidates brings any bag, they must make a |
313 | arrangement for safe custody of these items.The Commission shall not make any arrangement nor be responsible for the | 318 | arrangement for safe custody of these items.The Commission shall not make any arrangement nor be responsible for the |
314 | safe custody of such items. | 319 | safe custody of such items. |
315 | </p> | 320 | </p> |
316 | <p | 321 | <p |
317 | style=" | 322 | style=" |
318 | margin-bottom: 16px; | 323 | margin-bottom: 16px; |
319 | line-height: 20px; | 324 | line-height: 20px; |
320 | text-align: left;" | 325 | text-align: left;" |
321 | > | 326 | > |
322 | <b>6. What will Happen if you carry Prohibited items to Exam Hall:</b> | 327 | <b>6. What will Happen if you carry Prohibited items to Exam Hall:</b> |
323 | If any such prohibited item is found in the possession of a candidate in examination lab, his/her candidature is liable | 328 | If any such prohibited item is found in the possession of a candidate in examination lab, his/her candidature is liable |
324 | to be canceled and legal/criminal proceedings could be initiated against him/her. He/she would also liable to be debarred | 329 | to be canceled and legal/criminal proceedings could be initiated against him/her. He/she would also liable to be debarred |
325 | from appearing in future examinations of the Commission for a period of 3 years. | 330 | from appearing in future examinations of the Commission for a period of 3 years. |
326 | </p> | 331 | </p> |
327 | <p | 332 | <p |
328 | style=" | 333 | style=" |
329 | margin-bottom: 16px; | 334 | margin-bottom: 16px; |
330 | line-height: 20px; | 335 | line-height: 20px; |
331 | text-align: left; | 336 | text-align: left; |
332 | " | 337 | " |
333 | > | 338 | > |
334 | <b>7. Candidate should not create Disturbance in Exam Hall:</b> | 339 | <b>7. Candidate should not create Disturbance in Exam Hall:</b> |
335 | If any candidate is found obstructing the conduct of examination or creating disturbances at the examination venue, | 340 | If any candidate is found obstructing the conduct of examination or creating disturbances at the examination venue, |
336 | his/her candidature shall be summarily canceled. | 341 | his/her candidature shall be summarily canceled. |
337 | </p> | 342 | </p> |
338 | </ol> | 343 | </ol> |
339 | </div> | 344 | </div> |
340 | </v-card> | 345 | </v-card> |
341 | </div> | 346 | </div> |
342 | </v-flex> | 347 | </v-flex> |
343 | </div> | 348 | </div> |
344 | <v-snackbar | 349 | <v-snackbar |
345 | :timeout="timeout" | 350 | :timeout="timeout" |
346 | :top="y === 'top'" | 351 | :top="y === 'top'" |
347 | :right="x === 'right'" | 352 | :right="x === 'right'" |
348 | :vertical="mode === 'vertical'" | 353 | :vertical="mode === 'vertical'" |
349 | v-model="snackbar" | 354 | v-model="snackbar" |
350 | :color="color" | 355 | :color="color" |
351 | >{{ text }}</v-snackbar> | 356 | >{{ text }}</v-snackbar> |
352 | <div class="loader" v-if="showLoader"> | 357 | <div class="loader" v-if="showLoader"> |
353 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 358 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
354 | </div> | 359 | </div> |
355 | </v-container> | 360 | </v-container> |
356 | </template> | 361 | </template> |
357 | <script> | 362 | <script> |
358 | import http from "@/Services/http.js"; | 363 | import http from "@/Services/http.js"; |
359 | import moment from "moment"; | 364 | import moment from "moment"; |
360 | import _ from "underscore"; | 365 | import _ from "underscore"; |
366 | var qs = require("qs"); | ||
361 | 367 | ||
362 | export default { | 368 | export default { |
363 | data: () => ({ | 369 | data: () => ({ |
364 | snackbar: false, | 370 | snackbar: false, |
365 | color: "", | 371 | color: "", |
366 | y: "top", | 372 | y: "top", |
367 | x: "right", | 373 | x: "right", |
368 | mode: "", | 374 | mode: "", |
369 | timeout: 10000, | 375 | timeout: 10000, |
370 | text: "", | 376 | text: "", |
371 | showLoader: false, | 377 | showLoader: false, |
372 | valid: true, | 378 | valid: true, |
373 | userData: {}, | 379 | userData: {}, |
374 | frontPart: false, | 380 | frontPart: false, |
375 | backPart: false, | 381 | backPart: false, |
376 | loading: false, | 382 | loading: false, |
377 | showTable: false, | 383 | showTable: false, |
378 | showData: false, | 384 | showData: false, |
379 | hideprintAdmitReport: false, | 385 | hideprintAdmitReport: false, |
380 | examRules: [(v) => !!v || "Exam Field is required"], | 386 | examRules: [(v) => !!v || "Exam Field is required"], |
381 | classRules: [(v) => !!v || "Class Field Required"], | 387 | classRules: [(v) => !!v || "Class Field Required"], |
382 | sectionRules: [(v) => !!v || "Section Field is required"], | 388 | sectionRules: [(v) => !!v || "Section Field is required"], |
383 | studentRules: [(v) => !!v || "Student Field is required"], | 389 | studentRules: [(v) => !!v || "Student Field is required"], |
384 | typeRules: [(v) => !!v || "Type Field is required"], | 390 | typeRules: [(v) => !!v || "Type Field is required"], |
385 | backgroundRules: [(v) => !!v || "Background Field is required"], | 391 | backgroundRules: [(v) => !!v || "Background Field is required"], |
386 | 392 | ||
387 | pagination: { | 393 | pagination: { |
388 | rowsPerPage: 10, | 394 | rowsPerPage: 10, |
389 | }, | 395 | }, |
390 | search: "", | 396 | search: "", |
391 | 397 | ||
392 | classList: [], | 398 | classList: [], |
393 | studentData: {}, | 399 | studentData: {}, |
394 | scheduleData: {}, | 400 | scheduleData: {}, |
395 | examData: [], | 401 | examData: [], |
396 | addSection: [], | 402 | addSection: [], |
397 | getStudentsList: [], | 403 | getStudentsList: [{ name: "Select All", _id: "selectAll" }], |
398 | getScheduleList: [], | 404 | getScheduleList: [], |
399 | getScheduleListArray: [], | 405 | getScheduleListArray: [], |
400 | getReport: {}, | 406 | getReport: {}, |
401 | examName: [], | 407 | examName: [], |
402 | typeList: [ | 408 | typeList: [ |
403 | { | 409 | { |
404 | name: "Front Part", | 410 | name: "Front Part", |
405 | value: "frontPart", | 411 | value: "frontPart", |
406 | }, | 412 | }, |
407 | { | 413 | { |
408 | name: "Back Part", | 414 | name: "Back Part", |
409 | value: "backPart", | 415 | value: "backPart", |
410 | }, | 416 | }, |
411 | ], | 417 | ], |
412 | backgroundList: ["Yes", "No"], | 418 | backgroundList: ["Yes", "No"], |
413 | headers: [ | 419 | headers: [ |
414 | { | 420 | { |
415 | text: "No", | 421 | text: "No", |
416 | align: "", | 422 | align: "", |
417 | sortable: false, | 423 | sortable: false, |
418 | value: "No", | 424 | value: "No", |
419 | }, | 425 | }, |
420 | { | 426 | { |
421 | text: "Exam Date", | 427 | text: "Exam Date", |
422 | align: "center", | 428 | align: "center", |
423 | sortable: false, | 429 | sortable: false, |
424 | value: "date", | 430 | value: "date", |
425 | }, | 431 | }, |
426 | { | 432 | { |
427 | text: "Start Time", | 433 | text: "Start Time", |
428 | align: "center", | 434 | align: "center", |
429 | sortable: false, | 435 | sortable: false, |
430 | value: "timeFrom", | 436 | value: "timeFrom", |
431 | }, | 437 | }, |
432 | { | 438 | { |
433 | text: "End Time", | 439 | text: "End Time", |
434 | align: "center", | 440 | align: "center", |
435 | sortable: false, | 441 | sortable: false, |
436 | value: "timeTo", | 442 | value: "timeTo", |
437 | }, | 443 | }, |
438 | { | 444 | { |
439 | text: "Subject Name", | 445 | text: "Subject Name", |
440 | align: "center", | 446 | align: "center", |
441 | sortable: false, | 447 | sortable: false, |
442 | value: "subjectName", | 448 | value: "subjectName", |
443 | }, | 449 | }, |
444 | ], | 450 | ], |
445 | }), | 451 | }), |
446 | 452 | ||
447 | mounted() { | 453 | mounted() { |
448 | this.token = this.$store.state.token; | 454 | this.token = this.$store.state.token; |
449 | this.getClass(); | 455 | this.getClass(); |
450 | this.getExamList(); | 456 | this.getExamList(); |
451 | this.getUserData(); | 457 | this.getUserData(); |
452 | }, | 458 | }, |
453 | 459 | ||
454 | methods: { | 460 | methods: { |
455 | getExamList() { | 461 | getExamList() { |
456 | this.showLoader = true; | 462 | this.showLoader = true; |
457 | this.loadingSearch = true; | 463 | this.loadingSearch = true; |
458 | http() | 464 | http() |
459 | .get("/getExamsList", { | 465 | .get("/getExamsList", { |
460 | headers: { Authorization: "Bearer " + this.token }, | 466 | headers: { Authorization: "Bearer " + this.token }, |
461 | }) | 467 | }) |
462 | .then((response) => { | 468 | .then((response) => { |
463 | this.examData = response.data.data; | 469 | this.examData = response.data.data; |
464 | this.showLoader = false; | 470 | this.showLoader = false; |
465 | this.loadingSearch = false; | 471 | this.loadingSearch = false; |
466 | }) | 472 | }) |
467 | .catch((error) => { | 473 | .catch((error) => { |
468 | this.showLoader = false; | 474 | this.showLoader = false; |
469 | this.loadingSearch = false; | 475 | this.loadingSearch = false; |
470 | this.snackbar = true; | 476 | this.snackbar = true; |
471 | this.text = error.response.data.message; | 477 | this.text = error.response.data.message; |
472 | if (error.response.status === 401) { | 478 | if (error.response.status === 401) { |
473 | this.$router.replace({ path: "/" }); | 479 | this.$router.replace({ path: "/" }); |
474 | this.$store.dispatch("setToken", null); | 480 | this.$store.dispatch("setToken", null); |
475 | this.$store.dispatch("Id", null); | 481 | this.$store.dispatch("Id", null); |
476 | } | 482 | } |
477 | }); | 483 | }); |
478 | }, | 484 | }, |
479 | getClass() { | 485 | getClass() { |
480 | this.showLoader = true; | 486 | this.showLoader = true; |
481 | http() | 487 | http() |
482 | .get("/getClassesList", { | 488 | .get("/getClassesList", { |
483 | headers: { Authorization: "Bearer " + this.token }, | 489 | headers: { Authorization: "Bearer " + this.token }, |
484 | }) | 490 | }) |
485 | .then((response) => { | 491 | .then((response) => { |
486 | this.classList = response.data.data; | 492 | this.classList = response.data.data; |
487 | this.showLoader = false; | 493 | this.showLoader = false; |
488 | }) | 494 | }) |
489 | .catch((error) => { | 495 | .catch((error) => { |
490 | this.showLoader = false; | 496 | this.showLoader = false; |
491 | // console.log("err====>", err); | 497 | // console.log("err====>", err); |
492 | }); | 498 | }); |
493 | }, | 499 | }, |
494 | getSections(_id) { | 500 | getSections(_id) { |
495 | this.showLoader = true; | 501 | this.showLoader = true; |
496 | http() | 502 | http() |
497 | .get( | 503 | .get( |
498 | "/getSectionsList", | 504 | "/getSectionsList", |
499 | { params: { classId: _id } }, | 505 | { params: { classId: _id } }, |
500 | { | 506 | { |
501 | headers: { Authorization: "Bearer " + this.token }, | 507 | headers: { Authorization: "Bearer " + this.token }, |
502 | } | 508 | } |
503 | ) | 509 | ) |
504 | .then((response) => { | 510 | .then((response) => { |
505 | this.addSection = response.data.data; | 511 | this.addSection = response.data.data; |
506 | this.showLoader = false; | 512 | this.showLoader = false; |
507 | }) | 513 | }) |
508 | .catch((err) => { | 514 | .catch((err) => { |
509 | this.showLoader = false; | 515 | this.showLoader = false; |
510 | // console.log("err====>", err); | 516 | // console.log("err====>", err); |
511 | }); | 517 | }); |
512 | }, | 518 | }, |
513 | getStudents() { | 519 | getStudents() { |
514 | this.showLoader = true; | 520 | this.showLoader = true; |
515 | http() | 521 | http() |
516 | .get("/getStudentWithClass", { | 522 | .get("/getStudentWithClass", { |
517 | params: { | 523 | params: { |
518 | classId: this.getReport.classId, | 524 | classId: this.getReport.classId, |
519 | sectionId: this.getReport.sectionId, | 525 | sectionId: this.getReport.sectionId, |
520 | }, | 526 | }, |
521 | }) | 527 | }) |
522 | .then((response) => { | 528 | .then((response) => { |
523 | this.getStudentsList = response.data.data; | 529 | for (var i = 0; i < response.data.data.length; i++) { |
530 | this.getStudentsList.push(response.data.data[i]); | ||
531 | } | ||
532 | |||
524 | this.showLoader = false; | 533 | this.showLoader = false; |
525 | }) | 534 | }) |
526 | .catch((error) => { | 535 | .catch((error) => { |
527 | console.log("err====>", error); | 536 | console.log("err====>", error); |
528 | this.showLoader = false; | 537 | this.showLoader = false; |
529 | }); | 538 | }); |
530 | }, | 539 | }, |
531 | getSchedule() { | 540 | getSchedule() { |
532 | if (this.$refs.form.validate()) { | 541 | if (this.$refs.form.validate()) { |
533 | this.showLoader = true; | 542 | this.showLoader = true; |
543 | let studentId = []; | ||
544 | if (this.getReport.studentId == "selectAll") { | ||
545 | studentId = []; | ||
546 | for (var i = 1; i < this.getStudentsList.length; i++) { | ||
547 | studentId.push(this.getStudentsList[i]._id); | ||
548 | } | ||
549 | } else { | ||
550 | studentId = this.getReport.studentId; | ||
551 | } | ||
552 | console.log("this.getReport.studentId - ", studentId); | ||
534 | http() | 553 | http() |
535 | .get("/getScheduleForParticularStudent", { | 554 | .get("/getScheduleForParticularStudent", { |
536 | params: { | 555 | params: { |
537 | examId: this.getReport.examId, | 556 | examId: this.getReport.examId, |
538 | classId: this.getReport.classId, | 557 | classId: this.getReport.classId, |
539 | sectionId: this.getReport.sectionId, | 558 | sectionId: this.getReport.sectionId, |
540 | studentId: this.getReport.studentId, | 559 | studentId: studentId, |
560 | }, | ||
561 | paramsSerializer: (params) => { | ||
562 | return qs.stringify(params); | ||
541 | }, | 563 | }, |
542 | }) | 564 | }) |
543 | .then((response) => { | 565 | .then((response) => { |
544 | this.showTable = true; | 566 | this.showTable = true; |
545 | this.getScheduleList = response.data.data; | 567 | this.getScheduleList = response.data.data; |
568 | this.schoolData = response.data.data.studentData.schoolId; | ||
546 | if (response.data.data.scheduleData.length === 0) { | 569 | if (response.data.data.scheduleData.length === 0) { |
547 | this.showLoader = false; | 570 | this.showLoader = false; |
548 | this.snackbar = true; | 571 | this.snackbar = true; |
549 | this.text = "Data not found!"; | 572 | this.text = "Data not found!"; |
550 | this.color = "error"; | 573 | this.color = "error"; |
551 | return; | 574 | return; |
552 | } | 575 | } |
553 | this.showData = true; | 576 | this.showData = true; |
554 | if (this.getReport.form === "frontPart") { | 577 | if (this.getReport.form === "frontPart") { |
555 | this.frontPart = true; | 578 | this.frontPart = true; |
556 | this.backPart = false; | 579 | this.backPart = false; |
557 | } | 580 | } |
558 | if (this.getReport.form === "backPart") { | 581 | if (this.getReport.form === "backPart") { |
559 | this.frontPart = false; | 582 | this.frontPart = false; |
560 | this.backPart = true; | 583 | this.backPart = true; |
561 | } | 584 | } |
562 | this.showLoader = false; | 585 | this.showLoader = false; |
563 | }) | 586 | }) |
564 | .catch((error) => { | 587 | .catch((error) => { |
565 | this.showLoader = false; | 588 | this.showLoader = false; |
566 | }); | 589 | }); |
567 | } | 590 | } |
568 | }, | 591 | }, |
569 | 592 | ||
570 | printAdmitReport() { | 593 | printAdmitReport() { |
571 | // Pass the element id here | 594 | // Pass the element id here |
572 | this.$htmlToPaper("printMe"); | 595 | this.$htmlToPaper("printMe"); |
573 | }, | 596 | }, |
574 | getUserData() { | 597 | getUserData() { |
575 | http() | 598 | http() |
576 | .get("/getParticularUserDetail") | 599 | .get("/getParticularUserDetail") |
577 | .then((response) => { | 600 | .then((response) => { |
578 | this.userData = response.data.data; | 601 | this.userData = response.data.data; |
579 | }) | 602 | }) |
580 | .catch((error) => { | 603 | .catch((error) => { |
581 | if (error.response.status === 401) { | 604 | if (error.response.status === 401) { |
582 | this.$router.replace({ path: "/" }); | 605 | this.$router.replace({ path: "/" }); |
583 | this.$store.dispatch("setToken", null); | 606 | this.$store.dispatch("setToken", null); |
584 | this.$store.dispatch("Id", null); | 607 | this.$store.dispatch("Id", null); |
585 | } | 608 | } |
586 | }); | 609 | }); |
587 | }, | 610 | }, |
588 | // created() { | 611 | // created() { |
589 | // this.$root.$on("app:search", search => { | 612 | // this.$root.$on("app:search", search => { |
590 | // this.search = search; | 613 | // this.search = search; |
591 | // }); | 614 | // }); |
592 | // }, | 615 | // }, |
593 | // beforeDestroy() { | 616 | // beforeDestroy() { |
594 | // // dont forget to remove the listener | 617 | // // dont forget to remove the listener |
595 | // this.$root.$off("app:search"); | 618 | // this.$root.$off("app:search"); |
596 | // } | 619 | // } |
597 | }, | 620 | }, |
598 | }; | 621 | }; |
599 | </script> | 622 | </script> |
600 | <style> | 623 | <style> |
601 | .admincardreport { | 624 | .admincardreport { |
602 | border: 1px solid #ddd; | 625 | border: 1px solid #ddd; |
603 | overflow: hidden; | 626 | overflow: hidden; |
604 | padding: 20px 50px; | 627 | padding: 20px 50px; |
605 | /* margin-bottom: 10px; | 628 | /* margin-bottom: 10px; |
606 | min-height: 443px; */ | 629 | min-height: 443px; */ |
607 | } | 630 | } |
608 | .line { | 631 | .line { |
609 | border-bottom: 1px solid #ddd; | 632 | border-bottom: 1px solid #ddd; |
610 | overflow: hidden; | 633 | overflow: hidden; |
611 | padding-bottom: 10px; | 634 | padding-bottom: 10px; |
612 | vertical-align: middle; | 635 | vertical-align: middle; |
613 | /* margin-bottom: 4px; */ | 636 | /* margin-bottom: 4px; */ |
614 | } | 637 | } |
615 | .school-logo { | 638 | .school-logo { |
616 | float: left; | 639 | float: left; |
617 | } | 640 | } |
618 | .student-logo { | 641 | .student-logo { |
619 | position: absolute; | 642 | position: absolute; |
620 | top: 221px; | 643 | top: 221px; |
621 | right: 221px; | 644 | right: 221px; |
622 | } | 645 | } |
623 | .school-name { | 646 | .school-name { |
624 | box-sizing: border-box; | 647 | box-sizing: border-box; |
625 | align-items: center; | 648 | align-items: center; |
626 | } | 649 | } |
627 | /* .student-info { | 650 | /* .student-info { |
628 | float: left; | 651 | float: left; |
629 | width: max-content; | 652 | width: max-content; |
630 | text-align: initial; | 653 | text-align: initial; |
631 | } */ | 654 | } */ |
632 | .student-info { | 655 | .student-info { |
633 | width: 50%; | 656 | width: 50%; |
634 | float: left; | 657 | float: left; |
635 | text-align: initial; | 658 | text-align: initial; |
636 | } | 659 | } |
637 | .student-info p { | 660 | .student-info p { |
638 | width: 50%; | 661 | width: 50%; |
639 | float: left; | 662 | float: left; |
640 | margin-bottom: 1px; | 663 | margin-bottom: 1px; |
641 | padding: 0 0px; | 664 | padding: 0 0px; |
642 | font-size: 12px; | 665 | font-size: 12px; |
643 | } | 666 | } |
644 | .admitcardreportbackend ol { | 667 | .admitcardreportbackend ol { |
645 | margin: 0; | 668 | margin: 0; |
646 | margin-bottom: 10px; | 669 | margin-bottom: 10px; |
647 | } | 670 | } |
648 | .admitcardreportbackend p { | 671 | .admitcardreportbackend p { |
649 | line-height: 20px; | 672 | line-height: 20px; |
650 | text-align: left; | 673 | text-align: left; |
651 | } | 674 | } |
652 | </style> | 675 | </style> |
src/pages/Report/progressCardReport.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** Progress Card Report Table****** --> | 3 | <!-- ****** Progress Card 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 lg3> | 8 | <v-flex xs12 sm12 lg3> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> | 10 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> |
11 | <label class="right">Class:</label> | 11 | <label class="right">Class:</label> |
12 | </v-flex> | 12 | </v-flex> |
13 | <v-flex xs9 sm6 lg8 class="ml-2"> | 13 | <v-flex xs9 sm6 lg8 class="ml-2"> |
14 | <v-select | 14 | <v-select |
15 | v-model="getReport.classId" | 15 | v-model="getReport.classId" |
16 | label="Select your class" | 16 | label="Select your class" |
17 | type="text" | 17 | type="text" |
18 | :items="classList" | 18 | :items="classList" |
19 | item-text="classNum" | 19 | item-text="classNum" |
20 | item-value="_id" | 20 | item-value="_id" |
21 | :rules="classRules" | 21 | :rules="classRules" |
22 | @change="getSections(getReport.classId)" | 22 | @change="getSections(getReport.classId)" |
23 | required | 23 | required |
24 | ></v-select> | 24 | ></v-select> |
25 | </v-flex> | 25 | </v-flex> |
26 | </v-layout> | 26 | </v-layout> |
27 | </v-flex> | 27 | </v-flex> |
28 | <v-flex xs12 sm12 lg3> | 28 | <v-flex xs12 sm12 lg3> |
29 | <v-layout> | 29 | <v-layout> |
30 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> | 30 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> |
31 | <label class="right">Section:</label> | 31 | <label class="right">Section:</label> |
32 | </v-flex> | 32 | </v-flex> |
33 | <v-flex xs9 sm6 lg8 class="ml-2"> | 33 | <v-flex xs9 sm6 lg8 class="ml-2"> |
34 | <v-select | 34 | <v-select |
35 | :items="addSection" | 35 | :items="addSection" |
36 | label="Select your Section" | 36 | label="Select your Section" |
37 | v-model="getReport.sectionId" | 37 | v-model="getReport.sectionId" |
38 | item-text="name" | 38 | item-text="name" |
39 | item-value="_id" | 39 | item-value="_id" |
40 | name="Select Section" | 40 | name="Select Section" |
41 | @change="getStudents" | 41 | @change="getStudents" |
42 | :rules="sectionRules" | 42 | :rules="sectionRules" |
43 | required | 43 | required |
44 | ></v-select> | 44 | ></v-select> |
45 | </v-flex> | 45 | </v-flex> |
46 | </v-layout> | 46 | </v-layout> |
47 | </v-flex> | 47 | </v-flex> |
48 | <v-flex xs12 sm12 lg3> | 48 | <v-flex xs12 sm12 lg3> |
49 | <v-layout> | 49 | <v-layout> |
50 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> | 50 | <v-flex xs3 sm3 lg2 class="subheading mt-4"> |
51 | <label class="right">Student:</label> | 51 | <label class="right">Student:</label> |
52 | </v-flex> | 52 | </v-flex> |
53 | <v-flex xs9 sm6 lg8 class="ml-2"> | 53 | <v-flex xs9 sm6 lg8 class="ml-2"> |
54 | <v-select | 54 | <v-select |
55 | :items="getStudentsList" | 55 | :items="getStudentsList" |
56 | label="Select your student" | 56 | label="Select your student" |
57 | v-model="getReport.studentId" | 57 | v-model="getReport.studentId" |
58 | item-text="name" | 58 | item-text="name" |
59 | item-value="_id" | 59 | item-value="_id" |
60 | :rules="studentRules" | 60 | :rules="studentRules" |
61 | required | 61 | required |
62 | ></v-select> | 62 | ></v-select> |
63 | </v-flex> | 63 | </v-flex> |
64 | </v-layout> | 64 | </v-layout> |
65 | </v-flex> | 65 | </v-flex> |
66 | <v-flex xs12 sm12 lg3> | 66 | <v-flex xs12 sm12 lg3> |
67 | <v-btn | 67 | <v-btn |
68 | style="margin: auto; | 68 | style="margin: auto; |
69 | display: block;" | 69 | display: block;" |
70 | @click="getMarkReportList" | 70 | @click="getMarkReportList" |
71 | round | 71 | round |
72 | dark | 72 | dark |
73 | :loading="loading" | 73 | :loading="loading" |
74 | class="open-dialog-button mt-3" | 74 | class="open-dialog-button mt-3" |
75 | >Get Report</v-btn> | 75 | >Get Report</v-btn> |
76 | </v-flex> | 76 | </v-flex> |
77 | </v-layout> | 77 | </v-layout> |
78 | </v-flex> | 78 | </v-flex> |
79 | </v-form> | 79 | </v-form> |
80 | </v-card> | 80 | </v-card> |
81 | 81 | ||
82 | <v-layout v-show="showReport"> | 82 | <v-layout v-show="showReport"> |
83 | <v-flex xs12> | 83 | <v-flex xs12> |
84 | <v-card class="transparent elevation-0"> | 84 | <v-card class="transparent elevation-0"> |
85 | <v-container grid-list-md class="report"> | 85 | <v-container grid-list-md class="report"> |
86 | <v-flex xs12 sm12> | 86 | <v-flex xs12 sm12> |
87 | <v-layout wrap> | 87 | <v-layout wrap> |
88 | <!-- ****** TABLE DATA MARK ****** --> | 88 | <!-- ****** TABLE DATA MARK ****** --> |
89 | <v-flex xs12 sm12 md12> | 89 | <v-flex xs12 sm12 md12> |
90 | <v-layout> | 90 | <v-layout> |
91 | <v-flex xs12> | 91 | <v-flex xs12> |
92 | <v-btn | 92 | <v-btn |
93 | class="open-dialog-button" | 93 | class="open-dialog-button" |
94 | :loading="printLoader" | 94 | :loading="printLoader" |
95 | round | 95 | round |
96 | dark | 96 | dark |
97 | @click="printProgressReport()" | 97 | @click="printProgressReport()" |
98 | > | 98 | > |
99 | 99 | ||
100 | <v-icon right dark>print</v-icon> | 100 | <v-icon right dark>print</v-icon> |
101 | </v-btn> | 101 | </v-btn> |
102 | </v-flex> | 102 | </v-flex> |
103 | </v-layout> | 103 | </v-layout> |
104 | <div id="printMe"> | 104 | <div id="printMe"> |
105 | <card class="elevation-0" v-for="(value, id, Index) in filterData" :key="Index"> | 105 | <card class="elevation-0" v-for="(value, id, Index) in filterData" :key="Index"> |
106 | <v-card | 106 | <v-card |
107 | class="ma-3" | 107 | class="ma-3" |
108 | style=" | 108 | style=" |
109 | border: 1px solid lightgrey; | 109 | border: 1px solid lightgrey; |
110 | margin-bottom:0px; | 110 | margin-bottom:0px; |
111 | padding: 0px" | 111 | padding: 0px" |
112 | > | 112 | > |
113 | <div style="border: 1px solid lightgray;"> | 113 | <div style="border: 1px solid lightgray;"> |
114 | <v-layout> | 114 | <v-layout> |
115 | <v-flex xs12 sm12 md12> | 115 | <v-flex xs12 sm12 md12> |
116 | <div | 116 | <div |
117 | style=" | 117 | style=" |
118 | border-bottom: 1px solid #ddd; | 118 | border-bottom: 1px solid #ddd; |
119 | overflow: hidden; | 119 | overflow: hidden; |
120 | vertical-align: middle; | 120 | vertical-align: middle; |
121 | margin: 10px; | 121 | margin: 10px; |
122 | padding-bottom: 0px;" | 122 | padding-bottom: 0px;" |
123 | > | 123 | > |
124 | <!-- <v-flex xs12 sm12 md12> --> | 124 | <!-- <v-flex xs12 sm12 md12> --> |
125 | <v-layout> | 125 | <v-layout> |
126 | <div class="school-logo"> | 126 | <div class="school-logo"> |
127 | <img | 127 | <img |
128 | :src="userData.schoolLogoUrl" | 128 | :src="userData.schoolLogoUrl" |
129 | v-if="userData.schoolLogoUrl" | 129 | v-if="userData.schoolLogoUrl" |
130 | style="width:40px !important;height:40px !important; float: left;" | 130 | style="width:40px !important;height:40px !important; float: left;" |
131 | /> | 131 | /> |
132 | <img | 132 | <img |
133 | src="/static/schoolIcons/INTRACK_White.png" | 133 | src="/static/schoolIcons/INTRACK_White.png" |
134 | v-else-if="!userData.schoolLogoUrl" | 134 | v-else-if="!userData.schoolLogoUrl" |
135 | style="width:40px !important;height:40px !important; float: left;" | 135 | style="width:40px !important;height:40px !important; float: left;" |
136 | /> | 136 | /> |
137 | </div> | 137 | </div> |
138 | <div class="school-name"> | 138 | <div class="school-name"> |
139 | <h3>{{ userData.name }}</h3> | 139 | <h3>{{ schoolData.name }}</h3> |
140 | </div> | 140 | </div> |
141 | </v-layout> | 141 | </v-layout> |
142 | <!-- </v-flex> --> | 142 | <!-- </v-flex> --> |
143 | </div> | 143 | </div> |
144 | <!-- Profile School --> | 144 | <!-- Profile School --> |
145 | <v-flex xs12 sm12 md12 lg12 style="margin:0px 0px; "> | 145 | <v-flex xs12 sm12 md12 lg12 style="margin:0px 0px; "> |
146 | <v-layout> | 146 | <v-layout> |
147 | <div | 147 | <div |
148 | style="flex-basis: 40%; | 148 | style="flex-basis: 40%; |
149 | -webkit-box-flex: 0; | 149 | -webkit-box-flex: 0; |
150 | -ms-flex-positive: 0; | 150 | -ms-flex-positive: 0; |
151 | flex-grow: 0; | 151 | flex-grow: 0; |
152 | max-width: 40%;" | 152 | max-width: 40%;" |
153 | > | 153 | > |
154 | <div | 154 | <div |
155 | style="padding: 4px; | 155 | style="padding: 4px; |
156 | padding-left: 16px !important;" | 156 | padding-left: 16px !important;" |
157 | > | 157 | > |
158 | <p | 158 | <p |
159 | style="font-size:20px;margin-bottom: 0px;" | 159 | style="font-size:20px;margin-bottom: 0px;" |
160 | >{{ userData.name }}</p> | 160 | >{{ schoolData.name }}</p> |
161 | <p | 161 | <p |
162 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 162 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
163 | >{{ userData.address }}</p> | 163 | >{{ schoolData.address }}</p> |
164 | <p | 164 | <p |
165 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 165 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
166 | >Phone : {{ userData.mobile }}</p> | 166 | >Phone : {{ schoolData.mobile }}</p> |
167 | <p | 167 | <p |
168 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 168 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
169 | >Email : {{ userData.email }}</p> | 169 | >Email : {{ schoolData.email }}</p> |
170 | </div> | 170 | </div> |
171 | </div> | 171 | </div> |
172 | <!-- Profile Student Report Card--> | 172 | <!-- Profile Student Report Card--> |
173 | <div | 173 | <div |
174 | style="flex-basis: 40%; | 174 | style="flex-basis: 40%; |
175 | -webkit-box-flex: 0; | 175 | -webkit-box-flex: 0; |
176 | -ms-flex-positive: 0; | 176 | -ms-flex-positive: 0; |
177 | flex-grow: 0; | 177 | flex-grow: 0; |
178 | max-width: 40%;" | 178 | max-width: 40%;" |
179 | > | 179 | > |
180 | <div v-for="(studentMark,i,index) in value" :key="index"> | 180 | <div v-for="(studentMark,i,index) in value" :key="index"> |
181 | <p | 181 | <p |
182 | v-if="index == 0" | 182 | v-if="index == 0" |
183 | style="font-size:20px;margin-bottom: 0px;" | 183 | style="font-size:20px;margin-bottom: 0px;" |
184 | >{{ studentMark[0].studentId.name }}</p> | 184 | >{{ studentMark[0].studentId.name }}</p> |
185 | <p | 185 | <p |
186 | v-if="index == 0" | 186 | v-if="index == 0" |
187 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 187 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
188 | > | 188 | > |
189 | Class : | 189 | Class : |
190 | <b>{{ studentMark[0].classId.classNum }}</b> | 190 | <b>{{ studentMark[0].classId.classNum }}</b> |
191 | </p> | 191 | </p> |
192 | <p | 192 | <p |
193 | v-if="index == 0" | 193 | v-if="index == 0" |
194 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 194 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
195 | > | 195 | > |
196 | Section : | 196 | Section : |
197 | <b>{{ studentMark[0].sectionId.name }}</b> | 197 | <b>{{ studentMark[0].sectionId.name }}</b> |
198 | </p> | 198 | </p> |
199 | <p | 199 | <p |
200 | v-if="index == 0" | 200 | v-if="index == 0" |
201 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 201 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
202 | > | 202 | > |
203 | Roll NO : | 203 | Roll NO : |
204 | <b>{{ studentMark[0].studentId.rollNo }}</b> | 204 | <b>{{ studentMark[0].studentId.rollNo }}</b> |
205 | </p> | 205 | </p> |
206 | </div> | 206 | </div> |
207 | </div> | 207 | </div> |
208 | <div | 208 | <div |
209 | style=" | 209 | style=" |
210 | -ms-flex-preferred-size: 20%; | 210 | -ms-flex-preferred-size: 20%; |
211 | flex-basis: 20%; | 211 | flex-basis: 20%; |
212 | -webkit-box-flex: 0; | 212 | -webkit-box-flex: 0; |
213 | -ms-flex-positive: 0; | 213 | -ms-flex-positive: 0; |
214 | flex-grow: 0; | 214 | flex-grow: 0; |
215 | max-width: 20%;" | 215 | max-width: 20%;" |
216 | > | 216 | > |
217 | <div v-for="(studentMark,i,index) in value" :key="index"> | 217 | <div v-for="(studentMark,i,index) in value" :key="index"> |
218 | <div | 218 | <div |
219 | style="padding-top:16px" | 219 | style="padding-top:16px" |
220 | v-if="index == 0" | 220 | v-if="index == 0" |
221 | class="hidden-sm-only hidden-xs-only" | 221 | class="hidden-sm-only hidden-xs-only" |
222 | > | 222 | > |
223 | <img | 223 | <img |
224 | src="/static/icon/user.png" | 224 | src="/static/icon/user.png" |
225 | v-if="!studentMark[0].studentId.profilePicUrl" | 225 | v-if="!studentMark[0].studentId.profilePicUrl" |
226 | style="width:60px;height:60px;" | 226 | style="width:60px;height:60px;" |
227 | /> | 227 | /> |
228 | <img | 228 | <img |
229 | :src="studentMark[0].studentId.profilePicUrl" | 229 | :src="studentMark[0].studentId.profilePicUrl" |
230 | v-else-if="studentMark[0].studentId.profilePicUrl" | 230 | v-else-if="studentMark[0].studentId.profilePicUrl" |
231 | style="width:60px;height:60px;" | 231 | style="width:60px;height:60px;" |
232 | /> | 232 | /> |
233 | </div> | 233 | </div> |
234 | </div> | 234 | </div> |
235 | </div> | 235 | </div> |
236 | </v-layout> | 236 | </v-layout> |
237 | </v-flex> | 237 | </v-flex> |
238 | </v-flex> | 238 | </v-flex> |
239 | </v-layout> | 239 | </v-layout> |
240 | <v-card | 240 | <v-card |
241 | v-for="studentMarks in value" | 241 | v-for="studentMarks in value" |
242 | :key="studentMarks" | 242 | :key="studentMarks" |
243 | style=" | 243 | style=" |
244 | background-color: #fff; | 244 | background-color: #fff; |
245 | border-color: #fff; | 245 | border-color: #fff; |
246 | color: rgba(0,0,0,0.87); | 246 | color: rgba(0,0,0,0.87); |
247 | overflow-x: auto; | 247 | overflow-x: auto; |
248 | display: block; | 248 | display: block; |
249 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; | 249 | webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important; |
250 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" | 250 | box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.2), 0px 0px 0px 0px rgba(0,0,0,0.14), 0px 0px 0px 0px rgba(0,0,0,0.12) !important;" |
251 | > | 251 | > |
252 | <table | 252 | <table |
253 | v-for="(studentMark,key) in studentMarks" | 253 | v-for="(studentMark,key) in studentMarks" |
254 | :key="key" | 254 | :key="key" |
255 | class="tableRsponsive feeTypeTable subheading" | 255 | class="tableRsponsive feeTypeTable subheading" |
256 | style="border: 1px solid black; | 256 | style="border: 1px solid black; |
257 | border-collapse: collapse;!important | 257 | border-collapse: collapse;!important |
258 | table-layout: auto !important; | 258 | table-layout: auto !important; |
259 | width: 100% !important; | 259 | width: 100% !important; |
260 | overflow: hidden;" | 260 | overflow: hidden;" |
261 | > | 261 | > |
262 | <thead | 262 | <thead |
263 | style="border: 1px solid transparent !important" | 263 | style="border: 1px solid transparent !important" |
264 | v-if="key == 0" | 264 | v-if="key == 0" |
265 | > | 265 | > |
266 | <tr style="border: 1px solid transparent !important"> | 266 | <tr style="border: 1px solid transparent !important"> |
267 | <td | 267 | <td |
268 | colspan="4" | 268 | colspan="4" |
269 | style="text-align: inherit !important; | 269 | style="text-align: inherit !important; |
270 | border-right: inherit; | 270 | border-right: inherit; |
271 | border-top: inherit; | 271 | border-top: inherit; |
272 | padding:14px;" | 272 | padding:14px;" |
273 | >{{studentMark.examId.examName}}</td> | 273 | >{{studentMark.examId.examName}}</td> |
274 | </tr> | 274 | </tr> |
275 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 275 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
276 | <td | 276 | <td |
277 | rowspan="2" | 277 | rowspan="2" |
278 | style="border: 1px solid lightgrey !important;padding: 0px;" | 278 | style="border: 1px solid lightgrey !important;padding: 0px;" |
279 | >Subject</td> | 279 | >Subject</td> |
280 | <template> | 280 | <template> |
281 | <td | 281 | <td |
282 | v-for="(studentMarkData,i) in studentMark.studentsMarks" | 282 | v-for="(studentMarkData,i) in studentMark.studentsMarks" |
283 | :key="i" | 283 | :key="i" |
284 | colspan="2" | 284 | colspan="2" |
285 | style="border: 1px solid lightgrey !important;padding: 0px;" | 285 | style="border: 1px solid lightgrey !important;padding: 0px;" |
286 | >{{studentMarkData.markDistributionId.distributionType}}</td> | 286 | >{{studentMarkData.markDistributionId.distributionType}}</td> |
287 | <td | 287 | <td |
288 | style="border: 1px solid lightgrey !important;padding: 0px;" | 288 | style="border: 1px solid lightgrey !important;padding: 0px;" |
289 | >Total Marks</td> | 289 | >Total Marks</td> |
290 | </template> | 290 | </template> |
291 | </tr> | 291 | </tr> |
292 | <tr style="border: 1px solid lightgrey !important;"> | 292 | <tr style="border: 1px solid lightgrey !important;"> |
293 | <template v-for="(exam, ind) in studentMark.studentsMarks"> | 293 | <template v-for="(exam, ind) in studentMark.studentsMarks"> |
294 | <td | 294 | <td |
295 | :key="ind" | 295 | :key="ind" |
296 | style="border: 1px solid lightgrey !important;padding: 0px;" | 296 | style="border: 1px solid lightgrey !important;padding: 0px;" |
297 | >Marks</td> | 297 | >Marks</td> |
298 | <td | 298 | <td |
299 | :key="ind" | 299 | :key="ind" |
300 | style="border: 1px solid lightgrey !important;padding: 0px;" | 300 | style="border: 1px solid lightgrey !important;padding: 0px;" |
301 | >Highest Marks</td> | 301 | >Highest Marks</td> |
302 | </template> | 302 | </template> |
303 | </tr> | 303 | </tr> |
304 | </thead> | 304 | </thead> |
305 | <tbody | 305 | <tbody |
306 | style="border: 1px solid lightgrey !important;" | 306 | style="border: 1px solid lightgrey !important;" |
307 | v-if="key == 0" | 307 | v-if="key == 0" |
308 | > | 308 | > |
309 | <tr v-for="studentMark in studentMarks" :key="studentMark"> | 309 | <tr v-for="studentMark in studentMarks" :key="studentMark"> |
310 | <td | 310 | <td |
311 | style="border: 1px solid lightgrey !important;padding: 0px;" | 311 | style="border: 1px solid lightgrey !important;padding: 0px;" |
312 | >{{studentMark.subjectName}}</td> | 312 | >{{studentMark.subjectName}}</td> |
313 | <template v-for="(exam, index) in studentMark.studentsMarks"> | 313 | <template v-for="(exam, index) in studentMark.studentsMarks"> |
314 | <td | 314 | <td |
315 | :key="index" | 315 | :key="index" |
316 | style="border: 1px solid lightgrey !important;padding: 0px;" | 316 | style="border: 1px solid lightgrey !important;padding: 0px;" |
317 | >{{exam.marksScored}}</td> | 317 | >{{exam.marksScored}}</td> |
318 | <td | 318 | <td |
319 | :key="index" | 319 | :key="index" |
320 | style="border: 1px solid lightgrey !important;padding: 0px;" | 320 | style="border: 1px solid lightgrey !important;padding: 0px;" |
321 | >{{exam.markDistributionId.markValue}}</td> | 321 | >{{exam.markDistributionId.markValue}}</td> |
322 | </template> | 322 | </template> |
323 | <td | 323 | <td |
324 | style="border: 1px solid lightgrey !important;padding: 0px;" | 324 | style="border: 1px solid lightgrey !important;padding: 0px;" |
325 | >{{studentMark.totalMarks}}</td> | 325 | >{{studentMark.totalMarks}}</td> |
326 | </tr> | 326 | </tr> |
327 | </tbody> | 327 | </tbody> |
328 | <tfoot v-if="key == studentMarks.length - 1"> | 328 | <tfoot v-if="key == studentMarks.length - 1"> |
329 | <tr style="border: 1px solid lightgrey !important;"> | 329 | <tr style="border: 1px solid lightgrey !important;"> |
330 | <td | 330 | <td |
331 | colspan="5" | 331 | colspan="5" |
332 | class="subheding" | 332 | class="subheding" |
333 | style=" | 333 | style=" |
334 | border: 1px solid #e2e7eb; | 334 | border: 1px solid #e2e7eb; |
335 | text-align:center | 335 | text-align:center |
336 | padding: 0px;" | 336 | padding: 0px;" |
337 | >Total Marks</td> | 337 | >Total Marks</td> |
338 | <td | 338 | <td |
339 | colspan="7" | 339 | colspan="7" |
340 | style="border: 1px solid lightgrey !important;padding: 0px;" | 340 | style="border: 1px solid lightgrey !important;padding: 0px;" |
341 | >{{ studentMark.allSubjectTotalMarks }}</td> | 341 | >{{ studentMark.allSubjectTotalMarks }}</td> |
342 | </tr> | 342 | </tr> |
343 | <tr> | 343 | <tr> |
344 | <td | 344 | <td |
345 | colspan="5" | 345 | colspan="5" |
346 | class="subheding" | 346 | class="subheding" |
347 | style=" | 347 | style=" |
348 | border: 1px solid #e2e7eb; | 348 | border: 1px solid #e2e7eb; |
349 | text-align:center | 349 | text-align:center |
350 | padding: 0px;" | 350 | padding: 0px;" |
351 | >Grade</td> | 351 | >Grade</td> |
352 | <td | 352 | <td |
353 | colspan="7" | 353 | colspan="7" |
354 | style="border: 1px solid lightgrey !important;padding: 0px;" | 354 | style="border: 1px solid lightgrey !important;padding: 0px;" |
355 | >{{ studentMark.grade ? studentMark.grade : "-" }}</td> | 355 | >{{ studentMark.grade ? studentMark.grade : "-" }}</td> |
356 | </tr> | 356 | </tr> |
357 | <tr> | 357 | <tr> |
358 | <td | 358 | <td |
359 | colspan="5" | 359 | colspan="5" |
360 | style=" | 360 | style=" |
361 | border: 1px solid #e2e7eb; | 361 | border: 1px solid #e2e7eb; |
362 | text-align:center | 362 | text-align:center |
363 | padding: 0px;" | 363 | padding: 0px;" |
364 | class="subheding" | 364 | class="subheding" |
365 | >Average Mark</td> | 365 | >Average Mark</td> |
366 | <td | 366 | <td |
367 | colspan="7" | 367 | colspan="7" |
368 | style="border: 1px solid lightgrey !important;padding: 0px;" | 368 | style="border: 1px solid lightgrey !important;padding: 0px;" |
369 | >-</td> | 369 | >-</td> |
370 | </tr> | 370 | </tr> |
371 | <tr> | 371 | <tr> |
372 | <td | 372 | <td |
373 | colspan="5" | 373 | colspan="5" |
374 | style=" | 374 | style=" |
375 | border: 1px solid #e2e7eb; | 375 | border: 1px solid #e2e7eb; |
376 | text-align:center | 376 | text-align:center |
377 | padding: 0px; !important; | 377 | padding: 0px; !important; |
378 | font-size: 16px !important;" | 378 | font-size: 16px !important;" |
379 | class="subheding" | 379 | class="subheding" |
380 | >GPA</td> | 380 | >GPA</td> |
381 | <td | 381 | <td |
382 | colspan="7" | 382 | colspan="7" |
383 | style="border: 1px solid lightgrey !important;padding: 0px !important;font-size: 16px !important;" | 383 | style="border: 1px solid lightgrey !important;padding: 0px !important;font-size: 16px !important;" |
384 | >-</td> | 384 | >-</td> |
385 | </tr> | 385 | </tr> |
386 | </tfoot> | 386 | </tfoot> |
387 | </table> | 387 | </table> |
388 | </v-card> | 388 | </v-card> |
389 | </div> | 389 | </div> |
390 | </v-card> | 390 | </v-card> |
391 | <p style="page-break-after: always;"> </p> | 391 | <p style="page-break-after: always;"> </p> |
392 | </card> | 392 | </card> |
393 | </div> | 393 | </div> |
394 | </v-flex> | 394 | </v-flex> |
395 | </v-layout> | 395 | </v-layout> |
396 | </v-flex> | 396 | </v-flex> |
397 | </v-container> | 397 | </v-container> |
398 | </v-card> | 398 | </v-card> |
399 | </v-flex> | 399 | </v-flex> |
400 | </v-layout> | 400 | </v-layout> |
401 | <div class="loader" v-if="showLoader"> | 401 | <div class="loader" v-if="showLoader"> |
402 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 402 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
403 | </div> | 403 | </div> |
404 | </v-container> | 404 | </v-container> |
405 | </template> | 405 | </template> |
406 | 406 | ||
407 | <script> | 407 | <script> |
408 | import http from "@/Services/http.js"; | 408 | import http from "@/Services/http.js"; |
409 | import moment from "moment"; | 409 | import moment from "moment"; |
410 | import _ from "underscore"; | 410 | import _ from "underscore"; |
411 | 411 | ||
412 | export default { | 412 | export default { |
413 | data: () => ({ | 413 | data: () => ({ |
414 | showLoader: false, | 414 | showLoader: false, |
415 | cardData: [], | 415 | cardData: [], |
416 | token: "", | 416 | token: "", |
417 | markDistributions: [], | 417 | markDistributions: [], |
418 | markParticularDistributionData: [], | 418 | markParticularDistributionData: [], |
419 | loading: false, | 419 | loading: false, |
420 | valid: true, | 420 | valid: true, |
421 | loading: false, | 421 | loading: false, |
422 | showReport: false, | 422 | showReport: false, |
423 | printLoader: false, | 423 | printLoader: false, |
424 | addSection: [], | 424 | addSection: [], |
425 | filterData: [], | 425 | filterData: [], |
426 | getStudentsList: [], | 426 | getStudentsList: [], |
427 | classRules: [v => !!v || "Class is required"], | 427 | classRules: [(v) => !!v || "Class is required"], |
428 | sectionRules: [v => !!v || "Class is required"], | 428 | sectionRules: [(v) => !!v || "Class is required"], |
429 | studentRules: [v => !!v || "Student is required"], | 429 | studentRules: [(v) => !!v || "Student is required"], |
430 | getReport: {}, | 430 | getReport: {}, |
431 | classList: [], | 431 | classList: [], |
432 | output: null, | 432 | output: null, |
433 | userData: {}, | 433 | userData: {}, |
434 | newData: [], | 434 | newData: [], |
435 | gradeAPlus: "A+", | 435 | gradeAPlus: "A+", |
436 | gradeA: "A", | 436 | gradeA: "A", |
437 | gradeBPlus: "B+", | 437 | gradeBPlus: "B+", |
438 | gradeB: "B", | 438 | gradeB: "B", |
439 | gradeCPlus: "C+", | 439 | gradeCPlus: "C+", |
440 | gradeC: "C", | 440 | gradeC: "C", |
441 | totalMarks: "" | 441 | totalMarks: "", |
442 | }), | 442 | }), |
443 | mounted() { | 443 | mounted() { |
444 | this.token = this.$store.state.token; | 444 | this.token = this.$store.state.token; |
445 | this.getClass(); | 445 | this.getClass(); |
446 | this.getUserData(); | 446 | this.getUserData(); |
447 | }, | 447 | }, |
448 | methods: { | 448 | methods: { |
449 | clear() { | 449 | clear() { |
450 | this.$refs.form.reset(); | 450 | this.$refs.form.reset(); |
451 | }, | 451 | }, |
452 | getClass() { | 452 | getClass() { |
453 | this.showLoader = true; | 453 | this.showLoader = true; |
454 | http() | 454 | http() |
455 | .get("/getClassesList", { | 455 | .get("/getClassesList", { |
456 | headers: { Authorization: "Bearer " + this.token } | 456 | headers: { Authorization: "Bearer " + this.token }, |
457 | }) | 457 | }) |
458 | .then(response => { | 458 | .then((response) => { |
459 | this.classList = response.data.data; | 459 | this.classList = response.data.data; |
460 | this.showLoader = false; | 460 | this.showLoader = false; |
461 | }) | 461 | }) |
462 | .catch(error => { | 462 | .catch((error) => { |
463 | this.showLoader = false; | 463 | this.showLoader = false; |
464 | // console.log("err====>", err); | 464 | // console.log("err====>", err); |
465 | }); | 465 | }); |
466 | }, | 466 | }, |
467 | getSections(_id) { | 467 | getSections(_id) { |
468 | this.showLoader = true; | 468 | this.showLoader = true; |
469 | http() | 469 | http() |
470 | .get( | 470 | .get( |
471 | "/getSectionsList", | 471 | "/getSectionsList", |
472 | { params: { classId: _id } }, | 472 | { params: { classId: _id } }, |
473 | { | 473 | { |
474 | headers: { Authorization: "Bearer " + this.token } | 474 | headers: { Authorization: "Bearer " + this.token }, |
475 | } | 475 | } |
476 | ) | 476 | ) |
477 | .then(response => { | 477 | .then((response) => { |
478 | this.addSection = response.data.data; | 478 | this.addSection = response.data.data; |
479 | this.showLoader = false; | 479 | this.showLoader = false; |
480 | }) | 480 | }) |
481 | .catch(err => { | 481 | .catch((err) => { |
482 | this.showLoader = false; | 482 | this.showLoader = false; |
483 | // console.log("err====>", err); | 483 | // console.log("err====>", err); |
484 | }); | 484 | }); |
485 | }, | 485 | }, |
486 | getStudents() { | 486 | getStudents() { |
487 | this.showLoader = true; | 487 | this.showLoader = true; |
488 | http() | 488 | http() |
489 | .get("/getStudentWithClass", { | 489 | .get("/getStudentWithClass", { |
490 | params: { | 490 | params: { |
491 | classId: this.getReport.classId, | 491 | classId: this.getReport.classId, |
492 | sectionId: this.getReport.sectionId | 492 | sectionId: this.getReport.sectionId, |
493 | } | 493 | }, |
494 | }) | 494 | }) |
495 | .then(response => { | 495 | .then((response) => { |
496 | response.data.data.unshift({ | 496 | response.data.data.unshift({ |
497 | name: "Select All", | 497 | name: "Select All", |
498 | _id: "Select All" | 498 | _id: "Select All", |
499 | }); | 499 | }); |
500 | this.getStudentsList = response.data.data; | 500 | this.getStudentsList = response.data.data; |
501 | this.showLoader = false; | 501 | this.showLoader = false; |
502 | }) | 502 | }) |
503 | .catch(error => { | 503 | .catch((error) => { |
504 | console.log("err====>", error); | 504 | console.log("err====>", error); |
505 | this.showLoader = false; | 505 | this.showLoader = false; |
506 | }); | 506 | }); |
507 | }, | 507 | }, |
508 | getMarkReportList() { | 508 | getMarkReportList() { |
509 | this.showLoader = true; | 509 | this.showLoader = true; |
510 | this.showReport = true; | 510 | this.showReport = true; |
511 | var getSelectMarks = {}; | 511 | var getSelectMarks = {}; |
512 | if (this.getReport.studentId == "Select All") { | 512 | if (this.getReport.studentId == "Select All") { |
513 | getSelectMarks = { | 513 | getSelectMarks = { |
514 | classId: this.getReport.classId, | 514 | classId: this.getReport.classId, |
515 | sectionId: this.getReport.sectionId | 515 | sectionId: this.getReport.sectionId, |
516 | }; | 516 | }; |
517 | } else if (this.getReport.studentId != "Select All") { | 517 | } else if (this.getReport.studentId != "Select All") { |
518 | getSelectMarks = { | 518 | getSelectMarks = { |
519 | classId: this.getReport.classId, | 519 | classId: this.getReport.classId, |
520 | sectionId: this.getReport.sectionId, | 520 | sectionId: this.getReport.sectionId, |
521 | studentId: this.getReport.studentId | 521 | studentId: this.getReport.studentId, |
522 | }; | 522 | }; |
523 | } | 523 | } |
524 | http() | 524 | http() |
525 | .get("/getParticularMark", { | 525 | .get("/getParticularMark", { |
526 | params: getSelectMarks, | 526 | params: getSelectMarks, |
527 | headers: { Authorization: "Bearer " + this.token } | 527 | headers: { Authorization: "Bearer " + this.token }, |
528 | }) | 528 | }) |
529 | .then(response => { | 529 | .then((response) => { |
530 | console.log("===response===", response.data.data[0].schoolId); | ||
530 | this.cardData = response.data.data; | 531 | this.cardData = response.data.data; |
532 | this.schoolData = response.data.data[0].schoolId; | ||
531 | let newData = response.data.data; | 533 | let newData = response.data.data; |
532 | for (var i = 0; i < newData.length; i++) { | 534 | for (var i = 0; i < newData.length; i++) { |
533 | newData[i].examination = newData[i].examId._id; | 535 | newData[i].examination = newData[i].examId._id; |
534 | newData[i].studentsId = newData[i].studentId._id; | 536 | newData[i].studentsId = newData[i].studentId._id; |
535 | } | 537 | } |
536 | var studentMarkArray = []; | 538 | var studentMarkArray = []; |
537 | studentMarkArray = _.groupBy(newData, ["studentsId"]); | 539 | studentMarkArray = _.groupBy(newData, ["studentsId"]); |
538 | for (let data in studentMarkArray) { | 540 | for (let data in studentMarkArray) { |
539 | studentMarkArray[data] = _.groupBy(studentMarkArray[data], [ | 541 | studentMarkArray[data] = _.groupBy(studentMarkArray[data], [ |
540 | "examination" | 542 | "examination", |
541 | ]); | 543 | ]); |
542 | } | 544 | } |
543 | this.filterData = studentMarkArray; | 545 | this.filterData = studentMarkArray; |
544 | for (let data in this.filterData) { | 546 | for (let data in this.filterData) { |
545 | for (let item in this.filterData[data]) { | 547 | for (let item in this.filterData[data]) { |
546 | var allSubjectTotalMarks = 0; | 548 | var allSubjectTotalMarks = 0; |
547 | for (let i = 0; i < this.filterData[data][item].length; i++) { | 549 | for (let i = 0; i < this.filterData[data][item].length; i++) { |
548 | var totalMarks = 0; | 550 | var totalMarks = 0; |
549 | for ( | 551 | for ( |
550 | let j = 0; | 552 | let j = 0; |
551 | j < studentMarkArray[data][item][i].studentsMarks.length; | 553 | j < studentMarkArray[data][item][i].studentsMarks.length; |
552 | j++ | 554 | j++ |
553 | ) { | 555 | ) { |
554 | totalMarks += | 556 | totalMarks += |
555 | studentMarkArray[data][item][i].studentsMarks[j] | 557 | studentMarkArray[data][item][i].studentsMarks[j] |
556 | .marksScored; | 558 | .marksScored; |
557 | } | 559 | } |
558 | this.filterData[data][item][i].totalMarks = totalMarks; | 560 | this.filterData[data][item][i].totalMarks = totalMarks; |
559 | 561 | ||
560 | allSubjectTotalMarks += this.filterData[data][item][i] | 562 | allSubjectTotalMarks += this.filterData[data][item][i] |
561 | .totalMarks; | 563 | .totalMarks; |
562 | this.filterData[data][item][ | 564 | this.filterData[data][item][ |
563 | i | 565 | i |
564 | ].allSubjectTotalMarks = allSubjectTotalMarks; | 566 | ].allSubjectTotalMarks = allSubjectTotalMarks; |
565 | } | 567 | } |
566 | 568 | ||
567 | // this.totalMarks = totalMarks; | 569 | // this.totalMarks = totalMarks; |
568 | if (totalMarks > 90) { | 570 | if (totalMarks > 90) { |
569 | this.filterData[data][item].grade = this.gradeAPlus; | 571 | this.filterData[data][item].grade = this.gradeAPlus; |
570 | } else if (totalMarks > 80 && totalMarks < 90) { | 572 | } else if (totalMarks > 80 && totalMarks < 90) { |
571 | this.filterData[data][item].grade = this.gradeA; | 573 | this.filterData[data][item].grade = this.gradeA; |
572 | } else if (totalMarks > 70 && totalMarks < 80) { | 574 | } else if (totalMarks > 70 && totalMarks < 80) { |
573 | this.filterData[data][item].grade = this.gradeBPlus; | 575 | this.filterData[data][item].grade = this.gradeBPlus; |
574 | } else if (totalMarks > 60 && totalMarks < 70) { | 576 | } else if (totalMarks > 60 && totalMarks < 70) { |
575 | this.filterData[data][item].grade = this.gradeB; | 577 | this.filterData[data][item].grade = this.gradeB; |
576 | } else if (totalMarks > 50 && totalMarks < 60) { | 578 | } else if (totalMarks > 50 && totalMarks < 60) { |
577 | this.filterData[data][item].grade = this.gradeCPlus; | 579 | this.filterData[data][item].grade = this.gradeCPlus; |
578 | } else if (totalMarks > 40 && totalMarks < 50) { | 580 | } else if (totalMarks > 40 && totalMarks < 50) { |
579 | this.filterData[data][item].grade = this.gradeC; | 581 | this.filterData[data][item].grade = this.gradeC; |
580 | } | 582 | } |
581 | } | 583 | } |
582 | } | 584 | } |
583 | // console.log("this.filterData-----------last", this.filterData); | 585 | // console.log("this.filterData-----------last", this.filterData); |
584 | 586 | ||
585 | this.showLoader = false; | 587 | this.showLoader = false; |
586 | }) | 588 | }) |
587 | .catch(error => { | 589 | .catch((error) => { |
588 | // console.log("err====>", err); | 590 | // console.log("err====>", err); |
589 | this.showLoader = false; | 591 | this.showLoader = false; |
590 | this.snackbar = true; | 592 | this.snackbar = true; |
591 | // this.text = error.response.data.message; | 593 | // this.text = error.response.data.message; |
592 | // if (error.response.status === 401) { | 594 | // if (error.response.status === 401) { |
593 | // this.$router.replace({ path: "/" }); | 595 | // this.$router.replace({ path: "/" }); |
594 | // this.$store.dispatch("setToken", null); | 596 | // this.$store.dispatch("setToken", null); |
595 | // this.$store.dispatch("Id", null); | 597 | // this.$store.dispatch("Id", null); |
596 | // } | 598 | // } |
597 | }); | 599 | }); |
598 | }, | 600 | }, |
599 | printProgressReport() { | 601 | printProgressReport() { |
600 | this.printLoader = true; | 602 | this.printLoader = true; |
601 | setTimeout(() => { | 603 | setTimeout(() => { |
602 | // Pass the element id here | 604 | // Pass the element id here |
603 | this.$htmlToPaper("printMe"); | 605 | this.$htmlToPaper("printMe"); |
604 | this.printLoader = false; | 606 | this.printLoader = false; |
605 | }, 4000); | 607 | }, 4000); |
606 | }, | 608 | }, |
607 | getUserData() { | 609 | getUserData() { |
608 | http() | 610 | http() |
609 | .get("/getParticularUserDetail") | 611 | .get("/getParticularUserDetail") |
610 | .then(response => { | 612 | .then((response) => { |
611 | this.userData = response.data.data; | 613 | this.userData = response.data.data; |
612 | }) | 614 | }) |
613 | .catch(error => { | 615 | .catch((error) => { |
614 | if (error.response.status === 401) { | 616 | if (error.response.status === 401) { |
615 | this.$router.replace({ path: "/" }); | 617 | this.$router.replace({ path: "/" }); |
616 | this.$store.dispatch("setToken", null); | 618 | this.$store.dispatch("setToken", null); |
617 | this.$store.dispatch("Id", null); | 619 | this.$store.dispatch("Id", null); |
618 | } | 620 | } |
619 | }); | 621 | }); |
620 | } | 622 | }, |
621 | } | 623 | }, |
622 | }; | 624 | }; |
623 | </script> | 625 | </script> |
624 | 626 | ||
625 | <style scoped> | 627 | <style scoped> |
626 | table { | 628 | table { |
627 | border-collapse: collapse; | 629 | border-collapse: collapse; |
628 | border: 1px solid #e2e7eb; | 630 | border: 1px solid #e2e7eb; |
629 | } | 631 | } |
630 | 632 | ||
631 | th, | 633 | th, |
632 | td { | 634 | td { |
633 | border: 1px solid #e2e7eb; | 635 | border: 1px solid #e2e7eb; |
634 | padding: 0px; | 636 | padding: 0px; |
635 | text-align: center; | 637 | text-align: center; |
636 | } | 638 | } |
637 | table.feeTypeTable { | 639 | table.feeTypeTable { |
638 | table-layout: auto !important; | 640 | table-layout: auto !important; |
639 | width: 100% !important; | 641 | width: 100% !important; |
640 | } | 642 | } |
641 | .bg-sky { | 643 | .bg-sky { |
642 | background-color: #98b2cc !important; | 644 | background-color: #98b2cc !important; |
643 | } | 645 | } |
644 | .bg-sky-light { | 646 | .bg-sky-light { |
645 | background-color: #89a0b8; | 647 | background-color: #89a0b8; |
646 | } | 648 | } |
647 | .bg-purple { | 649 | .bg-purple { |
648 | background-color: #9583ac; | 650 | background-color: #9583ac; |
649 | } | 651 | } |
650 | .bg-skyDark { | 652 | .bg-skyDark { |
651 | background-color: #956785; | 653 | background-color: #956785; |
652 | } | 654 | } |
653 | 655 | ||
654 | /* .report { | 656 | /* .report { |
655 | overflow: hidden; | 657 | overflow: hidden; |
656 | max-width: 794px; | 658 | max-width: 794px; |
657 | margin: 0px auto; | 659 | margin: 0px auto; |
658 | margin-bottom: 10px; | 660 | margin-bottom: 10px; |
659 | padding: 30px; | 661 | padding: 30px; |
660 | } */ | 662 | } */ |
661 | .line { | 663 | .line { |
662 | border-bottom: 1px solid #ddd; | 664 | border-bottom: 1px solid #ddd; |
663 | overflow: hidden; | 665 | overflow: hidden; |
664 | padding-bottom: 10px; | 666 | padding-bottom: 10px; |
665 | vertical-align: middle; | 667 | vertical-align: middle; |
666 | margin-bottom: 4px; | 668 | margin-bottom: 4px; |
667 | } | 669 | } |
668 | .school-logo { | 670 | .school-logo { |
669 | float: left; | 671 | float: left; |
670 | } | 672 | } |
671 | .school-name { | 673 | .school-name { |
672 | box-sizing: border-box; | 674 | box-sizing: border-box; |
673 | } | 675 | } |
674 | .school-info { | 676 | .school-info { |
675 | width: 100%; | 677 | width: 100%; |
676 | overflow: hidden; | 678 | overflow: hidden; |
677 | } | 679 | } |
678 | .school-address { | 680 | .school-address { |
679 | float: left; | 681 | float: left; |
680 | width: 40%; | 682 | width: 40%; |
681 | } | 683 | } |
682 | .student-data { | 684 | .student-data { |
683 | float: right; | 685 | float: right; |
684 | width: 40%; | 686 | width: 40%; |
685 | } | 687 | } |
686 | .student-info { | 688 | .student-info { |
687 | float: left; | 689 | float: left; |
688 | } | 690 | } |
689 | @media screen and (max-width: 380px) { | 691 | @media screen and (max-width: 380px) { |
690 | .tableRsponsive { | 692 | .tableRsponsive { |
691 | /* display: block; */ | 693 | /* display: block; */ |
692 | position: relative; | 694 | position: relative; |
693 | overflow: scroll; | 695 | overflow: scroll; |
694 | } | 696 | } |
695 | } | 697 | } |
696 | </style> s | 698 | </style> s |
src/pages/School/appVersion.vue
File was created | 1 | <template> | |
2 | <v-container fluid class="body-color"> | ||
3 | <!-- SHOW TABLE --> | ||
4 | <v-data-table :headers="headers" :items="versionList"> | ||
5 | <template slot="items" slot-scope="props"> | ||
6 | <tr class="tr"> | ||
7 | <td class="text-xs-center td td-row">{{ props.index + 1}}</td> | ||
8 | <td class="text-xs-center td td-row">{{ props.item.androidAppVersion}}</td> | ||
9 | <td class="text-xs-center td td-row">{{ props.item.iosAppVersion}}</td> | ||
10 | <td class="text-xs-center td td-row"> | ||
11 | <span> | ||
12 | <v-tooltip top> | ||
13 | <img | ||
14 | slot="activator" | ||
15 | style="cursor:pointer; width:20px; height:18px; " | ||
16 | @click="editAppVersion(props.item)" | ||
17 | src="/static/icon/edit.png" | ||
18 | class="mr-3" | ||
19 | /> | ||
20 | <span>Edit</span> | ||
21 | </v-tooltip> | ||
22 | </span> | ||
23 | </td> | ||
24 | </tr> | ||
25 | </template> | ||
26 | </v-data-table> | ||
27 | |||
28 | <!-- EDIT VERSION DILAOG --> | ||
29 | <v-dialog v-model="editVerionDilaog" max-width="600px" scrollable> | ||
30 | <v-card flat class="card-style pa-2" dark> | ||
31 | <v-layout> | ||
32 | <v-flex xs12> | ||
33 | <label class="title text-xs-center">Edit Version</label> | ||
34 | <v-icon size="24" class="right" @click="editVerionDilaog = false">cancel</v-icon> | ||
35 | </v-flex> | ||
36 | </v-layout> | ||
37 | <v-card-text class="hidden-xs-only hidden-sm-only"> | ||
38 | <v-form ref="editAppVersionForm" v-model="validEditVersion" lazy-validation> | ||
39 | <v-flex xs12> | ||
40 | <v-layout> | ||
41 | <v-flex xs3 sm4 class="pt-4 subheading"> | ||
42 | <label class="right">App Version:</label> | ||
43 | </v-flex> | ||
44 | <v-flex xs8 sm6 class="ml-3"> | ||
45 | <v-text-field | ||
46 | placeholder="fill app version" | ||
47 | v-model="editedItem.androidAppVersion" | ||
48 | required | ||
49 | ></v-text-field> | ||
50 | </v-flex> | ||
51 | </v-layout> | ||
52 | </v-flex> | ||
53 | <v-flex xs12> | ||
54 | <v-layout> | ||
55 | <v-flex xs3 sm4 class="pt-4 subheading"> | ||
56 | <label class="right">IOS Version:</label> | ||
57 | </v-flex> | ||
58 | <v-flex xs8 sm6 class="ml-3"> | ||
59 | <v-text-field | ||
60 | placeholder="fill ios version" | ||
61 | v-model="editedItem.iosAppVersion" | ||
62 | required | ||
63 | ></v-text-field> | ||
64 | </v-flex> | ||
65 | </v-layout> | ||
66 | </v-flex> | ||
67 | <v-layout> | ||
68 | <v-flex xs12 sm12> | ||
69 | <v-card-actions> | ||
70 | <v-spacer></v-spacer> | ||
71 | <v-btn round dark @click="update" class="add-button">Update</v-btn> | ||
72 | <v-spacer></v-spacer> | ||
73 | </v-card-actions> | ||
74 | </v-flex> | ||
75 | </v-layout> | ||
76 | </v-form> | ||
77 | </v-card-text> | ||
78 | </v-card> | ||
79 | </v-dialog> | ||
80 | |||
81 | <div class="loader" v-if="showLoader"> | ||
82 | <v-progress-circular indeterminate color="white"></v-progress-circular> | ||
83 | </div> | ||
84 | <v-snackbar | ||
85 | :timeout="timeout" | ||
86 | :top="y === 'top'" | ||
87 | :right="x === 'right'" | ||
88 | :vertical="mode === 'vertical'" | ||
89 | v-model="snackbar" | ||
90 | color="success" | ||
91 | >{{ text }}</v-snackbar> | ||
92 | </v-container> | ||
93 | </template> | ||
94 | |||
95 | <script> | ||
96 | import http from "@/Services/http.js"; | ||
97 | import Util from "@/util"; | ||
98 | import moment from "moment"; | ||
99 | |||
100 | export default { | ||
101 | data: () => ({ | ||
102 | //SNACKBAR | ||
103 | snackbar: false, | ||
104 | y: "top", | ||
105 | x: "right", | ||
106 | color: "", | ||
107 | mode: "", | ||
108 | timeout: 3000, | ||
109 | text: "", | ||
110 | |||
111 | headers: [ | ||
112 | { | ||
113 | text: "No", | ||
114 | align: "center", | ||
115 | sortable: false, | ||
116 | value: "No", | ||
117 | }, | ||
118 | { | ||
119 | text: "Android App Version", | ||
120 | value: "", | ||
121 | sortable: false, | ||
122 | align: "center", | ||
123 | }, | ||
124 | { | ||
125 | text: "IOS App Version", | ||
126 | value: "", | ||
127 | sortable: false, | ||
128 | align: "center", | ||
129 | }, | ||
130 | { text: "Action", value: "", sortable: false, align: "center" }, | ||
131 | ], | ||
132 | versionList: [], | ||
133 | editedItem: { | ||
134 | androidAppVersion: "", | ||
135 | iosAppVersion: "", | ||
136 | }, | ||
137 | |||
138 | editVerionDilaog: false, | ||
139 | validEditVersion: true, | ||
140 | showLoader: false, | ||
141 | }), | ||
142 | |||
143 | methods: { | ||
144 | editAppVersion(item) { | ||
145 | this.editedIndex = this.versionList.indexOf(item); | ||
146 | this.editedItem = Object.assign({}, item); | ||
147 | this.editVerionDilaog = true; | ||
148 | }, | ||
149 | getAppVersion() { | ||
150 | http() | ||
151 | .get("getAppVersion", { | ||
152 | headers: { | ||
153 | Authorization: "Bearer " + this.schoolToken, | ||
154 | }, | ||
155 | }) | ||
156 | .then((response) => { | ||
157 | this.versionList = [response.data.data]; | ||
158 | }) | ||
159 | .catch((error) => { | ||
160 | this.showLoader = false; | ||
161 | this.snackbar = true; | ||
162 | this.color = "error"; | ||
163 | this.text = error.response.data.message; | ||
164 | }); | ||
165 | }, | ||
166 | update() { | ||
167 | if (this.$refs.editAppVersionForm.validate()) { | ||
168 | let editVersion = { | ||
169 | appVersionId: this.editedItem._id, | ||
170 | androidAppVersion: this.editedItem.androidAppVersion, | ||
171 | iosAppVersion: this.editedItem.iosAppVersion, | ||
172 | }; | ||
173 | http() | ||
174 | .put("/updateAppVersion", editVersion, { | ||
175 | headers: { Authorization: "Bearer " + this.schoolToken }, | ||
176 | }) | ||
177 | .then((response) => { | ||
178 | this.snackbar = true; | ||
179 | this.color = "success"; | ||
180 | this.text = response.data.message; | ||
181 | this.getAppVersion(); | ||
182 | this.editVerionDilaog = false; | ||
183 | }) | ||
184 | .catch((error) => { | ||
185 | this.snackbar = true; | ||
186 | this.color = "error"; | ||
187 | this.text = error.response.data.message; | ||
188 | }); | ||
189 | } | ||
190 | }, | ||
191 | }, | ||
192 | |||
193 | mounted() { | ||
194 | this.getAppVersion(); | ||
195 | this.role = this.$store.state.role; | ||
196 | this.token = this.$store.state.token; | ||
197 | this.schoolToken = this.$store.state.schoolToken; | ||
198 | }, | ||
199 | }; | ||
200 | </script> |
src/pages/School/school.vue
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <v-tabs grow slider-color="gray"> | 3 | <v-tabs grow slider-color="gray"> |
4 | <v-tab | 4 | <v-tab |
5 | ripple | 5 | ripple |
6 | @click="activeTab('existing')" | 6 | @click="activeTab('existing')" |
7 | v-bind:class="{ active: isActive }" | 7 | v-bind:class="{ active: isActive }" |
8 | id="tab" | 8 | id="tab" |
9 | class="subheading" | 9 | class="subheading" |
10 | >Existing School</v-tab> | 10 | >Existing School</v-tab> |
11 | <v-tab | 11 | <v-tab |
12 | ripple | 12 | ripple |
13 | @click="activeTab('new')" | 13 | @click="activeTab('new')" |
14 | v-bind:class="{ active: newActive }" | 14 | v-bind:class="{ active: newActive }" |
15 | id="tab1" | 15 | id="tab1" |
16 | User | 16 | User |
17 | class="subheading" | 17 | class="subheading" |
18 | >Add New School</v-tab> | 18 | >Add New School</v-tab> |
19 | 19 | ||
20 | <!-- ****** EDITS STUDENTS DETAILS ****** --> | 20 | <!-- ****** EDITS STUDENTS DETAILS ****** --> |
21 | 21 | ||
22 | <v-tab-item> | 22 | <v-tab-item> |
23 | <v-snackbar | 23 | <v-snackbar |
24 | :timeout="timeout" | 24 | :timeout="timeout" |
25 | :top="y === 'top'" | 25 | :top="y === 'top'" |
26 | :right="x === 'right'" | 26 | :right="x === 'right'" |
27 | :vertical="mode === 'vertical'" | 27 | :vertical="mode === 'vertical'" |
28 | v-model="snackbar" | 28 | v-model="snackbar" |
29 | color="success" | 29 | color="success" |
30 | >{{ text }}</v-snackbar> | 30 | >{{ text }}</v-snackbar> |
31 | <v-dialog v-model="dialog" max-width="1500px" scrollable> | 31 | <v-dialog v-model="dialog" max-width="1500px" scrollable> |
32 | <v-card flat> | 32 | <v-card flat> |
33 | <v-toolbar color="grey lighten-2" flat> | 33 | <v-toolbar dark class="card-styles" flat> |
34 | <v-spacer></v-spacer> | 34 | <v-spacer></v-spacer> |
35 | <v-toolbar-title> | 35 | <v-toolbar-title> |
36 | <h3>Edit School</h3> | 36 | <h3>Edit School</h3> |
37 | </v-toolbar-title> | 37 | </v-toolbar-title> |
38 | <v-spacer></v-spacer> | 38 | <v-spacer></v-spacer> |
39 | <v-icon size="24" class="right" @click="dialog = false">cancel</v-icon> | ||
39 | </v-toolbar> | 40 | </v-toolbar> |
40 | <v-card-text style="height: 686px;"> | 41 | <v-card-text style="height: 686px;"> |
41 | <v-form ref="form"> | 42 | <v-form ref="form"> |
42 | <v-container fluid> | 43 | <v-container fluid> |
43 | <v-layout> | 44 | <v-layout> |
44 | <v-flex | 45 | <v-flex |
45 | xs12 | 46 | xs12 |
46 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 47 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
47 | > | 48 | > |
48 | <v-avatar size="160px"> | 49 | <v-avatar size="160px"> |
49 | <img | 50 | <img |
50 | src="/static/icon/user.png" | 51 | src="/static/icon/user.png" |
51 | v-if="!editedItem.schoolLogoUrl && !imageUrl" | 52 | v-if="!editedItem.schoolLogoUrl && !imageUrl" |
52 | /> | 53 | /> |
53 | <img | 54 | <img |
54 | :src="editedItem.schoolLogoUrl" | 55 | :src="editedItem.schoolLogoUrl" |
55 | v-else-if="editedItem.schoolLogoUrl && !imageUrl" | 56 | v-else-if="editedItem.schoolLogoUrl && !imageUrl" |
56 | /> | 57 | /> |
57 | <img | 58 | <img |
58 | v-if="imageUrl" | 59 | v-if="imageUrl" |
59 | :src="imageUrl" | 60 | :src="imageUrl" |
60 | height="150" | 61 | height="150" |
61 | style="border-radius:50%; width:200px" | 62 | style="border-radius:50%; width:200px" |
62 | /> | 63 | /> |
63 | </v-avatar> | 64 | </v-avatar> |
64 | <input | 65 | <input |
65 | type="file" | 66 | type="file" |
66 | style="display: none" | 67 | style="display: none" |
67 | ref="image" | 68 | ref="image" |
68 | accept="image/*" | 69 | accept="image/*" |
69 | @change="onFilePicked" | 70 | @change="onFilePicked" |
70 | /> | 71 | /> |
71 | </v-flex> | 72 | </v-flex> |
72 | </v-layout> | 73 | </v-layout> |
73 | <v-layout> | 74 | <v-layout> |
74 | <v-flex xs12 sm4> | 75 | <v-flex xs12 sm4> |
75 | <v-layout> | 76 | <v-layout> |
76 | <v-flex xs4 class="pt-4 subheading"> | 77 | <v-flex xs4 class="pt-4 subheading"> |
77 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 78 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
78 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> | 79 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> |
79 | </v-flex> | 80 | </v-flex> |
80 | <v-flex xs8 class="ml-3"> | 81 | <v-flex xs8 class="ml-3"> |
81 | <v-text-field v-model="editedItem.name" placeholder="fill your full Name"></v-text-field> | 82 | <v-text-field v-model="editedItem.name" placeholder="fill your full Name"></v-text-field> |
82 | </v-flex> | 83 | </v-flex> |
83 | </v-layout> | 84 | </v-layout> |
84 | </v-flex> | 85 | </v-flex> |
85 | <v-flex xs12 sm4> | 86 | <v-flex xs12 sm4> |
86 | <v-layout> | 87 | <v-layout> |
87 | <v-flex xs4 class="pt-4 subheading"> | 88 | <v-flex xs4 class="pt-4 subheading"> |
88 | <label class="right hidden-xs-only hidden-sm-only">Email ID:</label> | 89 | <label class="right hidden-xs-only hidden-sm-only">Email ID:</label> |
89 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">EmailID:</label> | 90 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">EmailID:</label> |
90 | </v-flex> | 91 | </v-flex> |
91 | <v-flex xs8 class="ml-3"> | 92 | <v-flex xs8 class="ml-3"> |
92 | <v-text-field placeholder="fill your email" v-model="editedItem.email"></v-text-field> | 93 | <v-text-field placeholder="fill your email" v-model="editedItem.email"></v-text-field> |
93 | </v-flex> | 94 | </v-flex> |
94 | </v-layout> | 95 | </v-layout> |
95 | </v-flex> | 96 | </v-flex> |
96 | <v-flex xs12 sm4> | 97 | <v-flex xs12 sm4> |
97 | <v-layout> | 98 | <v-layout> |
98 | <v-flex xs4 class="pt-4 subheading"> | 99 | <v-flex xs4 class="pt-4 subheading"> |
99 | <label class="right">Society Name:</label> | 100 | <label class="right">Society Name:</label> |
100 | </v-flex> | 101 | </v-flex> |
101 | <v-flex xs8 class="ml-3"> | 102 | <v-flex xs8 class="ml-3"> |
102 | <v-text-field | 103 | <v-text-field |
103 | placeholder="fill your Society Name" | 104 | placeholder="fill your Society Name" |
104 | v-model="editedItem.societyName" | 105 | v-model="editedItem.societyName" |
105 | ></v-text-field> | 106 | ></v-text-field> |
106 | </v-flex> | 107 | </v-flex> |
107 | </v-layout> | 108 | </v-layout> |
108 | </v-flex> | 109 | </v-flex> |
109 | </v-layout> | 110 | </v-layout> |
110 | <v-layout> | 111 | <v-layout> |
111 | <v-flex xs12 sm4> | 112 | <v-flex xs12 sm4> |
112 | <v-layout> | 113 | <v-layout> |
113 | <v-flex xs4 class="pt-4 subheading"> | 114 | <v-flex xs4 class="pt-4 subheading"> |
114 | <label class="right">City:</label> | 115 | <label class="right">City:</label> |
115 | </v-flex> | 116 | </v-flex> |
116 | <v-flex xs8 class="ml-3"> | 117 | <v-flex xs8 class="ml-3"> |
117 | <v-text-field v-model="editedItem.city" placeholder="fill your City Name"></v-text-field> | 118 | <v-text-field v-model="editedItem.city" placeholder="fill your City Name"></v-text-field> |
118 | </v-flex> | 119 | </v-flex> |
119 | </v-layout> | 120 | </v-layout> |
120 | </v-flex> | 121 | </v-flex> |
121 | <v-flex xs12 sm4> | 122 | <v-flex xs12 sm4> |
122 | <v-layout> | 123 | <v-layout> |
123 | <v-flex xs4 class="pt-4 subheading"> | 124 | <v-flex xs4 class="pt-4 subheading"> |
124 | <label class="right">State:</label> | 125 | <label class="right">State:</label> |
125 | </v-flex> | 126 | </v-flex> |
126 | <v-flex xs8 class="ml-3"> | 127 | <v-flex xs8 class="ml-3"> |
127 | <v-text-field | 128 | <v-text-field |
128 | v-model="editedItem.state" | 129 | v-model="editedItem.state" |
129 | placeholder="fill your City Name" | 130 | placeholder="fill your City Name" |
130 | ></v-text-field> | 131 | ></v-text-field> |
131 | </v-flex> | 132 | </v-flex> |
132 | </v-layout> | 133 | </v-layout> |
133 | </v-flex> | 134 | </v-flex> |
134 | <v-flex xs12 sm4> | 135 | <v-flex xs12 sm4> |
135 | <v-layout> | 136 | <v-layout> |
136 | <v-flex xs4 class="pt-4 subheading"> | 137 | <v-flex xs4 class="pt-4 subheading"> |
137 | <label class="right">Pincode:</label> | 138 | <label class="right">Pincode:</label> |
138 | </v-flex> | 139 | </v-flex> |
139 | <v-flex xs8 class="ml-3"> | 140 | <v-flex xs8 class="ml-3"> |
140 | <v-text-field | 141 | <v-text-field |
141 | v-model="editedItem.pinCode" | 142 | v-model="editedItem.pinCode" |
142 | placeholder="fill your pincode" | 143 | placeholder="fill your pincode" |
143 | type="number" | 144 | type="number" |
144 | ></v-text-field> | 145 | ></v-text-field> |
145 | </v-flex> | 146 | </v-flex> |
146 | </v-layout> | 147 | </v-layout> |
147 | </v-flex> | 148 | </v-flex> |
148 | </v-layout> | 149 | </v-layout> |
149 | <v-layout> | 150 | <v-layout> |
150 | <v-flex xs12 sm4> | 151 | <v-flex xs12 sm4> |
151 | <v-layout> | 152 | <v-layout> |
152 | <v-flex xs4 class="pt-4 subheading"> | 153 | <v-flex xs4 class="pt-4 subheading"> |
153 | <label class="right">Fax No:</label> | 154 | <label class="right">Fax No:</label> |
154 | </v-flex> | 155 | </v-flex> |
155 | <v-flex xs8 class="ml-3"> | 156 | <v-flex xs8 class="ml-3"> |
156 | <v-text-field v-model="editedItem.faxNo" placeholder="fill your fax No"></v-text-field> | 157 | <v-text-field v-model="editedItem.faxNo" placeholder="fill your fax No"></v-text-field> |
157 | </v-flex> | 158 | </v-flex> |
158 | </v-layout> | 159 | </v-layout> |
159 | </v-flex> | 160 | </v-flex> |
160 | <v-flex xs12 sm4> | 161 | <v-flex xs12 sm4> |
161 | <v-layout> | 162 | <v-layout> |
162 | <v-flex xs4 class="pt-4 subheading"> | 163 | <v-flex xs4 class="pt-4 subheading"> |
163 | <label class="right">Country:</label> | 164 | <label class="right">Country:</label> |
164 | </v-flex> | 165 | </v-flex> |
165 | <v-flex xs8 class="ml-3"> | 166 | <v-flex xs8 class="ml-3"> |
166 | <v-text-field | 167 | <v-text-field |
167 | v-model="editedItem.country" | 168 | v-model="editedItem.country" |
168 | placeholder="fill your Country" | 169 | placeholder="fill your Country" |
169 | ></v-text-field> | 170 | ></v-text-field> |
170 | </v-flex> | 171 | </v-flex> |
171 | </v-layout> | 172 | </v-layout> |
172 | </v-flex> | 173 | </v-flex> |
173 | <v-flex xs12 sm4> | 174 | <v-flex xs12 sm4> |
174 | <v-layout> | 175 | <v-layout> |
175 | <v-flex xs4 class="pt-4 subheading"> | 176 | <v-flex xs4 class="pt-4 subheading"> |
176 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 177 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
177 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> | 178 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> |
178 | </v-flex> | 179 | </v-flex> |
179 | <v-flex xs8 class="ml-3"> | 180 | <v-flex xs8 class="ml-3"> |
180 | <v-text-field | 181 | <v-text-field |
181 | v-model="editedItem.mobile" | 182 | v-model="editedItem.mobile" |
182 | placeholder="fill your MobileNo" | 183 | placeholder="fill your MobileNo" |
183 | name="mobileNo" | 184 | name="mobileNo" |
184 | ></v-text-field> | 185 | ></v-text-field> |
185 | </v-flex> | 186 | </v-flex> |
186 | </v-layout> | 187 | </v-layout> |
187 | </v-flex> | 188 | </v-flex> |
188 | </v-layout> | 189 | </v-layout> |
189 | <v-layout> | 190 | <v-layout> |
190 | <v-flex xs12 sm4> | 191 | <v-flex xs12 sm4> |
191 | <v-layout> | 192 | <v-layout> |
192 | <v-flex xs4 class="pt-4 subheading"> | 193 | <v-flex xs4 class="pt-4 subheading"> |
193 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> | 194 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> |
194 | <label | 195 | <label |
195 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 196 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
196 | >LandLineNo:</label> | 197 | >LandLineNo:</label> |
197 | </v-flex> | 198 | </v-flex> |
198 | <v-flex xs8 class="ml-3"> | 199 | <v-flex xs8 class="ml-3"> |
199 | <v-text-field | 200 | <v-text-field |
200 | v-model="editedItem.landLineNo" | 201 | v-model="editedItem.landLineNo" |
201 | placeholder="fill your LandLine No" | 202 | placeholder="fill your LandLine No" |
202 | type="number" | 203 | type="number" |
203 | ></v-text-field> | 204 | ></v-text-field> |
204 | </v-flex> | 205 | </v-flex> |
205 | </v-layout> | 206 | </v-layout> |
206 | </v-flex> | 207 | </v-flex> |
207 | <v-flex xs12 sm4> | 208 | <v-flex xs12 sm4> |
208 | <v-layout> | 209 | <v-layout> |
209 | <v-flex xs4 class="pt-4 subheading"> | 210 | <v-flex xs4 class="pt-4 subheading"> |
210 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> | 211 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> |
211 | <label | 212 | <label |
212 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 213 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
213 | >Registration-No:</label> | 214 | >Registration-No:</label> |
214 | </v-flex> | 215 | </v-flex> |
215 | <v-flex xs8 class="ml-3"> | 216 | <v-flex xs8 class="ml-3"> |
216 | <v-text-field | 217 | <v-text-field |
217 | v-model="editedItem.registrationNo" | 218 | v-model="editedItem.registrationNo" |
218 | placeholder="fill your Registration No" | 219 | placeholder="fill your Registration No" |
219 | type="number" | 220 | type="number" |
220 | ></v-text-field> | 221 | ></v-text-field> |
221 | </v-flex> | 222 | </v-flex> |
222 | </v-layout> | 223 | </v-layout> |
223 | </v-flex> | 224 | </v-flex> |
224 | <v-flex xs12 sm4> | 225 | <v-flex xs12 sm4> |
225 | <v-layout> | 226 | <v-layout> |
226 | <v-flex xs4 class="pt-4 subheading"> | 227 | <v-flex xs4 class="pt-4 subheading"> |
227 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 228 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
228 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> | 229 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> |
229 | </v-flex> | 230 | </v-flex> |
230 | <v-flex xs8 class="ml-3"> | 231 | <v-flex xs8 class="ml-3"> |
231 | <v-text-field | 232 | <v-text-field |
232 | label="Select Image" | 233 | label="Select Image" |
233 | @click="pickFile" | 234 | @click="pickFile" |
234 | v-model="imageName" | 235 | v-model="imageName" |
235 | append-icon="attach_file" | 236 | append-icon="attach_file" |
236 | ></v-text-field> | 237 | ></v-text-field> |
237 | </v-flex> | 238 | </v-flex> |
238 | </v-layout> | 239 | </v-layout> |
239 | </v-flex> | 240 | </v-flex> |
240 | </v-layout> | 241 | </v-layout> |
241 | <v-layout> | 242 | <v-layout> |
242 | <v-flex xs12 sm4> | 243 | <v-flex xs12 sm4> |
243 | <v-layout> | 244 | <v-layout> |
244 | <v-flex xs4 class="pt-4 subheading"> | 245 | <v-flex xs4 class="pt-4 subheading"> |
245 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> | 246 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> |
246 | <label | 247 | <label |
247 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 248 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
248 | >SchoolDetail:</label> | 249 | >SchoolDetail:</label> |
249 | </v-flex> | 250 | </v-flex> |
250 | <v-flex xs8 class="ml-3"> | 251 | <v-flex xs8 class="ml-3"> |
251 | <v-text-field | 252 | <v-text-field |
252 | v-model="editedItem.schoolDetails" | 253 | v-model="editedItem.schoolDetails" |
253 | placeholder="fill your School Details" | 254 | placeholder="fill your School Details" |
254 | ></v-text-field> | 255 | ></v-text-field> |
255 | </v-flex> | 256 | </v-flex> |
256 | </v-layout> | 257 | </v-layout> |
257 | </v-flex> | 258 | </v-flex> |
258 | <v-flex xs12 sm4> | 259 | <v-flex xs12 sm4> |
259 | <v-layout> | 260 | <v-layout> |
260 | <v-flex xs4 class="pt-4 subheading"> | 261 | <v-flex xs4 class="pt-4 subheading"> |
261 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> | 262 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> |
262 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> | 263 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> |
263 | </v-flex> | 264 | </v-flex> |
264 | <v-flex xs8 class="ml-3"> | 265 | <v-flex xs8 class="ml-3"> |
265 | <v-text-field | 266 | <v-text-field |
266 | v-model="editedItem.establishmentYear" | 267 | v-model="editedItem.establishmentYear" |
267 | placeholder="fill your Academic Year" | 268 | placeholder="fill your Academic Year" |
268 | ></v-text-field> | 269 | ></v-text-field> |
269 | </v-flex> | 270 | </v-flex> |
270 | </v-layout> | 271 | </v-layout> |
271 | </v-flex> | 272 | </v-flex> |
272 | <v-flex xs12 sm4> | 273 | <v-flex xs12 sm4> |
273 | <v-layout> | 274 | <v-layout> |
274 | <v-flex xs4 class="pt-4 subheading"> | 275 | <v-flex xs4 class="pt-4 subheading"> |
275 | <label class="right hidden-xs-only hidden-sm-only">Web Site Url:</label> | 276 | <label class="right hidden-xs-only hidden-sm-only">Web Site Url:</label> |
276 | <label | 277 | <label |
277 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 278 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
278 | >WebSiteUrl:</label> | 279 | >WebSiteUrl:</label> |
279 | </v-flex> | 280 | </v-flex> |
280 | <v-flex xs8 class="ml-3"> | 281 | <v-flex xs8 class="ml-3"> |
281 | <v-text-field | 282 | <v-text-field |
282 | v-model="editedItem.websiteUrl" | 283 | v-model="editedItem.websiteUrl" |
283 | placeholder="fill your MobileNo" | 284 | placeholder="fill your MobileNo" |
284 | ></v-text-field> | 285 | ></v-text-field> |
285 | </v-flex> | 286 | </v-flex> |
286 | </v-layout> | 287 | </v-layout> |
287 | </v-flex> | 288 | </v-flex> |
288 | </v-layout> | 289 | </v-layout> |
289 | <v-layout> | 290 | <v-layout> |
290 | <v-flex xs12 sm4> | 291 | <v-flex xs12 sm4> |
291 | <v-layout> | 292 | <v-layout> |
292 | <v-flex xs4 class="pt-4 subheading"> | 293 | <v-flex xs4 class="pt-4 subheading"> |
293 | <label class="right">Address:</label> | 294 | <label class="right">Address:</label> |
294 | </v-flex> | 295 | </v-flex> |
295 | <v-flex xs8 class="ml-3"> | 296 | <v-flex xs8 class="ml-3"> |
296 | <v-text-field | 297 | <v-text-field |
297 | v-model="editedItem.address" | 298 | v-model="editedItem.address" |
298 | placeholder="Select your Address" | 299 | placeholder="Select your Address" |
299 | ></v-text-field> | 300 | ></v-text-field> |
300 | </v-flex> | 301 | </v-flex> |
301 | </v-layout> | 302 | </v-layout> |
302 | </v-flex> | 303 | </v-flex> |
303 | </v-layout> | 304 | </v-layout> |
304 | <v-layout> | 305 | <v-layout> |
305 | <v-flex xs12 sm12> | 306 | <v-flex xs12 sm12> |
306 | <v-layout> | 307 | <v-layout> |
307 | <v-flex xs6> | 308 | <v-flex xs6> |
308 | <v-btn round dark @click.native="close">Cancel</v-btn> | 309 | <v-btn round dark @click.native="close" class="clear-button">Cancel</v-btn> |
309 | </v-flex> | 310 | </v-flex> |
310 | <v-flex xs6> | 311 | <v-flex xs6> |
311 | <v-btn @click="save" round dark :loading="loading" class="right">Save</v-btn> | 312 | <v-btn |
313 | @click="save" | ||
314 | round | ||
315 | dark | ||
316 | :loading="loading" | ||
317 | class="right add-button" | ||
318 | >Save</v-btn> | ||
312 | </v-flex> | 319 | </v-flex> |
313 | </v-layout> | 320 | </v-layout> |
314 | </v-flex> | 321 | </v-flex> |
315 | </v-layout> | 322 | </v-layout> |
316 | </v-container> | 323 | </v-container> |
317 | </v-form> | 324 | </v-form> |
318 | </v-card-text> | 325 | </v-card-text> |
319 | </v-card> | 326 | </v-card> |
320 | </v-dialog> | 327 | </v-dialog> |
321 | <v-snackbar | 328 | <v-snackbar |
322 | :timeout="timeout" | 329 | :timeout="timeout" |
323 | :top="y === 'top'" | 330 | :top="y === 'top'" |
324 | :right="x === 'right'" | 331 | :right="x === 'right'" |
325 | :vertical="mode === 'vertical'" | 332 | :vertical="mode === 'vertical'" |
326 | v-model="snackbar" | 333 | v-model="snackbar" |
327 | color="success" | 334 | color="success" |
328 | >{{ text }}</v-snackbar> | 335 | >{{ text }}</v-snackbar> |
329 | 336 | ||
330 | <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> | 337 | <!-- ****** EXISTING-USERS STUDENTS TABLE ****** --> |
331 | <v-data-table | 338 | <v-data-table |
332 | :headers="headers" | 339 | :headers="headers" |
333 | :items="schoolList" | 340 | :items="schoolList" |
334 | :pagination.sync="pagination" | 341 | :pagination.sync="pagination" |
335 | :search="search" | 342 | :search="search" |
336 | > | 343 | > |
337 | <template slot="items" slot-scope="props"> | 344 | <template slot="items" slot-scope="props"> |
338 | <tr class="tr"> | 345 | <tr class="tr"> |
339 | <td class="td td-row text-xs-center">{{ props.index + 1}}</td> | 346 | <td class="td td-row text-xs-center">{{ props.index + 1}}</td> |
340 | <td class="td td-row text-xs-center"> | 347 | <td class="td td-row text-xs-center"> |
341 | <v-avatar> | 348 | <v-avatar> |
342 | <img :src="props.item.schoolLogoUrl" v-if="props.item.schoolLogoUrl" /> | 349 | <img :src="props.item.schoolLogoUrl" v-if="props.item.schoolLogoUrl" /> |
343 | <img src="/static/icon/user.png" v-else-if="!props.item.schoolLogoUrl" /> | 350 | <img src="/static/icon/user.png" v-else-if="!props.item.schoolLogoUrl" /> |
344 | </v-avatar> | 351 | </v-avatar> |
345 | </td> | 352 | </td> |
346 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 353 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
347 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 354 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
348 | <td class="td td-row text-xs-center">{{ props.item.city }}</td> | 355 | <td class="td td-row text-xs-center">{{ props.item.city }}</td> |
349 | <td class="td td-row text-xs-center">{{ props.item.state }}</td> | 356 | <td class="td td-row text-xs-center">{{ props.item.state }}</td> |
350 | <td class="td td-row text-xs-center">{{ props.item.mobile}}</td> | 357 | <td class="td td-row text-xs-center">{{ props.item.mobile}}</td> |
351 | <td class="td td-row text-xs-center"> | 358 | <td class="td td-row text-xs-center"> |
352 | <v-switch | 359 | <v-switch |
353 | class="pl-3" | 360 | class="pl-3" |
354 | v-model="props.item.status" | 361 | v-model="props.item.status" |
355 | @change="suspendSchoolStatus(props.item.status,props.item._id)" | 362 | @change="suspendSchoolStatus(props.item.status,props.item._id)" |
356 | ></v-switch> | 363 | ></v-switch> |
357 | </td> | 364 | </td> |
358 | <td class="td td-row text-xs-center"> | 365 | <td class="td td-row text-xs-center"> |
359 | <span> | 366 | <span> |
360 | <!-- <router-link :to="{ name:'viewSchoolDashboard',params: { schoolId:props.item._id } }"> --> | 367 | <!-- <router-link :to="{ name:'viewSchoolDashboard',params: { schoolId:props.item._id } }"> --> |
361 | <v-tooltip top> | 368 | <v-tooltip top> |
362 | <img | 369 | <img |
363 | slot="activator" | 370 | slot="activator" |
364 | style="cursor:pointer; width:25px; height:18px; " | 371 | style="cursor:pointer; width:25px; height:18px; " |
365 | class="mr5" | 372 | class="mr5" |
366 | src="/static/icon/eye1.png" | 373 | src="/static/icon/eye1.png" |
367 | @click="adminAccess(props.item)" | 374 | @click="adminAccess(props.item)" |
368 | /> | 375 | /> |
369 | <span>View</span> | 376 | <span>View</span> |
370 | </v-tooltip> | 377 | </v-tooltip> |
371 | <!-- </router-link> --> | 378 | <!-- </router-link> --> |
372 | <v-tooltip top> | 379 | <v-tooltip top> |
373 | <img | 380 | <img |
374 | slot="activator" | 381 | slot="activator" |
375 | style="cursor:pointer; width:20px; height:18px; " | 382 | style="cursor:pointer; width:20px; height:18px; " |
376 | class="mr5" | 383 | class="mr5" |
377 | @click="editItem(props.item)" | 384 | @click="editItem(props.item)" |
378 | src="/static/icon/edit1.png" | 385 | src="/static/icon/edit1.png" |
379 | /> | 386 | /> |
380 | <span>Edit</span> | 387 | <span>Edit</span> |
381 | </v-tooltip> | 388 | </v-tooltip> |
382 | </span> | 389 | </span> |
383 | </td> | 390 | </td> |
384 | </tr> | 391 | </tr> |
385 | </template> | 392 | </template> |
386 | <v-alert | 393 | <v-alert |
387 | slot="no-results" | 394 | slot="no-results" |
388 | :value="true" | 395 | :value="true" |
389 | color="error" | 396 | color="error" |
390 | icon="warning" | 397 | icon="warning" |
391 | >Your search for "{{ search }}" found no results.</v-alert> | 398 | >Your search for "{{ search }}" found no results.</v-alert> |
392 | </v-data-table> | 399 | </v-data-table> |
393 | </v-tab-item> | 400 | </v-tab-item> |
394 | 401 | ||
395 | <!-- ****** ADD STUDENTS DETAILS****** --> | 402 | <!-- ****** ADD STUDENTS DETAILS****** --> |
396 | <v-tab-item> | 403 | <v-tab-item> |
397 | <v-container fluid> | 404 | <v-container fluid> |
398 | <v-layout align-center justify-center fill-height> | 405 | <v-layout align-center justify-center fill-height> |
399 | <v-flex xs12 sm12 md10 lg11> | 406 | <v-flex xs12 sm12 md10 lg11> |
400 | <!-- <v-container fluid> --> | 407 | <!-- <v-container fluid> --> |
401 | <v-snackbar | 408 | <v-snackbar |
402 | :timeout="timeout" | 409 | :timeout="timeout" |
403 | :top="y === 'top'" | 410 | :top="y === 'top'" |
404 | :right="x === 'right'" | 411 | :right="x === 'right'" |
405 | :vertical="mode === 'vertical'" | 412 | :vertical="mode === 'vertical'" |
406 | v-model="snackbar" | 413 | v-model="snackbar" |
407 | color="success" | 414 | color="success" |
408 | >{{ text }}</v-snackbar> | 415 | >{{ text }}</v-snackbar> |
409 | <v-flex xs12 sm12> | 416 | <v-flex xs12 sm12> |
410 | <v-form ref="form" v-model="valid" lazy-validation> | 417 | <v-form ref="form" v-model="valid" lazy-validation> |
411 | <v-layout> | 418 | <v-layout> |
412 | <v-flex | 419 | <v-flex |
413 | xs12 | 420 | xs12 |
414 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 421 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
415 | > | 422 | > |
416 | <v-avatar size="100px"> | 423 | <v-avatar size="100px"> |
417 | <img src="/static/icon/user.png" v-if="!imageUrl" /> | 424 | <img src="/static/icon/user.png" v-if="!imageUrl" /> |
418 | </v-avatar> | 425 | </v-avatar> |
419 | <input | 426 | <input |
420 | type="file" | 427 | type="file" |
421 | style="display: none" | 428 | style="display: none" |
422 | ref="image" | 429 | ref="image" |
423 | accept="image/*" | 430 | accept="image/*" |
424 | @change="onFilePicked" | 431 | @change="onFilePicked" |
425 | /> | 432 | /> |
426 | <img | 433 | <img |
427 | :src="imageData.imageUrl" | 434 | :src="imageData.imageUrl" |
428 | height="150" | 435 | height="150" |
429 | v-if="imageUrl" | 436 | v-if="imageUrl" |
430 | style="border-radius:50%; width:200px" | 437 | style="border-radius:50%; width:200px" |
431 | /> | 438 | /> |
432 | </v-flex> | 439 | </v-flex> |
433 | </v-layout> | 440 | </v-layout> |
434 | <v-layout wrap> | 441 | <v-layout wrap> |
435 | <v-flex xs12 sm6> | 442 | <v-flex xs12 sm6> |
436 | <v-layout> | 443 | <v-layout> |
437 | <v-flex xs4 sm4 class="pt-4 subheading"> | 444 | <v-flex xs4 sm4 class="pt-4 subheading"> |
438 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 445 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
439 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> | 446 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> |
440 | </v-flex> | 447 | </v-flex> |
441 | <v-flex xs8 sm8 class="ml-3"> | 448 | <v-flex xs8 sm8 class="ml-3"> |
442 | <v-text-field | 449 | <v-text-field |
443 | v-model="addSchool.name" | 450 | v-model="addSchool.name" |
444 | placeholder="fill your full Name" | 451 | placeholder="fill your full Name" |
445 | name="name" | 452 | name="name" |
446 | type="text" | 453 | type="text" |
447 | :rules="nameRules" | 454 | :rules="nameRules" |
448 | required | 455 | required |
449 | ></v-text-field> | 456 | ></v-text-field> |
450 | </v-flex> | 457 | </v-flex> |
451 | </v-layout> | 458 | </v-layout> |
452 | </v-flex> | 459 | </v-flex> |
453 | <v-flex xs12 sm6> | 460 | <v-flex xs12 sm6> |
454 | <v-layout> | 461 | <v-layout> |
455 | <v-flex xs4 sm4 class="pt-4 subheading"> | 462 | <v-flex xs4 sm4 class="pt-4 subheading"> |
456 | <label class="right">Email ID:</label> | 463 | <label class="right">Email ID:</label> |
457 | </v-flex> | 464 | </v-flex> |
458 | <v-flex xs8 sm8 class="ml-3"> | 465 | <v-flex xs8 sm8 class="ml-3"> |
459 | <v-text-field | 466 | <v-text-field |
460 | placeholder="fill your email" | 467 | placeholder="fill your email" |
461 | :rules="emailRules" | 468 | :rules="emailRules" |
462 | v-model="addSchool.email" | 469 | v-model="addSchool.email" |
463 | type="text" | 470 | type="text" |
464 | required | 471 | required |
465 | ></v-text-field> | 472 | ></v-text-field> |
466 | </v-flex> | 473 | </v-flex> |
467 | </v-layout> | 474 | </v-layout> |
468 | </v-flex> | 475 | </v-flex> |
469 | </v-layout> | 476 | </v-layout> |
470 | <v-layout wrap> | 477 | <v-layout wrap> |
471 | <v-flex xs12 sm6> | 478 | <v-flex xs12 sm6> |
472 | <v-layout> | 479 | <v-layout> |
473 | <v-flex xs4 sm4 class="pt-4 subheading"> | 480 | <v-flex xs4 sm4 class="pt-4 subheading"> |
474 | <label class="right hidden-sm-only hidden-xs-only">Society Name:</label> | 481 | <label class="right hidden-sm-only hidden-xs-only">Society Name:</label> |
475 | <label | 482 | <label |
476 | class="right hidden-lg-only hidden-xl-only hidden-md-only" | 483 | class="right hidden-lg-only hidden-xl-only hidden-md-only" |
477 | >SocietyName:</label> | 484 | >SocietyName:</label> |
478 | </v-flex> | 485 | </v-flex> |
479 | <v-flex xs8 sm8 class="ml-3"> | 486 | <v-flex xs8 sm8 class="ml-3"> |
480 | <v-text-field | 487 | <v-text-field |
481 | v-model="addSchool.societyName" | 488 | v-model="addSchool.societyName" |
482 | placeholder="fill your Society Name" | 489 | placeholder="fill your Society Name" |
483 | required | 490 | required |
484 | ></v-text-field> | 491 | ></v-text-field> |
485 | </v-flex> | 492 | </v-flex> |
486 | </v-layout> | 493 | </v-layout> |
487 | </v-flex> | 494 | </v-flex> |
488 | <v-flex xs12 sm6> | 495 | <v-flex xs12 sm6> |
489 | <v-layout> | 496 | <v-layout> |
490 | <v-flex xs4 class="pt-4 subheading"> | 497 | <v-flex xs4 class="pt-4 subheading"> |
491 | <label class="right">City:</label> | 498 | <label class="right">City:</label> |
492 | </v-flex> | 499 | </v-flex> |
493 | <v-flex xs8 class="ml-3"> | 500 | <v-flex xs8 class="ml-3"> |
494 | <v-text-field | 501 | <v-text-field |
495 | v-model="addSchool.city" | 502 | v-model="addSchool.city" |
496 | placeholder="fill your City Name" | 503 | placeholder="fill your City Name" |
497 | name="City" | 504 | name="City" |
498 | type="text" | 505 | type="text" |
499 | :rules="cityRules" | 506 | :rules="cityRules" |
500 | required | 507 | required |
501 | ></v-text-field> | 508 | ></v-text-field> |
502 | </v-flex> | 509 | </v-flex> |
503 | </v-layout> | 510 | </v-layout> |
504 | </v-flex> | 511 | </v-flex> |
505 | </v-layout> | 512 | </v-layout> |
506 | <v-layout wrap> | 513 | <v-layout wrap> |
507 | <v-flex xs12 sm6> | 514 | <v-flex xs12 sm6> |
508 | <v-layout> | 515 | <v-layout> |
509 | <v-flex xs4 class="pt-4 subheading"> | 516 | <v-flex xs4 class="pt-4 subheading"> |
510 | <label class="right">State:</label> | 517 | <label class="right">State:</label> |
511 | </v-flex> | 518 | </v-flex> |
512 | <v-flex xs8 class="ml-3"> | 519 | <v-flex xs8 class="ml-3"> |
513 | <v-text-field | 520 | <v-text-field |
514 | v-model="addSchool.state" | 521 | v-model="addSchool.state" |
515 | placeholder="fill your State Name" | 522 | placeholder="fill your State Name" |
516 | name="state" | 523 | name="state" |
517 | type="text" | 524 | type="text" |
518 | :rules="stateRules" | 525 | :rules="stateRules" |
519 | required | 526 | required |
520 | ></v-text-field> | 527 | ></v-text-field> |
521 | </v-flex> | 528 | </v-flex> |
522 | </v-layout> | 529 | </v-layout> |
523 | </v-flex> | 530 | </v-flex> |
524 | <v-flex xs12 sm6> | 531 | <v-flex xs12 sm6> |
525 | <v-layout> | 532 | <v-layout> |
526 | <v-flex xs4 class="pt-4 subheading"> | 533 | <v-flex xs4 class="pt-4 subheading"> |
527 | <label class="right">Pincode:</label> | 534 | <label class="right">Pincode:</label> |
528 | </v-flex> | 535 | </v-flex> |
529 | <v-flex xs8 class="ml-3"> | 536 | <v-flex xs8 class="ml-3"> |
530 | <v-text-field | 537 | <v-text-field |
531 | v-model="addSchool.pinCode" | 538 | v-model="addSchool.pinCode" |
532 | placeholder="fill your pincode" | 539 | placeholder="fill your pincode" |
533 | name="pincode" | 540 | name="pincode" |
534 | type="number" | 541 | type="number" |
535 | :rules="pincode" | 542 | :rules="pincode" |
536 | required | 543 | required |
537 | ></v-text-field> | 544 | ></v-text-field> |
538 | </v-flex> | 545 | </v-flex> |
539 | </v-layout> | 546 | </v-layout> |
540 | </v-flex> | 547 | </v-flex> |
541 | </v-layout> | 548 | </v-layout> |
542 | <v-layout wrap> | 549 | <v-layout wrap> |
543 | <v-flex xs12 sm6> | 550 | <v-flex xs12 sm6> |
544 | <v-layout> | 551 | <v-layout> |
545 | <v-flex xs4 class="pt-4 subheading"> | 552 | <v-flex xs4 class="pt-4 subheading"> |
546 | <label class="right">Fax No:</label> | 553 | <label class="right">Fax No:</label> |
547 | </v-flex> | 554 | </v-flex> |
548 | <v-flex xs8 class="ml-3"> | 555 | <v-flex xs8 class="ml-3"> |
549 | <v-text-field v-model="addSchool.faxNo" label="fill your Fax No" required></v-text-field> | 556 | <v-text-field v-model="addSchool.faxNo" label="fill your Fax No" required></v-text-field> |
550 | </v-flex> | 557 | </v-flex> |
551 | </v-layout> | 558 | </v-layout> |
552 | </v-flex> | 559 | </v-flex> |
553 | <v-flex xs12 sm6> | 560 | <v-flex xs12 sm6> |
554 | <v-layout> | 561 | <v-layout> |
555 | <v-flex xs4 class="pt-4 subheading"> | 562 | <v-flex xs4 class="pt-4 subheading"> |
556 | <label class="right hidden-xs-only hidden-sm-only">Country:</label> | 563 | <label class="right hidden-xs-only hidden-sm-only">Country:</label> |
557 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> | 564 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> |
558 | </v-flex> | 565 | </v-flex> |
559 | <v-flex xs8 class="ml-3"> | 566 | <v-flex xs8 class="ml-3"> |
560 | <v-autocomplete | 567 | <v-autocomplete |
561 | v-model="addSchool.country" | 568 | v-model="addSchool.country" |
562 | :items="countries" | 569 | :items="countries" |
563 | :rules="country" | 570 | :rules="country" |
564 | placeholder="Select Country Name" | 571 | placeholder="Select Country Name" |
565 | required | 572 | required |
566 | ></v-autocomplete> | 573 | ></v-autocomplete> |
567 | </v-flex> | 574 | </v-flex> |
568 | </v-layout> | 575 | </v-layout> |
569 | </v-flex> | 576 | </v-flex> |
570 | </v-layout> | 577 | </v-layout> |
571 | <v-layout wrap> | 578 | <v-layout wrap> |
572 | <v-flex xs12 sm6> | 579 | <v-flex xs12 sm6> |
573 | <v-layout> | 580 | <v-layout> |
574 | <v-flex xs4 class="pt-4 subheading"> | 581 | <v-flex xs4 class="pt-4 subheading"> |
575 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 582 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
576 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> | 583 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> |
577 | </v-flex> | 584 | </v-flex> |
578 | <v-flex xs8 class="ml-3"> | 585 | <v-flex xs8 class="ml-3"> |
579 | <v-text-field | 586 | <v-text-field |
580 | v-model="addSchool.mobile" | 587 | v-model="addSchool.mobile" |
581 | placeholder="fill your Mobile No" | 588 | placeholder="fill your Mobile No" |
582 | name="mobileNo" | 589 | name="mobileNo" |
583 | type="number" | 590 | type="number" |
584 | :rules="mobileNoRules" | 591 | :rules="mobileNoRules" |
585 | required | 592 | required |
586 | ></v-text-field> | 593 | ></v-text-field> |
587 | </v-flex> | 594 | </v-flex> |
588 | </v-layout> | 595 | </v-layout> |
589 | </v-flex> | 596 | </v-flex> |
590 | <v-flex xs12 sm6> | 597 | <v-flex xs12 sm6> |
591 | <v-layout> | 598 | <v-layout> |
592 | <v-flex xs4 class="pt-4 subheading"> | 599 | <v-flex xs4 class="pt-4 subheading"> |
593 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> | 600 | <label class="right hidden-xs-only hidden-sm-only">LandLine No:</label> |
594 | <label | 601 | <label |
595 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 602 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
596 | >LandLineNo:</label> | 603 | >LandLineNo:</label> |
597 | </v-flex> | 604 | </v-flex> |
598 | <v-flex xs8 class="ml-3"> | 605 | <v-flex xs8 class="ml-3"> |
599 | <v-text-field | 606 | <v-text-field |
600 | v-model="addSchool.landLineNo" | 607 | v-model="addSchool.landLineNo" |
601 | :items="countries" | 608 | :items="countries" |
602 | placeholder="fill your LandLine No" | 609 | placeholder="fill your LandLine No" |
603 | type="number" | 610 | type="number" |
604 | required | 611 | required |
605 | ></v-text-field> | 612 | ></v-text-field> |
606 | </v-flex> | 613 | </v-flex> |
607 | </v-layout> | 614 | </v-layout> |
608 | </v-flex> | 615 | </v-flex> |
609 | </v-layout> | 616 | </v-layout> |
610 | <v-layout wrap> | 617 | <v-layout wrap> |
611 | <v-flex xs12 sm6> | 618 | <v-flex xs12 sm6> |
612 | <v-layout> | 619 | <v-layout> |
613 | <v-flex xs4 class="pt-4 subheading"> | 620 | <v-flex xs4 class="pt-4 subheading"> |
614 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> | 621 | <label class="right hidden-xs-only hidden-sm-only">Registration No:</label> |
615 | <label | 622 | <label |
616 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 623 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
617 | >Registration-No:</label> | 624 | >Registration-No:</label> |
618 | </v-flex> | 625 | </v-flex> |
619 | <v-flex xs8 class="ml-3"> | 626 | <v-flex xs8 class="ml-3"> |
620 | <v-text-field | 627 | <v-text-field |
621 | v-model="addSchool.registrationNo" | 628 | v-model="addSchool.registrationNo" |
622 | placeholder="Fill your Registration No" | 629 | placeholder="Fill your Registration No" |
623 | required | 630 | required |
624 | ></v-text-field> | 631 | ></v-text-field> |
625 | </v-flex> | 632 | </v-flex> |
626 | </v-layout> | 633 | </v-layout> |
627 | </v-flex> | 634 | </v-flex> |
628 | <v-flex xs12 sm6> | 635 | <v-flex xs12 sm6> |
629 | <v-layout> | 636 | <v-layout> |
630 | <v-flex xs4 class="pt-4 subheading"> | 637 | <v-flex xs4 class="pt-4 subheading"> |
631 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> | 638 | <label class="right hidden-xs-only hidden-sm-only">School Details:</label> |
632 | <label | 639 | <label |
633 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 640 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
634 | >SchoolDetails:</label> | 641 | >SchoolDetails:</label> |
635 | </v-flex> | 642 | </v-flex> |
636 | <v-flex xs8 class="ml-3"> | 643 | <v-flex xs8 class="ml-3"> |
637 | <v-text-field | 644 | <v-text-field |
638 | v-model="addSchool.schoolDetails" | 645 | v-model="addSchool.schoolDetails" |
639 | placeholder="Fill your School Details" | 646 | placeholder="Fill your School Details" |
640 | :rules="schoolDetailRule" | 647 | :rules="schoolDetailRule" |
641 | required | 648 | required |
642 | ></v-text-field> | 649 | ></v-text-field> |
643 | </v-flex> | 650 | </v-flex> |
644 | </v-layout> | 651 | </v-layout> |
645 | </v-flex> | 652 | </v-flex> |
646 | </v-layout> | 653 | </v-layout> |
647 | <v-layout wrap> | 654 | <v-layout wrap> |
648 | <v-flex xs12 sm6> | 655 | <v-flex xs12 sm6> |
649 | <v-layout> | 656 | <v-layout> |
650 | <v-flex xs4 class="pt-4 subheading"> | 657 | <v-flex xs4 class="pt-4 subheading"> |
651 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 658 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
652 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> | 659 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod :</label> |
653 | </v-flex> | 660 | </v-flex> |
654 | <v-flex xs8 class="ml-3"> | 661 | <v-flex xs8 class="ml-3"> |
655 | <v-text-field | 662 | <v-text-field |
656 | label="Select Image" | 663 | label="Select Image" |
657 | @click="pickFile" | 664 | @click="pickFile" |
658 | v-model="imageName" | 665 | v-model="imageName" |
659 | append-icon="attach_file" | 666 | append-icon="attach_file" |
660 | ></v-text-field> | 667 | ></v-text-field> |
661 | </v-flex> | 668 | </v-flex> |
662 | </v-layout> | 669 | </v-layout> |
663 | </v-flex> | 670 | </v-flex> |
664 | <v-flex xs12 sm6> | 671 | <v-flex xs12 sm6> |
665 | <v-layout> | 672 | <v-layout> |
666 | <v-flex xs4 class="pt-4 subheading"> | 673 | <v-flex xs4 class="pt-4 subheading"> |
667 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> | 674 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> |
668 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> | 675 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Year:</label> |
669 | </v-flex> | 676 | </v-flex> |
670 | <v-flex xs8 class="ml-3"> | 677 | <v-flex xs8 class="ml-3"> |
671 | <v-text-field | 678 | <v-text-field |
672 | v-model="addSchool.establishmentYear" | 679 | v-model="addSchool.establishmentYear" |
673 | placeholder="fill your Academic Year" | 680 | placeholder="fill your Academic Year" |
674 | :rules="establishmentYearRules" | 681 | :rules="establishmentYearRules" |
675 | required | 682 | required |
676 | ></v-text-field> | 683 | ></v-text-field> |
677 | </v-flex> | 684 | </v-flex> |
678 | </v-layout> | 685 | </v-layout> |
679 | </v-flex> | 686 | </v-flex> |
680 | </v-layout> | 687 | </v-layout> |
681 | <v-layout wrap> | 688 | <v-layout wrap> |
682 | <v-flex xs12 sm6> | 689 | <v-flex xs12 sm6> |
683 | <v-layout> | 690 | <v-layout> |
684 | <v-flex xs4 sm4 class="pt-4 subheading"> | 691 | <v-flex xs4 sm4 class="pt-4 subheading"> |
685 | <label class="right hidden-xs-only hidden-sm-only">WebSite Url:</label> | 692 | <label class="right hidden-xs-only hidden-sm-only">WebSite Url:</label> |
686 | <label | 693 | <label |
687 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 694 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
688 | >WebSiteUrl:</label> | 695 | >WebSiteUrl:</label> |
689 | </v-flex> | 696 | </v-flex> |
690 | <v-flex xs8 sm8 class="ml-3"> | 697 | <v-flex xs8 sm8 class="ml-3"> |
691 | <v-text-field | 698 | <v-text-field |
692 | name="input-4-3" | 699 | name="input-4-3" |
693 | v-model="addSchool.websiteUrl" | 700 | v-model="addSchool.websiteUrl" |
694 | placeholder="fill Your WebSite Url" | 701 | placeholder="fill Your WebSite Url" |
695 | required | 702 | required |
696 | ></v-text-field> | 703 | ></v-text-field> |
697 | </v-flex> | 704 | </v-flex> |
698 | </v-layout> | 705 | </v-layout> |
699 | </v-flex> | 706 | </v-flex> |
700 | <v-flex xs12 sm6> | 707 | <v-flex xs12 sm6> |
701 | <v-layout> | 708 | <v-layout> |
702 | <v-flex xs4 sm4 class="pt-4 subheading"> | 709 | <v-flex xs4 sm4 class="pt-4 subheading"> |
703 | <label class="right">Address:</label> | 710 | <label class="right">Address:</label> |
704 | </v-flex> | 711 | </v-flex> |
705 | <v-flex xs8 sm8 class="ml-3"> | 712 | <v-flex xs8 sm8 class="ml-3"> |
706 | <v-text-field | 713 | <v-text-field |
707 | name="input-4-3" | 714 | name="input-4-3" |
708 | v-model="addSchool.address" | 715 | v-model="addSchool.address" |
709 | :rules="presentAddress" | 716 | :rules="presentAddress" |
710 | placeholder="fill Your Address" | 717 | placeholder="fill Your Address" |
711 | required | 718 | required |
712 | ></v-text-field> | 719 | ></v-text-field> |
713 | </v-flex> | 720 | </v-flex> |
714 | </v-layout> | 721 | </v-layout> |
715 | </v-flex> | 722 | </v-flex> |
716 | </v-layout> | 723 | </v-layout> |
717 | <v-layout> | 724 | <v-layout> |
718 | <v-flex xs12 sm11 offset-md1> | 725 | <v-flex xs12 sm11 offset-md1> |
719 | <v-layout> | 726 | <v-layout> |
720 | <v-flex xs6> | 727 | <v-flex xs6> |
721 | <v-btn round dark @click="clear()">Clear</v-btn> | 728 | <v-btn round dark @click="clear()" class="clear-button">Clear</v-btn> |
722 | </v-flex> | 729 | </v-flex> |
723 | <v-flex xs6> | 730 | <v-flex xs6> |
724 | <v-btn @click="submit" round dark :loading="loading" class="right">Add</v-btn> | 731 | <v-btn |
732 | @click="submit" | ||
733 | round | ||
734 | dark | ||
735 | :loading="loading" | ||
736 | class="right add-button" | ||
737 | >Add</v-btn> | ||
725 | </v-flex> | 738 | </v-flex> |
726 | </v-layout> | 739 | </v-layout> |
727 | </v-flex> | 740 | </v-flex> |
728 | </v-layout> | 741 | </v-layout> |
729 | </v-form> | 742 | </v-form> |
730 | </v-flex> | 743 | </v-flex> |
731 | </v-flex> | 744 | </v-flex> |
732 | </v-layout> | 745 | </v-layout> |
733 | </v-container> | 746 | </v-container> |
734 | </v-tab-item> | 747 | </v-tab-item> |
735 | </v-tabs> | 748 | </v-tabs> |
736 | <div class="loader" v-if="showLoader"> | 749 | <div class="loader" v-if="showLoader"> |
737 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 750 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
738 | </div> | 751 | </div> |
739 | </div> | 752 | </div> |
740 | </template> | 753 | </template> |
741 | 754 | ||
742 | <script> | 755 | <script> |
743 | import http from "@/Services/http.js"; | 756 | import http from "@/Services/http.js"; |
744 | import moment from "moment"; | 757 | import moment from "moment"; |
745 | import countryList from "@/script/country.js"; | 758 | import countryList from "@/script/country.js"; |
746 | 759 | ||
747 | export default { | 760 | export default { |
748 | data: () => ({ | 761 | data: () => ({ |
749 | e2: 0, | 762 | e2: 0, |
750 | snackbar: false, | 763 | snackbar: false, |
751 | y: "top", | 764 | y: "top", |
752 | x: "right", | 765 | x: "right", |
753 | mode: "", | 766 | mode: "", |
754 | timeout: 3000, | 767 | timeout: 3000, |
755 | text: "", | 768 | text: "", |
756 | showLoader: false, | 769 | showLoader: false, |
757 | loading: false, | 770 | loading: false, |
758 | date: null, | 771 | date: null, |
759 | search: "", | 772 | search: "", |
760 | menu: false, | 773 | menu: false, |
761 | menu1: false, | 774 | menu1: false, |
762 | dialog: false, | 775 | dialog: false, |
763 | valid: true, | 776 | valid: true, |
764 | isActive: true, | 777 | isActive: true, |
765 | newActive: false, | 778 | newActive: false, |
766 | pagination: { | 779 | pagination: { |
767 | rowsPerPage: 15 | 780 | rowsPerPage: 15, |
768 | }, | 781 | }, |
769 | imageData: {}, | 782 | imageData: {}, |
770 | imageName: "", | 783 | imageName: "", |
771 | imageUrl: "", | 784 | imageUrl: "", |
772 | imageFile: "", | 785 | imageFile: "", |
773 | nameRules: [v => !!v || "Full Name is required"], | 786 | nameRules: [(v) => !!v || "Full Name is required"], |
774 | dateRules: [v => !!v || "DOB is required"], | 787 | dateRules: [(v) => !!v || "DOB is required"], |
775 | cityRules: [v => !!v || "City Name is required"], | 788 | cityRules: [(v) => !!v || "City Name is required"], |
776 | pincode: [v => !!v || " Pincode is required"], | 789 | pincode: [(v) => !!v || " Pincode is required"], |
777 | country: [v => !!v || " Country Name is required"], | 790 | country: [(v) => !!v || " Country Name is required"], |
778 | permanentAddress: [v => !!v || " Permanent Address is requiclearred"], | 791 | permanentAddress: [(v) => !!v || " Permanent Address is requiclearred"], |
779 | presentAddress: [v => !!v || " Present Address is required"], | 792 | presentAddress: [(v) => !!v || " Present Address is required"], |
780 | mobileNoRules: [v => !!v || "Mobile Number is required"], | 793 | mobileNoRules: [(v) => !!v || "Mobile Number is required"], |
781 | stateRules: [v => !!v || "State Name is required"], | 794 | stateRules: [(v) => !!v || "State Name is required"], |
782 | schoolDetailRule: [v => !!v || "school Detail is required"], | 795 | schoolDetailRule: [(v) => !!v || "school Detail is required"], |
783 | sectionRules: [v => !!v || " Section Name is required"], | 796 | sectionRules: [(v) => !!v || " Section Name is required"], |
784 | genderRules: [v => !!v || " Select Gender is required"], | 797 | genderRules: [(v) => !!v || " Select Gender is required"], |
785 | establishmentYearRules: [v => !!v || " Academic Year is required"], | 798 | establishmentYearRules: [(v) => !!v || " Academic Year is required"], |
786 | errorMessages: "", | 799 | errorMessages: "", |
787 | emailRules: [ | 800 | emailRules: [ |
788 | v => !!v || "E-mail is required", | 801 | (v) => !!v || "E-mail is required", |
789 | v => | 802 | (v) => |
790 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | 803 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
791 | "E-mail must be valid" | 804 | "E-mail must be valid", |
792 | ], | 805 | ], |
793 | countries: [], | 806 | countries: [], |
794 | headers: [ | 807 | headers: [ |
795 | { | 808 | { |
796 | text: "No.", | 809 | text: "No.", |
797 | align: "center", | 810 | align: "center", |
798 | sortable: false, | 811 | sortable: false, |
799 | value: "rollNo" | 812 | value: "rollNo", |
800 | }, | 813 | }, |
801 | { | 814 | { |
802 | text: "school Logo", | 815 | text: "school Logo", |
803 | value: "schoolLogoUrl", | 816 | value: "schoolLogoUrl", |
804 | sortable: false, | 817 | sortable: false, |
805 | align: "center" | 818 | align: "center", |
806 | }, | 819 | }, |
807 | { text: "Name", value: "name", sortable: false, align: "center" }, | 820 | { text: "Name", value: "name", sortable: false, align: "center" }, |
808 | { text: "Email", value: "email", sortable: false, align: "center" }, | 821 | { text: "Email", value: "email", sortable: false, align: "center" }, |
809 | { text: "City", value: "city", sortable: false, align: "center" }, | 822 | { text: "City", value: "city", sortable: false, align: "center" }, |
810 | { | 823 | { |
811 | text: "State", | 824 | text: "State", |
812 | value: "state", | 825 | value: "state", |
813 | sortable: false, | 826 | sortable: false, |
814 | align: "center" | 827 | align: "center", |
815 | }, | 828 | }, |
816 | { | 829 | { |
817 | text: "Mobile", | 830 | text: "Mobile", |
818 | value: "mobile", | 831 | value: "mobile", |
819 | sortable: false, | 832 | sortable: false, |
820 | align: "center" | 833 | align: "center", |
821 | }, | 834 | }, |
822 | { text: "Action", value: "", sortable: false, align: "center" } | 835 | { text: "Action", value: "", sortable: false, align: "center" }, |
823 | ], | 836 | ], |
824 | schoolList: [], | 837 | schoolList: [], |
825 | editedIndex: -1, | 838 | editedIndex: -1, |
826 | addSchool: { | 839 | addSchool: { |
827 | role: "ADMIN" | 840 | role: "ADMIN", |
828 | }, | 841 | }, |
829 | editedItem: {}, | 842 | editedItem: {}, |
830 | schoolToken: {} | 843 | schoolToken: {}, |
831 | }), | 844 | }), |
832 | methods: { | 845 | methods: { |
833 | getSchool() { | 846 | getSchool() { |
834 | this.showLoader = true; | 847 | this.showLoader = true; |
835 | http() | 848 | http() |
836 | .get("/getSchoolList", { | 849 | .get("/getSchoolList", { |
837 | headers: { Authorization: "Bearer " + this.$store.state.schoolToken } | 850 | headers: { Authorization: "Bearer " + this.$store.state.schoolToken }, |
838 | }) | 851 | }) |
839 | .then(response => { | 852 | .then((response) => { |
840 | this.schoolList = response.data.data; | 853 | this.schoolList = response.data.data; |
841 | this.showLoader = false; | 854 | this.showLoader = false; |
842 | }) | 855 | }) |
843 | .catch(error => { | 856 | .catch((error) => { |
844 | this.showLoader = false; | 857 | this.showLoader = false; |
845 | // if (error.response.status === 401) { | 858 | // if (error.response.status === 401) { |
846 | // this.$router.replace({ path: "/" }); | 859 | // this.$router.replace({ path: "/" }); |
847 | // this.$store.dispatch("setToken", null); | 860 | // this.$store.dispatch("setToken", null); |
848 | // this.$store.dispatch("Id", null); | 861 | // this.$store.dispatch("Id", null); |
849 | // this.$store.dispatch("Role", null); | 862 | // this.$store.dispatch("Role", null); |
850 | // } | 863 | // } |
851 | }); | 864 | }); |
852 | }, | 865 | }, |
853 | pickFile() { | 866 | pickFile() { |
854 | this.$refs.image.click(); | 867 | this.$refs.image.click(); |
855 | }, | 868 | }, |
856 | dates: function(date) { | 869 | dates: function (date) { |
857 | return moment(date).format("MMMM DD, YYYY"); | 870 | return moment(date).format("MMMM DD, YYYY"); |
858 | }, | 871 | }, |
859 | onFilePicked(e) { | 872 | onFilePicked(e) { |
860 | // console.log(e) | 873 | // console.log(e) |
861 | const files = e.target.files; | 874 | const files = e.target.files; |
862 | this.imageData.upload = e.target.files[0]; | 875 | this.imageData.upload = e.target.files[0]; |
863 | if (files[0] !== undefined) { | 876 | if (files[0] !== undefined) { |
864 | this.imageName = files[0].name; | 877 | this.imageName = files[0].name; |
865 | if (this.imageName.lastIndexOf(".") <= 0) { | 878 | if (this.imageName.lastIndexOf(".") <= 0) { |
866 | return; | 879 | return; |
867 | } | 880 | } |
868 | const fr = new FileReader(); | 881 | const fr = new FileReader(); |
869 | fr.readAsDataURL(files[0]); | 882 | fr.readAsDataURL(files[0]); |
870 | fr.addEventListener("load", () => { | 883 | fr.addEventListener("load", () => { |
871 | this.imageUrl = fr.result; | 884 | this.imageUrl = fr.result; |
872 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 885 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
873 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 886 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
874 | }); | 887 | }); |
875 | } else { | 888 | } else { |
876 | this.imageName = ""; | 889 | this.imageName = ""; |
877 | this.imageFile = ""; | 890 | this.imageFile = ""; |
878 | this.imageUrl = ""; | 891 | this.imageUrl = ""; |
879 | } | 892 | } |
880 | }, | 893 | }, |
881 | editItem(item) { | 894 | editItem(item) { |
882 | this.editedIndex = this.schoolList.indexOf(item); | 895 | this.editedIndex = this.schoolList.indexOf(item); |
883 | this.editedItem = Object.assign({}, item); | 896 | this.editedItem = Object.assign({}, item); |
884 | this.dialog = true; | 897 | this.dialog = true; |
885 | }, | 898 | }, |
886 | activeTab(type) { | 899 | activeTab(type) { |
887 | switch (type) { | 900 | switch (type) { |
888 | case "existing": | 901 | case "existing": |
889 | this.newActive = false; | 902 | this.newActive = false; |
890 | this.isActive = true; | 903 | this.isActive = true; |
891 | break; | 904 | break; |
892 | 905 | ||
893 | default: | 906 | default: |
894 | this.newActive = true; | 907 | this.newActive = true; |
895 | this.isActive = false; | 908 | this.isActive = false; |
896 | break; | 909 | break; |
897 | } | 910 | } |
898 | }, | 911 | }, |
899 | close() { | 912 | close() { |
900 | this.dialog = false; | 913 | this.dialog = false; |
901 | setTimeout(() => { | 914 | setTimeout(() => { |
902 | this.editedItem = Object.assign({}, this.defaultItem); | 915 | this.editedItem = Object.assign({}, this.defaultItem); |
903 | this.editedIndex = -1; | 916 | this.editedIndex = -1; |
904 | }, 300); | 917 | }, 300); |
905 | }, | 918 | }, |
906 | submit() { | 919 | submit() { |
907 | if (this.$refs.form.validate()) { | 920 | if (this.$refs.form.validate()) { |
908 | if (this.imageUrl) { | 921 | if (this.imageUrl) { |
909 | var str = this.imageUrl; | 922 | var str = this.imageUrl; |
910 | const [baseUrl, imageUrl] = str.split(/,/); | 923 | const [baseUrl, imageUrl] = str.split(/,/); |
911 | this.addSchool.upload = imageUrl; | 924 | this.addSchool.upload = imageUrl; |
912 | } | 925 | } |
913 | this.loading = true; | 926 | this.loading = true; |
914 | http() | 927 | http() |
915 | .post("/createSchool", this.addSchool, { | 928 | .post("/createSchool", this.addSchool, { |
916 | headers: { Authorization: "Bearer " + this.schoolToken } | 929 | headers: { Authorization: "Bearer " + this.schoolToken }, |
917 | }) | 930 | }) |
918 | .then(response => { | 931 | .then((response) => { |
919 | this.snackbar = true; | 932 | this.snackbar = true; |
920 | this.text = "New School added successfully"; | 933 | this.text = "New School added successfully"; |
921 | this.clear(); | 934 | this.clear(); |
922 | this.getSchool(); | 935 | this.getSchool(); |
923 | this.loading = false; | 936 | this.loading = false; |
924 | }) | 937 | }) |
925 | .catch(error => { | 938 | .catch((error) => { |
926 | this.snackbar = true; | 939 | this.snackbar = true; |
927 | this.text = error.response.data.message; | 940 | this.text = error.response.data.message; |
928 | this.loading = false; | 941 | this.loading = false; |
929 | }); | 942 | }); |
930 | } | 943 | } |
931 | }, | 944 | }, |
932 | clear() { | 945 | clear() { |
933 | this.$refs.form.reset(); | 946 | this.$refs.form.reset(); |
934 | this.imageUrl = ""; | 947 | this.imageUrl = ""; |
935 | }, | 948 | }, |
936 | save() { | 949 | save() { |
937 | if (this.imageUrl) { | 950 | if (this.imageUrl) { |
938 | var str = this.imageUrl; | 951 | var str = this.imageUrl; |
939 | const [baseUrl, imageUrl] = str.split(/,/); | 952 | const [baseUrl, imageUrl] = str.split(/,/); |
940 | this.editedItem.upload = imageUrl; | 953 | this.editedItem.upload = imageUrl; |
941 | } | 954 | } |
942 | this.editedItem.schoolId = this.editedItem._id; | 955 | this.editedItem.schoolId = this.editedItem._id; |
943 | http() | 956 | http() |
944 | .put("/updateSchool", this.editedItem, { | 957 | .put("/updateSchool", this.editedItem, { |
945 | headers: { Authorization: "Bearer " + this.schoolToken } | 958 | headers: { Authorization: "Bearer " + this.schoolToken }, |
946 | }) | 959 | }) |
947 | .then(response => { | 960 | .then((response) => { |
948 | this.snackbar = true; | 961 | this.snackbar = true; |
949 | this.text = "Successfully School Existing User"; | 962 | this.text = "Successfully School Existing User"; |
950 | this.imageUrl = ""; | 963 | this.imageUrl = ""; |
951 | this.getSchool(); | 964 | this.getSchool(); |
952 | this.close(); | 965 | this.close(); |
953 | }) | 966 | }) |
954 | .catch(error => { | 967 | .catch((error) => { |
955 | // console.log(error); | 968 | // console.log(error); |
956 | if ((this.snackbar = true)) { | 969 | if ((this.snackbar = true)) { |
957 | this.text = error.response.data.statusText; | 970 | this.text = error.response.data.statusText; |
958 | } | 971 | } |
959 | }); | 972 | }); |
960 | }, | 973 | }, |
961 | adminAccess(data) { | 974 | adminAccess(data) { |
962 | // console.log("dataaaaaaaaaaaaaa", data); | 975 | // console.log("dataaaaaaaaaaaaaa", data); |
963 | this.showLoader = true; | 976 | this.showLoader = true; |
964 | http() | 977 | http() |
965 | .get("/getAdminAccess", { | 978 | .get("/getAdminAccess", { |
966 | params: { schoolId: data._id }, | 979 | params: { schoolId: data._id }, |
967 | headers: { Authorization: "Bearer " + this.schoolToken } | 980 | headers: { Authorization: "Bearer " + this.schoolToken }, |
968 | }) | 981 | }) |
969 | .then(response => { | 982 | .then((response) => { |
970 | this.$store.dispatch("setToken", response.data.data.token); | 983 | this.$store.dispatch("setToken", response.data.data.token); |
971 | this.$store.dispatch("Id", response.data.data.id); | 984 | this.$store.dispatch("Id", response.data.data.id); |
972 | this.$store.dispatch("Role", response.data.data.role); | 985 | this.$store.dispatch("Role", response.data.data.role); |
973 | this.$router.push("/dashboard"); | 986 | this.$router.push("/dashboard"); |
974 | setTimeout(() => { | 987 | setTimeout(() => { |
975 | location.reload(); | 988 | location.reload(); |
976 | }, 1000); | 989 | }, 1000); |
977 | // let routeData = this.$router.resolve({ | 990 | // let routeData = this.$router.resolve({ |
978 | // name: "dashboardAdmin" | 991 | // name: "dashboardAdmin" |
979 | // }); | 992 | // }); |
980 | // window.open(routeData.href, "_blank"); | 993 | // window.open(routeData.href, "_blank"); |
981 | 994 | ||
982 | this.showLoader = false; | 995 | this.showLoader = false; |
983 | }) | 996 | }) |
984 | .catch(error => { | 997 | .catch((error) => { |
985 | this.showLoader = false; | 998 | this.showLoader = false; |
986 | }); | 999 | }); |
987 | }, | 1000 | }, |
988 | suspendSchoolStatus(suspendStatus, id) { | 1001 | suspendSchoolStatus(suspendStatus, id) { |
989 | let suspendStatusData = { | 1002 | let suspendStatusData = { |
990 | schoolId: id, | 1003 | schoolId: id, |
991 | status: suspendStatus | 1004 | status: suspendStatus, |
992 | }; | 1005 | }; |
993 | http() | 1006 | http() |
994 | .put("/suspendSchoolAccount", suspendStatusData, { | 1007 | .put("/suspendSchoolAccount", suspendStatusData, { |
995 | headers: { Authorization: "Bearer " + this.schoolToken } | 1008 | headers: { Authorization: "Bearer " + this.schoolToken }, |
996 | }) | 1009 | }) |
997 | .then(response => { | 1010 | .then((response) => { |
998 | this.getSchool(); | 1011 | this.getSchool(); |
999 | this.text = response.data.message; | 1012 | this.text = response.data.message; |
1000 | this.snackbar = true; | 1013 | this.snackbar = true; |
1001 | }) | 1014 | }) |
1002 | .catch(error => { | 1015 | .catch((error) => { |
1003 | // console.log(error.response.data.data); | 1016 | // console.log(error.response.data.data); |
1004 | this.snackbar = true; | 1017 | this.snackbar = true; |
1005 | this.text = error.response.data.message; | 1018 | this.text = error.response.data.message; |
1006 | }); | 1019 | }); |
1007 | } | 1020 | }, |
1008 | }, | 1021 | }, |
1009 | mounted() { | 1022 | mounted() { |
1010 | const getCountryList = countryList(); | 1023 | const getCountryList = countryList(); |
1011 | this.countries = getCountryList; | 1024 | this.countries = getCountryList; |
1012 | this.token = this.$store.state.token; | 1025 | this.token = this.$store.state.token; |
1013 | this.schoolToken = this.$store.state.schoolToken; | 1026 | this.schoolToken = this.$store.state.schoolToken; |
1014 | this.getSchool(); | 1027 | this.getSchool(); |
1015 | }, | 1028 | }, |
1016 | created() { | 1029 | created() { |
1017 | this.$root.$on("app:search", search => { | 1030 | this.$root.$on("app:search", (search) => { |
1018 | this.search = search; | 1031 | this.search = search; |
1019 | }); | 1032 | }); |
1020 | }, | 1033 | }, |
1021 | beforeDestroy() { | 1034 | beforeDestroy() { |
1022 | // dont forget to remove the listener | 1035 | // dont forget to remove the listener |
1023 | this.$root.$off("app:search"); | 1036 | this.$root.$off("app:search"); |
1024 | } | 1037 | }, |
1025 | }; | 1038 | }; |
1026 | </script> | 1039 | </script> |
1027 | <style scoped> | 1040 | <style scoped> |
1028 | .active { | 1041 | .active { |
1029 | background-color: gray; | 1042 | background-color: gray; |
1030 | color: white !important; | 1043 | color: white !important; |
1031 | } | 1044 | } |
1032 | .activebtn { | 1045 | .activebtn { |
1033 | color: black !important; | 1046 | color: black !important; |
1034 | } | 1047 | } |
1035 | </style> | 1048 | </style> |
src/pages/User/user.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EDIT USERS DETAILS ****** --> | 3 | <!-- ****** EDIT USERS DETAILS ****** --> |
4 | <v-dialog v-model="editUserDialog" max-width="1100px" scrollable> | 4 | <v-dialog v-model="editUserDialog" max-width="1100px" scrollable> |
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 User</label> | 8 | <label class="title text-xs-center">Edit User</label> |
9 | <v-icon size="24" class="right" @click="editUserDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editUserDialog = false">cancel</v-icon> |
10 | </v-flex> | 10 | </v-flex> |
11 | </v-layout> | 11 | </v-layout> |
12 | <v-card-text> | 12 | <v-card-text> |
13 | <v-layout> | 13 | <v-layout> |
14 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"> | 14 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center my-4"> |
15 | <v-avatar size="120px"> | 15 | <v-avatar size="120px"> |
16 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" /> | 16 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl && !imageUrl" /> |
17 | <img | 17 | <img |
18 | :src="editedItem.profilePicUrl" | 18 | :src="editedItem.profilePicUrl" |
19 | v-else-if="editedItem.profilePicUrl && !imageUrl" | 19 | v-else-if="editedItem.profilePicUrl && !imageUrl" |
20 | /> | 20 | /> |
21 | <img | 21 | <img |
22 | v-if="imageUrl" | 22 | v-if="imageUrl" |
23 | :src="imageUrl" | 23 | :src="imageUrl" |
24 | height="150" | 24 | height="150" |
25 | style="border-radius:50%; width:150px" | 25 | style="border-radius:50%; width:150px" |
26 | /> | 26 | /> |
27 | </v-avatar> | 27 | </v-avatar> |
28 | <input | 28 | <input |
29 | type="file" | 29 | type="file" |
30 | style="display:none" | 30 | style="display:none" |
31 | ref="image" | 31 | ref="image" |
32 | accept="image/*" | 32 | accept="image/*" |
33 | @change="onFilePicked" | 33 | @change="onFilePicked" |
34 | /> | 34 | /> |
35 | </v-flex> | 35 | </v-flex> |
36 | </v-layout> | 36 | </v-layout> |
37 | <v-layout wrap> | 37 | <v-layout wrap> |
38 | <v-flex xs12 sm6> | 38 | <v-flex xs12 sm6> |
39 | <v-layout> | 39 | <v-layout> |
40 | <v-flex xs4 class="pt-4 subheading"> | 40 | <v-flex xs4 class="pt-4 subheading"> |
41 | <label class="right">Name:</label> | 41 | <label class="right">Name:</label> |
42 | </v-flex> | 42 | </v-flex> |
43 | <v-flex xs8 class="ml-3"> | 43 | <v-flex xs8 class="ml-3"> |
44 | <v-text-field | 44 | <v-text-field |
45 | v-model="editedItem.name" | 45 | v-model="editedItem.name" |
46 | placeholder="fill your Name" | 46 | placeholder="fill your Name" |
47 | name="name" | 47 | name="name" |
48 | type="text" | 48 | type="text" |
49 | required | 49 | required |
50 | ></v-text-field> | 50 | ></v-text-field> |
51 | </v-flex> | 51 | </v-flex> |
52 | </v-layout> | 52 | </v-layout> |
53 | </v-flex> | 53 | </v-flex> |
54 | <v-flex xs12 sm6> | 54 | <v-flex xs12 sm6> |
55 | <v-layout> | 55 | <v-layout> |
56 | <v-flex xs4 class="pt-4 subheading"> | 56 | <v-flex xs4 class="pt-4 subheading"> |
57 | <label class="right">Email ID:</label> | 57 | <label class="right">Email ID:</label> |
58 | </v-flex> | 58 | </v-flex> |
59 | <v-flex xs8 class="ml-3"> | 59 | <v-flex xs8 class="ml-3"> |
60 | <v-text-field | 60 | <v-text-field |
61 | placeholder="fill your email" | 61 | placeholder="fill your email" |
62 | v-model="editedItem.email" | 62 | v-model="editedItem.email" |
63 | type="text" | 63 | type="text" |
64 | name="email" | 64 | name="email" |
65 | required | 65 | required |
66 | ></v-text-field> | 66 | ></v-text-field> |
67 | </v-flex> | 67 | </v-flex> |
68 | </v-layout> | 68 | </v-layout> |
69 | </v-flex> | 69 | </v-flex> |
70 | </v-layout> | 70 | </v-layout> |
71 | <v-layout wrap> | 71 | <v-layout wrap> |
72 | <v-flex xs12 sm6> | 72 | <v-flex xs12 sm6> |
73 | <v-layout> | 73 | <v-layout> |
74 | <v-flex xs4 class="pt-4 subheading"> | 74 | <v-flex xs4 class="pt-4 subheading"> |
75 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> | 75 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> |
76 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> | 76 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> |
77 | </v-flex> | 77 | </v-flex> |
78 | <v-flex xs8 class="ml-3"> | 78 | <v-flex xs8 class="ml-3"> |
79 | <v-menu | 79 | <v-menu |
80 | ref="menu" | 80 | ref="menu" |
81 | :close-on-content-click="false" | 81 | :close-on-content-click="false" |
82 | v-model="menu2" | 82 | v-model="menu2" |
83 | :nudge-right="40" | 83 | :nudge-right="40" |
84 | lazy | 84 | lazy |
85 | transition="scale-transition" | 85 | transition="scale-transition" |
86 | offset-y | 86 | offset-y |
87 | full-width | 87 | full-width |
88 | min-width="290px" | 88 | min-width="290px" |
89 | > | 89 | > |
90 | <v-text-field | 90 | <v-text-field |
91 | slot="activator" | 91 | slot="activator" |
92 | v-model="editedItem.dob" | 92 | v-model="editedItem.dob" |
93 | placeholder="Select date" | 93 | placeholder="Select date" |
94 | ></v-text-field> | 94 | ></v-text-field> |
95 | <v-date-picker | 95 | <v-date-picker |
96 | ref="picker" | 96 | ref="picker" |
97 | v-model="editedItem.dob" | 97 | v-model="editedItem.dob" |
98 | :max="new Date().toISOString().substr(0, 10)" | 98 | :max="new Date().toISOString().substr(0, 10)" |
99 | min="1950-01-01" | 99 | min="1950-01-01" |
100 | @input="menu2 = false" | 100 | @input="menu2 = false" |
101 | ></v-date-picker> | 101 | ></v-date-picker> |
102 | </v-menu> | 102 | </v-menu> |
103 | </v-flex> | 103 | </v-flex> |
104 | </v-layout> | 104 | </v-layout> |
105 | </v-flex> | 105 | </v-flex> |
106 | <v-flex xs12 sm6> | 106 | <v-flex xs12 sm6> |
107 | <v-layout> | 107 | <v-layout> |
108 | <v-flex xs4 class="pt-4 subheading"> | 108 | <v-flex xs4 class="pt-4 subheading"> |
109 | <label class="right">Gender:</label> | 109 | <label class="right">Gender:</label> |
110 | </v-flex> | 110 | </v-flex> |
111 | <v-flex xs8 class="ml-3"> | 111 | <v-flex xs8 class="ml-3"> |
112 | <v-select | 112 | <v-select |
113 | :items="gender" | 113 | :items="gender" |
114 | v-model="editedItem.gender" | 114 | v-model="editedItem.gender" |
115 | label="Select gender" | 115 | label="Select gender" |
116 | name="gender" | 116 | name="gender" |
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-layout> | 122 | </v-layout> |
123 | <v-layout wrap> | 123 | <v-layout wrap> |
124 | <v-flex xs12 sm6> | 124 | <v-flex xs12 sm6> |
125 | <v-layout> | 125 | <v-layout> |
126 | <v-flex xs4 class="pt-4 subheading"> | 126 | <v-flex xs4 class="pt-4 subheading"> |
127 | <label class="right">Religion:</label> | 127 | <label class="right">Religion:</label> |
128 | </v-flex> | 128 | </v-flex> |
129 | <v-flex xs8 class="ml-3"> | 129 | <v-flex xs8 class="ml-3"> |
130 | <v-text-field | 130 | <v-text-field |
131 | v-model="editedItem.religion" | 131 | v-model="editedItem.religion" |
132 | placeholder="fill your Religion" | 132 | placeholder="fill your Religion" |
133 | name="religion" | 133 | name="religion" |
134 | type="text" | 134 | type="text" |
135 | required | 135 | required |
136 | ></v-text-field> | 136 | ></v-text-field> |
137 | </v-flex> | 137 | </v-flex> |
138 | </v-layout> | 138 | </v-layout> |
139 | </v-flex> | 139 | </v-flex> |
140 | <v-flex xs12 sm6> | 140 | <v-flex xs12 sm6> |
141 | <v-layout> | 141 | <v-layout> |
142 | <v-flex xs4 class="pt-4 subheading"> | 142 | <v-flex xs4 class="pt-4 subheading"> |
143 | <label class="right">JoiningDate:</label> | 143 | <label class="right">JoiningDate:</label> |
144 | </v-flex> | 144 | </v-flex> |
145 | <v-flex xs8 class="ml-3"> | 145 | <v-flex xs8 class="ml-3"> |
146 | <v-menu | 146 | <v-menu |
147 | ref="menu" | 147 | ref="menu" |
148 | :close-on-content-click="false" | 148 | :close-on-content-click="false" |
149 | v-model="menu3" | 149 | v-model="menu3" |
150 | :nudge-right="40" | 150 | :nudge-right="40" |
151 | lazy | 151 | lazy |
152 | transition="scale-transition" | 152 | transition="scale-transition" |
153 | offset-y | 153 | offset-y |
154 | full-width | 154 | full-width |
155 | min-width="290px" | 155 | min-width="290px" |
156 | > | 156 | > |
157 | <v-text-field | 157 | <v-text-field |
158 | slot="activator" | 158 | slot="activator" |
159 | v-model="editedItem.joiningDate" | 159 | v-model="editedItem.joiningDate" |
160 | placeholder="Select date" | 160 | placeholder="Select date" |
161 | ></v-text-field> | 161 | ></v-text-field> |
162 | <v-date-picker | 162 | <v-date-picker |
163 | ref="picker" | 163 | ref="picker" |
164 | v-model="editedItem.joiningDate" | 164 | v-model="editedItem.joiningDate" |
165 | :max="new Date().toISOString().substr(0, 10)" | 165 | :max="new Date().toISOString().substr(0, 10)" |
166 | min="1950-01-01" | 166 | min="1950-01-01" |
167 | @input="menu3 = false" | 167 | @input="menu3 = false" |
168 | ></v-date-picker> | 168 | ></v-date-picker> |
169 | </v-menu> | 169 | </v-menu> |
170 | </v-flex> | 170 | </v-flex> |
171 | </v-layout> | 171 | </v-layout> |
172 | </v-flex> | 172 | </v-flex> |
173 | </v-layout> | 173 | </v-layout> |
174 | <v-layout wrap> | 174 | <v-layout wrap> |
175 | <v-flex xs12 sm6> | 175 | <v-flex xs12 sm6> |
176 | <v-layout> | 176 | <v-layout> |
177 | <v-flex xs4 class="pt-4 subheading"> | 177 | <v-flex xs4 class="pt-4 subheading"> |
178 | <label class="right">Phone:</label> | 178 | <label class="right">Phone:</label> |
179 | </v-flex> | 179 | </v-flex> |
180 | <v-flex xs8 class="ml-3"> | 180 | <v-flex xs8 class="ml-3"> |
181 | <v-text-field | 181 | <v-text-field |
182 | v-model="editedItem.phone" | 182 | v-model="editedItem.phone" |
183 | placeholder="fill your MobileNo" | 183 | placeholder="fill your MobileNo" |
184 | name="mobileNo" | 184 | name="mobileNo" |
185 | type="number" | 185 | type="number" |
186 | required | 186 | required |
187 | ></v-text-field> | 187 | ></v-text-field> |
188 | </v-flex> | 188 | </v-flex> |
189 | </v-layout> | 189 | </v-layout> |
190 | </v-flex> | 190 | </v-flex> |
191 | <v-flex xs12 sm6> | 191 | <v-flex xs12 sm6> |
192 | <v-layout> | 192 | <v-layout> |
193 | <v-flex xs4 class="pt-4 subheading"> | 193 | <v-flex xs4 class="pt-4 subheading"> |
194 | <label class="right hidden-sm-only hidden-xs-only">Select Role:</label> | 194 | <label class="right hidden-sm-only hidden-xs-only">Select Role:</label> |
195 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Role:</label> | 195 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Role:</label> |
196 | </v-flex> | 196 | </v-flex> |
197 | <v-flex xs8 class="ml-3"> | 197 | <v-flex xs8 class="ml-3"> |
198 | <v-autocomplete | 198 | <v-autocomplete |
199 | v-model="editedItem.role" | 199 | v-model="editedItem.role" |
200 | :label="editedItem.role" | 200 | :label="editedItem.role" |
201 | :items="userRole" | 201 | :items="userRole" |
202 | item-text="name" | 202 | item-text="name" |
203 | item-value="role" | 203 | item-value="role" |
204 | required | 204 | required |
205 | ></v-autocomplete> | 205 | ></v-autocomplete> |
206 | </v-flex> | 206 | </v-flex> |
207 | </v-layout> | 207 | </v-layout> |
208 | </v-flex> | 208 | </v-flex> |
209 | </v-layout> | 209 | </v-layout> |
210 | <v-layout wrap> | 210 | <v-layout wrap> |
211 | <v-flex xs12 sm6> | 211 | <v-flex xs12 sm6> |
212 | <v-layout> | 212 | <v-layout> |
213 | <v-flex xs4 class="pt-4 subheading"> | 213 | <v-flex xs4 class="pt-4 subheading"> |
214 | <label class="right hidden-sm-only hidden-xs-only">Uplaod Image:</label> | 214 | <label class="right hidden-sm-only hidden-xs-only">Uplaod Image:</label> |
215 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Uplaod:</label> | 215 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Uplaod:</label> |
216 | </v-flex> | 216 | </v-flex> |
217 | <v-flex xs8 class="ml-3"> | 217 | <v-flex xs8 class="ml-3"> |
218 | <v-text-field | 218 | <v-text-field |
219 | label="Select Image" | 219 | label="Select Image" |
220 | @click="pickFile" | 220 | @click="pickFile" |
221 | v-model="imageName" | 221 | v-model="imageName" |
222 | append-icon="attach_file" | 222 | append-icon="attach_file" |
223 | ></v-text-field> | 223 | ></v-text-field> |
224 | </v-flex> | 224 | </v-flex> |
225 | </v-layout> | 225 | </v-layout> |
226 | </v-flex> | 226 | </v-flex> |
227 | <v-flex xs12 sm6> | 227 | <v-flex xs12 sm6> |
228 | <v-layout> | 228 | <v-layout> |
229 | <v-flex xs4 class="pt-4 subheading"> | 229 | <v-flex xs4 class="pt-4 subheading"> |
230 | <label class="right">Address:</label> | 230 | <label class="right">Address:</label> |
231 | </v-flex> | 231 | </v-flex> |
232 | <v-flex xs8 class="ml-3"> | 232 | <v-flex xs8 class="ml-3"> |
233 | <v-text-field | 233 | <v-text-field |
234 | name="input-4-3" | 234 | name="input-4-3" |
235 | v-model="editedItem.address" | 235 | v-model="editedItem.address" |
236 | placeholder="fill Your Address" | 236 | placeholder="fill Your Address" |
237 | required | 237 | required |
238 | ></v-text-field> | 238 | ></v-text-field> |
239 | </v-flex> | 239 | </v-flex> |
240 | </v-layout> | 240 | </v-layout> |
241 | </v-flex> | 241 | </v-flex> |
242 | </v-layout> | 242 | </v-layout> |
243 | <v-layout> | 243 | <v-layout> |
244 | <v-flex xs12 sm12> | 244 | <v-flex xs12 sm12> |
245 | <v-card-actions class="hidden-sm-only hidden-xs-only"> | 245 | <v-card-actions class="hidden-sm-only hidden-xs-only"> |
246 | <v-spacer></v-spacer> | 246 | <v-spacer></v-spacer> |
247 | <v-btn round dark :loading="loading" @click="save" class="add-button">Save</v-btn> | 247 | <v-btn round dark :loading="loading" @click="save" class="add-button">Save</v-btn> |
248 | </v-card-actions> | 248 | </v-card-actions> |
249 | <v-card-actions class="hidden-lg-only hidden-xl-only hidden-md-only"> | 249 | <v-card-actions class="hidden-lg-only hidden-xl-only hidden-md-only"> |
250 | <v-spacer></v-spacer> | 250 | <v-spacer></v-spacer> |
251 | <v-btn round dark :loading="loading" @click="save" class="add-button">Save</v-btn> | 251 | <v-btn round dark :loading="loading" @click="save" class="add-button">Save</v-btn> |
252 | <v-spacer></v-spacer> | 252 | <v-spacer></v-spacer> |
253 | </v-card-actions> | 253 | </v-card-actions> |
254 | </v-flex> | 254 | </v-flex> |
255 | </v-layout> | 255 | </v-layout> |
256 | </v-card-text> | 256 | </v-card-text> |
257 | </v-card> | 257 | </v-card> |
258 | </v-dialog> | 258 | </v-dialog> |
259 | <!-- ****** PROFILE User DETAILS ****** --> | 259 | <!-- ****** PROFILE User DETAILS ****** --> |
260 | <v-dialog v-model="viewUserDialog" max-width="560px" scrollable> | 260 | <v-dialog v-model="viewUserDialog" max-width="560px" scrollable> |
261 | <v-card flat class="card-style pa-3" dark> | 261 | <v-card flat class="card-style pa-3" dark> |
262 | <v-layout> | 262 | <v-layout> |
263 | <v-flex xs12> | 263 | <v-flex xs12> |
264 | <label class="title text-xs-center">View User</label> | 264 | <label class="title text-xs-center">View User</label> |
265 | <v-icon size="24" class="right" @click="viewUserDialog = false">cancel</v-icon> | 265 | <v-icon size="24" class="right" @click="viewUserDialog = false">cancel</v-icon> |
266 | </v-flex> | 266 | </v-flex> |
267 | </v-layout> | 267 | </v-layout> |
268 | <v-card-text> | 268 | <v-card-text> |
269 | <v-container grid-list-md> | 269 | <v-container grid-list-md> |
270 | <v-layout wrap> | 270 | <v-layout wrap> |
271 | <v-flex> | 271 | <v-flex> |
272 | <v-flex align-center justify-center layout text-xs-center> | 272 | <v-flex align-center justify-center layout text-xs-center> |
273 | <v-avatar size="100px"> | 273 | <v-avatar size="100px"> |
274 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> | 274 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> |
275 | <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> | 275 | <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> |
276 | </v-avatar> | 276 | </v-avatar> |
277 | </v-flex> | 277 | </v-flex> |
278 | <v-layout> | 278 | <v-layout> |
279 | <v-flex xs4 sm6> | 279 | <v-flex xs4 sm6> |
280 | <h5 class="right my-1"> | 280 | <h5 class="right my-1"> |
281 | <b>Name:</b> | 281 | <b>Name:</b> |
282 | </h5> | 282 | </h5> |
283 | </v-flex> | 283 | </v-flex> |
284 | <v-flex sm6 xs8> | 284 | <v-flex sm6 xs8> |
285 | <h5 class="my-1">{{ editedItem.name }}</h5> | 285 | <h5 class="my-1">{{ editedItem.name }}</h5> |
286 | </v-flex> | 286 | </v-flex> |
287 | </v-layout> | 287 | </v-layout> |
288 | <v-layout> | 288 | <v-layout> |
289 | <v-flex xs4 sm6> | 289 | <v-flex xs4 sm6> |
290 | <h5 class="right my-1"> | 290 | <h5 class="right my-1"> |
291 | <b>Email:</b> | 291 | <b>Email:</b> |
292 | </h5> | 292 | </h5> |
293 | </v-flex> | 293 | </v-flex> |
294 | <v-flex sm6 xs8> | 294 | <v-flex sm6 xs8> |
295 | <h5 class="my-1">{{ editedItem.email }}</h5> | 295 | <h5 class="my-1">{{ editedItem.email }}</h5> |
296 | </v-flex> | 296 | </v-flex> |
297 | </v-layout> | 297 | </v-layout> |
298 | <v-layout> | 298 | <v-layout> |
299 | <v-flex xs4 sm6> | 299 | <v-flex xs4 sm6> |
300 | <h5 class="right my-1"> | 300 | <h5 class="right my-1"> |
301 | <b>Gender:</b> | 301 | <b>Gender:</b> |
302 | </h5> | 302 | </h5> |
303 | </v-flex> | 303 | </v-flex> |
304 | <v-flex sm6 xs8> | 304 | <v-flex sm6 xs8> |
305 | <h5 class="my-1">{{ editedItem.gender }}</h5> | 305 | <h5 class="my-1">{{ editedItem.gender }}</h5> |
306 | </v-flex> | 306 | </v-flex> |
307 | </v-layout> | 307 | </v-layout> |
308 | <v-layout> | 308 | <v-layout> |
309 | <v-flex xs4 sm6> | 309 | <v-flex xs4 sm6> |
310 | <h5 class="right my-1"> | 310 | <h5 class="right my-1"> |
311 | <b>Religion:</b> | 311 | <b>Religion:</b> |
312 | </h5> | 312 | </h5> |
313 | </v-flex> | 313 | </v-flex> |
314 | <v-flex sm6 xs8> | 314 | <v-flex sm6 xs8> |
315 | <h5 class="my-1">{{ editedItem.religion }}</h5> | 315 | <h5 class="my-1">{{ editedItem.religion }}</h5> |
316 | </v-flex> | 316 | </v-flex> |
317 | </v-layout> | 317 | </v-layout> |
318 | <v-layout> | 318 | <v-layout> |
319 | <v-flex xs4 sm6> | 319 | <v-flex xs4 sm6> |
320 | <h5 class="right my-1"> | 320 | <h5 class="right my-1"> |
321 | <b>Role:</b> | 321 | <b>Role:</b> |
322 | </h5> | 322 | </h5> |
323 | </v-flex> | 323 | </v-flex> |
324 | <v-flex sm6 xs8> | 324 | <v-flex sm6 xs8> |
325 | <h5 class="my-1">{{ editedItem.role }}</h5> | 325 | <h5 class="my-1">{{ editedItem.role }}</h5> |
326 | </v-flex> | 326 | </v-flex> |
327 | </v-layout> | 327 | </v-layout> |
328 | <v-layout> | 328 | <v-layout> |
329 | <v-flex xs4 sm6> | 329 | <v-flex xs4 sm6> |
330 | <h5 class="right my-1"> | 330 | <h5 class="right my-1"> |
331 | <b>Phone:</b> | 331 | <b>Phone:</b> |
332 | </h5> | 332 | </h5> |
333 | </v-flex> | 333 | </v-flex> |
334 | <v-flex sm6 xs8> | 334 | <v-flex sm6 xs8> |
335 | <h5 class="my-1">{{ editedItem.phone }}</h5> | 335 | <h5 class="my-1">{{ editedItem.phone }}</h5> |
336 | </v-flex> | 336 | </v-flex> |
337 | </v-layout> | 337 | </v-layout> |
338 | <v-layout> | 338 | <v-layout> |
339 | <v-flex xs4 sm6> | 339 | <v-flex xs4 sm6> |
340 | <h5 class="right my-1"> | 340 | <h5 class="right my-1"> |
341 | <b>JoiningDate:</b> | 341 | <b>JoiningDate:</b> |
342 | </h5> | 342 | </h5> |
343 | </v-flex> | 343 | </v-flex> |
344 | <v-flex sm6 xs8> | 344 | <v-flex sm6 xs8> |
345 | <h5 class="my-1">{{ dates(editedItem.joiningDate) }}</h5> | 345 | <h5 class="my-1">{{ dates(editedItem.joiningDate) }}</h5> |
346 | </v-flex> | 346 | </v-flex> |
347 | </v-layout> | 347 | </v-layout> |
348 | <v-layout> | 348 | <v-layout> |
349 | <v-flex xs4 sm6> | 349 | <v-flex xs4 sm6> |
350 | <h5 class="right my-1"> | 350 | <h5 class="right my-1"> |
351 | <label class="right hidden-sm-only hidden-xs-only"> | 351 | <label class="right hidden-sm-only hidden-xs-only"> |
352 | <b>Date of Birth:</b> | 352 | <b>Date of Birth:</b> |
353 | </label> | 353 | </label> |
354 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only"> | 354 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only"> |
355 | <b>D.O.B:</b> | 355 | <b>D.O.B:</b> |
356 | </label> | 356 | </label> |
357 | </h5> | 357 | </h5> |
358 | </v-flex> | 358 | </v-flex> |
359 | <v-flex sm6 xs8> | 359 | <v-flex sm6 xs8> |
360 | <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> | 360 | <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> |
361 | </v-flex> | 361 | </v-flex> |
362 | </v-layout> | 362 | </v-layout> |
363 | <v-layout> | 363 | <v-layout> |
364 | <v-flex xs4 sm6> | 364 | <v-flex xs4 sm6> |
365 | <h5 class="right my-1"> | 365 | <h5 class="right my-1"> |
366 | <b>Address:</b> | 366 | <b>Address:</b> |
367 | </h5> | 367 | </h5> |
368 | </v-flex> | 368 | </v-flex> |
369 | <v-flex sm6 xs8> | 369 | <v-flex sm6 xs8> |
370 | <h5 class="my-1">{{ editedItem.address }}</h5> | 370 | <h5 class="my-1">{{ editedItem.address }}</h5> |
371 | </v-flex> | 371 | </v-flex> |
372 | </v-layout> | 372 | </v-layout> |
373 | </v-flex> | 373 | </v-flex> |
374 | </v-layout> | 374 | </v-layout> |
375 | </v-container> | 375 | </v-container> |
376 | </v-card-text> | 376 | </v-card-text> |
377 | </v-card> | 377 | </v-card> |
378 | </v-dialog> | 378 | </v-dialog> |
379 | 379 | ||
380 | <!-- ****** EXISTING-USER TABLE DATA****** --> | 380 | <!-- ****** EXISTING-USER TABLE DATA****** --> |
381 | <v-toolbar color="transparent" flat> | 381 | <v-toolbar color="transparent" flat> |
382 | <v-btn | 382 | <v-btn |
383 | fab | 383 | fab |
384 | dark | 384 | dark |
385 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 385 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
386 | small | 386 | small |
387 | @click="addUserDialog = true" | 387 | @click="addUserDialog = true" |
388 | > | 388 | > |
389 | <v-icon dark>add</v-icon> | 389 | <v-icon dark>add</v-icon> |
390 | </v-btn> | 390 | </v-btn> |
391 | <v-btn | 391 | <v-btn |
392 | round | 392 | round |
393 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 393 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
394 | dark | 394 | dark |
395 | @click="addUserDialog = true" | 395 | @click="addUserDialog = true" |
396 | > | 396 | > |
397 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add User | 397 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add User |
398 | </v-btn> | 398 | </v-btn> |
399 | <v-spacer></v-spacer> | 399 | <v-spacer></v-spacer> |
400 | <v-card-title class="body-1" v-show="show"> | 400 | <v-card-title class="body-1" v-show="show"> |
401 | <v-btn icon large flat @click="displaySearch"> | 401 | <v-btn icon large flat @click="displaySearch"> |
402 | <v-avatar size="27"> | 402 | <v-avatar size="27"> |
403 | <img src="/static/icon/search.png" alt="icon" /> | 403 | <img src="/static/icon/search.png" alt="icon" /> |
404 | </v-avatar> | 404 | </v-avatar> |
405 | </v-btn> | 405 | </v-btn> |
406 | </v-card-title> | 406 | </v-card-title> |
407 | <v-flex xs8 sm8 lg2 md3 v-if="showSearch"> | 407 | <v-flex xs8 sm8 lg2 md3 v-if="showSearch"> |
408 | <v-layout> | 408 | <v-layout> |
409 | <v-text-field | 409 | <v-text-field |
410 | autofocus | 410 | autofocus |
411 | v-model="search" | 411 | v-model="search" |
412 | label="Search" | 412 | label="Search" |
413 | prepend-inner-icon="search" | 413 | prepend-inner-icon="search" |
414 | color="primary" | 414 | color="primary" |
415 | ></v-text-field> | 415 | ></v-text-field> |
416 | <v-icon @click="closeSearch" color="error">close</v-icon> | 416 | <v-icon @click="closeSearch" color="error">close</v-icon> |
417 | </v-layout> | 417 | </v-layout> |
418 | </v-flex> | 418 | </v-flex> |
419 | </v-toolbar> | 419 | </v-toolbar> |
420 | <v-data-table :headers="headers" :items="Users" :pagination.sync="pagination" :search="search"> | 420 | <v-data-table :headers="headers" :items="Users" :pagination.sync="pagination" :search="search"> |
421 | <template slot="items" slot-scope="props"> | 421 | <template slot="items" slot-scope="props"> |
422 | <td class="td td-row">{{ props.index + 1 }}</td> | 422 | <td class="td td-row">{{ props.index + 1 }}</td> |
423 | <td class="td td-row text-xs-center"> | 423 | <td class="td td-row text-xs-center"> |
424 | <v-avatar size="40"> | 424 | <v-avatar size="40"> |
425 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 425 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
426 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 426 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
427 | </v-avatar> | 427 | </v-avatar> |
428 | </td> | 428 | </td> |
429 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 429 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
430 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> | 430 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> |
431 | <td class="text-xs-center td td-row">{{ dates(props.item.dob) }}</td> | 431 | <td class="text-xs-center td td-row">{{ dates(props.item.dob) }}</td> |
432 | <td class="text-xs-center td td-row">{{ dates(props.item.joiningDate)}}</td> | 432 | <td class="text-xs-center td td-row">{{ dates(props.item.joiningDate)}}</td> |
433 | <td class="text-xs-center td td-row">{{ props.item.phone }}</td> | 433 | <td class="text-xs-center td td-row">{{ props.item.phone }}</td> |
434 | <td class="text-xs-center td td-row"> | 434 | <td class="text-xs-center td td-row"> |
435 | <v-switch | 435 | <v-switch |
436 | class="pl-3" | 436 | class="pl-3" |
437 | v-model="props.item.status" | 437 | v-model="props.item.status" |
438 | @change="suspendStatus(props.item.status,props.item._id)" | 438 | @change="suspendStatus(props.item.status,props.item._id)" |
439 | ></v-switch> | 439 | ></v-switch> |
440 | </td> | 440 | </td> |
441 | <td class="text-xs-center td td-row"> | 441 | <td class="text-xs-center td td-row"> |
442 | <span> | 442 | <span> |
443 | <v-tooltip top> | 443 | <v-tooltip top> |
444 | <img | 444 | <img |
445 | slot="activator" | 445 | slot="activator" |
446 | style="cursor:pointer; width:25px; height:25px; " | 446 | style="cursor:pointer; width:25px; height:25px; " |
447 | class="mr-3" | 447 | class="mr-3" |
448 | @click="profile(props.item)" | 448 | @click="profile(props.item)" |
449 | src="/static/icon/view.png" | 449 | src="/static/icon/view.png" |
450 | /> | 450 | /> |
451 | <span>View</span> | 451 | <span>View</span> |
452 | </v-tooltip> | 452 | </v-tooltip> |
453 | <v-tooltip top> | 453 | <v-tooltip top> |
454 | <img | 454 | <img |
455 | slot="activator" | 455 | slot="activator" |
456 | style="cursor:pointer; width:20px; height:18px; " | 456 | style="cursor:pointer; width:20px; height:18px; " |
457 | class="mr-3" | 457 | class="mr-3" |
458 | @click="editItem(props.item)" | 458 | @click="editItem(props.item)" |
459 | src="/static/icon/edit.png" | 459 | src="/static/icon/edit.png" |
460 | /> | 460 | /> |
461 | <span>Edit</span> | 461 | <span>Edit</span> |
462 | </v-tooltip> | 462 | </v-tooltip> |
463 | <v-tooltip top> | 463 | <!-- <v-tooltip top> |
464 | <img | 464 | <img |
465 | slot="activator" | 465 | slot="activator" |
466 | style="cursor:pointer; width:20px; height:20px; " | 466 | style="cursor:pointer; width:20px; height:20px; " |
467 | class="mr-3" | 467 | class="mr-3" |
468 | @click="deleteItem(props.item)" | 468 | @click="deleteItem(props.item)" |
469 | src="/static/icon/delete.png" | 469 | src="/static/icon/delete.png" |
470 | /> | 470 | /> |
471 | <span>Delete</span> | 471 | <span>Delete</span> |
472 | </v-tooltip> | 472 | </v-tooltip>--> |
473 | </span> | 473 | </span> |
474 | </td> | 474 | </td> |
475 | </template> | 475 | </template> |
476 | <v-alert | 476 | <v-alert |
477 | slot="no-results" | 477 | slot="no-results" |
478 | :value="true" | 478 | :value="true" |
479 | color="error" | 479 | color="error" |
480 | icon="warning" | 480 | icon="warning" |
481 | >Your search for "{{ search }}" found no results.</v-alert> | 481 | >Your search for "{{ search }}" found no results.</v-alert> |
482 | </v-data-table> | 482 | </v-data-table> |
483 | <!-- DIALOG BOX - Add User Data --> | 483 | <!-- DIALOG BOX - Add User Data --> |
484 | <v-dialog v-model="addUserDialog" max-width="900px" v-if="addUserDialog"> | 484 | <v-dialog v-model="addUserDialog" max-width="900px" v-if="addUserDialog"> |
485 | <v-card flat class="card-style pa-2" dark> | 485 | <v-card flat class="card-style pa-2" dark> |
486 | <v-layout> | 486 | <v-layout> |
487 | <v-flex xs12> | 487 | <v-flex xs12> |
488 | <label class="title text-xs-center">Add User</label> | 488 | <label class="title text-xs-center">Add User</label> |
489 | <v-icon size="24" class="right" @click="$refs.form.reset();addUserDialog = false">cancel</v-icon> | 489 | <v-icon size="24" class="right" @click="$refs.form.reset();addUserDialog = false">cancel</v-icon> |
490 | </v-flex> | 490 | </v-flex> |
491 | </v-layout> | 491 | </v-layout> |
492 | <v-form ref="form" v-model="valid" lazy-validation> | 492 | <v-form ref="form" v-model="valid" lazy-validation> |
493 | <v-container fluid> | 493 | <v-container fluid> |
494 | <v-layout> | 494 | <v-layout> |
495 | <v-flex | 495 | <v-flex |
496 | xs12 | 496 | xs12 |
497 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | 497 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" |
498 | > | 498 | > |
499 | <v-avatar size="80px"> | 499 | <v-avatar size="80px"> |
500 | <img src="/static/icon/user.png" v-if="!imageUrl" /> | 500 | <img src="/static/icon/user.png" v-if="!imageUrl" /> |
501 | </v-avatar> | 501 | </v-avatar> |
502 | <img | 502 | <img |
503 | :src="imageUrl" | 503 | :src="imageUrl" |
504 | height="150" | 504 | height="150" |
505 | v-if="imageUrl" | 505 | v-if="imageUrl" |
506 | style="border-radius:50%; width:150px" | 506 | style="border-radius:50%; width:150px" |
507 | /> | 507 | /> |
508 | </v-flex> | 508 | </v-flex> |
509 | </v-layout> | 509 | </v-layout> |
510 | <v-layout> | 510 | <v-layout> |
511 | <v-flex xs12 sm6> | 511 | <v-flex xs12 sm6> |
512 | <v-layout> | 512 | <v-layout> |
513 | <v-flex xs4 class="pt-4 subheading"> | 513 | <v-flex xs4 class="pt-4 subheading"> |
514 | <label class="right">Name:</label> | 514 | <label class="right">Name:</label> |
515 | </v-flex> | 515 | </v-flex> |
516 | <v-flex xs8 class="ml-3"> | 516 | <v-flex xs8 class="ml-3"> |
517 | <v-text-field | 517 | <v-text-field |
518 | v-model="addUser.name" | 518 | v-model="addUser.name" |
519 | placeholder="fill your Name" | 519 | placeholder="fill your Name" |
520 | name="name" | 520 | name="name" |
521 | type="text" | 521 | type="text" |
522 | :rules="nameRules" | 522 | :rules="nameRules" |
523 | required | 523 | required |
524 | ></v-text-field> | 524 | ></v-text-field> |
525 | </v-flex> | 525 | </v-flex> |
526 | </v-layout> | 526 | </v-layout> |
527 | </v-flex> | 527 | </v-flex> |
528 | <v-flex xs12 sm6> | 528 | <v-flex xs12 sm6> |
529 | <v-layout> | 529 | <v-layout> |
530 | <v-flex xs4 class="pt-4 subheading"> | 530 | <v-flex xs4 class="pt-4 subheading"> |
531 | <label class="right">Email ID:</label> | 531 | <label class="right">Email ID:</label> |
532 | </v-flex> | 532 | </v-flex> |
533 | <v-flex xs8 class="ml-3"> | 533 | <v-flex xs8 class="ml-3"> |
534 | <v-text-field | 534 | <v-text-field |
535 | placeholder="fill your email" | 535 | placeholder="fill your email" |
536 | :rules="emailRules" | 536 | :rules="emailRules" |
537 | v-model="addUser.email" | 537 | v-model="addUser.email" |
538 | type="text" | 538 | type="text" |
539 | name="email" | 539 | name="email" |
540 | required | 540 | required |
541 | ></v-text-field> | 541 | ></v-text-field> |
542 | </v-flex> | 542 | </v-flex> |
543 | </v-layout> | 543 | </v-layout> |
544 | </v-flex> | 544 | </v-flex> |
545 | </v-layout> | 545 | </v-layout> |
546 | <v-layout> | 546 | <v-layout> |
547 | <v-flex xs12 sm6> | 547 | <v-flex xs12 sm6> |
548 | <v-layout> | 548 | <v-layout> |
549 | <v-flex xs4 class="pt-4 subheading"> | 549 | <v-flex xs4 class="pt-4 subheading"> |
550 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> | 550 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> |
551 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> | 551 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> |
552 | </v-flex> | 552 | </v-flex> |
553 | <v-flex xs8 class="ml-3"> | 553 | <v-flex xs8 class="ml-3"> |
554 | <v-menu | 554 | <v-menu |
555 | ref="menu" | 555 | ref="menu" |
556 | :close-on-content-click="false" | 556 | :close-on-content-click="false" |
557 | v-model="menu" | 557 | v-model="menu" |
558 | :nudge-right="40" | 558 | :nudge-right="40" |
559 | lazy | 559 | lazy |
560 | transition="scale-transition" | 560 | transition="scale-transition" |
561 | offset-y | 561 | offset-y |
562 | full-width | 562 | full-width |
563 | min-width="290px" | 563 | min-width="290px" |
564 | > | 564 | > |
565 | <v-text-field | 565 | <v-text-field |
566 | slot="activator" | 566 | slot="activator" |
567 | :rules="dateRules" | 567 | :rules="dateRules" |
568 | v-model="addUser.dob" | 568 | v-model="addUser.dob" |
569 | placeholder="Select DOB" | 569 | placeholder="Select DOB" |
570 | ></v-text-field> | 570 | ></v-text-field> |
571 | <v-date-picker | 571 | <v-date-picker |
572 | ref="picker" | 572 | ref="picker" |
573 | v-model="addUser.dob" | 573 | v-model="addUser.dob" |
574 | :max="new Date().toISOString().substr(0, 10)" | 574 | :max="new Date().toISOString().substr(0, 10)" |
575 | min="1950-01-01" | 575 | min="1950-01-01" |
576 | @input="menu = false" | 576 | @input="menu = false" |
577 | ></v-date-picker> | 577 | ></v-date-picker> |
578 | </v-menu> | 578 | </v-menu> |
579 | </v-flex> | 579 | </v-flex> |
580 | </v-layout> | 580 | </v-layout> |
581 | </v-flex> | 581 | </v-flex> |
582 | <v-flex xs12 sm6> | 582 | <v-flex xs12 sm6> |
583 | <v-layout> | 583 | <v-layout> |
584 | <v-flex xs4 class="pt-4 subheading"> | 584 | <v-flex xs4 class="pt-4 subheading"> |
585 | <label class="right">Gender:</label> | 585 | <label class="right">Gender:</label> |
586 | </v-flex> | 586 | </v-flex> |
587 | <v-flex xs8 class="ml-3"> | 587 | <v-flex xs8 class="ml-3"> |
588 | <v-select | 588 | <v-select |
589 | v-model="addUser.gender" | 589 | v-model="addUser.gender" |
590 | :items="gender" | 590 | :items="gender" |
591 | label="Selct Gender " | 591 | label="Selct Gender " |
592 | :rules="genderRules" | 592 | :rules="genderRules" |
593 | required | 593 | required |
594 | ></v-select> | 594 | ></v-select> |
595 | </v-flex> | 595 | </v-flex> |
596 | </v-layout> | 596 | </v-layout> |
597 | </v-flex> | 597 | </v-flex> |
598 | </v-layout> | 598 | </v-layout> |
599 | <v-layout> | 599 | <v-layout> |
600 | <v-flex xs12 sm6> | 600 | <v-flex xs12 sm6> |
601 | <v-layout> | 601 | <v-layout> |
602 | <v-flex xs4 class="pt-4 subheading"> | 602 | <v-flex xs4 class="pt-4 subheading"> |
603 | <label class="right">Religion:</label> | 603 | <label class="right">Religion:</label> |
604 | </v-flex> | 604 | </v-flex> |
605 | <v-flex xs8 class="ml-3"> | 605 | <v-flex xs8 class="ml-3"> |
606 | <v-text-field | 606 | <v-text-field |
607 | v-model="addUser.religion" | 607 | v-model="addUser.religion" |
608 | placeholder="fill your Religion" | 608 | placeholder="fill your Religion" |
609 | name="Religion" | 609 | name="Religion" |
610 | type="text" | 610 | type="text" |
611 | :rules="religionRules" | 611 | :rules="religionRules" |
612 | required | 612 | required |
613 | ></v-text-field> | 613 | ></v-text-field> |
614 | </v-flex> | 614 | </v-flex> |
615 | </v-layout> | 615 | </v-layout> |
616 | </v-flex> | 616 | </v-flex> |
617 | <v-flex xs12 sm6> | 617 | <v-flex xs12 sm6> |
618 | <v-layout> | 618 | <v-layout> |
619 | <v-flex xs4 class="pt-4 subheading"> | 619 | <v-flex xs4 class="pt-4 subheading"> |
620 | <label class="right">JoiningDate:</label> | 620 | <label class="right">JoiningDate:</label> |
621 | </v-flex> | 621 | </v-flex> |
622 | <v-flex xs8 class="ml-3"> | 622 | <v-flex xs8 class="ml-3"> |
623 | <v-menu | 623 | <v-menu |
624 | ref="menu1" | 624 | ref="menu1" |
625 | :close-on-content-click="false" | 625 | :close-on-content-click="false" |
626 | v-model="menu1" | 626 | v-model="menu1" |
627 | :nudge-right="40" | 627 | :nudge-right="40" |
628 | lazy | 628 | lazy |
629 | transition="scale-transition" | 629 | transition="scale-transition" |
630 | offset-y | 630 | offset-y |
631 | full-width | 631 | full-width |
632 | min-width="290px" | 632 | min-width="290px" |
633 | > | 633 | > |
634 | <v-text-field | 634 | <v-text-field |
635 | slot="activator" | 635 | slot="activator" |
636 | :rules="joinDateRules" | 636 | :rules="joinDateRules" |
637 | v-model="addUser.joinDate" | 637 | v-model="addUser.joinDate" |
638 | placeholder="Select date" | 638 | placeholder="Select date" |
639 | ></v-text-field> | 639 | ></v-text-field> |
640 | <v-date-picker | 640 | <v-date-picker |
641 | ref="picker" | 641 | ref="picker" |
642 | v-model="addUser.joinDate" | 642 | v-model="addUser.joinDate" |
643 | :max="new Date().toISOString().substr(0, 10)" | 643 | :max="new Date().toISOString().substr(0, 10)" |
644 | min="1950-01-01" | 644 | min="1950-01-01" |
645 | @input="menu1 = false" | 645 | @input="menu1 = false" |
646 | ></v-date-picker> | 646 | ></v-date-picker> |
647 | </v-menu> | 647 | </v-menu> |
648 | </v-flex> | 648 | </v-flex> |
649 | </v-layout> | 649 | </v-layout> |
650 | </v-flex> | 650 | </v-flex> |
651 | </v-layout> | 651 | </v-layout> |
652 | <v-layout> | 652 | <v-layout> |
653 | <v-flex xs12 sm6> | 653 | <v-flex xs12 sm6> |
654 | <v-layout> | 654 | <v-layout> |
655 | <v-flex xs4 class="pt-4 subheading"> | 655 | <v-flex xs4 class="pt-4 subheading"> |
656 | <label class="right">Phone :</label> | 656 | <label class="right">Phone :</label> |
657 | </v-flex> | 657 | </v-flex> |
658 | <v-flex xs8 class="ml-3"> | 658 | <v-flex xs8 class="ml-3"> |
659 | <v-text-field | 659 | <v-text-field |
660 | v-model="addUser.mobileNo" | 660 | v-model="addUser.mobileNo" |
661 | placeholder="fill your Phone Number" | 661 | placeholder="fill your Phone Number" |
662 | name="mobileNo" | 662 | name="mobileNo" |
663 | type="number" | 663 | type="number" |
664 | :rules="mobileNoRules" | 664 | :rules="mobileNoRules" |
665 | required | 665 | required |
666 | ></v-text-field> | 666 | ></v-text-field> |
667 | </v-flex> | 667 | </v-flex> |
668 | </v-layout> | 668 | </v-layout> |
669 | </v-flex> | 669 | </v-flex> |
670 | <v-flex xs12 sm6> | 670 | <v-flex xs12 sm6> |
671 | <v-layout> | 671 | <v-layout> |
672 | <v-flex xs4 class="pt-4 subheading"> | 672 | <v-flex xs4 class="pt-4 subheading"> |
673 | <label class="right hidden-sm-only hidden-xs-only">Select Role:</label> | 673 | <label class="right hidden-sm-only hidden-xs-only">Select Role:</label> |
674 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Role:</label> | 674 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Role:</label> |
675 | </v-flex> | 675 | </v-flex> |
676 | <v-flex xs8 class="ml-3"> | 676 | <v-flex xs8 class="ml-3"> |
677 | <v-autocomplete | 677 | <v-autocomplete |
678 | v-model="addUser.role" | 678 | v-model="addUser.role" |
679 | :rules="role" | 679 | :rules="role" |
680 | :items="userRole" | 680 | :items="userRole" |
681 | item-text="name" | 681 | item-text="name" |
682 | item-value="name" | 682 | item-value="name" |
683 | placeholder="Select Role Name" | 683 | placeholder="Select Role Name" |
684 | required | 684 | required |
685 | ></v-autocomplete> | 685 | ></v-autocomplete> |
686 | </v-flex> | 686 | </v-flex> |
687 | </v-layout> | 687 | </v-layout> |
688 | </v-flex> | 688 | </v-flex> |
689 | </v-layout> | 689 | </v-layout> |
690 | <v-layout wrap> | 690 | <v-layout wrap> |
691 | <!-- <v-flex xs12 sm6> | 691 | <!-- <v-flex xs12 sm6> |
692 | <v-layout> | 692 | <v-layout> |
693 | <v-flex xs4 class="pt-4 subheading"> | 693 | <v-flex xs4 class="pt-4 subheading"> |
694 | <label class="right">Username:</label> | 694 | <label class="right">Username:</label> |
695 | </v-flex> | 695 | </v-flex> |
696 | <v-flex xs8 class="ml-3"> | 696 | <v-flex xs8 class="ml-3"> |
697 | <v-text-field | 697 | <v-text-field |
698 | v-model="addUser.userName" | 698 | v-model="addUser.userName" |
699 | placeholder="fill your User Name" | 699 | placeholder="fill your User Name" |
700 | type="text" | 700 | type="text" |
701 | :rules="userNameRules" | 701 | :rules="userNameRules" |
702 | required | 702 | required |
703 | ></v-text-field> | 703 | ></v-text-field> |
704 | </v-flex> | 704 | </v-flex> |
705 | </v-layout> | 705 | </v-layout> |
706 | </v-flex>--> | 706 | </v-flex>--> |
707 | <v-flex xs12 sm6> | 707 | <v-flex xs12 sm6> |
708 | <v-layout> | 708 | <v-layout> |
709 | <v-flex xs4 class="pt-4 subheading"> | 709 | <v-flex xs4 class="pt-4 subheading"> |
710 | <label class="right hidden-sm-only hidden-xs-only">Uplaod Image:</label> | 710 | <label class="right hidden-sm-only hidden-xs-only">Uplaod Image:</label> |
711 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Image:</label> | 711 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">Image:</label> |
712 | </v-flex> | 712 | </v-flex> |
713 | <v-flex xs8 class="ml-3"> | 713 | <v-flex xs8 class="ml-3"> |
714 | <v-text-field | 714 | <v-text-field |
715 | label="Select Image" | 715 | label="Select Image" |
716 | @click="pickFile" | 716 | @click="pickFile" |
717 | v-model="imageName" | 717 | v-model="imageName" |
718 | append-icon="attach_file" | 718 | append-icon="attach_file" |
719 | ></v-text-field> | 719 | ></v-text-field> |
720 | <input | 720 | <input |
721 | type="file" | 721 | type="file" |
722 | style="display:none" | 722 | style="display:none" |
723 | ref="image" | 723 | ref="image" |
724 | accept="image/*" | 724 | accept="image/*" |
725 | @change="onFilePicked" | 725 | @change="onFilePicked" |
726 | /> | 726 | /> |
727 | </v-flex> | 727 | </v-flex> |
728 | </v-layout> | 728 | </v-layout> |
729 | </v-flex> | 729 | </v-flex> |
730 | <v-flex xs12 sm6> | 730 | <v-flex xs12 sm6> |
731 | <v-layout> | 731 | <v-layout> |
732 | <v-flex xs4 class="pt-4 subheading"> | 732 | <v-flex xs4 class="pt-4 subheading"> |
733 | <label class="right">Address:</label> | 733 | <label class="right">Address:</label> |
734 | </v-flex> | 734 | </v-flex> |
735 | <v-flex xs8 class="ml-3"> | 735 | <v-flex xs8 class="ml-3"> |
736 | <v-text-field | 736 | <v-text-field |
737 | name="input-4-3" | 737 | name="input-4-3" |
738 | v-model="addUser.presentAddress" | 738 | v-model="addUser.presentAddress" |
739 | :rules="presentAddress" | 739 | :rules="presentAddress" |
740 | placeholder="fill Your present Address" | 740 | placeholder="fill Your present Address" |
741 | required | 741 | required |
742 | ></v-text-field> | 742 | ></v-text-field> |
743 | </v-flex> | 743 | </v-flex> |
744 | </v-layout> | 744 | </v-layout> |
745 | </v-flex> | 745 | </v-flex> |
746 | </v-layout> | 746 | </v-layout> |
747 | <v-layout> | 747 | <v-layout> |
748 | <v-flex xs12 sm12> | 748 | <v-flex xs12 sm12> |
749 | <v-layout class="right"> | 749 | <v-layout class="right"> |
750 | <v-btn @click="clear" round dark class="clear-button">Clear</v-btn> | 750 | <v-btn @click="clear" round dark class="clear-button">Clear</v-btn> |
751 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | 751 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> |
752 | </v-layout> | 752 | </v-layout> |
753 | </v-flex> | 753 | </v-flex> |
754 | </v-layout> | 754 | </v-layout> |
755 | </v-container> | 755 | </v-container> |
756 | </v-form> | 756 | </v-form> |
757 | </v-card> | 757 | </v-card> |
758 | </v-dialog> | 758 | </v-dialog> |
759 | <div class="loader" v-if="showLoader"> | 759 | <div class="loader" v-if="showLoader"> |
760 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 760 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
761 | </div> | 761 | </div> |
762 | <v-snackbar | 762 | <v-snackbar |
763 | :timeout="timeout" | 763 | :timeout="timeout" |
764 | :top="y === 'top'" | 764 | :top="y === 'top'" |
765 | :right="x === 'right'" | 765 | :right="x === 'right'" |
766 | :vertical="mode === 'vertical'" | 766 | :vertical="mode === 'vertical'" |
767 | v-model="snackbar" | 767 | v-model="snackbar" |
768 | :color="color" | 768 | :color="color" |
769 | >{{ text }}</v-snackbar> | 769 | >{{ text }}</v-snackbar> |
770 | </v-container> | 770 | </v-container> |
771 | </template> | 771 | </template> |
772 | 772 | ||
773 | <script> | 773 | <script> |
774 | import http from "@/Services/http.js"; | 774 | import http from "@/Services/http.js"; |
775 | import Util from "@/util"; | 775 | import Util from "@/util"; |
776 | import moment from "moment"; | 776 | import moment from "moment"; |
777 | import _ from "lodash"; | 777 | import _ from "lodash"; |
778 | 778 | ||
779 | export default { | 779 | export default { |
780 | data: () => ({ | 780 | data: () => ({ |
781 | component: "report-generate", | 781 | component: "report-generate", |
782 | snackbar: false, | 782 | snackbar: false, |
783 | y: "top", | 783 | y: "top", |
784 | x: "right", | 784 | x: "right", |
785 | mode: "", | 785 | mode: "", |
786 | timeout: 3000, | 786 | timeout: 3000, |
787 | color: "", | 787 | color: "", |
788 | text: "", | 788 | text: "", |
789 | show: true, | 789 | show: true, |
790 | showSearch: false, | 790 | showSearch: false, |
791 | showLoader: false, | 791 | showLoader: false, |
792 | loading: false, | 792 | loading: false, |
793 | addUserDialog: false, | 793 | addUserDialog: false, |
794 | date: null, | 794 | date: null, |
795 | search: "", | 795 | search: "", |
796 | menu: false, | 796 | menu: false, |
797 | menu1: false, | 797 | menu1: false, |
798 | menu2: false, | 798 | menu2: false, |
799 | menu3: false, | 799 | menu3: false, |
800 | viewUserDialog: false, | 800 | viewUserDialog: false, |
801 | editUserDialog: false, | 801 | editUserDialog: false, |
802 | valid: true, | 802 | valid: true, |
803 | isActive: true, | 803 | isActive: true, |
804 | newActive: false, | 804 | newActive: false, |
805 | pagination: { | 805 | pagination: { |
806 | rowsPerPage: 10, | 806 | rowsPerPage: 10, |
807 | }, | 807 | }, |
808 | imageData: {}, | 808 | imageData: {}, |
809 | imageName: "", | 809 | imageName: "", |
810 | imageUrl: "", | 810 | imageUrl: "", |
811 | imageFile: "", | 811 | imageFile: "", |
812 | nameRules: [(v) => !!v || "Name is required"], | 812 | nameRules: [(v) => !!v || "Name is required"], |
813 | dateRules: [(v) => !!v || " DOB is required"], | 813 | dateRules: [(v) => !!v || " DOB is required"], |
814 | genderRules: [(v) => !!v || " Gender Name is required"], | 814 | genderRules: [(v) => !!v || " Gender Name is required"], |
815 | pincode: [(v) => !!v || " Pincode is required"], | 815 | pincode: [(v) => !!v || " Pincode is required"], |
816 | role: [(v) => !!v || "Role Name is required"], | 816 | role: [(v) => !!v || "Role Name is required"], |
817 | permanentAddress: [(v) => !!v || " Permanent Address is required"], | 817 | permanentAddress: [(v) => !!v || " Permanent Address is required"], |
818 | presentAddress: [(v) => !!v || " Present Address is required"], | 818 | presentAddress: [(v) => !!v || " Present Address is required"], |
819 | mobileNoRules: [(v) => !!v || "Phone Number is required"], | 819 | mobileNoRules: [(v) => !!v || "Phone Number is required"], |
820 | religionRules: [(v) => !!v || "Religion Name is required"], | 820 | religionRules: [(v) => !!v || "Religion Name is required"], |
821 | joinDateRules: [(v) => !!v || " Join Date is required"], | 821 | joinDateRules: [(v) => !!v || " Join Date is required"], |
822 | userNameRules: [(v) => !!v || " User Name is required"], | 822 | userNameRules: [(v) => !!v || " User Name is required"], |
823 | passwordRules: [(v) => !!v || " Password is required"], | 823 | passwordRules: [(v) => !!v || " Password is required"], |
824 | errorMessages: "", | 824 | errorMessages: "", |
825 | userRole: [], | 825 | userRole: [], |
826 | emailRules: [ | 826 | emailRules: [ |
827 | (v) => !!v || "E-mail is required", | 827 | (v) => !!v || "E-mail is required", |
828 | (v) => | 828 | (v) => |
829 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | 829 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
830 | "E-mail must be valid", | 830 | "E-mail must be valid", |
831 | ], | 831 | ], |
832 | gender: ["Male", "Female"], | 832 | gender: ["Male", "Female"], |
833 | headers: [ | 833 | headers: [ |
834 | { | 834 | { |
835 | text: "No", | 835 | text: "No", |
836 | align: "", | 836 | align: "", |
837 | sortable: false, | 837 | sortable: false, |
838 | value: "No", | 838 | value: "No", |
839 | }, | 839 | }, |
840 | { | 840 | { |
841 | text: "Profile Pic", | 841 | text: "Profile Pic", |
842 | value: "profilePicUrl", | 842 | value: "profilePicUrl", |
843 | sortable: false, | 843 | sortable: false, |
844 | align: "center", | 844 | align: "center", |
845 | }, | 845 | }, |
846 | { text: "Name", value: "name", sortable: false, align: "center" }, | 846 | { text: "Name", value: "name", sortable: false, align: "center" }, |
847 | { text: "Email", value: "email", sortable: false, align: "center" }, | 847 | { text: "Email", value: "email", sortable: false, align: "center" }, |
848 | { text: "DOB", value: "dob", sortable: false, align: "center" }, | 848 | { text: "DOB", value: "dob", sortable: false, align: "center" }, |
849 | { | 849 | { |
850 | text: "Joining Date", | 850 | text: "Joining Date", |
851 | value: "joiningDate", | 851 | value: "joiningDate", |
852 | sortable: false, | 852 | sortable: false, |
853 | align: "center", | 853 | align: "center", |
854 | }, | 854 | }, |
855 | { | 855 | { |
856 | text: "Phone", | 856 | text: "Phone", |
857 | value: "phone", | 857 | value: "phone", |
858 | sortable: false, | 858 | sortable: false, |
859 | align: "center", | 859 | align: "center", |
860 | }, | 860 | }, |
861 | { | 861 | { |
862 | text: "Status", | 862 | text: "Status", |
863 | value: "status", | 863 | value: "status", |
864 | sortable: false, | 864 | sortable: false, |
865 | align: "center", | 865 | align: "center", |
866 | }, | 866 | }, |
867 | { text: "Action", value: "", sortable: false, align: "center" }, | 867 | { text: "Action", value: "", sortable: false, align: "center" }, |
868 | ], | 868 | ], |
869 | Users: [], | 869 | Users: [], |
870 | editedIndex: -1, | 870 | editedIndex: -1, |
871 | upload: "", | 871 | upload: "", |
872 | editedItem: { | 872 | editedItem: { |
873 | role: "", | 873 | role: "", |
874 | name: "", | 874 | name: "", |
875 | email: "", | 875 | email: "", |
876 | dob: null, | 876 | dob: null, |
877 | gender: "", | 877 | gender: "", |
878 | role: "", | 878 | role: "", |
879 | address: "", | 879 | address: "", |
880 | phone: "", | 880 | phone: "", |
881 | religion: "", | 881 | religion: "", |
882 | joiningDate: null, | 882 | joiningDate: null, |
883 | }, | 883 | }, |
884 | addUser: { | 884 | addUser: { |
885 | role: "", | 885 | role: "", |
886 | name: "", | 886 | name: "", |
887 | email: "", | 887 | email: "", |
888 | dob: null, | 888 | dob: null, |
889 | gender: "", | 889 | gender: "", |
890 | pincode: "", | 890 | pincode: "", |
891 | role: "", | 891 | role: "", |
892 | permanentAddress: "", | 892 | permanentAddress: "", |
893 | presentAddress: "", | 893 | presentAddress: "", |
894 | mobileNo: "", | 894 | mobileNo: "", |
895 | religion: "", | 895 | religion: "", |
896 | joiningDate: null, | 896 | joiningDate: null, |
897 | }, | 897 | }, |
898 | }), | 898 | }), |
899 | watch: { | 899 | watch: { |
900 | menu(val) { | 900 | menu(val) { |
901 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 901 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
902 | }, | 902 | }, |
903 | menu1(val) { | 903 | menu1(val) { |
904 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 904 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
905 | }, | 905 | }, |
906 | addUserDialog: function (val) { | 906 | addUserDialog: function (val) { |
907 | if (!val) { | 907 | if (!val) { |
908 | this.addUser = []; | 908 | this.addUser = []; |
909 | this.imageName = ""; | 909 | this.imageName = ""; |
910 | this.imageFile = ""; | 910 | this.imageFile = ""; |
911 | this.imageUrl = ""; | 911 | this.imageUrl = ""; |
912 | } | 912 | } |
913 | }, | 913 | }, |
914 | }, | 914 | }, |
915 | methods: { | 915 | methods: { |
916 | save(date) { | 916 | save(date) { |
917 | this.$refs.menu.save(date); | 917 | this.$refs.menu.save(date); |
918 | }, | 918 | }, |
919 | save(date) { | 919 | save(date) { |
920 | this.$refs.menu1.save(date); | 920 | this.$refs.menu1.save(date); |
921 | }, | 921 | }, |
922 | pickFile() { | 922 | pickFile() { |
923 | this.$refs.image.click(); | 923 | this.$refs.image.click(); |
924 | }, | 924 | }, |
925 | onFilePicked(e) { | 925 | onFilePicked(e) { |
926 | // console.log(e) | 926 | // console.log(e) |
927 | const files = e.target.files; | 927 | const files = e.target.files; |
928 | this.upload = e.target.files[0]; | 928 | this.upload = e.target.files[0]; |
929 | console.log("imageData-upload========>", this.upload); | 929 | console.log("imageData-upload========>", this.upload); |
930 | if (files[0] !== undefined) { | 930 | if (files[0] !== undefined) { |
931 | this.imageName = files[0].name; | 931 | this.imageName = files[0].name; |
932 | if (this.imageName.lastIndexOf(".") <= 0) { | 932 | if (this.imageName.lastIndexOf(".") <= 0) { |
933 | return; | 933 | return; |
934 | } | 934 | } |
935 | const fr = new FileReader(); | 935 | const fr = new FileReader(); |
936 | fr.readAsDataURL(files[0]); | 936 | fr.readAsDataURL(files[0]); |
937 | fr.addEventListener("load", () => { | 937 | fr.addEventListener("load", () => { |
938 | this.imageUrl = fr.result; | 938 | this.imageUrl = fr.result; |
939 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 939 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
940 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 940 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
941 | // console.log("upload=======>", this.imageData.imageUrl); | 941 | // console.log("upload=======>", this.imageData.imageUrl); |
942 | console.log("imageFile", this.imageUrl); | 942 | console.log("imageFile", this.imageUrl); |
943 | }); | 943 | }); |
944 | } else { | 944 | } else { |
945 | this.imageName = ""; | 945 | this.imageName = ""; |
946 | this.imageFile = ""; | 946 | this.imageFile = ""; |
947 | this.imageUrl = ""; | 947 | this.imageUrl = ""; |
948 | } | 948 | } |
949 | }, | 949 | }, |
950 | dates: function (date) { | 950 | dates: function (date) { |
951 | return moment(date).format("MMMM DD, YYYY"); | 951 | return moment(date).format("MMMM DD, YYYY"); |
952 | }, | 952 | }, |
953 | getUsersList() { | 953 | getUsersList() { |
954 | this.showLoader = true; | 954 | this.showLoader = true; |
955 | var token = this.$store.state.token; | 955 | var token = this.$store.state.token; |
956 | http() | 956 | http() |
957 | .get("/getUsersList", { | 957 | .get("/getUsersList", { |
958 | headers: { Authorization: "Bearer " + token }, | 958 | headers: { Authorization: "Bearer " + token }, |
959 | }) | 959 | }) |
960 | .then((response) => { | 960 | .then((response) => { |
961 | // this.snackbar = true; | ||
962 | this.color = "success"; | ||
961 | this.Users = response.data.data; | 963 | this.Users = response.data.data; |
962 | this.showLoader = false; | 964 | this.showLoader = false; |
963 | }) | 965 | }) |
964 | .catch((error) => { | 966 | .catch((error) => { |
965 | this.showLoader = false; | 967 | this.showLoader = false; |
966 | if (error.response.status === 401) { | 968 | if (error.response.status === 401) { |
967 | this.$router.replace({ path: "/" }); | 969 | this.$router.replace({ path: "/" }); |
968 | this.$store.dispatch("setToken", null); | 970 | this.$store.dispatch("setToken", null); |
969 | this.$store.dispatch("Id", null); | 971 | this.$store.dispatch("Id", null); |
970 | } | 972 | } |
971 | }); | 973 | }); |
972 | }, | 974 | }, |
973 | editItem(item) { | 975 | editItem(item) { |
974 | this.editedIndex = this.Users.indexOf(item); | 976 | this.editedIndex = this.Users.indexOf(item); |
975 | this.editedItem = Object.assign({}, item); | 977 | this.editedItem = Object.assign({}, item); |
976 | this.editedItem.dob = | 978 | this.editedItem.dob = |
977 | this.editedItem.dob != undefined | 979 | this.editedItem.dob != undefined |
978 | ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) | 980 | ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) |
979 | : (this.editedItem.dob = ""); | 981 | : (this.editedItem.dob = ""); |
980 | for (let i = 0; i < this.userRole.length; i++) { | 982 | for (let i = 0; i < this.userRole.length; i++) { |
981 | if (this.userRole[i].role === this.editedItem.role) { | 983 | if (this.userRole[i].role === this.editedItem.role) { |
982 | this.editedItem.role = this.userRole[i].name; | 984 | this.editedItem.role = this.userRole[i].name; |
983 | } | 985 | } |
984 | } | 986 | } |
985 | this.editUserDialog = true; | 987 | this.editUserDialog = true; |
986 | }, | 988 | }, |
987 | profile(item) { | 989 | profile(item) { |
988 | this.editedIndex = this.Users.indexOf(item); | 990 | this.editedIndex = this.Users.indexOf(item); |
989 | this.editedItem = Object.assign({}, item); | 991 | this.editedItem = Object.assign({}, item); |
990 | this.viewUserDialog = true; | 992 | this.viewUserDialog = true; |
991 | for (let i = 0; i < this.userRole.length; i++) { | 993 | for (let i = 0; i < this.userRole.length; i++) { |
992 | if (this.userRole[i].role === this.editedItem.role) { | 994 | if (this.userRole[i].role === this.editedItem.role) { |
993 | this.editedItem.role = this.userRole[i].name; | 995 | this.editedItem.role = this.userRole[i].name; |
994 | } | 996 | } |
995 | } | 997 | } |
996 | }, | 998 | }, |
997 | deleteItem(item) { | 999 | deleteItem(item) { |
998 | let deleteUser = { | 1000 | let deleteUser = { |
999 | userId: item._id, | 1001 | userId: item._id, |
1000 | }; | 1002 | }; |
1001 | http() | 1003 | http() |
1002 | .delete( | 1004 | .delete( |
1003 | "/deleteUser", | 1005 | "/deleteUser", |
1004 | confirm("Are you sure you want to delete this?") && { | 1006 | confirm("Are you sure you want to delete this?") && { |
1005 | params: deleteUser, | 1007 | params: deleteUser, |
1006 | } | 1008 | } |
1007 | ) | 1009 | ) |
1008 | .then((response) => { | 1010 | .then((response) => { |
1009 | this.snackbar = true; | 1011 | this.snackbar = true; |
1010 | this.text = response.data.message; | 1012 | this.text = response.data.message; |
1011 | this.color = "green"; | 1013 | this.color = "green"; |
1012 | this.getUsersList(); | 1014 | this.getUsersList(); |
1013 | }) | 1015 | }) |
1014 | .catch((error) => { | 1016 | .catch((error) => { |
1015 | this.snackbar = true; | 1017 | this.snackbar = true; |
1016 | this.color = "error"; | 1018 | this.color = "error"; |
1017 | this.text = error.response.data.message; | 1019 | this.text = error.response.data.message; |
1018 | }); | 1020 | }); |
1019 | }, | 1021 | }, |
1020 | close() { | 1022 | close() { |
1021 | this.editUserDialog = false; | 1023 | this.editUserDialog = false; |
1022 | }, | 1024 | }, |
1023 | closeProfileDialog() { | 1025 | closeProfileDialog() { |
1024 | this.viewUserDialog = false; | 1026 | this.viewUserDialog = false; |
1025 | }, | 1027 | }, |
1026 | submit() { | 1028 | submit() { |
1027 | if (this.$refs.form.validate()) { | 1029 | if (this.$refs.form.validate()) { |
1028 | let addUserData = { | 1030 | let addUserData = { |
1029 | name: this.addUser.name, | 1031 | name: this.addUser.name, |
1030 | email: this.addUser.email, | 1032 | email: this.addUser.email, |
1031 | dob: this.addUser.dob, | 1033 | dob: this.addUser.dob, |
1032 | gender: this.addUser.gender, | 1034 | gender: this.addUser.gender, |
1033 | religion: this.addUser.religion, | 1035 | religion: this.addUser.religion, |
1034 | role: this.addUser.role, | 1036 | role: this.addUser.role, |
1035 | address: this.addUser.presentAddress, | 1037 | address: this.addUser.presentAddress, |
1036 | phone: this.addUser.mobileNo, | 1038 | phone: this.addUser.mobileNo, |
1037 | religion: this.addUser.religion, | 1039 | religion: this.addUser.religion, |
1038 | joiningDate: this.addUser.joinDate, | 1040 | joiningDate: this.addUser.joinDate, |
1039 | }; | 1041 | }; |
1040 | if (this.imageUrl) { | 1042 | if (this.imageUrl) { |
1041 | var str = this.imageUrl; | 1043 | var str = this.imageUrl; |
1042 | const [baseUrl, imageUrl] = str.split(/,/); | 1044 | const [baseUrl, imageUrl] = str.split(/,/); |
1043 | addUserData.profilePicUrl = imageUrl; | 1045 | addUserData.profilePicUrl = imageUrl; |
1044 | } | 1046 | } |
1045 | this.loading = true; | 1047 | this.loading = true; |
1046 | http() | 1048 | http() |
1047 | .post("/createUser", addUserData) | 1049 | .post("/createUser", addUserData) |
1048 | .then((response) => { | 1050 | .then((response) => { |
1049 | this.imageUrl = ""; | 1051 | this.imageUrl = ""; |
1050 | this.getUsersList(); | 1052 | this.getUsersList(); |
1051 | this.snackbar = true; | 1053 | this.snackbar = true; |
1052 | this.addUserDialog = false; | 1054 | this.addUserDialog = false; |
1053 | this.text = response.data.message; | 1055 | this.text = response.data.message; |
1054 | this.color = "green"; | 1056 | this.color = "green"; |
1055 | this.clear(); | 1057 | this.clear(); |
1056 | this.loading = false; | 1058 | this.loading = false; |
1057 | }) | 1059 | }) |
1058 | .catch((error) => { | 1060 | .catch((error) => { |
1059 | this.loading = false; | 1061 | this.loading = false; |
1060 | this.snackbar = true; | 1062 | this.snackbar = true; |
1061 | this.color = "error"; | 1063 | this.color = "error"; |
1062 | this.text = error.response.data.message; | 1064 | this.text = error.response.data.message; |
1063 | }); | 1065 | }); |
1064 | } | 1066 | } |
1065 | }, | 1067 | }, |
1066 | clear() { | 1068 | clear() { |
1067 | this.$refs.form.reset(); | 1069 | this.$refs.form.reset(); |
1068 | this.imageUrl = ""; | 1070 | this.imageUrl = ""; |
1069 | }, | 1071 | }, |
1070 | save() { | 1072 | save() { |
1071 | this.loading = true; | 1073 | this.loading = true; |
1072 | for (let i = 0; i < this.userRole.length; i++) { | 1074 | for (let i = 0; i < this.userRole.length; i++) { |
1073 | if (this.userRole[i].name === this.editedItem.role) { | 1075 | if (this.userRole[i].name === this.editedItem.role) { |
1074 | this.editedItem.role = this.userRole[i].role; | 1076 | this.editedItem.role = this.userRole[i].role; |
1075 | } | 1077 | } |
1076 | } | 1078 | } |
1077 | this.editedItem.userId = this.editedItem._id; | 1079 | this.editedItem.userId = this.editedItem._id; |
1078 | if (this.imageUrl) { | 1080 | if (this.imageUrl) { |
1079 | var str = this.imageUrl; | 1081 | var str = this.imageUrl; |
1080 | const [baseUrl, imageUrl] = str.split(/,/); | 1082 | const [baseUrl, imageUrl] = str.split(/,/); |
1081 | this.editedItem.upload = imageUrl; | 1083 | this.editedItem.upload = imageUrl; |
1082 | } | 1084 | } |
1083 | http() | 1085 | http() |
1084 | .put("/updateUser", this.editedItem) | 1086 | .put("/updateUser", this.editedItem) |
1085 | .then((response) => { | 1087 | .then((response) => { |
1086 | this.snackbar = true; | 1088 | this.snackbar = true; |
1087 | this.text = response.data.message; | 1089 | this.text = response.data.message; |
1088 | this.color = "green"; | 1090 | this.color = "green"; |
1089 | this.loading = false; | 1091 | this.loading = false; |
1090 | this.getUsersList(); | 1092 | this.getUsersList(); |
1091 | this.close(); | 1093 | this.close(); |
1092 | }) | 1094 | }) |
1093 | .catch((error) => { | 1095 | .catch((error) => { |
1094 | this.loading = false; | 1096 | this.loading = false; |
1095 | this.snackbar = true; | 1097 | this.snackbar = true; |
1096 | this.text = error.response.data.message; | 1098 | this.text = error.response.data.message; |
1097 | this.color = "error"; | 1099 | this.color = "error"; |
1098 | }); | 1100 | }); |
1099 | }, | 1101 | }, |
1100 | getRole() { | 1102 | getRole() { |
1101 | this.showLoader = true; | 1103 | this.showLoader = true; |
1102 | var token = this.$store.state.token; | 1104 | var token = this.$store.state.token; |
1103 | http() | 1105 | http() |
1104 | .get("/getRolesList", { | 1106 | .get("/getRolesList", { |
1105 | headers: { Authorization: "Bearer " + token }, | 1107 | headers: { Authorization: "Bearer " + token }, |
1106 | }) | 1108 | }) |
1107 | .then((response) => { | 1109 | .then((response) => { |
1108 | this.userRole = response.data.data; | 1110 | this.userRole = response.data.data; |
1109 | this.showLoader = false; | 1111 | this.showLoader = false; |
1110 | this.userRole = response.data.data; | 1112 | this.userRole = response.data.data; |
1111 | var removedRoles = _.remove(this.userRole, function (c) { | 1113 | var removedRoles = _.remove(this.userRole, function (c) { |
1112 | //remove if color is green or yellow | 1114 | //remove if color is green or yellow |
1113 | return ( | 1115 | return ( |
1114 | c.name === "ADMIN" || | 1116 | c.name === "ADMIN" || |
1115 | c.name === "SUPERADMIN" || | 1117 | c.name === "SUPERADMIN" || |
1116 | c.name === "TEACHER" || | 1118 | c.name === "TEACHER" || |
1117 | c.name === "STUDENT" || | 1119 | c.name === "STUDENT" || |
1118 | c.name === "PARENT" | 1120 | c.name === "PARENT" |
1119 | ); | 1121 | ); |
1120 | }); | 1122 | }); |
1121 | }) | 1123 | }) |
1122 | .catch((error) => { | 1124 | .catch((error) => { |
1123 | this.showLoader = false; | 1125 | this.showLoader = false; |
1124 | }); | 1126 | }); |
1125 | }, | 1127 | }, |
1126 | suspendStatus(suspendStatus, id) { | 1128 | suspendStatus(suspendStatus, id) { |
1127 | let suspendStatusData = { | 1129 | let suspendStatusData = { |
1128 | userId: id, | 1130 | userId: id, |
1129 | status: suspendStatus, | 1131 | status: suspendStatus, |
1130 | }; | 1132 | }; |
1131 | this.showLoader = true; | 1133 | this.showLoader = true; |
1132 | http() | 1134 | http() |
1133 | .put("/suspendUserAccount", suspendStatusData) | 1135 | .put("/suspendUserAccount", suspendStatusData) |
1134 | .then((response) => { | 1136 | .then((response) => { |
1135 | this.getUsersList(); | 1137 | this.getUsersList(); |
1136 | this.text = response.data.message; | 1138 | this.text = response.data.message; |
1137 | this.snackbar = true; | 1139 | this.snackbar = true; |
1138 | this.showLoader = false; | 1140 | this.showLoader = false; |
1139 | }) | 1141 | }) |
1140 | .catch((error) => { | 1142 | .catch((error) => { |
1141 | // console.log(error.response.data.data); | 1143 | // console.log(error.response.data.data); |
1142 | this.snackbar = true; | 1144 | this.snackbar = true; |
1145 | this.color = "success"; | ||
1143 | this.text = error.response.data.message; | 1146 | this.text = error.response.data.message; |
1144 | this.showLoader = false; | 1147 | this.showLoader = false; |
1145 | }); | 1148 | }); |
1146 | }, | 1149 | }, |
1147 | displaySearch() { | 1150 | displaySearch() { |
1148 | (this.show = false), (this.showSearch = true); | 1151 | (this.show = false), (this.showSearch = true); |
1149 | }, | 1152 | }, |
1150 | closeSearch() { | 1153 | closeSearch() { |
1151 | this.showSearch = false; | 1154 | this.showSearch = false; |
1152 | this.show = true; | 1155 | this.show = true; |
1153 | this.search = ""; | 1156 | this.search = ""; |
1154 | }, | 1157 | }, |
1155 | }, | 1158 | }, |
1156 | mounted() { | 1159 | mounted() { |
1157 | this.getUsersList(); | 1160 | this.getUsersList(); |
1158 | this.getRole(); | 1161 | this.getRole(); |
1159 | }, | 1162 | }, |
1160 | }; | 1163 | }; |
1161 | </script> | 1164 | </script> |
src/router/paths.js
1 | export default [{ | 1 | export default [{ |
2 | path: '*', | 2 | path: '*', |
3 | meta: { | 3 | meta: { |
4 | public: true, | 4 | public: true, |
5 | }, | 5 | }, |
6 | redirect: { | 6 | redirect: { |
7 | path: '/404' | 7 | path: '/404' |
8 | } | 8 | } |
9 | }, | 9 | }, |
10 | { | 10 | { |
11 | path: '/404', | 11 | path: '/404', |
12 | meta: { | 12 | meta: { |
13 | public: true, | 13 | public: true, |
14 | }, | 14 | }, |
15 | name: 'NotFound', | 15 | name: 'NotFound', |
16 | component: () => | 16 | component: () => |
17 | import( | 17 | import( |
18 | /* webpackChunkName: "routes" */ | 18 | /* webpackChunkName: "routes" */ |
19 | /* webpackMode: "lazy-once" */ | 19 | /* webpackMode: "lazy-once" */ |
20 | `@/pages/NotFound/NotFound.vue` | 20 | `@/pages/NotFound/NotFound.vue` |
21 | ) | 21 | ) |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | path: '*', | 24 | path: '*', |
25 | meta: {}, | 25 | meta: {}, |
26 | name: 'dashboardAdmin', | 26 | name: 'dashboardAdmin', |
27 | props: (route) => ({ | 27 | props: (route) => ({ |
28 | type: route.query.type | 28 | type: route.query.type |
29 | }), | 29 | }), |
30 | component: () => | 30 | component: () => |
31 | import( | 31 | import( |
32 | /* webpackChunkName: "routes" */ | 32 | /* webpackChunkName: "routes" */ |
33 | /* webpackMode: "lazy-once" */ | 33 | /* webpackMode: "lazy-once" */ |
34 | `@/pages/Dashboard/dashboard.vue` | 34 | `@/pages/Dashboard/dashboard.vue` |
35 | ) | 35 | ) |
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | path: '/500', | 38 | path: '/500', |
39 | meta: { | 39 | meta: { |
40 | public: true, | 40 | public: true, |
41 | }, | 41 | }, |
42 | name: 'ServerError', | 42 | name: 'ServerError', |
43 | component: () => | 43 | component: () => |
44 | import( | 44 | import( |
45 | /* webpackChunkName: "routes" */ | 45 | /* webpackChunkName: "routes" */ |
46 | /* webpackMode: "lazy-once" */ | 46 | /* webpackMode: "lazy-once" */ |
47 | `@/pages/NotFound/Error.vue` | 47 | `@/pages/NotFound/Error.vue` |
48 | ) | 48 | ) |
49 | }, | 49 | }, |
50 | { | 50 | { |
51 | path: '/Refresh', | 51 | path: '/Refresh', |
52 | meta: { | 52 | meta: { |
53 | public: true, | 53 | public: true, |
54 | }, | 54 | }, |
55 | name: 'Refresh', | 55 | name: 'Refresh', |
56 | component: () => | 56 | component: () => |
57 | import( | 57 | import( |
58 | /* webpackChunkName: "routes" */ | 58 | /* webpackChunkName: "routes" */ |
59 | /* webpackMode: "lazy-once" */ | 59 | /* webpackMode: "lazy-once" */ |
60 | `@/pages/Common/Refresh.vue` | 60 | `@/pages/Common/Refresh.vue` |
61 | ) | 61 | ) |
62 | }, | 62 | }, |
63 | { | 63 | { |
64 | path: '/changepassword', | 64 | path: '/changepassword', |
65 | meta: {}, | 65 | meta: {}, |
66 | name: 'changepassword', | 66 | name: 'changepassword', |
67 | props: (route) => ({ | 67 | props: (route) => ({ |
68 | type: route.query.type | 68 | type: route.query.type |
69 | }), | 69 | }), |
70 | component: () => | 70 | component: () => |
71 | import( | 71 | import( |
72 | /* webpackChunkName: "routes" */ | 72 | /* webpackChunkName: "routes" */ |
73 | /* webpackMode: "lazy-once" */ | 73 | /* webpackMode: "lazy-once" */ |
74 | `@/pages/Authentication/changepassword.vue` | 74 | `@/pages/Authentication/changepassword.vue` |
75 | ) | 75 | ) |
76 | }, | 76 | }, |
77 | { | 77 | { |
78 | path: '/teachers', | 78 | path: '/teachers', |
79 | meta: { | 79 | meta: { |
80 | breadcrumb: false | 80 | breadcrumb: false |
81 | }, | 81 | }, |
82 | name: 'Teachers', | 82 | name: 'Teachers', |
83 | component: () => | 83 | component: () => |
84 | import( | 84 | import( |
85 | /* webpackChunkName: "routes" */ | 85 | /* webpackChunkName: "routes" */ |
86 | /* webpackMode: "lazy-once" */ | 86 | /* webpackMode: "lazy-once" */ |
87 | `@/pages/Teachers/teachers.vue` | 87 | `@/pages/Teachers/teachers.vue` |
88 | ) | 88 | ) |
89 | }, | 89 | }, |
90 | { | 90 | { |
91 | path: '/', | 91 | path: '/', |
92 | meta: { | 92 | meta: { |
93 | public: true, | 93 | public: true, |
94 | }, | 94 | }, |
95 | name: 'Login', | 95 | name: 'Login', |
96 | component: () => | 96 | component: () => |
97 | import( | 97 | import( |
98 | /* webpackChunkName: "routes" */ | 98 | /* webpackChunkName: "routes" */ |
99 | /* webpackMode: "lazy-once" */ | 99 | /* webpackMode: "lazy-once" */ |
100 | `@/pages/Authentication/Login.vue` | 100 | `@/pages/Authentication/Login.vue` |
101 | ) | 101 | ) |
102 | }, | 102 | }, |
103 | { | 103 | { |
104 | path: '/forgetpassword', | 104 | path: '/forgetpassword', |
105 | meta: { | 105 | meta: { |
106 | public: true, | 106 | public: true, |
107 | }, | 107 | }, |
108 | name: 'forgetpassword', | 108 | name: 'forgetpassword', |
109 | component: () => | 109 | component: () => |
110 | import( | 110 | import( |
111 | /* webpackChunkName: "routes" */ | 111 | /* webpackChunkName: "routes" */ |
112 | /* webpackMode: "lazy-once" */ | 112 | /* webpackMode: "lazy-once" */ |
113 | `@/pages/Authentication/forgetpassword.vue` | 113 | `@/pages/Authentication/forgetpassword.vue` |
114 | ) | 114 | ) |
115 | }, | 115 | }, |
116 | { | 116 | { |
117 | path: '/students', | 117 | path: '/students', |
118 | meta: {}, | 118 | meta: {}, |
119 | name: 'Students', | 119 | name: 'Students', |
120 | props: (route) => ({ | 120 | props: (route) => ({ |
121 | type: route.query.type | 121 | type: route.query.type |
122 | }), | 122 | }), |
123 | component: () => | 123 | component: () => |
124 | import( | 124 | import( |
125 | /* webpackChunkName: "routes" */ | 125 | /* webpackChunkName: "routes" */ |
126 | /* webpackMode: "lazy-once" */ | 126 | /* webpackMode: "lazy-once" */ |
127 | `@/pages/Students/students.vue` | 127 | `@/pages/Students/students.vue` |
128 | ) | 128 | ) |
129 | }, | 129 | }, |
130 | { | 130 | { |
131 | path: '/class', | 131 | path: '/class', |
132 | meta: {}, | 132 | meta: {}, |
133 | name: 'Class', | 133 | name: 'Class', |
134 | props: (route) => ({ | 134 | props: (route) => ({ |
135 | type: route.query.type | 135 | type: route.query.type |
136 | }), | 136 | }), |
137 | component: () => | 137 | component: () => |
138 | import( | 138 | import( |
139 | /* webpackChunkName: "routes" */ | 139 | /* webpackChunkName: "routes" */ |
140 | /* webpackMode: "lazy-once" */ | 140 | /* webpackMode: "lazy-once" */ |
141 | `@/pages/Class/addclass.vue` | 141 | `@/pages/Class/addclass.vue` |
142 | ) | 142 | ) |
143 | }, | 143 | }, |
144 | { | 144 | { |
145 | path: '/section', | 145 | path: '/section', |
146 | meta: {}, | 146 | meta: {}, |
147 | name: 'Section', | 147 | name: 'Section', |
148 | props: (route) => ({ | 148 | props: (route) => ({ |
149 | type: route.query.type | 149 | type: route.query.type |
150 | }), | 150 | }), |
151 | component: () => | 151 | component: () => |
152 | import( | 152 | import( |
153 | /* webpackChunkName: "routes" */ | 153 | /* webpackChunkName: "routes" */ |
154 | /* webpackMode: "lazy-once" */ | 154 | /* webpackMode: "lazy-once" */ |
155 | `@/pages/Section/section.vue` | 155 | `@/pages/Section/section.vue` |
156 | ) | 156 | ) |
157 | }, | 157 | }, |
158 | { | 158 | { |
159 | path: '/noticeBoard', | 159 | path: '/noticeBoard', |
160 | meta: {}, | 160 | meta: {}, |
161 | name: 'Notice Board', | 161 | name: 'Notice Board', |
162 | props: (route) => ({ | 162 | props: (route) => ({ |
163 | type: route.query.type | 163 | type: route.query.type |
164 | }), | 164 | }), |
165 | component: () => | 165 | component: () => |
166 | import( | 166 | import( |
167 | /* webpackChunkName: "routes" */ | 167 | /* webpackChunkName: "routes" */ |
168 | /* webpackMode: "lazy-once" */ | 168 | /* webpackMode: "lazy-once" */ |
169 | `@/pages/NoticeBoard/noticeBoard.vue` | 169 | `@/pages/NoticeBoard/noticeBoard.vue` |
170 | ) | 170 | ) |
171 | }, | 171 | }, |
172 | { | 172 | { |
173 | path: '/news', | 173 | path: '/news', |
174 | meta: {}, | 174 | meta: {}, |
175 | name: 'News', | 175 | name: 'News', |
176 | props: (route) => ({ | 176 | props: (route) => ({ |
177 | type: route.query.type | 177 | type: route.query.type |
178 | }), | 178 | }), |
179 | component: () => | 179 | component: () => |
180 | import( | 180 | import( |
181 | /* webpackChunkName: "routes" */ | 181 | /* webpackChunkName: "routes" */ |
182 | /* webpackMode: "lazy-once" */ | 182 | /* webpackMode: "lazy-once" */ |
183 | `@/pages/News/news.vue` | 183 | `@/pages/News/news.vue` |
184 | ) | 184 | ) |
185 | }, | 185 | }, |
186 | // { | 186 | // { |
187 | // path: '/reminder', | 187 | // path: '/reminder', |
188 | // meta: { }, | 188 | // meta: { }, |
189 | // name: 'reminder', | 189 | // name: 'reminder', |
190 | // props: (route) => ({ type: route.query.type }), | 190 | // props: (route) => ({ type: route.query.type }), |
191 | // component: () => import( | 191 | // component: () => import( |
192 | // /* webpackChunkName: "routes" */ | 192 | // /* webpackChunkName: "routes" */ |
193 | // /* webpackMode: "lazy-once" */ | 193 | // /* webpackMode: "lazy-once" */ |
194 | // `@/pages/Reminder/reminder.vue` | 194 | // `@/pages/Reminder/reminder.vue` |
195 | // ) | 195 | // ) |
196 | // }, | 196 | // }, |
197 | { | 197 | { |
198 | path: '/timeTable', | 198 | path: '/timeTable', |
199 | meta: {}, | 199 | meta: {}, |
200 | name: 'Time Table', | 200 | name: 'Time Table', |
201 | props: (route) => ({ | 201 | props: (route) => ({ |
202 | type: route.query.type | 202 | type: route.query.type |
203 | }), | 203 | }), |
204 | component: () => | 204 | component: () => |
205 | import( | 205 | import( |
206 | /* webpackChunkName: "routes" */ | 206 | /* webpackChunkName: "routes" */ |
207 | /* webpackMode: "lazy-once" */ | 207 | /* webpackMode: "lazy-once" */ |
208 | `@/pages/TimeTable/timeTable.vue` | 208 | `@/pages/TimeTable/timeTable.vue` |
209 | ) | 209 | ) |
210 | }, | 210 | }, |
211 | { | 211 | { |
212 | path: '/notification', | 212 | path: '/notification', |
213 | meta: {}, | 213 | meta: {}, |
214 | name: 'Notification', | 214 | name: 'Notification', |
215 | props: (route) => ({ | 215 | props: (route) => ({ |
216 | type: route.query.type | 216 | type: route.query.type |
217 | }), | 217 | }), |
218 | component: () => | 218 | component: () => |
219 | import( | 219 | import( |
220 | /* webpackChunkName: "routes" */ | 220 | /* webpackChunkName: "routes" */ |
221 | /* webpackMode: "lazy-once" */ | 221 | /* webpackMode: "lazy-once" */ |
222 | `@/pages/Notification/notification.vue` | 222 | `@/pages/Notification/notification.vue` |
223 | ) | 223 | ) |
224 | }, | 224 | }, |
225 | { | 225 | { |
226 | path: '/parents', | 226 | path: '/parents', |
227 | meta: {}, | 227 | meta: {}, |
228 | name: 'Parents', | 228 | name: 'Parents', |
229 | props: (route) => ({ | 229 | props: (route) => ({ |
230 | type: route.query.type | 230 | type: route.query.type |
231 | }), | 231 | }), |
232 | component: () => | 232 | component: () => |
233 | import( | 233 | import( |
234 | /* webpackChunkName: "routes" */ | 234 | /* webpackChunkName: "routes" */ |
235 | /* webpackMode: "lazy-once" */ | 235 | /* webpackMode: "lazy-once" */ |
236 | `@/pages/Parent/parents.vue` | 236 | `@/pages/Parent/parents.vue` |
237 | ) | 237 | ) |
238 | }, | 238 | }, |
239 | // { | 239 | // { |
240 | // path: '/subject', | 240 | // path: '/subject', |
241 | // meta: {}, | 241 | // meta: {}, |
242 | // name: 'Subject', | 242 | // name: 'Subject', |
243 | // props: (route) => ({ type: route.query.type }), | 243 | // props: (route) => ({ type: route.query.type }), |
244 | // component: () => | 244 | // component: () => |
245 | // import ( | 245 | // import ( |
246 | // /* webpackChunkName: "routes" */ | 246 | // /* webpackChunkName: "routes" */ |
247 | // /* webpackMode: "lazy-once" */ | 247 | // /* webpackMode: "lazy-once" */ |
248 | // `@/pages/Subjects/subjects.vue` | 248 | // `@/pages/Subjects/subjects.vue` |
249 | // ) | 249 | // ) |
250 | // }, | 250 | // }, |
251 | { | 251 | { |
252 | path: '/dashboard', | 252 | path: '/dashboard', |
253 | meta: {}, | 253 | meta: {}, |
254 | name: 'Dashboard', | 254 | name: 'Dashboard', |
255 | props: (route) => ({ | 255 | props: (route) => ({ |
256 | type: route.query.type | 256 | type: route.query.type |
257 | }), | 257 | }), |
258 | component: () => | 258 | component: () => |
259 | import( | 259 | import( |
260 | /* webpackChunkName: "routes" */ | 260 | /* webpackChunkName: "routes" */ |
261 | /* webpackMode: "lazy-once" */ | 261 | /* webpackMode: "lazy-once" */ |
262 | `@/pages/Dashboard/dashboard.vue` | 262 | `@/pages/Dashboard/dashboard.vue` |
263 | ) | 263 | ) |
264 | }, | 264 | }, |
265 | { | 265 | { |
266 | path: '/CourseDetails', | 266 | path: '/CourseDetails', |
267 | meta: {}, | 267 | meta: {}, |
268 | name: 'Course Details', | 268 | name: 'Course Details', |
269 | props: (route) => ({ | 269 | props: (route) => ({ |
270 | type: route.query.type | 270 | type: route.query.type |
271 | }), | 271 | }), |
272 | component: () => | 272 | component: () => |
273 | import( | 273 | import( |
274 | /* webpackChunkName: "routes" */ | 274 | /* webpackChunkName: "routes" */ |
275 | /* webpackMode: "lazy-once" */ | 275 | /* webpackMode: "lazy-once" */ |
276 | `@/pages/Dashboard/CourseDetails.vue` | 276 | `@/pages/Dashboard/CourseDetails.vue` |
277 | ) | 277 | ) |
278 | }, | 278 | }, |
279 | { | 279 | { |
280 | path: '/ChapterInfo', | 280 | path: '/ChapterInfo', |
281 | meta: {}, | 281 | meta: {}, |
282 | name: 'Chapter Info', | 282 | name: 'Chapter Info', |
283 | props: (route) => ({ | 283 | props: (route) => ({ |
284 | type: route.query.type | 284 | type: route.query.type |
285 | }), | 285 | }), |
286 | component: () => | 286 | component: () => |
287 | import( | 287 | import( |
288 | /* webpackChunkName: "routes" */ | 288 | /* webpackChunkName: "routes" */ |
289 | /* webpackMode: "lazy-once" */ | 289 | /* webpackMode: "lazy-once" */ |
290 | `@/pages/Dashboard/ChapterInfo.vue` | 290 | `@/pages/Dashboard/ChapterInfo.vue` |
291 | ) | 291 | ) |
292 | }, | 292 | }, |
293 | { | 293 | { |
294 | path: '/LiveOnlineClass', | 294 | path: '/LiveOnlineClass', |
295 | meta: {}, | 295 | meta: {}, |
296 | name: 'Live Online Class', | 296 | name: 'Live Online Class', |
297 | props: (route) => ({ | 297 | props: (route) => ({ |
298 | type: route.query.type | 298 | type: route.query.type |
299 | }), | 299 | }), |
300 | component: () => | 300 | component: () => |
301 | import( | 301 | import( |
302 | /* webpackChunkName: "routes" */ | 302 | /* webpackChunkName: "routes" */ |
303 | /* webpackMode: "lazy-once" */ | 303 | /* webpackMode: "lazy-once" */ |
304 | `@/pages/Dashboard/LiveOnlineClass.vue` | 304 | `@/pages/Dashboard/LiveOnlineClass.vue` |
305 | ) | 305 | ) |
306 | }, | 306 | }, |
307 | { | 307 | { |
308 | path: '/CourseDiscussionForum', | 308 | path: '/CourseDiscussionForum', |
309 | meta: {}, | 309 | meta: {}, |
310 | name: 'Course Discussion Forum', | 310 | name: 'Course Discussion Forum', |
311 | props: (route) => ({ | 311 | props: (route) => ({ |
312 | type: route.query.type | 312 | type: route.query.type |
313 | }), | 313 | }), |
314 | component: () => | 314 | component: () => |
315 | import( | 315 | import( |
316 | /* webpackChunkName: "routes" */ | 316 | /* webpackChunkName: "routes" */ |
317 | /* webpackMode: "lazy-once" */ | 317 | /* webpackMode: "lazy-once" */ |
318 | `@/pages/Dashboard/CourseDiscussionForum.vue` | 318 | `@/pages/Dashboard/CourseDiscussionForum.vue` |
319 | ) | 319 | ) |
320 | }, | 320 | }, |
321 | { | 321 | { |
322 | path: '/courseDiscussion', | 322 | path: '/courseDiscussion', |
323 | meta: {}, | 323 | meta: {}, |
324 | name: 'Course Discussion', | 324 | name: 'Course Discussion', |
325 | props: (route) => ({ | 325 | props: (route) => ({ |
326 | type: route.query.type | 326 | type: route.query.type |
327 | }), | 327 | }), |
328 | component: () => | 328 | component: () => |
329 | import( | 329 | import( |
330 | /* webpackChunkName: "routes" */ | 330 | /* webpackChunkName: "routes" */ |
331 | /* webpackMode: "lazy-once" */ | 331 | /* webpackMode: "lazy-once" */ |
332 | `@/pages/Course/courseDiscussion.vue` | 332 | `@/pages/Course/courseDiscussion.vue` |
333 | ) | 333 | ) |
334 | }, | 334 | }, |
335 | { | 335 | { |
336 | path: '/courseDiscussionesForm/:discussionId', | 336 | path: '/courseDiscussionesForm/:discussionId', |
337 | meta: {}, | 337 | meta: {}, |
338 | name: 'Course Discussiones Fourm', | 338 | name: 'Course Discussiones Fourm', |
339 | props: (route) => ({ | 339 | props: (route) => ({ |
340 | type: route.query.type | 340 | type: route.query.type |
341 | }), | 341 | }), |
342 | component: () => | 342 | component: () => |
343 | import( | 343 | import( |
344 | /* webpackChunkName: "routes" */ | 344 | /* webpackChunkName: "routes" */ |
345 | /* webpackMode: "lazy-once" */ | 345 | /* webpackMode: "lazy-once" */ |
346 | `@/pages/Course/discussion.vue` | 346 | `@/pages/Course/discussion.vue` |
347 | ) | 347 | ) |
348 | }, | 348 | }, |
349 | { | 349 | { |
350 | path: '/Announcement', | 350 | path: '/Announcement', |
351 | meta: {}, | 351 | meta: {}, |
352 | name: 'Announcement', | 352 | name: 'Announcement', |
353 | props: (route) => ({ | 353 | props: (route) => ({ |
354 | type: route.query.type | 354 | type: route.query.type |
355 | }), | 355 | }), |
356 | component: () => | 356 | component: () => |
357 | import( | 357 | import( |
358 | /* webpackChunkName: "routes" */ | 358 | /* webpackChunkName: "routes" */ |
359 | /* webpackMode: "lazy-once" */ | 359 | /* webpackMode: "lazy-once" */ |
360 | `@/pages/Dashboard/Announcement.vue` | 360 | `@/pages/Dashboard/Announcement.vue` |
361 | ) | 361 | ) |
362 | }, | 362 | }, |
363 | { | 363 | { |
364 | path: '/annoucementForum/:annoucementId', | 364 | path: '/annoucementForum/:annoucementId', |
365 | meta: {}, | 365 | meta: {}, |
366 | name: 'Annoucement Forum', | 366 | name: 'Annoucement Forum', |
367 | props: (route) => ({ | 367 | props: (route) => ({ |
368 | type: route.query.type | 368 | type: route.query.type |
369 | }), | 369 | }), |
370 | component: () => | 370 | component: () => |
371 | import( | 371 | import( |
372 | /* webpackChunkName: "routes" */ | 372 | /* webpackChunkName: "routes" */ |
373 | /* webpackMode: "lazy-once" */ | 373 | /* webpackMode: "lazy-once" */ |
374 | `@/pages/Annoucement/annoucementForum.vue` | 374 | `@/pages/Annoucement/annoucementForum.vue` |
375 | ) | 375 | ) |
376 | }, | 376 | }, |
377 | { | 377 | { |
378 | path: '/socialMedia', | 378 | path: '/socialMedia', |
379 | meta: {}, | 379 | meta: {}, |
380 | name: 'Social Media', | 380 | name: 'Social Media', |
381 | props: (route) => ({ | 381 | props: (route) => ({ |
382 | type: route.query.type | 382 | type: route.query.type |
383 | }), | 383 | }), |
384 | component: () => | 384 | component: () => |
385 | import( | 385 | import( |
386 | /* webpackChunkName: "routes" */ | 386 | /* webpackChunkName: "routes" */ |
387 | /* webpackMode: "lazy-once" */ | 387 | /* webpackMode: "lazy-once" */ |
388 | `@/pages/socialMedia/socialMedia.vue` | 388 | `@/pages/socialMedia/socialMedia.vue` |
389 | ) | 389 | ) |
390 | }, | 390 | }, |
391 | { | 391 | { |
392 | path: '/gallery', | 392 | path: '/gallery', |
393 | meta: {}, | 393 | meta: {}, |
394 | name: 'Gallery', | 394 | name: 'Gallery', |
395 | props: (route) => ({ | 395 | props: (route) => ({ |
396 | type: route.query.type | 396 | type: route.query.type |
397 | }), | 397 | }), |
398 | component: () => | 398 | component: () => |
399 | import( | 399 | import( |
400 | /* webpackChunkName: "routes" */ | 400 | /* webpackChunkName: "routes" */ |
401 | /* webpackMode: "lazy-once" */ | 401 | /* webpackMode: "lazy-once" */ |
402 | `@/pages/Gallery/gallery.vue` | 402 | `@/pages/Gallery/gallery.vue` |
403 | ) | 403 | ) |
404 | }, | 404 | }, |
405 | { | 405 | { |
406 | path: '/event', | 406 | path: '/event', |
407 | meta: {}, | 407 | meta: {}, |
408 | name: 'Event', | 408 | name: 'Event', |
409 | props: (route) => ({ | 409 | props: (route) => ({ |
410 | type: route.query.type | 410 | type: route.query.type |
411 | }), | 411 | }), |
412 | component: () => | 412 | component: () => |
413 | import( | 413 | import( |
414 | /* webpackChunkName: "routes" */ | 414 | /* webpackChunkName: "routes" */ |
415 | /* webpackMode: "lazy-once" */ | 415 | /* webpackMode: "lazy-once" */ |
416 | `@/pages/Event/event.vue` | 416 | `@/pages/Event/event.vue` |
417 | ) | 417 | ) |
418 | }, | 418 | }, |
419 | { | 419 | { |
420 | path: '/holiday', | 420 | path: '/holiday', |
421 | meta: {}, | 421 | meta: {}, |
422 | name: 'Holiday', | 422 | name: 'Holiday', |
423 | props: (route) => ({ | 423 | props: (route) => ({ |
424 | type: route.query.type | 424 | type: route.query.type |
425 | }), | 425 | }), |
426 | component: () => | 426 | component: () => |
427 | import( | 427 | import( |
428 | /* webpackChunkName: "routes" */ | 428 | /* webpackChunkName: "routes" */ |
429 | /* webpackMode: "lazy-once" */ | 429 | /* webpackMode: "lazy-once" */ |
430 | `@/pages/Holiday/holiday.vue` | 430 | `@/pages/Holiday/holiday.vue` |
431 | ) | 431 | ) |
432 | }, | 432 | }, |
433 | { | 433 | { |
434 | path: '/user', | 434 | path: '/user', |
435 | meta: {}, | 435 | meta: {}, |
436 | name: 'User', | 436 | name: 'User', |
437 | props: (route) => ({ | 437 | props: (route) => ({ |
438 | type: route.query.type | 438 | type: route.query.type |
439 | }), | 439 | }), |
440 | component: () => | 440 | component: () => |
441 | import( | 441 | import( |
442 | /* webpackChunkName: "routes" */ | 442 | /* webpackChunkName: "routes" */ |
443 | /* webpackMode: "lazy-once" */ | 443 | /* webpackMode: "lazy-once" */ |
444 | `@/pages/User/user.vue` | 444 | `@/pages/User/user.vue` |
445 | ) | 445 | ) |
446 | }, | 446 | }, |
447 | { | 447 | { |
448 | path: '/AttendenceStudent', | 448 | path: '/AttendenceStudent', |
449 | meta: {}, | 449 | meta: {}, |
450 | name: 'Student Attendence', | 450 | name: 'Student Attendence', |
451 | props: (route) => ({ | 451 | props: (route) => ({ |
452 | type: route.query.type | 452 | type: route.query.type |
453 | }), | 453 | }), |
454 | component: () => | 454 | component: () => |
455 | import( | 455 | import( |
456 | /* webpackChunkName: "routes" */ | 456 | /* webpackChunkName: "routes" */ |
457 | /* webpackMode: "lazy-once" */ | 457 | /* webpackMode: "lazy-once" */ |
458 | `@/pages/Attendence/studentAttendence.vue` | 458 | `@/pages/Attendence/studentAttendence.vue` |
459 | ) | 459 | ) |
460 | }, | 460 | }, |
461 | { | 461 | { |
462 | path: '/AttendenceTeacher', | 462 | path: '/AttendenceTeacher', |
463 | meta: {}, | 463 | meta: {}, |
464 | name: 'Teacher Attendence', | 464 | name: 'Teacher Attendence', |
465 | props: (route) => ({ | 465 | props: (route) => ({ |
466 | type: route.query.type | 466 | type: route.query.type |
467 | }), | 467 | }), |
468 | component: () => | 468 | component: () => |
469 | import( | 469 | import( |
470 | /* webpackChunkName: "routes" */ | 470 | /* webpackChunkName: "routes" */ |
471 | /* webpackMode: "lazy-once" */ | 471 | /* webpackMode: "lazy-once" */ |
472 | `@/pages/Attendence/teacherAttendence.vue` | 472 | `@/pages/Attendence/teacherAttendence.vue` |
473 | ) | 473 | ) |
474 | }, | 474 | }, |
475 | { | 475 | { |
476 | path: '/salaryTemplate', | 476 | path: '/salaryTemplate', |
477 | meta: {}, | 477 | meta: {}, |
478 | name: 'Salary Template', | 478 | name: 'Salary Template', |
479 | props: (route) => ({ | 479 | props: (route) => ({ |
480 | type: route.query.type | 480 | type: route.query.type |
481 | }), | 481 | }), |
482 | component: () => | 482 | component: () => |
483 | import( | 483 | import( |
484 | `@/pages/Payroll/salaryTemplate.vue` | 484 | `@/pages/Payroll/salaryTemplate.vue` |
485 | ) | 485 | ) |
486 | }, | 486 | }, |
487 | { | 487 | { |
488 | path: '/hourlyTemplate', | 488 | path: '/hourlyTemplate', |
489 | meta: {}, | 489 | meta: {}, |
490 | name: 'Hourly Template', | 490 | name: 'Hourly Template', |
491 | props: (route) => ({ | 491 | props: (route) => ({ |
492 | type: route.query.type | 492 | type: route.query.type |
493 | }), | 493 | }), |
494 | component: () => | 494 | component: () => |
495 | import( | 495 | import( |
496 | `@/pages/Payroll/hourlyTemplate.vue` | 496 | `@/pages/Payroll/hourlyTemplate.vue` |
497 | ) | 497 | ) |
498 | }, | 498 | }, |
499 | { | 499 | { |
500 | path: '/manageSalary', | 500 | path: '/manageSalary', |
501 | meta: {}, | 501 | meta: {}, |
502 | name: 'Manage Salary', | 502 | name: 'Manage Salary', |
503 | props: (route) => ({ | 503 | props: (route) => ({ |
504 | type: route.query.type | 504 | type: route.query.type |
505 | }), | 505 | }), |
506 | component: () => | 506 | component: () => |
507 | import( | 507 | import( |
508 | `@/pages/Payroll/manageSalary.vue` | 508 | `@/pages/Payroll/manageSalary.vue` |
509 | ) | 509 | ) |
510 | }, | 510 | }, |
511 | // { | 511 | // { |
512 | // path: '/makePayment', | 512 | // path: '/makePayment', |
513 | // meta: {}, | 513 | // meta: {}, |
514 | // name: 'Make Payment', | 514 | // name: 'Make Payment', |
515 | // props: (route) => ({ type: route.query.type }), | 515 | // props: (route) => ({ type: route.query.type }), |
516 | // component: () => | 516 | // component: () => |
517 | // import ( | 517 | // import ( |
518 | // `@/pages/Payroll/makePayment.vue` | 518 | // `@/pages/Payroll/makePayment.vue` |
519 | // ) | 519 | // ) |
520 | // }, | 520 | // }, |
521 | { | 521 | { |
522 | path: '/AttendenceUser', | 522 | path: '/AttendenceUser', |
523 | meta: {}, | 523 | meta: {}, |
524 | name: 'User Attendence', | 524 | name: 'User Attendence', |
525 | props: (route) => ({ | 525 | props: (route) => ({ |
526 | type: route.query.type | 526 | type: route.query.type |
527 | }), | 527 | }), |
528 | component: () => | 528 | component: () => |
529 | import( | 529 | import( |
530 | /* webpackChunkName: "routes" */ | 530 | /* webpackChunkName: "routes" */ |
531 | /* webpackMode: "lazy-once" */ | 531 | /* webpackMode: "lazy-once" */ |
532 | `@/pages/Attendence/userAttendence.vue` | 532 | `@/pages/Attendence/userAttendence.vue` |
533 | ) | 533 | ) |
534 | }, | 534 | }, |
535 | { | 535 | { |
536 | path: '/feeTypes', | 536 | path: '/feeTypes', |
537 | meta: {}, | 537 | meta: {}, |
538 | name: 'Fee Types', | 538 | name: 'Fee Types', |
539 | props: (route) => ({ | 539 | props: (route) => ({ |
540 | type: route.query.type | 540 | type: route.query.type |
541 | }), | 541 | }), |
542 | component: () => | 542 | component: () => |
543 | import( | 543 | import( |
544 | /* webpackChunkName: "routes" */ | 544 | /* webpackChunkName: "routes" */ |
545 | /* webpackMode: "lazy-once" */ | 545 | /* webpackMode: "lazy-once" */ |
546 | `@/pages/Account/feeTypes.vue` | 546 | `@/pages/Account/feeTypes.vue` |
547 | ) | 547 | ) |
548 | }, | 548 | }, |
549 | { | 549 | { |
550 | path: '/invoice', | 550 | path: '/invoice', |
551 | meta: {}, | 551 | meta: {}, |
552 | name: 'Invoice', | 552 | name: 'Invoice', |
553 | props: (route) => ({ | 553 | props: (route) => ({ |
554 | type: route.query.type | 554 | type: route.query.type |
555 | }), | 555 | }), |
556 | component: () => | 556 | component: () => |
557 | import( | 557 | import( |
558 | /* webpackChunkName: "routes" */ | 558 | /* webpackChunkName: "routes" */ |
559 | /* webpackMode: "lazy-once" */ | 559 | /* webpackMode: "lazy-once" */ |
560 | `@/pages/Account/invoice.vue` | 560 | `@/pages/Account/invoice.vue` |
561 | ) | 561 | ) |
562 | }, | 562 | }, |
563 | { | 563 | { |
564 | path: '/paymentHistory', | 564 | path: '/paymentHistory', |
565 | meta: {}, | 565 | meta: {}, |
566 | name: 'Payment History', | 566 | name: 'Payment History', |
567 | props: (route) => ({ | 567 | props: (route) => ({ |
568 | type: route.query.type | 568 | type: route.query.type |
569 | }), | 569 | }), |
570 | component: () => | 570 | component: () => |
571 | import( | 571 | import( |
572 | /* webpackChunkName: "routes" */ | 572 | /* webpackChunkName: "routes" */ |
573 | /* webpackMode: "lazy-once" */ | 573 | /* webpackMode: "lazy-once" */ |
574 | `@/pages/Account/paymentHistory.vue` | 574 | `@/pages/Account/paymentHistory.vue` |
575 | ) | 575 | ) |
576 | }, | 576 | }, |
577 | { | 577 | { |
578 | path: '/expense', | 578 | path: '/expense', |
579 | meta: {}, | 579 | meta: {}, |
580 | name: 'Expense', | 580 | name: 'Expense', |
581 | props: (route) => ({ | 581 | props: (route) => ({ |
582 | type: route.query.type | 582 | type: route.query.type |
583 | }), | 583 | }), |
584 | component: () => | 584 | component: () => |
585 | import( | 585 | import( |
586 | /* webpackChunkName: "routes" */ | 586 | /* webpackChunkName: "routes" */ |
587 | /* webpackMode: "lazy-once" */ | 587 | /* webpackMode: "lazy-once" */ |
588 | `@/pages/Account/expense.vue` | 588 | `@/pages/Account/expense.vue` |
589 | ) | 589 | ) |
590 | }, | 590 | }, |
591 | { | 591 | { |
592 | path: '/income', | 592 | path: '/income', |
593 | meta: {}, | 593 | meta: {}, |
594 | name: 'Income', | 594 | name: 'Income', |
595 | props: (route) => ({ | 595 | props: (route) => ({ |
596 | type: route.query.type | 596 | type: route.query.type |
597 | }), | 597 | }), |
598 | component: () => | 598 | component: () => |
599 | import( | 599 | import( |
600 | /* webpackChunkName: "routes" */ | 600 | /* webpackChunkName: "routes" */ |
601 | /* webpackMode: "lazy-once" */ | 601 | /* webpackMode: "lazy-once" */ |
602 | `@/pages/Account/income.vue` | 602 | `@/pages/Account/income.vue` |
603 | ) | 603 | ) |
604 | }, | 604 | }, |
605 | { | 605 | { |
606 | path: '/libraryMember', | 606 | path: '/libraryMember', |
607 | meta: {}, | 607 | meta: {}, |
608 | name: 'Library Member', | 608 | name: 'Library Member', |
609 | props: (route) => ({ | 609 | props: (route) => ({ |
610 | type: route.query.type | 610 | type: route.query.type |
611 | }), | 611 | }), |
612 | component: () => | 612 | component: () => |
613 | import( | 613 | import( |
614 | /* webpackChunkName: "routes" */ | 614 | /* webpackChunkName: "routes" */ |
615 | /* webpackMode: "lazy-once" */ | 615 | /* webpackMode: "lazy-once" */ |
616 | `@/pages/Library/member.vue` | 616 | `@/pages/Library/member.vue` |
617 | ) | 617 | ) |
618 | }, | 618 | }, |
619 | { | 619 | { |
620 | path: '/books', | 620 | path: '/books', |
621 | meta: {}, | 621 | meta: {}, |
622 | name: 'Books', | 622 | name: 'Books', |
623 | props: (route) => ({ | 623 | props: (route) => ({ |
624 | type: route.query.type | 624 | type: route.query.type |
625 | }), | 625 | }), |
626 | component: () => | 626 | component: () => |
627 | import( | 627 | import( |
628 | /* webpackChunkName: "routes" */ | 628 | /* webpackChunkName: "routes" */ |
629 | /* webpackMode: "lazy-once" */ | 629 | /* webpackMode: "lazy-once" */ |
630 | `@/pages/Library/books.vue` | 630 | `@/pages/Library/books.vue` |
631 | ) | 631 | ) |
632 | }, | 632 | }, |
633 | { | 633 | { |
634 | path: '/issue', | 634 | path: '/issue', |
635 | meta: {}, | 635 | meta: {}, |
636 | name: 'Issue', | 636 | name: 'Issue', |
637 | props: (route) => ({ | 637 | props: (route) => ({ |
638 | type: route.query.type | 638 | type: route.query.type |
639 | }), | 639 | }), |
640 | component: () => | 640 | component: () => |
641 | import( | 641 | import( |
642 | /* webpackChunkName: "routes" */ | 642 | /* webpackChunkName: "routes" */ |
643 | /* webpackMode: "lazy-once" */ | 643 | /* webpackMode: "lazy-once" */ |
644 | `@/pages/Library/issue.vue` | 644 | `@/pages/Library/issue.vue` |
645 | ) | 645 | ) |
646 | }, | 646 | }, |
647 | { | 647 | { |
648 | path: '/e-books', | 648 | path: '/e-books', |
649 | meta: {}, | 649 | meta: {}, |
650 | name: 'E-Books', | 650 | name: 'E-Books', |
651 | props: (route) => ({ | 651 | props: (route) => ({ |
652 | type: route.query.type | 652 | type: route.query.type |
653 | }), | 653 | }), |
654 | component: () => | 654 | component: () => |
655 | import( | 655 | import( |
656 | /* webpackChunkName: "routes" */ | 656 | /* webpackChunkName: "routes" */ |
657 | /* webpackMode: "lazy-once" */ | 657 | /* webpackMode: "lazy-once" */ |
658 | `@/pages/Library/eBook.vue` | 658 | `@/pages/Library/eBook.vue` |
659 | ) | 659 | ) |
660 | }, | 660 | }, |
661 | { | 661 | { |
662 | path: '/editInvoice/:invoiceid', | 662 | path: '/editInvoice/:invoiceid', |
663 | meta: {}, | 663 | meta: {}, |
664 | name: 'Edit Invoice', | 664 | name: 'Edit Invoice', |
665 | // props: (route) => ({ type: route.query.type }), | 665 | // props: (route) => ({ type: route.query.type }), |
666 | component: () => | 666 | component: () => |
667 | import( | 667 | import( |
668 | /* webpackChunkName: "routes" */ | 668 | /* webpackChunkName: "routes" */ |
669 | /* webpackMode: "lazy-once" */ | 669 | /* webpackMode: "lazy-once" */ |
670 | `@/pages/Account/editInvoice.vue` | 670 | `@/pages/Account/editInvoice.vue` |
671 | ) | 671 | ) |
672 | }, | 672 | }, |
673 | { | 673 | { |
674 | path: '/StudentsAttendence/:id', | 674 | path: '/StudentsAttendence/:id', |
675 | meta: {}, | 675 | meta: {}, |
676 | name: 'View Students Attendence', | 676 | name: 'View Students Attendence', |
677 | props: (route) => ({ | 677 | props: (route) => ({ |
678 | type: route.query.type | 678 | type: route.query.type |
679 | }), | 679 | }), |
680 | component: () => | 680 | component: () => |
681 | import( | 681 | import( |
682 | /* webpackChunkName: "routes" */ | 682 | /* webpackChunkName: "routes" */ |
683 | /* webpackMode: "lazy-once" */ | 683 | /* webpackMode: "lazy-once" */ |
684 | `@/pages/Attendence/viewStudentsAttendence.vue` | 684 | `@/pages/Attendence/viewStudentsAttendence.vue` |
685 | ) | 685 | ) |
686 | }, | 686 | }, |
687 | { | 687 | { |
688 | path: '/TeacherAttendence/:teacherId', | 688 | path: '/TeacherAttendence/:teacherId', |
689 | meta: {}, | 689 | meta: {}, |
690 | name: 'View Teacher Attendence', | 690 | name: 'View Teacher Attendence', |
691 | props: (route) => ({ | 691 | props: (route) => ({ |
692 | type: route.query.type | 692 | type: route.query.type |
693 | }), | 693 | }), |
694 | component: () => | 694 | component: () => |
695 | import( | 695 | import( |
696 | /* webpackChunkName: "routes" */ | 696 | /* webpackChunkName: "routes" */ |
697 | /* webpackMode: "lazy-once" */ | 697 | /* webpackMode: "lazy-once" */ |
698 | `@/pages/Attendence/viewTeacherAttendence.vue` | 698 | `@/pages/Attendence/viewTeacherAttendence.vue` |
699 | ) | 699 | ) |
700 | }, | 700 | }, |
701 | { | 701 | { |
702 | path: '/viewInvoice/:viewInvoiceId', | 702 | path: '/viewInvoice/:viewInvoiceId', |
703 | meta: {}, | 703 | meta: {}, |
704 | name: 'View Invoice', | 704 | name: 'View Invoice', |
705 | props: (route) => ({ | 705 | props: (route) => ({ |
706 | type: route.query.type | 706 | type: route.query.type |
707 | }), | 707 | }), |
708 | component: () => | 708 | component: () => |
709 | import( | 709 | import( |
710 | /* webpackChunkName: "routes" */ | 710 | /* webpackChunkName: "routes" */ |
711 | /* webpackMode: "lazy-once" */ | 711 | /* webpackMode: "lazy-once" */ |
712 | `@/pages/Account/viewInvoice.vue` | 712 | `@/pages/Account/viewInvoice.vue` |
713 | ) | 713 | ) |
714 | }, | 714 | }, |
715 | { | 715 | { |
716 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', | 716 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', |
717 | meta: {}, | 717 | meta: {}, |
718 | name: 'View Payment Invoice', | 718 | name: 'View Payment Invoice', |
719 | props: (route) => ({ | 719 | props: (route) => ({ |
720 | type: route.query.type | 720 | type: route.query.type |
721 | }), | 721 | }), |
722 | component: () => | 722 | component: () => |
723 | import( | 723 | import( |
724 | /* webpackChunkName: "routes" */ | 724 | /* webpackChunkName: "routes" */ |
725 | /* webpackMode: "lazy-once" */ | 725 | /* webpackMode: "lazy-once" */ |
726 | `@/pages/Account/viewPaymentInvoice.vue` | 726 | `@/pages/Account/viewPaymentInvoice.vue` |
727 | ) | 727 | ) |
728 | }, | 728 | }, |
729 | { | 729 | { |
730 | path: '/globalPayment', | 730 | path: '/globalPayment', |
731 | meta: {}, | 731 | meta: {}, |
732 | name: 'Global Payment', | 732 | name: 'Global Payment', |
733 | props: (route) => ({ | 733 | props: (route) => ({ |
734 | type: route.query.type | 734 | type: route.query.type |
735 | }), | 735 | }), |
736 | component: () => | 736 | component: () => |
737 | import( | 737 | import( |
738 | /* webpackChunkName: "routes" */ | 738 | /* webpackChunkName: "routes" */ |
739 | /* webpackMode: "lazy-once" */ | 739 | /* webpackMode: "lazy-once" */ |
740 | `@/pages/Account/globalPayment.vue` | 740 | `@/pages/Account/globalPayment.vue` |
741 | ) | 741 | ) |
742 | }, | 742 | }, |
743 | { | 743 | { |
744 | path: '/exam', | 744 | path: '/exam', |
745 | meta: {}, | 745 | meta: {}, |
746 | name: 'Exam', | 746 | name: 'Exam', |
747 | props: (route) => ({ | 747 | props: (route) => ({ |
748 | type: route.query.type | 748 | type: route.query.type |
749 | }), | 749 | }), |
750 | component: () => | 750 | component: () => |
751 | import( | 751 | import( |
752 | /* webpackChunkName: "routes" */ | 752 | /* webpackChunkName: "routes" */ |
753 | /* webpackMode: "lazy-once" */ | 753 | /* webpackMode: "lazy-once" */ |
754 | `@/pages/Exam/exam.vue` | 754 | `@/pages/Exam/exam.vue` |
755 | ) | 755 | ) |
756 | }, | 756 | }, |
757 | { | 757 | { |
758 | path: '/grade', | 758 | path: '/grade', |
759 | meta: {}, | 759 | meta: {}, |
760 | name: 'Grade', | 760 | name: 'Grade', |
761 | props: (route) => ({ | 761 | props: (route) => ({ |
762 | type: route.query.type | 762 | type: route.query.type |
763 | }), | 763 | }), |
764 | component: () => | 764 | component: () => |
765 | import( | 765 | import( |
766 | /* webpackChunkName: "routes" */ | 766 | /* webpackChunkName: "routes" */ |
767 | /* webpackMode: "lazy-once" */ | 767 | /* webpackMode: "lazy-once" */ |
768 | `@/pages/Exam/grade.vue` | 768 | `@/pages/Exam/grade.vue` |
769 | ) | 769 | ) |
770 | }, | 770 | }, |
771 | { | 771 | { |
772 | path: '/examSchedule', | 772 | path: '/examSchedule', |
773 | meta: {}, | 773 | meta: {}, |
774 | name: 'Exam Schedule', | 774 | name: 'Exam Schedule', |
775 | props: (route) => ({ | 775 | props: (route) => ({ |
776 | type: route.query.type | 776 | type: route.query.type |
777 | }), | 777 | }), |
778 | component: () => | 778 | component: () => |
779 | import( | 779 | import( |
780 | /* webpackChunkName: "routes" */ | 780 | /* webpackChunkName: "routes" */ |
781 | /* webpackMode: "lazy-once" */ | 781 | /* webpackMode: "lazy-once" */ |
782 | `@/pages/Exam/examSchedule.vue` | 782 | `@/pages/Exam/examSchedule.vue` |
783 | ) | 783 | ) |
784 | }, | 784 | }, |
785 | { | 785 | { |
786 | path: '/examAttendence', | 786 | path: '/examAttendence', |
787 | meta: {}, | 787 | meta: {}, |
788 | name: 'Exam Attendence', | 788 | name: 'Exam Attendence', |
789 | props: (route) => ({ | 789 | props: (route) => ({ |
790 | type: route.query.type | 790 | type: route.query.type |
791 | }), | 791 | }), |
792 | component: () => | 792 | component: () => |
793 | import( | 793 | import( |
794 | /* webpackChunkName: "routes" */ | 794 | /* webpackChunkName: "routes" */ |
795 | /* webpackMode: "lazy-once" */ | 795 | /* webpackMode: "lazy-once" */ |
796 | `@/pages/Exam/examAttendence.vue` | 796 | `@/pages/Exam/examAttendence.vue` |
797 | ) | 797 | ) |
798 | }, | 798 | }, |
799 | { | 799 | { |
800 | path: '/mark', | 800 | path: '/mark', |
801 | meta: {}, | 801 | meta: {}, |
802 | name: 'Mark', | 802 | name: 'Mark', |
803 | props: (route) => ({ | 803 | props: (route) => ({ |
804 | type: route.query.type | 804 | type: route.query.type |
805 | }), | 805 | }), |
806 | component: () => | 806 | component: () => |
807 | import( | 807 | import( |
808 | /* webpackChunkName: "routes" */ | 808 | /* webpackChunkName: "routes" */ |
809 | /* webpackMode: "lazy-once" */ | 809 | /* webpackMode: "lazy-once" */ |
810 | `@/pages/Mark/mark.vue` | 810 | `@/pages/Mark/mark.vue` |
811 | ) | 811 | ) |
812 | }, | 812 | }, |
813 | { | 813 | { |
814 | path: '/viewMark/:markId', | 814 | path: '/viewMark/:markId', |
815 | meta: {}, | 815 | meta: {}, |
816 | name: 'view Mark', | 816 | name: 'view Mark', |
817 | props: (route) => ({ | 817 | props: (route) => ({ |
818 | type: route.query.type | 818 | type: route.query.type |
819 | }), | 819 | }), |
820 | component: () => | 820 | component: () => |
821 | import( | 821 | import( |
822 | /* webpackChunkName: "routes" */ | 822 | /* webpackChunkName: "routes" */ |
823 | /* webpackMode: "lazy-once" */ | 823 | /* webpackMode: "lazy-once" */ |
824 | `@/pages/Mark/viewMark.vue` | 824 | `@/pages/Mark/viewMark.vue` |
825 | ) | 825 | ) |
826 | }, | 826 | }, |
827 | { | 827 | { |
828 | path: '/markDistribution', | 828 | path: '/markDistribution', |
829 | meta: {}, | 829 | meta: {}, |
830 | name: 'Mark Distribution', | 830 | name: 'Mark Distribution', |
831 | props: (route) => ({ | 831 | props: (route) => ({ |
832 | type: route.query.type | 832 | type: route.query.type |
833 | }), | 833 | }), |
834 | component: () => | 834 | component: () => |
835 | import( | 835 | import( |
836 | /* webpackChunkName: "routes" */ | 836 | /* webpackChunkName: "routes" */ |
837 | /* webpackMode: "lazy-once" */ | 837 | /* webpackMode: "lazy-once" */ |
838 | `@/pages/Mark/markDistribution.vue` | 838 | `@/pages/Mark/markDistribution.vue` |
839 | ) | 839 | ) |
840 | }, | 840 | }, |
841 | { | 841 | { |
842 | path: '/meet', | 842 | path: '/meet', |
843 | meta: {}, | 843 | meta: {}, |
844 | name: 'Meet', | 844 | name: 'Meet', |
845 | props: (route) => ({ | 845 | props: (route) => ({ |
846 | type: route.query.type | 846 | type: route.query.type |
847 | }), | 847 | }), |
848 | component: () => | 848 | component: () => |
849 | import( | 849 | import( |
850 | /* webpackChunkName: "routes" */ | 850 | /* webpackChunkName: "routes" */ |
851 | /* webpackMode: "lazy-once" */ | 851 | /* webpackMode: "lazy-once" */ |
852 | `@/pages/Meet/meet.vue` | 852 | `@/pages/Meet/meet.vue` |
853 | ) | 853 | ) |
854 | }, | 854 | }, |
855 | { | 855 | { |
856 | path: '/academicYear', | 856 | path: '/academicYear', |
857 | meta: {}, | 857 | meta: {}, |
858 | name: 'Academic Year', | 858 | name: 'Academic Year', |
859 | props: (route) => ({ | 859 | props: (route) => ({ |
860 | type: route.query.type | 860 | type: route.query.type |
861 | }), | 861 | }), |
862 | component: () => | 862 | component: () => |
863 | import( | 863 | import( |
864 | /* webpackChunkName: "routes" */ | 864 | /* webpackChunkName: "routes" */ |
865 | /* webpackMode: "lazy-once" */ | 865 | /* webpackMode: "lazy-once" */ |
866 | `@/pages/Administrator/academicYear.vue` | 866 | `@/pages/Administrator/academicYear.vue` |
867 | ) | 867 | ) |
868 | }, | 868 | }, |
869 | { | 869 | { |
870 | path: '/systemAdmin', | 870 | path: '/systemAdmin', |
871 | meta: {}, | 871 | meta: {}, |
872 | name: 'System Admin', | 872 | name: 'System Admin', |
873 | props: (route) => ({ | 873 | props: (route) => ({ |
874 | type: route.query.type | 874 | type: route.query.type |
875 | }), | 875 | }), |
876 | component: () => | 876 | component: () => |
877 | import( | 877 | import( |
878 | /* webpackChunkName: "routes" */ | 878 | /* webpackChunkName: "routes" */ |
879 | /* webpackMode: "lazy-once" */ | 879 | /* webpackMode: "lazy-once" */ |
880 | `@/pages/Administrator/systemAdmin.vue` | 880 | `@/pages/Administrator/systemAdmin.vue` |
881 | ) | 881 | ) |
882 | }, | 882 | }, |
883 | { | 883 | { |
884 | path: '/resetPassword', | 884 | path: '/resetPassword', |
885 | meta: {}, | 885 | meta: {}, |
886 | name: 'Change Password', | 886 | name: 'Change Password', |
887 | props: (route) => ({ | 887 | props: (route) => ({ |
888 | type: route.query.type | 888 | type: route.query.type |
889 | }), | 889 | }), |
890 | component: () => | 890 | component: () => |
891 | import( | 891 | import( |
892 | /* webpackChunkName: "routes" */ | 892 | /* webpackChunkName: "routes" */ |
893 | /* webpackMode: "lazy-once" */ | 893 | /* webpackMode: "lazy-once" */ |
894 | `@/pages/Administrator/resetPassword.vue` | 894 | `@/pages/Administrator/resetPassword.vue` |
895 | ) | 895 | ) |
896 | }, | 896 | }, |
897 | { | 897 | { |
898 | path: '/role', | 898 | path: '/role', |
899 | meta: {}, | 899 | meta: {}, |
900 | name: 'Role', | 900 | name: 'Role', |
901 | props: (route) => ({ | 901 | props: (route) => ({ |
902 | type: route.query.type | 902 | type: route.query.type |
903 | }), | 903 | }), |
904 | component: () => | 904 | component: () => |
905 | import( | 905 | import( |
906 | /* webpackChunkName: "routes" */ | 906 | /* webpackChunkName: "routes" */ |
907 | /* webpackMode: "lazy-once" */ | 907 | /* webpackMode: "lazy-once" */ |
908 | `@/pages/Administrator/role.vue` | 908 | `@/pages/Administrator/role.vue` |
909 | ) | 909 | ) |
910 | }, | 910 | }, |
911 | { | 911 | { |
912 | path: '/bulkImport', | 912 | path: '/bulkImport', |
913 | meta: {}, | 913 | meta: {}, |
914 | name: 'Bulk Import', | 914 | name: 'Bulk Import', |
915 | props: (route) => ({ | 915 | props: (route) => ({ |
916 | type: route.query.type | 916 | type: route.query.type |
917 | }), | 917 | }), |
918 | component: () => | 918 | component: () => |
919 | import( | 919 | import( |
920 | /* webpackChunkName: "routes" */ | 920 | /* webpackChunkName: "routes" */ |
921 | /* webpackMode: "lazy-once" */ | 921 | /* webpackMode: "lazy-once" */ |
922 | `@/pages/Administrator/bulkImport.vue` | 922 | `@/pages/Administrator/bulkImport.vue` |
923 | ) | 923 | ) |
924 | }, | 924 | }, |
925 | { | 925 | { |
926 | path: '/studentReport', | 926 | path: '/studentReport', |
927 | meta: {}, | 927 | meta: {}, |
928 | name: 'Student Report', | 928 | name: 'Student Report', |
929 | props: (route) => ({ | 929 | props: (route) => ({ |
930 | type: route.query.type | 930 | type: route.query.type |
931 | }), | 931 | }), |
932 | component: () => | 932 | component: () => |
933 | import( | 933 | import( |
934 | /* webpackChunkName: "routes" */ | 934 | /* webpackChunkName: "routes" */ |
935 | /* webpackMode: "lazy-once" */ | 935 | /* webpackMode: "lazy-once" */ |
936 | `@/pages/Report/studentReport.vue` | 936 | `@/pages/Report/studentReport.vue` |
937 | ) | 937 | ) |
938 | }, | 938 | }, |
939 | { | 939 | { |
940 | path: '/progressCardReport', | 940 | path: '/progressCardReport', |
941 | meta: {}, | 941 | meta: {}, |
942 | name: 'Progress Card Report', | 942 | name: 'Progress Card Report', |
943 | props: (route) => ({ | 943 | props: (route) => ({ |
944 | type: route.query.type | 944 | type: route.query.type |
945 | }), | 945 | }), |
946 | component: () => | 946 | component: () => |
947 | import( | 947 | import( |
948 | /* webpackChunkName: "routes" */ | 948 | /* webpackChunkName: "routes" */ |
949 | /* webpackMode: "lazy-once" */ | 949 | /* webpackMode: "lazy-once" */ |
950 | `@/pages/Report/progressCardReport.vue` | 950 | `@/pages/Report/progressCardReport.vue` |
951 | ) | 951 | ) |
952 | }, | 952 | }, |
953 | { | 953 | { |
954 | path: '/idCard', | 954 | path: '/idCard', |
955 | meta: {}, | 955 | meta: {}, |
956 | name: 'Id Card Report', | 956 | name: 'Id Card Report', |
957 | props: (route) => ({ | 957 | props: (route) => ({ |
958 | type: route.query.type | 958 | type: route.query.type |
959 | }), | 959 | }), |
960 | component: () => | 960 | component: () => |
961 | import( | 961 | import( |
962 | `@/pages/Report/idCard.vue` | 962 | `@/pages/Report/idCard.vue` |
963 | ) | 963 | ) |
964 | }, | 964 | }, |
965 | { | 965 | { |
966 | path: '/admitCard', | 966 | path: '/admitCard', |
967 | meta: {}, | 967 | meta: {}, |
968 | name: 'Admit Card Report', | 968 | name: 'Admit Card Report', |
969 | props: (route) => ({ | 969 | props: (route) => ({ |
970 | type: route.query.type | 970 | type: route.query.type |
971 | }), | 971 | }), |
972 | component: () => | 972 | component: () => |
973 | import( | 973 | import( |
974 | `@/pages/Report/admitCard.vue` | 974 | `@/pages/Report/admitCard.vue` |
975 | ) | 975 | ) |
976 | }, | 976 | }, |
977 | { | 977 | { |
978 | path: '/generalSetting', | 978 | path: '/generalSetting', |
979 | meta: {}, | 979 | meta: {}, |
980 | name: 'General Setting', | 980 | name: 'General Setting', |
981 | props: (route) => ({ | 981 | props: (route) => ({ |
982 | type: route.query.type | 982 | type: route.query.type |
983 | }), | 983 | }), |
984 | component: () => | 984 | component: () => |
985 | import( | 985 | import( |
986 | /* webpackChunkName: "routes" */ | 986 | /* webpackChunkName: "routes" */ |
987 | /* webpackMode: "lazy-once" */ | 987 | /* webpackMode: "lazy-once" */ |
988 | `@/pages/generalSetting/generalSetting.vue` | 988 | `@/pages/generalSetting/generalSetting.vue` |
989 | ) | 989 | ) |
990 | }, | 990 | }, |
991 | { | 991 | { |
992 | path: '/assignment', | 992 | path: '/assignment', |
993 | meta: {}, | 993 | meta: {}, |
994 | name: 'Assignment', | 994 | name: 'Assignment', |
995 | props: (route) => ({ | 995 | props: (route) => ({ |
996 | type: route.query.type | 996 | type: route.query.type |
997 | }), | 997 | }), |
998 | component: () => | 998 | component: () => |
999 | import( | 999 | import( |
1000 | `@/pages/Academic/assignment.vue` | 1000 | `@/pages/Academic/assignment.vue` |
1001 | ) | 1001 | ) |
1002 | }, | 1002 | }, |
1003 | { | 1003 | { |
1004 | path: '/routine', | 1004 | path: '/routine', |
1005 | meta: {}, | 1005 | meta: {}, |
1006 | name: 'Routine', | 1006 | name: 'Routine', |
1007 | props: (route) => ({ | 1007 | props: (route) => ({ |
1008 | type: route.query.type | 1008 | type: route.query.type |
1009 | }), | 1009 | }), |
1010 | component: () => | 1010 | component: () => |
1011 | import( | 1011 | import( |
1012 | `@/pages/Academic/routine.vue` | 1012 | `@/pages/Academic/routine.vue` |
1013 | ) | 1013 | ) |
1014 | }, | 1014 | }, |
1015 | { | 1015 | { |
1016 | path: '/subject', | 1016 | path: '/subject', |
1017 | meta: {}, | 1017 | meta: {}, |
1018 | name: 'Subject', | 1018 | name: 'Subject', |
1019 | props: (route) => ({ | 1019 | props: (route) => ({ |
1020 | type: route.query.type | 1020 | type: route.query.type |
1021 | }), | 1021 | }), |
1022 | component: () => | 1022 | component: () => |
1023 | import( | 1023 | import( |
1024 | `@/pages/Academic/subject.vue` | 1024 | `@/pages/Academic/subject.vue` |
1025 | ) | 1025 | ) |
1026 | }, | 1026 | }, |
1027 | { | 1027 | { |
1028 | path: '/syllabus', | 1028 | path: '/syllabus', |
1029 | meta: {}, | 1029 | meta: {}, |
1030 | name: 'Syllabus', | 1030 | name: 'Syllabus', |
1031 | props: (route) => ({ | 1031 | props: (route) => ({ |
1032 | type: route.query.type | 1032 | type: route.query.type |
1033 | }), | 1033 | }), |
1034 | component: () => | 1034 | component: () => |
1035 | import( | 1035 | import( |
1036 | `@/pages/Academic/syllabus.vue` | 1036 | `@/pages/Academic/syllabus.vue` |
1037 | ) | 1037 | ) |
1038 | }, | 1038 | }, |
1039 | { | 1039 | { |
1040 | path: '/course', | 1040 | path: '/course', |
1041 | meta: {}, | 1041 | meta: {}, |
1042 | name: 'Course', | 1042 | name: 'Course', |
1043 | props: (route) => ({ | 1043 | props: (route) => ({ |
1044 | type: route.query.type | 1044 | type: route.query.type |
1045 | }), | 1045 | }), |
1046 | component: () => | 1046 | component: () => |
1047 | import( | 1047 | import( |
1048 | /* webpackChunkName: "routes" */ | 1048 | /* webpackChunkName: "routes" */ |
1049 | /* webpackMode: "lazy-once" */ | 1049 | /* webpackMode: "lazy-once" */ |
1050 | `@/pages/Course/course.vue` | 1050 | `@/pages/Course/course.vue` |
1051 | ) | 1051 | ) |
1052 | }, | 1052 | }, |
1053 | { | 1053 | { |
1054 | path: '/courseDetail', | 1054 | path: '/courseDetail', |
1055 | meta: {}, | 1055 | meta: {}, |
1056 | name: 'Course Detail', | 1056 | name: 'Course Detail', |
1057 | props: (route) => ({ | 1057 | props: (route) => ({ |
1058 | type: route.query.type | 1058 | type: route.query.type |
1059 | }), | 1059 | }), |
1060 | component: () => | 1060 | component: () => |
1061 | import( | 1061 | import( |
1062 | /* webpackChunkName: "routes" */ | 1062 | /* webpackChunkName: "routes" */ |
1063 | /* webpackMode: "lazy-once" */ | 1063 | /* webpackMode: "lazy-once" */ |
1064 | `@/pages/Course/courseDetail.vue` | 1064 | `@/pages/Course/courseDetail.vue` |
1065 | ) | 1065 | ) |
1066 | }, | 1066 | }, |
1067 | { | 1067 | { |
1068 | path: '/enrollStudents', | 1068 | path: '/enrollStudents', |
1069 | meta: {}, | 1069 | meta: {}, |
1070 | name: 'Enroll Students', | 1070 | name: 'Enroll Students', |
1071 | props: (route) => ({ | 1071 | props: (route) => ({ |
1072 | type: route.query.type | 1072 | type: route.query.type |
1073 | }), | 1073 | }), |
1074 | component: () => | 1074 | component: () => |
1075 | import( | 1075 | import( |
1076 | /* webpackChunkName: "routes" */ | 1076 | /* webpackChunkName: "routes" */ |
1077 | /* webpackMode: "lazy-once" */ | 1077 | /* webpackMode: "lazy-once" */ |
1078 | `@/pages/Course/enrollStudents.vue` | 1078 | `@/pages/Course/enrollStudents.vue` |
1079 | ) | 1079 | ) |
1080 | }, | 1080 | }, |
1081 | { | 1081 | { |
1082 | path: '/changeStudents', | 1082 | path: '/changeStudents', |
1083 | meta: {}, | 1083 | meta: {}, |
1084 | name: 'Change Students', | 1084 | name: 'Change Students', |
1085 | props: (route) => ({ | 1085 | props: (route) => ({ |
1086 | type: route.query.type | 1086 | type: route.query.type |
1087 | }), | 1087 | }), |
1088 | component: () => | 1088 | component: () => |
1089 | import( | 1089 | import( |
1090 | /* webpackChunkName: "routes" */ | 1090 | /* webpackChunkName: "routes" */ |
1091 | /* webpackMode: "lazy-once" */ | 1091 | /* webpackMode: "lazy-once" */ |
1092 | `@/pages/changeStudents/changeStudents.vue` | 1092 | `@/pages/changeStudents/changeStudents.vue` |
1093 | ) | 1093 | ) |
1094 | }, | 1094 | }, |
1095 | { | 1095 | { |
1096 | path: '/annoucement', | 1096 | path: '/annoucement', |
1097 | meta: {}, | 1097 | meta: {}, |
1098 | name: 'Annoucement', | 1098 | name: 'Annoucement', |
1099 | props: (route) => ({ | 1099 | props: (route) => ({ |
1100 | type: route.query.type | 1100 | type: route.query.type |
1101 | }), | 1101 | }), |
1102 | component: () => | 1102 | component: () => |
1103 | import( | 1103 | import( |
1104 | /* webpackChunkName: "routes" */ | 1104 | /* webpackChunkName: "routes" */ |
1105 | /* webpackMode: "lazy-once" */ | 1105 | /* webpackMode: "lazy-once" */ |
1106 | `@/pages/Annoucement/annoucement.vue` | 1106 | `@/pages/Annoucement/annoucement.vue` |
1107 | ) | 1107 | ) |
1108 | }, | 1108 | }, |
1109 | { | 1109 | { |
1110 | path: '/meetingEvent', | 1110 | path: '/meetingEvent', |
1111 | meta: {}, | 1111 | meta: {}, |
1112 | name: 'Meeting Event', | 1112 | name: 'Meeting Event', |
1113 | props: (route) => ({ | 1113 | props: (route) => ({ |
1114 | type: route.query.type | 1114 | type: route.query.type |
1115 | }), | 1115 | }), |
1116 | component: () => | 1116 | component: () => |
1117 | import( | 1117 | import( |
1118 | /* webpackChunkName: "routes" */ | 1118 | /* webpackChunkName: "routes" */ |
1119 | /* webpackMode: "lazy-once" */ | 1119 | /* webpackMode: "lazy-once" */ |
1120 | `@/pages/meetingEvent/meetingEvent.vue` | 1120 | `@/pages/meetingEvent/meetingEvent.vue` |
1121 | ) | 1121 | ) |
1122 | }, | 1122 | }, |
1123 | //////SCHOOL | 1123 | //////SCHOOL |
1124 | 1124 | ||
1125 | { | 1125 | { |
1126 | path: '/school', | 1126 | path: '/school', |
1127 | meta: {}, | 1127 | meta: {}, |
1128 | name: 'School', | 1128 | name: 'School', |
1129 | props: (route) => ({ | 1129 | props: (route) => ({ |
1130 | type: route.query.type | 1130 | type: route.query.type |
1131 | }), | 1131 | }), |
1132 | component: () => | 1132 | component: () => |
1133 | import( | 1133 | import( |
1134 | /* webpackChunkName: "routes" */ | 1134 | /* webpackChunkName: "routes" */ |
1135 | /* webpackMode: "lazy-once" */ | 1135 | /* webpackMode: "lazy-once" */ |
1136 | `@/pages/School/school.vue` | 1136 | `@/pages/School/school.vue` |
1137 | ) | 1137 | ) |
1138 | }, | 1138 | }, |
1139 | { | 1139 | { |
1140 | path: '/schooldashboard', | 1140 | path: '/appVersion', |
1141 | meta: {}, | 1141 | meta: {}, |
1142 | name: 'View School Dashboard', | 1142 | name: 'App Version', |
1143 | props: (route) => ({ | 1143 | props: (route) => ({ |
1144 | type: route.query.type | 1144 | type: route.query.type |
1145 | }), | 1145 | }), |
1146 | component: () => | 1146 | component: () => |
1147 | import( | 1147 | import( |
1148 | /* webpackChunkName: "routes" */ | 1148 | /* webpackChunkName: "routes" */ |
1149 | /* webpackMode: "lazy-once" */ | 1149 | /* webpackMode: "lazy-once" */ |
1150 | `@/pages/School/viewSchoolDashboard.vue` | 1150 | `@/pages/School/appVersion.vue` |
1151 | ) | 1151 | ) |
1152 | } | 1152 | }, |
1153 | { | ||
1154 | path: '/schooldashboard', | ||
1155 | meta: {}, | ||
1156 | name: 'View School Dashboard', | ||
1157 | props: (route) => ({ | ||
1158 | type: route.query.type | ||
1159 | }), | ||
1160 | component: () => | ||
1161 | import( | ||
1162 | /* webpackChunkName: "routes" */ | ||
1163 | /* webpackMode: "lazy-once" */ | ||
1164 | `@/pages/School/viewSchoolDashboard.vue` | ||
1165 | ) | ||
1166 | } | ||
1153 | ]; | 1167 | ]; |
static/icon/phone.png
297 Bytes