Commit 11d037abedea4eef2309320b7dcfaaa4486c8d7d
1 parent
229463bd5f
Exists in
master
and in
3 other branches
commit code
Showing
15 changed files
with
1442 additions
and
98 deletions
Show diff stats
src/Services/http.js
1 | import axios from 'axios' | 1 | import axios from 'axios' |
2 | import store from '@/store/store' | 2 | import store from '@/store/store' |
3 | 3 | ||
4 | const baseDomain = "http://15.206.52.174:8001/v1"; | 4 | const baseDomain = "https://api-dashboard.intrack.in/v1"; |
5 | 5 | ||
6 | const baseURL = `${baseDomain}`; | 6 | const baseURL = `${baseDomain}`; |
7 | // var token = "" | 7 | // var token = "" |
8 | // if (store.state.role === "ADMIN") { | 8 | // if (store.state.role === "ADMIN") { |
9 | // token = `${store.state.token}` | 9 | // token = `${store.state.token}` |
10 | // } else if (store.state.schoolRole === "SUPERADMIN") { | 10 | // } else if (store.state.schoolRole === "SUPERADMIN") { |
11 | // token = `${store.state.schoolToken}` | 11 | // token = `${store.state.schoolToken}` |
12 | // } | 12 | // } |
13 | 13 | ||
14 | // console.log("role",`${store.state.schoolRole}`); | 14 | // console.log("role",`${store.state.schoolRole}`); |
15 | // console.log("token",`${store.state.schoolToken}`); | 15 | // console.log("token",`${store.state.schoolToken}`); |
16 | export default () => { | 16 | export default () => { |
17 | return axios.create({ | 17 | return axios.create({ |
18 | // baseURL: 'http://192.168.2.221:3002/v1', | 18 | // baseURL: 'http://192.168.2.221:3002/v1', |
19 | baseURL, | 19 | baseURL, |
20 | headers: { | 20 | headers: { |
21 | Authorization: `Bearer ${store.state.token}` | 21 | Authorization: `Bearer ${store.state.token}` |
22 | } | 22 | } |
23 | }) | 23 | }) |
24 | } | 24 | } |
src/api/menu.js
1 | const adminMenu = [ | 1 | const adminMenu = [ |
2 | // { header: 'Apps' }, | 2 | // { header: 'Apps' }, |
3 | { | 3 | { |
4 | title: 'Dashboard', | 4 | title: 'Dashboard', |
5 | // group: 'apps', | 5 | // group: 'apps', |
6 | name: 'Dashboard', | 6 | name: 'Dashboard', |
7 | icon: '/static/icon/dashboard.png', | 7 | icon: '/static/icon/dashboard.png', |
8 | }, | 8 | }, |
9 | { | 9 | { |
10 | title: 'Class', | 10 | title: 'Class', |
11 | // group: 'apps', | 11 | // group: 'apps', |
12 | name: 'Class', | 12 | name: 'Class', |
13 | icon: '/static/icon/class.png', | 13 | icon: '/static/icon/class.png', |
14 | }, | 14 | }, |
15 | { | 15 | { |
16 | title: 'Section', | 16 | title: 'Section', |
17 | // group: 'apps', | 17 | // group: 'apps', |
18 | name: 'Section', | 18 | name: 'Section', |
19 | icon: '/static/icon/section.png', | 19 | icon: '/static/icon/section.png', |
20 | }, | 20 | }, |
21 | // { | 21 | // { |
22 | // title: 'Subjects', | 22 | // title: 'Subjects', |
23 | // name: 'Subject', | 23 | // name: 'Subject', |
24 | // icon: '/static/icon/subject.png', | 24 | // icon: '/static/icon/subject.png', |
25 | // }, | 25 | // }, |
26 | { | 26 | { |
27 | title: 'Parents', | 27 | title: 'Parents', |
28 | // group: 'apps', | 28 | // group: 'apps', |
29 | name: 'Parents', | 29 | name: 'Parents', |
30 | icon: '/static/icon/parents.png', | 30 | icon: '/static/icon/parents.png', |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | title: 'Teachers', | 33 | title: 'Teachers', |
34 | // group: '', | 34 | // group: '', |
35 | name: 'Teachers', | 35 | name: 'Teachers', |
36 | icon: '/static/icon/teacher.png', | 36 | icon: '/static/icon/teacher.png', |
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | title: 'Students', | 39 | title: 'Students', |
40 | // group: 'apps', | 40 | // group: 'apps', |
41 | name: 'Students', | 41 | name: 'Students', |
42 | icon: '/static/icon/student.png', | 42 | icon: '/static/icon/student.png', |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | title: 'User', | 45 | title: 'User', |
46 | name: 'User', | 46 | name: 'User', |
47 | icon: '/static/icon/users.png', | 47 | icon: '/static/icon/users.png', |
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | title: 'Attendance', | 50 | title: 'Attendance', |
51 | group: 'Attendance', | 51 | group: 'Attendance', |
52 | component: 'Attendance', | 52 | component: 'Attendance', |
53 | icon: '/static/icon/attendence.png', | 53 | icon: '/static/icon/attendence.png', |
54 | items: [ | 54 | items: [ |
55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 57 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
58 | ] | 58 | ] |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | title: 'Exam', | 61 | title: 'Exam', |
62 | group: 'Exam', | 62 | group: 'Exam', |
63 | component: 'Exam', | 63 | component: 'Exam', |
64 | icon: '/static/icon/exam.png', | 64 | icon: '/static/icon/exam.png', |
65 | items: [ | 65 | items: [ |
66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, | 66 | { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, |
67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 67 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, | 68 | { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, |
69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 69 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
70 | ] | 70 | ] |
71 | }, | 71 | }, |
72 | { | 72 | { |
73 | title: 'Marks', | 73 | title: 'Marks', |
74 | group: 'Mark', | 74 | group: 'Mark', |
75 | component: 'Mark', | 75 | component: 'Mark', |
76 | icon: '/static/icon/marks.png', | 76 | icon: '/static/icon/marks.png', |
77 | items: [ | 77 | items: [ |
78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, | 78 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, |
79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, | 79 | { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, |
80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, | 80 | // { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, |
81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 81 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, |
82 | ] | 82 | ] |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | title: 'Academic', | 85 | title: 'Academic', |
86 | group: 'Academic', | 86 | group: 'Academic', |
87 | component: 'Academic', | 87 | component: 'Academic', |
88 | icon: '/static/icon/school.png', | 88 | icon: '/static/icon/school.png', |
89 | items: [ | 89 | items: [ |
90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 90 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 91 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 92 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 93 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
94 | ] | 94 | ] |
95 | }, | 95 | }, |
96 | { | 96 | { |
97 | title: 'Administrator', | 97 | title: 'Administrator', |
98 | group: 'Administrator', | 98 | group: 'Administrator', |
99 | component: 'Administrator', | 99 | component: 'Administrator', |
100 | icon: '/static/icon/adminstrator.png', | 100 | icon: '/static/icon/adminstrator.png', |
101 | items: [ | 101 | items: [ |
102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, | 102 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, |
103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, | 103 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, |
104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, | 104 | { name: 'resetPassword', title: 'Change Password', component: 'Change Password', action: '', }, |
105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, | 105 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, |
106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, | 106 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, |
107 | 107 | ||
108 | ] | 108 | ] |
109 | }, | 109 | }, |
110 | { | 110 | { |
111 | title: 'Payroll', | 111 | title: 'Payroll', |
112 | group: 'Payroll', | 112 | group: 'Payroll', |
113 | component: 'Payroll', | 113 | component: 'Payroll', |
114 | icon: '/static/icon/dollar.png', | 114 | icon: '/static/icon/dollar.png', |
115 | items: [ | 115 | items: [ |
116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, | 116 | { name: 'salaryTemplate', title: 'Salary Template', component: 'Salary Template', action: '', }, |
117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, | 117 | { name: 'hourlyTemplate', title: 'Hourly Template', component: 'Hourly Template', action: '', }, |
118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, | 118 | { name: 'manageSalary', title: 'Manage Salary', component: 'Manage Salary', action: '', }, |
119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, | 119 | // { name: 'makePayment', title: 'Make Payment', component: 'Make Payment', action: '', }, |
120 | ] | 120 | ] |
121 | }, | 121 | }, |
122 | { | 122 | { |
123 | title: 'Notice Board', | 123 | title: 'Notice Board', |
124 | name: 'Notice Board', | 124 | name: 'Notice Board', |
125 | icon: '/static/icon/notice board.png', | 125 | icon: '/static/icon/notice board.png', |
126 | }, | 126 | }, |
127 | { | 127 | { |
128 | title: 'News', | 128 | title: 'News', |
129 | name: 'News', | 129 | name: 'News', |
130 | icon: '/static/icon/news.png', | 130 | icon: '/static/icon/news.png', |
131 | }, | 131 | }, |
132 | // { | 132 | // { |
133 | // title: 'Reminder', | 133 | // title: 'Reminder', |
134 | // name: 'reminder', | 134 | // name: 'reminder', |
135 | // icon: 'alarm_add', | 135 | // icon: 'alarm_add', |
136 | // }, | 136 | // }, |
137 | { | 137 | { |
138 | title: 'Time Table', | 138 | title: 'Time Table', |
139 | name: 'Time Table', | 139 | name: 'Time Table', |
140 | icon: '/static/icon/time table.png', | 140 | icon: '/static/icon/time table.png', |
141 | }, | 141 | }, |
142 | { | 142 | { |
143 | title: 'Library', | 143 | title: 'Library', |
144 | group: 'Library', | 144 | group: 'Library', |
145 | component: 'Library', | 145 | component: 'Library', |
146 | icon: '/static/icon/library.png', | 146 | icon: '/static/icon/library.png', |
147 | items: [ | 147 | items: [ |
148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 148 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 149 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 150 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 151 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
152 | 152 | ||
153 | ] | 153 | ] |
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | title: 'Report', | 156 | title: 'Report', |
157 | group: 'Report', | 157 | group: 'Report', |
158 | component: 'Report', | 158 | component: 'Report', |
159 | icon: '/static/icon/reports.png', | 159 | icon: '/static/icon/reports.png', |
160 | items: [ | 160 | items: [ |
161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 161 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 162 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 163 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 164 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
165 | ] | 165 | ] |
166 | }, | 166 | }, |
167 | { | 167 | { |
168 | title: 'Notification', | 168 | title: 'Notification', |
169 | name: 'Notification', | 169 | name: 'Notification', |
170 | icon: '/static/icon/notification.png', | 170 | icon: '/static/icon/notification.png', |
171 | }, | 171 | }, |
172 | { | 172 | { |
173 | title: 'Social Media', | 173 | title: 'Social Media', |
174 | name: 'Social Media', | 174 | name: 'Social Media', |
175 | icon: '/static/icon/events.png', | 175 | icon: '/static/icon/events.png', |
176 | }, | 176 | }, |
177 | { | 177 | { |
178 | title: 'Gallery', | 178 | title: 'Gallery', |
179 | name: 'Gallery', | 179 | name: 'Gallery', |
180 | icon: '/static/icon/gallery.png', | 180 | icon: '/static/icon/gallery.png', |
181 | }, | 181 | }, |
182 | { | 182 | { |
183 | title: 'Event', | 183 | title: 'Event', |
184 | name: 'Event', | 184 | name: 'Event', |
185 | icon: '/static/icon/events.png', | 185 | icon: '/static/icon/events.png', |
186 | }, | 186 | }, |
187 | { | 187 | { |
188 | title: 'Account', | 188 | title: 'Account', |
189 | group: 'Account', | 189 | group: 'Account', |
190 | component: 'Account', | 190 | component: 'Account', |
191 | icon: '/static/icon/accounts.png', | 191 | icon: '/static/icon/accounts.png', |
192 | items: [ | 192 | items: [ |
193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 193 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 194 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 195 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 196 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 197 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 198 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
199 | ] | 199 | ] |
200 | }, | 200 | }, |
201 | { | 201 | { |
202 | title: 'Holiday', | 202 | title: 'Holiday', |
203 | name: 'Holiday', | 203 | name: 'Holiday', |
204 | icon: '/static/icon/holiday.png', | 204 | icon: '/static/icon/holiday.png', |
205 | }, | 205 | }, |
206 | { | 206 | { |
207 | title: 'General Setting', | 207 | title: 'General Setting', |
208 | name: 'General Setting', | 208 | name: 'General Setting', |
209 | icon: '/static/icon/settings.png', | 209 | icon: '/static/icon/settings.png', |
210 | } | 210 | } |
211 | ]; | 211 | ]; |
212 | 212 | ||
213 | const libraryMenu = [{ | 213 | const libraryMenu = [{ |
214 | title: 'Dashboard', | 214 | title: 'Dashboard', |
215 | name: 'Dashboard', | 215 | name: 'Dashboard', |
216 | icon: '/static/icon/dashboard.png', | 216 | icon: '/static/icon/dashboard.png', |
217 | }, | 217 | }, |
218 | { | 218 | { |
219 | title: 'Library', | 219 | title: 'Library', |
220 | group: 'Library', | 220 | group: 'Library', |
221 | component: 'Library', | 221 | component: 'Library', |
222 | icon: '/static/icon/library.png', | 222 | icon: '/static/icon/library.png', |
223 | items: [ | 223 | items: [ |
224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, | 224 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 225 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 226 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 227 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
228 | 228 | ||
229 | ] | 229 | ] |
230 | }, | 230 | }, |
231 | ]; | 231 | ]; |
232 | 232 | ||
233 | const accountMenu = [{ | 233 | const accountMenu = [{ |
234 | title: 'Dashboard', | 234 | title: 'Dashboard', |
235 | name: 'Dashboard', | 235 | name: 'Dashboard', |
236 | icon: '/static/icon/dashboard.png', | 236 | icon: '/static/icon/dashboard.png', |
237 | }, | 237 | }, |
238 | 238 | ||
239 | { | 239 | { |
240 | title: 'Account', | 240 | title: 'Account', |
241 | group: 'Account', | 241 | group: 'Account', |
242 | component: 'Account', | 242 | component: 'Account', |
243 | icon: '/static/icon/accounts.png', | 243 | icon: '/static/icon/accounts.png', |
244 | items: [ | 244 | items: [ |
245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, | 245 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 246 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, | 247 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 248 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 249 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } | 250 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
251 | ] | 251 | ] |
252 | }, | 252 | }, |
253 | ]; | 253 | ]; |
254 | 254 | ||
255 | const schoolMenu = [ | 255 | const schoolMenu = [ |
256 | // { header: 'Apps' }, | 256 | // { header: 'Apps' }, |
257 | { | 257 | { |
258 | title: 'Dashboard', | 258 | title: 'Dashboard', |
259 | // group: 'apps', | 259 | // group: 'apps', |
260 | name: 'View School Dashboard', | 260 | name: 'View School Dashboard', |
261 | icon: '/static/icon/dashboard.png', | 261 | icon: '/static/icon/dashboard.png', |
262 | }, | 262 | }, |
263 | { | 263 | { |
264 | title: 'School', | 264 | title: 'School', |
265 | // group: 'apps', | 265 | // group: 'apps', |
266 | name: 'School', | 266 | name: 'School', |
267 | icon: '/static/schoolIcons/Dashboard.png', | 267 | icon: '/static/schoolIcons/Dashboard.png', |
268 | } | 268 | } |
269 | ]; | 269 | ]; |
270 | 270 | ||
271 | const teacherMenu = [{ | 271 | const teacherMenu = [{ |
272 | title: 'Dashboard', | 272 | title: 'Dashboard', |
273 | name: 'Dashboard', | 273 | name: 'Dashboard', |
274 | icon: '/static/icon/dashboard.png', | 274 | icon: '/static/icon/dashboard.png', |
275 | }, | 275 | }, |
276 | { | 276 | { |
277 | title: 'Parents', | 277 | title: 'Parents', |
278 | // group: 'apps', | 278 | // group: 'apps', |
279 | name: 'Parents', | 279 | name: 'Parents', |
280 | icon: '/static/icon/parents.png', | 280 | icon: '/static/icon/parents.png', |
281 | }, | 281 | }, |
282 | { | 282 | { |
283 | title: 'Teachers', | 283 | title: 'Teachers', |
284 | // group: '', | 284 | // group: '', |
285 | name: 'Teachers', | 285 | name: 'Teachers', |
286 | icon: '/static/icon/teacher.png', | 286 | icon: '/static/icon/teacher.png', |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | title: 'Students', | 289 | title: 'Students', |
290 | // group: 'apps', | 290 | // group: 'apps', |
291 | name: 'Students', | 291 | name: 'Students', |
292 | icon: '/static/icon/student.png', | 292 | icon: '/static/icon/student.png', |
293 | }, | 293 | }, |
294 | { | 294 | { |
295 | title: 'Academic', | 295 | title: 'Academic', |
296 | group: 'Academic', | 296 | group: 'Academic', |
297 | component: 'Academic', | 297 | component: 'Academic', |
298 | icon: '/static/icon/school.png', | 298 | icon: '/static/icon/school.png', |
299 | items: [ | 299 | items: [ |
300 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, | 300 | { name: 'Subject', title: 'Subject', component: 'Subject', action: '', }, |
301 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, | 301 | { name: 'Syllabus', title: 'Syllabus', component: 'Syllabus', action: '', }, |
302 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 302 | { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, |
303 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 303 | { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
304 | ] | 304 | ] |
305 | }, | 305 | }, |
306 | { | 306 | { |
307 | title: 'Course', | 307 | title: 'Course', |
308 | group: 'Course', | 308 | group: 'Course', |
309 | component: 'Course', | 309 | component: 'Course', |
310 | icon: '/static/icon/school.png', | 310 | icon: '/static/icon/school.png', |
311 | items: [ | 311 | items: [ |
312 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, | 312 | { name: 'Course', title: 'Course', component: 'Course', action: '', }, |
313 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, | 313 | { name: 'Enroll Students', title: 'Enroll Students', component: 'Enroll Students', action: '', }, |
314 | // { name: 'Assignment', title: 'Assignment', component: 'Assignment', action: '', }, | 314 | { name: 'Course Detail', title: 'Course Detail', component: 'Course Detail', action: '', }, |
315 | // { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, | 315 | // { name: 'Routine', title: 'Routine', component: 'Routine', action: '', }, |
316 | ] | 316 | ] |
317 | }, | 317 | }, |
318 | { | 318 | { |
319 | title: 'Annoucement', | 319 | title: 'Annoucement', |
320 | // group: 'apps', | 320 | // group: 'apps', |
321 | name: 'Annoucement', | 321 | name: 'Annoucement', |
322 | icon: '/static/icon/student.png', | 322 | icon: '/static/icon/student.png', |
323 | }, | 323 | }, |
324 | { | 324 | { |
325 | title: 'Attendance', | 325 | title: 'Attendance', |
326 | group: 'Attendance', | 326 | group: 'Attendance', |
327 | component: 'Attendance', | 327 | component: 'Attendance', |
328 | icon: '/static/icon/attendence.png', | 328 | icon: '/static/icon/attendence.png', |
329 | items: [ | 329 | items: [ |
330 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, | 330 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
331 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, | 331 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, |
332 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, | 332 | // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, |
333 | ] | 333 | ] |
334 | }, | 334 | }, |
335 | { | 335 | { |
336 | title: 'Exam', | 336 | title: 'Exam', |
337 | group: 'Exam', | 337 | group: 'Exam', |
338 | component: 'Exam', | 338 | component: 'Exam', |
339 | icon: '/static/icon/exam.png', | 339 | icon: '/static/icon/exam.png', |
340 | items: [ | 340 | items: [ |
341 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, | 341 | { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, |
342 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } | 342 | { name: 'ExamAttendence', title: 'Exam Attendence', component: 'Exam Attendence', action: '', } |
343 | ] | 343 | ] |
344 | }, | 344 | }, |
345 | { | 345 | { |
346 | title: 'Marks', | 346 | title: 'Marks', |
347 | group: 'Mark', | 347 | group: 'Mark', |
348 | component: 'Mark', | 348 | component: 'Mark', |
349 | icon: '/static/icon/marks.png', | 349 | icon: '/static/icon/marks.png', |
350 | items: [ | 350 | items: [ |
351 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } | 351 | { name: 'Mark', title: 'Mark', component: 'Mark', action: '', } |
352 | ] | 352 | ] |
353 | }, | 353 | }, |
354 | { | 354 | { |
355 | title: 'Report', | 355 | title: 'Report', |
356 | group: 'Report', | 356 | group: 'Report', |
357 | component: 'Report', | 357 | component: 'Report', |
358 | icon: '/static/icon/reports.png', | 358 | icon: '/static/icon/reports.png', |
359 | items: [ | 359 | items: [ |
360 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, | 360 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
361 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, | 361 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', }, |
362 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, | 362 | { name: 'idCard', title: 'Id Card Report', component: 'Id Card Report', action: '', }, |
363 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } | 363 | { name: 'admitCard', title: 'Admit Card Report', component: 'Admit Card Report', action: '', } |
364 | ] | 364 | ] |
365 | }, | 365 | }, |
366 | { | 366 | { |
367 | title: 'Library', | 367 | title: 'Library', |
368 | group: 'Library', | 368 | group: 'Library', |
369 | component: 'Library', | 369 | component: 'Library', |
370 | icon: '/static/icon/library.png', | 370 | icon: '/static/icon/library.png', |
371 | items: [ | 371 | items: [ |
372 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 372 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
373 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 373 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
374 | 374 | ||
375 | ] | 375 | ] |
376 | }, | 376 | }, |
377 | { | 377 | { |
378 | title: 'Meet', | 378 | title: 'Meet', |
379 | name: 'Meet', | 379 | name: 'Meet', |
380 | icon: '/static/icon/parents.png', | 380 | icon: '/static/icon/parents.png', |
381 | } | 381 | } |
382 | ]; | 382 | ]; |
383 | 383 | ||
384 | const parentMenu = [{ | ||
385 | title: 'Dashboard', | ||
386 | name: 'Dashboard', | ||
387 | icon: '/static/icon/dashboard.png', | ||
388 | }]; | ||
384 | // reorder menu | 389 | // reorder menu |
385 | // Menu.forEach((item) => { | 390 | // Menu.forEach((item) => { |
386 | // if (item.items) { | 391 | // if (item.items) { |
387 | // item.items.sort((x, y) => { | 392 | // item.items.sort((x, y) => { |
388 | // let textA = x.title.toUpperCase(); | 393 | // let textA = x.title.toUpperCase(); |
389 | // let textB = y.title.toUpperCase(); | 394 | // let textB = y.title.toUpperCase(); |
390 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; | 395 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; |
391 | // }); | 396 | // }); |
392 | // } | 397 | // } |
393 | // }); | 398 | // }); |
394 | 399 | ||
395 | export default { adminMenu, schoolMenu, teacherMenu, libraryMenu, accountMenu }; |
src/components/pageHeader/AppDrawer.vue
1 | <template> | 1 | <template> |
2 | <v-navigation-drawer | 2 | <v-navigation-drawer |
3 | id="appDrawer" | 3 | id="appDrawer" |
4 | :mini-variant.sync="mini" | 4 | :mini-variant.sync="mini" |
5 | :dark="$vuetify.dark" | 5 | :dark="$vuetify.dark" |
6 | app | 6 | app |
7 | fixed | 7 | fixed |
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 | > | 12 | > |
13 | <!-- <vue-perfect-scrollbar | 13 | <!-- <vue-perfect-scrollbar |
14 | class="drawer-menu--scroll side-bar-color mt-3" | 14 | class="drawer-menu--scroll side-bar-color mt-3" |
15 | :settings="scrollSettings" | 15 | :settings="scrollSettings" |
16 | >--> | 16 | >--> |
17 | <v-toolbar class="white" flat> | 17 | <v-toolbar class="white" flat> |
18 | <img | 18 | <img |
19 | v-bind:src="computeLogo" | 19 | v-bind:src="computeLogo" |
20 | height="40" | 20 | height="40" |
21 | width="130" | 21 | width="130" |
22 | class="imgLogo mb-3 mt-3" | 22 | class="imgLogo mb-3 mt-3" |
23 | alt="logo" | 23 | alt="logo" |
24 | style="margin: auto; | 24 | style="margin: auto; |
25 | display: block;" | 25 | display: block;" |
26 | /> | 26 | /> |
27 | </v-toolbar> | 27 | </v-toolbar> |
28 | <v-list dense dark> | 28 | <v-list dense dark> |
29 | <template v-for="(item, i) in menus" v-if="role === 'ADMIN'"> | 29 | <template v-for="(item, i) in menus" v-if="role === 'ADMIN'"> |
30 | <!-- {{menus}} --> | 30 | <!-- {{menus}} --> |
31 | <!--group with subitems--> | 31 | <!--group with subitems--> |
32 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action> | 32 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action> |
33 | <v-list-tile slot="activator" ripple="ripple"> | 33 | <v-list-tile slot="activator" ripple="ripple"> |
34 | <v-list-tile-action v-if="item.icon"> | 34 | <v-list-tile-action v-if="item.icon"> |
35 | <img :src="item.icon" width="22" alt="icons" /> | 35 | <img :src="item.icon" width="22" alt="icons" /> |
36 | </v-list-tile-action> | 36 | </v-list-tile-action> |
37 | <v-list-tile-content> | 37 | <v-list-tile-content> |
38 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 38 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
39 | </v-list-tile-content> | 39 | </v-list-tile-content> |
40 | </v-list-tile> | 40 | </v-list-tile> |
41 | <template v-for="(subItem, i) in item.items"> | 41 | <template v-for="(subItem, i) in item.items"> |
42 | <!--sub group--> | 42 | <!--sub group--> |
43 | <v-list-group | 43 | <v-list-group |
44 | v-if="subItem.items" | 44 | v-if="subItem.items" |
45 | :key="subItem.name" | 45 | :key="subItem.name" |
46 | :group="subItem.group" | 46 | :group="subItem.group" |
47 | sub-group="sub-group" | 47 | sub-group="sub-group" |
48 | > | 48 | > |
49 | <v-list-tile slot="activator" ripple="ripple"> | 49 | <v-list-tile slot="activator" ripple="ripple"> |
50 | <v-list-tile-content> | 50 | <v-list-tile-content> |
51 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 51 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
52 | </v-list-tile-content> | 52 | </v-list-tile-content> |
53 | </v-list-tile> | 53 | </v-list-tile> |
54 | <v-list-tile | 54 | <v-list-tile |
55 | v-for="(grand, i) in subItem.children" | 55 | v-for="(grand, i) in subItem.children" |
56 | :key="i" | 56 | :key="i" |
57 | :to="genChildTarget(item, grand)" | 57 | :to="genChildTarget(item, grand)" |
58 | :href="grand.href" | 58 | :href="grand.href" |
59 | ripple="ripple" | 59 | ripple="ripple" |
60 | > | 60 | > |
61 | <v-list-tile-content> | 61 | <v-list-tile-content> |
62 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 62 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
63 | </v-list-tile-content> | 63 | </v-list-tile-content> |
64 | </v-list-tile> | 64 | </v-list-tile> |
65 | </v-list-group> | 65 | </v-list-group> |
66 | <!--child item--> | 66 | <!--child item--> |
67 | <v-list-tile | 67 | <v-list-tile |
68 | v-else | 68 | v-else |
69 | :key="i" | 69 | :key="i" |
70 | :to="genChildTarget(item, subItem)" | 70 | :to="genChildTarget(item, subItem)" |
71 | :href="subItem.href" | 71 | :href="subItem.href" |
72 | :disabled="subItem.disabled" | 72 | :disabled="subItem.disabled" |
73 | :target="subItem.target" | 73 | :target="subItem.target" |
74 | ripple="ripple" | 74 | ripple="ripple" |
75 | > | 75 | > |
76 | <v-list-tile-action v-if="subItem.action"> | 76 | <v-list-tile-action v-if="subItem.action"> |
77 | <img | 77 | <img |
78 | width="30" | 78 | width="30" |
79 | :src="subItem.action" | 79 | :src="subItem.action" |
80 | :class="[subItem.actionClass || 'success--text']" | 80 | :class="[subItem.actionClass || 'success--text']" |
81 | /> | 81 | /> |
82 | </v-list-tile-action> | 82 | </v-list-tile-action> |
83 | <v-list-tile-content> | 83 | <v-list-tile-content> |
84 | <v-list-tile-title class="body-2"> | 84 | <v-list-tile-title class="body-2"> |
85 | <span>{{ subItem.title }}</span> | 85 | <span>{{ subItem.title }}</span> |
86 | </v-list-tile-title> | 86 | </v-list-tile-title> |
87 | </v-list-tile-content> | 87 | </v-list-tile-content> |
88 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 88 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
89 | </v-list-tile> | 89 | </v-list-tile> |
90 | </template> | 90 | </template> |
91 | </v-list-group> | 91 | </v-list-group> |
92 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 92 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
93 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 93 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
94 | <!--top-level link--> | 94 | <!--top-level link--> |
95 | <v-list-tile | 95 | <v-list-tile |
96 | v-else | 96 | v-else |
97 | ripple="ripple" | 97 | ripple="ripple" |
98 | :disabled="item.disabled" | 98 | :disabled="item.disabled" |
99 | :target="item.target" | 99 | :target="item.target" |
100 | rel="noopener" | 100 | rel="noopener" |
101 | :key="item.name" | 101 | :key="item.name" |
102 | :to="!item.href ? { name: item.name } : null" | 102 | :to="!item.href ? { name: item.name } : null" |
103 | :href="item.href" | 103 | :href="item.href" |
104 | > | 104 | > |
105 | <!-- <a :href="item.path"> --> | 105 | <!-- <a :href="item.path"> --> |
106 | <v-list-tile-action v-if="item.icon"> | 106 | <v-list-tile-action v-if="item.icon"> |
107 | <img :src="item.icon" width="22" alt="icons" /> | 107 | <img :src="item.icon" width="22" alt="icons" /> |
108 | </v-list-tile-action> | 108 | </v-list-tile-action> |
109 | <v-list-tile-content class="pt-2"> | 109 | <v-list-tile-content class="pt-2"> |
110 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 110 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
111 | </v-list-tile-content> | 111 | </v-list-tile-content> |
112 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 112 | <!-- <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-list-tile-action v-if="item.subAction"> | 113 | <v-list-tile-action v-if="item.subAction"> |
114 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 114 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
115 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 115 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
116 | </v-list-tile-action> | 116 | </v-list-tile-action> |
117 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 117 | <!-- <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 | <!-- </a> --> | 118 | <!-- </a> --> |
119 | </v-list-tile> | 119 | </v-list-tile> |
120 | </template> | 120 | </template> |
121 | <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'"> | 121 | <template v-for="(item, i) in menuAccount" v-if="role === 'ACCOUNTANT'"> |
122 | <!-- {{menus}} --> | 122 | <!-- {{menus}} --> |
123 | <!--group with subitems--> | 123 | <!--group with subitems--> |
124 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 124 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
125 | <v-list-tile slot="activator" ripple="ripple"> | 125 | <v-list-tile slot="activator" ripple="ripple"> |
126 | <v-list-tile-action v-if="item.icon"> | 126 | <v-list-tile-action v-if="item.icon"> |
127 | <img :src="item.icon" width="22" alt="icons" /> | 127 | <img :src="item.icon" width="22" alt="icons" /> |
128 | </v-list-tile-action> | 128 | </v-list-tile-action> |
129 | <v-list-tile-content> | 129 | <v-list-tile-content> |
130 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 130 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
131 | </v-list-tile-content> | 131 | </v-list-tile-content> |
132 | </v-list-tile> | 132 | </v-list-tile> |
133 | <template v-for="(subItem, i) in item.items"> | 133 | <template v-for="(subItem, i) in item.items"> |
134 | <!--sub group--> | 134 | <!--sub group--> |
135 | <v-list-group | 135 | <v-list-group |
136 | v-if="subItem.items" | 136 | v-if="subItem.items" |
137 | :key="subItem.name" | 137 | :key="subItem.name" |
138 | :group="subItem.group" | 138 | :group="subItem.group" |
139 | sub-group="sub-group" | 139 | sub-group="sub-group" |
140 | > | 140 | > |
141 | <v-list-tile slot="activator" ripple="ripple"> | 141 | <v-list-tile slot="activator" ripple="ripple"> |
142 | <v-list-tile-content> | 142 | <v-list-tile-content> |
143 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 143 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
144 | </v-list-tile-content> | 144 | </v-list-tile-content> |
145 | </v-list-tile> | 145 | </v-list-tile> |
146 | <v-list-tile | 146 | <v-list-tile |
147 | v-for="(grand, i) in subItem.children" | 147 | v-for="(grand, i) in subItem.children" |
148 | :key="i" | 148 | :key="i" |
149 | :to="genChildTarget(item, grand)" | 149 | :to="genChildTarget(item, grand)" |
150 | :href="grand.href" | 150 | :href="grand.href" |
151 | ripple="ripple" | 151 | ripple="ripple" |
152 | > | 152 | > |
153 | <v-list-tile-content> | 153 | <v-list-tile-content> |
154 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 154 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
155 | </v-list-tile-content> | 155 | </v-list-tile-content> |
156 | </v-list-tile> | 156 | </v-list-tile> |
157 | </v-list-group> | 157 | </v-list-group> |
158 | <!--child item--> | 158 | <!--child item--> |
159 | <v-list-tile | 159 | <v-list-tile |
160 | v-else | 160 | v-else |
161 | :key="i" | 161 | :key="i" |
162 | :to="genChildTarget(item, subItem)" | 162 | :to="genChildTarget(item, subItem)" |
163 | :href="subItem.href" | 163 | :href="subItem.href" |
164 | :disabled="subItem.disabled" | 164 | :disabled="subItem.disabled" |
165 | :target="subItem.target" | 165 | :target="subItem.target" |
166 | ripple="ripple" | 166 | ripple="ripple" |
167 | > | 167 | > |
168 | <v-list-tile-action v-if="subItem.action"> | 168 | <v-list-tile-action v-if="subItem.action"> |
169 | <img | 169 | <img |
170 | width="30" | 170 | width="30" |
171 | :src="subItem.action" | 171 | :src="subItem.action" |
172 | :class="[subItem.actionClass || 'success--text']" | 172 | :class="[subItem.actionClass || 'success--text']" |
173 | /> | 173 | /> |
174 | </v-list-tile-action> | 174 | </v-list-tile-action> |
175 | <v-list-tile-content> | 175 | <v-list-tile-content> |
176 | <v-list-tile-title class="body-2"> | 176 | <v-list-tile-title class="body-2"> |
177 | <span>{{ subItem.title }}</span> | 177 | <span>{{ subItem.title }}</span> |
178 | </v-list-tile-title> | 178 | </v-list-tile-title> |
179 | </v-list-tile-content> | 179 | </v-list-tile-content> |
180 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 180 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
181 | </v-list-tile> | 181 | </v-list-tile> |
182 | </template> | 182 | </template> |
183 | </v-list-group> | 183 | </v-list-group> |
184 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 184 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
185 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 185 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
186 | <!--top-level link--> | 186 | <!--top-level link--> |
187 | <v-list-tile | 187 | <v-list-tile |
188 | v-else | 188 | v-else |
189 | ripple="ripple" | 189 | ripple="ripple" |
190 | :disabled="item.disabled" | 190 | :disabled="item.disabled" |
191 | :target="item.target" | 191 | :target="item.target" |
192 | rel="noopener" | 192 | rel="noopener" |
193 | :key="item.name" | 193 | :key="item.name" |
194 | :to="!item.href ? { name: item.name } : null" | 194 | :to="!item.href ? { name: item.name } : null" |
195 | :href="item.href" | 195 | :href="item.href" |
196 | > | 196 | > |
197 | <!-- <a :href="item.path"> --> | 197 | <!-- <a :href="item.path"> --> |
198 | <v-list-tile-action v-if="item.icon"> | 198 | <v-list-tile-action v-if="item.icon"> |
199 | <img :src="item.icon" width="22" alt="icons" /> | 199 | <img :src="item.icon" width="22" alt="icons" /> |
200 | </v-list-tile-action> | 200 | </v-list-tile-action> |
201 | <v-list-tile-content class="pt-2"> | 201 | <v-list-tile-content class="pt-2"> |
202 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 202 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
203 | </v-list-tile-content> | 203 | </v-list-tile-content> |
204 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 204 | <!-- <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-list-tile-action v-if="item.subAction"> | 205 | <v-list-tile-action v-if="item.subAction"> |
206 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 206 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
207 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 207 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
208 | </v-list-tile-action> | 208 | </v-list-tile-action> |
209 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 209 | <!-- <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 | <!-- </a> --> | 210 | <!-- </a> --> |
211 | </v-list-tile> | 211 | </v-list-tile> |
212 | </template> | 212 | </template> |
213 | <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'"> | 213 | <template v-for="(item, i) in menuLibrarian" v-if="role === 'LIBRARIAN'"> |
214 | <!-- {{menus}} --> | 214 | <!-- {{menus}} --> |
215 | <!--group with subitems--> | 215 | <!--group with subitems--> |
216 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 216 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
217 | <v-list-tile slot="activator" ripple="ripple"> | 217 | <v-list-tile slot="activator" ripple="ripple"> |
218 | <v-list-tile-action v-if="item.icon"> | 218 | <v-list-tile-action v-if="item.icon"> |
219 | <img :src="item.icon" width="22" alt="icons" /> | 219 | <img :src="item.icon" width="22" alt="icons" /> |
220 | </v-list-tile-action> | 220 | </v-list-tile-action> |
221 | <v-list-tile-content> | 221 | <v-list-tile-content> |
222 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 222 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
223 | </v-list-tile-content> | 223 | </v-list-tile-content> |
224 | </v-list-tile> | 224 | </v-list-tile> |
225 | <template v-for="(subItem, i) in item.items"> | 225 | <template v-for="(subItem, i) in item.items"> |
226 | <!--sub group--> | 226 | <!--sub group--> |
227 | <v-list-group | 227 | <v-list-group |
228 | v-if="subItem.items" | 228 | v-if="subItem.items" |
229 | :key="subItem.name" | 229 | :key="subItem.name" |
230 | :group="subItem.group" | 230 | :group="subItem.group" |
231 | sub-group="sub-group" | 231 | sub-group="sub-group" |
232 | > | 232 | > |
233 | <v-list-tile slot="activator" ripple="ripple"> | 233 | <v-list-tile slot="activator" ripple="ripple"> |
234 | <v-list-tile-content> | 234 | <v-list-tile-content> |
235 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 235 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
236 | </v-list-tile-content> | 236 | </v-list-tile-content> |
237 | </v-list-tile> | 237 | </v-list-tile> |
238 | <v-list-tile | 238 | <v-list-tile |
239 | v-for="(grand, i) in subItem.children" | 239 | v-for="(grand, i) in subItem.children" |
240 | :key="i" | 240 | :key="i" |
241 | :to="genChildTarget(item, grand)" | 241 | :to="genChildTarget(item, grand)" |
242 | :href="grand.href" | 242 | :href="grand.href" |
243 | ripple="ripple" | 243 | ripple="ripple" |
244 | > | 244 | > |
245 | <v-list-tile-content> | 245 | <v-list-tile-content> |
246 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 246 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
247 | </v-list-tile-content> | 247 | </v-list-tile-content> |
248 | </v-list-tile> | 248 | </v-list-tile> |
249 | </v-list-group> | 249 | </v-list-group> |
250 | <!--child item--> | 250 | <!--child item--> |
251 | <v-list-tile | 251 | <v-list-tile |
252 | v-else | 252 | v-else |
253 | :key="i" | 253 | :key="i" |
254 | :to="genChildTarget(item, subItem)" | 254 | :to="genChildTarget(item, subItem)" |
255 | :href="subItem.href" | 255 | :href="subItem.href" |
256 | :disabled="subItem.disabled" | 256 | :disabled="subItem.disabled" |
257 | :target="subItem.target" | 257 | :target="subItem.target" |
258 | ripple="ripple" | 258 | ripple="ripple" |
259 | > | 259 | > |
260 | <v-list-tile-action v-if="subItem.action"> | 260 | <v-list-tile-action v-if="subItem.action"> |
261 | <img | 261 | <img |
262 | width="30" | 262 | width="30" |
263 | :src="subItem.action" | 263 | :src="subItem.action" |
264 | :class="[subItem.actionClass || 'success--text']" | 264 | :class="[subItem.actionClass || 'success--text']" |
265 | /> | 265 | /> |
266 | </v-list-tile-action> | 266 | </v-list-tile-action> |
267 | <v-list-tile-content> | 267 | <v-list-tile-content> |
268 | <v-list-tile-title class="body-2"> | 268 | <v-list-tile-title class="body-2"> |
269 | <span>{{ subItem.title }}</span> | 269 | <span>{{ subItem.title }}</span> |
270 | </v-list-tile-title> | 270 | </v-list-tile-title> |
271 | </v-list-tile-content> | 271 | </v-list-tile-content> |
272 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 272 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
273 | </v-list-tile> | 273 | </v-list-tile> |
274 | </template> | 274 | </template> |
275 | </v-list-group> | 275 | </v-list-group> |
276 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 276 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
277 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 277 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
278 | <!--top-level link--> | 278 | <!--top-level link--> |
279 | <v-list-tile | 279 | <v-list-tile |
280 | v-else | 280 | v-else |
281 | ripple="ripple" | 281 | ripple="ripple" |
282 | :disabled="item.disabled" | 282 | :disabled="item.disabled" |
283 | :target="item.target" | 283 | :target="item.target" |
284 | rel="noopener" | 284 | rel="noopener" |
285 | :key="item.name" | 285 | :key="item.name" |
286 | :to="!item.href ? { name: item.name } : null" | 286 | :to="!item.href ? { name: item.name } : null" |
287 | :href="item.href" | 287 | :href="item.href" |
288 | > | 288 | > |
289 | <!-- <a :href="item.path"> --> | 289 | <!-- <a :href="item.path"> --> |
290 | <v-list-tile-action v-if="item.icon"> | 290 | <v-list-tile-action v-if="item.icon"> |
291 | <img :src="item.icon" width="22" alt="icons" /> | 291 | <img :src="item.icon" width="22" alt="icons" /> |
292 | </v-list-tile-action> | 292 | </v-list-tile-action> |
293 | <v-list-tile-content class="pt-2"> | 293 | <v-list-tile-content class="pt-2"> |
294 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 294 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
295 | </v-list-tile-content> | 295 | </v-list-tile-content> |
296 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 296 | <!-- <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-list-tile-action v-if="item.subAction"> | 297 | <v-list-tile-action v-if="item.subAction"> |
298 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 298 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
299 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 299 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
300 | </v-list-tile-action> | 300 | </v-list-tile-action> |
301 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 301 | <!-- <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 | <!-- </a> --> | 302 | <!-- </a> --> |
303 | </v-list-tile> | 303 | </v-list-tile> |
304 | </template> | 304 | </template> |
305 | <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'"> | 305 | <template v-for="(item, i) in menuSchool" v-if="schoolRole === 'SUPERADMIN'"> |
306 | <!-- {{menus}} --> | 306 | <!-- {{menus}} --> |
307 | <!--group with subitems--> | 307 | <!--group with subitems--> |
308 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 308 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
309 | <v-list-tile slot="activator" ripple="ripple"> | 309 | <v-list-tile slot="activator" ripple="ripple"> |
310 | <v-list-tile-action v-if="item.icon"> | 310 | <v-list-tile-action v-if="item.icon"> |
311 | <img :src="item.icon" width="22" alt="icons" /> | 311 | <img :src="item.icon" width="22" alt="icons" /> |
312 | </v-list-tile-action> | 312 | </v-list-tile-action> |
313 | <v-list-tile-content> | 313 | <v-list-tile-content> |
314 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 314 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
315 | </v-list-tile-content> | 315 | </v-list-tile-content> |
316 | </v-list-tile> | 316 | </v-list-tile> |
317 | <template v-for="(subItem, i) in item.items"> | 317 | <template v-for="(subItem, i) in item.items"> |
318 | <!--sub group--> | 318 | <!--sub group--> |
319 | <v-list-group | 319 | <v-list-group |
320 | v-if="subItem.items" | 320 | v-if="subItem.items" |
321 | :key="subItem.name" | 321 | :key="subItem.name" |
322 | :group="subItem.group" | 322 | :group="subItem.group" |
323 | sub-group="sub-group" | 323 | sub-group="sub-group" |
324 | > | 324 | > |
325 | <v-list-tile slot="activator" ripple="ripple"> | 325 | <v-list-tile slot="activator" ripple="ripple"> |
326 | <v-list-tile-content> | 326 | <v-list-tile-content> |
327 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 327 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
328 | </v-list-tile-content> | 328 | </v-list-tile-content> |
329 | </v-list-tile> | 329 | </v-list-tile> |
330 | <v-list-tile | 330 | <v-list-tile |
331 | v-for="(grand, i) in subItem.children" | 331 | v-for="(grand, i) in subItem.children" |
332 | :key="i" | 332 | :key="i" |
333 | :to="genChildTarget(item, grand)" | 333 | :to="genChildTarget(item, grand)" |
334 | :href="grand.href" | 334 | :href="grand.href" |
335 | ripple="ripple" | 335 | ripple="ripple" |
336 | > | 336 | > |
337 | <v-list-tile-content> | 337 | <v-list-tile-content> |
338 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 338 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
339 | </v-list-tile-content> | 339 | </v-list-tile-content> |
340 | </v-list-tile> | 340 | </v-list-tile> |
341 | </v-list-group> | 341 | </v-list-group> |
342 | <!--child item--> | 342 | <!--child item--> |
343 | <v-list-tile | 343 | <v-list-tile |
344 | v-else | 344 | v-else |
345 | :key="i" | 345 | :key="i" |
346 | :to="genChildTarget(item, subItem)" | 346 | :to="genChildTarget(item, subItem)" |
347 | :href="subItem.href" | 347 | :href="subItem.href" |
348 | :disabled="subItem.disabled" | 348 | :disabled="subItem.disabled" |
349 | :target="subItem.target" | 349 | :target="subItem.target" |
350 | ripple="ripple" | 350 | ripple="ripple" |
351 | > | 351 | > |
352 | <v-list-tile-action v-if="subItem.action"> | 352 | <v-list-tile-action v-if="subItem.action"> |
353 | <img | 353 | <img |
354 | width="30" | 354 | width="30" |
355 | :src="subItem.action" | 355 | :src="subItem.action" |
356 | :class="[subItem.actionClass || 'success--text']" | 356 | :class="[subItem.actionClass || 'success--text']" |
357 | /> | 357 | /> |
358 | </v-list-tile-action> | 358 | </v-list-tile-action> |
359 | <v-list-tile-content> | 359 | <v-list-tile-content> |
360 | <v-list-tile-title class="body-2"> | 360 | <v-list-tile-title class="body-2"> |
361 | <span>{{ subItem.title }}</span> | 361 | <span>{{ subItem.title }}</span> |
362 | </v-list-tile-title> | 362 | </v-list-tile-title> |
363 | </v-list-tile-content> | 363 | </v-list-tile-content> |
364 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 364 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
365 | </v-list-tile> | 365 | </v-list-tile> |
366 | </template> | 366 | </template> |
367 | </v-list-group> | 367 | </v-list-group> |
368 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 368 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
369 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 369 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
370 | <!--top-level link--> | 370 | <!--top-level link--> |
371 | <v-list-tile | 371 | <v-list-tile |
372 | v-else | 372 | v-else |
373 | ripple="ripple" | 373 | ripple="ripple" |
374 | :disabled="item.disabled" | 374 | :disabled="item.disabled" |
375 | :target="item.target" | 375 | :target="item.target" |
376 | rel="noopener" | 376 | rel="noopener" |
377 | :key="item.name" | 377 | :key="item.name" |
378 | :to="!item.href ? { name: item.name } : null" | 378 | :to="!item.href ? { name: item.name } : null" |
379 | :href="item.href" | 379 | :href="item.href" |
380 | > | 380 | > |
381 | <!-- <a :href="item.path"> --> | 381 | <!-- <a :href="item.path"> --> |
382 | <v-list-tile-action v-if="item.icon"> | 382 | <v-list-tile-action v-if="item.icon"> |
383 | <img :src="item.icon" width="22" alt="icons" /> | 383 | <img :src="item.icon" width="22" alt="icons" /> |
384 | </v-list-tile-action> | 384 | </v-list-tile-action> |
385 | <v-list-tile-content class="pt-2"> | 385 | <v-list-tile-content class="pt-2"> |
386 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 386 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
387 | </v-list-tile-content> | 387 | </v-list-tile-content> |
388 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 388 | <!-- <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-list-tile-action v-if="item.subAction"> | 389 | <v-list-tile-action v-if="item.subAction"> |
390 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 390 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
391 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 391 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
392 | </v-list-tile-action> | 392 | </v-list-tile-action> |
393 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 393 | <!-- <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 | <!-- </a> --> | 394 | <!-- </a> --> |
395 | </v-list-tile> | 395 | </v-list-tile> |
396 | </template> | 396 | </template> |
397 | <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'"> | 397 | <template v-for="(item, i) in menuTeacher" v-if="role === 'TEACHER'"> |
398 | <!-- {{menus}} --> | 398 | <!-- {{menus}} --> |
399 | <!--group with subitems--> | 399 | <!--group with subitems--> |
400 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | 400 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> |
401 | <v-list-tile slot="activator" ripple="ripple"> | 401 | <v-list-tile slot="activator" ripple="ripple"> |
402 | <v-list-tile-action v-if="item.icon"> | 402 | <v-list-tile-action v-if="item.icon"> |
403 | <img :src="item.icon" width="22" alt="icons" /> | 403 | <img :src="item.icon" width="22" alt="icons" /> |
404 | </v-list-tile-action> | 404 | </v-list-tile-action> |
405 | <v-list-tile-content> | 405 | <v-list-tile-content> |
406 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 406 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
407 | </v-list-tile-content> | 407 | </v-list-tile-content> |
408 | </v-list-tile> | 408 | </v-list-tile> |
409 | <template v-for="(subItem, i) in item.items"> | 409 | <template v-for="(subItem, i) in item.items"> |
410 | <!--sub group--> | 410 | <!--sub group--> |
411 | <v-list-group | 411 | <v-list-group |
412 | v-if="subItem.items" | 412 | v-if="subItem.items" |
413 | :key="subItem.name" | 413 | :key="subItem.name" |
414 | :group="subItem.group" | 414 | :group="subItem.group" |
415 | sub-group="sub-group" | 415 | sub-group="sub-group" |
416 | > | 416 | > |
417 | <v-list-tile slot="activator" ripple="ripple"> | 417 | <v-list-tile slot="activator" ripple="ripple"> |
418 | <v-list-tile-content> | 418 | <v-list-tile-content> |
419 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | 419 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> |
420 | </v-list-tile-content> | 420 | </v-list-tile-content> |
421 | </v-list-tile> | 421 | </v-list-tile> |
422 | <v-list-tile | 422 | <v-list-tile |
423 | v-for="(grand, i) in subItem.children" | 423 | v-for="(grand, i) in subItem.children" |
424 | :key="i" | 424 | :key="i" |
425 | :to="genChildTarget(item, grand)" | 425 | :to="genChildTarget(item, grand)" |
426 | :href="grand.href" | 426 | :href="grand.href" |
427 | ripple="ripple" | 427 | ripple="ripple" |
428 | > | 428 | > |
429 | <v-list-tile-content> | 429 | <v-list-tile-content> |
430 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | 430 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> |
431 | </v-list-tile-content> | 431 | </v-list-tile-content> |
432 | </v-list-tile> | 432 | </v-list-tile> |
433 | </v-list-group> | 433 | </v-list-group> |
434 | <!--child item--> | 434 | <!--child item--> |
435 | <v-list-tile | 435 | <v-list-tile |
436 | v-else | 436 | v-else |
437 | :key="i" | 437 | :key="i" |
438 | :to="genChildTarget(item, subItem)" | 438 | :to="genChildTarget(item, subItem)" |
439 | :href="subItem.href" | 439 | :href="subItem.href" |
440 | :disabled="subItem.disabled" | 440 | :disabled="subItem.disabled" |
441 | :target="subItem.target" | 441 | :target="subItem.target" |
442 | ripple="ripple" | 442 | ripple="ripple" |
443 | > | 443 | > |
444 | <v-list-tile-action v-if="subItem.action"> | 444 | <v-list-tile-action v-if="subItem.action"> |
445 | <img | 445 | <img |
446 | width="30" | 446 | width="30" |
447 | :src="subItem.action" | 447 | :src="subItem.action" |
448 | :class="[subItem.actionClass || 'success--text']" | 448 | :class="[subItem.actionClass || 'success--text']" |
449 | /> | 449 | /> |
450 | </v-list-tile-action> | 450 | </v-list-tile-action> |
451 | <v-list-tile-content> | 451 | <v-list-tile-content> |
452 | <v-list-tile-title class="body-2"> | 452 | <v-list-tile-title class="body-2"> |
453 | <span>{{ subItem.title }}</span> | 453 | <span>{{ subItem.title }}</span> |
454 | </v-list-tile-title> | 454 | </v-list-tile-title> |
455 | </v-list-tile-content> | 455 | </v-list-tile-content> |
456 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | 456 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> |
457 | </v-list-tile> | 457 | </v-list-tile> |
458 | </template> | 458 | </template> |
459 | </v-list-group> | 459 | </v-list-group> |
460 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | 460 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> |
461 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | 461 | <v-divider v-else-if="item.divider" :key="i"></v-divider> |
462 | <!--top-level link--> | 462 | <!--top-level link--> |
463 | <v-list-tile | 463 | <v-list-tile |
464 | v-else | 464 | v-else |
465 | ripple="ripple" | 465 | ripple="ripple" |
466 | :disabled="item.disabled" | 466 | :disabled="item.disabled" |
467 | :target="item.target" | 467 | :target="item.target" |
468 | rel="noopener" | 468 | rel="noopener" |
469 | :key="item.name" | 469 | :key="item.name" |
470 | :to="!item.href ? { name: item.name } : null" | 470 | :to="!item.href ? { name: item.name } : null" |
471 | :href="item.href" | 471 | :href="item.href" |
472 | > | 472 | > |
473 | <!-- <a :href="item.path"> --> | 473 | <!-- <a :href="item.path"> --> |
474 | <v-list-tile-action v-if="item.icon"> | 474 | <v-list-tile-action v-if="item.icon"> |
475 | <img :src="item.icon" width="22" alt="icons" /> | 475 | <img :src="item.icon" width="22" alt="icons" /> |
476 | </v-list-tile-action> | 476 | </v-list-tile-action> |
477 | <v-list-tile-content class="pt-2"> | 477 | <v-list-tile-content class="pt-2"> |
478 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 478 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
479 | </v-list-tile-content> | 479 | </v-list-tile-content> |
480 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | 480 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> |
481 | <v-list-tile-action v-if="item.subAction"> | 481 | <v-list-tile-action v-if="item.subAction"> |
482 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | 482 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> |
483 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | 483 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> |
484 | </v-list-tile-action> | 484 | </v-list-tile-action> |
485 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | 485 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> |
486 | <!-- </a> --> | 486 | <!-- </a> --> |
487 | </v-list-tile> | 487 | </v-list-tile> |
488 | </template> | 488 | </template> |
489 | <template v-for="(item, i) in menuParent" v-if="role === 'PARENT'"> | ||
490 | <!-- {{menus}} --> | ||
491 | <!--group with subitems--> | ||
492 | <v-list-group v-if="item.items" :key="item.name" :group="item.group" no-action="no-action"> | ||
493 | <v-list-tile slot="activator" ripple="ripple"> | ||
494 | <v-list-tile-action v-if="item.icon"> | ||
495 | <img :src="item.icon" width="22" alt="icons" /> | ||
496 | </v-list-tile-action> | ||
497 | <v-list-tile-content> | ||
498 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | ||
499 | </v-list-tile-content> | ||
500 | </v-list-tile> | ||
501 | <template v-for="(subItem, i) in item.items"> | ||
502 | <!--sub group--> | ||
503 | <v-list-group | ||
504 | v-if="subItem.items" | ||
505 | :key="subItem.name" | ||
506 | :group="subItem.group" | ||
507 | sub-group="sub-group" | ||
508 | > | ||
509 | <v-list-tile slot="activator" ripple="ripple"> | ||
510 | <v-list-tile-content> | ||
511 | <v-list-tile-title>{{ subItem.title }}</v-list-tile-title> | ||
512 | </v-list-tile-content> | ||
513 | </v-list-tile> | ||
514 | <v-list-tile | ||
515 | v-for="(grand, i) in subItem.children" | ||
516 | :key="i" | ||
517 | :to="genChildTarget(item, grand)" | ||
518 | :href="grand.href" | ||
519 | ripple="ripple" | ||
520 | > | ||
521 | <v-list-tile-content> | ||
522 | <v-list-tile-title>{{ grand.title }}</v-list-tile-title> | ||
523 | </v-list-tile-content> | ||
524 | </v-list-tile> | ||
525 | </v-list-group> | ||
526 | <!--child item--> | ||
527 | <v-list-tile | ||
528 | v-else | ||
529 | :key="i" | ||
530 | :to="genChildTarget(item, subItem)" | ||
531 | :href="subItem.href" | ||
532 | :disabled="subItem.disabled" | ||
533 | :target="subItem.target" | ||
534 | ripple="ripple" | ||
535 | > | ||
536 | <v-list-tile-action v-if="subItem.action"> | ||
537 | <img | ||
538 | width="30" | ||
539 | :src="subItem.action" | ||
540 | :class="[subItem.actionClass || 'success--text']" | ||
541 | /> | ||
542 | </v-list-tile-action> | ||
543 | <v-list-tile-content> | ||
544 | <v-list-tile-title class="body-2"> | ||
545 | <span>{{ subItem.title }}</span> | ||
546 | </v-list-tile-title> | ||
547 | </v-list-tile-content> | ||
548 | <!-- <v-circle class="white--text pa-0 circle-pill" v-if="subItem.badge" color="red" disabled="disabled">{{ subItem.badge }}</v-circle> --> | ||
549 | </v-list-tile> | ||
550 | </template> | ||
551 | </v-list-group> | ||
552 | <v-subheader v-else-if="item.header" :key="i">{{ item.header }}</v-subheader> | ||
553 | <v-divider v-else-if="item.divider" :key="i"></v-divider> | ||
554 | <!--top-level link--> | ||
555 | <v-list-tile | ||
556 | v-else | ||
557 | ripple="ripple" | ||
558 | :disabled="item.disabled" | ||
559 | :target="item.target" | ||
560 | rel="noopener" | ||
561 | :key="item.name" | ||
562 | :to="!item.href ? { name: item.name } : null" | ||
563 | :href="item.href" | ||
564 | > | ||
565 | <!-- <a :href="item.path"> --> | ||
566 | <v-list-tile-action v-if="item.icon"> | ||
567 | <img :src="item.icon" width="22" alt="icons" /> | ||
568 | </v-list-tile-action> | ||
569 | <v-list-tile-content class="pt-2"> | ||
570 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | ||
571 | </v-list-tile-content> | ||
572 | <!-- <v-circle class="white--text pa-0 chip--x-small" v-if="item.badge" :color="item.color || 'primary'" disabled="disabled">{{ item.badge }}</v-circle> --> | ||
573 | <v-list-tile-action v-if="item.subAction"> | ||
574 | <!-- <v-icon class="success--text">{{ item.subAction }}</v-icon> --> | ||
575 | <!-- <img :src="item.icon" width="40" alt="icons" /> --> | ||
576 | </v-list-tile-action> | ||
577 | <!-- <v-circle class="caption blue lighten-2 white--text mx-0" v-else-if="item.chip" label="label" small="small">{{ item.chip }}</v-circle> --> | ||
578 | <!-- </a> --> | ||
579 | </v-list-tile> | ||
580 | </template> | ||
489 | </v-list> | 581 | </v-list> |
490 | <!-- </vue-perfect-scrollbar> --> | 582 | <!-- </vue-perfect-scrollbar> --> |
491 | </v-navigation-drawer> | 583 | </v-navigation-drawer> |
492 | </template> | 584 | </template> |
493 | <script> | 585 | <script> |
494 | import menu from "@/api/menu"; | 586 | import menu from "@/api/menu"; |
495 | import VuePerfectScrollbar from "vue-perfect-scrollbar"; | 587 | import VuePerfectScrollbar from "vue-perfect-scrollbar"; |
496 | export default { | 588 | export default { |
497 | name: "app-drawer", | 589 | name: "app-drawer", |
498 | components: { | 590 | components: { |
499 | VuePerfectScrollbar | 591 | VuePerfectScrollbar |
500 | }, | 592 | }, |
501 | props: { | 593 | props: { |
502 | expanded: { | 594 | expanded: { |
503 | type: Boolean, | 595 | type: Boolean, |
504 | default: true | 596 | default: true |
505 | } | 597 | } |
506 | }, | 598 | }, |
507 | data: () => ({ | 599 | data: () => ({ |
508 | mini: false, | 600 | mini: false, |
509 | drawer: true, | 601 | drawer: true, |
510 | menus: [], | 602 | menus: [], |
511 | menuSchool: [], | 603 | menuSchool: [], |
512 | menuTeacher: [], | 604 | menuTeacher: [], |
513 | menuAccount: [], | 605 | menuAccount: [], |
514 | menuLibrarian: [], | 606 | menuLibrarian: [], |
607 | menuParent: [], | ||
515 | schoolRole: "", | 608 | schoolRole: "", |
516 | role: "", | 609 | role: "", |
517 | scrollSettings: { | 610 | scrollSettings: { |
518 | maxScrollbarLength: 160 | 611 | maxScrollbarLength: 160 |
519 | } | 612 | } |
520 | }), | 613 | }), |
521 | computed: { | 614 | computed: { |
522 | computeGroupActive() { | 615 | computeGroupActive() { |
523 | return true; | 616 | return true; |
524 | }, | 617 | }, |
525 | computeLogo() { | 618 | computeLogo() { |
526 | return "/static/icon.png"; | 619 | return "/static/icon.png"; |
527 | }, | 620 | }, |
528 | 621 | ||
529 | sideToolbarColor() { | 622 | sideToolbarColor() { |
530 | return this.$vuetify.options.extra.sideNav; | 623 | return this.$vuetify.options.extra.sideNav; |
531 | } | 624 | } |
532 | }, | 625 | }, |
533 | created() { | 626 | created() { |
534 | this.schoolRole = this.$store.state.schoolRole; | 627 | this.schoolRole = this.$store.state.schoolRole; |
535 | this.role = this.$store.state.role; | 628 | this.role = this.$store.state.role; |
536 | this.menus = menu.adminMenu; | 629 | this.menus = menu.adminMenu; |
537 | this.menuSchool = menu.schoolMenu; | 630 | this.menuSchool = menu.schoolMenu; |
538 | this.menuTeacher = menu.teacherMenu; | 631 | this.menuTeacher = menu.teacherMenu; |
539 | this.menuAccount = menu.accountMenu; | 632 | this.menuAccount = menu.accountMenu; |
540 | this.menuLibrarian = menu.libraryMenu; | 633 | this.menuLibrarian = menu.libraryMenu; |
634 | this.menuParent = menu.parentMenu; | ||
541 | // console.log("this.$route.name", this.$route.name); | 635 | // console.log("this.$route.name", this.$route.name); |
542 | // if (this.$route.name === "School") { | 636 | // if (this.$route.name === "School") { |
543 | // localStorage.setItem("SchoolName", this.$route.name); | 637 | // localStorage.setItem("SchoolName", this.$route.name); |
544 | // } | 638 | // } |
545 | // if (this.$route.name === "Dashboard") { | 639 | // if (this.$route.name === "Dashboard") { |
546 | // localStorage.setItem("AdminName", this.$route.name); | 640 | // localStorage.setItem("AdminName", this.$route.name); |
547 | // } | 641 | // } |
548 | // console.log("SN", localStorage.getItem("SchoolName")); | 642 | // console.log("SN", localStorage.getItem("SchoolName")); |
549 | // if (localStorage.getItem("SchoolName") === "School") { | 643 | // if (localStorage.getItem("SchoolName") === "School") { |
550 | // if (this.$store.state.schoolRole === "SUPERADMIN") { | 644 | // if (this.$store.state.schoolRole === "SUPERADMIN") { |
551 | // console.log("rolA", this.$store.state.schoolRole); | 645 | // console.log("rolA", this.$store.state.schoolRole); |
552 | // if (this.$store.state.schoolRole === "SUPERADMIN") { | 646 | // if (this.$store.state.schoolRole === "SUPERADMIN") { |
553 | // } | 647 | // } |
554 | // console.log("this.menus", this.menus); | 648 | // console.log("this.menus", this.menus); |
555 | // } | 649 | // } |
556 | // // } | 650 | // // } |
557 | // // console.log("AN", localStorage.getItem("AdminName")); | 651 | // // console.log("AN", localStorage.getItem("AdminName")); |
558 | // // if (localStorage.getItem("AdminName") === "Dashboard") { | 652 | // // if (localStorage.getItem("AdminName") === "Dashboard") { |
559 | // if (this.$store.state.role === "ADMIN") { | 653 | // if (this.$store.state.role === "ADMIN") { |
560 | // console.log("role", this.$store.state.role); | 654 | // console.log("role", this.$store.state.role); |
561 | // else if (this.$store.state.role === "ADMIN") { | 655 | // else if (this.$store.state.role === "ADMIN") { |
562 | // } | 656 | // } |
563 | // // } | 657 | // // } |
564 | // } | 658 | // } |
565 | 659 | ||
566 | // else if (this.$store.state.role === "LIBRARIAN") { | 660 | // else if (this.$store.state.role === "LIBRARIAN") { |
567 | // this.menus = menu.libraryMenu; | 661 | // this.menus = menu.libraryMenu; |
568 | // } else if (this.$store.state.role === "ACCOUNTANT") { | 662 | // } else if (this.$store.state.role === "ACCOUNTANT") { |
569 | // this.menus = menu.accountMenu; | 663 | // this.menus = menu.accountMenu; |
570 | // } | 664 | // } |
571 | window.getApp.$on("APP_DRAWER_TOGGLED", () => { | 665 | window.getApp.$on("APP_DRAWER_TOGGLED", () => { |
572 | this.drawer = !this.drawer; | 666 | this.drawer = !this.drawer; |
573 | }); | 667 | }); |
574 | }, | 668 | }, |
575 | methods: { | 669 | methods: { |
576 | genChildTarget(item, subItem) { | 670 | genChildTarget(item, subItem) { |
577 | if (subItem.href) return; | 671 | if (subItem.href) return; |
578 | if (subItem.component) { | 672 | if (subItem.component) { |
579 | return { | 673 | return { |
580 | name: subItem.component | 674 | name: subItem.component |
581 | }; | 675 | }; |
582 | } | 676 | } |
583 | return { name: `${item.group}/${subItem.name}` }; | 677 | return { name: `${item.group}/${subItem.name}` }; |
584 | } | 678 | } |
585 | }, | 679 | }, |
586 | mounted() { | 680 | mounted() { |
587 | if (this.$store.state.role === "ADMIN") { | 681 | if (this.$store.state.role === "ADMIN") { |
588 | this.token = this.$store.state.token; | 682 | this.token = this.$store.state.token; |
589 | } | 683 | } |
590 | if (this.$store.state.schoolRole === "SUPERADMIN") { | 684 | if (this.$store.state.schoolRole === "SUPERADMIN") { |
591 | this.token = this.$store.schoolToken; | 685 | this.token = this.$store.schoolToken; |
592 | } | 686 | } |
593 | if (this.$store.state.role === "TEACHER") { | 687 | if (this.$store.state.role === "TEACHER") { |
594 | this.token = this.$store.state.token; | 688 | this.token = this.$store.state.token; |
595 | } | 689 | } |
596 | if (this.$store.state.role === "ACCOUNTANT") { | 690 | if (this.$store.state.role === "ACCOUNTANT") { |
597 | this.token = this.$store.state.token; | 691 | this.token = this.$store.state.token; |
598 | } | 692 | } |
599 | if (this.$store.state.role === "LIBRARIAN") { | 693 | if (this.$store.state.role === "LIBRARIAN") { |
600 | this.token = this.$store.state.token; | 694 | this.token = this.$store.state.token; |
601 | } | 695 | } |
696 | if (this.$store.state.role === "PARENT") { | ||
697 | this.token = this.$store.state.token; | ||
698 | } | ||
602 | } | 699 | } |
603 | }; | 700 | }; |
604 | </script> | 701 | </script> |
605 | 702 | ||
606 | 703 | ||
607 | <style lang="stylus"> | 704 | <style lang="stylus"> |
608 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; | 705 | // @import '../../node_modules/vuetify/src/stylus/settings/_elevations.styl'; |
609 | #appDrawer { | 706 | #appDrawer { |
610 | overflow: hidden; | 707 | overflow: hidden; |
611 | 708 | ||
612 | .drawer-menu--scroll { | 709 | .drawer-menu--scroll { |
613 | height: calc(100vh - 48px); | 710 | height: calc(100vh - 48px); |
614 | overflow: auto; | 711 | overflow: auto; |
615 | } | 712 | } |
616 | } | 713 | } |
617 | 714 | ||
618 | .v-list__group__items--no-action .v-list__tile { | 715 | .v-list__group__items--no-action .v-list__tile { |
619 | padding-left: 72px !important; | 716 | padding-left: 72px !important; |
620 | } | 717 | } |
621 | 718 | ||
622 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 719 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
623 | height: 54px; | 720 | height: 54px; |
624 | font-size: 17px; | 721 | font-size: 17px; |
625 | } | 722 | } |
626 | 723 | ||
627 | .v-list__tile__action { | 724 | .v-list__tile__action { |
628 | min-width: 36px; | 725 | min-width: 36px; |
629 | } | 726 | } |
630 | 727 | ||
631 | // .theme--light .v-icon, .application .theme--light.v-icon { | 728 | // .theme--light .v-icon, .application .theme--light.v-icon { |
632 | // color: #f1f1f1; | 729 | // color: #f1f1f1; |
633 | // } | 730 | // } |
634 | .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y { | 731 | .ps>.ps__scrollbar-y-rail>.ps__scrollbar-y { |
635 | background-color: #f5f5f5; | 732 | background-color: #f5f5f5; |
636 | 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))); | 733 | 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))); |
637 | width: 8px !important; | 734 | width: 8px !important; |
638 | } | 735 | } |
639 | 736 | ||
640 | .ps>.ps__scrollbar-y-rail { | 737 | .ps>.ps__scrollbar-y-rail { |
641 | width: 0px !important; | 738 | width: 0px !important; |
642 | } | 739 | } |
643 | 740 | ||
644 | .ps:hover > .ps__scrollbar-y-rail:hover { | 741 | .ps:hover > .ps__scrollbar-y-rail:hover { |
645 | background-color: #5f2171 !important; | 742 | background-color: #5f2171 !important; |
646 | opacity: 0.9; | 743 | opacity: 0.9; |
647 | } | 744 | } |
648 | 745 | ||
649 | .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { | 746 | .ps > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { |
650 | width: 8px !important; | 747 | width: 8px !important; |
651 | background-color: #f5f5f5; | 748 | background-color: #f5f5f5; |
652 | 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))); | 749 | 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))); |
653 | } | 750 | } |
654 | 751 | ||
655 | .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { | 752 | .ps:hover > .ps__scrollbar-y-rail:hover > .ps__scrollbar-y { |
656 | // background-color: #5f2171 !important; | 753 | // background-color: #5f2171 !important; |
657 | width: 8px !important; | 754 | width: 8px !important; |
658 | background-color: #f5f5f5; | 755 | background-color: #f5f5f5; |
659 | 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))); | 756 | 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))); |
660 | } | 757 | } |
661 | 758 | ||
662 | .v-list__tile--active { | 759 | .v-list__tile--active { |
663 | color: #71d9ea !important; | 760 | color: #71d9ea !important; |
664 | } | 761 | } |
665 | 762 | ||
666 | .my-1 { | 763 | .my-1 { |
667 | text-align: left !important; | 764 | text-align: left !important; |
668 | } | 765 | } |
669 | 766 | ||
670 | .title { | 767 | .title { |
671 | line-height: 2 !important; | 768 | line-height: 2 !important; |
672 | } | 769 | } |
673 | 770 | ||
674 | // .v-list__tile--hover { | 771 | // .v-list__tile--hover { |
675 | // color: white !important; | 772 | // color: white !important; |
676 | // background: red !important; | 773 | // background: red !important; |
677 | // } | 774 | // } |
678 | .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 { | 775 | .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 { |
679 | background: #7f62f8 !important; | 776 | background: #7f62f8 !important; |
680 | color: #71d9ea !important; | 777 | color: #71d9ea !important; |
681 | 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; | 778 | 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; |
682 | // border-radius: 12px !important; | 779 | // border-radius: 12px !important; |
683 | } | 780 | } |
684 | 781 | ||
685 | @media screen and (max-width: 420px) { | 782 | @media screen and (max-width: 420px) { |
686 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { | 783 | .v-list--dense .v-list__tile:not(.v-list__tile--avatar) { |
687 | font-size: 14px; | 784 | font-size: 14px; |
688 | } | 785 | } |
689 | 786 | ||
690 | .imgLogo { | 787 | .imgLogo { |
691 | height: 32px; | 788 | height: 32px; |
692 | width: 120px; | 789 | width: 120px; |
693 | } | 790 | } |
694 | } | 791 | } |
695 | </style> | 792 | </style> |
696 | 793 | ||
697 | 794 | ||
698 | <style scoped> | 795 | <style scoped> |
699 | .theme--light .v-icon, | 796 | .theme--light .v-icon, |
700 | .application .theme--light.v-icon { | 797 | .application .theme--light.v-icon { |
701 | color: #39b982; | 798 | color: #39b982; |
702 | } | 799 | } |
703 | .side-bar-color { | 800 | .side-bar-color { |
704 | background: #827bfa !important; | 801 | background: #827bfa !important; |
705 | /* border-top-right-radius: 74px !important; */ | 802 | /* border-top-right-radius: 74px !important; */ |
706 | } | 803 | } |
707 | .v-navigation-drawer--fixed { | 804 | .v-navigation-drawer--fixed { |
708 | position: absolute !important; | 805 | position: absolute !important; |
709 | 806 | ||
710 | min-height: calc(2000px - 64px - 50px - 81px) !important; | 807 | min-height: calc(2000px - 64px - 50px - 81px) !important; |
711 | /* max-height: inherit !important; */ | 808 | /* max-height: inherit !important; */ |
712 | } | 809 | } |
713 | .hover:hover { | 810 | .hover:hover { |
714 | color: red !important; | 811 | color: red !important; |
715 | background: red !important; | 812 | background: red !important; |
716 | } | 813 | } |
717 | </style> | 814 | </style> |
718 | 815 | ||
719 | 816 | ||
720 | 817 |
src/components/pageHeader/AppToolbar.vue
1 | <template> | 1 | <template> |
2 | <v-toolbar flat class="white pt-2" fixed app> | 2 | <v-toolbar flat class="white pt-2" fixed app> |
3 | <v-toolbar-title> | 3 | <v-toolbar-title> |
4 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon> | 4 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide darkBlue-color"></v-toolbar-side-icon> |
5 | </v-toolbar-title> | 5 | </v-toolbar-title> |
6 | <!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> | 6 | <!-- ****** SEARCH ALL EXISTING STUDENTS ****** --> |
7 | <v-flex xs12 class="white"> | 7 | <v-flex xs12 class="white"> |
8 | <!-- <v-text-field | 8 | <!-- <v-text-field |
9 | flat | 9 | flat |
10 | append-icon="search" | 10 | append-icon="search" |
11 | label="Seacrh" | 11 | label="Seacrh" |
12 | class="pl-3" | 12 | class="pl-3" |
13 | color="white" | 13 | color="white" |
14 | @input.native="emitSearch" | 14 | @input.native="emitSearch" |
15 | type="text" | 15 | type="text" |
16 | dark | 16 | dark |
17 | ></v-text-field>--> | 17 | ></v-text-field>--> |
18 | <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title> | 18 | <v-toolbar-title class="header-route-name pl-2">{{ $route.name }}</v-toolbar-title> |
19 | </v-flex> | 19 | </v-flex> |
20 | <v-spacer></v-spacer> | 20 | <v-spacer></v-spacer> |
21 | <v-btn type="button" @click="goToSchool" v-if="adminRole && SchoolRole">Towards School!</v-btn> | 21 | <v-btn type="button" @click="goToSchool" v-if="adminRole && SchoolRole">Towards School!</v-btn> |
22 | <v-toolbar-items class="hidden-sm-and-down"> | 22 | <!-- <v-toolbar-items class="hidden-sm-and-down"> |
23 | <v-icon class="header-icon">notifications_none</v-icon> | 23 | <v-icon class="header-icon">notifications_none</v-icon> |
24 | </v-toolbar-items> | 24 | </v-toolbar-items>--> |
25 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | 25 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> |
26 | <v-btn icon large flat slot="activator"> | 26 | <v-btn icon large flat slot="activator"> |
27 | <v-avatar size="26"> | 27 | <v-avatar size="26"> |
28 | <img src="/static/icon/setting1.png" alt="icon" /> | 28 | <img src="/static/icon/setting1.png" alt="icon" /> |
29 | </v-avatar> | 29 | </v-avatar> |
30 | </v-btn> | 30 | </v-btn> |
31 | <v-list class="pa-0"> | 31 | <v-list class="pa-0"> |
32 | <v-list-tile | 32 | <v-list-tile |
33 | v-for="(item,index) in items" | 33 | v-for="(item,index) in items" |
34 | :to="!item.href ? { name: item.name } : null" | 34 | :to="!item.href ? { name: item.name } : null" |
35 | :href="item.href" | 35 | :href="item.href" |
36 | @click="item.click" | 36 | @click="item.click" |
37 | ripple="ripple" | 37 | ripple="ripple" |
38 | :disabled="item.disabled" | 38 | :disabled="item.disabled" |
39 | :target="item.target" | 39 | :target="item.target" |
40 | rel="noopener" | 40 | rel="noopener" |
41 | :key="index" | 41 | :key="index" |
42 | > | 42 | > |
43 | <v-list-tile-action v-if="item.icon"> | 43 | <v-list-tile-action v-if="item.icon"> |
44 | <v-icon class="iconSize">{{ item.icon }}</v-icon> | 44 | <v-icon class="iconSize">{{ item.icon }}</v-icon> |
45 | </v-list-tile-action> | 45 | </v-list-tile-action> |
46 | <v-list-tile-content> | 46 | <v-list-tile-content> |
47 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | 47 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> |
48 | </v-list-tile-content> | 48 | </v-list-tile-content> |
49 | </v-list-tile> | 49 | </v-list-tile> |
50 | </v-list> | 50 | </v-list> |
51 | </v-menu> | 51 | </v-menu> |
52 | </v-toolbar> | 52 | </v-toolbar> |
53 | </template> | 53 | </template> |
54 | <script> | 54 | <script> |
55 | import http from "@/Services/http.js"; | 55 | import http from "@/Services/http.js"; |
56 | 56 | ||
57 | export default { | 57 | export default { |
58 | name: "app-toolbar", | 58 | name: "app-toolbar", |
59 | data: () => ({ | 59 | data: () => ({ |
60 | userName: "", | 60 | userName: "", |
61 | search: "", | 61 | search: "", |
62 | userData: {}, | 62 | userData: {}, |
63 | items: [ | 63 | items: [ |
64 | { | 64 | { |
65 | icon: "account_circle", | 65 | icon: "account_circle", |
66 | href: "/resetPassword", | 66 | href: "/resetPassword", |
67 | title: "Change Password", | 67 | title: "Change Password", |
68 | click: e => { | 68 | click: e => { |
69 | console.log(e); | 69 | console.log(e); |
70 | } | 70 | } |
71 | }, | 71 | }, |
72 | // { | 72 | // { |
73 | // icon: 'settings', | 73 | // icon: 'settings', |
74 | // href: '#', | 74 | // href: '#', |
75 | // title: 'Settings', | 75 | // title: 'Settings', |
76 | // click: (e) => { | 76 | // click: (e) => { |
77 | // console.log(e); | 77 | // console.log(e); |
78 | // } | 78 | // } |
79 | // }, | 79 | // }, |
80 | { | 80 | { |
81 | icon: "lock", | 81 | icon: "lock", |
82 | href: "#", | 82 | href: "#", |
83 | title: "Logout", | 83 | title: "Logout", |
84 | click: e => { | 84 | click: e => { |
85 | window.getApp.$emit("APP_LOGOUT"); | 85 | window.getApp.$emit("APP_LOGOUT"); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | ], | 88 | ], |
89 | adminRole: "", | 89 | adminRole: "", |
90 | SchoolRole: "" | 90 | SchoolRole: "" |
91 | }), | 91 | }), |
92 | computed: { | 92 | computed: { |
93 | toolbarColor() { | 93 | toolbarColor() { |
94 | return this.$vuetify.options.extra.mainNav; | 94 | return this.$vuetify.options.extra.mainNav; |
95 | } | 95 | } |
96 | }, | 96 | }, |
97 | mounted() { | 97 | mounted() { |
98 | // this.getUserData(); | 98 | // this.getUserData(); |
99 | this.adminRole = this.$store.state.role; | 99 | this.adminRole = this.$store.state.role; |
100 | if (this.adminRole == "PARENT") { | ||
101 | var obj = {}; | ||
102 | obj = { | ||
103 | icon: "face", | ||
104 | href: "/changeStudents", | ||
105 | title: "Change Student", | ||
106 | click: e => { | ||
107 | console.log(e); | ||
108 | } | ||
109 | }; | ||
110 | this.items.push(obj); | ||
111 | } | ||
100 | // console.log("this.adminRole", this.adminRole); | 112 | // console.log("this.adminRole", this.adminRole); |
101 | this.SchoolRole = this.$store.state.schoolRole; | 113 | this.SchoolRole = this.$store.state.schoolRole; |
102 | }, | 114 | }, |
103 | methods: { | 115 | methods: { |
104 | // emitSearch(ev) { | 116 | // emitSearch(ev) { |
105 | // this.$root.$emit("app:search", ev.target.value); | 117 | // this.$root.$emit("app:search", ev.target.value); |
106 | // }, | 118 | // }, |
107 | handleDrawerToggle() { | 119 | handleDrawerToggle() { |
108 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | 120 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
109 | }, | 121 | }, |
110 | handleFullScreen() { | 122 | handleFullScreen() { |
111 | Util.toggleFullScreen(); | 123 | Util.toggleFullScreen(); |
112 | }, | 124 | }, |
113 | getUserData() { | 125 | getUserData() { |
114 | http() | 126 | http() |
115 | .get("/getParticularUserDetail", { | 127 | .get("/getParticularUserDetail", { |
116 | // headers: { | 128 | // headers: { |
117 | // Authorization: "Bearer " + this.$store.state.token | 129 | // Authorization: "Bearer " + this.$store.state.token |
118 | // } | 130 | // } |
119 | }) | 131 | }) |
120 | .then(response => { | 132 | .then(response => { |
121 | this.userData = response.data.data; | 133 | this.userData = response.data.data; |
122 | }) | 134 | }) |
123 | .catch(error => { | 135 | .catch(error => { |
124 | // if (error.response.status === 401) { | 136 | // if (error.response.status === 401) { |
125 | // this.$router.replace({ path: "/" }); | 137 | // this.$router.replace({ path: "/" }); |
126 | // this.$store.dispatch("setToken", null); | 138 | // this.$store.dispatch("setToken", null); |
127 | // this.$store.dispatch("Id", null); | 139 | // this.$store.dispatch("Id", null); |
128 | // } | 140 | // } |
129 | }); | 141 | }); |
130 | }, | 142 | }, |
131 | goToSchool() { | 143 | goToSchool() { |
132 | console.log("click"); | 144 | console.log("click"); |
133 | if (this.$store.state.role === "ADMIN") { | 145 | if (this.$store.state.role === "ADMIN") { |
134 | this.$store.dispatch("Role", null); | 146 | this.$store.dispatch("Role", null); |
135 | this.$store.dispatch("setToken", null); | 147 | this.$store.dispatch("setToken", null); |
136 | this.$router.push("/schooldashboard"); | 148 | this.$router.push("/schooldashboard"); |
137 | setTimeout(() => { | 149 | setTimeout(() => { |
138 | location.reload(); | 150 | location.reload(); |
139 | }, 1000); | 151 | }, 1000); |
140 | } | 152 | } |
141 | } | 153 | } |
142 | } | 154 | } |
143 | }; | 155 | }; |
144 | </script> | 156 | </script> |
145 | <style> | 157 | <style> |
146 | .v-icon { | 158 | .v-icon { |
147 | font-size: 30px; | 159 | font-size: 30px; |
148 | } | 160 | } |
149 | .fixcolors { | 161 | .fixcolors { |
150 | background: #444b54 !important; | 162 | background: #444b54 !important; |
151 | } | 163 | } |
152 | 164 | ||
153 | @media screen and (min-width: 1270px) { | 165 | @media screen and (min-width: 1270px) { |
154 | .hide { | 166 | .hide { |
155 | display: none; | 167 | display: none; |
156 | } | 168 | } |
157 | /* } | 169 | /* } |
158 | @media screen and (max-width: 962px) { | 170 | @media screen and (max-width: 962px) { |
159 | .imglogo{ | 171 | .imglogo{ |
160 | position: absolute; | 172 | position: absolute; |
161 | top: 13px; | 173 | top: 13px; |
162 | left: 13px !important; | 174 | left: 13px !important; |
163 | width: 70px; | 175 | width: 70px; |
164 | height: 24px; | 176 | height: 24px; |
165 | } */ | 177 | } */ |
166 | } | 178 | } |
167 | @media screen and (max-width: 420px) { | 179 | @media screen and (max-width: 420px) { |
168 | .v-list__tile { | 180 | .v-list__tile { |
169 | font-size: 14px; | 181 | font-size: 14px; |
170 | padding: 0 10px; | 182 | padding: 0 10px; |
171 | } | 183 | } |
172 | .name { | 184 | .name { |
173 | font-size: 15px; | 185 | font-size: 15px; |
174 | } | 186 | } |
175 | } | 187 | } |
176 | </style> | 188 | </style> |
177 | 189 |
src/event.js
1 | export default [{ | 1 | export default [{ |
2 | name: 'APP_LOGIN_SUCCESS', | 2 | name: 'APP_LOGIN_SUCCESS', |
3 | callback: function(e) { | 3 | callback: function(e) { |
4 | this.$router.push({ path: 'dashboard' }); | 4 | this.$router.push({ path: 'dashboard' }); |
5 | } | 5 | } |
6 | }, | 6 | }, |
7 | { | 7 | { |
8 | name: 'APP_LOGOUT', | 8 | name: 'APP_LOGOUT', |
9 | callback: function(e) { | 9 | callback: function(e) { |
10 | this.snackbar = { | 10 | this.snackbar = { |
11 | show: true, | 11 | show: true, |
12 | color: 'green', | 12 | color: 'green', |
13 | text: 'Logout successfully.' | 13 | text: 'Logout successfully.' |
14 | }; | 14 | }; |
15 | // console.log("roteeeeeeeeeeeeeee", this.$store.state.isUserLoggedIn) | 15 | // console.log("roteeeeeeeeeeeeeee", this.$store.state.isUserLoggedIn) |
16 | if (this.$store.state.role === "ADMIN") { | 16 | if (this.$store.state.role === "ADMIN") { |
17 | this.$store.dispatch('setToken', null) | 17 | this.$store.dispatch('setToken', null) |
18 | this.$store.dispatch('Id', null) | 18 | this.$store.dispatch('Id', null) |
19 | this.$store.dispatch('Role', null) | 19 | this.$store.dispatch('Role', null) |
20 | this.$store.dispatch('setSchoolToken', null) | 20 | this.$store.dispatch('setSchoolToken', null) |
21 | this.$store.dispatch('setSchoolRole', null) | 21 | this.$store.dispatch('setSchoolRole', null) |
22 | this.$router.replace({ path: '/' }); | 22 | this.$router.replace({ path: '/' }); |
23 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { | 23 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { |
24 | this.$store.dispatch('setSchoolToken', null) | 24 | this.$store.dispatch('setSchoolToken', null) |
25 | this.$store.dispatch('setSchoolRole', null) | 25 | this.$store.dispatch('setSchoolRole', null) |
26 | this.$router.replace({ path: '/' }); | 26 | this.$router.replace({ path: '/' }); |
27 | } else if (this.$store.state.role === "TEACHER") { | 27 | } else if (this.$store.state.role === "TEACHER") { |
28 | this.$store.dispatch('setToken', null) | 28 | this.$store.dispatch('setToken', null) |
29 | this.$store.dispatch('Id', null) | 29 | this.$store.dispatch('Id', null) |
30 | this.$store.dispatch('Role', null) | 30 | this.$store.dispatch('Role', null) |
31 | this.$store.dispatch('setSchoolToken', null) | 31 | this.$store.dispatch('setSchoolToken', null) |
32 | this.$store.dispatch('setSchoolRole', null) | 32 | this.$store.dispatch('setSchoolRole', null) |
33 | this.$router.replace({ path: '/' }); | 33 | this.$router.replace({ path: '/' }); |
34 | } else if (this.$store.state.role === "ACCOUNTANT") { | 34 | } else if (this.$store.state.role === "ACCOUNTANT") { |
35 | this.$store.dispatch('setToken', null) | 35 | this.$store.dispatch('setToken', null) |
36 | this.$store.dispatch('Id', null) | 36 | this.$store.dispatch('Id', null) |
37 | this.$store.dispatch('Role', null) | 37 | this.$store.dispatch('Role', null) |
38 | this.$store.dispatch('setSchoolToken', null) | 38 | this.$store.dispatch('setSchoolToken', null) |
39 | this.$store.dispatch('setSchoolRole', null) | 39 | this.$store.dispatch('setSchoolRole', null) |
40 | this.$router.replace({ path: '/' }); | 40 | this.$router.replace({ path: '/' }); |
41 | } else if (this.$store.state.role === "LIBRARIAN") { | 41 | } else if (this.$store.state.role === "LIBRARIAN") { |
42 | this.$store.dispatch('setToken', null) | 42 | this.$store.dispatch('setToken', null) |
43 | this.$store.dispatch('Id', null) | 43 | this.$store.dispatch('Id', null) |
44 | this.$store.dispatch('Role', null) | 44 | this.$store.dispatch('Role', null) |
45 | this.$store.dispatch('setSchoolToken', null) | 45 | this.$store.dispatch('setSchoolToken', null) |
46 | this.$store.dispatch('setSchoolRole', null) | 46 | this.$store.dispatch('setSchoolRole', null) |
47 | this.$router.replace({ path: '/' }); | 47 | this.$router.replace({ path: '/' }); |
48 | } else if (this.$store.state.role === "PARENT") { | ||
49 | this.$store.dispatch('setToken', null) | ||
50 | this.$store.dispatch('Id', null) | ||
51 | this.$store.dispatch('Role', null) | ||
52 | this.$store.dispatch('setSchoolToken', null) | ||
53 | this.$store.dispatch('setSchoolRole', null) | ||
54 | this.$router.replace({ path: '/' }); | ||
48 | } | 55 | } |
49 | } | 56 | } |
50 | }, | 57 | }, |
51 | { | 58 | { |
52 | name: 'APP_CHANGE', | 59 | name: 'APP_CHANGE', |
53 | callback: function(e) { | 60 | callback: function(e) { |
54 | this.snackbar = { | 61 | this.snackbar = { |
55 | show: true, | 62 | show: true, |
56 | color: 'green', | 63 | color: 'green', |
57 | text: 'Logout successfully.' | 64 | text: 'Logout successfully.' |
58 | }; | 65 | }; |
59 | this.$router.replace({ | 66 | this.$router.replace({ |
60 | path: '/' | 67 | path: '/' |
61 | }); | 68 | }); |
62 | } | 69 | } |
63 | }, | 70 | }, |
64 | { | 71 | { |
65 | name: 'APP_PAGE_LOADED', | 72 | name: 'APP_PAGE_LOADED', |
66 | callback: function(e) {} | 73 | callback: function(e) {} |
67 | }, | 74 | }, |
68 | { | 75 | { |
69 | name: 'APP_AUTH_FAILED', | 76 | name: 'APP_AUTH_FAILED', |
70 | callback: function(e) { | 77 | callback: function(e) { |
71 | this.$router.push('/login'); | 78 | this.$router.push('/login'); |
72 | this.$message.error('Token has expired'); | 79 | this.$message.error('Token has expired'); |
73 | } | 80 | } |
74 | }, | 81 | }, |
75 | { | 82 | { |
76 | name: 'APP_BAD_REQUEST', | 83 | name: 'APP_BAD_REQUEST', |
77 | // @error api response data | 84 | // @error api response data |
78 | callback: function(msg) { | 85 | callback: function(msg) { |
79 | this.$message.error(msg); | 86 | this.$message.error(msg); |
80 | } | 87 | } |
81 | }, | 88 | }, |
82 | { | 89 | { |
83 | name: 'APP_ACCESS_DENIED', | 90 | name: 'APP_ACCESS_DENIED', |
84 | // @error api response data | 91 | // @error api response data |
85 | callback: function(msg) { | 92 | callback: function(msg) { |
86 | this.$message.error(msg); | 93 | this.$message.error(msg); |
87 | this.$router.push('/forbidden'); | 94 | this.$router.push('/forbidden'); |
88 | } | 95 | } |
89 | }, | 96 | }, |
90 | { | 97 | { |
91 | name: 'APP_RESOURCE_DELETED', | 98 | name: 'APP_RESOURCE_DELETED', |
92 | // @error api response data | 99 | // @error api response data |
93 | callback: function(msg) { | 100 | callback: function(msg) { |
94 | this.$message.success(msg); | 101 | this.$message.success(msg); |
95 | } | 102 | } |
96 | }, | 103 | }, |
97 | { | 104 | { |
98 | name: 'APP_RESOURCE_UPDATED', | 105 | name: 'APP_RESOURCE_UPDATED', |
99 | // @error api response data | 106 | // @error api response data |
100 | callback: function(msg) { | 107 | callback: function(msg) { |
101 | this.$message.success(msg); | 108 | this.$message.success(msg); |
102 | } | 109 | } |
103 | }, | 110 | }, |
104 | 111 | ||
105 | ]; | 112 | ]; |
src/pages/Authentication/Login.vue
1 | <template> | 1 | <template> |
2 | <v-app id="login"> | 2 | <v-app id="login"> |
3 | <v-content> | 3 | <v-content> |
4 | <v-container fluid fill-height> | 4 | <v-container fluid fill-height> |
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="color" | 11 | :color="color" |
12 | >{{ text }}</v-snackbar> | 12 | >{{ text }}</v-snackbar> |
13 | <v-layout align-center justify-center> | 13 | <v-layout align-center justify-center> |
14 | <v-flex xs12 sm10 md5 lg4> | 14 | <v-flex xs12 sm10 md5 lg4> |
15 | <img | 15 | <img |
16 | src="/static/icon.png" | 16 | src="/static/icon.png" |
17 | height="40" | 17 | height="40" |
18 | width="140" | 18 | width="140" |
19 | alt="logo" | 19 | alt="logo" |
20 | class="logo mx-auto mb-2" | 20 | class="logo mx-auto mb-2" |
21 | /> | 21 | /> |
22 | <v-card class="elevation-1 px-2 py-3 card" style="background-color: #7852cc" dark> | 22 | <v-card class="elevation-1 px-2 py-3 card" style="background-color: #7852cc" dark> |
23 | <img | 23 | <img |
24 | src="/static/intrackIllustration.png" | 24 | src="/static/intrackIllustration.png" |
25 | class="mx-auto logoSchool" | 25 | class="mx-auto logoSchool" |
26 | style="display:block" | 26 | style="display:block" |
27 | width="280" | 27 | width="280" |
28 | /> | 28 | /> |
29 | <v-card-text align-center justify-center> | 29 | <v-card-text align-center justify-center> |
30 | <v-toolbar-title class="text-xs-center subheadline">SCHOOL LOGIN</v-toolbar-title> | 30 | <v-toolbar-title class="text-xs-center subheadline">SCHOOL LOGIN</v-toolbar-title> |
31 | <v-flex xs12 sm12 md12 lg12> | 31 | <v-flex xs12 sm12 md12 lg12> |
32 | <v-form ref="form" v-model="valid" lazy-validation> | 32 | <v-form ref="form" v-model="valid" lazy-validation> |
33 | <label class="title">Email</label> | 33 | <label class="title">Email</label> |
34 | <v-text-field | 34 | <v-text-field |
35 | style="padding: 0px; margin: 0px;" | 35 | style="padding: 0px; margin: 0px;" |
36 | v-model.trim="userLogincredentials.email" | 36 | v-model.trim="userLogincredentials.email" |
37 | :rules="nameRules" | 37 | :rules="nameRules" |
38 | placeholder="Enter your email" | 38 | placeholder="Enter your email" |
39 | required | 39 | required |
40 | ></v-text-field> | 40 | ></v-text-field> |
41 | <label class="title">Password</label> | 41 | <label class="title">Password</label> |
42 | <v-text-field | 42 | <v-text-field |
43 | style="padding: 0px; margin: 0px;" | 43 | style="padding: 0px; margin: 0px;" |
44 | :rules="[rules.required]" | 44 | :rules="[rules.required]" |
45 | v-model.trim="userLogincredentials.password" | 45 | v-model.trim="userLogincredentials.password" |
46 | :append-icon="e1 ? 'visibility_off' : 'visibility'" | 46 | :append-icon="e1 ? 'visibility_off' : 'visibility'" |
47 | :append-icon-cb="() => (e1 = !e1)" | 47 | :append-icon-cb="() => (e1 = !e1)" |
48 | :type="e1 ? 'password' : 'text'" | 48 | :type="e1 ? 'password' : 'text'" |
49 | name="input-10-1" | 49 | name="input-10-1" |
50 | placeholder="Enter Your password" | 50 | placeholder="Enter Your password" |
51 | @keyup.enter="login" | 51 | @keyup.enter="login" |
52 | ></v-text-field> | 52 | ></v-text-field> |
53 | </v-form> | 53 | </v-form> |
54 | <v-layout> | 54 | <v-layout> |
55 | <v-flex xs12 class="pa-0 ma-0"> | 55 | <v-flex xs12 class="pa-0 ma-0"> |
56 | <h5 class="right mt-4"> | 56 | <h5 class="right mt-4"> |
57 | <router-link class="link" to="/forgetpassword">Forgot password</router-link> | 57 | <router-link class="link" to="/forgetpassword">Forgot password</router-link> |
58 | </h5> | 58 | </h5> |
59 | </v-flex> | 59 | </v-flex> |
60 | </v-layout> | 60 | </v-layout> |
61 | </v-flex> | 61 | </v-flex> |
62 | </v-card-text> | 62 | </v-card-text> |
63 | <v-layout> | 63 | <v-layout> |
64 | <v-flex sm12> | 64 | <v-flex sm12> |
65 | <v-btn | 65 | <v-btn |
66 | style="margin: auto;display: block;background-color: #71d9ea; color: #0c0754;" | 66 | style="margin: auto;display: block;background-color: #71d9ea; color: #0c0754;" |
67 | dark | 67 | dark |
68 | flat | 68 | flat |
69 | @click="login" | 69 | @click="login" |
70 | :loading="loading" | 70 | :loading="loading" |
71 | >Login</v-btn> | 71 | >Login</v-btn> |
72 | </v-flex> | 72 | </v-flex> |
73 | </v-layout> | 73 | </v-layout> |
74 | <v-layout></v-layout> | 74 | <v-layout></v-layout> |
75 | </v-card> | 75 | </v-card> |
76 | </v-flex> | 76 | </v-flex> |
77 | </v-layout> | 77 | </v-layout> |
78 | </v-container> | 78 | </v-container> |
79 | </v-content> | 79 | </v-content> |
80 | </v-app> | 80 | </v-app> |
81 | </template> | 81 | </template> |
82 | 82 | ||
83 | <script> | 83 | <script> |
84 | import http from "@/Services/http.js"; | 84 | import http from "@/Services/http.js"; |
85 | export default { | 85 | export default { |
86 | data() { | 86 | data() { |
87 | return { | 87 | return { |
88 | snackbar: false, | 88 | snackbar: false, |
89 | y: "top", | 89 | y: "top", |
90 | x: "right", | 90 | x: "right", |
91 | mode: "", | 91 | mode: "", |
92 | timeout: 3000, | 92 | timeout: 3000, |
93 | text: "", | 93 | text: "", |
94 | append: "", | 94 | append: "", |
95 | e1: true, | 95 | e1: true, |
96 | loading: false, | 96 | loading: false, |
97 | remember: false, | 97 | remember: false, |
98 | valid: false, | 98 | valid: false, |
99 | userLogincredentials: {}, | 99 | userLogincredentials: {}, |
100 | nameRules: [v => !!v || "Username is required"], | 100 | nameRules: [v => !!v || "Username is required"], |
101 | password: "", | 101 | password: "", |
102 | email: "", | 102 | email: "", |
103 | rules: { | 103 | rules: { |
104 | required: value => !!value || "password is Required." | 104 | required: value => !!value || "password is Required." |
105 | } | 105 | } |
106 | }; | 106 | }; |
107 | }, | 107 | }, |
108 | methods: { | 108 | methods: { |
109 | login() { | 109 | login() { |
110 | if (this.$refs.form.validate()) { | 110 | if (this.$refs.form.validate()) { |
111 | this.loading = true; | 111 | this.loading = true; |
112 | var userdata = { | 112 | var userdata = { |
113 | email: this.userLogincredentials.email, | 113 | email: this.userLogincredentials.email, |
114 | password: this.userLogincredentials.password | 114 | password: this.userLogincredentials.password |
115 | }; | 115 | }; |
116 | http() | 116 | http() |
117 | .post("/schoolLogin", userdata) | 117 | .post("/schoolLogin", userdata) |
118 | .then(response => { | 118 | .then(response => { |
119 | // console.log("token",response.data.data); | 119 | // console.log("token",response.data.data); |
120 | this.loading = false; | 120 | this.loading = false; |
121 | if (response.data.data.role === "ADMIN") { | 121 | if (response.data.data.role === "ADMIN") { |
122 | this.$store.dispatch("setToken", response.data.data.token); | 122 | this.$store.dispatch("setToken", response.data.data.token); |
123 | this.$store.dispatch("Id", response.data.data.id); | 123 | this.$store.dispatch("Id", response.data.data.id); |
124 | this.$store.dispatch("Role", response.data.data.role); | 124 | this.$store.dispatch("Role", response.data.data.role); |
125 | this.$router.push("/dashboard"); | 125 | this.$router.push("/dashboard"); |
126 | } else if (response.data.data.role === "SUPERADMIN") { | 126 | } else if (response.data.data.role === "SUPERADMIN") { |
127 | this.$store.dispatch("setSchoolRole", response.data.data.role); | 127 | this.$store.dispatch("setSchoolRole", response.data.data.role); |
128 | this.$store.dispatch("setSchoolToken", response.data.data.token); | 128 | this.$store.dispatch("setSchoolToken", response.data.data.token); |
129 | this.$router.push("/schooldashboard"); | 129 | this.$router.push("/schooldashboard"); |
130 | } else if (response.data.data.role === "TEACHER") { | 130 | } else if (response.data.data.role === "TEACHER") { |
131 | // console.log("teacher", response.data.data.role); | 131 | // console.log("teacher", response.data.data.role); |
132 | this.$store.dispatch("setToken", response.data.data.token); | 132 | this.$store.dispatch("setToken", response.data.data.token); |
133 | this.$store.dispatch("Id", response.data.data.id); | 133 | this.$store.dispatch("Id", response.data.data.id); |
134 | this.$store.dispatch("Role", response.data.data.role); | 134 | this.$store.dispatch("Role", response.data.data.role); |
135 | this.$router.push("/dashboard"); | 135 | this.$router.push("/dashboard"); |
136 | } else if (response.data.data.role === "LIBRARIAN") { | 136 | } else if (response.data.data.role === "LIBRARIAN") { |
137 | this.$store.dispatch("setToken", response.data.data.token); | 137 | this.$store.dispatch("setToken", response.data.data.token); |
138 | this.$store.dispatch("Id", response.data.data.id); | 138 | this.$store.dispatch("Id", response.data.data.id); |
139 | this.$store.dispatch("Role", response.data.data.role); | 139 | this.$store.dispatch("Role", response.data.data.role); |
140 | this.$router.push("/dashboard"); | 140 | this.$router.push("/dashboard"); |
141 | } else if (response.data.data.role === "ACCOUNTANT") { | 141 | } else if (response.data.data.role === "ACCOUNTANT") { |
142 | this.$store.dispatch("setToken", response.data.data.token); | 142 | this.$store.dispatch("setToken", response.data.data.token); |
143 | this.$store.dispatch("Id", response.data.data.id); | 143 | this.$store.dispatch("Id", response.data.data.id); |
144 | this.$store.dispatch("Role", response.data.data.role); | 144 | this.$store.dispatch("Role", response.data.data.role); |
145 | this.$router.push("/dashboard"); | 145 | this.$router.push("/dashboard"); |
146 | } else if (response.data.data.role === "PARENT") { | ||
147 | this.$store.dispatch("setToken", response.data.data.token); | ||
148 | this.$store.dispatch("Id", response.data.data.id); | ||
149 | this.$store.dispatch("Role", response.data.data.role); | ||
150 | this.$router.push("/dashboard"); | ||
146 | } | 151 | } |
147 | }) | 152 | }) |
148 | .catch(error => { | 153 | .catch(error => { |
149 | if (error.response.data.message) { | 154 | if (error.response.data.message) { |
150 | this.text = error.response.data.message; | 155 | this.text = error.response.data.message; |
151 | this.snackbar = true; | 156 | this.snackbar = true; |
152 | this.loading = false; | 157 | this.loading = false; |
153 | } else { | 158 | } else { |
154 | this.text = "Server appears to be offline"; | 159 | this.text = "Server appears to be offline"; |
155 | this.snackbar = true; | 160 | this.snackbar = true; |
156 | this.loading = false; | 161 | this.loading = false; |
157 | } | 162 | } |
158 | }); | 163 | }); |
159 | } | 164 | } |
160 | } | 165 | } |
161 | }, | 166 | }, |
162 | mounted() { | 167 | mounted() { |
163 | if (this.$store.state.isUserLoggedIn == true) { | 168 | if (this.$store.state.isUserLoggedIn == true) { |
164 | this.$router.push("/dashboard"); | 169 | this.$router.push("/dashboard"); |
165 | } else if (this.$store.state.isSchoolLoggedIn == true) { | 170 | } else if (this.$store.state.isSchoolLoggedIn == true) { |
166 | this.$router.push("/dashboard"); | 171 | this.$router.push("/dashboard"); |
167 | } | 172 | } |
168 | }, | 173 | }, |
169 | computed: { | 174 | computed: { |
170 | color() { | 175 | color() { |
171 | return this.loading ? "success" : "error"; | 176 | return this.loading ? "success" : "error"; |
172 | } | 177 | } |
173 | } | 178 | } |
174 | }; | 179 | }; |
175 | </script> | 180 | </script> |
176 | 181 | ||
177 | <style scoped lang="css"> | 182 | <style scoped lang="css"> |
178 | #login { | 183 | #login { |
179 | width: 100%; | 184 | width: 100%; |
180 | position: absolute; | 185 | position: absolute; |
181 | top: 0; | 186 | top: 0; |
182 | left: 0; | 187 | left: 0; |
183 | content: ""; | 188 | content: ""; |
184 | z-index: 0; | 189 | z-index: 0; |
185 | } | 190 | } |
186 | </style> | 191 | </style> |
187 | <style scoped> | 192 | <style scoped> |
188 | .schoolLogo { | 193 | .schoolLogo { |
189 | height: 60%; | 194 | height: 60%; |
190 | padding-left: 31%; | 195 | padding-left: 31%; |
191 | } | 196 | } |
192 | /* img { | 197 | /* img { |
193 | position: absolute; | 198 | position: absolute; |
194 | top: 13px; | 199 | top: 13px; |
195 | left: 8px; | 200 | left: 8px; |
196 | } */ | 201 | } */ |
197 | .v-btn--large { | 202 | .v-btn--large { |
198 | padding: 0px 84px; | 203 | padding: 0px 84px; |
199 | } | 204 | } |
200 | .link { | 205 | .link { |
201 | text-decoration: none; | 206 | text-decoration: none; |
202 | } | 207 | } |
203 | a { | 208 | a { |
204 | color: #fff; | 209 | color: #fff; |
205 | } | 210 | } |
206 | .mt-4 { | 211 | .mt-4 { |
207 | margin-top: 21px !important; | 212 | margin-top: 21px !important; |
208 | } | 213 | } |
209 | .logo { | 214 | .logo { |
210 | display: block; | 215 | display: block; |
211 | } | 216 | } |
212 | @media screen and (max-width: 600px) { | 217 | @media screen and (max-width: 600px) { |
213 | img { | 218 | img { |
214 | left: 10px; | 219 | left: 10px; |
215 | height: 34px; | 220 | height: 34px; |
216 | width: 120px; | 221 | width: 120px; |
217 | } | 222 | } |
218 | .logo { | 223 | .logo { |
219 | height: 56px; | 224 | height: 56px; |
220 | left: 10px; | 225 | left: 10px; |
221 | width: 120px; | 226 | width: 120px; |
222 | display: block; | 227 | display: block; |
223 | } | 228 | } |
224 | .logoSchool { | 229 | .logoSchool { |
225 | height: 87px; | 230 | height: 87px; |
226 | left: 10px; | 231 | left: 10px; |
227 | width: 120px; | 232 | width: 120px; |
228 | } | 233 | } |
229 | } | 234 | } |
230 | </style> | 235 | </style> |
src/pages/Course/course.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EDITS COURSES DETAILS ****** --> | 3 | <!-- ****** EDITS COURSES DETAILS ****** --> |
4 | <v-dialog v-model="editStudentDialog" max-width="600px" scrollable> | 4 | <v-dialog v-model="editStudentDialog" max-width="600px" 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 Course</label> | 8 | <label class="title text-xs-center">Edit Course</label> |
9 | <v-icon size="24" class="right" @click="editStudentDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editStudentDialog = 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-form ref="form"> | 13 | <v-form ref="form"> |
14 | <v-container fluid> | 14 | <v-container fluid> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> | 16 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> |
17 | <v-avatar size="100px" v-if="!editedItem.courseImageUrl && !editImageUrl"> | 17 | <v-avatar size="100px" v-if="!editedItem.courseImageUrl && !editImageUrl"> |
18 | <img src="/static/icon/user.png" /> | 18 | <img src="/static/icon/user.png" /> |
19 | </v-avatar> | 19 | </v-avatar> |
20 | <img | 20 | <img |
21 | :src="editedItem.courseImageUrl" | 21 | :src="editedItem.courseImageUrl" |
22 | v-else-if="editedItem.courseImageUrl && !editImageUrl" | 22 | v-else-if="editedItem.courseImageUrl && !editImageUrl" |
23 | height="150" | 23 | height="150" |
24 | style="border-radius:50%; width:150px" | 24 | style="border-radius:50%; width:150px" |
25 | /> | 25 | /> |
26 | <img | 26 | <img |
27 | v-if="editImageUrl" | 27 | v-if="editImageUrl" |
28 | :src="editImageUrl" | 28 | :src="editImageUrl" |
29 | style="border-radius:50%; width:150px;height:150px" | 29 | style="border-radius:50%; width:150px;height:150px" |
30 | /> | 30 | /> |
31 | <input | 31 | <input |
32 | type="file" | 32 | type="file" |
33 | style="display: none" | 33 | style="display: none" |
34 | ref="editDataImage" | 34 | ref="editDataImage" |
35 | accept="image/*" | 35 | accept="image/*" |
36 | @change="onEditFilePicked" | 36 | @change="onEditFilePicked" |
37 | /> | 37 | /> |
38 | </v-flex> | 38 | </v-flex> |
39 | </v-layout> | 39 | </v-layout> |
40 | <v-layout wrap> | 40 | <v-layout wrap> |
41 | <v-flex xs12 sm12> | 41 | <v-flex xs12 sm12> |
42 | <v-layout> | 42 | <v-layout> |
43 | <v-flex xs4 sm5 class="pt-4 subheading"> | 43 | <v-flex xs4 sm5 class="pt-4 subheading"> |
44 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 44 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
45 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 45 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
46 | </v-flex> | 46 | </v-flex> |
47 | <v-flex xs8 sm7 class="ml-3"> | 47 | <v-flex xs8 sm7 class="ml-3"> |
48 | <v-select | 48 | <v-select |
49 | :items="addclass" | 49 | :items="addclass" |
50 | label="Select Class" | 50 | label="Select Class" |
51 | v-model="editedItem.select" | 51 | v-model="editedItem.select" |
52 | item-text="classNum" | 52 | item-text="classNum" |
53 | item-value="_id" | 53 | item-value="_id" |
54 | name="Select Class" | 54 | name="Select Class" |
55 | required | 55 | required |
56 | ></v-select> | 56 | ></v-select> |
57 | </v-flex> | 57 | </v-flex> |
58 | </v-layout> | 58 | </v-layout> |
59 | <v-layout> | 59 | <v-layout> |
60 | <v-flex xs4 sm5 class="pt-4 subheading"> | 60 | <v-flex xs4 sm5 class="pt-4 subheading"> |
61 | <label class="right hidden-xs-only hidden-sm-only">Course Name:</label> | 61 | <label class="right hidden-xs-only hidden-sm-only">Course Name:</label> |
62 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> | 62 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> |
63 | </v-flex> | 63 | </v-flex> |
64 | <v-flex xs8 sm7 class="ml-3"> | 64 | <v-flex xs8 sm7 class="ml-3"> |
65 | <v-text-field | 65 | <v-text-field |
66 | v-model="editedItem.coursrName" | 66 | v-model="editedItem.coursrName" |
67 | placeholder="fill your Course Name" | 67 | placeholder="fill your Course Name" |
68 | type="text" | 68 | type="text" |
69 | required | 69 | required |
70 | ></v-text-field> | 70 | ></v-text-field> |
71 | </v-flex> | 71 | </v-flex> |
72 | </v-layout> | 72 | </v-layout> |
73 | <v-layout> | 73 | <v-layout> |
74 | <v-flex xs4 sm5 class="pt-4 subheading"> | 74 | <v-flex xs4 sm5 class="pt-4 subheading"> |
75 | <label class="right hidden-xs-only hidden-sm-only">Upload Image:</label> | 75 | <label class="right hidden-xs-only hidden-sm-only">Upload Image:</label> |
76 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Upload:</label> | 76 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Upload:</label> |
77 | </v-flex> | 77 | </v-flex> |
78 | <v-flex xs8 sm7 class="ml-3"> | 78 | <v-flex xs8 sm7 class="ml-3"> |
79 | <v-text-field | 79 | <v-text-field |
80 | label="Select Image" | 80 | label="Select Image" |
81 | @click="pickEditFile" | 81 | @click="pickEditFile" |
82 | v-model="editImageName" | 82 | v-model="editImageName" |
83 | append-icon="attach_file" | 83 | append-icon="attach_file" |
84 | ></v-text-field> | 84 | ></v-text-field> |
85 | </v-flex> | 85 | </v-flex> |
86 | </v-layout> | 86 | </v-layout> |
87 | </v-flex> | 87 | </v-flex> |
88 | </v-layout> | 88 | </v-layout> |
89 | <v-layout> | 89 | <v-layout> |
90 | <v-flex xs12 sm12 class="px-0 mx-0"> | 90 | <v-flex xs12 sm12 class="px-0 mx-0"> |
91 | <v-layout class="right"> | 91 | <v-layout class="right"> |
92 | <v-btn @click="save" round dark :loading="editLoading" class="add-button">Save</v-btn> | 92 | <v-btn @click="save" round dark :loading="editLoading" class="add-button">Save</v-btn> |
93 | </v-layout> | 93 | </v-layout> |
94 | </v-flex> | 94 | </v-flex> |
95 | </v-layout> | 95 | </v-layout> |
96 | </v-container> | 96 | </v-container> |
97 | </v-form> | 97 | </v-form> |
98 | </v-card-text> | 98 | </v-card-text> |
99 | </v-card> | 99 | </v-card> |
100 | </v-dialog> | 100 | </v-dialog> |
101 | 101 | ||
102 | <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> | 102 | <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> |
103 | 103 | ||
104 | <v-dialog v-model="profileStudentDialog" max-width="600px" scrollable> | 104 | <v-dialog v-model="profileStudentDialog" max-width="600px" scrollable> |
105 | <v-card flat class="card-style pa-3" dark> | 105 | <v-card flat class="card-style pa-3" dark> |
106 | <v-layout> | 106 | <v-layout> |
107 | <v-flex xs12> | 107 | <v-flex xs12> |
108 | <label class="title text-xs-center">View Course</label> | 108 | <label class="title text-xs-center">View Course</label> |
109 | <v-icon size="24" class="right" @click="profileStudentDialog = false">cancel</v-icon> | 109 | <v-icon size="24" class="right" @click="profileStudentDialog = false">cancel</v-icon> |
110 | </v-flex> | 110 | </v-flex> |
111 | </v-layout> | 111 | </v-layout> |
112 | <v-card-text> | 112 | <v-card-text> |
113 | <v-flex align-center justify-center layout text-xs-center class="mt-3"> | 113 | <v-flex align-center justify-center layout text-xs-center class="mt-3"> |
114 | <v-avatar size="100px"> | 114 | <v-avatar size="100px"> |
115 | <img src="/static/icon/user.png" v-if="!editedItem.courseImageUrl" /> | 115 | <img src="/static/icon/user.png" v-if="!editedItem.courseImageUrl" /> |
116 | <img :src="editedItem.courseImageUrl" v-else-if="editedItem.courseImageUrl" /> | 116 | <img :src="editedItem.courseImageUrl" v-else-if="editedItem.courseImageUrl" /> |
117 | </v-avatar> | 117 | </v-avatar> |
118 | </v-flex> | 118 | </v-flex> |
119 | <v-container grid-list-md> | 119 | <v-container grid-list-md> |
120 | <v-layout wrap> | 120 | <v-layout wrap> |
121 | <v-flex xs12> | 121 | <v-flex xs12> |
122 | <v-layout> | 122 | <v-layout> |
123 | <v-flex xs6 sm6> | 123 | <v-flex xs6 sm6> |
124 | <h5 class="right my-1"> | 124 | <h5 class="right my-1"> |
125 | <b>Course :</b> | 125 | <b>Course :</b> |
126 | </h5> | 126 | </h5> |
127 | </v-flex> | 127 | </v-flex> |
128 | <v-flex sm6 xs6> | 128 | <v-flex sm6 xs6> |
129 | <h5 class="my-1 left">{{ editedItem.coursrName }}</h5> | 129 | <h5 class="my-1 left">{{ editedItem.coursrName }}</h5> |
130 | </v-flex> | 130 | </v-flex> |
131 | </v-layout> | 131 | </v-layout> |
132 | </v-flex> | 132 | </v-flex> |
133 | </v-layout> | 133 | </v-layout> |
134 | </v-container> | 134 | </v-container> |
135 | </v-card-text> | 135 | </v-card-text> |
136 | </v-card> | 136 | </v-card> |
137 | </v-dialog> | 137 | </v-dialog> |
138 | 138 | ||
139 | <!-- ****** STUDENTS TABLE ****** --> | 139 | <!-- ****** STUDENTS TABLE ****** --> |
140 | <v-toolbar color="transparent" flat> | 140 | <v-toolbar color="transparent" flat> |
141 | <v-btn | 141 | <v-btn |
142 | fab | 142 | fab |
143 | dark | 143 | dark |
144 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 144 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
145 | small | 145 | small |
146 | @click="addCourseDialog = true" | 146 | @click="addCourseDialog = true" |
147 | > | 147 | > |
148 | <v-icon dark>add</v-icon> | 148 | <v-icon dark>add</v-icon> |
149 | </v-btn> | 149 | </v-btn> |
150 | <v-btn | 150 | <v-btn |
151 | round | 151 | round |
152 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 152 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
153 | dark | 153 | dark |
154 | @click="addCourseDialog = true" | 154 | @click="addCourseDialog = true" |
155 | > | 155 | > |
156 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course | 156 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course |
157 | </v-btn> | 157 | </v-btn> |
158 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 158 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
159 | <v-flex md13 lg12> | 159 | <v-flex md13 lg12> |
160 | <v-layout> | 160 | <v-layout> |
161 | <v-flex lg6 md6> | 161 | <v-flex lg6 md6> |
162 | <v-select | 162 | <v-select |
163 | :items="addclass" | 163 | :items="addclass" |
164 | label="Select Class" | 164 | label="Select Class" |
165 | v-model="selectStudents.select" | 165 | v-model="selectStudents.select" |
166 | item-text="classNum" | 166 | item-text="classNum" |
167 | item-value="_id" | 167 | item-value="_id" |
168 | name="Select Class" | 168 | name="Select Class" |
169 | :rules="classRules" | 169 | :rules="classRules" |
170 | required | 170 | required |
171 | class="ml-2" | 171 | class="ml-2" |
172 | ></v-select> | 172 | ></v-select> |
173 | </v-flex> | 173 | </v-flex> |
174 | </v-layout> | 174 | </v-layout> |
175 | </v-flex> | 175 | </v-flex> |
176 | </v-card-actions> | 176 | </v-card-actions> |
177 | <v-spacer></v-spacer> | 177 | <v-spacer></v-spacer> |
178 | <v-btn | 178 | <v-btn |
179 | @click="getCourses()" | 179 | @click="getCourses()" |
180 | round | 180 | round |
181 | dark | 181 | dark |
182 | :loading="loading" | 182 | :loading="loading" |
183 | class="add-button hidden-xs-only hidden-sm-only" | 183 | class="add-button hidden-xs-only hidden-sm-only" |
184 | >Find</v-btn> | 184 | >Find</v-btn> |
185 | <v-card-title class="body-1" v-show="show"> | 185 | <v-card-title class="body-1" v-show="show"> |
186 | <v-btn icon large flat @click="displaySearch"> | 186 | <v-btn icon large flat @click="displaySearch"> |
187 | <v-avatar size="27"> | 187 | <v-avatar size="27"> |
188 | <img src="/static/icon/search.png" alt="icon" /> | 188 | <img src="/static/icon/search.png" alt="icon" /> |
189 | </v-avatar> | 189 | </v-avatar> |
190 | </v-btn> | 190 | </v-btn> |
191 | </v-card-title> | 191 | </v-card-title> |
192 | <v-flex xs8 sm7 lg2 md3 v-show="showSearch"> | 192 | <v-flex xs8 sm7 lg2 md3 v-show="showSearch"> |
193 | <v-layout> | 193 | <v-layout> |
194 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 194 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
195 | <v-icon @click="closeSearch" color="error">close</v-icon> | 195 | <v-icon @click="closeSearch" color="error">close</v-icon> |
196 | </v-layout> | 196 | </v-layout> |
197 | </v-flex> | 197 | </v-flex> |
198 | </v-toolbar> | 198 | </v-toolbar> |
199 | <v-card flat class="elevation-0 transparent"> | 199 | <v-card flat class="elevation-0 transparent"> |
200 | <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> | 200 | <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> |
201 | <v-layout> | 201 | <v-layout> |
202 | <!-- <v-flex xs4> | 202 | <!-- <v-flex xs4> |
203 | <label class="right mt-4">Select Class:</label> | 203 | <label class="right mt-4">Select Class:</label> |
204 | </v-flex>--> | 204 | </v-flex>--> |
205 | <v-flex xs12> | 205 | <v-flex xs12> |
206 | <v-select | 206 | <v-select |
207 | :items="addclass" | 207 | :items="addclass" |
208 | label="Select Class" | 208 | label="Select Class" |
209 | v-model="selectStudents.select" | 209 | v-model="selectStudents.select" |
210 | item-text="classNum" | 210 | item-text="classNum" |
211 | item-value="_id" | 211 | item-value="_id" |
212 | name="Select Class" | 212 | name="Select Class" |
213 | :rules="classRules" | 213 | :rules="classRules" |
214 | class="px-2" | 214 | class="px-2" |
215 | ></v-select> | 215 | ></v-select> |
216 | </v-flex> | 216 | </v-flex> |
217 | </v-layout> | 217 | </v-layout> |
218 | <v-layout> | 218 | <v-layout> |
219 | <v-flex xs5 class="mx-auto mb-2"> | 219 | <v-flex xs5 class="mx-auto mb-2"> |
220 | <v-btn @click="getCourses()" block round dark :loading="loading" class="add-button">Find</v-btn> | 220 | <v-btn @click="getCourses()" block round dark :loading="loading" class="add-button">Find</v-btn> |
221 | </v-flex> | 221 | </v-flex> |
222 | </v-layout> | 222 | </v-layout> |
223 | </v-flex> | 223 | </v-flex> |
224 | </v-card> | 224 | </v-card> |
225 | <v-data-table | 225 | <v-data-table |
226 | :headers="headers" | 226 | :headers="headers" |
227 | :items="courseData" | 227 | :items="courseData" |
228 | :pagination.sync="pagination" | 228 | :pagination.sync="pagination" |
229 | :search="search" | 229 | :search="search" |
230 | > | 230 | > |
231 | <template slot="items" slot-scope="props"> | 231 | <template slot="items" slot-scope="props"> |
232 | <tr class="tr"> | 232 | <tr class="tr"> |
233 | <td class="text-xs-center td td-row"> | 233 | <td class="text-xs-center td td-row"> |
234 | <v-avatar size="40"> | 234 | <v-avatar size="40"> |
235 | <img :src="props.item.courseImageUrl" v-if="props.item.courseImageUrl" /> | 235 | <img :src="props.item.courseImageUrl" v-if="props.item.courseImageUrl" /> |
236 | <img src="/static/icon/user.png" v-else-if="!props.item.courseImageUrl" /> | 236 | <img src="/static/icon/user.png" v-else-if="!props.item.courseImageUrl" /> |
237 | </v-avatar> | 237 | </v-avatar> |
238 | </td> | 238 | </td> |
239 | <td class="text-xs-center td td-row">{{ props.item.coursrName}}</td> | 239 | <td class="text-xs-center td td-row">{{ props.item.coursrName}}</td> |
240 | <td class="text-xs-center td td-row"> | 240 | <td class="text-xs-center td td-row"> |
241 | <span> | 241 | <span> |
242 | <v-tooltip top> | 242 | <v-tooltip top> |
243 | <img | 243 | <img |
244 | slot="activator" | 244 | slot="activator" |
245 | style="cursor:pointer; width:25px; height:25px; " | 245 | style="cursor:pointer; width:25px; height:25px; " |
246 | class="mr-3" | 246 | class="mr-3" |
247 | @click="profile(props.item)" | 247 | @click="profile(props.item)" |
248 | src="/static/icon/view.png" | 248 | src="/static/icon/view.png" |
249 | /> | 249 | /> |
250 | <span>View</span> | 250 | <span>View</span> |
251 | </v-tooltip> | 251 | </v-tooltip> |
252 | <v-tooltip top> | 252 | <v-tooltip top> |
253 | <img | 253 | <img |
254 | slot="activator" | 254 | slot="activator" |
255 | style="cursor:pointer; width:20px; height:18px; " | 255 | style="cursor:pointer; width:20px; height:18px; " |
256 | class="mr-3" | 256 | class="mr-3" |
257 | @click="editItem(props.item)" | 257 | @click="editItem(props.item)" |
258 | src="/static/icon/edit.png" | 258 | src="/static/icon/edit.png" |
259 | /> | 259 | /> |
260 | <span>Edit</span> | 260 | <span>Edit</span> |
261 | </v-tooltip> | 261 | </v-tooltip> |
262 | <v-tooltip top> | 262 | <v-tooltip top> |
263 | <img | 263 | <img |
264 | slot="activator" | 264 | slot="activator" |
265 | style="cursor:pointer; width:20px; height:20px; " | 265 | style="cursor:pointer; width:20px; height:20px; " |
266 | class="mr-3" | 266 | class="mr-3" |
267 | @click="deleteItem(props.item)" | 267 | @click="deleteItem(props.item)" |
268 | src="/static/icon/delete.png" | 268 | src="/static/icon/delete.png" |
269 | /> | 269 | /> |
270 | <span>Delete</span> | 270 | <span>Delete</span> |
271 | </v-tooltip> | 271 | </v-tooltip> |
272 | </span> | 272 | </span> |
273 | </td> | 273 | </td> |
274 | </tr> | 274 | </tr> |
275 | </template> | 275 | </template> |
276 | <v-alert | 276 | <v-alert |
277 | slot="no-results" | 277 | slot="no-results" |
278 | :value="true" | 278 | :value="true" |
279 | color="error" | 279 | color="error" |
280 | icon="warning" | 280 | icon="warning" |
281 | >Your search for "{{ search }}" found no results.</v-alert> | 281 | >Your search for "{{ search }}" found no results.</v-alert> |
282 | </v-data-table> | 282 | </v-data-table> |
283 | <!-- ****** Add CourseS DETAILS****** --> | 283 | <!-- ****** Add CourseS DETAILS****** --> |
284 | <v-dialog v-model="addCourseDialog" max-width="500"> | 284 | <v-dialog v-model="addCourseDialog" max-width="500"> |
285 | <v-card flat class="card-style pa-2" dark> | 285 | <v-card flat class="card-style pa-2" dark> |
286 | <v-layout> | 286 | <v-layout> |
287 | <v-flex xs12> | 287 | <v-flex xs12> |
288 | <label class="title text-xs-center">Add Course</label> | 288 | <label class="title text-xs-center">Add Course</label> |
289 | <v-icon size="24" class="right" @click="addCourseDialog = false">cancel</v-icon> | 289 | <v-icon size="24" class="right" @click="addCourseDialog = false">cancel</v-icon> |
290 | </v-flex> | 290 | </v-flex> |
291 | </v-layout> | 291 | </v-layout> |
292 | <v-container fluid> | 292 | <v-container fluid> |
293 | <v-layout align-center> | 293 | <v-layout align-center> |
294 | <v-flex xs12> | 294 | <v-flex xs12> |
295 | <v-flex xs12 sm12> | 295 | <v-flex xs12 sm12> |
296 | <v-form ref="form" v-model="valid" lazy-validation> | 296 | <v-form ref="form" v-model="valid" lazy-validation> |
297 | <v-layout> | 297 | <v-layout> |
298 | <v-flex | 298 | <v-flex |
299 | xs12 | 299 | xs12 |
300 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 300 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
301 | > | 301 | > |
302 | <v-avatar size="100px"> | 302 | <v-avatar size="100px" v-if="!imageUrl"> |
303 | <img src="/static/icon/user.png" v-if="!imageUrl" /> | 303 | <img src="/static/icon/user.png" /> |
304 | </v-avatar> | 304 | </v-avatar> |
305 | <input | 305 | <input |
306 | type="file" | 306 | type="file" |
307 | style="display: none" | 307 | style="display: none" |
308 | ref="image" | 308 | ref="image" |
309 | accept="image/*" | 309 | accept="image/*" |
310 | @change="onFilePicked" | 310 | @change="onFilePicked" |
311 | /> | 311 | /> |
312 | <img | 312 | <img |
313 | :src="imageData.imageUrl" | 313 | :src="imageData.imageUrl" |
314 | height="150" | 314 | height="150" |
315 | v-if="imageUrl" | 315 | v-if="imageUrl" |
316 | style="border-radius:50%; width:200px" | 316 | style="border-radius:50%; width:200px" |
317 | /> | 317 | /> |
318 | </v-flex> | 318 | </v-flex> |
319 | </v-layout> | 319 | </v-layout> |
320 | <v-layout wrap> | 320 | <v-layout wrap> |
321 | <v-flex xs12 sm12> | 321 | <v-flex xs12 sm12> |
322 | <v-layout> | 322 | <v-layout> |
323 | <v-flex x4 sm4 class="pt-4 subheading"> | 323 | <v-flex x4 sm4 class="pt-4 subheading"> |
324 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 324 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
325 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 325 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
326 | </v-flex> | 326 | </v-flex> |
327 | <v-flex xs8 sm8 class="ml-3"> | 327 | <v-flex xs8 sm8 class="ml-3"> |
328 | <v-select | 328 | <v-select |
329 | :items="addclass" | 329 | :items="addclass" |
330 | label="Select Class" | 330 | label="Select Class" |
331 | v-model="addCourses.select" | 331 | v-model="addCourses.select" |
332 | item-text="classNum" | 332 | item-text="classNum" |
333 | item-value="_id" | 333 | item-value="_id" |
334 | name="Select Class" | 334 | name="Select Class" |
335 | :rules="classRules" | 335 | :rules="classRules" |
336 | @change="getSections(addCourses.select)" | 336 | @change="getSections(addCourses.select)" |
337 | required | 337 | required |
338 | ></v-select> | 338 | ></v-select> |
339 | </v-flex> | 339 | </v-flex> |
340 | </v-layout> | 340 | </v-layout> |
341 | </v-flex> | 341 | </v-flex> |
342 | </v-layout> | 342 | </v-layout> |
343 | <v-layout wrap> | 343 | <v-layout wrap> |
344 | <v-flex xs12 sm12> | 344 | <v-flex xs12 sm12> |
345 | <v-layout> | 345 | <v-layout> |
346 | <v-flex xs4 sm4 class="pt-4 subheading"> | 346 | <v-flex xs4 sm4 class="pt-4 subheading"> |
347 | <label class="right hidden-xs-only hidden-sm-only">Course Name:</label> | 347 | <label class="right hidden-xs-only hidden-sm-only">Course Name:</label> |
348 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> | 348 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> |
349 | </v-flex> | 349 | </v-flex> |
350 | <v-flex xs8 sm8 class="ml-3"> | 350 | <v-flex xs8 sm8 class="ml-3"> |
351 | <v-text-field | 351 | <v-text-field |
352 | v-model="addCourses.coursrName" | 352 | v-model="addCourses.coursrName" |
353 | placeholder="fill your Course name" | 353 | placeholder="fill your Course name" |
354 | type="text" | 354 | type="text" |
355 | :rules="courseRules" | 355 | :rules="courseRules" |
356 | required | 356 | required |
357 | ></v-text-field> | 357 | ></v-text-field> |
358 | </v-flex> | 358 | </v-flex> |
359 | </v-layout> | 359 | </v-layout> |
360 | </v-flex> | 360 | </v-flex> |
361 | <v-flex xs12 sm12> | 361 | <v-flex xs12 sm12> |
362 | <v-layout> | 362 | <v-layout> |
363 | <v-flex xs4 class="pt-4 subheading"> | 363 | <v-flex xs4 class="pt-4 subheading"> |
364 | <label class="right hidden-xs-only hidden-sm-only">Upload Image:</label> | 364 | <label class="right hidden-xs-only hidden-sm-only">Upload Image:</label> |
365 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Upload :</label> | 365 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Upload :</label> |
366 | </v-flex> | 366 | </v-flex> |
367 | <v-flex xs8 class="ml-3"> | 367 | <v-flex xs8 class="ml-3"> |
368 | <v-text-field | 368 | <v-text-field |
369 | label="Select Image" | 369 | label="Select Image" |
370 | @click="pickFile" | 370 | @click="pickFile" |
371 | v-model="imageName" | 371 | v-model="imageName" |
372 | append-icon="attach_file" | 372 | append-icon="attach_file" |
373 | ></v-text-field> | 373 | ></v-text-field> |
374 | </v-flex> | 374 | </v-flex> |
375 | </v-layout> | 375 | </v-layout> |
376 | </v-flex> | 376 | </v-flex> |
377 | </v-layout> | 377 | </v-layout> |
378 | <v-layout> | 378 | <v-layout> |
379 | <v-flex xs12 sm12> | 379 | <v-flex xs12 sm12> |
380 | <v-layout class="right"> | 380 | <v-layout class="right"> |
381 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | 381 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> |
382 | </v-layout> | 382 | </v-layout> |
383 | </v-flex> | 383 | </v-flex> |
384 | </v-layout> | 384 | </v-layout> |
385 | </v-form> | 385 | </v-form> |
386 | </v-flex> | 386 | </v-flex> |
387 | </v-flex> | 387 | </v-flex> |
388 | </v-layout> | 388 | </v-layout> |
389 | </v-container> | 389 | </v-container> |
390 | </v-card> | 390 | </v-card> |
391 | </v-dialog> | 391 | </v-dialog> |
392 | <v-snackbar | 392 | <v-snackbar |
393 | :timeout="timeout" | 393 | :timeout="timeout" |
394 | :top="y === 'top'" | 394 | :top="y === 'top'" |
395 | :right="x === 'right'" | 395 | :right="x === 'right'" |
396 | :vertical="mode === 'vertical'" | 396 | :vertical="mode === 'vertical'" |
397 | v-model="snackbar" | 397 | v-model="snackbar" |
398 | :color="color" | 398 | :color="color" |
399 | >{{ text }}</v-snackbar> | 399 | >{{ text }}</v-snackbar> |
400 | <div class="loader" v-if="showLoader"> | 400 | <div class="loader" v-if="showLoader"> |
401 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 401 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
402 | </div> | 402 | </div> |
403 | </v-container> | 403 | </v-container> |
404 | </template> | 404 | </template> |
405 | 405 | ||
406 | <script> | 406 | <script> |
407 | import http from "@/Services/http.js"; | 407 | import http from "@/Services/http.js"; |
408 | import moment from "moment"; | 408 | import moment from "moment"; |
409 | import countryList from "@/script/country.js"; | 409 | import countryList from "@/script/country.js"; |
410 | import parent from "@/script/parents.js"; | 410 | import parent from "@/script/parents.js"; |
411 | 411 | ||
412 | export default { | 412 | export default { |
413 | data: () => ({ | 413 | data: () => ({ |
414 | showNext: false, | 414 | showNext: false, |
415 | snackbar: false, | 415 | snackbar: false, |
416 | y: "top", | 416 | y: "top", |
417 | x: "right", | 417 | x: "right", |
418 | role: "", | 418 | role: "", |
419 | mode: "", | 419 | mode: "", |
420 | append: "", | 420 | append: "", |
421 | timeout: 3000, | 421 | timeout: 3000, |
422 | text: "", | 422 | text: "", |
423 | show: true, | 423 | show: true, |
424 | color: "", | 424 | color: "", |
425 | showSearch: false, | 425 | showSearch: false, |
426 | showLoader: false, | 426 | showLoader: false, |
427 | loading: false, | 427 | loading: false, |
428 | editLoading: false, | 428 | editLoading: false, |
429 | date: null, | 429 | date: null, |
430 | search: "", | 430 | search: "", |
431 | menu: false, | 431 | menu: false, |
432 | menu1: false, | 432 | menu1: false, |
433 | editStudentDialog: false, | 433 | editStudentDialog: false, |
434 | profileStudentDialog: false, | 434 | profileStudentDialog: false, |
435 | addCourseDialog: false, | 435 | addCourseDialog: false, |
436 | valid: true, | 436 | valid: true, |
437 | addclass: [], | 437 | addclass: [], |
438 | addSection: [], | 438 | addSection: [], |
439 | pagination: { | 439 | pagination: { |
440 | rowsPerPage: 10 | 440 | rowsPerPage: 10 |
441 | }, | 441 | }, |
442 | imageData: {}, | 442 | imageData: {}, |
443 | imageName: "", | 443 | imageName: "", |
444 | imageUrl: "", | 444 | imageUrl: "", |
445 | imageFile: "", | 445 | imageFile: "", |
446 | editImageName: "", | 446 | editImageName: "", |
447 | editImageUrl: "", | 447 | editImageUrl: "", |
448 | courseRules: [v => !!v || " Course Name is required"], | 448 | courseRules: [v => !!v || " Course Name is required"], |
449 | classRules: [v => !!v || " Class Name is required"], | 449 | classRules: [v => !!v || " Class Name is required"], |
450 | sectionRules: [v => !!v || " Section Name is required"], | 450 | sectionRules: [v => !!v || " Section Name is required"], |
451 | errorMessages: "", | 451 | errorMessages: "", |
452 | headers: [ | 452 | headers: [ |
453 | { | 453 | { |
454 | text: "Image", | 454 | text: "Image", |
455 | value: "courseImageUrl", | 455 | value: "courseImageUrl", |
456 | sortable: false, | 456 | sortable: false, |
457 | align: "center" | 457 | align: "center" |
458 | }, | 458 | }, |
459 | { | 459 | { |
460 | text: "Course", | 460 | text: "Course", |
461 | value: "course", | 461 | value: "course", |
462 | sortable: false, | 462 | sortable: false, |
463 | align: "center" | 463 | align: "center" |
464 | }, | 464 | }, |
465 | { text: "Action", value: "", sortable: false, align: "center" } | 465 | { text: "Action", value: "", sortable: false, align: "center" } |
466 | ], | 466 | ], |
467 | courseData: [], | 467 | courseData: [], |
468 | editedIndex: -1, | 468 | editedIndex: -1, |
469 | addCourses: {}, | 469 | addCourses: {}, |
470 | selectStudents: { | 470 | selectStudents: { |
471 | select: "", | 471 | select: "", |
472 | selectSection: "" | 472 | selectSection: "" |
473 | }, | 473 | }, |
474 | editedItem: {} | 474 | editedItem: {} |
475 | }), | 475 | }), |
476 | methods: { | 476 | methods: { |
477 | getCourses() { | 477 | getCourses() { |
478 | this.showLoader = true; | 478 | this.showLoader = true; |
479 | http() | 479 | http() |
480 | .get("/getCourseesList", { | 480 | .get("/getCourseesList", { |
481 | params: { | 481 | params: { |
482 | classId: this.selectStudents.select | 482 | classId: this.selectStudents.select |
483 | } | 483 | } |
484 | }) | 484 | }) |
485 | .then(response => { | 485 | .then(response => { |
486 | this.courseData = response.data.data; | 486 | this.courseData = response.data.data; |
487 | this.showLoader = false; | 487 | this.showLoader = false; |
488 | }) | 488 | }) |
489 | .catch(err => { | 489 | .catch(err => { |
490 | console.log("err====>", err); | 490 | console.log("err====>", err); |
491 | this.showLoader = false; | 491 | this.showLoader = false; |
492 | }); | 492 | }); |
493 | }, | 493 | }, |
494 | getSections(_id) { | 494 | getSections(_id) { |
495 | var token = this.$store.state.token; | 495 | var token = this.$store.state.token; |
496 | this.showLoader = true; | 496 | this.showLoader = true; |
497 | http() | 497 | http() |
498 | .get( | 498 | .get( |
499 | "/getSectionsList", | 499 | "/getSectionsList", |
500 | { params: { classId: _id } }, | 500 | { params: { classId: _id } }, |
501 | { | 501 | { |
502 | headers: { Authorization: "Bearer " + token } | 502 | headers: { Authorization: "Bearer " + token } |
503 | } | 503 | } |
504 | ) | 504 | ) |
505 | .then(response => { | 505 | .then(response => { |
506 | this.addSection = response.data.data; | 506 | this.addSection = response.data.data; |
507 | this.showLoader = false; | 507 | this.showLoader = false; |
508 | }) | 508 | }) |
509 | .catch(err => { | 509 | .catch(err => { |
510 | this.showLoader = false; | 510 | this.showLoader = false; |
511 | }); | 511 | }); |
512 | }, | 512 | }, |
513 | pickFile() { | 513 | pickFile() { |
514 | this.$refs.image.click(); | 514 | this.$refs.image.click(); |
515 | }, | 515 | }, |
516 | pickEditFile() { | 516 | pickEditFile() { |
517 | this.$refs.editDataImage.click(); | 517 | this.$refs.editDataImage.click(); |
518 | }, | 518 | }, |
519 | dates: function(date) { | 519 | dates: function(date) { |
520 | return moment(date).format("MMMM DD, YYYY"); | 520 | return moment(date).format("MMMM DD, YYYY"); |
521 | return date; | 521 | return date; |
522 | }, | 522 | }, |
523 | onFilePicked(e) { | 523 | onFilePicked(e) { |
524 | // console.log(e) | 524 | // console.log(e) |
525 | const files = e.target.files; | 525 | const files = e.target.files; |
526 | this.imageData.upload = e.target.files[0]; | 526 | this.imageData.upload = e.target.files[0]; |
527 | if (files[0] !== undefined) { | 527 | if (files[0] !== undefined) { |
528 | this.imageName = files[0].name; | 528 | this.imageName = files[0].name; |
529 | if (this.imageName.lastIndexOf(".") <= 0) { | 529 | if (this.imageName.lastIndexOf(".") <= 0) { |
530 | return; | 530 | return; |
531 | } | 531 | } |
532 | const fr = new FileReader(); | 532 | const fr = new FileReader(); |
533 | fr.readAsDataURL(files[0]); | 533 | fr.readAsDataURL(files[0]); |
534 | fr.addEventListener("load", () => { | 534 | fr.addEventListener("load", () => { |
535 | this.imageUrl = fr.result; | 535 | this.imageUrl = fr.result; |
536 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 536 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
537 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 537 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
538 | }); | 538 | }); |
539 | } else { | 539 | } else { |
540 | this.imageName = ""; | 540 | this.imageName = ""; |
541 | this.imageFile = ""; | 541 | this.imageFile = ""; |
542 | this.imageUrl = ""; | 542 | this.imageUrl = ""; |
543 | } | 543 | } |
544 | }, | 544 | }, |
545 | onEditFilePicked(e) { | 545 | onEditFilePicked(e) { |
546 | console.log(e); | 546 | console.log(e); |
547 | const files = e.target.files; | 547 | const files = e.target.files; |
548 | if (files[0] !== undefined) { | 548 | if (files[0] !== undefined) { |
549 | this.editImageName = files[0].name; | 549 | this.editImageName = files[0].name; |
550 | console.log("this.editImageName", this.editImageName); | 550 | console.log("this.editImageName", this.editImageName); |
551 | 551 | ||
552 | if (this.editImageName.lastIndexOf(".") <= 0) { | 552 | if (this.editImageName.lastIndexOf(".") <= 0) { |
553 | return; | 553 | return; |
554 | } | 554 | } |
555 | const fr = new FileReader(); | 555 | const fr = new FileReader(); |
556 | fr.readAsDataURL(files[0]); | 556 | fr.readAsDataURL(files[0]); |
557 | fr.addEventListener("load", () => { | 557 | fr.addEventListener("load", () => { |
558 | this.editImageUrl = fr.result; | 558 | this.editImageUrl = fr.result; |
559 | this.editiImageFile = files[0]; // this is an image file that can be sent to server... | 559 | this.editiImageFile = files[0]; // this is an image file that can be sent to server... |
560 | }); | 560 | }); |
561 | } else { | 561 | } else { |
562 | this.editImageName = ""; | 562 | this.editImageName = ""; |
563 | this.editiImageFile = ""; | 563 | this.editiImageFile = ""; |
564 | } | 564 | } |
565 | }, | 565 | }, |
566 | editItem(item) { | 566 | editItem(item) { |
567 | this.editedIndex = this.courseData.indexOf(item); | 567 | this.editedIndex = this.courseData.indexOf(item); |
568 | this.editedItem = Object.assign({}, item); | 568 | this.editedItem = Object.assign({}, item); |
569 | this.editStudentDialog = true; | 569 | this.editStudentDialog = true; |
570 | }, | 570 | }, |
571 | profile(item) { | 571 | profile(item) { |
572 | this.editedIndex = this.courseData.indexOf(item); | 572 | this.editedIndex = this.courseData.indexOf(item); |
573 | this.editedItem = Object.assign({}, item); | 573 | this.editedItem = Object.assign({}, item); |
574 | this.profileStudentDialog = true; | 574 | this.profileStudentDialog = true; |
575 | }, | 575 | }, |
576 | deleteItem(item) { | 576 | deleteItem(item) { |
577 | let deleteCourse = { | 577 | let deleteCourse = { |
578 | courseId: item._id | 578 | courseId: item._id |
579 | }; | 579 | }; |
580 | http() | 580 | http() |
581 | .delete( | 581 | .delete( |
582 | "/deleteCourse", | 582 | "/deleteCourse", |
583 | confirm("Are you sure you want to delete this?") && { | 583 | confirm("Are you sure you want to delete this?") && { |
584 | params: deleteCourse | 584 | params: deleteCourse |
585 | } | 585 | } |
586 | ) | 586 | ) |
587 | .then(response => { | 587 | .then(response => { |
588 | this.snackbar = true; | 588 | this.snackbar = true; |
589 | this.text = response.data.message; | 589 | this.text = response.data.message; |
590 | this.color = "green"; | 590 | this.color = "green"; |
591 | this.getCourses(); | 591 | this.getCourses(); |
592 | }) | 592 | }) |
593 | .catch(error => { | 593 | .catch(error => { |
594 | this.snackbar = true; | 594 | this.snackbar = true; |
595 | this.text = error.response.data.message; | 595 | this.text = error.response.data.message; |
596 | this.color = "error"; | 596 | this.color = "error"; |
597 | }); | 597 | }); |
598 | }, | 598 | }, |
599 | close() { | 599 | close() { |
600 | this.editStudentDialog = false; | 600 | this.editStudentDialog = false; |
601 | }, | 601 | }, |
602 | closeStudentProfile() { | 602 | closeStudentProfile() { |
603 | this.profileStudentDialog = false; | 603 | this.profileStudentDialog = false; |
604 | }, | 604 | }, |
605 | submit() { | 605 | submit() { |
606 | if (this.$refs.form.validate()) { | 606 | if (this.$refs.form.validate()) { |
607 | let addCourse = { | 607 | let addCourse = { |
608 | classId: this.addCourses.select, | 608 | classId: this.addCourses.select, |
609 | sectionId: this.addCourses.selectSection, | 609 | sectionId: this.addCourses.selectSection, |
610 | coursrName: this.addCourses.coursrName | 610 | coursrName: this.addCourses.coursrName |
611 | }; | 611 | }; |
612 | if (this.imageUrl) { | 612 | if (this.imageUrl) { |
613 | var str = this.imageUrl; | 613 | var str = this.imageUrl; |
614 | const [baseUrl, imageUrl] = str.split(/,/); | 614 | const [baseUrl, imageUrl] = str.split(/,/); |
615 | addCourse.upload = imageUrl; | 615 | addCourse.upload = imageUrl; |
616 | } | 616 | } |
617 | this.loading = true; | 617 | this.loading = true; |
618 | http() | 618 | http() |
619 | .post("/createCourse", addCourse) | 619 | .post("/createCourse", addCourse) |
620 | .then(response => { | 620 | .then(response => { |
621 | this.snackbar = true; | 621 | this.snackbar = true; |
622 | this.text = "New Course added successfully"; | 622 | this.text = "New Course added successfully"; |
623 | this.color = "green"; | 623 | this.color = "green"; |
624 | this.addCourseDialog = false; | 624 | this.addCourseDialog = false; |
625 | this.clear(); | 625 | this.clear(); |
626 | this.loading = false; | 626 | this.loading = false; |
627 | }) | 627 | }) |
628 | .catch(error => { | 628 | .catch(error => { |
629 | this.snackbar = true; | 629 | this.snackbar = true; |
630 | this.text = error.response.data.message; | 630 | this.text = error.response.data.message; |
631 | this.color = "error"; | 631 | this.color = "error"; |
632 | this.loading = false; | 632 | this.loading = false; |
633 | }); | 633 | }); |
634 | } | 634 | } |
635 | }, | 635 | }, |
636 | clear() { | 636 | clear() { |
637 | this.$refs.form.reset(); | 637 | this.$refs.form.reset(); |
638 | this.imageUrl = ""; | 638 | this.imageUrl = ""; |
639 | }, | 639 | }, |
640 | save() { | 640 | save() { |
641 | let editCourse = { | 641 | let editCourse = { |
642 | courseId: this.editedItem._id, | 642 | courseId: this.editedItem._id, |
643 | coursrName: this.editedItem.coursrName, | 643 | coursrName: this.editedItem.coursrName, |
644 | classId: this.editedItem.select | 644 | classId: this.editedItem.select |
645 | }; | 645 | }; |
646 | if (this.editImageUrl) { | 646 | if (this.editImageUrl) { |
647 | var str = this.editImageUrl; | 647 | var str = this.editImageUrl; |
648 | const [baseUrl, editImageUrl] = str.split(/,/); | 648 | const [baseUrl, editImageUrl] = str.split(/,/); |
649 | editCourse.upload = editImageUrl; | 649 | editCourse.upload = editImageUrl; |
650 | } | 650 | } |
651 | this.editLoading = true; | 651 | this.editLoading = true; |
652 | http() | 652 | http() |
653 | .put("/updateCourse", editCourse) | 653 | .put("/updateCourse", editCourse) |
654 | .then(response => { | 654 | .then(response => { |
655 | this.snackbar = true; | 655 | this.snackbar = true; |
656 | this.text = response.data.message; | 656 | this.text = response.data.message; |
657 | this.color = "green"; | 657 | this.color = "green"; |
658 | this.imageUrl = ""; | 658 | this.imageUrl = ""; |
659 | this.getCourses(); | 659 | this.getCourses(); |
660 | this.close(); | 660 | this.close(); |
661 | this.editLoading = false; | 661 | this.editLoading = false; |
662 | }) | 662 | }) |
663 | .catch(error => { | 663 | .catch(error => { |
664 | this.snackbar = true; | 664 | this.snackbar = true; |
665 | this.text = error.response.data.statusText; | 665 | this.text = error.response.data.statusText; |
666 | this.color = "error"; | 666 | this.color = "error"; |
667 | this.editLoading = false; | 667 | this.editLoading = false; |
668 | }); | 668 | }); |
669 | }, | 669 | }, |
670 | displaySearch() { | 670 | displaySearch() { |
671 | this.show = false; | 671 | this.show = false; |
672 | this.showSearch = true; | 672 | this.showSearch = true; |
673 | }, | 673 | }, |
674 | closeSearch() { | 674 | closeSearch() { |
675 | this.showSearch = false; | 675 | this.showSearch = false; |
676 | this.show = true; | 676 | this.show = true; |
677 | this.search = ""; | 677 | this.search = ""; |
678 | } | 678 | } |
679 | }, | 679 | }, |
680 | mounted() { | 680 | mounted() { |
681 | var token = this.$store.state.token; | 681 | var token = this.$store.state.token; |
682 | http() | 682 | http() |
683 | .get("/getClassesList", { | 683 | .get("/getClassesList", { |
684 | headers: { Authorization: "Bearer " + token } | 684 | headers: { Authorization: "Bearer " + token } |
685 | }) | 685 | }) |
686 | .then(response => { | 686 | .then(response => { |
687 | this.addclass = response.data.data; | 687 | this.addclass = response.data.data; |
688 | }) | 688 | }) |
689 | .catch(error => { | 689 | .catch(error => { |
690 | this.showLoader = false; | 690 | this.showLoader = false; |
691 | if (error.response.status === 401) { | 691 | if (error.response.status === 401) { |
692 | this.$router.replace({ path: "/" }); | 692 | this.$router.replace({ path: "/" }); |
693 | this.$store.dispatch("setToken", null); | 693 | this.$store.dispatch("setToken", null); |
694 | this.$store.dispatch("Id", null); | 694 | this.$store.dispatch("Id", null); |
695 | this.$store.dispatch("Role", null); | 695 | this.$store.dispatch("Role", null); |
696 | } | 696 | } |
697 | }); | 697 | }); |
698 | } | 698 | } |
699 | }; | 699 | }; |
700 | </script> | 700 | </script> |
701 | <style scoped> | 701 | <style scoped> |
702 | .active { | 702 | .active { |
703 | background-color: gray; | 703 | background-color: gray; |
704 | color: white !important; | 704 | color: white !important; |
705 | } | 705 | } |
706 | .activebtn { | 706 | .activebtn { |
707 | color: black !important; | 707 | color: black !important; |
708 | } | 708 | } |
709 | </style> | 709 | </style> |
src/pages/Course/courseDetail.vue
File was created | 1 | <template> | |
2 | <v-container fluid class="body-color"> | ||
3 | <!-- ****** EDITS Gallery ****** --> | ||
4 | <v-dialog v-model="editCourseDetailDialog" max-width="1000px" scrollable> | ||
5 | <v-card class="card-style pa-2" dark> | ||
6 | <v-layout> | ||
7 | <v-flex xs12> | ||
8 | <label class="title text-xs-center">Edit Course Detail</label> | ||
9 | <v-icon size="24" class="right" @click="editCourseDetailDialog = false">cancel</v-icon> | ||
10 | </v-flex> | ||
11 | </v-layout> | ||
12 | <v-card-text> | ||
13 | <v-layout wrap> | ||
14 | <v-flex xs12 sm12> | ||
15 | <v-layout> | ||
16 | <v-flex xs4 class="pt-4 subheading"> | ||
17 | <label class="right">Chapter Name:</label> | ||
18 | </v-flex> | ||
19 | <v-flex xs8 sm6 class="ml-3"> | ||
20 | <v-text-field | ||
21 | v-model="editChapter.chapterName" | ||
22 | placeholder="fill your Title" | ||
23 | type="text" | ||
24 | required | ||
25 | ></v-text-field> | ||
26 | </v-flex> | ||
27 | </v-layout> | ||
28 | </v-flex> | ||
29 | <v-flex xs12 sm12> | ||
30 | <v-layout> | ||
31 | <v-flex xs4 class="pt-4 subheading"> | ||
32 | <label class="right">Description:</label> | ||
33 | </v-flex> | ||
34 | <v-flex xs8 sm6 class="ml-3"> | ||
35 | <v-text-field | ||
36 | placeholder="fill your Description" | ||
37 | v-model="editChapter.description" | ||
38 | type="text" | ||
39 | required | ||
40 | ></v-text-field> | ||
41 | </v-flex> | ||
42 | </v-layout> | ||
43 | </v-flex> | ||
44 | </v-layout> | ||
45 | <v-flex xs12 v-if="editChapter.chapterPoints !=[]"> | ||
46 | <v-layout | ||
47 | wrap | ||
48 | v-for="(editChapterPoint,index) in editChapter.chapterPoints" | ||
49 | :key="index" | ||
50 | > | ||
51 | <v-flex xs12 sm12 md4 class="pt-4 subheading"> | ||
52 | <label class="right hidden-xs-only hidden-sm-only">Chapter Points:</label> | ||
53 | <label class="hidden-md-only hidden-lg-only hidden-xl-only">Chapter Points:</label> | ||
54 | </v-flex> | ||
55 | <v-layout> | ||
56 | <v-flex xs10 sm10 sm5 md9 class="ml-3"> | ||
57 | <v-text-field :value="editChapterPoint" type="text" required></v-text-field> | ||
58 | </v-flex> | ||
59 | <v-flex xs2 class="pt-4"> | ||
60 | <v-icon @click="deleteUrl(index,editChapter._id)">cancel</v-icon> | ||
61 | </v-flex> | ||
62 | </v-layout> | ||
63 | </v-layout> | ||
64 | </v-flex> | ||
65 | <v-layout> | ||
66 | <v-flex xs12 sm12 md11 lg11> | ||
67 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | ||
68 | <v-spacer></v-spacer> | ||
69 | <v-btn round dark @click="save" :loading="editLoading" class="add-button mr-4">Save</v-btn> | ||
70 | </v-card-actions> | ||
71 | <v-card-actions class="hidden-md-only hidden-lg-only hidden-xl-only"> | ||
72 | <v-spacer></v-spacer> | ||
73 | <v-btn round dark @click="save" :loading="editLoading" class="add-button">Save</v-btn> | ||
74 | <v-spacer></v-spacer> | ||
75 | </v-card-actions> | ||
76 | </v-flex> | ||
77 | </v-layout> | ||
78 | </v-card-text> | ||
79 | </v-card> | ||
80 | </v-dialog> | ||
81 | |||
82 | <!-- ****** PROFILE Gallery ****** --> | ||
83 | |||
84 | <v-dialog v-model="viewProfileGallery" max-width="1000" scrollable> | ||
85 | <v-card flat class="card-style pa-3" dark> | ||
86 | <v-layout> | ||
87 | <v-flex xs12> | ||
88 | <label class="title text-xs-center">View Course Detail</label> | ||
89 | <v-icon size="24" class="right" @click="closeProfileGallery">cancel</v-icon> | ||
90 | </v-flex> | ||
91 | </v-layout> | ||
92 | <v-card-text> | ||
93 | <v-container grid-list-md> | ||
94 | <v-layout wrap> | ||
95 | <v-flex xs12> | ||
96 | <v-layout> | ||
97 | <v-flex xs4 sm6> | ||
98 | <h5 class="right my-1"> | ||
99 | <b>Chapter Name:</b> | ||
100 | </h5> | ||
101 | </v-flex> | ||
102 | <v-flex sm6 xs8> | ||
103 | <h5 class="my-1">{{ editedItem.chapterName }}</h5> | ||
104 | </v-flex> | ||
105 | </v-layout> | ||
106 | <v-layout> | ||
107 | <v-flex xs4 sm6> | ||
108 | <h5 class="right my-1"> | ||
109 | <b>Description:</b> | ||
110 | </h5> | ||
111 | </v-flex> | ||
112 | <v-flex sm6 xs8> | ||
113 | <h5 class="my-1">{{ editedItem.description }}</h5> | ||
114 | </v-flex> | ||
115 | </v-layout> | ||
116 | <v-layout> | ||
117 | <v-flex xs5 sm6> | ||
118 | <h5 class="right my-1"> | ||
119 | <b>You Tube Link Url:</b> | ||
120 | </h5> | ||
121 | </v-flex> | ||
122 | <v-flex sm6 xs8> | ||
123 | <h5 class="my-1"> | ||
124 | <ul v-for="chapterPoint in editedItem.chapterPoints" :key="chapterPoint"> | ||
125 | <li>{{ chapterPoint}}</li> | ||
126 | </ul> | ||
127 | </h5> | ||
128 | </v-flex> | ||
129 | </v-layout> | ||
130 | </v-flex> | ||
131 | </v-layout> | ||
132 | </v-container> | ||
133 | </v-card-text> | ||
134 | </v-card> | ||
135 | </v-dialog> | ||
136 | |||
137 | <!-- ****** Course Detail TABLE ****** --> | ||
138 | |||
139 | <v-toolbar color="transparent" flat> | ||
140 | <v-btn | ||
141 | fab | ||
142 | dark | ||
143 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | ||
144 | small | ||
145 | @click="addCourseDetailDialog = true" | ||
146 | > | ||
147 | <v-icon dark>add</v-icon> | ||
148 | </v-btn> | ||
149 | <v-btn | ||
150 | round | ||
151 | class="open-dialog-button hidden-sm-only hidden-xs-only" | ||
152 | dark | ||
153 | @click="addCourseDetailDialog = true" | ||
154 | > | ||
155 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Course Detail | ||
156 | </v-btn> | ||
157 | <v-flex xs12 sm4 md2> | ||
158 | <v-select | ||
159 | small | ||
160 | :items="addclass" | ||
161 | label="Select Class" | ||
162 | v-model="getCourse.classId" | ||
163 | item-text="classNum" | ||
164 | item-value="_id" | ||
165 | name="Select Class" | ||
166 | @change="getCourses(getCourse.classId)" | ||
167 | class="mr-2" | ||
168 | required | ||
169 | ></v-select> | ||
170 | </v-flex> | ||
171 | <v-flex xs12 sm4 md2> | ||
172 | <v-select | ||
173 | :items="courseData" | ||
174 | label="Select Course" | ||
175 | v-model="getCourse.courseId" | ||
176 | item-text="coursrName" | ||
177 | item-value="_id" | ||
178 | required | ||
179 | class="ml-2" | ||
180 | @change="getCourseDetailsList(getCourse.courseId)" | ||
181 | ></v-select> | ||
182 | </v-flex> | ||
183 | <v-spacer></v-spacer> | ||
184 | <v-card-title class="body-1" v-show="show"> | ||
185 | <v-btn icon large flat @click="displaySearch"> | ||
186 | <v-avatar size="27"> | ||
187 | <img src="/static/icon/search.png" alt="icon" /> | ||
188 | </v-avatar> | ||
189 | </v-btn> | ||
190 | </v-card-title> | ||
191 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | ||
192 | <v-layout> | ||
193 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | ||
194 | <v-icon @click="closeSearch" color="error">close</v-icon> | ||
195 | </v-layout> | ||
196 | </v-flex> | ||
197 | </v-toolbar> | ||
198 | <v-data-table | ||
199 | :headers="headers" | ||
200 | :items="CourseDetailsList" | ||
201 | :pagination.sync="pagination" | ||
202 | :search="search" | ||
203 | item-key="_id" | ||
204 | > | ||
205 | <template slot="items" slot-scope="props"> | ||
206 | <tr class="tr" @click="props.expanded = !props.expanded"> | ||
207 | <td class="td td-row">{{ props.index + 1}}</td> | ||
208 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum }}</td> | ||
209 | <td class="td td-row text-xs-center">{{ props.item.courseId.coursrName }}</td> | ||
210 | <td class="td td-row text-xs-center"> | ||
211 | <span> | ||
212 | <!-- <v-tooltip top> | ||
213 | <img | ||
214 | slot="activator" | ||
215 | style="cursor:pointer; width:25px; height:25px; " | ||
216 | class="mr-3" | ||
217 | @click="profile(props.item)" | ||
218 | src="/static/icon/view.png" | ||
219 | /> | ||
220 | <span>View</span> | ||
221 | </v-tooltip> | ||
222 | <v-tooltip top> | ||
223 | <img | ||
224 | slot="activator" | ||
225 | style="cursor:pointer; width:20px; height:18px; " | ||
226 | class="mr-3" | ||
227 | @click="editItem(props.item)" | ||
228 | src="/static/icon/edit.png" | ||
229 | /> | ||
230 | <span>Edit</span> | ||
231 | </v-tooltip>--> | ||
232 | <v-tooltip top> | ||
233 | <img | ||
234 | slot="activator" | ||
235 | style="cursor:pointer; width:20px; height:20px; " | ||
236 | class="mr-3" | ||
237 | @click="deleteItem(props.item)" | ||
238 | src="/static/icon/delete.png" | ||
239 | /> | ||
240 | <span>Delete</span> | ||
241 | </v-tooltip> | ||
242 | </span> | ||
243 | </td> | ||
244 | </tr> | ||
245 | </template> | ||
246 | <template slot="expand" slot-scope="props"> | ||
247 | <v-data-table :items="chapters" hide-actions item-key="chapterName" style="width: auto;"> | ||
248 | <template slot="items" slot-scope="props"> | ||
249 | <tr class="tr" @click="props.expanded = !props.expanded"> | ||
250 | <td class="td td-row">{{ props.index + 1}}</td> | ||
251 | <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> | ||
252 | <td class="text-xs-center td td-row">{{ props.item.description }}</td> | ||
253 | <td class="text-xs-center td td-row"> | ||
254 | <v-tooltip top> | ||
255 | <img | ||
256 | slot="activator" | ||
257 | style="cursor:pointer; width:25px; height:25px; " | ||
258 | class="mr-3" | ||
259 | @click="profile(props.item)" | ||
260 | src="/static/icon/view.png" | ||
261 | /> | ||
262 | <span>View</span> | ||
263 | </v-tooltip> | ||
264 | <v-tooltip top> | ||
265 | <img | ||
266 | slot="activator" | ||
267 | style="cursor:pointer; width:20px; height:18px; " | ||
268 | class="mr-3" | ||
269 | @click="editChapterItem(props.item)" | ||
270 | src="/static/icon/edit.png" | ||
271 | /> | ||
272 | <span>Edit</span> | ||
273 | </v-tooltip> | ||
274 | </td> | ||
275 | </tr> | ||
276 | <!-- <td class="text-xs-center td td-row">{{ props.item.chapterName}}</td> --> | ||
277 | <!-- <td class="text-xs-center td td-row">{{ props.item.description }}</td> --> | ||
278 | |||
279 | <!-- <tr class="tr"> | ||
280 | <td class="text-xs-left subheading table-td td td-row"> | ||
281 | <b>{{ props.item.day }}</b> | ||
282 | </td> | ||
283 | <td class="table-td td td-row"> | ||
284 | <b>Subject</b> | ||
285 | <br /> | ||
286 | <b>Time In</b> | ||
287 | <br /> | ||
288 | <b>Time Out</b> | ||
289 | </td> | ||
290 | <td v-for="list in props.item.lectures" class="table-td td td-row"> | ||
291 | <b>{{ list.subjectName }}</b> | ||
292 | <img | ||
293 | style="cursor:pointer; width:20px; height:18px; " | ||
294 | class="mr-2 ml-2" | ||
295 | src="/static/icon/edit1.png" | ||
296 | @click="updateTimeTable(list, timeTableList,props.item._id)" | ||
297 | /> | ||
298 | <img | ||
299 | style="cursor:pointer; width:20px; height:20px; " | ||
300 | src="/static/icon/delete1.png" | ||
301 | @click="deleteTimeTable(list,props.item.lectures)" | ||
302 | /> | ||
303 | <br /> | ||
304 | {{list.timeIn}} | ||
305 | <br /> | ||
306 | {{list.timeOut}} | ||
307 | </td> | ||
308 | <td class="td td-row"> | ||
309 | <v-tooltip top> | ||
310 | <v-icon | ||
311 | slot="activator" | ||
312 | color="black" | ||
313 | @click="addLecture(props.item._id, timeTableList._id)" | ||
314 | >add_circle_outline</v-icon> | ||
315 | <span>Add</span> | ||
316 | </v-tooltip> | ||
317 | </td> | ||
318 | </tr>--> | ||
319 | </template> | ||
320 | <!-- <template slot="expand" slot-scope="props"> | ||
321 | <v-data-table | ||
322 | :items="props" | ||
323 | hide-actions | ||
324 | item-key="chapterName" | ||
325 | style="width: auto;" | ||
326 | > | ||
327 | <template slot="items" slot-scope="props"> | ||
328 | {{items}} | ||
329 | <tr class="tr"> | ||
330 | <td class="td td-row">{{ props.index + 1}}</td> | ||
331 | </tr> | ||
332 | </template> | ||
333 | </v-data-table> | ||
334 | </template>--> | ||
335 | </v-data-table> | ||
336 | </template> | ||
337 | |||
338 | <v-alert | ||
339 | slot="no-results" | ||
340 | :value="true" | ||
341 | color="error" | ||
342 | icon="warning" | ||
343 | >Your search for "{{ search }}" found no results.</v-alert> | ||
344 | </v-data-table> | ||
345 | <!-- ****** ADD Course Detail ****** --> | ||
346 | <v-dialog v-model="addCourseDetailDialog" max-width="600px"> | ||
347 | <v-card flat class="card-style pa-2" dark> | ||
348 | <v-layout> | ||
349 | <v-flex xs12> | ||
350 | <label class="title text-xs-center">Add Course Details</label> | ||
351 | <v-icon size="24" class="right" @click="addCourseDetailDialog = false">cancel</v-icon> | ||
352 | </v-flex> | ||
353 | </v-layout> | ||
354 | <v-form ref="form" v-model="valid" lazy-validation> | ||
355 | <v-container fluid> | ||
356 | <v-flex xs12> | ||
357 | <v-layout> | ||
358 | <v-flex xs4 class="pt-4 subheading"> | ||
359 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | ||
360 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | ||
361 | </v-flex> | ||
362 | <v-flex xs8 sm8 md7 class="ml-3"> | ||
363 | <v-select | ||
364 | :items="addclass" | ||
365 | label="Select Class" | ||
366 | v-model="addCourseDetail.classId" | ||
367 | item-text="classNum" | ||
368 | item-value="_id" | ||
369 | name="Select Class" | ||
370 | :rules="clsssRules" | ||
371 | @change="getCourses(addCourseDetail.classId)" | ||
372 | required | ||
373 | ></v-select> | ||
374 | </v-flex> | ||
375 | </v-layout> | ||
376 | </v-flex> | ||
377 | <v-flex xs12> | ||
378 | <v-layout> | ||
379 | <v-flex xs4 class="pt-4 subheading"> | ||
380 | <label class="right hidden-xs-only hidden-sm-only">Select Course:</label> | ||
381 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Course:</label> | ||
382 | </v-flex> | ||
383 | <v-flex xs8 sm8 md7 class="ml-3"> | ||
384 | <v-select | ||
385 | :items="courseData" | ||
386 | label="Select Course" | ||
387 | v-model="addCourseDetail.courseId" | ||
388 | item-text="coursrName" | ||
389 | item-value="_id" | ||
390 | :rules="courseRules" | ||
391 | required | ||
392 | ></v-select> | ||
393 | </v-flex> | ||
394 | </v-layout> | ||
395 | </v-flex> | ||
396 | <v-flex xs12> | ||
397 | <v-layout> | ||
398 | <v-flex xs4 class="pt-4 subheading"> | ||
399 | <label class="right">Chapter Name:</label> | ||
400 | </v-flex> | ||
401 | <v-flex xs8 sm8 md7 class="ml-3"> | ||
402 | <v-text-field | ||
403 | v-model="addCourseDetail.chapterName" | ||
404 | placeholder="fill your Title" | ||
405 | name="name" | ||
406 | type="text" | ||
407 | :rules="chapterNameRules" | ||
408 | required | ||
409 | ></v-text-field> | ||
410 | </v-flex> | ||
411 | </v-layout> | ||
412 | </v-flex> | ||
413 | <v-flex xs12> | ||
414 | <v-layout> | ||
415 | <v-flex xs4 class="pt-4 subheading"> | ||
416 | <label class="right">Description:</label> | ||
417 | </v-flex> | ||
418 | <v-flex xs8 sm8 md7 class="ml-3"> | ||
419 | <v-text-field | ||
420 | placeholder="fill your Description" | ||
421 | :rules="descriptionRules" | ||
422 | v-model="addCourseDetail.description" | ||
423 | type="text" | ||
424 | name="email" | ||
425 | required | ||
426 | ></v-text-field> | ||
427 | </v-flex> | ||
428 | </v-layout> | ||
429 | </v-flex> | ||
430 | <v-layout> | ||
431 | <v-flex xs12> | ||
432 | <div v-for="(chapterPoints,index) in finds" :key="index"> | ||
433 | <v-layout> | ||
434 | <v-flex xs4 class="pt-4 subheading"> | ||
435 | <label class="right">Chapter Points:</label> | ||
436 | </v-flex> | ||
437 | <v-flex xs8 sm8 md6 class="ml-3"> | ||
438 | <v-text-field | ||
439 | placeholder="fill your Chapter Points" | ||
440 | v-model="chapterPoints.value" | ||
441 | type="text" | ||
442 | name="link" | ||
443 | required | ||
444 | ></v-text-field> | ||
445 | </v-flex> | ||
446 | <v-flex xs2 class="pt-4"> | ||
447 | <v-icon @click="deleteFind(index)" v-if="index !=0 ">cancel</v-icon> | ||
448 | <v-icon @click="addFind">add_circle</v-icon> | ||
449 | </v-flex> | ||
450 | </v-layout> | ||
451 | </div> | ||
452 | </v-flex> | ||
453 | </v-layout> | ||
454 | <v-layout> | ||
455 | <v-flex xs12 sm12> | ||
456 | <v-layout class="right"> | ||
457 | <v-btn @click="clear" round dark class="clear-button">Clear</v-btn> | ||
458 | <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn> | ||
459 | </v-layout> | ||
460 | </v-flex> | ||
461 | </v-layout> | ||
462 | </v-container> | ||
463 | </v-form> | ||
464 | </v-card> | ||
465 | </v-dialog> | ||
466 | <v-snackbar | ||
467 | :timeout="timeout" | ||
468 | :top="y === 'top'" | ||
469 | :right="x === 'right'" | ||
470 | :vertical="mode === 'vertical'" | ||
471 | v-model="snackbar" | ||
472 | :color="color" | ||
473 | >{{ text }}</v-snackbar> | ||
474 | <div class="loader" v-if="showLoader"> | ||
475 | <v-progress-circular indeterminate color="white"></v-progress-circular> | ||
476 | </div> | ||
477 | </v-container> | ||
478 | </template> | ||
479 | |||
480 | <script> | ||
481 | import http from "@/Services/http.js"; | ||
482 | |||
483 | export default { | ||
484 | data: () => ({ | ||
485 | snackbar: false, | ||
486 | y: "top", | ||
487 | x: "right", | ||
488 | mode: "", | ||
489 | timeout: 3000, | ||
490 | text: "", | ||
491 | loading: false, | ||
492 | color: "", | ||
493 | date: null, | ||
494 | search: "", | ||
495 | show: true, | ||
496 | addCourseDetailDialog: false, | ||
497 | showSearch: false, | ||
498 | showLoader: false, | ||
499 | editCourseDetailDialog: false, | ||
500 | viewProfileGallery: false, | ||
501 | valid: true, | ||
502 | editLoading: false, | ||
503 | addclass: [], | ||
504 | courseData: [], | ||
505 | addSection: [], | ||
506 | getCourse: {}, | ||
507 | finds: [{ value: "" }], | ||
508 | updates: [{ youTubeLink: "" }], | ||
509 | youTubeLink: {}, | ||
510 | addCourseDetail: { | ||
511 | chapters: [ | ||
512 | { | ||
513 | chapterName: "", | ||
514 | description: "", | ||
515 | chapterPoints: [] | ||
516 | } | ||
517 | ] | ||
518 | }, | ||
519 | chapters: [], | ||
520 | pagination: { | ||
521 | rowsPerPage: 10 | ||
522 | }, | ||
523 | editFiles: [], | ||
524 | files: [], | ||
525 | courseData: [], | ||
526 | token: "", | ||
527 | clsssRules: [v => !!v || " Class is required"], | ||
528 | courseRules: [v => !!v || " Course is required"], | ||
529 | chapterNameRules: [v => !!v || " Tilte is required"], | ||
530 | descriptionRules: [v => !!v || " Description is required"], | ||
531 | headers: [ | ||
532 | { | ||
533 | align: "", | ||
534 | text: "No", | ||
535 | sortable: false, | ||
536 | value: "index" | ||
537 | }, | ||
538 | { | ||
539 | text: "Class Name", | ||
540 | value: "classNum", | ||
541 | sortable: false, | ||
542 | align: "center" | ||
543 | }, | ||
544 | { | ||
545 | text: "Course Name", | ||
546 | value: "courseName", | ||
547 | sortable: false, | ||
548 | align: "center" | ||
549 | }, | ||
550 | { text: "Action", value: "", sortable: false, align: "center" } | ||
551 | ], | ||
552 | CourseDetailsList: [], | ||
553 | editedIndex: -1, | ||
554 | editedItem: {}, | ||
555 | editChapter: {}, | ||
556 | index: "" | ||
557 | }), | ||
558 | methods: { | ||
559 | getCourses(classId) { | ||
560 | this.showLoader = true; | ||
561 | http() | ||
562 | .get("/getCourseesList", { | ||
563 | params: { | ||
564 | classId: classId | ||
565 | } | ||
566 | }) | ||
567 | .then(response => { | ||
568 | this.courseData = response.data.data; | ||
569 | this.showLoader = false; | ||
570 | }) | ||
571 | .catch(err => { | ||
572 | console.log("err====>", err); | ||
573 | this.showLoader = false; | ||
574 | }); | ||
575 | }, | ||
576 | getCourseDetailsList() { | ||
577 | this.showLoader = true; | ||
578 | http() | ||
579 | .get("/getParticularCourseDetail", { | ||
580 | params: { | ||
581 | courseId: this.getCourse.courseId | ||
582 | } | ||
583 | }) | ||
584 | .then(response => { | ||
585 | this.CourseDetailsList = response.data.data; | ||
586 | this.chapters = response.data.data[0].chapters; | ||
587 | console.log("response.data.data", this.CourseDetailsList); | ||
588 | this.showLoader = false; | ||
589 | }) | ||
590 | .catch(error => { | ||
591 | // console.log("err====>", err); | ||
592 | this.showLoader = false; | ||
593 | if (error.response.status === 401) { | ||
594 | this.$router.replace({ path: "/" }); | ||
595 | this.$store.dispatch("setToken", null); | ||
596 | this.$store.dispatch("Id", null); | ||
597 | } | ||
598 | }); | ||
599 | }, | ||
600 | // editItem(item) { | ||
601 | // this.files = []; | ||
602 | // // this.editedIndex = this.CourseDetailsList.indexOf(item); | ||
603 | // // this.editedItem = Object.assign({}, item); | ||
604 | // | ||
605 | // }, | ||
606 | profile(item) { | ||
607 | this.editedIndex = this.chapters.indexOf(item); | ||
608 | this.editedItem = Object.assign({}, item); | ||
609 | this.viewProfileGallery = true; | ||
610 | }, | ||
611 | editChapterItem(item) { | ||
612 | this.editedIndex = this.chapters.indexOf(item); | ||
613 | this.editChapter = Object.assign({}, item); | ||
614 | console.log("this.editChapter",this.editChapter) | ||
615 | this.editCourseDetailDialog = true; | ||
616 | }, | ||
617 | deleteItem(item) { | ||
618 | let deleteGallery = { | ||
619 | galleryId: item._id | ||
620 | }; | ||
621 | http() | ||
622 | .delete( | ||
623 | "/deleteGallery", | ||
624 | confirm("Are you sure you want to delete this?") && { | ||
625 | params: deleteGallery, | ||
626 | headers: { | ||
627 | Authorization: "Bearer " + this.token | ||
628 | } | ||
629 | } | ||
630 | ) | ||
631 | .then(response => { | ||
632 | this.snackbar = true; | ||
633 | this.text = "Successfully delete Existing Gallery"; | ||
634 | this.color = "green"; | ||
635 | this.getCourseDetailsList(); | ||
636 | }) | ||
637 | .catch(error => { | ||
638 | // console.log(error); | ||
639 | this.snackbar = true; | ||
640 | this.text = error.response.data.message; | ||
641 | this.color = "error"; | ||
642 | }); | ||
643 | }, | ||
644 | deleteImage(imageId, id) { | ||
645 | let deleteImages = { | ||
646 | galleryId: id, | ||
647 | imageId: imageId | ||
648 | }; | ||
649 | http() | ||
650 | .put("/deleteImage", deleteImages) | ||
651 | .then(response => { | ||
652 | this.snackbar = true; | ||
653 | this.text = response.data.message; | ||
654 | this.color = "green"; | ||
655 | this.getCourseDetailsList(); | ||
656 | this.close(); | ||
657 | }) | ||
658 | .catch(error => { | ||
659 | this.snackbar = true; | ||
660 | this.text = error.response.data.message; | ||
661 | this.color = "error"; | ||
662 | }); | ||
663 | }, | ||
664 | close() { | ||
665 | this.editCourseDetailDialog = false; | ||
666 | }, | ||
667 | closeProfileGallery() { | ||
668 | this.viewProfileGallery = false; | ||
669 | }, | ||
670 | submit() { | ||
671 | let chapters = []; | ||
672 | var chapterPoints = []; | ||
673 | for (let i = 0; i < this.finds.length; i++) { | ||
674 | chapterPoints.push(this.finds[i].value); | ||
675 | // console.log("this.finds[i].value", this.finds[i].value); | ||
676 | chapters = [ | ||
677 | { | ||
678 | chapterName: this.addCourseDetail.chapterName, | ||
679 | description: this.addCourseDetail.description, | ||
680 | chapterPoints: chapterPoints | ||
681 | } | ||
682 | ]; | ||
683 | } | ||
684 | if (this.$refs.form.validate()) { | ||
685 | // console.log("this.addCourseDetail", this.addCourseDetail); | ||
686 | var courseDetailsData = { | ||
687 | classId: this.addCourseDetail.classId, | ||
688 | courseId: this.addCourseDetail.courseId, | ||
689 | chapters: chapters | ||
690 | }; | ||
691 | this.loading = true; | ||
692 | http() | ||
693 | .post("/createCourseDetail", courseDetailsData) | ||
694 | .then(response => { | ||
695 | this.addCourseDetailDialog = false; | ||
696 | this.loading = false; | ||
697 | this.snackbar = true; | ||
698 | this.text = response.data.message; | ||
699 | this.color = "green"; | ||
700 | this.clear(); | ||
701 | this.files = ""; | ||
702 | }) | ||
703 | .catch(error => { | ||
704 | this.snackbar = true; | ||
705 | this.text = error.response.data.message; | ||
706 | this.color = "error"; | ||
707 | this.loading = false; | ||
708 | }); | ||
709 | } | ||
710 | }, | ||
711 | clear() { | ||
712 | this.$refs.form.reset(); | ||
713 | this.files = []; | ||
714 | }, | ||
715 | save() { | ||
716 | this.editedItem.gelleryId = this.editedItem._id; | ||
717 | var linkUrl = []; | ||
718 | for (let i = 0; i < this.updates.length; i++) { | ||
719 | linkUrl.push(this.updates[i].youTubeLink); | ||
720 | } | ||
721 | if (this.editFiles) { | ||
722 | var ary = []; | ||
723 | var imageData = []; | ||
724 | ary = this.editFiles; | ||
725 | for (let i = 0; i < ary.length; i++) { | ||
726 | const [baseUrl, imageUrl] = ary[i].split(/,/); | ||
727 | imageData.push(imageUrl); | ||
728 | this.editedItem.editFiles = imageData; | ||
729 | } | ||
730 | } | ||
731 | if (linkUrl != "") { | ||
732 | var updateData = { | ||
733 | galleryId: this.editedItem._id, | ||
734 | description: this.editedItem.description, | ||
735 | classId: this.editedItem.classNum, | ||
736 | uploadImage: this.editedItem.editFiles, | ||
737 | title: this.editedItem.title, | ||
738 | updateYouTubeLinkUrl: linkUrl | ||
739 | }; | ||
740 | } else if (linkUrl == "") { | ||
741 | var updateData = { | ||
742 | galleryId: this.editedItem._id, | ||
743 | description: this.editedItem.description, | ||
744 | classId: this.editedItem.classNum, | ||
745 | uploadImage: this.editedItem.editFiles, | ||
746 | title: this.editedItem.title | ||
747 | }; | ||
748 | } | ||
749 | this.editLoading = true; | ||
750 | http() | ||
751 | .put("/updateGallery", updateData) | ||
752 | .then(response => { | ||
753 | this.getCourseDetailsList(); | ||
754 | this.close(); | ||
755 | this.snackbar = true; | ||
756 | this.text = response.data.message; | ||
757 | this.color = "green"; | ||
758 | this.editLoading = false; | ||
759 | // this.editChapterPointName = ""; | ||
760 | this.editFiles = []; | ||
761 | }) | ||
762 | .catch(error => { | ||
763 | this.editLoading = false; | ||
764 | this.snackbar = true; | ||
765 | this.text = error.response.data.message; | ||
766 | this.color = "error"; | ||
767 | }); | ||
768 | }, | ||
769 | getAllClasses() { | ||
770 | http() | ||
771 | .get("/getClassesList", { | ||
772 | headers: { Authorization: "Bearer " + this.token } | ||
773 | }) | ||
774 | .then(response => { | ||
775 | this.addclass = response.data.data; | ||
776 | }) | ||
777 | .catch(err => { | ||
778 | // console.log("err====>", err); | ||
779 | }); | ||
780 | }, | ||
781 | removeAddFind: function() { | ||
782 | this.finds = [{ value: "" }]; | ||
783 | }, | ||
784 | addFind: function() { | ||
785 | this.finds.push({ value: "" }); | ||
786 | }, | ||
787 | update: function() { | ||
788 | this.updates.push({ youTubeLink: "" }); | ||
789 | }, | ||
790 | deleteFind: function(index) { | ||
791 | this.finds.splice(index, 1); | ||
792 | if (index === 0) this.addFind(); | ||
793 | }, | ||
794 | deleteUpdate: function(index) { | ||
795 | this.updates.splice(index, 1); | ||
796 | if (index === 0) this.update(); | ||
797 | }, | ||
798 | deleteUrl: function(index, youTubelinkId, id) { | ||
799 | this.editedItem.youTubeLinkUrl.splice(index, 1); | ||
800 | if (index === 0) this.update(); | ||
801 | let deleteYouTubeUrl = { | ||
802 | galleryId: id, | ||
803 | youTubeId: youTubelinkId | ||
804 | }; | ||
805 | http() | ||
806 | .put("/deleteYoutubeLink", deleteYouTubeUrl) | ||
807 | .then(response => { | ||
808 | this.snackbar = true; | ||
809 | this.text = response.data.message; | ||
810 | this.color = "green"; | ||
811 | this.getCourseDetailsList(); | ||
812 | this.close(); | ||
813 | }) | ||
814 | .catch(error => { | ||
815 | this.snackbar = true; | ||
816 | this.text = error.response.data.message; | ||
817 | this.color = "error"; | ||
818 | }); | ||
819 | }, | ||
820 | displaySearch() { | ||
821 | this.show = false; | ||
822 | this.showSearch = true; | ||
823 | }, | ||
824 | closeSearch() { | ||
825 | this.showSearch = false; | ||
826 | this.show = true; | ||
827 | this.search = ""; | ||
828 | } | ||
829 | }, | ||
830 | mounted() { | ||
831 | this.token = this.$store.state.token; | ||
832 | this.getAllClasses(); | ||
833 | } | ||
834 | }; | ||
835 | </script> |
src/pages/Course/enrollStudents.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** STUDENTS TABLE ****** --> | 3 | <!-- ****** STUDENTS TABLE ****** --> |
4 | <v-toolbar color="transparent" flat> | 4 | <v-toolbar color="transparent" flat> |
5 | <v-spacer></v-spacer> | 5 | <v-spacer></v-spacer> |
6 | <v-flex xs12 sm4 md2> | 6 | <v-flex xs12 sm4 md2> |
7 | <v-select | 7 | <v-select |
8 | small | 8 | small |
9 | :items="addclass" | 9 | :items="addclass" |
10 | label="Select Class" | 10 | label="Select Class" |
11 | v-model="getReport.classId" | 11 | v-model="getReport.classId" |
12 | item-text="classNum" | 12 | item-text="classNum" |
13 | item-value="_id" | 13 | item-value="_id" |
14 | name="Select Class" | 14 | name="Select Class" |
15 | @change="getCourses(getReport.classId)" | 15 | @change="getCourses(getReport.classId)" |
16 | class="mr-2" | 16 | class="mr-2" |
17 | required | 17 | required |
18 | ></v-select> | 18 | ></v-select> |
19 | </v-flex> | 19 | </v-flex> |
20 | <v-flex xs12 sm4 md2> | 20 | <v-flex xs12 sm4 md2> |
21 | <v-select | 21 | <v-select |
22 | :items="courseData" | 22 | :items="courseData" |
23 | label="Select Course" | 23 | label="Select Course" |
24 | v-model="getReport.courseId" | 24 | v-model="getReport.courseId" |
25 | item-text="coursrName" | 25 | item-text="coursrName" |
26 | item-value="_id" | 26 | item-value="_id" |
27 | required | 27 | required |
28 | class="ml-2" | 28 | class="ml-2" |
29 | @change="getStudentTable(getReport.courseId)" | 29 | @change="getStudentTable(getReport.courseId)" |
30 | ></v-select> | 30 | ></v-select> |
31 | </v-flex> | 31 | </v-flex> |
32 | <v-card-title class="body-1" v-show="show"> | 32 | <v-card-title class="body-1" v-show="show"> |
33 | <v-btn icon large flat @click="displaySearch"> | 33 | <v-btn icon large flat @click="displaySearch"> |
34 | <v-avatar size="27"> | 34 | <v-avatar size="27"> |
35 | <img src="/static/icon/search.png" alt="icon" /> | 35 | <img src="/static/icon/search.png" alt="icon" /> |
36 | </v-avatar> | 36 | </v-avatar> |
37 | </v-btn> | 37 | </v-btn> |
38 | </v-card-title> | 38 | </v-card-title> |
39 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 39 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
40 | <v-layout> | 40 | <v-layout> |
41 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 41 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
42 | <v-icon @click="closeSearch" color="error">close</v-icon> | 42 | <v-icon @click="closeSearch" color="error">close</v-icon> |
43 | </v-layout> | 43 | </v-layout> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-toolbar> | 45 | </v-toolbar> |
46 | <v-data-table | 46 | <v-data-table |
47 | :headers="headers" | 47 | :headers="headers" |
48 | :items="studentsData" | 48 | :items="studentsData" |
49 | :pagination.sync="pagination" | 49 | :pagination.sync="pagination" |
50 | :search="search" | 50 | :search="search" |
51 | select-all | 51 | select-all |
52 | v-model="selected" | 52 | v-model="selected" |
53 | item-key="name" | 53 | item-key="name" |
54 | > | 54 | > |
55 | <template slot="items" slot-scope="props"> | 55 | <template slot="items" slot-scope="props"> |
56 | <tr class="tr" :active="props.selected" @click="props.selected = !props.selected"> | 56 | <tr class="tr" :active="props.selected" @click="props.selected = !props.selected"> |
57 | <td class="text-xs-center td td-row"> | 57 | <td class="text-xs-center td td-row"> |
58 | <v-checkbox | 58 | <v-checkbox |
59 | :input-value="props.selected" | 59 | :input-value="props.selected" |
60 | @change="selectParticularStudent(props.item._id)" | 60 | @change="selectParticularStudent(props.item._id)" |
61 | primary | 61 | primary |
62 | hide-details | 62 | hide-details |
63 | ></v-checkbox> | 63 | ></v-checkbox> |
64 | </td> | 64 | </td> |
65 | <td class="text-xs-center td td-row"> | 65 | <td class="text-xs-center td td-row"> |
66 | <v-avatar size="40"> | 66 | <v-avatar size="40"> |
67 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 67 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
68 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 68 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
69 | </v-avatar> | 69 | </v-avatar> |
70 | </td> | 70 | </td> |
71 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 71 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
72 | <td class="text-xs-center td td-row">{{ props.item.fatherCellNo}}</td> | 72 | <td class="text-xs-center td td-row">{{ props.item.fatherCellNo}}</td> |
73 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> | 73 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> |
74 | </tr> | 74 | </tr> |
75 | </template> | 75 | </template> |
76 | <template slot="headers" slot-scope="props"> | 76 | <template slot="headers" slot-scope="props"> |
77 | <tr> | 77 | <tr> |
78 | <th> | 78 | <th> |
79 | <v-checkbox | 79 | <v-checkbox |
80 | :input-value="props.all" | 80 | :input-value="props.all" |
81 | :indeterminate="props.indeterminate" | 81 | :indeterminate="props.indeterminate" |
82 | primary | 82 | primary |
83 | hide-details | 83 | hide-details |
84 | @click.native="toggleAll" | 84 | @click.native="toggleAll" |
85 | ></v-checkbox> | 85 | ></v-checkbox> |
86 | </th> | 86 | </th> |
87 | <th | 87 | <th |
88 | v-for="header in props.headers" | 88 | v-for="header in props.headers" |
89 | :key="header.text" | 89 | :key="header.text" |
90 | :class="['column sortable', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']" | 90 | :class="['column sortable', pagination.descending ? 'desc' : 'asc', header.value === pagination.sortBy ? 'active' : '']" |
91 | @click="changeSort(header.value)" | 91 | @click="changeSort(header.value)" |
92 | > | 92 | > |
93 | <v-icon small>arrow_upward</v-icon> | 93 | <v-icon small>arrow_upward</v-icon> |
94 | {{ header.text }} | 94 | {{ header.text }} |
95 | </th> | 95 | </th> |
96 | </tr> | 96 | </tr> |
97 | </template> | 97 | </template> |
98 | <v-alert | 98 | <v-alert |
99 | slot="no-results" | 99 | slot="no-results" |
100 | :value="true" | 100 | :value="true" |
101 | color="error" | 101 | color="error" |
102 | icon="warning" | 102 | icon="warning" |
103 | >Your search for "{{ search }}" found no results.</v-alert> | 103 | >Your search for "{{ search }}" found no results.</v-alert> |
104 | </v-data-table> | 104 | </v-data-table> |
105 | <v-snackbar | 105 | <v-snackbar |
106 | :timeout="timeout" | 106 | :timeout="timeout" |
107 | :top="y === 'top'" | 107 | :top="y === 'top'" |
108 | :right="x === 'right'" | 108 | :right="x === 'right'" |
109 | :vertical="mode === 'vertical'" | 109 | :vertical="mode === 'vertical'" |
110 | v-model="snackbar" | 110 | v-model="snackbar" |
111 | color="success" | 111 | color="success" |
112 | >{{ text }}</v-snackbar> | 112 | >{{ text }}</v-snackbar> |
113 | <div class="loader" v-if="showLoader"> | 113 | <div class="loader" v-if="showLoader"> |
114 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 114 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
115 | </div> | 115 | </div> |
116 | </v-container> | 116 | </v-container> |
117 | </template> | 117 | </template> |
118 | 118 | ||
119 | <script> | 119 | <script> |
120 | import http from "@/Services/http.js"; | 120 | import http from "@/Services/http.js"; |
121 | import moment from "moment"; | 121 | import moment from "moment"; |
122 | 122 | ||
123 | export default { | 123 | export default { |
124 | data: () => ({ | 124 | data: () => ({ |
125 | snackbar: false, | 125 | snackbar: false, |
126 | y: "top", | 126 | y: "top", |
127 | x: "right", | 127 | x: "right", |
128 | mode: "", | 128 | mode: "", |
129 | timeout: 3000, | 129 | timeout: 3000, |
130 | text: "", | 130 | text: "", |
131 | show: true, | 131 | show: true, |
132 | showSearch: false, | 132 | showSearch: false, |
133 | showLoader: false, | 133 | showLoader: false, |
134 | loading: false, | 134 | loading: false, |
135 | date: null, | 135 | date: null, |
136 | search: "", | 136 | search: "", |
137 | addclass: [], | 137 | addclass: [], |
138 | pagination: { | 138 | pagination: { |
139 | rowsPerPage: 10 | 139 | rowsPerPage: 10 |
140 | }, | 140 | }, |
141 | headers: [ | 141 | headers: [ |
142 | { | 142 | { |
143 | text: "Profile Pic", | 143 | text: "Profile Pic", |
144 | value: "profilprofilePicUrlePicUrl", | 144 | value: "profilprofilePicUrlePicUrl", |
145 | sortable: false, | 145 | sortable: false, |
146 | align: "center" | 146 | align: "center" |
147 | }, | 147 | }, |
148 | { text: "Name", value: "name", sortable: false, align: "center" }, | 148 | { text: "Name", value: "name", sortable: false, align: "center" }, |
149 | { | 149 | { |
150 | text: "Mobile No", | 150 | text: "Mobile No", |
151 | value: "fatherCellNo", | 151 | value: "fatherCellNo", |
152 | sortable: false, | 152 | sortable: false, |
153 | align: "center" | 153 | align: "center" |
154 | }, | 154 | }, |
155 | { text: "Email", value: "email", sortable: false, align: "center" } | 155 | { text: "Email", value: "email", sortable: false, align: "center" } |
156 | // { text: "Action", value: "", sortable: false, align: "center" } | 156 | // { text: "Action", value: "", sortable: false, align: "center" } |
157 | ], | 157 | ], |
158 | token: "", | 158 | token: "", |
159 | selectStudents: { | 159 | selectStudents: { |
160 | select: "", | 160 | select: "", |
161 | selectSection: "" | 161 | selectSection: "" |
162 | }, | 162 | }, |
163 | 163 | ||
164 | role: "", | 164 | role: "", |
165 | schoolRole: "", | 165 | schoolRole: "", |
166 | menu: false, | 166 | menu: false, |
167 | valid: true, | 167 | valid: true, |
168 | 168 | ||
169 | getReport: {}, | 169 | getReport: {}, |
170 | studentsData: [], | 170 | studentsData: [], |
171 | courseData: [], | 171 | courseData: [], |
172 | addSection: [], | 172 | addSection: [], |
173 | selected: [], | 173 | selected: [], |
174 | SectionName: ["A", "B", "C", "D", "E", "F"], | 174 | SectionName: ["A", "B", "C", "D", "E", "F"], |
175 | classRules: [v => !!v || "Class is required"], | 175 | classRules: [v => !!v || "Class is required"], |
176 | sectionRules: [v => !!v || "Class is required"], | 176 | sectionRules: [v => !!v || "Class is required"], |
177 | studentRules: [v => !!v || "Student is required"], | 177 | studentRules: [v => !!v || "Student is required"], |
178 | dataValid: [v => !!v || "Date is required"] | 178 | dataValid: [v => !!v || "Date is required"] |
179 | }), | 179 | }), |
180 | methods: { | 180 | methods: { |
181 | save(date) { | 181 | save(date) { |
182 | this.$refs.menu.save(date); | 182 | this.$refs.menu.save(date); |
183 | }, | 183 | }, |
184 | getAllClass() { | 184 | getAllClass() { |
185 | http() | 185 | http() |
186 | .get("/getClassesList", { | 186 | .get("/getClassesList", { |
187 | headers: { Authorization: "Bearer " + this.token } | 187 | headers: { Authorization: "Bearer " + this.token } |
188 | }) | 188 | }) |
189 | .then(response => { | 189 | .then(response => { |
190 | this.addclass = response.data.data; | 190 | this.addclass = response.data.data; |
191 | }) | 191 | }) |
192 | .catch(error => { | 192 | .catch(error => { |
193 | // console.log("err====>", err); | 193 | // console.log("err====>", err); |
194 | // this.$router.replace({ path: "/" }); | 194 | // this.$router.replace({ path: "/" }); |
195 | }); | 195 | }); |
196 | }, | 196 | }, |
197 | getCourses(classId) { | 197 | getCourses(classId) { |
198 | this.showLoader = true; | 198 | this.showLoader = true; |
199 | http() | 199 | http() |
200 | .get("/getCourseesList", { | 200 | .get("/getCourseesList", { |
201 | params: { | 201 | params: { |
202 | classId: classId | 202 | classId: classId |
203 | } | 203 | } |
204 | }) | 204 | }) |
205 | .then(response => { | 205 | .then(response => { |
206 | this.courseData = response.data.data; | 206 | this.courseData = response.data.data; |
207 | this.showLoader = false; | 207 | this.showLoader = false; |
208 | }) | 208 | }) |
209 | .catch(err => { | 209 | .catch(err => { |
210 | console.log("err====>", err); | 210 | console.log("err====>", err); |
211 | this.showLoader = false; | 211 | this.showLoader = false; |
212 | }); | 212 | }); |
213 | }, | 213 | }, |
214 | getStudents() { | 214 | getStudents() { |
215 | this.showLoader = true; | 215 | this.showLoader = true; |
216 | http() | 216 | http() |
217 | .get("/getStudentsList", { | 217 | .get("/getStudentsList", { |
218 | params: { | 218 | params: { |
219 | classId: this.getReport.classId | 219 | classId: this.getReport.classId |
220 | } | 220 | } |
221 | }) | 221 | }) |
222 | .then(response => { | 222 | .then(response => { |
223 | this.studentsData = response.data.data; | 223 | this.studentsData = response.data.data; |
224 | this.showLoader = false; | 224 | this.showLoader = false; |
225 | // this.addStudentAttendenceDialog = false; | 225 | // this.addStudentAttendenceDialog = false; |
226 | var attendence = ""; | 226 | var attendence = ""; |
227 | for (let i = 0; i < this.studentsData.length; i++) { | 227 | for (let i = 0; i < this.studentsData.length; i++) { |
228 | this.studentsData[i].attendence = true; | 228 | this.studentsData[i].attendence = true; |
229 | } | 229 | } |
230 | }) | 230 | }) |
231 | .catch(error => { | 231 | .catch(error => { |
232 | console.log("err====>", error); | 232 | console.log("err====>", error); |
233 | this.showLoader = false; | 233 | this.showLoader = false; |
234 | }); | 234 | }); |
235 | }, | 235 | }, |
236 | getStudentTable(id) { | 236 | getStudentTable(id) { |
237 | console.log("id", this.getReport.courseId); | 237 | console.log("id", this.getReport.courseId); |
238 | this.getStudents(); | 238 | this.getStudents(); |
239 | this.getParticularCourse(); | ||
239 | }, | 240 | }, |
240 | update() { | 241 | update() { |
241 | var studentsAttendence = []; | 242 | var studentsAttendence = []; |
242 | for (var j = 0; j < this.studentsData.length; j++) { | 243 | for (var j = 0; j < this.studentsData.length; j++) { |
243 | studentsAttendence.push({ | 244 | studentsAttendence.push({ |
244 | studentId: this.studentsData[j]._id, | 245 | studentId: this.studentsData[j]._id, |
245 | isPresent: this.studentsData[j].attendence | 246 | isPresent: this.studentsData[j].attendence |
246 | }); | 247 | }); |
247 | } | 248 | } |
248 | if (this.$refs.form.validate()) { | 249 | if (this.$refs.form.validate()) { |
249 | let attendanceData = { | 250 | let attendanceData = { |
250 | sectionId: this.getReport.sectionId, | 251 | sectionId: this.getReport.sectionId, |
251 | date: this.date, | 252 | date: this.date, |
252 | students: studentsAttendence | 253 | students: studentsAttendence |
253 | }; | 254 | }; |
254 | http() | 255 | http() |
255 | .put("/updateAttendance", attendanceData) | 256 | .put("/updateAttendance", attendanceData) |
256 | .then(response => { | 257 | .then(response => { |
257 | this.snackbar = true; | 258 | this.snackbar = true; |
258 | this.text = response.data.message; | 259 | this.text = response.data.message; |
259 | this.addStudentAttendenceDialog = false; | 260 | this.addStudentAttendenceDialog = false; |
260 | }) | 261 | }) |
261 | .catch(error => { | 262 | .catch(error => { |
262 | this.snackbar = true; | 263 | this.snackbar = true; |
263 | this.text = error.response.data.message; | 264 | this.text = error.response.data.message; |
264 | }); | 265 | }); |
265 | } | 266 | } |
266 | }, | 267 | }, |
267 | toggleAll() { | 268 | toggleAll() { |
268 | if (this.selected.length) this.selected = []; | 269 | if (this.selected.length) this.selected = []; |
269 | else this.selected = this.studentsData.slice(); | 270 | else this.selected = this.studentsData.slice(); |
270 | console.log("this.selected", this.selected); | 271 | console.log("this.selected", this.selected); |
271 | console.log("selected====", selected); | 272 | console.log("selected====", selected); |
272 | let selectedStudentsArray = []; | 273 | let selectedStudentsArray = []; |
273 | selectedStudentsArray.push(selected.id); | 274 | selectedStudentsArray.push({ studentId: selected.id }); |
274 | var payload = { | 275 | var payload = { |
275 | courseId: this.getReport.courseId, | 276 | courseId: this.getReport.courseId, |
276 | enrollStudents: selectedStudentsArray | 277 | enrollStudents: selectedStudentsArray |
277 | }; | 278 | }; |
278 | http() | 279 | http() |
279 | .put("/enrollStudents", payload) | 280 | .put("/enrollStudents", payload) |
280 | .then(response => { | 281 | .then(response => { |
281 | this.snackbar = true; | 282 | this.snackbar = true; |
282 | this.text = response.data.message; | 283 | this.text = response.data.message; |
283 | }) | 284 | }) |
284 | .catch(error => { | 285 | .catch(error => { |
285 | this.snackbar = true; | 286 | this.snackbar = true; |
286 | this.text = error.response.data.message; | 287 | this.text = error.response.data.message; |
287 | }); | 288 | }); |
288 | }, | 289 | }, |
289 | selectParticularStudent(selected) { | 290 | selectParticularStudent(selected) { |
290 | console.log("selected====", selected); | 291 | console.log("selected====", selected); |
291 | let selectedStudentsArray = []; | 292 | let selectedStudentsArray = []; |
292 | selectedStudentsArray.push(selected); | 293 | selectedStudentsArray.push({ studentId: selected }); |
293 | var payload = { | 294 | var payload = { |
294 | courseId: this.getReport.courseId, | 295 | courseId: this.getReport.courseId, |
295 | enrollStudents: selectedStudentsArray | 296 | enrollStudents: selectedStudentsArray |
296 | }; | 297 | }; |
297 | http() | 298 | http() |
298 | .put("/enrollStudents", payload) | 299 | .put("/enrollStudents", payload) |
299 | .then(response => { | 300 | .then(response => { |
300 | this.snackbar = true; | 301 | this.snackbar = true; |
301 | this.text = response.data.message; | 302 | this.text = response.data.message; |
302 | }) | 303 | }) |
303 | .catch(error => { | 304 | .catch(error => { |
304 | this.snackbar = true; | 305 | this.snackbar = true; |
305 | this.text = error.response.data.message; | 306 | this.text = error.response.data.message; |
306 | }); | 307 | }); |
307 | }, | 308 | }, |
309 | getParticularCourse() { | ||
310 | var payload = { | ||
311 | courseId: this.getReport.courseId | ||
312 | }; | ||
313 | http() | ||
314 | .get("/getParticularCourse", { | ||
315 | params: payload | ||
316 | }) | ||
317 | .then(response => { | ||
318 | conso.log("DTAAAAA", response.data.data); | ||
319 | this.snackbar = true; | ||
320 | this.text = response.data.message; | ||
321 | }) | ||
322 | .catch(error => { | ||
323 | this.snackbar = true; | ||
324 | this.text = error.response.data.message; | ||
325 | }); | ||
326 | }, | ||
308 | changeSort(column) { | 327 | changeSort(column) { |
309 | if (this.pagination.sortBy === column) { | 328 | if (this.pagination.sortBy === column) { |
310 | this.pagination.descending = !this.pagination.descending; | 329 | this.pagination.descending = !this.pagination.descending; |
311 | } else { | 330 | } else { |
312 | this.pagination.sortBy = column; | 331 | this.pagination.sortBy = column; |
313 | this.pagination.descending = false; | 332 | this.pagination.descending = false; |
314 | } | 333 | } |
315 | }, | 334 | }, |
316 | displaySearch() { | 335 | displaySearch() { |
317 | this.show = false; | 336 | this.show = false; |
318 | this.showSearch = true; | 337 | this.showSearch = true; |
319 | }, | 338 | }, |
320 | closeSearch() { | 339 | closeSearch() { |
321 | this.showSearch = false; | 340 | this.showSearch = false; |
322 | this.show = true; | 341 | this.show = true; |
323 | this.search = ""; | 342 | this.search = ""; |
324 | } | 343 | } |
325 | }, | 344 | }, |
326 | mounted() { | 345 | mounted() { |
327 | // this.getStudentList(); | 346 | // this.getStudentList(); |
328 | this.token = this.$store.state.token; | 347 | this.token = this.$store.state.token; |
329 | this.role = this.$store.state.role; | 348 | this.role = this.$store.state.role; |
330 | this.getAllClass(); | 349 | this.getAllClass(); |
331 | } | 350 | } |
332 | }; | 351 | }; |
333 | </script> | 352 | </script> |
src/pages/Dashboard/dashboard.vue
1 | <template> | 1 | <template> |
2 | <v-app id="pages-dasboard"> | 2 | <v-app id="pages-dasboard"> |
3 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> | 3 | <!-- ****** VIEW PROFIL NOTICE BOARD ****** --> |
4 | <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> | 4 | <!-- <v-dialog v-model="dialogNotice" max-width="940px" scrollable> |
5 | <v-card> | 5 | <v-card> |
6 | <v-toolbar color="grey lighten-2" flat> | 6 | <v-toolbar color="grey lighten-2" flat> |
7 | <v-spacer></v-spacer> | 7 | <v-spacer></v-spacer> |
8 | <v-toolbar-title> | 8 | <v-toolbar-title> |
9 | <h3>Notice Board</h3> | 9 | <h3>Notice Board</h3> |
10 | </v-toolbar-title> | 10 | </v-toolbar-title> |
11 | <v-spacer></v-spacer> | 11 | <v-spacer></v-spacer> |
12 | <v-icon @click="closeNotice">close</v-icon> | 12 | <v-icon @click="closeNotice">close</v-icon> |
13 | </v-toolbar> | 13 | </v-toolbar> |
14 | <v-card-text> | 14 | <v-card-text> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex align-center justify-center layout text-xs-center class="mt-2"> | 16 | <v-flex align-center justify-center layout text-xs-center class="mt-2"> |
17 | <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> | 17 | <img src="/static/icon/user.png" width="70px" v-if="!notice.eventImageUrl" /> |
18 | <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> | 18 | <img :src="notice.eventImageUrl" width="280px" v-else-if="notice.eventImageUrl" /> |
19 | </v-flex> | 19 | </v-flex> |
20 | </v-layout> | 20 | </v-layout> |
21 | <v-container grid-list-md> | 21 | <v-container grid-list-md> |
22 | <v-layout wrap> | 22 | <v-layout wrap> |
23 | <v-flex> | 23 | <v-flex> |
24 | <v-layout> | 24 | <v-layout> |
25 | <v-flex xs5 sm6> | 25 | <v-flex xs5 sm6> |
26 | <h5 class="right my-1"> | 26 | <h5 class="right my-1"> |
27 | <b>Title:</b> | 27 | <b>Title:</b> |
28 | </h5> | 28 | </h5> |
29 | </v-flex> | 29 | </v-flex> |
30 | <v-flex sm6 xs8> | 30 | <v-flex sm6 xs8> |
31 | <h5 class="my-1">{{ notice.title }}</h5> | 31 | <h5 class="my-1">{{ notice.title }}</h5> |
32 | </v-flex> | 32 | </v-flex> |
33 | </v-layout> | 33 | </v-layout> |
34 | <v-layout> | 34 | <v-layout> |
35 | <v-flex xs5 sm6> | 35 | <v-flex xs5 sm6> |
36 | <h5 class="right my-1"> | 36 | <h5 class="right my-1"> |
37 | <b>Description:</b> | 37 | <b>Description:</b> |
38 | </h5> | 38 | </h5> |
39 | </v-flex> | 39 | </v-flex> |
40 | <v-flex sm6 xs8> | 40 | <v-flex sm6 xs8> |
41 | <h5 class="my-1">{{ notice.description }}</h5> | 41 | <h5 class="my-1">{{ notice.description }}</h5> |
42 | </v-flex> | 42 | </v-flex> |
43 | </v-layout> | 43 | </v-layout> |
44 | </v-flex> | 44 | </v-flex> |
45 | </v-layout> | 45 | </v-layout> |
46 | </v-container> | 46 | </v-container> |
47 | </v-card-text> | 47 | </v-card-text> |
48 | </v-card> | 48 | </v-card> |
49 | </v-dialog>--> | 49 | </v-dialog>--> |
50 | <!-- <v-container fluid grid-list-xl> --> | 50 | <!-- <v-container fluid grid-list-xl> --> |
51 | <v-layout wrap> | 51 | <v-layout wrap> |
52 | <v-flex xs12> | 52 | <v-flex xs12> |
53 | <v-layout wrap row> | 53 | <v-layout wrap row> |
54 | <!-- ***** Total Students ***** --> | 54 | <!-- ***** Total Students ***** --> |
55 | <v-flex xs12 sm12 md9> | 55 | <v-flex xs12 sm12 md9> |
56 | <v-container fluid grid-list-xl> | 56 | <v-container fluid grid-list-xl> |
57 | <v-flex xs12 sm12 md12> | 57 | <v-flex xs12 sm12 md12> |
58 | <v-layout wrap class> | 58 | <v-layout wrap class> |
59 | <v-flex xs12 sm12 md3> | 59 | <v-flex xs12 sm12 md3> |
60 | <router-link :to="{ name:'Students' }"> | 60 | <router-link :to="{ name:'Students' }"> |
61 | <v-card class="card pink-bgcolor"> | 61 | <v-card class="card pink-bgcolor"> |
62 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> | 62 | <v-card-title primary-title class="titleCard white--text py-3">Students</v-card-title> |
63 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> | 63 | <img src="/static/icon/student.png" class="ml-2" width="40" alt="icons" /> |
64 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> | 64 | <v-card-title class="headline py-1 white--text">{{ students.length }}</v-card-title> |
65 | </v-card> | 65 | </v-card> |
66 | </router-link> | 66 | </router-link> |
67 | </v-flex> | 67 | </v-flex> |
68 | <!-- ***** Total Teachers***** --> | 68 | <!-- ***** Total Teachers***** --> |
69 | <v-flex xs12 sm12 md3> | 69 | <v-flex xs12 sm12 md3> |
70 | <router-link :to="{ name:'Teachers' }"> | 70 | <router-link :to="{ name:'Teachers' }"> |
71 | <v-card flat class="card elevation-2 firozi-bgcolor"> | 71 | <v-card flat class="card elevation-2 firozi-bgcolor"> |
72 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> | 72 | <v-card-title primary-title class="titleCard white--text py-3">Teachers</v-card-title> |
73 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> | 73 | <img src="/static/icon/teacher.png" class="ml-2" width="40" alt="icons" /> |
74 | 74 | ||
75 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> | 75 | <v-card-title class="headline py-1 white--text">{{ teachers.length }}</v-card-title> |
76 | </v-card> | 76 | </v-card> |
77 | </router-link> | 77 | </router-link> |
78 | </v-flex> | 78 | </v-flex> |
79 | <!-- ***** Total Parents ***** --> | 79 | <!-- ***** Total Parents ***** --> |
80 | <v-flex xs12 sm12 md3> | 80 | <v-flex xs12 sm12 md3> |
81 | <router-link :to="{ name:'Parents' }"> | 81 | <router-link :to="{ name:'Parents' }"> |
82 | <v-card flat class="card yellow darken-3"> | 82 | <v-card flat class="card yellow darken-3"> |
83 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> | 83 | <v-card-title primary-title class="titleCard white--text py-3">Parents</v-card-title> |
84 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> | 84 | <img src="/static/icon/parents.png" class="ml-3" width="40px" alt="icons" /> |
85 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> | 85 | <v-card-title class="headline py-1 white--text">{{ parents.length }}</v-card-title> |
86 | </v-card> | 86 | </v-card> |
87 | </router-link> | 87 | </router-link> |
88 | </v-flex> | 88 | </v-flex> |
89 | <!-- ***** Total Class***** --> | 89 | <!-- ***** Total Class***** --> |
90 | <v-flex xs12 sm12 md3> | 90 | <v-flex xs12 sm12 md3> |
91 | <router-link :to="{ name:'Class' }"> | 91 | <router-link :to="{ name:'Class' }"> |
92 | <v-card flat class="card darkBlue-bgcolor"> | 92 | <v-card flat class="card darkBlue-bgcolor"> |
93 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> | 93 | <v-card-title primary-title class="titleCard white--text py-3">Class</v-card-title> |
94 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> | 94 | <img src="/static/icon/class.png" width="40" alt="icons" class="ml-2" /> |
95 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> | 95 | <v-card-title class="headline py-1 white--text">{{ classes.length }}</v-card-title> |
96 | </v-card> | 96 | </v-card> |
97 | </router-link> | 97 | </router-link> |
98 | </v-flex> | 98 | </v-flex> |
99 | </v-layout> | 99 | </v-layout> |
100 | </v-flex> | 100 | </v-flex> |
101 | <v-layout> | 101 | <p |
102 | v-if="studentsData.length === 0 && role == 'PARENT'" | ||
103 | class="text-center title grey lighten-4 error--text" | ||
104 | >You have no student registered with scholl</p> | ||
105 | <v-layout v-if="role != 'PARENT'"> | ||
102 | <v-flex xs12> | 106 | <v-flex xs12> |
103 | <v-card class="card mt-2 account-Card"> | 107 | <v-card class="card mt-2 account-Card"> |
104 | <h4> | 108 | <h4> |
105 | <b>Account</b> | 109 | <b>Account</b> |
106 | </h4> | 110 | </h4> |
107 | <v-layout wrap> | 111 | <v-layout wrap> |
108 | <v-flex xs12 sm12 md3> | 112 | <v-flex xs12 sm12 md3> |
109 | <v-list two-line> | 113 | <v-list two-line> |
110 | <template> | 114 | <template> |
111 | <v-list-tile> | 115 | <v-list-tile> |
112 | <v-list-tile-avatar> | 116 | <v-list-tile-avatar> |
113 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> | 117 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> |
114 | </v-list-tile-avatar> | 118 | </v-list-tile-avatar> |
115 | <v-list-tile-content> | 119 | <v-list-tile-content> |
116 | <v-list-tile-title class="mt-2"> | 120 | <v-list-tile-title class="mt-2"> |
117 | <p class="subheading font-color">Fees</p> | 121 | <p class="subheading font-color">Fees</p> |
118 | </v-list-tile-title> | 122 | </v-list-tile-title> |
119 | <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> | 123 | <v-list-tile-title>Rs. {{ feeData.totalFees }}</v-list-tile-title> |
120 | </v-list-tile-content> | 124 | </v-list-tile-content> |
121 | </v-list-tile> | 125 | </v-list-tile> |
122 | <v-list-tile> | 126 | <v-list-tile> |
123 | <v-list-tile-avatar> | 127 | <v-list-tile-avatar> |
124 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> | 128 | <v-icon class="account-circle yellowDark-color">panorama_fish_eye</v-icon> |
125 | </v-list-tile-avatar> | 129 | </v-list-tile-avatar> |
126 | <v-list-tile-content> | 130 | <v-list-tile-content> |
127 | <v-list-tile-title class="mt-2"> | 131 | <v-list-tile-title class="mt-2"> |
128 | <p class="subheading font-color">Collection</p> | 132 | <p class="subheading font-color">Collection</p> |
129 | </v-list-tile-title> | 133 | </v-list-tile-title> |
130 | <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> | 134 | <v-list-tile-title>Rs. {{ feeData.totalCollection }}</v-list-tile-title> |
131 | </v-list-tile-content> | 135 | </v-list-tile-content> |
132 | </v-list-tile> | 136 | </v-list-tile> |
133 | <v-list-tile> | 137 | <v-list-tile> |
134 | <v-list-tile-avatar> | 138 | <v-list-tile-avatar> |
135 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> | 139 | <v-icon class="account-circle pink-color">panorama_fish_eye</v-icon> |
136 | </v-list-tile-avatar> | 140 | </v-list-tile-avatar> |
137 | <v-list-tile-content> | 141 | <v-list-tile-content> |
138 | <v-list-tile-title class="mt-2"> | 142 | <v-list-tile-title class="mt-2"> |
139 | <p class="subheading font-color">Expences</p> | 143 | <p class="subheading font-color">Expences</p> |
140 | </v-list-tile-title> | 144 | </v-list-tile-title> |
141 | <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> | 145 | <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> |
142 | </v-list-tile-content> | 146 | </v-list-tile-content> |
143 | </v-list-tile> | 147 | </v-list-tile> |
144 | </template> | 148 | </template> |
145 | </v-list> | 149 | </v-list> |
146 | </v-flex> | 150 | </v-flex> |
147 | <v-flex xs12 sm12 md9 lg9> | 151 | <v-flex xs12 sm12 md9 lg9> |
148 | <div id="chart"> | 152 | <div id="chart"> |
149 | <div v-if="this.series"> | 153 | <div v-if="this.series"> |
150 | <apexchart | 154 | <apexchart |
151 | type="bar" | 155 | type="bar" |
152 | height="250" | 156 | height="250" |
153 | style="max-width: 800px !important" | 157 | style="max-width: 800px !important" |
154 | :options="chartOptions" | 158 | :options="chartOptions" |
155 | :series="series" | 159 | :series="series" |
156 | v-show="true" | 160 | v-show="true" |
157 | ></apexchart> | 161 | ></apexchart> |
158 | </div> | 162 | </div> |
159 | </div> | 163 | </div> |
160 | </v-flex> | 164 | </v-flex> |
161 | </v-layout> | 165 | </v-layout> |
162 | </v-card> | 166 | </v-card> |
163 | </v-flex> | 167 | </v-flex> |
164 | </v-layout> | 168 | </v-layout> |
165 | <v-card class="mt-2 card"> | 169 | <v-card class="mt-2 card" v-if="role != 'PARENT'"> |
166 | <!-- <full-calendar | 170 | <!-- <full-calendar |
167 | ref="calendar" | 171 | ref="calendar" |
168 | defaultView="month" | 172 | defaultView="month" |
169 | droppable="false" | 173 | droppable="false" |
170 | :events="events" | 174 | :events="events" |
171 | :config="config" | 175 | :config="config" |
172 | ></full-calendar>--> | 176 | ></full-calendar>--> |
173 | <h4 class="pa-3"> | 177 | <h4 class="pa-3"> |
174 | <b>Notice</b> | 178 | <b>Notice</b> |
175 | </h4> | 179 | </h4> |
176 | 180 | ||
177 | <v-data-table | 181 | <v-data-table |
178 | :items="noticeData" | 182 | :items="noticeData" |
179 | class="elevation-0" | 183 | class="elevation-0" |
180 | flat | 184 | flat |
181 | hide-actions | 185 | hide-actions |
182 | hide-headers | 186 | hide-headers |
183 | style="border-spacing: 0 !important;" | 187 | style="border-spacing: 0 !important;" |
184 | > | 188 | > |
185 | <template | 189 | <template |
186 | slot="items" | 190 | slot="items" |
187 | slot-scope="props" | 191 | slot-scope="props" |
188 | v-if="props.index < 5" | 192 | v-if="props.index < 5" |
189 | style="border-spacing: 0 !important;" | 193 | style="border-spacing: 0 !important;" |
190 | > | 194 | > |
191 | <tr class="td-notice"> | 195 | <tr class="td-notice"> |
192 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | 196 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> |
193 | <td> | 197 | <td> |
194 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | 198 | <span class="grey--text caption">{{ date(props.item.created) }}</span> |
195 | <br /> | 199 | <br /> |
196 | <span class="body-2">{{ props.item.title}}</span> | 200 | <span class="body-2">{{ props.item.title}}</span> |
197 | </td> | 201 | </td> |
198 | <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> | 202 | <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> |
199 | 203 | ||
200 | <td class="text-xs-center"> | 204 | <td class="text-xs-center"> |
201 | <span> | 205 | <span> |
202 | <v-tooltip top> | 206 | <v-tooltip top> |
203 | <img | 207 | <img |
204 | slot="activator" | 208 | slot="activator" |
205 | style="cursor:pointer; width:25px; height:25px; " | 209 | style="cursor:pointer; width:25px; height:25px; " |
206 | @click="profile" | 210 | @click="profile" |
207 | src="/static/icon/view.png" | 211 | src="/static/icon/view.png" |
208 | /> | 212 | /> |
209 | <span>View</span> | 213 | <span>View</span> |
210 | </v-tooltip> | 214 | </v-tooltip> |
211 | </span> | 215 | </span> |
212 | </td> | 216 | </td> |
213 | </tr> | 217 | </tr> |
214 | </template> | 218 | </template> |
215 | </v-data-table> | 219 | </v-data-table> |
216 | </v-card> | 220 | </v-card> |
221 | <!-- COURSES --> | ||
222 | <v-layout v-if="role == 'PARENT'"> | ||
223 | <v-flex xs12> | ||
224 | <v-card class="card mt-2 account-Card"> | ||
225 | <h4> | ||
226 | <b>My Courses</b> | ||
227 | </h4> | ||
228 | <v-layout wrap> | ||
229 | <v-flex xs12 sm12> | ||
230 | <v-list two-line> | ||
231 | <template> | ||
232 | <v-list-tile v-for="(course,i) in courseData" :key="i"> | ||
233 | <v-list-tile-avatar> | ||
234 | <v-icon class="account-circle darkBlue-color">panorama_fish_eye</v-icon> | ||
235 | </v-list-tile-avatar> | ||
236 | <v-list-tile-content> | ||
237 | <v-list-tile-title>{{ course.coursrName }}</v-list-tile-title> | ||
238 | </v-list-tile-content> | ||
239 | </v-list-tile> | ||
240 | </template> | ||
241 | </v-list> | ||
242 | </v-flex> | ||
243 | </v-layout> | ||
244 | </v-card> | ||
245 | </v-flex> | ||
246 | </v-layout> | ||
247 | <v-layout v-if="role == 'PARENT'"> | ||
248 | <v-flex xs6> | ||
249 | <v-card class="mt-2 card"> | ||
250 | <h4 class="pa-3"> | ||
251 | <b>Latest Annoucements</b> | ||
252 | </h4> | ||
253 | |||
254 | <v-data-table | ||
255 | :items="annoucementData" | ||
256 | class="elevation-0" | ||
257 | flat | ||
258 | hide-actions | ||
259 | hide-headers | ||
260 | style="border-spacing: 0 !important;" | ||
261 | > | ||
262 | <template | ||
263 | slot="items" | ||
264 | slot-scope="props" | ||
265 | v-if="props.index < 5" | ||
266 | style="border-spacing: 0 !important;" | ||
267 | > | ||
268 | <tr class="td-notice"> | ||
269 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | ||
270 | <td> | ||
271 | <span class="grey--text caption">{{ date(props.item.created) }}</span> | ||
272 | <br /> | ||
273 | <span class="body-2">{{ props.item.discussionType}}</span> | ||
274 | </td> | ||
275 | <td class="text-xs-center"> | ||
276 | <span> | ||
277 | <v-tooltip top> | ||
278 | <img | ||
279 | slot="activator" | ||
280 | style="cursor:pointer; width:25px; height:25px; " | ||
281 | src="/static/icon/view.png" | ||
282 | /> | ||
283 | <span>View</span> | ||
284 | </v-tooltip> | ||
285 | </span> | ||
286 | </td> | ||
287 | </tr> | ||
288 | </template> | ||
289 | </v-data-table> | ||
290 | </v-card> | ||
291 | </v-flex> | ||
292 | <v-flex xs6> | ||
293 | <v-card class="mt-2 card"> | ||
294 | <h4 class="pa-3"> | ||
295 | <b>Online User</b> | ||
296 | </h4> | ||
297 | |||
298 | <v-data-table | ||
299 | :items="onlineUser" | ||
300 | class="elevation-0" | ||
301 | flat | ||
302 | hide-actions | ||
303 | hide-headers | ||
304 | style="border-spacing: 0 !important;" | ||
305 | > | ||
306 | <template | ||
307 | slot="items" | ||
308 | slot-scope="props" | ||
309 | v-if="props.index < 5" | ||
310 | style="border-spacing: 0 !important;" | ||
311 | > | ||
312 | <tr class="td-notice"> | ||
313 | <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | ||
314 | <td> | ||
315 | <span class="body-2">{{ props.item.user }}</span> | ||
316 | </td> | ||
317 | <td class="text-xs-center"> | ||
318 | <span> | ||
319 | <v-tooltip top> | ||
320 | <img | ||
321 | slot="activator" | ||
322 | style="cursor:pointer; width:25px; height:25px; " | ||
323 | src="/static/icon/view.png" | ||
324 | /> | ||
325 | <span>View</span> | ||
326 | </v-tooltip> | ||
327 | </span> | ||
328 | </td> | ||
329 | </tr> | ||
330 | </template> | ||
331 | </v-data-table> | ||
332 | </v-card> | ||
333 | </v-flex> | ||
334 | </v-layout> | ||
217 | </v-container> | 335 | </v-container> |
218 | </v-flex> | 336 | </v-flex> |
219 | <v-flex xs12 sm12 md3> | 337 | <v-flex xs12 sm12 md3> |
220 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> | 338 | <v-card height="100%" class="elevation-0 mt-3 profileDasboard"> |
221 | <v-card-text> | 339 | <v-card-text> |
222 | <h4 class="text-xs-center py-3"> | 340 | <h4 class="text-xs-center py-3"> |
223 | <b>Profile</b> | 341 | <b>Profile</b> |
224 | </h4> | 342 | </h4> |
225 | <v-flex xs12 class="py-3"> | 343 | <v-flex xs12 class="py-3"> |
226 | <v-layout wrap> | 344 | <v-layout wrap> |
227 | <v-flex xs12 sm12 md4> | 345 | <v-flex xs12 sm12 md4> |
228 | <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> | 346 | <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> |
229 | <img | 347 | <img |
230 | :src="userData.schoolLogoUrl" | 348 | :src="userData.schoolLogoUrl" |
231 | v-else-if="userData.schoolLogoUrl" | 349 | v-else-if="userData.schoolLogoUrl" |
232 | width="80" | 350 | width="80" |
233 | /> | 351 | /> |
234 | </v-flex> | 352 | </v-flex> |
235 | <v-flex xs12 sm12 md6> | 353 | <v-flex xs12 sm12 md6> |
236 | <p class="mb-0 body-1"> | 354 | <p class="mb-0 body-1"> |
237 | <i>{{ userData.name }}</i> | 355 | <i>{{ userData.name }}</i> |
238 | </p> | 356 | </p> |
239 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> | 357 | <p class="mb-0 caption grey--text">{{ userData.email }}</p> |
240 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> | 358 | <p class="mb-0 caption grey--text">{{ userData.mobile }}</p> |
241 | <address class="caption grey--text mb-3">{{ userData.address }}</address> | 359 | <address class="caption grey--text mb-3">{{ userData.address }}</address> |
242 | </v-flex> | 360 | </v-flex> |
243 | </v-layout> | 361 | </v-layout> |
244 | </v-flex> | 362 | </v-flex> |
245 | <hr /> | 363 | <hr /> |
246 | <h4 class="text-xs-center py-3"> | 364 | <h4 class="text-xs-center py-3"> |
247 | <b>Calender</b> | 365 | <b>Calender</b> |
248 | </h4> | 366 | </h4> |
249 | <vue-event-calendar :events="demoEvents"></vue-event-calendar> | 367 | <vue-event-calendar :events="demoEvents"></vue-event-calendar> |
250 | </v-card-text> | 368 | </v-card-text> |
251 | </v-card> | 369 | </v-card> |
252 | </v-flex> | 370 | </v-flex> |
253 | </v-layout> | 371 | </v-layout> |
254 | </v-flex> | 372 | </v-flex> |
255 | </v-layout> | 373 | </v-layout> |
256 | <v-dialog v-model="dialog" max-width="500"> | 374 | <v-dialog v-model="dialog" max-width="500"> |
257 | <v-card color="grey lighten-4" flat> | 375 | <v-card color="grey lighten-4" flat> |
258 | <v-toolbar dark color="fixcolors"> | 376 | <v-toolbar dark color="fixcolors"> |
259 | <v-spacer></v-spacer> | 377 | <v-spacer></v-spacer> |
260 | <v-btn icon @click="dialog= false"> | 378 | <v-btn icon @click="dialog= false"> |
261 | <v-icon>close</v-icon> | 379 | <v-icon>close</v-icon> |
262 | </v-btn> | 380 | </v-btn> |
263 | </v-toolbar> | 381 | </v-toolbar> |
264 | <v-flex class="py-4"> | 382 | <v-flex class="py-4"> |
265 | <v-list-tile> | 383 | <v-list-tile> |
266 | <v-list-tile-action> | 384 | <v-list-tile-action> |
267 | <v-icon>edit</v-icon> | 385 | <v-icon>edit</v-icon> |
268 | </v-list-tile-action> | 386 | </v-list-tile-action> |
269 | <v-list-tile-content> | 387 | <v-list-tile-content> |
270 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> | 388 | <v-list-tile-title>{{ selected.title }}</v-list-tile-title> |
271 | </v-list-tile-content> | 389 | </v-list-tile-content> |
272 | </v-list-tile> | 390 | </v-list-tile> |
273 | <v-list-tile> | 391 | <v-list-tile> |
274 | <v-list-tile-action> | 392 | <v-list-tile-action> |
275 | <v-icon>access_time</v-icon> | 393 | <v-icon>access_time</v-icon> |
276 | </v-list-tile-action> | 394 | </v-list-tile-action> |
277 | <v-list-tile-content> | 395 | <v-list-tile-content> |
278 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> | 396 | <v-list-tile-title>{{ date(selected.start)}}</v-list-tile-title> |
279 | </v-list-tile-content> | 397 | </v-list-tile-content> |
280 | </v-list-tile> | 398 | </v-list-tile> |
281 | </v-flex> | 399 | </v-flex> |
282 | </v-card> | 400 | </v-card> |
283 | </v-dialog> | 401 | </v-dialog> |
284 | <div class="loader" v-if="showLoader"> | 402 | <div class="loader" v-if="showLoader"> |
285 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 403 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
286 | </div> | 404 | </div> |
287 | </v-app> | 405 | </v-app> |
288 | </template> | 406 | </template> |
289 | 407 | ||
290 | <script> | 408 | <script> |
291 | import http from "@/Services/http.js"; | 409 | import http from "@/Services/http.js"; |
292 | import moment from "moment"; | 410 | import moment from "moment"; |
293 | // import { FunctionalCalendar } from "vue-functional-calendar"; | 411 | // import { FunctionalCalendar } from "vue-functional-calendar"; |
294 | 412 | ||
295 | export default { | 413 | export default { |
296 | components: { | 414 | components: { |
297 | // FunctionalCalendar | 415 | // FunctionalCalendar |
298 | }, | 416 | }, |
299 | data() { | 417 | data() { |
300 | return { | 418 | return { |
301 | // data: { | 419 | // data: { |
302 | // clieckedToday: false | 420 | // clieckedToday: false |
303 | // }, | 421 | // }, |
304 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], | 422 | // markedDates: ["16/4/2019", "18/4/2019", "20/4/2019", "21/4/2019"], |
305 | // calendarData: {}, | 423 | // calendarData: {}, |
306 | // calendar: {}, | 424 | // calendar: {}, |
307 | demoEvents: [ | 425 | demoEvents: [ |
308 | { | 426 | { |
309 | date: "2020/01/10", // Required | 427 | date: "2020/01/10", // Required |
310 | title: "Foo" // Required | 428 | title: "Foo" // Required |
311 | }, | 429 | }, |
312 | { | 430 | { |
313 | date: "2020/01/12", | 431 | date: "2020/01/12", |
314 | title: "Bar", | 432 | title: "Bar", |
315 | desc: "description", | 433 | desc: "description", |
316 | customClass: "disabled highlight" // Custom classes to an calendar cell | 434 | customClass: "disabled highlight" // Custom classes to an calendar cell |
317 | } | 435 | } |
318 | ], | 436 | ], |
319 | 437 | onlineUser: [ | |
438 | { | ||
439 | user: "Student Demo" | ||
440 | }, | ||
441 | { | ||
442 | user: "Teacher Demo" | ||
443 | }, | ||
444 | { | ||
445 | user: "Priyansh Gupta" | ||
446 | }, | ||
447 | { | ||
448 | user: "Gaurav Aggarwal" | ||
449 | }, | ||
450 | { | ||
451 | user: "Approve Arorra" | ||
452 | } | ||
453 | ], | ||
320 | showLoader: false, | 454 | showLoader: false, |
321 | calendarData: {}, | 455 | calendarData: {}, |
322 | dialog: false, | 456 | dialog: false, |
323 | dialogNotice: false, | 457 | dialogNotice: false, |
324 | HolidaysList: [], | 458 | HolidaysList: [], |
325 | EventsList: [], | 459 | EventsList: [], |
326 | events: [], | 460 | events: [], |
327 | config: { | 461 | config: { |
328 | eventClick: event => { | 462 | eventClick: event => { |
329 | this.selected = event; | 463 | this.selected = event; |
330 | this.dialog = true; | 464 | this.dialog = true; |
331 | } | 465 | } |
332 | }, | 466 | }, |
333 | selected: {}, | 467 | selected: {}, |
334 | barGraph: [], | 468 | barGraph: [], |
335 | // notice: {}, | 469 | // notice: {}, |
336 | userData: {}, | 470 | userData: {}, |
337 | dated: new Date(2018, 0, 9), | 471 | dated: new Date(2018, 0, 9), |
338 | userList: [], | 472 | userList: [], |
339 | sectionList: [], | 473 | sectionList: [], |
340 | students: "", | 474 | students: "", |
341 | parents: "", | 475 | parents: "", |
342 | teachers: "", | 476 | teachers: "", |
343 | classes: "", | 477 | classes: "", |
344 | noticeData: [], | 478 | noticeData: [], |
345 | expenseData: [], | 479 | expenseData: [], |
346 | feeData: [], | 480 | feeData: [], |
347 | collectionData: [], | 481 | collectionData: [], |
348 | 482 | courseData: [], | |
483 | studentsData: [], | ||
484 | annoucementData: [], | ||
485 | role: "", | ||
349 | attrs: [ | 486 | attrs: [ |
350 | { | 487 | { |
351 | key: "today", | 488 | key: "today", |
352 | highlight: true, | 489 | highlight: true, |
353 | dates: new Date() | 490 | dates: new Date() |
354 | } | 491 | } |
355 | ], | 492 | ], |
356 | drawer: true, | 493 | drawer: true, |
357 | items: [ | 494 | items: [ |
358 | { title: "Home", icon: "dashboard" }, | 495 | { title: "Home", icon: "dashboard" }, |
359 | { title: "About", icon: "question_answer" } | 496 | { title: "About", icon: "question_answer" } |
360 | ], | 497 | ], |
361 | right: null, | 498 | right: null, |
362 | 499 | ||
363 | series: [ | 500 | series: [ |
364 | { | 501 | { |
365 | name: "Total", | 502 | name: "Total", |
366 | data: [] | 503 | data: [] |
367 | } | 504 | } |
368 | ], | 505 | ], |
369 | chartOptions: { | 506 | chartOptions: { |
370 | chart: { | 507 | chart: { |
371 | type: "bar", | 508 | type: "bar", |
372 | height: 150, | 509 | height: 150, |
373 | stacked: true | 510 | stacked: true |
374 | // animations: { | 511 | // animations: { |
375 | // enabled: true, | 512 | // enabled: true, |
376 | // easing: "easeinout", | 513 | // easing: "easeinout", |
377 | // speed: 1200, | 514 | // speed: 1200, |
378 | // animateGradually: { | 515 | // animateGradually: { |
379 | // enabled: true, | 516 | // enabled: true, |
380 | // delay: 450 | 517 | // delay: 450 |
381 | // }, | 518 | // }, |
382 | // dynamicAnimation: { | 519 | // dynamicAnimation: { |
383 | // enabled: true, | 520 | // enabled: true, |
384 | // speed: 450 | 521 | // speed: 450 |
385 | // } | 522 | // } |
386 | // } | 523 | // } |
387 | }, | 524 | }, |
388 | plotOptions: { | 525 | plotOptions: { |
389 | bar: { | 526 | bar: { |
390 | horizontal: false, | 527 | horizontal: false, |
391 | columnWidth: "25%", | 528 | columnWidth: "25%", |
392 | // endingShape: "rounded", | 529 | // endingShape: "rounded", |
393 | distributed: true | 530 | distributed: true |
394 | } | 531 | } |
395 | }, | 532 | }, |
396 | responsive: [ | 533 | responsive: [ |
397 | { | 534 | { |
398 | breakpoint: 480, | 535 | breakpoint: 480, |
399 | options: { | 536 | options: { |
400 | legend: { | 537 | legend: { |
401 | position: "bottom", | 538 | position: "bottom", |
402 | offsetX: -10, | 539 | offsetX: -10, |
403 | offsetY: 0 | 540 | offsetY: 0 |
404 | } | 541 | } |
405 | } | 542 | } |
406 | } | 543 | } |
407 | ], | 544 | ], |
408 | legend: { | 545 | legend: { |
409 | show: false | 546 | show: false |
410 | }, | 547 | }, |
411 | colors: ["#7852cc", "#f9a825", "#ff8a89"], | 548 | colors: ["#7852cc", "#f9a825", "#ff8a89"], |
412 | dataLabels: { | 549 | dataLabels: { |
413 | enabled: false | 550 | enabled: false |
414 | }, | 551 | }, |
415 | stroke: { | 552 | stroke: { |
416 | show: true, | 553 | show: true, |
417 | width: 2, | 554 | width: 2, |
418 | colors: ["transparent"] | 555 | colors: ["transparent"] |
419 | }, | 556 | }, |
420 | xaxis: { | 557 | xaxis: { |
421 | categories: ["Fee", "Collections", "Expences"] | 558 | categories: ["Fee", "Collections", "Expences"] |
422 | }, | 559 | }, |
423 | yaxis: { | 560 | yaxis: { |
424 | title: { | 561 | title: { |
425 | text: "" | 562 | text: "" |
426 | } | 563 | } |
427 | }, | 564 | }, |
428 | fill: { | 565 | fill: { |
429 | opacity: 1 | 566 | opacity: 1 |
430 | }, | 567 | }, |
431 | tooltip: { | 568 | tooltip: { |
432 | y: { | 569 | y: { |
433 | formatter: function(val, opts) { | 570 | formatter: function(val, opts) { |
434 | // console.log("opts",opts.w.config.xaxis.categories) | 571 | // console.log("opts",opts.w.config.xaxis.categories) |
435 | return "" + val + " "; | 572 | return "" + val + " "; |
436 | } | 573 | } |
437 | } | 574 | } |
438 | } | 575 | } |
439 | } | 576 | } |
440 | }; | 577 | }; |
441 | }, | 578 | }, |
442 | mounted() { | 579 | mounted() { |
443 | // = this.$store.state.schoolToken; | 580 | // = this.$store.state.schoolToken; |
444 | // console.log("this.$store.state.role", this.token); | 581 | // console.log("this.$store.state.role", this.token); |
445 | if (this.$store.state.role === "ADMIN") { | 582 | if (this.$store.state.role === "ADMIN") { |
446 | this.token = this.$store.state.token; | 583 | this.token = this.$store.state.token; |
447 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { | 584 | } else if (this.$store.state.schoolRole === "SUPERADMIN") { |
448 | this.token = this.$store.state.schoolToken; | 585 | this.token = this.$store.state.schoolToken; |
449 | } else if (this.$store.state.role === "TEACHER") { | 586 | } else if (this.$store.state.role === "TEACHER") { |
450 | this.token = this.$store.state.token; | 587 | this.token = this.$store.state.token; |
451 | } else if (this.$store.state.role === "ACCOUNTANT") { | 588 | } else if (this.$store.state.role === "ACCOUNTANT") { |
452 | this.token = this.$store.state.token; | 589 | this.token = this.$store.state.token; |
453 | } else if (this.$store.state.role === "LIBRARIAN") { | 590 | } else if (this.$store.state.role === "LIBRARIAN") { |
454 | this.token = this.$store.state.token; | 591 | this.token = this.$store.state.token; |
592 | } else if (this.$store.state.role === "PARENT") { | ||
593 | this.token = this.$store.state.token; | ||
455 | } | 594 | } |
595 | this.role = this.$store.state.role; | ||
456 | // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken); | 596 | // console.log("role", this.$store.state.schoolRole,"tt",this.$store.state.schoolToken); |
457 | // this.getData(); | 597 | // this.getData(); |
458 | this.getStudents(); | 598 | this.getStudents(); |
459 | this.getTeachers(); | 599 | this.getTeachers(); |
460 | this.getParents(); | 600 | this.getParents(); |
461 | this.getClasses(); | 601 | this.getClasses(); |
462 | this.getNoticeData(); | 602 | this.getNoticeData(); |
463 | this.getUserData(); | 603 | this.getUserData(); |
464 | this.getFeesAndCollectionsData(); | 604 | this.getFeesAndCollectionsData(); |
465 | this.getExpensesData(); | 605 | this.getExpensesData(); |
606 | this.getparentStudents(); | ||
466 | // this.getUsersList(); | 607 | // this.getUsersList(); |
467 | }, | 608 | }, |
468 | methods: { | 609 | methods: { |
469 | closeNotice() { | 610 | closeNotice() { |
470 | this.dialogNotice = false; | 611 | this.dialogNotice = false; |
471 | }, | 612 | }, |
472 | profile() { | 613 | profile() { |
473 | // this.editedIndex = this.desserts.indexOf(item); | 614 | // this.editedIndex = this.desserts.indexOf(item); |
474 | // this.notice = Object.assign({}, item); | 615 | // this.notice = Object.assign({}, item); |
475 | // this.dialogNotice = true; | 616 | // this.dialogNotice = true; |
476 | this.$router.push({ name: "NoticeBoard" }); | 617 | this.$router.push({ name: "NoticeBoard" }); |
477 | }, | 618 | }, |
478 | date: function(date) { | 619 | date: function(date) { |
479 | return moment(date).format("MMMM DD, YYYY HH:mm"); | 620 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
480 | }, | 621 | }, |
481 | refreshEvents() { | 622 | refreshEvents() { |
482 | this.$refs.calendar.$emit("refetch-events"); | 623 | this.$refs.calendar.$emit("refetch-events"); |
483 | }, | 624 | }, |
484 | removeEvent() { | 625 | removeEvent() { |
485 | this.$refs.calendar.$emit("remove-event", this.selected); | 626 | this.$refs.calendar.$emit("remove-event", this.selected); |
486 | this.selected = {}; | 627 | this.selected = {}; |
487 | }, | 628 | }, |
488 | eventSelected(event) { | 629 | eventSelected(event) { |
489 | this.selected = event; | 630 | this.selected = event; |
490 | console.log("this.selected", this.selected); | 631 | console.log("this.selected", this.selected); |
491 | }, | 632 | }, |
492 | // eventDropStart: function(event) { | 633 | // eventDropStart: function(event) { |
493 | // event.editable = false; | 634 | // event.editable = false; |
494 | // }, | 635 | // }, |
495 | eventCreated(...test) { | 636 | eventCreated(...test) { |
496 | console.log(test); | 637 | console.log(test); |
497 | }, | 638 | }, |
498 | getStudents() { | 639 | getStudents() { |
499 | http() | 640 | http() |
500 | .get("/getStudentsList", { | 641 | .get("/getStudentsList", { |
501 | headers: { | 642 | headers: { |
502 | Authorization: "Bearer " + this.token | 643 | Authorization: "Bearer " + this.token |
503 | } | 644 | } |
504 | }) | 645 | }) |
505 | .then(response => { | 646 | .then(response => { |
506 | this.students = response.data.data; | 647 | this.students = response.data.data; |
507 | this.showLoader = false; | 648 | this.showLoader = false; |
508 | }) | 649 | }) |
509 | .catch(error => { | 650 | .catch(error => { |
510 | // console.log("err====>", err); | 651 | // console.log("err====>", err); |
511 | this.showLoader = false; | 652 | this.showLoader = false; |
512 | if (error.response.status === 401) { | 653 | if (error.response.status === 401) { |
513 | this.$router.replace({ path: "/" }); | 654 | this.$router.replace({ path: "/" }); |
514 | this.$store.dispatch("setToken", null); | 655 | this.$store.dispatch("setToken", null); |
515 | this.$store.dispatch("Id", null); | 656 | this.$store.dispatch("Id", null); |
516 | } | 657 | } |
517 | }); | 658 | }); |
518 | }, | 659 | }, |
519 | getParents() { | 660 | getParents() { |
520 | http() | 661 | http() |
521 | .get("/getParentsList", { | 662 | .get("/getParentsList", { |
522 | headers: { | 663 | headers: { |
523 | Authorization: "Bearer " + this.token | 664 | Authorization: "Bearer " + this.token |
524 | } | 665 | } |
525 | }) | 666 | }) |
526 | .then(response => { | 667 | .then(response => { |
527 | this.parents = response.data.data; | 668 | this.parents = response.data.data; |
528 | this.showLoader = false; | 669 | this.showLoader = false; |
529 | }) | 670 | }) |
530 | .catch(error => { | 671 | .catch(error => { |
531 | // console.log("err====>", err); | 672 | // console.log("err====>", err); |
532 | this.showLoader = false; | 673 | this.showLoader = false; |
533 | }); | 674 | }); |
534 | }, | 675 | }, |
535 | getTeachers() { | 676 | getTeachers() { |
536 | http() | 677 | http() |
537 | .get("/getTeachersList", { | 678 | .get("/getTeachersList", { |
538 | headers: { | 679 | headers: { |
539 | Authorization: "Bearer " + this.token | 680 | Authorization: "Bearer " + this.token |
540 | } | 681 | } |
541 | }) | 682 | }) |
542 | .then(response => { | 683 | .then(response => { |
543 | this.teachers = response.data.data; | 684 | this.teachers = response.data.data; |
544 | this.showLoader = false; | 685 | this.showLoader = false; |
545 | }) | 686 | }) |
546 | .catch(error => { | 687 | .catch(error => { |
547 | // console.log("err====>", err); | 688 | // console.log("err====>", err); |
548 | this.showLoader = false; | 689 | this.showLoader = false; |
549 | }); | 690 | }); |
550 | }, | 691 | }, |
551 | getClasses() { | 692 | getClasses() { |
552 | http() | 693 | http() |
553 | .get("/getClassesList", { | 694 | .get("/getClassesList", { |
554 | headers: { | 695 | headers: { |
555 | Authorization: "Bearer " + this.token | 696 | Authorization: "Bearer " + this.token |
556 | } | 697 | } |
557 | }) | 698 | }) |
558 | .then(response => { | 699 | .then(response => { |
559 | this.classes = response.data.data; | 700 | this.classes = response.data.data; |
560 | this.showLoader = false; | 701 | this.showLoader = false; |
561 | }) | 702 | }) |
562 | .catch(error => { | 703 | .catch(error => { |
563 | this.showLoader = false; | 704 | this.showLoader = false; |
564 | }); | 705 | }); |
565 | }, | 706 | }, |
566 | getNoticeData() { | 707 | getNoticeData() { |
567 | this.showLoader = true; | 708 | this.showLoader = true; |
568 | http() | 709 | http() |
569 | .get("/getEventsList", { | 710 | .get("/getEventsList", { |
570 | headers: { | 711 | headers: { |
571 | Authorization: "Bearer " + this.token | 712 | Authorization: "Bearer " + this.token |
572 | } | 713 | } |
573 | }) | 714 | }) |
574 | .then(response => { | 715 | .then(response => { |
575 | this.noticeData = response.data.data; | 716 | this.noticeData = response.data.data; |
576 | this.showLoader = false; | 717 | this.showLoader = false; |
577 | }) | 718 | }) |
578 | .catch(error => { | 719 | .catch(error => { |
579 | this.showLoader = false; | 720 | this.showLoader = false; |
580 | }); | 721 | }); |
581 | }, | 722 | }, |
582 | getUserData() { | 723 | getUserData() { |
583 | // this.showLoader = true; | 724 | // this.showLoader = true; |
584 | http() | 725 | http() |
585 | .get("/getParticularUserDetail", { | 726 | .get("/getParticularUserDetail", { |
586 | headers: { | 727 | headers: { |
587 | Authorization: "Bearer " + this.token | 728 | Authorization: "Bearer " + this.token |
588 | } | 729 | } |
589 | }) | 730 | }) |
590 | .then(response => { | 731 | .then(response => { |
591 | this.userData = response.data.data; | 732 | this.userData = response.data.data; |
592 | this.showLoader = false; | 733 | this.showLoader = false; |
593 | }) | 734 | }) |
594 | .catch(error => { | 735 | .catch(error => { |
595 | this.showLoader = false; | 736 | this.showLoader = false; |
596 | }); | 737 | }); |
597 | }, | 738 | }, |
598 | 739 | ||
599 | getFeesAndCollectionsData() { | 740 | getFeesAndCollectionsData() { |
600 | http() | 741 | http() |
601 | .get("/getTotalFeesAndCollections", { | 742 | .get("/getTotalFeesAndCollections", { |
602 | headers: { | 743 | headers: { |
603 | Authorization: "Bearer " + this.token | 744 | Authorization: "Bearer " + this.token |
604 | } | 745 | } |
605 | }) | 746 | }) |
606 | .then(response => { | 747 | .then(response => { |
607 | this.feeData = response.data.data; | 748 | this.feeData = response.data.data; |
608 | // this.collectionData = response.data.data; | 749 | // this.collectionData = response.data.data; |
609 | this.series[0].data[0] = this.feeData.totalFees; | 750 | this.series[0].data[0] = this.feeData.totalFees; |
610 | this.series[0].data[1] = this.feeData.totalCollection; | 751 | this.series[0].data[1] = this.feeData.totalCollection; |
611 | console.log("this.series====", this.series); | 752 | // console.log("this.series====", this.series); |
612 | 753 | ||
613 | this.showLoader = false; | 754 | this.showLoader = false; |
614 | }) | 755 | }) |
615 | .catch(error => { | 756 | .catch(error => { |
616 | this.showLoader = false; | 757 | this.showLoader = false; |
617 | }); | 758 | }); |
618 | }, | 759 | }, |
619 | getExpensesData() { | 760 | getExpensesData() { |
620 | http() | 761 | http() |
621 | .get("/getTotalExpenses", { | 762 | .get("/getTotalExpenses", { |
622 | headers: { | 763 | headers: { |
623 | Authorization: "Bearer " + this.token | 764 | Authorization: "Bearer " + this.token |
624 | } | 765 | } |
625 | }) | 766 | }) |
626 | .then(response => { | 767 | .then(response => { |
627 | this.expenseData = response.data.data; | 768 | this.expenseData = response.data.data; |
628 | // var array = response.data.data.sum; | 769 | // var array = response.data.data.sum; |
629 | this.series[0].data[2] = this.expenseData.sum; | 770 | this.series[0].data[2] = this.expenseData.sum; |
630 | // this.series = [ | 771 | // this.series = [ |
631 | // { | 772 | // { |
632 | // name: "Total", | 773 | // name: "Total", |
633 | // data: array | 774 | // data: array |
634 | // } | 775 | // } |
635 | // ]; | 776 | // ]; |
636 | // console.log("this.series====", this.series); | 777 | // console.log("this.series====", this.series); |
637 | this.showLoader = false; | 778 | this.showLoader = false; |
638 | }) | 779 | }) |
639 | .catch(error => { | 780 | .catch(error => { |
640 | this.showLoader = false; | 781 | this.showLoader = false; |
641 | }); | 782 | }); |
783 | }, | ||
784 | getparentStudents() { | ||
785 | this.showLoader = true; | ||
786 | http() | ||
787 | .get("/parentStudentsList") | ||
788 | .then(response => { | ||
789 | // console.log("resssssss", response.data.data.students[0].classId); | ||
790 | this.studentsData = response.data.data; | ||
791 | // localStorage.setItem( | ||
792 | // "parentStudentId", | ||
793 | // this.studentsData.students[0]._id | ||
794 | // ); | ||
795 | // localStorage.setItem( | ||
796 | // "parentClassId", | ||
797 | // this.studentsData.students[0].classId | ||
798 | // ); | ||
799 | console.log( | ||
800 | "localStorage.getItem('parentStudentId')", | ||
801 | localStorage.getItem("parentStudentId") | ||
802 | ); | ||
803 | if (localStorage.getItem("parentStudentId") == null) { | ||
804 | var parentStudentsId = response.data.data.students[0].classId; | ||
805 | var ClassId = response.data.data.students[0]._id; | ||
806 | } | ||
807 | if (localStorage.getItem("parentStudentId")) { | ||
808 | var parentStudentsId = localStorage.getItem("parentStudentId"); | ||
809 | var ClassId = localStorage.getItem("parentClassId"); | ||
810 | } | ||
811 | this.getCourses(parentStudentsId, ClassId); | ||
812 | this.getAnnoucementes(ClassId); | ||
813 | this.showLoader = false; | ||
814 | }) | ||
815 | .catch(err => { | ||
816 | console.log("err====>", err); | ||
817 | this.showLoader = false; | ||
818 | }); | ||
819 | }, | ||
820 | getCourses(parentStudentsId, ClassId) { | ||
821 | this.showLoader = true; | ||
822 | http() | ||
823 | .get("/getStudentCourses", { | ||
824 | params: { | ||
825 | classId: ClassId, | ||
826 | studentId: parentStudentsId | ||
827 | } | ||
828 | }) | ||
829 | .then(response => { | ||
830 | this.courseData = response.data.data; | ||
831 | this.showLoader = false; | ||
832 | }) | ||
833 | .catch(err => { | ||
834 | console.log("err====>", err); | ||
835 | this.showLoader = false; | ||
836 | }); | ||
837 | }, | ||
838 | getAnnoucementes(ClassId) { | ||
839 | this.showLoader = true; | ||
840 | http() | ||
841 | .get("/getAnnoucementesList", { | ||
842 | params: { | ||
843 | classId: ClassId | ||
844 | } | ||
845 | }) | ||
846 | .then(response => { | ||
847 | this.annoucementData = response.data.data; | ||
848 | this.showLoader = false; | ||
849 | }) | ||
850 | .catch(err => { | ||
851 | console.log("err====>", err); | ||
852 | this.showLoader = false; | ||
853 | }); | ||
642 | } | 854 | } |
643 | } | 855 | } |
644 | }; | 856 | }; |
645 | </script> | 857 | </script> |
646 | 858 | ||
647 | <style scoped> | 859 | <style scoped> |
648 | @import "fullcalendar/dist/fullcalendar.css"; | 860 | @import "fullcalendar/dist/fullcalendar.css"; |
649 | </style> | 861 | </style> |
src/pages/Report/idCard.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- **** Id Card Select options **** --> | 3 | <!-- **** Id Card Select options **** --> |
4 | <v-card flat class="elevation-0 transparent"> | 4 | <v-card flat class="elevation-0 transparent"> |
5 | <v-form ref="form" v-model="valid" lazy-validation> | 5 | <v-form ref="form" v-model="valid" lazy-validation> |
6 | <v-flex xs12 sm12 lg12> | 6 | <v-flex xs12 sm12 lg12> |
7 | <v-layout wrap> | 7 | <v-layout wrap> |
8 | <v-flex xs12 sm12 lg4> | 8 | <v-flex xs12 sm12 lg4> |
9 | <v-layout> | 9 | <v-layout> |
10 | <v-flex 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.role" | 12 | v-model="getReport.role" |
13 | label="Select Type" | 13 | label="Select Type" |
14 | :items="getRoles" | 14 | :items="getRoles" |
15 | item-text="name" | 15 | item-text="name" |
16 | item-value="role" | 16 | item-value="role" |
17 | @change="getRoleInputs(getReport.role)" | 17 | @change="getRoleInputs(getReport.role)" |
18 | required | 18 | required |
19 | ></v-autocomplete> | 19 | ></v-autocomplete> |
20 | </v-flex> | 20 | </v-flex> |
21 | </v-layout> | 21 | </v-layout> |
22 | </v-flex> | 22 | </v-flex> |
23 | <v-flex xs12 sm12 lg4 v-if="showClass"> | 23 | <v-flex xs12 sm12 lg4 v-if="showClass"> |
24 | <v-layout> | 24 | <v-layout> |
25 | <v-flex xs12 sm12 lg10 class="ml-2"> | 25 | <v-flex xs12 sm12 lg10 class="ml-2"> |
26 | <v-select | 26 | <v-select |
27 | v-model="getReport.classId" | 27 | v-model="getReport.classId" |
28 | label="Select Class" | 28 | label="Select Class" |
29 | :items="classList" | 29 | :items="classList" |
30 | item-text="classNum" | 30 | item-text="classNum" |
31 | item-value="_id" | 31 | item-value="_id" |
32 | @change="getSections(getReport.classId)" | 32 | @change="getSections(getReport.classId)" |
33 | required | 33 | required |
34 | ></v-select> | 34 | ></v-select> |
35 | </v-flex> | 35 | </v-flex> |
36 | </v-layout> | 36 | </v-layout> |
37 | </v-flex> | 37 | </v-flex> |
38 | <v-flex xs12 sm12 lg4 v-if="showSections"> | 38 | <v-flex xs12 sm12 lg4 v-if="showSections"> |
39 | <v-layout> | 39 | <v-layout> |
40 | <v-flex xs12 sm12 lg10 class="ml-2"> | 40 | <v-flex xs12 sm12 lg10 class="ml-2"> |
41 | <v-select | 41 | <v-select |
42 | :items="addSection" | 42 | :items="addSection" |
43 | label="Select Section" | 43 | label="Select Section" |
44 | v-model="getReport.sectionId" | 44 | v-model="getReport.sectionId" |
45 | item-text="name" | 45 | item-text="name" |
46 | item-value="_id" | 46 | item-value="_id" |
47 | name="Select Section" | 47 | name="Select Section" |
48 | @change="getStudents" | 48 | @change="getStudents" |
49 | required | 49 | required |
50 | ></v-select> | 50 | ></v-select> |
51 | </v-flex> | 51 | </v-flex> |
52 | </v-layout> | 52 | </v-layout> |
53 | </v-flex> | 53 | </v-flex> |
54 | <v-flex xs12 sm12 lg4 v-if="showStudents"> | 54 | <v-flex xs12 sm12 lg4 v-if="showStudents"> |
55 | <v-layout> | 55 | <v-layout> |
56 | <v-flex xs12 sm12 lg10 class="ml-2"> | 56 | <v-flex xs12 sm12 lg10 class="ml-2"> |
57 | <v-select | 57 | <v-select |
58 | :items="getStudentsList" | 58 | :items="getSelectUserData" |
59 | label="Select Student" | 59 | label="Select Student" |
60 | v-model="getReport._id" | 60 | v-model="getReport._id" |
61 | item-text="name" | 61 | item-text="name" |
62 | item-value="_id" | 62 | item-value="_id" |
63 | required | 63 | required |
64 | ></v-select> | 64 | ></v-select> |
65 | </v-flex> | 65 | </v-flex> |
66 | </v-layout> | 66 | </v-layout> |
67 | </v-flex> | 67 | </v-flex> |
68 | <v-flex xs12 sm12 lg4 v-if="showTeacher"> | 68 | <v-flex xs12 sm12 lg4 v-if="showTeacher"> |
69 | <v-layout> | 69 | <v-layout> |
70 | <v-flex xs12 sm12 lg10 class="ml-2"> | 70 | <v-flex xs12 sm12 lg10 class="ml-2"> |
71 | <v-select | 71 | <v-select |
72 | v-model="getReport._id" | 72 | v-model="getReport._id" |
73 | label="Select Teacher" | 73 | label="Select Teacher" |
74 | :items="teacherList" | 74 | :items="getSelectUserData" |
75 | item-text="name" | 75 | item-text="name" |
76 | item-value="_id" | 76 | item-value="_id" |
77 | required | 77 | required |
78 | ></v-select> | 78 | ></v-select> |
79 | </v-flex> | 79 | </v-flex> |
80 | </v-layout> | 80 | </v-layout> |
81 | </v-flex> | 81 | </v-flex> |
82 | <v-flex xs12 sm12 lg4 v-if="showAdmin"> | 82 | <v-flex xs12 sm12 lg4 v-if="showAdmin"> |
83 | <v-layout> | 83 | <v-layout> |
84 | <v-flex xs12 sm12 lg10 class="ml-2"> | 84 | <v-flex xs12 sm12 lg10 class="ml-2"> |
85 | <v-select | 85 | <v-select |
86 | v-model="getReport._id" | 86 | v-model="getReport._id" |
87 | label="Select Admin" | 87 | label="Select Admin" |
88 | :items="userData" | 88 | :items="getSelectUserData" |
89 | item-text="name" | 89 | item-text="name" |
90 | item-value="_id" | 90 | item-value="_id" |
91 | required | 91 | required |
92 | ></v-select> | 92 | ></v-select> |
93 | </v-flex> | 93 | </v-flex> |
94 | </v-layout> | 94 | </v-layout> |
95 | </v-flex> | 95 | </v-flex> |
96 | <v-flex xs12 sm12 lg4 v-if="showAccountant"> | 96 | <v-flex xs12 sm12 lg4 v-if="showAccountant"> |
97 | <v-layout> | 97 | <v-layout> |
98 | <v-flex xs12 sm12 lg10 class="ml-2"> | 98 | <v-flex xs12 sm12 lg10 class="ml-2"> |
99 | <v-select | 99 | <v-select |
100 | v-model="getReport._id" | 100 | v-model="getReport._id" |
101 | label="Select Accountant" | 101 | label="Select Accountant" |
102 | :items="Users" | 102 | :items="getSelectUserData" |
103 | item-text="name" | 103 | item-text="name" |
104 | item-value="_id" | 104 | item-value="_id" |
105 | required | 105 | required |
106 | ></v-select> | 106 | ></v-select> |
107 | </v-flex> | 107 | </v-flex> |
108 | </v-layout> | 108 | </v-layout> |
109 | </v-flex> | 109 | </v-flex> |
110 | <v-flex xs12 sm12 lg4 v-if="showLibrarian"> | 110 | <v-flex xs12 sm12 lg4 v-if="showLibrarian"> |
111 | <v-layout> | 111 | <v-layout> |
112 | <v-flex xs12 sm12 lg10 class="ml-2"> | 112 | <v-flex xs12 sm12 lg10 class="ml-2"> |
113 | <v-select | 113 | <v-select |
114 | v-model="getReport._id" | 114 | v-model="getReport._id" |
115 | label="Select Librarian" | 115 | label="Select Librarian" |
116 | :items="Users" | 116 | :items="getSelectUserData " |
117 | item-text="name" | 117 | item-text="name" |
118 | item-value="_id" | 118 | item-value="_id" |
119 | required | 119 | required |
120 | ></v-select> | 120 | ></v-select> |
121 | </v-flex> | 121 | </v-flex> |
122 | </v-layout> | 122 | </v-layout> |
123 | </v-flex> | 123 | </v-flex> |
124 | <v-flex xs12 sm12 lg4> | 124 | <v-flex xs12 sm12 lg4> |
125 | <v-layout> | 125 | <v-layout> |
126 | <v-flex xs12 sm12 lg10 class="ml-2"> | 126 | <v-flex xs12 sm12 lg10 class="ml-2"> |
127 | <v-autocomplete | 127 | <v-autocomplete |
128 | label="Select View Type" | 128 | label="Select View Type" |
129 | type="text" | 129 | type="text" |
130 | :items="typeList" | 130 | :items="typeList" |
131 | v-model="getReport.form" | 131 | v-model="getReport.form" |
132 | item-text="name" | 132 | item-text="name" |
133 | item-value="value" | 133 | item-value="value" |
134 | :rules="typeRules" | 134 | :rules="typeRules" |
135 | @change="getReportType(getReport.form)" | 135 | @change="getReportType(getReport.form)" |
136 | required | 136 | required |
137 | ></v-autocomplete> | 137 | ></v-autocomplete> |
138 | </v-flex> | 138 | </v-flex> |
139 | </v-layout> | 139 | </v-layout> |
140 | </v-flex> | 140 | </v-flex> |
141 | <v-flex xs12 sm12 lg4> | 141 | <v-flex xs12 sm12 lg4> |
142 | <v-btn | 142 | <v-btn |
143 | @click="getCards" | 143 | @click="getCards" |
144 | round | 144 | round |
145 | dark | 145 | dark |
146 | :loading="loading" | 146 | :loading="loading" |
147 | class="open-dialog-button mt-3" | 147 | class="open-dialog-button mt-3" |
148 | >Get Report</v-btn> | 148 | >Get Report</v-btn> |
149 | </v-flex> | 149 | </v-flex> |
150 | </v-layout> | 150 | </v-layout> |
151 | </v-flex> | 151 | </v-flex> |
152 | </v-form> | 152 | </v-form> |
153 | </v-card> | 153 | </v-card> |
154 | <div> | 154 | <div> |
155 | <v-layout v-show="showReport"> | 155 | <v-layout v-show="showReport"> |
156 | <v-flex xs12> | 156 | <v-flex xs12> |
157 | <v-card class="transparent elevation-0"> | 157 | <v-card class="transparent elevation-0"> |
158 | <v-layout> | 158 | <v-layout> |
159 | <v-flex xs12> | 159 | <v-flex xs12> |
160 | <v-btn class="open-dialog-button right" round dark @click="prindIDCardReport()"> | 160 | <v-btn class="open-dialog-button right" round dark @click="prindIDCardReport()"> |
161 | 161 | ||
162 | <v-icon right dark>print</v-icon> | 162 | <v-icon right dark>print</v-icon> |
163 | </v-btn> | 163 | </v-btn> |
164 | </v-flex> | 164 | </v-flex> |
165 | </v-layout> | 165 | </v-layout> |
166 | </v-card> | 166 | </v-card> |
167 | <v-container grid-list-md id="printMe"> | 167 | <v-container grid-list-md id="printMe"> |
168 | <v-layout class="col-sm-12"> | 168 | <v-layout class="col-sm-12"> |
169 | <div | 169 | <div |
170 | style="font-family: arial; | 170 | style="font-family: arial; |
171 | max-width: 794px; | 171 | max-width: 794px; |
172 | max-height: 1123px; | 172 | max-height: 1123px; |
173 | margin-left: auto; | 173 | margin-left: auto; |
174 | margin-right: auto; | 174 | margin-right: auto; |
175 | -webkit-print-color-adjust: exact;" | 175 | -webkit-print-color-adjust: exact;" |
176 | > | 176 | > |
177 | <div | 177 | <div |
178 | style=" | 178 | style=" |
179 | float: left; | 179 | float: left; |
180 | height: 520px; | 180 | height: 520px; |
181 | width: 520px; | 181 | width: 520px; |
182 | background: #fff; | 182 | background: #fff; |
183 | border: 1px solid lightgray; | 183 | border: 1px solid lightgray; |
184 | position:relative;" | 184 | position:relative;" |
185 | > | 185 | > |
186 | <!-- bottom-right-side-image --> | 186 | <!-- bottom-right-side-image --> |
187 | <img | 187 | <img |
188 | src="/static/icon/shape1.png" | 188 | src="/static/icon/shape1.png" |
189 | alt="shape" | 189 | alt="shape" |
190 | style="position:absolute;width: 90px;" | 190 | style="position:absolute;width: 90px;" |
191 | /> | 191 | /> |
192 | <!-- Front Side --> | 192 | <!-- Front Side --> |
193 | <v-layout | 193 | <v-layout |
194 | style=" | 194 | style=" |
195 | text-align: center; | 195 | text-align: center; |
196 | margin-top: 50px;" | 196 | margin-top: 50px;" |
197 | v-if="frontPart" | 197 | v-if="frontPart" |
198 | > | 198 | > |
199 | <v-flex xs12> | 199 | <v-flex xs12> |
200 | <!-- school Logo Url --> | 200 | <!-- school Logo Url --> |
201 | <img | 201 | <img |
202 | v-if="getCard.schoolLogoUrl" | 202 | v-if="getCard.schoolLogoUrl" |
203 | :src="getCard.schoolLogoUrl" | 203 | :src="getCard.schoolLogoUrl" |
204 | alt="schoollogo" | 204 | alt="schoollogo" |
205 | style=" | 205 | style=" |
206 | width: 110px; | 206 | width: 110px; |
207 | margin-top:10px; | 207 | margin-top:10px; |
208 | overflow:hidden" | 208 | overflow:hidden" |
209 | /> | 209 | /> |
210 | <img | 210 | <img |
211 | src="/static/default_thumb.png" | 211 | src="/static/default_thumb.png" |
212 | v-if="!getCard.schoolLogoUrl" | 212 | v-if="!getCard.schoolLogoUrl" |
213 | alt="schoollogo" | 213 | alt="schoollogo" |
214 | style=" | 214 | style=" |
215 | width: 110px; | 215 | width: 110px; |
216 | margin-top:10px; | 216 | margin-top:10px; |
217 | overflow:hidden" | 217 | overflow:hidden" |
218 | /> | 218 | /> |
219 | <v-layout style="margin:auto"> | 219 | <v-layout style="margin:auto"> |
220 | <!-- profile url --> | 220 | <!-- profile url --> |
221 | <img | 221 | <img |
222 | v-if="getCard.profilePicUrl" | 222 | v-if="getCard.profilePicUrl" |
223 | :src="getCard.profilePicUrl" | 223 | :src="getCard.profilePicUrl" |
224 | alt="profileImage" | 224 | alt="profileImage" |
225 | style="; | 225 | style="; |
226 | width: 110px; | 226 | width: 110px; |
227 | margin:10px auto; | 227 | margin:10px auto; |
228 | width: 110px; | 228 | width: 110px; |
229 | margin: 10px auto; | 229 | margin: 10px auto; |
230 | border: 3px solid #323232; | 230 | border: 3px solid #323232; |
231 | border-radius: 12px;" | 231 | border-radius: 12px;" |
232 | /> | 232 | /> |
233 | <img | 233 | <img |
234 | style="; | 234 | style="; |
235 | width: 110px; | 235 | width: 110px; |
236 | margin:10px auto; | 236 | margin:10px auto; |
237 | width: 110px; | 237 | width: 110px; |
238 | margin: 10px auto;" | 238 | margin: 10px auto;" |
239 | alt="dummy" | 239 | alt="dummy" |
240 | src="/static/icon/user.png" | 240 | src="/static/icon/user.png" |
241 | v-if="!getCard.profilePicUrl && getCard.role != '2'" | 241 | v-if="!getCard.profilePicUrl && getCard.role != '2'" |
242 | /> | 242 | /> |
243 | </v-layout> | 243 | </v-layout> |
244 | 244 | ||
245 | <p | 245 | <p |
246 | style="color: #302653;font-size:24px; | 246 | style="color: #302653;font-size:24px; |
247 | letter-spacing: 4px; | 247 | letter-spacing: 4px; |
248 | margin-bottom:14px;" | 248 | margin-bottom:14px;" |
249 | > | 249 | > |
250 | <b>{{ getCard.name}}</b> | 250 | <b>{{ getCard.name}}</b> |
251 | </p> | 251 | </p> |
252 | <p | 252 | <p |
253 | style="color: #302653; | 253 | style="color: #302653; |
254 | font-size:14px; | 254 | font-size:14px; |
255 | letter-spacing: 4px; | 255 | letter-spacing: 4px; |
256 | margin-bottom:14px;" | 256 | margin-bottom:14px;" |
257 | > | 257 | > |
258 | <b>{{ getCard.gender}}</b> | 258 | <b>{{ getCard.gender}}</b> |
259 | </p> | 259 | </p> |
260 | <p | 260 | <p |
261 | v-if="getCard.classId" | 261 | v-if="getCard.classId" |
262 | style="color: #302653; | 262 | style="color: #302653; |
263 | font-size:24px; | 263 | font-size:24px; |
264 | letter-spacing: 4px; | 264 | letter-spacing: 4px; |
265 | margin-bottom:14px;" | 265 | margin-bottom:14px;" |
266 | >{{ getCard.classId.classNum }}</p> | 266 | >{{ getCard.classId.classNum }}</p> |
267 | <p | 267 | <p |
268 | v-if="getCard.classId" | 268 | v-if="getCard.classId" |
269 | style="color: #302653; | 269 | style="color: #302653; |
270 | font-size:24px; | 270 | font-size:24px; |
271 | letter-spacing: 4px; | 271 | letter-spacing: 4px; |
272 | margin-bottom:14px;" | 272 | margin-bottom:14px;" |
273 | >{{ getCard.sectionId.name }}</p> | 273 | >{{ getCard.sectionId.name }}</p> |
274 | <p | 274 | <p |
275 | v-if="getCard.rollNo" | 275 | v-if="getCard.rollNo" |
276 | style="color: #302653; | 276 | style="color: #302653; |
277 | font-size:24px; | 277 | font-size:24px; |
278 | letter-spacing: 2px; | 278 | letter-spacing: 2px; |
279 | margin-bottom:10px;" | 279 | margin-bottom:10px;" |
280 | >Roll: {{ getCard.rollNo }}</p> | 280 | >Roll: {{ getCard.rollNo }}</p> |
281 | <p | 281 | <p |
282 | v-if="getCard.joinDate" | 282 | v-if="getCard.joinDate" |
283 | style="color: #302653; | 283 | style="color: #302653; |
284 | margin-bottom:10px; | 284 | margin-bottom:10px; |
285 | font-size:16px; | 285 | font-size:16px; |
286 | letter-spacing: 2px;" | 286 | letter-spacing: 2px;" |
287 | >{{ dates(getCard.joinDate) }}</p> | 287 | >{{ dates(getCard.joinDate) }}</p> |
288 | <p | 288 | <p |
289 | v-if="getCard.joiningDate" | 289 | v-if="getCard.joiningDate" |
290 | style="color: #302653; | 290 | style="color: #302653; |
291 | margin-bottom:10px; | 291 | margin-bottom:10px; |
292 | font-size:16px; | 292 | font-size:16px; |
293 | letter-spacing: 2px;" | 293 | letter-spacing: 2px;" |
294 | >{{ dates(getCard.joiningDate) }}</p> | 294 | >{{ dates(getCard.joiningDate) }}</p> |
295 | <p | 295 | <p |
296 | v-if="getCard.phone" | 296 | v-if="getCard.phone" |
297 | style="color: #302653; | 297 | style="color: #302653; |
298 | margin-bottom:10px; | 298 | margin-bottom:10px; |
299 | font-size:16px; | 299 | font-size:16px; |
300 | letter-spacing: 2px;" | 300 | letter-spacing: 2px;" |
301 | >{{ getCard.phone }}</p> | 301 | >{{ getCard.phone }}</p> |
302 | <p | 302 | <p |
303 | style=" | 303 | style=" |
304 | font-size: 19px; | 304 | font-size: 19px; |
305 | font-weight: 100; | 305 | font-weight: 100; |
306 | color: rgb(48, 38, 83); | 306 | color: rgb(48, 38, 83); |
307 | letter-spacing: 5px; | 307 | letter-spacing: 5px; |
308 | margin-bottom:10px;" | 308 | margin-bottom:10px;" |
309 | > | 309 | > |
310 | <span v-if="getCard.mobile">{{ getCard.mobile}}</span> | 310 | <span v-if="getCard.mobile">{{ getCard.mobile}}</span> |
311 | <span v-if="getCard.mobileNo">{{ getCard.mobileNo }}</span> | 311 | <span v-if="getCard.mobileNo">{{ getCard.mobileNo }}</span> |
312 | </p> | 312 | </p> |
313 | <!-- <p | ||
314 | style=" | ||
315 | font-size: 17px; | ||
316 | font-weight: 100; | ||
317 | color: rgb(48, 38, 83); | ||
318 | letter-spacing: 4px;" | ||
319 | >{{ getCard.address}}</p>--> | ||
320 | <p | 313 | <p |
321 | style=" | 314 | style=" |
322 | font-size: 17px; | 315 | font-size: 17px; |
323 | font-weight: 100; | 316 | font-weight: 100; |
324 | color: rgb(48, 38, 83); | 317 | color: rgb(48, 38, 83); |
325 | letter-spacing: 4px; | 318 | letter-spacing: 4px; |
326 | margin-bottom:14px;" | 319 | margin-bottom:14px;" |
327 | >{{ getCard.email}}</p> | 320 | >{{ getCard.email}}</p> |
328 | </v-flex> | 321 | </v-flex> |
329 | </v-layout> | 322 | </v-layout> |
330 | <!-- back side --> | 323 | <!-- back side --> |
331 | <v-layout style=" | 324 | <v-layout style=" |
332 | text-align: center;" v-if="backPart"> | 325 | text-align: center;" v-if="backPart"> |
333 | <v-flex xs12> | 326 | <v-flex xs12> |
334 | <!-- school Logo Url --> | 327 | <!-- school Logo Url --> |
335 | <img | 328 | <img |
336 | v-if="getCard.schoolLogoUrl" | 329 | v-if="getCard.schoolLogoUrl" |
337 | :src="getCard.schoolLogoUrl" | 330 | :src="getCard.schoolLogoUrl" |
338 | alt="schoollogo" | 331 | alt="schoollogo" |
339 | style=" | 332 | style=" |
340 | width: 110px; | 333 | width: 110px; |
341 | margin-top:10px; | 334 | margin-top:10px; |
342 | overflow:hidden" | 335 | overflow:hidden" |
343 | /> | 336 | /> |
344 | <img | 337 | <img |
345 | v-if="getCard.schoolId" | 338 | v-if="getCard.schoolId" |
346 | :src="getCard.schoolId.schoolLogoUrl" | 339 | :src="getCard.schoolId.schoolLogoUrl" |
347 | alt="schoollogo" | 340 | alt="schoollogo" |
348 | style=" | 341 | style=" |
349 | width: 110px; | 342 | width: 110px; |
350 | margin-top:10px; | 343 | margin-top:10px; |
351 | overflow:hidden" | 344 | overflow:hidden" |
352 | /> | 345 | /> |
353 | <!-- <v-layout style="margin:auto"> | ||
354 | <img | ||
355 | v-if="getCard.profilePicUrl" | ||
356 | :src="getCard.profilePicUrl" | ||
357 | alt="profileImage" | ||
358 | style="; | ||
359 | width: 110px; | ||
360 | margin:10px auto; | ||
361 | width: 110px; | ||
362 | margin: 10px auto; | ||
363 | border: 3px solid #323232; | ||
364 | border-radius: 12px;" | ||
365 | /> | ||
366 | </v-layout>--> | ||
367 | <p | 346 | <p |
368 | v-if="getCard.schoolLogoUrl" | 347 | v-if="getCard.schoolLogoUrl" |
369 | style="color: #302653; | 348 | style="color: #302653; |
370 | font-size:24px; | 349 | font-size:24px; |
371 | letter-spacing: 4px; | 350 | letter-spacing: 4px; |
372 | margin-bottom:14px;" | 351 | margin-bottom:14px;" |
373 | > | 352 | > |
374 | <b>{{ getCard.name}}</b> | 353 | <b>{{ getCard.name}}</b> |
375 | </p> | 354 | </p> |
376 | 355 | ||
377 | <p | 356 | <p |
378 | v-if="getCard.city" | 357 | v-if="getCard.city" |
379 | style=" | 358 | style=" |
380 | font-size: 17px; | 359 | font-size: 17px; |
381 | font-weight: 100; | 360 | font-weight: 100; |
382 | color: rgb(48, 38, 83); | 361 | color: rgb(48, 38, 83); |
383 | letter-spacing: 4px; | 362 | letter-spacing: 4px; |
384 | margin-bottom:14px;" | 363 | margin-bottom:14px;" |
385 | >{{ getCard.city}}</p> | 364 | >{{ getCard.city}}</p> |
386 | <p | 365 | <p |
387 | style=" | 366 | style=" |
388 | font-size: 17px; | 367 | font-size: 17px; |
389 | font-weight: 100; | 368 | font-weight: 100; |
390 | color: rgb(48, 38, 83); | 369 | color: rgb(48, 38, 83); |
391 | letter-spacing: 4px; | 370 | letter-spacing: 4px; |
392 | margin-bottom:14px;" | 371 | margin-bottom:14px;" |
393 | > | 372 | > |
394 | {{ getCard.address }} | 373 | {{ getCard.address }} |
395 | {{ getCard.presentAddress }} | 374 | {{ getCard.presentAddress }} |
396 | <span | 375 | <span |
397 | v-if="getCard.state" | 376 | v-if="getCard.state" |
398 | >({{ getCard.state }})</span> | 377 | >({{ getCard.state }})</span> |
399 | </p> | 378 | </p> |
400 | <p | 379 | <p |
401 | v-if="getCard.establishmentYear" | 380 | v-if="getCard.establishmentYear" |
402 | style=" | 381 | style=" |
403 | font-size: 17px; | 382 | font-size: 17px; |
404 | font-weight: 100; | 383 | font-weight: 100; |
405 | color: rgb(48, 38, 83); | 384 | color: rgb(48, 38, 83); |
406 | letter-spacing: 4px; | 385 | letter-spacing: 4px; |
407 | margin-bottom:14px;" | 386 | margin-bottom:14px;" |
408 | >{{ getCard.establishmentYear }}</p> | 387 | >{{ getCard.establishmentYear }}</p> |
409 | </v-flex> | 388 | </v-flex> |
410 | </v-layout> | 389 | </v-layout> |
411 | <!-- bottom-right-side-image --> | 390 | <!-- bottom-right-side-image --> |
412 | <img | 391 | <img |
413 | src="static/icon/shape2.png" | 392 | src="static/icon/shape2.png" |
414 | alt="shape2" | 393 | alt="shape2" |
415 | style="bottom: 0; | 394 | style="bottom: 0; |
416 | position: absolute; | 395 | position: absolute; |
417 | right: 0; | 396 | right: 0; |
418 | width: 110px;" | 397 | width: 110px;" |
419 | /> | 398 | /> |
420 | </div> | 399 | </div> |
421 | </div> | 400 | </div> |
422 | </v-layout> | 401 | </v-layout> |
423 | </v-container> | 402 | </v-container> |
424 | </v-flex> | 403 | </v-flex> |
425 | </v-layout> | 404 | </v-layout> |
426 | </div> | 405 | </div> |
427 | <v-snackbar | 406 | <v-snackbar |
428 | :timeout="timeout" | 407 | :timeout="timeout" |
429 | :top="y === 'top'" | 408 | :top="y === 'top'" |
430 | :right="x === 'right'" | 409 | :right="x === 'right'" |
431 | :vertical="mode === 'vertical'" | 410 | :vertical="mode === 'vertical'" |
432 | v-model="snackbar" | 411 | v-model="snackbar" |
433 | :color="color" | 412 | :color="color" |
434 | >{{ text }}</v-snackbar> | 413 | >{{ text }}</v-snackbar> |
435 | <div class="loader" v-if="showLoader"> | 414 | <div class="loader" v-if="showLoader"> |
436 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 415 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
437 | </div> | 416 | </div> |
438 | </v-container> | 417 | </v-container> |
439 | </template> | 418 | </template> |
440 | 419 | ||
441 | <script> | 420 | <script> |
442 | import http from "@/Services/http.js"; | 421 | import http from "@/Services/http.js"; |
443 | import moment from "moment"; | 422 | import moment from "moment"; |
444 | 423 | ||
445 | export default { | 424 | export default { |
446 | data: () => ({ | 425 | data: () => ({ |
447 | showLoader: false, | 426 | showLoader: false, |
448 | valid: true, | 427 | valid: true, |
449 | report: {}, | 428 | report: {}, |
450 | userData: {}, | 429 | userData: {}, |
451 | snackbar: false, | 430 | snackbar: false, |
452 | color: "", | 431 | color: "", |
453 | y: "top", | 432 | y: "top", |
454 | x: "right", | 433 | x: "right", |
455 | mode: "", | 434 | mode: "", |
456 | timeout: 10000, | 435 | timeout: 10000, |
457 | text: "", | 436 | text: "", |
458 | loading: false, | 437 | loading: false, |
459 | showReport: false, | 438 | showReport: false, |
460 | frontPart: false, | 439 | frontPart: false, |
461 | backPart: false, | 440 | backPart: false, |
462 | showClass: false, | 441 | showClass: false, |
463 | showTeacher: false, | 442 | showTeacher: false, |
464 | showAdmin: false, | 443 | showAdmin: false, |
465 | showAccountant: false, | 444 | showAccountant: false, |
466 | showLibrarian: false, | 445 | showLibrarian: false, |
467 | hideprintIdCard: false, | 446 | hideprintIdCard: false, |
468 | hidebackprintIdCard: false, | 447 | hidebackprintIdCard: false, |
469 | showStudents: false, | 448 | showStudents: false, |
470 | showSections: false, | 449 | showSections: false, |
471 | getRoles: [], | 450 | getRoles: [], |
472 | classList: [], | 451 | classList: [], |
473 | getCard: [], | 452 | getCard: [], |
474 | addSection: [], | 453 | addSection: [], |
475 | getStudentsList: [], | 454 | // getStudentsList: |
476 | teacherList: [], | 455 | // teacherList: [], |
477 | userData: [], | 456 | getSelectUserData: [], |
478 | Users: [], | 457 | // Users: [], |
479 | getReport: {}, | 458 | getReport: {}, |
480 | // cardRules: [v => !!v || "Id-Card Field is required"], | ||
481 | // classRules: [v => !!v || "Class Field is required"], | ||
482 | // sectionRules: [v => !!v || "Section Field is required"], | ||
483 | // studentRules: [v => !!v || "Student Field is required"], | ||
484 | // teacherRules: [v => !!v || "Teacher Field is required"], | ||
485 | // adminRules: [v => !!v || "Admin Field is required"], | ||
486 | // accountantRules: [v => !!v || "Accountant Field is required"], | ||
487 | // librarianRules: [v => !!v || "Librarian Field is required"], | ||
488 | |||
489 | typeRules: [v => !!v || "Type is required"], | 459 | typeRules: [v => !!v || "Type is required"], |
490 | // backgroundRules: [v => !!v || "Background is required"], | ||
491 | typeList: [ | 460 | typeList: [ |
492 | { | 461 | { |
493 | name: "Front Part", | 462 | name: "Front Part", |
494 | value: "frontPart" | 463 | value: "frontPart" |
495 | }, | 464 | }, |
496 | { | 465 | { |
497 | name: "Back Part", | 466 | name: "Back Part", |
498 | value: "backPart" | 467 | value: "backPart" |
499 | } | 468 | } |
500 | ], | 469 | ], |
501 | backgroundList: ["Yes", "No"] | 470 | backgroundList: ["Yes", "No"] |
502 | }), | 471 | }), |
503 | 472 | ||
504 | mounted() { | 473 | mounted() { |
505 | this.token = this.$store.state.token; | 474 | this.token = this.$store.state.token; |
506 | this.getUserData(); | 475 | this.getUserData(); |
507 | this.getRole(); | 476 | this.getRole(); |
508 | }, | 477 | }, |
509 | 478 | ||
510 | methods: { | 479 | methods: { |
511 | dates: function(date) { | 480 | dates: function(date) { |
512 | return moment(date).format("MMMM DD, YYYY"); | 481 | return moment(date).format("MMMM DD, YYYY"); |
513 | return date; | 482 | return date; |
514 | }, | 483 | }, |
515 | getReportType() { | 484 | getReportType() { |
516 | if (this.getReport.form === "frontPart") { | 485 | if (this.getReport.form === "frontPart") { |
517 | this.frontPart = true; | 486 | this.frontPart = true; |
518 | this.backPart = false; | 487 | this.backPart = false; |
519 | } | 488 | } |
520 | if (this.getReport.form === "backPart") { | 489 | if (this.getReport.form === "backPart") { |
521 | this.frontPart = false; | 490 | this.frontPart = false; |
522 | this.backPart = true; | 491 | this.backPart = true; |
523 | } | 492 | } |
524 | }, | 493 | }, |
525 | getRoleInputs(role) { | 494 | getRoleInputs(role) { |
526 | console.log("role", role); | 495 | // console.log("role", role); |
527 | this.showReport = false; | 496 | this.showReport = false; |
528 | this.getReport._id = ""; | 497 | this.getReport._id = ""; |
529 | this.getCard = ""; | 498 | this.getCard = ""; |
530 | if (role === 4) { | 499 | if (role === 4) { |
531 | // console.log("role", role); | 500 | // console.log("role", role); |
532 | this.showClass = true; | 501 | this.showClass = true; |
533 | this.showTeacher = false; | 502 | this.showTeacher = false; |
534 | this.showAdmin = false; | 503 | this.showAdmin = false; |
535 | this.showAccountant = false; | 504 | this.showAccountant = false; |
536 | this.showLibrarian = false; | 505 | this.showLibrarian = false; |
537 | this.showStudents = false; | 506 | this.showStudents = false; |
538 | this.showSections = false; | 507 | this.showSections = false; |
539 | this.getClass(); | 508 | this.getClass(); |
540 | } | 509 | } |
541 | if (role === 3) { | 510 | if (role === 3) { |
542 | this.showTeacher = true; | 511 | this.showTeacher = true; |
543 | this.showClass = false; | 512 | this.showClass = false; |
544 | this.showAdmin = false; | 513 | this.showAdmin = false; |
545 | this.showAccountant = false; | 514 | this.showAccountant = false; |
546 | this.showLibrarian = false; | 515 | this.showLibrarian = false; |
547 | this.showStudents = false; | 516 | this.showStudents = false; |
548 | this.showSections = false; | 517 | this.showSections = false; |
549 | this.getTeacherList(); | 518 | this.getTeacherList(); |
550 | } | 519 | } |
551 | if (role === 2) { | 520 | if (role === 2) { |
552 | this.showAdmin = true; | 521 | this.showAdmin = true; |
553 | this.showTeacher = false; | 522 | this.showTeacher = false; |
554 | this.showClass = false; | 523 | this.showClass = false; |
555 | this.showAccountant = false; | 524 | this.showAccountant = false; |
556 | this.showLibrarian = false; | 525 | this.showLibrarian = false; |
557 | this.showStudents = false; | 526 | this.showStudents = false; |
558 | this.showSections = false; | 527 | this.showSections = false; |
559 | this.getUserData(); | 528 | this.getUserData(); |
560 | } | 529 | } |
561 | if (role === 6) { | 530 | if (role === 6) { |
562 | this.showAccountant = true; | 531 | this.showAccountant = true; |
563 | this.showAdmin = false; | 532 | this.showAdmin = false; |
564 | this.showTeacher = false; | 533 | this.showTeacher = false; |
565 | this.showClass = false; | 534 | this.showClass = false; |
566 | this.showLibrarian = false; | 535 | this.showLibrarian = false; |
567 | this.showStudents = false; | 536 | this.showStudents = false; |
568 | this.showSections = false; | 537 | this.showSections = false; |
569 | this.getUsersList(role); | 538 | this.getUsersList(role); |
570 | } | 539 | } |
571 | if (role === 7) { | 540 | if (role === 7) { |
572 | this.showLibrarian = true; | 541 | this.showLibrarian = true; |
573 | this.showAccountant = false; | 542 | this.showAccountant = false; |
574 | this.showAdmin = false; | 543 | this.showAdmin = false; |
575 | this.showTeacher = false; | 544 | this.showTeacher = false; |
576 | this.showClass = false; | 545 | this.showClass = false; |
577 | this.showStudents = false; | 546 | this.showStudents = false; |
578 | this.showSections = false; | 547 | this.showSections = false; |
579 | this.getUsersList(role); | 548 | this.getUsersList(role); |
580 | } | 549 | } |
581 | }, | 550 | }, |
582 | 551 | ||
583 | prindIDCardReport() { | 552 | prindIDCardReport() { |
584 | // Pass the element id here | 553 | // Pass the element id here |
585 | this.$htmlToPaper("printMe"); | 554 | this.$htmlToPaper("printMe"); |
586 | }, | 555 | }, |
587 | getUserData() { | 556 | getUserData() { |
557 | this.getSelectUserData = []; | ||
588 | this.showLoader = true; | 558 | this.showLoader = true; |
589 | http() | 559 | http() |
590 | .get("/getParticularUserDetail") | 560 | .get("/getParticularUserDetail") |
591 | .then(response => { | 561 | .then(response => { |
592 | this.userData = response.data.data; | 562 | let mergeObj = { |
563 | name: "Select All", | ||
564 | id: "Select All" | ||
565 | }; | ||
566 | this.getSelectUserData.push(mergeObj); | ||
567 | let getUserDetails = response.data.data; | ||
568 | this.getSelectUserData.push(getUserDetails); | ||
593 | this.showLoader = false; | 569 | this.showLoader = false; |
594 | // this.adminList = response.data.data; | 570 | // this.adminList = response.data.data; |
595 | }) | 571 | }) |
596 | .catch(error => { | 572 | .catch(error => { |
597 | this.showLoader = false; | 573 | this.showLoader = false; |
598 | if (error.response.status === 401) { | 574 | if (error.response.status === 401) { |
599 | this.$router.replace({ path: "/" }); | 575 | this.$router.replace({ path: "/" }); |
600 | this.$store.dispatch("setToken", null); | 576 | this.$store.dispatch("setToken", null); |
601 | this.$store.dispatch("Id", null); | 577 | this.$store.dispatch("Id", null); |
602 | } | 578 | } |
603 | }); | 579 | }); |
604 | }, | 580 | }, |
605 | getRole() { | 581 | getRole() { |
606 | this.showLoader = true; | 582 | this.showLoader = true; |
607 | http() | 583 | http() |
608 | .get("/getRolesList", { | 584 | .get("/getRolesList", { |
609 | headers: { Authorization: "Bearer " + this.token } | 585 | headers: { Authorization: "Bearer " + this.token } |
610 | }) | 586 | }) |
611 | .then(response => { | 587 | .then(response => { |
612 | var getRoles = []; | 588 | var getRoles = []; |
613 | getRoles = response.data.data; | 589 | getRoles = response.data.data; |
614 | // if (getRoles[0].role !== 1) { | ||
615 | // getRoles = response.data.data; | ||
616 | // } | ||
617 | for (let i = 0; i < getRoles.length; i++) { | 590 | for (let i = 0; i < getRoles.length; i++) { |
618 | if (getRoles[i].role != "1" && getRoles[i].role != "5") { | 591 | if (getRoles[i].role != "1" && getRoles[i].role != "5") { |
619 | this.getRoles.push(getRoles[i]); | 592 | this.getRoles.push(getRoles[i]); |
620 | } | 593 | } |
621 | } | 594 | } |
622 | this.showLoader = false; | 595 | this.showLoader = false; |
623 | }) | 596 | }) |
624 | .catch(error => { | 597 | .catch(error => { |
625 | this.showLoader = false; | 598 | this.showLoader = false; |
626 | if (error.response.status === 401) { | 599 | if (error.response.status === 401) { |
627 | this.$router.replace({ path: "/" }); | 600 | this.$router.replace({ path: "/" }); |
628 | this.$store.dispatch("setToken", null); | 601 | this.$store.dispatch("setToken", null); |
629 | this.$store.dispatch("Id", null); | 602 | this.$store.dispatch("Id", null); |
630 | this.$store.dispatch("Role", null); | 603 | this.$store.dispatch("Role", null); |
631 | } | 604 | } |
632 | }); | 605 | }); |
633 | }, | 606 | }, |
634 | getClass() { | 607 | getClass() { |
635 | console.log("get classes"); | 608 | // console.log("get classes"); |
636 | this.showLoader = true; | 609 | this.showLoader = true; |
637 | http() | 610 | http() |
638 | .get("/getClassesList", { | 611 | .get("/getClassesList", { |
639 | headers: { Authorization: "Bearer " + this.token } | 612 | headers: { Authorization: "Bearer " + this.token } |
640 | }) | 613 | }) |
641 | .then(response => { | 614 | .then(response => { |
642 | this.classList = response.data.data; | 615 | this.classList = response.data.data; |
643 | this.showLoader = false; | 616 | this.showLoader = false; |
644 | }) | 617 | }) |
645 | .catch(error => { | 618 | .catch(error => { |
646 | this.showLoader = false; | 619 | this.showLoader = false; |
647 | // console.log("err====>", err); | 620 | // console.log("err====>", err); |
648 | }); | 621 | }); |
649 | }, | 622 | }, |
650 | getSections(_id) { | 623 | getSections(_id) { |
651 | this.showLoader = true; | 624 | this.showLoader = true; |
652 | http() | 625 | http() |
653 | .get( | 626 | .get( |
654 | "/getSectionsList", | 627 | "/getSectionsList", |
655 | { params: { classId: _id } }, | 628 | { params: { classId: _id } }, |
656 | { | 629 | { |
657 | headers: { Authorization: "Bearer " + this.token } | 630 | headers: { Authorization: "Bearer " + this.token } |
658 | } | 631 | } |
659 | ) | 632 | ) |
660 | .then(response => { | 633 | .then(response => { |
661 | this.addSection = response.data.data; | 634 | this.addSection = response.data.data; |
662 | this.showSections = true; | 635 | this.showSections = true; |
663 | this.showLoader = false; | 636 | this.showLoader = false; |
664 | }) | 637 | }) |
665 | .catch(err => { | 638 | .catch(err => { |
666 | this.showLoader = false; | 639 | this.showLoader = false; |
667 | // console.log("err====>", err); | 640 | // console.log("err====>", err); |
668 | }); | 641 | }); |
669 | }, | 642 | }, |
670 | getStudents() { | 643 | getStudents() { |
644 | this.getSelectUserData = []; | ||
671 | this.showLoader = true; | 645 | this.showLoader = true; |
672 | http() | 646 | http() |
673 | .get("/getStudentWithClass", { | 647 | .get("/getStudentWithClass", { |
674 | params: { | 648 | params: { |
675 | classId: this.getReport.classId, | 649 | classId: this.getReport.classId, |
676 | sectionId: this.getReport.sectionId | 650 | sectionId: this.getReport.sectionId |
677 | } | 651 | } |
678 | }) | 652 | }) |
679 | .then(response => { | 653 | .then(response => { |
680 | this.getStudentsList = response.data.data; | 654 | response.data.data.unshift({ |
655 | name: "Select All", | ||
656 | _id: "Select All" | ||
657 | }); | ||
658 | this.getSelectUserData = response.data.data; | ||
681 | this.showStudents = true; | 659 | this.showStudents = true; |
682 | this.showLoader = false; | 660 | this.showLoader = false; |
683 | }) | 661 | }) |
684 | .catch(error => { | 662 | .catch(error => { |
685 | console.log("err====>", error); | 663 | console.log("err====>", error); |
686 | this.showLoader = false; | 664 | this.showLoader = false; |
687 | }); | 665 | }); |
688 | }, | 666 | }, |
689 | getCards() { | 667 | getCards() { |
668 | console.log("this.getSelectUserData", this.getSelectUserData); | ||
669 | var getSelectUserId = []; | ||
670 | for (let i = 0; i < this.getSelectUserData.length; i++) { | ||
671 | console.log("this.getReport._id", this.getReport._id); | ||
672 | if (this.getReport._id === this.getSelectUserData[i]._id) { | ||
673 | console.log( | ||
674 | "this.getSelectUserData[i]._id------------", | ||
675 | this.getSelectUserData[i]._id | ||
676 | ); | ||
677 | getSelectUserId.push(this.getSelectUserData[i]._id); | ||
678 | } else if (this.getReport._id == "Select All") { | ||
679 | console.log( | ||
680 | "this.getSelectUserData[i]._id)", | ||
681 | this.getSelectUserData[i]._id | ||
682 | ); | ||
683 | getSelectUserId.push(this.getSelectUserData[i]._id); | ||
684 | if (getSelectUserId[0] == undefined) { | ||
685 | delete getSelectUserId[0]; | ||
686 | } | ||
687 | } | ||
688 | } | ||
689 | console.log( | ||
690 | // "this.getSelectUserData[i]._id",/ | ||
691 | // this.getSelectUserData[i]._id, | ||
692 | "getSelectUserId", | ||
693 | getSelectUserId | ||
694 | ); | ||
690 | if (this.$refs.form.validate()) { | 695 | if (this.$refs.form.validate()) { |
691 | this.showLoader = true; | 696 | this.showLoader = true; |
692 | http() | 697 | http() |
693 | .get("/getIdCardDetail", { | 698 | .get("/getIdCardDetail", { |
694 | headers: { | 699 | headers: { |
695 | Authorization: "Bearer " + this.token | 700 | Authorization: "Bearer " + this.token |
696 | }, | 701 | }, |
697 | params: { | 702 | params: { |
698 | profileId: this.getReport._id, | 703 | profileId: getSelectUserId, |
699 | role: this.getReport.role | 704 | role: this.getReport.role |
700 | } | 705 | } |
701 | }) | 706 | }) |
702 | .then(response => { | 707 | .then(response => { |
703 | this.getCard = ""; | 708 | this.getCard = ""; |
704 | var data = response.data.data; | 709 | var data = response.data.data; |
705 | if ( | 710 | if ( |
706 | Object.keys(data.adminData).length != 0 && | 711 | Object.keys(data.adminData).length != 0 && |
707 | data.adminData.constructor === Object | 712 | data.adminData.constructor === Object |
708 | ) { | 713 | ) { |
709 | this.getCard = response.data.data.adminData; | 714 | this.getCard = response.data.data.adminData; |
710 | console.log("this.getCard ", this.getCard); | 715 | // console.log("this.getCard ", this.getCard); |
711 | } | 716 | } |
712 | if ( | 717 | if ( |
713 | Object.keys(data.teachersData).length != 0 && | 718 | Object.keys(data.teachersData).length != 0 && |
714 | data.teachersData.constructor === Object | 719 | data.teachersData.constructor === Object |
715 | ) { | 720 | ) { |
716 | this.getCard = response.data.data.teachersData; | 721 | this.getCard = response.data.data.teachersData; |
717 | console.log("this.getCard--teachersData ", this.getCard); | 722 | // console.log("this.getCard--teachersData ", this.getCard); |
718 | } | 723 | } |
719 | if ( | 724 | if ( |
720 | Object.keys(data.studentData).length != 0 && | 725 | Object.keys(data.studentData).length != 0 && |
721 | data.studentData.constructor === Object | 726 | data.studentData.constructor === Object |
722 | ) { | 727 | ) { |
723 | this.getCard = response.data.data.studentData; | 728 | this.getCard = response.data.data.studentData; |
724 | console.log("this.getCard--studentData ", this.getCard); | 729 | // console.log("this.getCard--studentData ", this.getCard); |
725 | } | 730 | } |
726 | if ( | 731 | if ( |
727 | Object.keys(data.usersData).length != 0 && | 732 | Object.keys(data.usersData).length != 0 && |
728 | data.usersData.constructor === Object | 733 | data.usersData.constructor === Object |
729 | ) { | 734 | ) { |
730 | this.getCard = response.data.data.usersData; | 735 | this.getCard = response.data.data.usersData; |
731 | console.log("this.getCard--usersData ", this.getCard); | 736 | // console.log("this.getCard--usersData ", this.getCard); |
732 | } | 737 | } |
733 | // console.log("this.getCard--all ", response.data.data); | 738 | // console.log("this.getCard--all ", response.data.data); |
734 | this.showLoader = false; | 739 | this.showLoader = false; |
735 | this.showReport = true; | 740 | this.showReport = true; |
736 | }) | 741 | }) |
737 | .catch(error => { | 742 | .catch(error => { |
738 | this.showLoader = false; | 743 | this.showLoader = false; |
739 | console.log("error", error.response.data.errors); | 744 | // console.log("error", error.response.data.errors); |
740 | if (error.response.data.errors) { | 745 | if (error.response.data.errors) { |
741 | this.snackbar = true; | 746 | this.snackbar = true; |
742 | this.text = " Field is required"; | 747 | this.text = " Field is required"; |
743 | this.color = "error"; | 748 | this.color = "error"; |
744 | } | 749 | } |
745 | }); | 750 | }); |
746 | } | 751 | } |
747 | }, | 752 | }, |
748 | getTeacherList() { | 753 | getTeacherList() { |
754 | this.getSelectUserData = []; | ||
749 | this.showLoader = true; | 755 | this.showLoader = true; |
750 | var token = this.$store.state.token; | 756 | var token = this.$store.state.token; |
751 | http() | 757 | http() |
752 | .get("/getTeachersList", { | 758 | .get("/getTeachersList", { |
753 | headers: { Authorization: "Bearer " + token } | 759 | headers: { Authorization: "Bearer " + token } |
754 | }) | 760 | }) |
755 | .then(response => { | 761 | .then(response => { |
756 | this.teacherList = response.data.data; | 762 | response.data.data.unshift({ |
763 | name: "Select All", | ||
764 | _id: "Select All" | ||
765 | }); | ||
766 | this.getSelectUserData = response.data.data; | ||
757 | this.showLoader = false; | 767 | this.showLoader = false; |
758 | }) | 768 | }) |
759 | .catch(error => { | 769 | .catch(error => { |
760 | this.showLoader = false; | 770 | this.showLoader = false; |
761 | if (error.response.status === 401) { | 771 | if (error.response.status === 401) { |
762 | this.$router.replace({ path: "/" }); | 772 | this.$router.replace({ path: "/" }); |
763 | this.$store.dispatch("setToken", null); | 773 | this.$store.dispatch("setToken", null); |
764 | this.$store.dispatch("Id", null); | 774 | this.$store.dispatch("Id", null); |
765 | } | 775 | } |
766 | }); | 776 | }); |
767 | }, | 777 | }, |
768 | getUsersList(role) { | 778 | getUsersList(role) { |
779 | this.getSelectUserData = []; | ||
769 | this.showLoader = true; | 780 | this.showLoader = true; |
770 | var token = this.$store.state.token; | 781 | var token = this.$store.state.token; |
771 | http() | 782 | http() |
772 | .get("/getUsersList?role=" + role, { | 783 | .get("/getUsersList?role=" + role, { |
773 | headers: { Authorization: "Bearer " + token } | 784 | headers: { Authorization: "Bearer " + token } |
774 | }) | 785 | }) |
775 | .then(response => { | 786 | .then(response => { |
776 | this.Users = response.data.data; | 787 | response.data.data.unshift({ |
788 | name: "Select All", | ||
789 | _id: "Select All" | ||
790 | }); | ||
791 | this.getSelectUserData = response.data.data; | ||
777 | this.showLoader = false; | 792 | this.showLoader = false; |
778 | }) | 793 | }) |
779 | .catch(error => { | 794 | .catch(error => { |
780 | this.showLoader = false; | 795 | this.showLoader = false; |
781 | if (error.response.status === 401) { | 796 | if (error.response.status === 401) { |
782 | this.$router.replace({ path: "/" }); | 797 | this.$router.replace({ path: "/" }); |
783 | this.$store.dispatch("setToken", null); | 798 | this.$store.dispatch("setToken", null); |
784 | this.$store.dispatch("Id", null); | 799 | this.$store.dispatch("Id", null); |
785 | } | 800 | } |
786 | }); | 801 | }); |
787 | }, | 802 | }, |
788 | getParentDetails() { | 803 | getParentDetails() { |
789 | http() | 804 | http() |
790 | .get("getParentsList", { | 805 | .get("getParentsList", { |
791 | headers: { | 806 | headers: { |
792 | Authorization: "Bearer " + this.$store.state.token | 807 | Authorization: "Bearer " + this.$store.state.token |
793 | } | 808 | } |
794 | }) | 809 | }) |
795 | .then(response => { | 810 | .then(response => { |
796 | this.parentsList = response.data.data; | 811 | this.parentsList = response.data.data; |
797 | }) | 812 | }) |
798 | .catch(error => { | 813 | .catch(error => { |
799 | // console.log("err====>", error.response.data.message); | 814 | // console.log("err====>", error.response.data.message); |
800 | this.showLoader = false; | 815 | this.showLoader = false; |
801 | if (error.response.status === 401) { | 816 | if (error.response.status === 401) { |
802 | this.$router.replace({ path: "/" }); | 817 | this.$router.replace({ path: "/" }); |
803 | this.$store.dispatch("setToken", null); | 818 | this.$store.dispatch("setToken", null); |
804 | this.$store.dispatch("Id", null); | 819 | this.$store.dispatch("Id", null); |
805 | this.$store.dispatch("Role", null); | 820 | this.$store.dispatch("Role", null); |
806 | } | 821 | } |
807 | }); | 822 | }); |
808 | } | 823 | } |
809 | } | 824 | } |
810 | }; | 825 | }; |
811 | </script> | 826 | </script> |
812 | 827 | ||
813 | <style scoped> | 828 | <style scoped> |
814 | .Data { | 829 | .Data { |
815 | width: 100%; | 830 | width: 100%; |
816 | float: left; | 831 | float: left; |
817 | margin-bottom: 0px; | 832 | margin-bottom: 0px; |
818 | padding: 0 15px; | 833 | padding: 0 15px; |
819 | font-size: 14px; | 834 | font-size: 14px; |
820 | margin-top: 5px; | 835 | margin-top: 5px; |
821 | text-align: justify; | 836 | text-align: justify; |
822 | } | 837 | } |
823 | .idcardreport { | 838 | .idcardreport { |
824 | font-family: arial; | 839 | font-family: arial; |
825 | max-width: 794px; | 840 | max-width: 794px; |
826 | max-height: 1123px; | 841 | max-height: 1123px; |
827 | margin-left: auto; | 842 | margin-left: auto; |
828 | margin-right: auto; | 843 | margin-right: auto; |
829 | -webkit-print-color-adjust: exact; | 844 | -webkit-print-color-adjust: exact; |
830 | } | 845 | } |
831 | .idcardreport1 { | 846 | .idcardreport1 { |
832 | text-align: center; | 847 | text-align: center; |
833 | margin-left: 35%; | 848 | margin-left: 35%; |
834 | } | 849 | } |
835 | .icard-front { | 850 | .icard-front { |
836 | margin: 3px; | 851 | margin: 3px; |
837 | float: left; | 852 | float: left; |
838 | padding: 10px; | 853 | padding: 10px; |
839 | text-align: center; | 854 | text-align: center; |
840 | height: 520px; | 855 | height: 520px; |
841 | width: 520px; | 856 | width: 520px; |
842 | background: #fff; | 857 | background: #fff; |
843 | border: 1px solid lightgray; | 858 | border: 1px solid lightgray; |
844 | } | 859 | } |
845 | .print-data { | 860 | .print-data { |
846 | margin: 3px; | 861 | margin: 3px; |
847 | float: left; | 862 | float: left; |
848 | /* border: 1px solid #000; */ | 863 | /* border: 1px solid #000; */ |
849 | padding: 10px; | 864 | padding: 10px; |
850 | /* width: 55%; */ | 865 | /* width: 55%; */ |
851 | text-align: center; | 866 | text-align: center; |
852 | height: 95%; | 867 | height: 95%; |
853 | } | 868 | } |
854 | .rightside { | 869 | .rightside { |
855 | float: right !important; | 870 | float: right !important; |
856 | } | 871 | } |
857 | .icard-front h2 { | 872 | .icard-front h2 { |
858 | font-size: 30px; | 873 | font-size: 30px; |
859 | } | 874 | } |
860 | .icard-back h2 { | 875 | .icard-back h2 { |
861 | font-size: 30px; | 876 | font-size: 30px; |
862 | } | 877 | } |
863 | .print-data h2 { | 878 | .print-data h2 { |
864 | font-size: 30px; | 879 | font-size: 30px; |
865 | text-align: center; | 880 | text-align: center; |
866 | } | 881 | } |
867 | .print-data img { | 882 | .print-data img { |
868 | width: 70px; | 883 | width: 70px; |
869 | height: 70px; | 884 | height: 70px; |
870 | margin-bottom: 5px; | 885 | margin-bottom: 5px; |
871 | } | 886 | } |
872 | .icard-front img { | 887 | .icard-front img { |
873 | width: 70px; | 888 | width: 70px; |
874 | height: 70px; | 889 | height: 70px; |
875 | margin-bottom: 5px; | 890 | margin-bottom: 5px; |
876 | } | 891 | } |
877 | .icard-back img { | 892 | .icard-back img { |
878 | width: 50px; | 893 | width: 50px; |
879 | height: 50px; | 894 | height: 50px; |
880 | margin-bottom: 5px; | 895 | margin-bottom: 5px; |
881 | } | 896 | } |
882 | .icard-img { | 897 | .icard-img { |
883 | width: 50px; | 898 | width: 50px; |
884 | height: 50px; | 899 | height: 50px; |
885 | margin-bottom: 5px; | 900 | margin-bottom: 5px; |
886 | margin-top: 5px; | 901 | margin-top: 5px; |
887 | border: 1px solid #ddd; | 902 | border: 1px solid #ddd; |
888 | } | 903 | } |
889 | .icard-data { | 904 | .icard-data { |
890 | /* font-family: Arial; */ | 905 | /* font-family: Arial; */ |
891 | max-width: 794px; | 906 | max-width: 794px; |
892 | max-height: 1123px; | 907 | max-height: 1123px; |
893 | margin-left: auto; | 908 | margin-left: auto; |
894 | margin-right: auto; | 909 | margin-right: auto; |
895 | -webkit-print-color-adjust: exact; | 910 | -webkit-print-color-adjust: exact; |
896 | } | 911 | } |
897 | .icard-back { | 912 | .icard-back { |
898 | margin: 3px; | 913 | margin: 3px; |
899 | /* float: left; */ | 914 | /* float: left; */ |
900 | /* border: 1px solid #000; */ | 915 | /* border: 1px solid #000; */ |
901 | padding: 10px; | 916 | padding: 10px; |
902 | /* width: 55%; */ | 917 | /* width: 55%; */ |
903 | text-align: center; | 918 | text-align: center; |
904 | /* height: 95%; */ | 919 | /* height: 95%; */ |
905 | /* margin-top: 35%; */ | 920 | /* margin-top: 35%; */ |
906 | } | 921 | } |
907 | .back-icard { | 922 | .back-icard { |
908 | margin: 3px; | 923 | margin: 3px; |
909 | padding: 10px; | 924 | padding: 10px; |
910 | } | 925 | } |
911 | .icard-back h3 { | 926 | .icard-back h3 { |
912 | background-color: #000; | 927 | background-color: #000; |
913 | color: #fff; | 928 | color: #fff; |
914 | font-size: 13px; | 929 | font-size: 13px; |
915 | padding: 5px 0px; | 930 | padding: 5px 0px; |
916 | margin: 5px; | 931 | margin: 5px; |
917 | margin-top: 13px; | 932 | margin-top: 13px; |
918 | } | 933 | } |
919 | .icard-back h5 { | 934 | .icard-back h5 { |
920 | font-size: 11px; | 935 | font-size: 11px; |
921 | color: #000; | 936 | color: #000; |
922 | font-weight: bold; | 937 | font-weight: bold; |
923 | padding: 5px 0px; | 938 | padding: 5px 0px; |
924 | } | 939 | } |
925 | /* .icard-back p { | 940 | /* .icard-back p { |
926 | font-size: 15px; | 941 | font-size: 15px; |
927 | color: #000; | 942 | color: #000; |
928 | font-weight: 500px; | 943 | font-weight: 500px; |
929 | line-height: 17px; | 944 | line-height: 17px; |
930 | } */ | 945 | } */ |
931 | .school-address { | 946 | .school-address { |
932 | /* width: 40%; */ | 947 | /* width: 40%; */ |
933 | font-weight: 500px; | 948 | font-weight: 500px; |
934 | color: #000; | 949 | color: #000; |
935 | } | 950 | } |
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-flex xs12 flat> --> | ||
107 | <!-- {{value}}---{{id}}---{{index}} --> | ||
108 | <v-card | 106 | <v-card |
109 | class="ma-3" | 107 | class="ma-3" |
110 | style=" | 108 | style=" |
111 | border: 1px solid lightgrey; | 109 | border: 1px solid lightgrey; |
112 | margin-bottom:0px; | 110 | margin-bottom:0px; |
113 | padding: 0px" | 111 | padding: 0px" |
114 | > | 112 | > |
115 | <div style="border: 1px solid lightgray;"> | 113 | <div style="border: 1px solid lightgray;"> |
116 | <v-layout> | 114 | <v-layout> |
117 | <v-flex xs12 sm12 md12> | 115 | <v-flex xs12 sm12 md12> |
118 | <div | 116 | <div |
119 | style=" | 117 | style=" |
120 | border-bottom: 1px solid #ddd; | 118 | border-bottom: 1px solid #ddd; |
121 | overflow: hidden; | 119 | overflow: hidden; |
122 | vertical-align: middle; | 120 | vertical-align: middle; |
123 | margin: 10px; | 121 | margin: 10px; |
124 | padding-bottom: 0px;" | 122 | padding-bottom: 0px;" |
125 | > | 123 | > |
126 | <!-- <v-flex xs12 sm12 md12> --> | 124 | <!-- <v-flex xs12 sm12 md12> --> |
127 | <v-layout> | 125 | <v-layout> |
128 | <div class="school-logo"> | 126 | <div class="school-logo"> |
129 | <img | 127 | <img |
130 | :src="userData.schoolLogoUrl" | 128 | :src="userData.schoolLogoUrl" |
131 | v-if="userData.schoolLogoUrl" | 129 | v-if="userData.schoolLogoUrl" |
132 | style="width:40px !important;height:40px !important; float: left;" | 130 | style="width:40px !important;height:40px !important; float: left;" |
133 | /> | 131 | /> |
134 | <img | 132 | <img |
135 | src="/static/schoolIcons/INTRACK_White.png" | 133 | src="/static/schoolIcons/INTRACK_White.png" |
136 | v-else-if="!userData.schoolLogoUrl" | 134 | v-else-if="!userData.schoolLogoUrl" |
137 | style="width:40px !important;height:40px !important; float: left;" | 135 | style="width:40px !important;height:40px !important; float: left;" |
138 | /> | 136 | /> |
139 | </div> | 137 | </div> |
140 | <div class="school-name"> | 138 | <div class="school-name"> |
141 | <h3>{{ userData.name }}</h3> | 139 | <h3>{{ userData.name }}</h3> |
142 | </div> | 140 | </div> |
143 | </v-layout> | 141 | </v-layout> |
144 | <!-- </v-flex> --> | 142 | <!-- </v-flex> --> |
145 | </div> | 143 | </div> |
146 | <!-- Profile School --> | 144 | <!-- Profile School --> |
147 | <v-flex xs12 sm12 md12 lg12 style="margin:0px 0px; "> | 145 | <v-flex xs12 sm12 md12 lg12 style="margin:0px 0px; "> |
148 | <v-layout> | 146 | <v-layout> |
149 | <div | 147 | <div |
150 | style="flex-basis: 40%; | 148 | style="flex-basis: 40%; |
151 | -webkit-box-flex: 0; | 149 | -webkit-box-flex: 0; |
152 | -ms-flex-positive: 0; | 150 | -ms-flex-positive: 0; |
153 | flex-grow: 0; | 151 | flex-grow: 0; |
154 | max-width: 40%;" | 152 | max-width: 40%;" |
155 | > | 153 | > |
156 | <div | 154 | <div |
157 | style="padding: 4px; | 155 | style="padding: 4px; |
158 | padding-left: 16px !important;" | 156 | padding-left: 16px !important;" |
159 | > | 157 | > |
160 | <p | 158 | <p |
161 | style="font-size:20px;margin-bottom: 0px;" | 159 | style="font-size:20px;margin-bottom: 0px;" |
162 | >{{ userData.name }}</p> | 160 | >{{ userData.name }}</p> |
163 | <p | 161 | <p |
164 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 162 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
165 | >{{ userData.address }}</p> | 163 | >{{ userData.address }}</p> |
166 | <p | 164 | <p |
167 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 165 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
168 | >Phone : {{ userData.mobile }}</p> | 166 | >Phone : {{ userData.mobile }}</p> |
169 | <p | 167 | <p |
170 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 168 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
171 | >Email : {{ userData.email }}</p> | 169 | >Email : {{ userData.email }}</p> |
172 | </div> | 170 | </div> |
173 | </div> | 171 | </div> |
174 | <!-- Profile Student Report Card--> | 172 | <!-- Profile Student Report Card--> |
175 | <div | 173 | <div |
176 | style="flex-basis: 40%; | 174 | style="flex-basis: 40%; |
177 | -webkit-box-flex: 0; | 175 | -webkit-box-flex: 0; |
178 | -ms-flex-positive: 0; | 176 | -ms-flex-positive: 0; |
179 | flex-grow: 0; | 177 | flex-grow: 0; |
180 | max-width: 40%;" | 178 | max-width: 40%;" |
181 | > | 179 | > |
182 | <div v-for="(studentMark,i,index) in value" :key="index"> | 180 | <div v-for="(studentMark,i,index) in value" :key="index"> |
183 | <p | 181 | <p |
184 | v-if="index == 0" | 182 | v-if="index == 0" |
185 | style="font-size:20px;margin-bottom: 0px;" | 183 | style="font-size:20px;margin-bottom: 0px;" |
186 | >{{ studentMark[0].studentId.name }}</p> | 184 | >{{ studentMark[0].studentId.name }}</p> |
187 | <p | 185 | <p |
188 | v-if="index == 0" | 186 | v-if="index == 0" |
189 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 187 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
190 | > | 188 | > |
191 | Class : | 189 | Class : |
192 | <b>{{ studentMark[0].classId.classNum }}</b> | 190 | <b>{{ studentMark[0].classId.classNum }}</b> |
193 | </p> | 191 | </p> |
194 | <p | 192 | <p |
195 | v-if="index == 0" | 193 | v-if="index == 0" |
196 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 194 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
197 | > | 195 | > |
198 | Section : | 196 | Section : |
199 | <b>{{ studentMark[0].sectionId.name }}</b> | 197 | <b>{{ studentMark[0].sectionId.name }}</b> |
200 | </p> | 198 | </p> |
201 | <p | 199 | <p |
202 | v-if="index == 0" | 200 | v-if="index == 0" |
203 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" | 201 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;" |
204 | > | 202 | > |
205 | Roll NO : | 203 | Roll NO : |
206 | <b>{{ studentMark[0].studentId.rollNo }}</b> | 204 | <b>{{ studentMark[0].studentId.rollNo }}</b> |
207 | </p> | 205 | </p> |
208 | </div> | 206 | </div> |
209 | </div> | 207 | </div> |
210 | <div | 208 | <div |
211 | style=" | 209 | style=" |
212 | -ms-flex-preferred-size: 20%; | 210 | -ms-flex-preferred-size: 20%; |
213 | flex-basis: 20%; | 211 | flex-basis: 20%; |
214 | -webkit-box-flex: 0; | 212 | -webkit-box-flex: 0; |
215 | -ms-flex-positive: 0; | 213 | -ms-flex-positive: 0; |
216 | flex-grow: 0; | 214 | flex-grow: 0; |
217 | max-width: 20%;" | 215 | max-width: 20%;" |
218 | > | 216 | > |
219 | <div v-for="(studentMark,i,index) in value" :key="index"> | 217 | <div v-for="(studentMark,i,index) in value" :key="index"> |
220 | <div | 218 | <div |
221 | style="padding-top:16px" | 219 | style="padding-top:16px" |
222 | v-if="index == 0" | 220 | v-if="index == 0" |
223 | class="hidden-sm-only hidden-xs-only" | 221 | class="hidden-sm-only hidden-xs-only" |
224 | > | 222 | > |
225 | <img | 223 | <img |
226 | src="/static/icon/user.png" | 224 | src="/static/icon/user.png" |
227 | v-if="!studentMark[0].studentId.profilePicUrl" | 225 | v-if="!studentMark[0].studentId.profilePicUrl" |
228 | style="width:60px;height:60px;" | 226 | style="width:60px;height:60px;" |
229 | /> | 227 | /> |
230 | <img | 228 | <img |
231 | :src="studentMark[0].studentId.profilePicUrl" | 229 | :src="studentMark[0].studentId.profilePicUrl" |
232 | v-else-if="studentMark[0].studentId.profilePicUrl" | 230 | v-else-if="studentMark[0].studentId.profilePicUrl" |
233 | style="width:60px;height:60px;" | 231 | style="width:60px;height:60px;" |
234 | /> | 232 | /> |
235 | </div> | 233 | </div> |
236 | </div> | 234 | </div> |
237 | </div> | 235 | </div> |
238 | </v-layout> | 236 | </v-layout> |
239 | </v-flex> | 237 | </v-flex> |
240 | </v-flex> | 238 | </v-flex> |
241 | </v-layout> | 239 | </v-layout> |
242 | <v-card | 240 | <v-card |
243 | v-for="studentMarks in value" | 241 | v-for="studentMarks in value" |
244 | :key="studentMarks" | 242 | :key="studentMarks" |
245 | style=" | 243 | style=" |
246 | background-color: #fff; | 244 | background-color: #fff; |
247 | border-color: #fff; | 245 | border-color: #fff; |
248 | color: rgba(0,0,0,0.87); | 246 | color: rgba(0,0,0,0.87); |
249 | overflow-x: auto; | 247 | overflow-x: auto; |
250 | display: block; | 248 | display: block; |
251 | 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; |
252 | 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;" |
253 | > | 251 | > |
254 | <!-- {{studentMark}} --> | ||
255 | <!-- <div | ||
256 | style="overflow-x:auto; | ||
257 | border: 1px solid lightgrey !important;" | ||
258 | >--> | ||
259 | <table | 252 | <table |
260 | v-for="(studentMark,key) in studentMarks" | 253 | v-for="(studentMark,key) in studentMarks" |
261 | :key="key" | 254 | :key="key" |
262 | class="tableRsponsive feeTypeTable subheading" | 255 | class="tableRsponsive feeTypeTable subheading" |
263 | style="border: 1px solid black; | 256 | style="border: 1px solid black; |
264 | border-collapse: collapse;!important | 257 | border-collapse: collapse;!important |
265 | table-layout: auto !important; | 258 | table-layout: auto !important; |
266 | width: 100% !important; | 259 | width: 100% !important; |
267 | overflow: hidden;" | 260 | overflow: hidden;" |
268 | > | 261 | > |
269 | <thead | 262 | <thead |
270 | style="border: 1px solid transparent !important" | 263 | style="border: 1px solid transparent !important" |
271 | v-if="key == 0" | 264 | v-if="key == 0" |
272 | > | 265 | > |
273 | <tr style="border: 1px solid transparent !important"> | 266 | <tr style="border: 1px solid transparent !important"> |
274 | <td | 267 | <td |
275 | colspan="4" | 268 | colspan="4" |
276 | style="text-align: inherit !important; | 269 | style="text-align: inherit !important; |
277 | border-right: inherit; | 270 | border-right: inherit; |
278 | border-top: inherit; | 271 | border-top: inherit; |
279 | padding:14px;" | 272 | padding:14px;" |
280 | >{{studentMark.examId.examName}}</td> | 273 | >{{studentMark.examId.examName}}</td> |
281 | </tr> | 274 | </tr> |
282 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> | 275 | <tr style="border: 1px solid lightgrey !important;padding:4px;"> |
283 | <td | 276 | <td |
284 | rowspan="2" | 277 | rowspan="2" |
285 | style="border: 1px solid lightgrey !important;padding: 0px;" | 278 | style="border: 1px solid lightgrey !important;padding: 0px;" |
286 | >Subject</td> | 279 | >Subject</td> |
287 | <template> | 280 | <template> |
288 | <td | 281 | <td |
289 | v-for="(studentMarkData,i) in studentMark.studentsMarks" | 282 | v-for="(studentMarkData,i) in studentMark.studentsMarks" |
290 | :key="i" | 283 | :key="i" |
291 | colspan="2" | 284 | colspan="2" |
292 | style="border: 1px solid lightgrey !important;padding: 0px;" | 285 | style="border: 1px solid lightgrey !important;padding: 0px;" |
293 | >{{studentMarkData.markDistributionId.distributionType}}</td> | 286 | >{{studentMarkData.markDistributionId.distributionType}}</td> |
294 | <td | 287 | <td |
295 | style="border: 1px solid lightgrey !important;padding: 0px;" | 288 | style="border: 1px solid lightgrey !important;padding: 0px;" |
296 | >Total Marks</td> | 289 | >Total Marks</td> |
297 | </template> | 290 | </template> |
298 | </tr> | 291 | </tr> |
299 | <tr style="border: 1px solid lightgrey !important;"> | 292 | <tr style="border: 1px solid lightgrey !important;"> |
300 | <template v-for="(exam, ind) in studentMark.studentsMarks"> | 293 | <template v-for="(exam, ind) in studentMark.studentsMarks"> |
301 | <td | 294 | <td |
302 | :key="ind" | 295 | :key="ind" |
303 | style="border: 1px solid lightgrey !important;padding: 0px;" | 296 | style="border: 1px solid lightgrey !important;padding: 0px;" |
304 | >Marks</td> | 297 | >Marks</td> |
305 | <td | 298 | <td |
306 | :key="ind" | 299 | :key="ind" |
307 | style="border: 1px solid lightgrey !important;padding: 0px;" | 300 | style="border: 1px solid lightgrey !important;padding: 0px;" |
308 | >Highest Marks</td> | 301 | >Highest Marks</td> |
309 | </template> | 302 | </template> |
310 | </tr> | 303 | </tr> |
311 | </thead> | 304 | </thead> |
312 | <tbody | 305 | <tbody |
313 | style="border: 1px solid lightgrey !important;" | 306 | style="border: 1px solid lightgrey !important;" |
314 | v-if="key == 0" | 307 | v-if="key == 0" |
315 | > | 308 | > |
316 | <tr v-for="studentMark in studentMarks" :key="studentMark"> | 309 | <tr v-for="studentMark in studentMarks" :key="studentMark"> |
317 | <td | 310 | <td |
318 | style="border: 1px solid lightgrey !important;padding: 0px;" | 311 | style="border: 1px solid lightgrey !important;padding: 0px;" |
319 | >{{studentMark.subjectName}}</td> | 312 | >{{studentMark.subjectName}}</td> |
320 | <template v-for="(exam, index) in studentMark.studentsMarks"> | 313 | <template v-for="(exam, index) in studentMark.studentsMarks"> |
321 | <td | 314 | <td |
322 | :key="index" | 315 | :key="index" |
323 | style="border: 1px solid lightgrey !important;padding: 0px;" | 316 | style="border: 1px solid lightgrey !important;padding: 0px;" |
324 | >{{exam.marksScored}}</td> | 317 | >{{exam.marksScored}}</td> |
325 | <td | 318 | <td |
326 | :key="index" | 319 | :key="index" |
327 | style="border: 1px solid lightgrey !important;padding: 0px;" | 320 | style="border: 1px solid lightgrey !important;padding: 0px;" |
328 | >{{exam.markDistributionId.markValue}}</td> | 321 | >{{exam.markDistributionId.markValue}}</td> |
329 | </template> | 322 | </template> |
330 | <td | 323 | <td |
331 | style="border: 1px solid lightgrey !important;padding: 0px;" | 324 | style="border: 1px solid lightgrey !important;padding: 0px;" |
332 | >{{studentMark.totalMarks}}</td> | 325 | >{{studentMark.totalMarks}}</td> |
333 | </tr> | 326 | </tr> |
334 | </tbody> | 327 | </tbody> |
335 | <tfoot v-if="key == studentMarks.length - 1"> | 328 | <tfoot v-if="key == studentMarks.length - 1"> |
336 | <tr style="border: 1px solid lightgrey !important;"> | 329 | <tr style="border: 1px solid lightgrey !important;"> |
337 | <td | 330 | <td |
338 | colspan="5" | 331 | colspan="5" |
339 | class="subheding" | 332 | class="subheding" |
340 | style=" | 333 | style=" |
341 | border: 1px solid #e2e7eb; | 334 | border: 1px solid #e2e7eb; |
342 | text-align:center | 335 | text-align:center |
343 | padding: 0px;" | 336 | padding: 0px;" |
344 | >Total Marks</td> | 337 | >Total Marks</td> |
345 | <td | 338 | <td |
346 | colspan="7" | 339 | colspan="7" |
347 | style="border: 1px solid lightgrey !important;padding: 0px;" | 340 | style="border: 1px solid lightgrey !important;padding: 0px;" |
348 | >{{ studentMark.allSubjectTotalMarks }}</td> | 341 | >{{ studentMark.allSubjectTotalMarks }}</td> |
349 | </tr> | 342 | </tr> |
350 | <tr> | 343 | <tr> |
351 | <td | 344 | <td |
352 | colspan="5" | 345 | colspan="5" |
353 | class="subheding" | 346 | class="subheding" |
354 | style=" | 347 | style=" |
355 | border: 1px solid #e2e7eb; | 348 | border: 1px solid #e2e7eb; |
356 | text-align:center | 349 | text-align:center |
357 | padding: 0px;" | 350 | padding: 0px;" |
358 | >Grade</td> | 351 | >Grade</td> |
359 | <td | 352 | <td |
360 | colspan="7" | 353 | colspan="7" |
361 | style="border: 1px solid lightgrey !important;padding: 0px;" | 354 | style="border: 1px solid lightgrey !important;padding: 0px;" |
362 | >{{ studentMark.grade ? studentMark.grade : "-" }}</td> | 355 | >{{ studentMark.grade ? studentMark.grade : "-" }}</td> |
363 | </tr> | 356 | </tr> |
364 | <tr> | 357 | <tr> |
365 | <td | 358 | <td |
366 | colspan="5" | 359 | colspan="5" |
367 | style=" | 360 | style=" |
368 | border: 1px solid #e2e7eb; | 361 | border: 1px solid #e2e7eb; |
369 | text-align:center | 362 | text-align:center |
370 | padding: 0px;" | 363 | padding: 0px;" |
371 | class="subheding" | 364 | class="subheding" |
372 | >Average Mark</td> | 365 | >Average Mark</td> |
373 | <td | 366 | <td |
374 | colspan="7" | 367 | colspan="7" |
375 | style="border: 1px solid lightgrey !important;padding: 0px;" | 368 | style="border: 1px solid lightgrey !important;padding: 0px;" |
376 | >-</td> | 369 | >-</td> |
377 | </tr> | 370 | </tr> |
378 | <tr> | 371 | <tr> |
379 | <td | 372 | <td |
380 | colspan="5" | 373 | colspan="5" |
381 | style=" | 374 | style=" |
382 | border: 1px solid #e2e7eb; | 375 | border: 1px solid #e2e7eb; |
383 | text-align:center | 376 | text-align:center |
384 | padding: 0px; !important; | 377 | padding: 0px; !important; |
385 | font-size: 16px !important;" | 378 | font-size: 16px !important;" |
386 | class="subheding" | 379 | class="subheding" |
387 | >GPA</td> | 380 | >GPA</td> |
388 | <td | 381 | <td |
389 | colspan="7" | 382 | colspan="7" |
390 | 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;" |
391 | >-</td> | 384 | >-</td> |
392 | </tr> | 385 | </tr> |
393 | </tfoot> | 386 | </tfoot> |
394 | </table> | 387 | </table> |
395 | </v-card> | 388 | </v-card> |
396 | </div> | 389 | </div> |
397 | </v-card> | 390 | </v-card> |
398 | <p style="page-break-after: always;"> </p> | 391 | <p style="page-break-after: always;"> </p> |
399 | </card> | 392 | </card> |
400 | </div> | 393 | </div> |
401 | </v-flex> | 394 | </v-flex> |
402 | </v-layout> | 395 | </v-layout> |
403 | </v-flex> | 396 | </v-flex> |
404 | </v-container> | 397 | </v-container> |
405 | </v-card> | 398 | </v-card> |
406 | </v-flex> | 399 | </v-flex> |
407 | </v-layout> | 400 | </v-layout> |
408 | <div class="loader" v-if="showLoader"> | 401 | <div class="loader" v-if="showLoader"> |
409 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 402 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
410 | </div> | 403 | </div> |
411 | </v-container> | 404 | </v-container> |
412 | </template> | 405 | </template> |
413 | 406 | ||
414 | <script> | 407 | <script> |
415 | import http from "@/Services/http.js"; | 408 | import http from "@/Services/http.js"; |
416 | import moment from "moment"; | 409 | import moment from "moment"; |
417 | import _ from "underscore"; | 410 | import _ from "underscore"; |
418 | 411 | ||
419 | export default { | 412 | export default { |
420 | data: () => ({ | 413 | data: () => ({ |
421 | showLoader: false, | 414 | showLoader: false, |
422 | cardData: [], | 415 | cardData: [], |
423 | token: "", | 416 | token: "", |
424 | markDistributions: [], | 417 | markDistributions: [], |
425 | markParticularDistributionData: [], | 418 | markParticularDistributionData: [], |
426 | loading: false, | 419 | loading: false, |
427 | valid: true, | 420 | valid: true, |
428 | loading: false, | 421 | loading: false, |
429 | showReport: false, | 422 | showReport: false, |
430 | printLoader: false, | 423 | printLoader: false, |
431 | addSection: [], | 424 | addSection: [], |
432 | filterData: [], | 425 | filterData: [], |
433 | getStudentsList: [], | 426 | getStudentsList: [], |
434 | classRules: [v => !!v || "Class is required"], | 427 | classRules: [v => !!v || "Class is required"], |
435 | sectionRules: [v => !!v || "Class is required"], | 428 | sectionRules: [v => !!v || "Class is required"], |
436 | studentRules: [v => !!v || "Student is required"], | 429 | studentRules: [v => !!v || "Student is required"], |
437 | getReport: {}, | 430 | getReport: {}, |
438 | classList: [], | 431 | classList: [], |
439 | output: null, | 432 | output: null, |
440 | userData: {}, | 433 | userData: {}, |
441 | newData: [], | 434 | newData: [], |
442 | gradeAPlus: "A+", | 435 | gradeAPlus: "A+", |
443 | gradeA: "A", | 436 | gradeA: "A", |
444 | gradeBPlus: "B+", | 437 | gradeBPlus: "B+", |
445 | gradeB: "B", | 438 | gradeB: "B", |
446 | gradeCPlus: "C+", | 439 | gradeCPlus: "C+", |
447 | gradeC: "C", | 440 | gradeC: "C", |
448 | totalMarks: "" | 441 | totalMarks: "" |
449 | }), | 442 | }), |
450 | mounted() { | 443 | mounted() { |
451 | this.token = this.$store.state.token; | 444 | this.token = this.$store.state.token; |
452 | this.getClass(); | 445 | this.getClass(); |
453 | this.getUserData(); | 446 | this.getUserData(); |
454 | }, | 447 | }, |
455 | methods: { | 448 | methods: { |
456 | clear() { | 449 | clear() { |
457 | this.$refs.form.reset(); | 450 | this.$refs.form.reset(); |
458 | }, | 451 | }, |
459 | getClass() { | 452 | getClass() { |
460 | this.showLoader = true; | 453 | this.showLoader = true; |
461 | http() | 454 | http() |
462 | .get("/getClassesList", { | 455 | .get("/getClassesList", { |
463 | headers: { Authorization: "Bearer " + this.token } | 456 | headers: { Authorization: "Bearer " + this.token } |
464 | }) | 457 | }) |
465 | .then(response => { | 458 | .then(response => { |
466 | this.classList = response.data.data; | 459 | this.classList = response.data.data; |
467 | this.showLoader = false; | 460 | this.showLoader = false; |
468 | }) | 461 | }) |
469 | .catch(error => { | 462 | .catch(error => { |
470 | this.showLoader = false; | 463 | this.showLoader = false; |
471 | // console.log("err====>", err); | 464 | // console.log("err====>", err); |
472 | }); | 465 | }); |
473 | }, | 466 | }, |
474 | getSections(_id) { | 467 | getSections(_id) { |
475 | this.showLoader = true; | 468 | this.showLoader = true; |
476 | http() | 469 | http() |
477 | .get( | 470 | .get( |
478 | "/getSectionsList", | 471 | "/getSectionsList", |
479 | { params: { classId: _id } }, | 472 | { params: { classId: _id } }, |
480 | { | 473 | { |
481 | headers: { Authorization: "Bearer " + this.token } | 474 | headers: { Authorization: "Bearer " + this.token } |
482 | } | 475 | } |
483 | ) | 476 | ) |
484 | .then(response => { | 477 | .then(response => { |
485 | this.addSection = response.data.data; | 478 | this.addSection = response.data.data; |
486 | this.showLoader = false; | 479 | this.showLoader = false; |
487 | }) | 480 | }) |
488 | .catch(err => { | 481 | .catch(err => { |
489 | this.showLoader = false; | 482 | this.showLoader = false; |
490 | // console.log("err====>", err); | 483 | // console.log("err====>", err); |
491 | }); | 484 | }); |
492 | }, | 485 | }, |
493 | getStudents() { | 486 | getStudents() { |
494 | this.showLoader = true; | 487 | this.showLoader = true; |
495 | http() | 488 | http() |
496 | .get("/getStudentWithClass", { | 489 | .get("/getStudentWithClass", { |
497 | params: { | 490 | params: { |
498 | classId: this.getReport.classId, | 491 | classId: this.getReport.classId, |
499 | sectionId: this.getReport.sectionId | 492 | sectionId: this.getReport.sectionId |
500 | } | 493 | } |
501 | }) | 494 | }) |
502 | .then(response => { | 495 | .then(response => { |
503 | response.data.data.unshift({ | 496 | response.data.data.unshift({ |
504 | name: "Select All", | 497 | name: "Select All", |
505 | _id: "Select All" | 498 | _id: "Select All" |
506 | }); | 499 | }); |
507 | this.getStudentsList = response.data.data; | 500 | this.getStudentsList = response.data.data; |
508 | this.showLoader = false; | 501 | this.showLoader = false; |
509 | // console.log("getSectionsList=====>", response.data.data); | ||
510 | }) | 502 | }) |
511 | .catch(error => { | 503 | .catch(error => { |
512 | console.log("err====>", error); | 504 | console.log("err====>", error); |
513 | this.showLoader = false; | 505 | this.showLoader = false; |
514 | }); | 506 | }); |
515 | }, | 507 | }, |
516 | getMarkReportList() { | 508 | getMarkReportList() { |
517 | this.showLoader = true; | 509 | this.showLoader = true; |
518 | this.showReport = true; | 510 | this.showReport = true; |
519 | var getSelectMarks = {}; | 511 | var getSelectMarks = {}; |
520 | if (this.getReport.studentId == "Select All") { | 512 | if (this.getReport.studentId == "Select All") { |
521 | getSelectMarks = { | 513 | getSelectMarks = { |
522 | classId: this.getReport.classId, | 514 | classId: this.getReport.classId, |
523 | sectionId: this.getReport.sectionId | 515 | sectionId: this.getReport.sectionId |
524 | }; | 516 | }; |
525 | } else if (this.getReport.studentId != "Select All") { | 517 | } else if (this.getReport.studentId != "Select All") { |
526 | getSelectMarks = { | 518 | getSelectMarks = { |
527 | classId: this.getReport.classId, | 519 | classId: this.getReport.classId, |
528 | sectionId: this.getReport.sectionId, | 520 | sectionId: this.getReport.sectionId, |
529 | studentId: this.getReport.studentId | 521 | studentId: this.getReport.studentId |
530 | }; | 522 | }; |
531 | } | 523 | } |
532 | http() | 524 | http() |
533 | .get("/getParticularMark", { | 525 | .get("/getParticularMark", { |
534 | params: getSelectMarks, | 526 | params: getSelectMarks, |
535 | headers: { Authorization: "Bearer " + this.token } | 527 | headers: { Authorization: "Bearer " + this.token } |
536 | }) | 528 | }) |
537 | .then(response => { | 529 | .then(response => { |
538 | this.cardData = response.data.data; | 530 | this.cardData = response.data.data; |
539 | let newData = response.data.data; | 531 | let newData = response.data.data; |
540 | for (var i = 0; i < newData.length; i++) { | 532 | for (var i = 0; i < newData.length; i++) { |
541 | newData[i].examination = newData[i].examId._id; | 533 | newData[i].examination = newData[i].examId._id; |
542 | newData[i].studentsId = newData[i].studentId._id; | 534 | newData[i].studentsId = newData[i].studentId._id; |
543 | } | 535 | } |
544 | var studentMarkArray = []; | 536 | var studentMarkArray = []; |
545 | studentMarkArray = _.groupBy(newData, ["studentsId"]); | 537 | studentMarkArray = _.groupBy(newData, ["studentsId"]); |
546 | for (let data in studentMarkArray) { | 538 | for (let data in studentMarkArray) { |
547 | studentMarkArray[data] = _.groupBy(studentMarkArray[data], [ | 539 | studentMarkArray[data] = _.groupBy(studentMarkArray[data], [ |
548 | "examination" | 540 | "examination" |
549 | ]); | 541 | ]); |
550 | } | 542 | } |
551 | this.filterData = studentMarkArray; | 543 | this.filterData = studentMarkArray; |
552 | for (let data in this.filterData) { | 544 | for (let data in this.filterData) { |
553 | for (let item in this.filterData[data]) { | 545 | for (let item in this.filterData[data]) { |
554 | var allSubjectTotalMarks = 0; | 546 | var allSubjectTotalMarks = 0; |
555 | for (let i = 0; i < this.filterData[data][item].length; i++) { | 547 | for (let i = 0; i < this.filterData[data][item].length; i++) { |
556 | var totalMarks = 0; | 548 | var totalMarks = 0; |
557 | for ( | 549 | for ( |
558 | let j = 0; | 550 | let j = 0; |
559 | j < studentMarkArray[data][item][i].studentsMarks.length; | 551 | j < studentMarkArray[data][item][i].studentsMarks.length; |
560 | j++ | 552 | j++ |
561 | ) { | 553 | ) { |
562 | totalMarks += | 554 | totalMarks += |
563 | studentMarkArray[data][item][i].studentsMarks[j] | 555 | studentMarkArray[data][item][i].studentsMarks[j] |
564 | .marksScored; | 556 | .marksScored; |
565 | } | 557 | } |
566 | this.filterData[data][item][i].totalMarks = totalMarks; | 558 | this.filterData[data][item][i].totalMarks = totalMarks; |
567 | 559 | ||
568 | allSubjectTotalMarks += this.filterData[data][item][i] | 560 | allSubjectTotalMarks += this.filterData[data][item][i] |
569 | .totalMarks; | 561 | .totalMarks; |
570 | this.filterData[data][item][ | 562 | this.filterData[data][item][ |
571 | i | 563 | i |
572 | ].allSubjectTotalMarks = allSubjectTotalMarks; | 564 | ].allSubjectTotalMarks = allSubjectTotalMarks; |
573 | } | 565 | } |
574 | 566 | ||
575 | // this.totalMarks = totalMarks; | 567 | // this.totalMarks = totalMarks; |
576 | if (totalMarks > 90) { | 568 | if (totalMarks > 90) { |
577 | this.filterData[data][item].grade = this.gradeAPlus; | 569 | this.filterData[data][item].grade = this.gradeAPlus; |
578 | } else if (totalMarks > 80 && totalMarks < 90) { | 570 | } else if (totalMarks > 80 && totalMarks < 90) { |
579 | this.filterData[data][item].grade = this.gradeA; | 571 | this.filterData[data][item].grade = this.gradeA; |
580 | } else if (totalMarks > 70 && totalMarks < 80) { | 572 | } else if (totalMarks > 70 && totalMarks < 80) { |
581 | this.filterData[data][item].grade = this.gradeBPlus; | 573 | this.filterData[data][item].grade = this.gradeBPlus; |
582 | } else if (totalMarks > 60 && totalMarks < 70) { | 574 | } else if (totalMarks > 60 && totalMarks < 70) { |
583 | this.filterData[data][item].grade = this.gradeB; | 575 | this.filterData[data][item].grade = this.gradeB; |
584 | } else if (totalMarks > 50 && totalMarks < 60) { | 576 | } else if (totalMarks > 50 && totalMarks < 60) { |
585 | this.filterData[data][item].grade = this.gradeCPlus; | 577 | this.filterData[data][item].grade = this.gradeCPlus; |
586 | } else if (totalMarks > 40 && totalMarks < 50) { | 578 | } else if (totalMarks > 40 && totalMarks < 50) { |
587 | this.filterData[data][item].grade = this.gradeC; | 579 | this.filterData[data][item].grade = this.gradeC; |
588 | } | 580 | } |
589 | } | 581 | } |
590 | } | 582 | } |
591 | // console.log("this.filterData-----------last", this.filterData); | 583 | // console.log("this.filterData-----------last", this.filterData); |
592 | 584 | ||
593 | this.showLoader = false; | 585 | this.showLoader = false; |
594 | }) | 586 | }) |
595 | .catch(error => { | 587 | .catch(error => { |
596 | // console.log("err====>", err); | 588 | // console.log("err====>", err); |
597 | this.showLoader = false; | 589 | this.showLoader = false; |
598 | this.snackbar = true; | 590 | this.snackbar = true; |
599 | // this.text = error.response.data.message; | 591 | // this.text = error.response.data.message; |
600 | // if (error.response.status === 401) { | 592 | // if (error.response.status === 401) { |
601 | // this.$router.replace({ path: "/" }); | 593 | // this.$router.replace({ path: "/" }); |
602 | // this.$store.dispatch("setToken", null); | 594 | // this.$store.dispatch("setToken", null); |
603 | // this.$store.dispatch("Id", null); | 595 | // this.$store.dispatch("Id", null); |
604 | // } | 596 | // } |
605 | }); | 597 | }); |
606 | }, | 598 | }, |
607 | printProgressReport() { | 599 | printProgressReport() { |
608 | this.printLoader = true; | 600 | this.printLoader = true; |
609 | setTimeout(() => { | 601 | setTimeout(() => { |
610 | // Pass the element id here | 602 | // Pass the element id here |
611 | this.$htmlToPaper("printMe"); | 603 | this.$htmlToPaper("printMe"); |
612 | this.printLoader = false; | 604 | this.printLoader = false; |
613 | }, 4000); | 605 | }, 4000); |
614 | }, | 606 | }, |
615 | getUserData() { | 607 | getUserData() { |
616 | http() | 608 | http() |
617 | .get("/getParticularUserDetail") | 609 | .get("/getParticularUserDetail") |
618 | .then(response => { | 610 | .then(response => { |
619 | this.userData = response.data.data; | 611 | this.userData = response.data.data; |
620 | }) | 612 | }) |
621 | .catch(error => { | 613 | .catch(error => { |
622 | // if (error.response.status === 401) { | 614 | if (error.response.status === 401) { |
623 | // this.$router.replace({ path: "/" }); | 615 | this.$router.replace({ path: "/" }); |
624 | // this.$store.dispatch("setToken", null); | 616 | this.$store.dispatch("setToken", null); |
625 | // this.$store.dispatch("Id", null); | 617 | this.$store.dispatch("Id", null); |
626 | // } | 618 | } |
627 | }); | 619 | }); |
628 | } | 620 | } |
629 | } | 621 | } |
630 | }; | 622 | }; |
631 | </script> | 623 | </script> |
632 | 624 | ||
633 | <style scoped> | 625 | <style scoped> |
634 | table { | 626 | table { |
635 | border-collapse: collapse; | 627 | border-collapse: collapse; |
636 | border: 1px solid #e2e7eb; | 628 | border: 1px solid #e2e7eb; |
637 | } | 629 | } |
638 | 630 | ||
639 | th, | 631 | th, |
640 | td { | 632 | td { |
641 | border: 1px solid #e2e7eb; | 633 | border: 1px solid #e2e7eb; |
642 | padding: 0px; | 634 | padding: 0px; |
643 | text-align: center; | 635 | text-align: center; |
644 | } | 636 | } |
645 | table.feeTypeTable { | 637 | table.feeTypeTable { |
646 | table-layout: auto !important; | 638 | table-layout: auto !important; |
647 | width: 100% !important; | 639 | width: 100% !important; |
648 | } | 640 | } |
649 | .bg-sky { | 641 | .bg-sky { |
650 | background-color: #98b2cc !important; | 642 | background-color: #98b2cc !important; |
651 | } | 643 | } |
652 | .bg-sky-light { | 644 | .bg-sky-light { |
653 | background-color: #89a0b8; | 645 | background-color: #89a0b8; |
654 | } | 646 | } |
655 | .bg-purple { | 647 | .bg-purple { |
656 | background-color: #9583ac; | 648 | background-color: #9583ac; |
657 | } | 649 | } |
658 | .bg-skyDark { | 650 | .bg-skyDark { |
659 | background-color: #956785; | 651 | background-color: #956785; |
660 | } | 652 | } |
661 | 653 | ||
662 | /* .report { | 654 | /* .report { |
663 | overflow: hidden; | 655 | overflow: hidden; |
664 | max-width: 794px; | 656 | max-width: 794px; |
665 | margin: 0px auto; | 657 | margin: 0px auto; |
666 | margin-bottom: 10px; | 658 | margin-bottom: 10px; |
667 | padding: 30px; | 659 | padding: 30px; |
668 | } */ | 660 | } */ |
669 | .line { | 661 | .line { |
670 | border-bottom: 1px solid #ddd; | 662 | border-bottom: 1px solid #ddd; |
671 | overflow: hidden; | 663 | overflow: hidden; |
672 | padding-bottom: 10px; | 664 | padding-bottom: 10px; |
673 | vertical-align: middle; | 665 | vertical-align: middle; |
674 | margin-bottom: 4px; | 666 | margin-bottom: 4px; |
675 | } | 667 | } |
676 | .school-logo { | 668 | .school-logo { |
677 | float: left; | 669 | float: left; |
678 | } | 670 | } |
679 | .school-name { | 671 | .school-name { |
680 | box-sizing: border-box; | 672 | box-sizing: border-box; |
681 | } | 673 | } |
682 | .school-info { | 674 | .school-info { |
683 | width: 100%; | 675 | width: 100%; |
684 | overflow: hidden; | 676 | overflow: hidden; |
685 | } | 677 | } |
686 | .school-address { | 678 | .school-address { |
687 | float: left; | 679 | float: left; |
688 | width: 40%; | 680 | width: 40%; |
689 | } | 681 | } |
690 | .student-data { | 682 | .student-data { |
691 | float: right; | 683 | float: right; |
692 | width: 40%; | 684 | width: 40%; |
693 | } | 685 | } |
694 | .student-info { | 686 | .student-info { |
695 | float: left; | 687 | float: left; |
696 | } | 688 | } |
697 | @media screen and (max-width: 380px) { | 689 | @media screen and (max-width: 380px) { |
698 | .tableRsponsive { | 690 | .tableRsponsive { |
699 | /* display: block; */ | 691 | /* display: block; */ |
700 | position: relative; | 692 | position: relative; |
701 | overflow: scroll; | 693 | overflow: scroll; |
702 | } | 694 | } |
703 | } | 695 | } |
704 | </style> s | 696 | </style> s |
src/pages/Students/students.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EDITS STUDENTS DETAILS ****** --> | 3 | <!-- ****** EDITS STUDENTS DETAILS ****** --> |
4 | <v-dialog v-model="editStudentDialog" max-width="1700px" scrollable> | 4 | <v-dialog v-model="editStudentDialog" max-width="1700px" 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 Student Details</label> | 8 | <label class="title text-xs-center">Edit Student Details</label> |
9 | <v-icon size="24" class="right" @click="editStudentDialog = false">cancel</v-icon> | 9 | <v-icon size="24" class="right" @click="editStudentDialog = 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-form ref="form"> | 13 | <v-form ref="form"> |
14 | <v-container fluid> | 14 | <v-container fluid> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> | 16 | <v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center"> |
17 | <v-avatar size="100px" v-if="!editedItem.profilePicUrl && !editImageUrl"> | 17 | <v-avatar size="100px" v-if="!editedItem.profilePicUrl && !editImageUrl"> |
18 | <img | 18 | <img src="/static/icon/user.png" /> |
19 | src="/static/icon/user.png" | ||
20 | /> | ||
21 | </v-avatar> | 19 | </v-avatar> |
22 | <img | 20 | <img |
23 | :src="editedItem.profilePicUrl" | 21 | :src="editedItem.profilePicUrl" |
24 | v-else-if="editedItem.profilePicUrl && !editImageUrl" | 22 | v-else-if="editedItem.profilePicUrl && !editImageUrl" |
25 | height="150" | 23 | height="150" |
26 | style="border-radius:50%; width:150px" | 24 | style="border-radius:50%; width:150px" |
27 | /> | 25 | /> |
28 | <img | 26 | <img |
29 | v-if="editImageUrl" | 27 | v-if="editImageUrl" |
30 | :src="editImageUrl" | 28 | :src="editImageUrl" |
31 | style="border-radius:50%; width:150px;height:150px" | 29 | style="border-radius:50%; width:150px;height:150px" |
32 | /> | 30 | /> |
33 | <input | 31 | <input |
34 | type="file" | 32 | type="file" |
35 | style="display: none" | 33 | style="display: none" |
36 | ref="editDataImage" | 34 | ref="editDataImage" |
37 | accept="image/*" | 35 | accept="image/*" |
38 | @change="onEditFilePicked" | 36 | @change="onEditFilePicked" |
39 | /> | 37 | /> |
40 | </v-flex> | 38 | </v-flex> |
41 | </v-layout> | 39 | </v-layout> |
42 | <v-layout wrap> | 40 | <v-layout wrap> |
43 | <v-flex xs12 sm4> | 41 | <v-flex xs12 sm4> |
44 | <v-layout> | 42 | <v-layout> |
45 | <v-flex xs4 class="pt-4 subheading"> | 43 | <v-flex xs4 class="pt-4 subheading"> |
46 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 44 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
47 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> | 45 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Class:</label> |
48 | </v-flex> | 46 | </v-flex> |
49 | <v-flex xs8 class="ml-3"> | 47 | <v-flex xs8 class="ml-3"> |
50 | <v-select | 48 | <v-select |
51 | :items="addclass" | 49 | :items="addclass" |
52 | label="Select Class" | 50 | label="Select Class" |
53 | v-model="editedItem.select" | 51 | v-model="editedItem.select" |
54 | item-text="classNum" | 52 | item-text="classNum" |
55 | item-value="_id" | 53 | item-value="_id" |
56 | name="Select Class" | 54 | name="Select Class" |
57 | @change="getSections(editedItem.select)" | 55 | @change="getSections(editedItem.select)" |
58 | required | 56 | required |
59 | ></v-select> | 57 | ></v-select> |
60 | </v-flex> | 58 | </v-flex> |
61 | </v-layout> | 59 | </v-layout> |
62 | </v-flex> | 60 | </v-flex> |
63 | <v-flex xs12 sm4> | 61 | <v-flex xs12 sm4> |
64 | <v-layout> | 62 | <v-layout> |
65 | <v-flex xs4 class="pt-4 subheading"> | 63 | <v-flex xs4 class="pt-4 subheading"> |
66 | <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> | 64 | <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> |
67 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label> | 65 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Section:</label> |
68 | </v-flex> | 66 | </v-flex> |
69 | <v-flex xs8 class="ml-3"> | 67 | <v-flex xs8 class="ml-3"> |
70 | <v-select | 68 | <v-select |
71 | :items="addSection" | 69 | :items="addSection" |
72 | label="Select Section" | 70 | label="Select Section" |
73 | v-model="editedItem.selectSection" | 71 | v-model="editedItem.selectSection" |
74 | item-text="name" | 72 | item-text="name" |
75 | item-value="_id" | 73 | item-value="_id" |
76 | name="Select Section" | 74 | name="Select Section" |
77 | required | 75 | required |
78 | ></v-select> | 76 | ></v-select> |
79 | </v-flex> | 77 | </v-flex> |
80 | </v-layout> | 78 | </v-layout> |
81 | </v-flex> | 79 | </v-flex> |
82 | <v-flex xs12 sm4> | 80 | <v-flex xs12 sm4> |
83 | <v-layout> | 81 | <v-layout> |
84 | <v-flex xs4 class="pt-4 subheading"> | 82 | <v-flex xs4 class="pt-4 subheading"> |
85 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 83 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
86 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> | 84 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Name:</label> |
87 | </v-flex> | 85 | </v-flex> |
88 | <v-flex xs8 class="ml-3"> | 86 | <v-flex xs8 class="ml-3"> |
89 | <v-text-field | 87 | <v-text-field |
90 | v-model="editedItem.name" | 88 | v-model="editedItem.name" |
91 | placeholder="fill your full Name" | 89 | placeholder="fill your full Name" |
92 | name="name" | 90 | name="name" |
93 | type="text" | 91 | type="text" |
94 | required | 92 | required |
95 | ></v-text-field> | 93 | ></v-text-field> |
96 | </v-flex> | 94 | </v-flex> |
97 | </v-layout> | 95 | </v-layout> |
98 | </v-flex> | 96 | </v-flex> |
99 | </v-layout> | 97 | </v-layout> |
100 | <v-layout wrap> | 98 | <v-layout wrap> |
101 | <v-flex xs12 sm4> | 99 | <v-flex xs12 sm4> |
102 | <v-layout> | 100 | <v-layout> |
103 | <v-flex xs4 class="pt-4 subheading"> | 101 | <v-flex xs4 class="pt-4 subheading"> |
104 | <label class="right hidden-xs-only hidden-sm-only">Email Id:</label> | 102 | <label class="right hidden-xs-only hidden-sm-only">Email Id:</label> |
105 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Email:</label> | 103 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Email:</label> |
106 | </v-flex> | 104 | </v-flex> |
107 | <v-flex xs8 class="ml-3"> | 105 | <v-flex xs8 class="ml-3"> |
108 | <v-text-field | 106 | <v-text-field |
109 | placeholder="fill your email" | 107 | placeholder="fill your email" |
110 | v-model="editedItem.email" | 108 | v-model="editedItem.email" |
111 | type="text" | 109 | type="text" |
112 | name="email" | 110 | name="email" |
113 | required | 111 | required |
114 | ></v-text-field> | 112 | ></v-text-field> |
115 | </v-flex> | 113 | </v-flex> |
116 | </v-layout> | 114 | </v-layout> |
117 | </v-flex> | 115 | </v-flex> |
118 | <v-flex xs12 sm4> | 116 | <v-flex xs12 sm4> |
119 | <v-layout> | 117 | <v-layout> |
120 | <v-flex xs4 class="pt-4 subheading"> | 118 | <v-flex xs4 class="pt-4 subheading"> |
121 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> | 119 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> |
122 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> | 120 | <label class="right hidden-lg-only hidden-xl-only hidden-md-only">D.O.B:</label> |
123 | </v-flex> | 121 | </v-flex> |
124 | <v-flex xs8 class="ml-3"> | 122 | <v-flex xs8 class="ml-3"> |
125 | <v-menu | 123 | <v-menu |
126 | ref="menu" | 124 | ref="menu" |
127 | :close-on-content-click="false" | 125 | :close-on-content-click="false" |
128 | v-model="menu1" | 126 | v-model="menu1" |
129 | :nudge-right="40" | 127 | :nudge-right="40" |
130 | lazy | 128 | lazy |
131 | transition="scale-transition" | 129 | transition="scale-transition" |
132 | offset-y | 130 | offset-y |
133 | full-width | 131 | full-width |
134 | min-width="290px" | 132 | min-width="290px" |
135 | > | 133 | > |
136 | <v-text-field | 134 | <v-text-field |
137 | slot="activator" | 135 | slot="activator" |
138 | v-model="editedItem.dob" | 136 | v-model="editedItem.dob" |
139 | placeholder="Select Dob" | 137 | placeholder="Select Dob" |
140 | ></v-text-field> | 138 | ></v-text-field> |
141 | <v-date-picker | 139 | <v-date-picker |
142 | ref="picker" | 140 | ref="picker" |
143 | v-model="editedItem.dob" | 141 | v-model="editedItem.dob" |
144 | :max="new Date().toISOString().substr(0, 10)" | 142 | :max="new Date().toISOString().substr(0, 10)" |
145 | min="1950-01-01" | 143 | min="1950-01-01" |
146 | @input="menu1 = false" | 144 | @input="menu1 = false" |
147 | ></v-date-picker> | 145 | ></v-date-picker> |
148 | </v-menu> | 146 | </v-menu> |
149 | </v-flex> | 147 | </v-flex> |
150 | </v-layout> | 148 | </v-layout> |
151 | </v-flex> | 149 | </v-flex> |
152 | <v-flex xs12 sm4> | 150 | <v-flex xs12 sm4> |
153 | <v-layout> | 151 | <v-layout> |
154 | <v-flex xs4 class="pt-4 subheading"> | 152 | <v-flex xs4 class="pt-4 subheading"> |
155 | <label class="right">City:</label> | 153 | <label class="right">City:</label> |
156 | </v-flex> | 154 | </v-flex> |
157 | <v-flex xs8 class="ml-3"> | 155 | <v-flex xs8 class="ml-3"> |
158 | <v-text-field | 156 | <v-text-field |
159 | v-model="editedItem.city" | 157 | v-model="editedItem.city" |
160 | placeholder="fill your City Name" | 158 | placeholder="fill your City Name" |
161 | name="City" | 159 | name="City" |
162 | type="text" | 160 | type="text" |
163 | required | 161 | required |
164 | ></v-text-field> | 162 | ></v-text-field> |
165 | </v-flex> | 163 | </v-flex> |
166 | </v-layout> | 164 | </v-layout> |
167 | </v-flex> | 165 | </v-flex> |
168 | </v-layout> | 166 | </v-layout> |
169 | <v-layout wrap> | 167 | <v-layout wrap> |
170 | <v-flex xs12 sm4> | 168 | <v-flex xs12 sm4> |
171 | <v-layout> | 169 | <v-layout> |
172 | <v-flex xs4 class="pt-4 subheading"> | 170 | <v-flex xs4 class="pt-4 subheading"> |
173 | <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> | 171 | <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> |
174 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label> | 172 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Blood:</label> |
175 | </v-flex> | 173 | </v-flex> |
176 | <v-flex xs8 class="ml-3"> | 174 | <v-flex xs8 class="ml-3"> |
177 | <v-text-field | 175 | <v-text-field |
178 | v-model="editedItem.bloodGroup" | 176 | v-model="editedItem.bloodGroup" |
179 | placeholder="fill your BloodGroup" | 177 | placeholder="fill your BloodGroup" |
180 | name="state" | 178 | name="state" |
181 | type="text" | 179 | type="text" |
182 | required | 180 | required |
183 | ></v-text-field> | 181 | ></v-text-field> |
184 | </v-flex> | 182 | </v-flex> |
185 | </v-layout> | 183 | </v-layout> |
186 | </v-flex> | 184 | </v-flex> |
187 | <v-flex xs12 sm4> | 185 | <v-flex xs12 sm4> |
188 | <v-layout> | 186 | <v-layout> |
189 | <v-flex xs4 class="pt-4 subheading"> | 187 | <v-flex xs4 class="pt-4 subheading"> |
190 | <label class="right">Gender:</label> | 188 | <label class="right">Gender:</label> |
191 | </v-flex> | 189 | </v-flex> |
192 | <v-flex xs8 class="ml-3"> | 190 | <v-flex xs8 class="ml-3"> |
193 | <v-select | 191 | <v-select |
194 | :items="gender" | 192 | :items="gender" |
195 | v-model="editedItem.gender" | 193 | v-model="editedItem.gender" |
196 | placeholder="Select Gender" | 194 | placeholder="Select Gender" |
197 | required | 195 | required |
198 | ></v-select> | 196 | ></v-select> |
199 | </v-flex> | 197 | </v-flex> |
200 | </v-layout> | 198 | </v-layout> |
201 | </v-flex> | 199 | </v-flex> |
202 | <v-flex xs12 sm4> | 200 | <v-flex xs12 sm4> |
203 | <v-layout> | 201 | <v-layout> |
204 | <v-flex xs4 class="pt-4 subheading"> | 202 | <v-flex xs4 class="pt-4 subheading"> |
205 | <label class="right">Medical Notes:</label> | 203 | <label class="right">Medical Notes:</label> |
206 | </v-flex> | 204 | </v-flex> |
207 | <v-flex xs8 class="ml-3"> | 205 | <v-flex xs8 class="ml-3"> |
208 | <v-text-field | 206 | <v-text-field |
209 | v-model="editedItem.medicalNotes" | 207 | v-model="editedItem.medicalNotes" |
210 | placeholder="fill your medicalNotes" | 208 | placeholder="fill your medicalNotes" |
211 | required | 209 | required |
212 | ></v-text-field> | 210 | ></v-text-field> |
213 | </v-flex> | 211 | </v-flex> |
214 | </v-layout> | 212 | </v-layout> |
215 | </v-flex> | 213 | </v-flex> |
216 | </v-layout> | 214 | </v-layout> |
217 | <v-layout wrap> | 215 | <v-layout wrap> |
218 | <v-flex xs12 sm4> | 216 | <v-flex xs12 sm4> |
219 | <v-layout> | 217 | <v-layout> |
220 | <v-flex xs4 class="pt-4 subheading"> | 218 | <v-flex xs4 class="pt-4 subheading"> |
221 | <label class="right">Height:</label> | 219 | <label class="right">Height:</label> |
222 | </v-flex> | 220 | </v-flex> |
223 | <v-flex xs8 class="ml-3"> | 221 | <v-flex xs8 class="ml-3"> |
224 | <v-text-field | 222 | <v-text-field |
225 | v-model="editedItem.height" | 223 | v-model="editedItem.height" |
226 | placeholder="fill your Height" | 224 | placeholder="fill your Height" |
227 | name="state" | 225 | name="state" |
228 | type="text" | 226 | type="text" |
229 | required | 227 | required |
230 | ></v-text-field> | 228 | ></v-text-field> |
231 | </v-flex> | 229 | </v-flex> |
232 | </v-layout> | 230 | </v-layout> |
233 | </v-flex> | 231 | </v-flex> |
234 | <v-flex xs12 sm4> | 232 | <v-flex xs12 sm4> |
235 | <v-layout> | 233 | <v-layout> |
236 | <v-flex xs4 class="pt-4 subheading"> | 234 | <v-flex xs4 class="pt-4 subheading"> |
237 | <label class="right">Weight:</label> | 235 | <label class="right">Weight:</label> |
238 | </v-flex> | 236 | </v-flex> |
239 | <v-flex xs8 class="ml-3"> | 237 | <v-flex xs8 class="ml-3"> |
240 | <v-text-field | 238 | <v-text-field |
241 | v-model="editedItem.weight" | 239 | v-model="editedItem.weight" |
242 | placeholder="fill your Weight" | 240 | placeholder="fill your Weight" |
243 | name="pincode" | 241 | name="pincode" |
244 | required | 242 | required |
245 | ></v-text-field> | 243 | ></v-text-field> |
246 | </v-flex> | 244 | </v-flex> |
247 | </v-layout> | 245 | </v-layout> |
248 | </v-flex> | 246 | </v-flex> |
249 | <v-flex xs12 sm4> | 247 | <v-flex xs12 sm4> |
250 | <v-layout> | 248 | <v-layout> |
251 | <v-flex xs4 class="pt-4 subheading"> | 249 | <v-flex xs4 class="pt-4 subheading"> |
252 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 250 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
253 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> | 251 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Uplaod:</label> |
254 | </v-flex> | 252 | </v-flex> |
255 | <v-flex xs8 class="ml-3"> | 253 | <v-flex xs8 class="ml-3"> |
256 | <v-text-field | 254 | <v-text-field |
257 | label="Select Image" | 255 | label="Select Image" |
258 | @click="pickEditFile" | 256 | @click="pickEditFile" |
259 | v-model="editImageName" | 257 | v-model="editImageName" |
260 | append-icon="attach_file" | 258 | append-icon="attach_file" |
261 | ></v-text-field> | 259 | ></v-text-field> |
262 | </v-flex> | 260 | </v-flex> |
263 | </v-layout> | 261 | </v-layout> |
264 | </v-flex> | 262 | </v-flex> |
265 | </v-layout> | 263 | </v-layout> |
266 | <v-layout wrap> | 264 | <v-layout wrap> |
267 | <v-flex xs12 sm4> | 265 | <v-flex xs12 sm4> |
268 | <v-layout> | 266 | <v-layout> |
269 | <v-flex xs4 class="pt-4 subheading"> | 267 | <v-flex xs4 class="pt-4 subheading"> |
270 | <label class="right">State:</label> | 268 | <label class="right">State:</label> |
271 | </v-flex> | 269 | </v-flex> |
272 | <v-flex xs8 class="ml-3"> | 270 | <v-flex xs8 class="ml-3"> |
273 | <v-text-field | 271 | <v-text-field |
274 | v-model="editedItem.state" | 272 | v-model="editedItem.state" |
275 | placeholder="fill your State Name" | 273 | placeholder="fill your State Name" |
276 | name="state" | 274 | name="state" |
277 | type="text" | 275 | type="text" |
278 | required | 276 | required |
279 | ></v-text-field> | 277 | ></v-text-field> |
280 | </v-flex> | 278 | </v-flex> |
281 | </v-layout> | 279 | </v-layout> |
282 | </v-flex> | 280 | </v-flex> |
283 | <v-flex xs12 sm4> | 281 | <v-flex xs12 sm4> |
284 | <v-layout> | 282 | <v-layout> |
285 | <v-flex xs4 class="pt-4 subheading"> | 283 | <v-flex xs4 class="pt-4 subheading"> |
286 | <label class="right">Pincode:</label> | 284 | <label class="right">Pincode:</label> |
287 | </v-flex> | 285 | </v-flex> |
288 | <v-flex xs8 class="ml-3"> | 286 | <v-flex xs8 class="ml-3"> |
289 | <v-text-field | 287 | <v-text-field |
290 | v-model="editedItem.pincode" | 288 | v-model="editedItem.pincode" |
291 | placeholder="fill your pincode" | 289 | placeholder="fill your pincode" |
292 | name="pincode" | 290 | name="pincode" |
293 | type="number" | 291 | type="number" |
294 | required | 292 | required |
295 | ></v-text-field> | 293 | ></v-text-field> |
296 | </v-flex> | 294 | </v-flex> |
297 | </v-layout> | 295 | </v-layout> |
298 | </v-flex> | 296 | </v-flex> |
299 | <v-flex xs12 sm4> | 297 | <v-flex xs12 sm4> |
300 | <v-layout> | 298 | <v-layout> |
301 | <v-flex xs4 class="pt-4 subheading"> | 299 | <v-flex xs4 class="pt-4 subheading"> |
302 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 300 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
303 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> | 301 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Mobile:</label> |
304 | </v-flex> | 302 | </v-flex> |
305 | <v-flex xs8 class="ml-3"> | 303 | <v-flex xs8 class="ml-3"> |
306 | <v-text-field | 304 | <v-text-field |
307 | v-model="editedItem.mobile" | 305 | v-model="editedItem.mobile" |
308 | placeholder="fill your MobileNo" | 306 | placeholder="fill your MobileNo" |
309 | name="mobileNo" | 307 | name="mobileNo" |
310 | type="number" | 308 | type="number" |
311 | required | 309 | required |
312 | ></v-text-field> | 310 | ></v-text-field> |
313 | </v-flex> | 311 | </v-flex> |
314 | </v-layout> | 312 | </v-layout> |
315 | </v-flex> | 313 | </v-flex> |
316 | </v-layout> | 314 | </v-layout> |
317 | <v-layout wrap> | 315 | <v-layout wrap> |
318 | <v-flex xs12 sm4> | 316 | <v-flex xs12 sm4> |
319 | <v-layout> | 317 | <v-layout> |
320 | <v-flex xs4 class="pt-4 subheading"> | 318 | <v-flex xs4 class="pt-4 subheading"> |
321 | <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> | 319 | <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> |
322 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> | 320 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Country:</label> |
323 | </v-flex> | 321 | </v-flex> |
324 | <v-flex xs8 class="ml-3"> | 322 | <v-flex xs8 class="ml-3"> |
325 | <v-autocomplete | 323 | <v-autocomplete |
326 | v-model="editedItem.country" | 324 | v-model="editedItem.country" |
327 | :items="countries" | 325 | :items="countries" |
328 | placeholder="Select Country Name" | 326 | placeholder="Select Country Name" |
329 | required | 327 | required |
330 | ></v-autocomplete> | 328 | ></v-autocomplete> |
331 | </v-flex> | 329 | </v-flex> |
332 | </v-layout> | 330 | </v-layout> |
333 | </v-flex> | 331 | </v-flex> |
334 | <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only"> | 332 | <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only"> |
335 | <v-layout> | 333 | <v-layout> |
336 | <v-flex xs4 class="pt-4 subheading"> | 334 | <v-flex xs4 class="pt-4 subheading"> |
337 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> | 335 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> |
338 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> | 336 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> |
339 | </v-flex> | 337 | </v-flex> |
340 | <v-flex xs8 class="ml-3"> | 338 | <v-flex xs8 class="ml-3"> |
341 | <v-text-field | 339 | <v-text-field |
342 | v-model="editedItem.rollNo" | 340 | v-model="editedItem.rollNo" |
343 | placeholder="fill roll number" | 341 | placeholder="fill roll number" |
344 | required | 342 | required |
345 | ></v-text-field> | 343 | ></v-text-field> |
346 | </v-flex> | 344 | </v-flex> |
347 | </v-layout> | 345 | </v-layout> |
348 | </v-flex> | 346 | </v-flex> |
349 | <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only"> | 347 | <v-flex xs12 sm4 class="hidden-xs-only hidden-sm-only"> |
350 | <v-layout> | 348 | <v-layout> |
351 | <v-flex xs4 sm4 class="pt-4 subheading"> | 349 | <v-flex xs4 sm4 class="pt-4 subheading"> |
352 | <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label> | 350 | <label class="right hidden-xs-only hidden-sm-only">Permanent Address:</label> |
353 | <label | 351 | <label |
354 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 352 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
355 | >Permanent Address:</label> | 353 | >Permanent Address:</label> |
356 | </v-flex> | 354 | </v-flex> |
357 | <v-flex xs12 sm8 class="ml-3"> | 355 | <v-flex xs12 sm8 class="ml-3"> |
358 | <v-text-field | 356 | <v-text-field |
359 | v-model="editedItem.permanentAddress" | 357 | v-model="editedItem.permanentAddress" |
360 | placeholder="fill Your Permanent Address" | 358 | placeholder="fill Your Permanent Address" |
361 | required | 359 | required |
362 | ></v-text-field> | 360 | ></v-text-field> |
363 | </v-flex> | 361 | </v-flex> |
364 | </v-layout> | 362 | </v-layout> |
365 | </v-flex> | 363 | </v-flex> |
366 | </v-layout> | 364 | </v-layout> |
367 | <v-layout class="hidden-xs-only hidden-sm-only" > | 365 | <v-layout class="hidden-xs-only hidden-sm-only"> |
368 | <v-flex xs12 sm4> | 366 | <v-flex xs12 sm4> |
369 | <v-layout> | 367 | <v-layout> |
370 | <v-flex xs4 class="pt-4 subheading"> | 368 | <v-flex xs4 class="pt-4 subheading"> |
371 | <label class="right hidden-xs-only hidden-sm-only">Present Address:</label> | 369 | <label class="right hidden-xs-only hidden-sm-only">Present Address:</label> |
372 | <label | 370 | <label |
373 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 371 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
374 | >Present Address:</label> | 372 | >Present Address:</label> |
375 | </v-flex> | 373 | </v-flex> |
376 | <v-flex xs8 class="ml-3"> | 374 | <v-flex xs8 class="ml-3"> |
377 | <v-text-field | 375 | <v-text-field |
378 | v-model="editedItem.presentAddress" | 376 | v-model="editedItem.presentAddress" |
379 | placeholder="Select Country Name" | 377 | placeholder="Select Country Name" |
380 | required | 378 | required |
381 | ></v-text-field> | 379 | ></v-text-field> |
382 | </v-flex> | 380 | </v-flex> |
383 | </v-layout> | 381 | </v-layout> |
384 | </v-flex> | 382 | </v-flex> |
385 | </v-layout> | 383 | </v-layout> |
386 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> | 384 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> |
387 | <v-flex xs12 sm12> | 385 | <v-flex xs12 sm12> |
388 | <v-layout> | 386 | <v-layout> |
389 | <v-flex xs4 class="pt-4 subheading"> | 387 | <v-flex xs4 class="pt-4 subheading"> |
390 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> | 388 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> |
391 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> | 389 | <label class="right hidden-lg-only hidden-md-only hidden-xl-only">Roll No:</label> |
392 | </v-flex> | 390 | </v-flex> |
393 | <v-flex xs8 class="ml-3"> | 391 | <v-flex xs8 class="ml-3"> |
394 | <v-text-field | 392 | <v-text-field |
395 | v-model="editedItem.rollNo" | 393 | v-model="editedItem.rollNo" |
396 | placeholder="fill roll number" | 394 | placeholder="fill roll number" |
397 | required | 395 | required |
398 | ></v-text-field> | 396 | ></v-text-field> |
399 | </v-flex> | 397 | </v-flex> |
400 | </v-layout> | 398 | </v-layout> |
401 | </v-flex> | 399 | </v-flex> |
402 | </v-layout> | 400 | </v-layout> |
403 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> | 401 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> |
404 | <v-flex xs12 sm12> | 402 | <v-flex xs12 sm12> |
405 | <v-layout> | 403 | <v-layout> |
406 | <v-flex xs12 sm3 class="pt-4 subheading text-xs-center"> | 404 | <v-flex xs12 sm3 class="pt-4 subheading text-xs-center"> |
407 | <label class>Present Address :</label> | 405 | <label class>Present Address :</label> |
408 | </v-flex> | 406 | </v-flex> |
409 | </v-layout> | 407 | </v-layout> |
410 | <v-layout> | 408 | <v-layout> |
411 | <v-flex xs12 sm12> | 409 | <v-flex xs12 sm12> |
412 | <v-textarea | 410 | <v-textarea |
413 | v-model="editedItem.presentAddress" | 411 | v-model="editedItem.presentAddress" |
414 | placeholder="fill Your present Address" | 412 | placeholder="fill Your present Address" |
415 | required | 413 | required |
416 | ></v-textarea> | 414 | ></v-textarea> |
417 | </v-flex> | 415 | </v-flex> |
418 | </v-layout> | 416 | </v-layout> |
419 | </v-flex> | 417 | </v-flex> |
420 | <v-flex xs12 sm12> | 418 | <v-flex xs12 sm12> |
421 | <v-layout> | 419 | <v-layout> |
422 | <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm"> | 420 | <v-flex xs12 sm3 class="pt-4 pr-4 subheading text-xs-center addressForm"> |
423 | <label>Permanent addr:</label> | 421 | <label>Permanent addr:</label> |
424 | </v-flex> | 422 | </v-flex> |
425 | </v-layout> | 423 | </v-layout> |
426 | <v-layout> | 424 | <v-layout> |
427 | <v-flex xs12 sm12> | 425 | <v-flex xs12 sm12> |
428 | <v-textarea | 426 | <v-textarea |
429 | name="input-4-3" | 427 | name="input-4-3" |
430 | v-model="editedItem.permanentAddress" | 428 | v-model="editedItem.permanentAddress" |
431 | placeholder="fill Your Permanent Address" | 429 | placeholder="fill Your Permanent Address" |
432 | required | 430 | required |
433 | ></v-textarea> | 431 | ></v-textarea> |
434 | </v-flex> | 432 | </v-flex> |
435 | </v-layout> | 433 | </v-layout> |
436 | </v-flex> | 434 | </v-flex> |
437 | </v-layout> | 435 | </v-layout> |
438 | <v-layout> | 436 | <v-layout> |
439 | <v-flex xs12 sm12> | 437 | <v-flex xs12 sm12> |
440 | <v-layout class="right"> | 438 | <v-layout class="right"> |
441 | <v-btn @click="save" round dark :loading="editLoading" class="add-button">Save</v-btn> | 439 | <v-btn @click="save" round dark :loading="editLoading" class="add-button">Save</v-btn> |
442 | </v-layout> | 440 | </v-layout> |
443 | </v-flex> | 441 | </v-flex> |
444 | </v-layout> | 442 | </v-layout> |
445 | </v-container> | 443 | </v-container> |
446 | </v-form> | 444 | </v-form> |
447 | </v-card-text> | 445 | </v-card-text> |
448 | </v-card> | 446 | </v-card> |
449 | </v-dialog> | 447 | </v-dialog> |
450 | 448 | ||
451 | <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> | 449 | <!-- ****** PROFILE VIEW STUDENTS DEATILS ****** --> |
452 | 450 | ||
453 | <v-dialog v-model="profileStudentDialog" max-width="1000px" scrollable> | 451 | <v-dialog v-model="profileStudentDialog" max-width="1000px" scrollable> |
454 | <v-card flat class="card-style pa-3" dark> | 452 | <v-card flat class="card-style pa-3" dark> |
455 | <v-layout> | 453 | <v-layout> |
456 | <v-flex xs12> | 454 | <v-flex xs12> |
457 | <label class="title text-xs-center">View Student Details</label> | 455 | <label class="title text-xs-center">View Student Details</label> |
458 | <v-icon size="24" class="right" @click="profileStudentDialog = false">cancel</v-icon> | 456 | <v-icon size="24" class="right" @click="profileStudentDialog = false">cancel</v-icon> |
459 | </v-flex> | 457 | </v-flex> |
460 | </v-layout> | 458 | </v-layout> |
461 | <v-card-text> | 459 | <v-card-text> |
462 | <v-flex align-center justify-center layout text-xs-center class="mt-3"> | 460 | <v-flex align-center justify-center layout text-xs-center class="mt-3"> |
463 | <v-avatar size="100px"> | 461 | <v-avatar size="100px"> |
464 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> | 462 | <img src="/static/icon/user.png" v-if="!editedItem.profilePicUrl" /> |
465 | <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> | 463 | <img :src="editedItem.profilePicUrl" v-else-if="editedItem.profilePicUrl" /> |
466 | </v-avatar> | 464 | </v-avatar> |
467 | </v-flex> | 465 | </v-flex> |
468 | <v-container grid-list-md> | 466 | <v-container grid-list-md> |
469 | <v-layout wrap> | 467 | <v-layout wrap> |
470 | <v-flex xs12 sm5> | 468 | <v-flex xs12 sm5> |
471 | <v-layout> | 469 | <v-layout> |
472 | <v-flex xs6 sm6> | 470 | <v-flex xs6 sm6> |
473 | <h5 class="right my-1"> | 471 | <h5 class="right my-1"> |
474 | <b>Full Name:</b> | 472 | <b>Full Name:</b> |
475 | </h5> | 473 | </h5> |
476 | </v-flex> | 474 | </v-flex> |
477 | <v-flex sm6 xs6> | 475 | <v-flex sm6 xs6> |
478 | <h5 class="my-1 left">{{ editedItem.name }}</h5> | 476 | <h5 class="my-1 left">{{ editedItem.name }}</h5> |
479 | </v-flex> | 477 | </v-flex> |
480 | </v-layout> | 478 | </v-layout> |
481 | </v-flex> | 479 | </v-flex> |
482 | <v-flex xs12 sm7> | 480 | <v-flex xs12 sm7> |
483 | <v-layout> | 481 | <v-layout> |
484 | <v-flex xs6 sm4> | 482 | <v-flex xs6 sm4> |
485 | <h5 class="right my-1"> | 483 | <h5 class="right my-1"> |
486 | <b>Email:</b> | 484 | <b>Email:</b> |
487 | </h5> | 485 | </h5> |
488 | </v-flex> | 486 | </v-flex> |
489 | <v-flex sm8 xs6> | 487 | <v-flex sm8 xs6> |
490 | <h5 class="my-1 left">{{ editedItem.email }}</h5> | 488 | <h5 class="my-1 left">{{ editedItem.email }}</h5> |
491 | </v-flex> | 489 | </v-flex> |
492 | </v-layout> | 490 | </v-layout> |
493 | </v-flex> | 491 | </v-flex> |
494 | </v-layout> | 492 | </v-layout> |
495 | <v-layout wrap> | 493 | <v-layout wrap> |
496 | <v-flex xs12 sm5> | 494 | <v-flex xs12 sm5> |
497 | <v-layout> | 495 | <v-layout> |
498 | <v-flex xs6 sm6> | 496 | <v-flex xs6 sm6> |
499 | <b> | 497 | <b> |
500 | <h5 class="right my-1"> | 498 | <h5 class="right my-1"> |
501 | <b>Gender:</b> | 499 | <b>Gender:</b> |
502 | </h5> | 500 | </h5> |
503 | </b> | 501 | </b> |
504 | </v-flex> | 502 | </v-flex> |
505 | <v-flex sm6 xs6> | 503 | <v-flex sm6 xs6> |
506 | <h5 class="my-1 left">{{ editedItem.gender }}</h5> | 504 | <h5 class="my-1 left">{{ editedItem.gender }}</h5> |
507 | </v-flex> | 505 | </v-flex> |
508 | </v-layout> | 506 | </v-layout> |
509 | </v-flex> | 507 | </v-flex> |
510 | <v-flex xs12 sm7> | 508 | <v-flex xs12 sm7> |
511 | <v-layout> | 509 | <v-layout> |
512 | <v-flex xs6 sm4> | 510 | <v-flex xs6 sm4> |
513 | <b> | 511 | <b> |
514 | <h5 class="right my-1"> | 512 | <h5 class="right my-1"> |
515 | <b>D.O.B:</b> | 513 | <b>D.O.B:</b> |
516 | </h5> | 514 | </h5> |
517 | </b> | 515 | </b> |
518 | </v-flex> | 516 | </v-flex> |
519 | <v-flex sm8 xs6> | 517 | <v-flex sm8 xs6> |
520 | <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> | 518 | <h5 class="my-1">{{ dates(editedItem.dob) }}</h5> |
521 | </v-flex> | 519 | </v-flex> |
522 | </v-layout> | 520 | </v-layout> |
523 | </v-flex> | 521 | </v-flex> |
524 | </v-layout> | 522 | </v-layout> |
525 | <v-layout wrap> | 523 | <v-layout wrap> |
526 | <v-flex xs12 sm5> | 524 | <v-flex xs12 sm5> |
527 | <v-layout> | 525 | <v-layout> |
528 | <v-flex xs6 sm6> | 526 | <v-flex xs6 sm6> |
529 | <b> | 527 | <b> |
530 | <h5 class="right my-1"> | 528 | <h5 class="right my-1"> |
531 | <b>BloodGroup:</b> | 529 | <b>BloodGroup:</b> |
532 | </h5> | 530 | </h5> |
533 | </b> | 531 | </b> |
534 | </v-flex> | 532 | </v-flex> |
535 | <v-flex sm6 xs6> | 533 | <v-flex sm6 xs6> |
536 | <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> | 534 | <h5 class="my-1 left">{{ editedItem.bloodGroup }}</h5> |
537 | </v-flex> | 535 | </v-flex> |
538 | </v-layout> | 536 | </v-layout> |
539 | </v-flex> | 537 | </v-flex> |
540 | <v-flex xs12 sm7> | 538 | <v-flex xs12 sm7> |
541 | <v-layout> | 539 | <v-layout> |
542 | <v-flex xs6 sm4> | 540 | <v-flex xs6 sm4> |
543 | <b> | 541 | <b> |
544 | <h5 class="right my-1"> | 542 | <h5 class="right my-1"> |
545 | <b>Roll No. :</b> | 543 | <b>Roll No. :</b> |
546 | </h5> | 544 | </h5> |
547 | </b> | 545 | </b> |
548 | </v-flex> | 546 | </v-flex> |
549 | <v-flex sm8 xs6> | 547 | <v-flex sm8 xs6> |
550 | <h5 class="my-1">{{ editedItem.rollNo }}</h5> | 548 | <h5 class="my-1">{{ editedItem.rollNo }}</h5> |
551 | </v-flex> | 549 | </v-flex> |
552 | </v-layout> | 550 | </v-layout> |
553 | </v-flex> | 551 | </v-flex> |
554 | </v-layout> | 552 | </v-layout> |
555 | <v-layout wrap> | 553 | <v-layout wrap> |
556 | <v-flex xs12 sm5> | 554 | <v-flex xs12 sm5> |
557 | <v-layout> | 555 | <v-layout> |
558 | <v-flex xs6 sm6> | 556 | <v-flex xs6 sm6> |
559 | <b> | 557 | <b> |
560 | <h5 class="right my-1"> | 558 | <h5 class="right my-1"> |
561 | <b>Height:</b> | 559 | <b>Height:</b> |
562 | </h5> | 560 | </h5> |
563 | </b> | 561 | </b> |
564 | </v-flex> | 562 | </v-flex> |
565 | <v-flex sm6 xs6> | 563 | <v-flex sm6 xs6> |
566 | <h5 class="my-1 left">{{ editedItem.height }}</h5> | 564 | <h5 class="my-1 left">{{ editedItem.height }}</h5> |
567 | </v-flex> | 565 | </v-flex> |
568 | </v-layout> | 566 | </v-layout> |
569 | </v-flex> | 567 | </v-flex> |
570 | <v-flex xs12 sm7> | 568 | <v-flex xs12 sm7> |
571 | <v-layout> | 569 | <v-layout> |
572 | <v-flex xs6 sm4> | 570 | <v-flex xs6 sm4> |
573 | <b> | 571 | <b> |
574 | <h5 class="right my-1"> | 572 | <h5 class="right my-1"> |
575 | <b>Weight:</b> | 573 | <b>Weight:</b> |
576 | </h5> | 574 | </h5> |
577 | </b> | 575 | </b> |
578 | </v-flex> | 576 | </v-flex> |
579 | <v-flex sm8 xs6> | 577 | <v-flex sm8 xs6> |
580 | <h5 class="my-1">{{ editedItem.weight }}</h5> | 578 | <h5 class="my-1">{{ editedItem.weight }}</h5> |
581 | </v-flex> | 579 | </v-flex> |
582 | </v-layout> | 580 | </v-layout> |
583 | </v-flex> | 581 | </v-flex> |
584 | </v-layout> | 582 | </v-layout> |
585 | <v-layout wrap> | 583 | <v-layout wrap> |
586 | <v-flex xs12 sm5> | 584 | <v-flex xs12 sm5> |
587 | <v-layout> | 585 | <v-layout> |
588 | <v-flex xs6 sm6> | 586 | <v-flex xs6 sm6> |
589 | <b> | 587 | <b> |
590 | <h5 class="right my-1"> | 588 | <h5 class="right my-1"> |
591 | <b>City:</b> | 589 | <b>City:</b> |
592 | </h5> | 590 | </h5> |
593 | </b> | 591 | </b> |
594 | </v-flex> | 592 | </v-flex> |
595 | <v-flex sm6 xs6> | 593 | <v-flex sm6 xs6> |
596 | <h5 class="my-1 left">{{ editedItem.city }}</h5> | 594 | <h5 class="my-1 left">{{ editedItem.city }}</h5> |
597 | </v-flex> | 595 | </v-flex> |
598 | </v-layout> | 596 | </v-layout> |
599 | </v-flex> | 597 | </v-flex> |
600 | <v-flex xs12 sm7> | 598 | <v-flex xs12 sm7> |
601 | <v-layout> | 599 | <v-layout> |
602 | <v-flex xs6 sm4> | 600 | <v-flex xs6 sm4> |
603 | <b> | 601 | <b> |
604 | <h5 class="right my-1"> | 602 | <h5 class="right my-1"> |
605 | <b>State:</b> | 603 | <b>State:</b> |
606 | </h5> | 604 | </h5> |
607 | </b> | 605 | </b> |
608 | </v-flex> | 606 | </v-flex> |
609 | <v-flex sm8 xs6> | 607 | <v-flex sm8 xs6> |
610 | <h5 class="my-1">{{ editedItem.state }}</h5> | 608 | <h5 class="my-1">{{ editedItem.state }}</h5> |
611 | </v-flex> | 609 | </v-flex> |
612 | </v-layout> | 610 | </v-layout> |
613 | </v-flex> | 611 | </v-flex> |
614 | </v-layout> | 612 | </v-layout> |
615 | <v-layout wrap> | 613 | <v-layout wrap> |
616 | <v-flex xs12 sm5> | 614 | <v-flex xs12 sm5> |
617 | <v-layout> | 615 | <v-layout> |
618 | <v-flex xs6 sm6> | 616 | <v-flex xs6 sm6> |
619 | <b> | 617 | <b> |
620 | <h5 class="right my-1"> | 618 | <h5 class="right my-1"> |
621 | <b>Pincode:</b> | 619 | <b>Pincode:</b> |
622 | </h5> | 620 | </h5> |
623 | </b> | 621 | </b> |
624 | </v-flex> | 622 | </v-flex> |
625 | <v-flex sm6 xs6> | 623 | <v-flex sm6 xs6> |
626 | <h5 class="my-1">{{ editedItem.pincode }}</h5> | 624 | <h5 class="my-1">{{ editedItem.pincode }}</h5> |
627 | </v-flex> | 625 | </v-flex> |
628 | </v-layout> | 626 | </v-layout> |
629 | </v-flex> | 627 | </v-flex> |
630 | <v-flex xs12 sm7> | 628 | <v-flex xs12 sm7> |
631 | <v-layout> | 629 | <v-layout> |
632 | <v-flex xs6 sm4> | 630 | <v-flex xs6 sm4> |
633 | <b> | 631 | <b> |
634 | <h5 class="right my-1"> | 632 | <h5 class="right my-1"> |
635 | <b>Country:</b> | 633 | <b>Country:</b> |
636 | </h5> | 634 | </h5> |
637 | </b> | 635 | </b> |
638 | </v-flex> | 636 | </v-flex> |
639 | <v-flex sm7 xs6> | 637 | <v-flex sm7 xs6> |
640 | <h5 class="my-1">{{ editedItem.country }}</h5> | 638 | <h5 class="my-1">{{ editedItem.country }}</h5> |
641 | </v-flex> | 639 | </v-flex> |
642 | </v-layout> | 640 | </v-layout> |
643 | </v-flex> | 641 | </v-flex> |
644 | </v-layout> | 642 | </v-layout> |
645 | <v-layout wrap> | 643 | <v-layout wrap> |
646 | <v-flex xs12 sm5> | 644 | <v-flex xs12 sm5> |
647 | <v-layout> | 645 | <v-layout> |
648 | <v-flex sm6 xs6> | 646 | <v-flex sm6 xs6> |
649 | <b> | 647 | <b> |
650 | <h5 class="right my-1"> | 648 | <h5 class="right my-1"> |
651 | <b>Mobile No:</b> | 649 | <b>Mobile No:</b> |
652 | </h5> | 650 | </h5> |
653 | </b> | 651 | </b> |
654 | </v-flex> | 652 | </v-flex> |
655 | <v-flex sm6 xs6> | 653 | <v-flex sm6 xs6> |
656 | <h5 class="my-1">{{ editedItem.mobile }}</h5> | 654 | <h5 class="my-1">{{ editedItem.mobile }}</h5> |
657 | </v-flex> | 655 | </v-flex> |
658 | </v-layout> | 656 | </v-layout> |
659 | </v-flex> | 657 | </v-flex> |
660 | <v-flex xs12 sm7> | 658 | <v-flex xs12 sm7> |
661 | <v-layout> | 659 | <v-layout> |
662 | <v-flex xs6 sm4> | 660 | <v-flex xs6 sm4> |
663 | <b> | 661 | <b> |
664 | <h5 class="right my-1"> | 662 | <h5 class="right my-1"> |
665 | <b>FahterName:</b> | 663 | <b>FahterName:</b> |
666 | </h5> | 664 | </h5> |
667 | </b> | 665 | </b> |
668 | </v-flex> | 666 | </v-flex> |
669 | <v-flex sm8 xs6> | 667 | <v-flex sm8 xs6> |
670 | <h5 class="my-1">{{ editedItem.fatherName }}</h5> | 668 | <h5 class="my-1">{{ editedItem.fatherName }}</h5> |
671 | </v-flex> | 669 | </v-flex> |
672 | </v-layout> | 670 | </v-layout> |
673 | </v-flex> | 671 | </v-flex> |
674 | </v-layout> | 672 | </v-layout> |
675 | <v-layout wrap> | 673 | <v-layout wrap> |
676 | <v-flex xs12 sm5> | 674 | <v-flex xs12 sm5> |
677 | <v-layout> | 675 | <v-layout> |
678 | <v-flex xs6 sm6> | 676 | <v-flex xs6 sm6> |
679 | <b> | 677 | <b> |
680 | <h5 class="right my-1"> | 678 | <h5 class="right my-1"> |
681 | <b>MotherName:</b> | 679 | <b>MotherName:</b> |
682 | </h5> | 680 | </h5> |
683 | </b> | 681 | </b> |
684 | </v-flex> | 682 | </v-flex> |
685 | <v-flex sm6 xs6> | 683 | <v-flex sm6 xs6> |
686 | <h5 class="my-1">{{ editedItem.motherName }}</h5> | 684 | <h5 class="my-1">{{ editedItem.motherName }}</h5> |
687 | </v-flex> | 685 | </v-flex> |
688 | </v-layout> | 686 | </v-layout> |
689 | </v-flex> | 687 | </v-flex> |
690 | <v-flex xs12 sm7> | 688 | <v-flex xs12 sm7> |
691 | <v-layout> | 689 | <v-layout> |
692 | <v-flex xs6 sm4> | 690 | <v-flex xs6 sm4> |
693 | <b> | 691 | <b> |
694 | <h5 class="right my-1"> | 692 | <h5 class="right my-1"> |
695 | <b>FatherCellNo:</b> | 693 | <b>FatherCellNo:</b> |
696 | </h5> | 694 | </h5> |
697 | </b> | 695 | </b> |
698 | </v-flex> | 696 | </v-flex> |
699 | <v-flex sm6 xs6> | 697 | <v-flex sm6 xs6> |
700 | <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> | 698 | <h5 class="my-1">{{ editedItem.fatherCellNo }}</h5> |
701 | </v-flex> | 699 | </v-flex> |
702 | </v-layout> | 700 | </v-layout> |
703 | </v-flex> | 701 | </v-flex> |
704 | </v-layout> | 702 | </v-layout> |
705 | <v-layout wrap> | 703 | <v-layout wrap> |
706 | <v-flex xs12 sm5> | 704 | <v-flex xs12 sm5> |
707 | <v-layout> | 705 | <v-layout> |
708 | <v-flex xs6 sm6> | 706 | <v-flex xs6 sm6> |
709 | <b> | 707 | <b> |
710 | <h5 class="right my-1"> | 708 | <h5 class="right my-1"> |
711 | <b>MotherCellNo:</b> | 709 | <b>MotherCellNo:</b> |
712 | </h5> | 710 | </h5> |
713 | </b> | 711 | </b> |
714 | </v-flex> | 712 | </v-flex> |
715 | <v-flex sm6 xs6> | 713 | <v-flex sm6 xs6> |
716 | <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> | 714 | <h5 class="my-1">{{ editedItem.motherCellNo }}</h5> |
717 | </v-flex> | 715 | </v-flex> |
718 | </v-layout> | 716 | </v-layout> |
719 | </v-flex> | 717 | </v-flex> |
720 | <v-flex xs12 sm7> | 718 | <v-flex xs12 sm7> |
721 | <v-layout> | 719 | <v-layout> |
722 | <v-flex xs6 sm4> | 720 | <v-flex xs6 sm4> |
723 | <b> | 721 | <b> |
724 | <h5 class="my-1 right"> | 722 | <h5 class="my-1 right"> |
725 | <b>AcademicYear:</b> | 723 | <b>AcademicYear:</b> |
726 | </h5> | 724 | </h5> |
727 | </b> | 725 | </b> |
728 | </v-flex> | 726 | </v-flex> |
729 | <v-flex sm5 xs8> | 727 | <v-flex sm5 xs8> |
730 | <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> | 728 | <h5 class="my-1">{{ editedItem.establishmentYear }}</h5> |
731 | </v-flex> | 729 | </v-flex> |
732 | </v-layout> | 730 | </v-layout> |
733 | </v-flex> | 731 | </v-flex> |
734 | </v-layout> | 732 | </v-layout> |
735 | <v-layout wrap> | 733 | <v-layout wrap> |
736 | <v-flex xs12 sm5> | 734 | <v-flex xs12 sm5> |
737 | <v-layout> | 735 | <v-layout> |
738 | <v-flex xs6 sm6> | 736 | <v-flex xs6 sm6> |
739 | <b> | 737 | <b> |
740 | <h5 class="my-1 right"> | 738 | <h5 class="my-1 right"> |
741 | <b>MedicalNotes:</b> | 739 | <b>MedicalNotes:</b> |
742 | </h5> | 740 | </h5> |
743 | </b> | 741 | </b> |
744 | </v-flex> | 742 | </v-flex> |
745 | <v-flex sm5 xs6> | 743 | <v-flex sm5 xs6> |
746 | <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> | 744 | <h5 class="my-1">{{ editedItem.medicalNotes }}</h5> |
747 | </v-flex> | 745 | </v-flex> |
748 | </v-layout> | 746 | </v-layout> |
749 | </v-flex> | 747 | </v-flex> |
750 | <v-flex xs12 sm7 class="hidden-xs-only"> | 748 | <v-flex xs12 sm7 class="hidden-xs-only"> |
751 | <v-layout wrap> | 749 | <v-layout wrap> |
752 | <v-flex sm4> | 750 | <v-flex sm4> |
753 | <b> | 751 | <b> |
754 | <h5 class="my-1 right"> | 752 | <h5 class="my-1 right"> |
755 | <b>present Address:</b> | 753 | <b>present Address:</b> |
756 | </h5> | 754 | </h5> |
757 | </b> | 755 | </b> |
758 | </v-flex> | 756 | </v-flex> |
759 | <v-flex sm8> | 757 | <v-flex sm8> |
760 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | 758 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> |
761 | </v-flex> | 759 | </v-flex> |
762 | </v-layout> | 760 | </v-layout> |
763 | </v-flex> | 761 | </v-flex> |
764 | <v-flex sm6 class="hidden-xs-only"> | 762 | <v-flex sm6 class="hidden-xs-only"> |
765 | <v-layout wrap> | 763 | <v-layout wrap> |
766 | <v-flex sm5> | 764 | <v-flex sm5> |
767 | <b> | 765 | <b> |
768 | <h5 class="my-1 right"> | 766 | <h5 class="my-1 right"> |
769 | <b>Permanent Address:</b> | 767 | <b>Permanent Address:</b> |
770 | </h5> | 768 | </h5> |
771 | </b> | 769 | </b> |
772 | </v-flex> | 770 | </v-flex> |
773 | <v-flex sm7> | 771 | <v-flex sm7> |
774 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | 772 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> |
775 | </v-flex> | 773 | </v-flex> |
776 | </v-layout> | 774 | </v-layout> |
777 | </v-flex> | 775 | </v-flex> |
778 | </v-layout> | 776 | </v-layout> |
779 | <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only"> | 777 | <v-layout wrap class="hidden-sm-only hidden-md-only hidden-lg-only hidden-xl-only"> |
780 | <v-flex xs12 sm5> | 778 | <v-flex xs12 sm5> |
781 | <v-layout wrap> | 779 | <v-layout wrap> |
782 | <v-flex xs12 sm6> | 780 | <v-flex xs12 sm6> |
783 | <b> | 781 | <b> |
784 | <h5 class="my-1"> | 782 | <h5 class="my-1"> |
785 | <b>present Address:-</b> | 783 | <b>present Address:-</b> |
786 | </h5> | 784 | </h5> |
787 | </b> | 785 | </b> |
788 | </v-flex> | 786 | </v-flex> |
789 | <v-flex sm5 xs12> | 787 | <v-flex sm5 xs12> |
790 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | 788 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> |
791 | </v-flex> | 789 | </v-flex> |
792 | </v-layout> | 790 | </v-layout> |
793 | </v-flex> | 791 | </v-flex> |
794 | <v-flex xs12 sm6> | 792 | <v-flex xs12 sm6> |
795 | <v-layout wrap> | 793 | <v-layout wrap> |
796 | <v-flex xs12 sm6> | 794 | <v-flex xs12 sm6> |
797 | <b> | 795 | <b> |
798 | <h5 class="my-1"> | 796 | <h5 class="my-1"> |
799 | <b>Permanent Address:-</b> | 797 | <b>Permanent Address:-</b> |
800 | </h5> | 798 | </h5> |
801 | </b> | 799 | </b> |
802 | </v-flex> | 800 | </v-flex> |
803 | <v-flex sm6 xs12> | 801 | <v-flex sm6 xs12> |
804 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | 802 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> |
805 | </v-flex> | 803 | </v-flex> |
806 | </v-layout> | 804 | </v-layout> |
807 | </v-flex> | 805 | </v-flex> |
808 | </v-layout> | 806 | </v-layout> |
809 | </v-container> | 807 | </v-container> |
810 | </v-card-text> | 808 | </v-card-text> |
811 | </v-card> | 809 | </v-card> |
812 | </v-dialog> | 810 | </v-dialog> |
813 | 811 | ||
814 | <!-- ****** STUDENTS TABLE ****** --> | 812 | <!-- ****** STUDENTS TABLE ****** --> |
815 | <v-toolbar color="transparent" flat> | 813 | <v-toolbar color="transparent" flat> |
816 | <v-btn | 814 | <v-btn |
817 | fab | 815 | fab |
818 | dark | 816 | dark |
819 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 817 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
820 | small | 818 | small |
821 | @click="addStudentDialog = true" | 819 | @click="addStudentDialog = true" |
822 | > | 820 | > |
823 | <v-icon dark>add</v-icon> | 821 | <v-icon dark>add</v-icon> |
824 | </v-btn> | 822 | </v-btn> |
825 | <v-btn | 823 | <v-btn |
826 | v-if="role != 'TEACHER' " | 824 | v-if="role != 'TEACHER' " |
827 | round | 825 | round |
828 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 826 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
829 | dark | 827 | dark |
830 | @click="addStudentDialog = true" | 828 | @click="addStudentDialog = true" |
831 | > | 829 | > |
832 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Student | 830 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Student |
833 | </v-btn> | 831 | </v-btn> |
834 | <v-card-actions class="hidden-xs-only hidden-sm-only"> | 832 | <v-card-actions class="hidden-xs-only hidden-sm-only"> |
835 | <v-flex md13 lg12> | 833 | <v-flex md13 lg12> |
836 | <v-layout> | 834 | <v-layout> |
837 | <v-flex lg3 md4> | 835 | <v-flex lg3 md4> |
838 | <v-select | 836 | <v-select |
839 | :items="addclass" | 837 | :items="addclass" |
840 | label="Select Class" | 838 | label="Select Class" |
841 | v-model="selectStudents.select" | 839 | v-model="selectStudents.select" |
842 | item-text="classNum" | 840 | item-text="classNum" |
843 | item-value="_id" | 841 | item-value="_id" |
844 | name="Select Class" | 842 | name="Select Class" |
845 | :rules="classRules" | 843 | :rules="classRules" |
846 | @change="getSections(selectStudents.select)" | 844 | @change="getSections(selectStudents.select)" |
847 | required | 845 | required |
848 | class="ml-2" | 846 | class="ml-2" |
849 | ></v-select> | 847 | ></v-select> |
850 | </v-flex> | 848 | </v-flex> |
851 | <v-flex lg3 md4 class="ml-2"> | 849 | <v-flex lg3 md4 class="ml-2"> |
852 | <v-layout> | 850 | <v-layout> |
853 | <v-select | 851 | <v-select |
854 | :items="addSection" | 852 | :items="addSection" |
855 | label="Select Section" | 853 | label="Select Section" |
856 | v-model="selectStudents.selectSection" | 854 | v-model="selectStudents.selectSection" |
857 | item-text="name" | 855 | item-text="name" |
858 | item-value="_id" | 856 | item-value="_id" |
859 | name="Select Section" | 857 | name="Select Section" |
860 | :rules="sectionRules" | 858 | :rules="sectionRules" |
861 | required | 859 | required |
862 | ></v-select> | 860 | ></v-select> |
863 | </v-layout> | 861 | </v-layout> |
864 | </v-flex> | 862 | </v-flex> |
865 | </v-layout> | 863 | </v-layout> |
866 | </v-flex> | 864 | </v-flex> |
867 | </v-card-actions> | 865 | </v-card-actions> |
868 | <v-spacer></v-spacer> | 866 | <v-spacer></v-spacer> |
869 | <v-btn @click="findStudents()" round dark :loading="loading" class="add-button hidden-xs-only hidden-sm-only">Find</v-btn> | 867 | <v-btn |
868 | @click="findStudents()" | ||
869 | round | ||
870 | dark | ||
871 | :loading="loading" | ||
872 | class="add-button hidden-xs-only hidden-sm-only" | ||
873 | >Find</v-btn> | ||
870 | <v-card-title class="body-1" v-show="show"> | 874 | <v-card-title class="body-1" v-show="show"> |
871 | <v-btn icon large flat @click="displaySearch"> | 875 | <v-btn icon large flat @click="displaySearch"> |
872 | <v-avatar size="27"> | 876 | <v-avatar size="27"> |
873 | <img src="/static/icon/search.png" alt="icon" /> | 877 | <img src="/static/icon/search.png" alt="icon" /> |
874 | </v-avatar> | 878 | </v-avatar> |
875 | </v-btn> | 879 | </v-btn> |
876 | </v-card-title> | 880 | </v-card-title> |
877 | <v-flex xs8 sm7 lg2 md3 v-show="showSearch"> | 881 | <v-flex xs8 sm7 lg2 md3 v-show="showSearch"> |
878 | <v-layout> | 882 | <v-layout> |
879 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 883 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
880 | <v-icon @click="closeSearch" color="error">close</v-icon> | 884 | <v-icon @click="closeSearch" color="error">close</v-icon> |
881 | </v-layout> | 885 | </v-layout> |
882 | </v-flex> | 886 | </v-flex> |
883 | </v-toolbar> | 887 | </v-toolbar> |
884 | <v-card flat class="elevation-0 transparent"> | 888 | <v-card flat class="elevation-0 transparent"> |
885 | <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> | 889 | <v-flex class="hidden-xl-only hidden-lg-only hidden-md-only"> |
886 | <v-layout> | 890 | <v-layout> |
887 | <v-flex xs4> | 891 | <v-flex xs4> |
888 | <label class="right mt-4">Select Class:</label> | 892 | <label class="right mt-4">Select Class:</label> |
889 | </v-flex> | 893 | </v-flex> |
890 | <v-flex xs8> | 894 | <v-flex xs8> |
891 | <v-select | 895 | <v-select |
892 | :items="addclass" | 896 | :items="addclass" |
893 | label="Select Class" | 897 | label="Select Class" |
894 | v-model="selectStudents.select" | 898 | v-model="selectStudents.select" |
895 | item-text="classNum" | 899 | item-text="classNum" |
896 | item-value="_id" | 900 | item-value="_id" |
897 | name="Select Class" | 901 | name="Select Class" |
898 | :rules="classRules" | 902 | :rules="classRules" |
899 | @change="getSections(selectStudents.select)" | 903 | @change="getSections(selectStudents.select)" |
900 | class="px-2" | 904 | class="px-2" |
901 | ></v-select> | 905 | ></v-select> |
902 | </v-flex> | 906 | </v-flex> |
903 | </v-layout> | 907 | </v-layout> |
904 | <v-layout> | 908 | <v-layout> |
905 | <v-flex xs4> | 909 | <v-flex xs4> |
906 | <label class="right mt-4">Select Section:</label> | 910 | <label class="right mt-4">Select Section:</label> |
907 | </v-flex> | 911 | </v-flex> |
908 | <v-flex xs8> | 912 | <v-flex xs8> |
909 | <v-select | 913 | <v-select |
910 | :items="addSection" | 914 | :items="addSection" |
911 | label="Select Section" | 915 | label="Select Section" |
912 | v-model="selectStudents.selectSection" | 916 | v-model="selectStudents.selectSection" |
913 | item-text="name" | 917 | item-text="name" |
914 | item-value="_id" | 918 | item-value="_id" |
915 | name="Select Section" | 919 | name="Select Section" |
916 | :rules="sectionRules" | 920 | :rules="sectionRules" |
917 | class="px-2" | 921 | class="px-2" |
918 | required | 922 | required |
919 | ></v-select> | 923 | ></v-select> |
920 | </v-flex> | 924 | </v-flex> |
921 | </v-layout> | 925 | </v-layout> |
922 | <v-layout> | 926 | <v-layout> |
923 | <v-flex xs5 class="mx-auto mb-2"> | 927 | <v-flex xs5 class="mx-auto mb-2"> |
924 | <v-btn @click="findStudents()" block round dark :loading="loading" class="add-button">Find</v-btn> | 928 | <v-btn |
929 | @click="findStudents()" | ||
930 | block | ||
931 | round | ||
932 | dark | ||
933 | :loading="loading" | ||
934 | class="add-button" | ||
935 | >Find</v-btn> | ||
925 | </v-flex> | 936 | </v-flex> |
926 | </v-layout> | 937 | </v-layout> |
927 | </v-flex> | 938 | </v-flex> |
928 | </v-card> | 939 | </v-card> |
929 | <v-data-table | 940 | <v-data-table |
930 | :headers="headers" | 941 | :headers="headers" |
931 | :items="studentsData" | 942 | :items="studentsData" |
932 | :pagination.sync="pagination" | 943 | :pagination.sync="pagination" |
933 | :search="search" | 944 | :search="search" |
934 | > | 945 | > |
935 | <template slot="items" slot-scope="props"> | 946 | <template slot="items" slot-scope="props"> |
936 | <tr class="tr"> | 947 | <tr class="tr"> |
937 | <td class="text-xs-center td td-row">{{ props.item.rollNo}}</td> | 948 | <td class="text-xs-center td td-row">{{ props.item.rollNo}}</td> |
938 | <td class="text-xs-center td td-row"> | 949 | <td class="text-xs-center td td-row"> |
939 | <v-avatar size="40"> | 950 | <v-avatar size="40"> |
940 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 951 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
941 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 952 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
942 | </v-avatar> | 953 | </v-avatar> |
943 | </td> | 954 | </td> |
944 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 955 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
945 | <td class="text-xs-center td td-row">{{ props.item.gender }}</td> | 956 | <td class="text-xs-center td td-row">{{ props.item.gender }}</td> |
946 | <td class="text-xs-center td td-row">{{ props.item.parentId.fatherName }}</td> | 957 | <td class="text-xs-center td td-row">{{ props.item.parentId.fatherName }}</td> |
947 | <td class="text-xs-center td td-row">{{ props.item.parentId.motherName }}</td> | 958 | <td class="text-xs-center td td-row">{{ props.item.parentId.motherName }}</td> |
948 | <td class="text-xs-center td td-row">{{ props.item.establishmentYear }}</td> | 959 | <td class="text-xs-center td td-row">{{ props.item.establishmentYear }}</td> |
949 | <!-- <td class="text-xs-center td td-row">{{ props.item.mobile}}</td> --> | 960 | <!-- <td class="text-xs-center td td-row">{{ props.item.mobile}}</td> --> |
950 | <td class="text-xs-center td td-row"> | 961 | <td class="text-xs-center td td-row"> |
951 | <v-switch | 962 | <v-switch |
952 | class="pl-3" | 963 | class="pl-3" |
953 | v-model="props.item.status" | 964 | v-model="props.item.status" |
954 | @change="suspendStudentStatus(props.item.status,props.item._id)" | 965 | @change="suspendStudentStatus(props.item.status,props.item._id)" |
955 | ></v-switch> | 966 | ></v-switch> |
956 | </td> | 967 | </td> |
957 | <td class="text-xs-center td td-row"> | 968 | <td class="text-xs-center td td-row"> |
958 | <span> | 969 | <span> |
959 | <v-tooltip top> | 970 | <v-tooltip top> |
960 | <img | 971 | <img |
961 | slot="activator" | 972 | slot="activator" |
962 | style="cursor:pointer; width:25px; height:25px; " | 973 | style="cursor:pointer; width:25px; height:25px; " |
963 | class="mr-3" | 974 | class="mr-3" |
964 | @click="profile(props.item)" | 975 | @click="profile(props.item)" |
965 | src="/static/icon/view.png" | 976 | src="/static/icon/view.png" |
966 | /> | 977 | /> |
967 | <span>View</span> | 978 | <span>View</span> |
968 | </v-tooltip> | 979 | </v-tooltip> |
969 | <v-tooltip top | 980 | <v-tooltip top v-if="role != 'TEACHER' "> |
970 | v-if="role != 'TEACHER' " | ||
971 | > | ||
972 | <img | 981 | <img |
973 | slot="activator" | 982 | slot="activator" |
974 | style="cursor:pointer; width:20px; height:18px; " | 983 | style="cursor:pointer; width:20px; height:18px; " |
975 | class="mr-3" | 984 | class="mr-3" |
976 | @click="editItem(props.item)" | 985 | @click="editItem(props.item)" |
977 | src="/static/icon/edit.png" | 986 | src="/static/icon/edit.png" |
978 | /> | 987 | /> |
979 | <span>Edit</span> | 988 | <span>Edit</span> |
980 | </v-tooltip> | 989 | </v-tooltip> |
981 | <v-tooltip top | 990 | <v-tooltip top v-if="role != 'TEACHER' "> |
982 | v-if="role != 'TEACHER' " | ||
983 | > | ||
984 | <img | 991 | <img |
985 | slot="activator" | 992 | slot="activator" |
986 | style="cursor:pointer; width:20px; height:20px; " | 993 | style="cursor:pointer; width:20px; height:20px; " |
987 | class="mr-3" | 994 | class="mr-3" |
988 | @click="deleteItem(props.item)" | 995 | @click="deleteItem(props.item)" |
989 | src="/static/icon/delete.png" | 996 | src="/static/icon/delete.png" |
990 | /> | 997 | /> |
991 | <span>Delete</span> | 998 | <span>Delete</span> |
992 | </v-tooltip> | 999 | </v-tooltip> |
993 | </span> | 1000 | </span> |
994 | </td> | 1001 | </td> |
995 | </tr> | 1002 | </tr> |
996 | </template> | 1003 | </template> |
997 | <v-alert | 1004 | <v-alert |
998 | slot="no-results" | 1005 | slot="no-results" |
999 | :value="true" | 1006 | :value="true" |
1000 | color="error" | 1007 | color="error" |
1001 | icon="warning" | 1008 | icon="warning" |
1002 | >Your search for "{{ search }}" found no results.</v-alert> | 1009 | >Your search for "{{ search }}" found no results.</v-alert> |
1003 | </v-data-table> | 1010 | </v-data-table> |
1004 | <!-- ****** ADD STUDENTS DETAILS****** --> | 1011 | <!-- ****** ADD STUDENTS DETAILS****** --> |
1005 | <v-dialog v-model="addStudentDialog" max-width="1280"> | 1012 | <v-dialog v-model="addStudentDialog" max-width="1280"> |
1006 | <v-card flat class="card-style pa-2" dark> | 1013 | <v-card flat class="card-style pa-2" dark> |
1007 | <v-layout> | 1014 | <v-layout> |
1008 | <v-flex xs12> | 1015 | <v-flex xs12> |
1009 | <label class="title text-xs-center">Add Student</label> | 1016 | <label class="title text-xs-center">Add Student</label> |
1010 | <v-icon size="24" class="right" @click="addStudentDialog = false">cancel</v-icon> | 1017 | <v-icon size="24" class="right" @click="addStudentDialog = false">cancel</v-icon> |
1011 | </v-flex> | 1018 | </v-flex> |
1012 | </v-layout> | 1019 | </v-layout> |
1013 | <v-container fluid> | 1020 | <v-container fluid> |
1014 | <v-layout align-center> | 1021 | <v-layout align-center> |
1015 | <v-flex xs12> | 1022 | <v-flex xs12> |
1016 | <v-stepper v-model="e2" flat class="card-style elevation-0" dark> | 1023 | <v-stepper v-model="e2" flat class="card-style elevation-0" dark> |
1017 | <v-stepper-header> | 1024 | <v-stepper-header> |
1018 | <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step> | 1025 | <v-stepper-step :complete="e2 > 1" step="1">Fill parent Details</v-stepper-step> |
1019 | <v-divider></v-divider> | 1026 | <v-divider></v-divider> |
1020 | <v-stepper-step step="2">Fill Student Details</v-stepper-step> | 1027 | <v-stepper-step step="2">Fill Student Details</v-stepper-step> |
1021 | </v-stepper-header> | 1028 | </v-stepper-header> |
1022 | <v-stepper-items> | 1029 | <v-stepper-items> |
1023 | <v-stepper-content step="1"> | 1030 | <v-stepper-content step="1"> |
1024 | <v-container fluid class> | 1031 | <v-container fluid class> |
1025 | <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only"> | 1032 | <v-flex xs12 sm12 class="hidden-md-only hidden-lg-only hidden-xl-only"> |
1026 | <v-form ref="parentForm" v-model="valid" lazy-validation> | 1033 | <v-form ref="parentForm" v-model="valid" lazy-validation> |
1027 | <v-layout wrap> | 1034 | <v-layout wrap> |
1028 | <v-flex xs12 sm6> | 1035 | <v-flex xs12 sm6> |
1029 | <v-layout wrap> | 1036 | <v-layout wrap> |
1030 | <v-flex xs12 class="pt-4 subheading"> | 1037 | <v-flex xs12 class="pt-4 subheading"> |
1031 | <label>Father Cell No:</label> | 1038 | <label>Father Cell No:</label> |
1032 | </v-flex> | 1039 | </v-flex> |
1033 | <v-flex xs12> | 1040 | <v-flex xs12> |
1034 | <v-text-field | 1041 | <v-text-field |
1035 | v-model.trim="parentData.fatherCellNo" | 1042 | v-model.trim="parentData.fatherCellNo" |
1036 | placeholder="fill your father Cell Number" | 1043 | placeholder="fill your father Cell Number" |
1037 | type="number" | 1044 | type="number" |
1038 | :rules="fatheCellNoRules" | 1045 | :rules="fatheCellNoRules" |
1039 | counter="10" | 1046 | counter="10" |
1040 | v-on:keyup="getParentDetails()" | 1047 | v-on:keyup="getParentDetails()" |
1041 | required | 1048 | required |
1042 | ></v-text-field> | 1049 | ></v-text-field> |
1043 | </v-flex> | 1050 | </v-flex> |
1044 | </v-layout> | 1051 | </v-layout> |
1045 | </v-flex> | 1052 | </v-flex> |
1046 | <v-flex xs12 sm6> | 1053 | <v-flex xs12 sm6> |
1047 | <v-layout wrap> | 1054 | <v-layout wrap> |
1048 | <v-flex xs12 class="pt-4 subheading"> | 1055 | <v-flex xs12 class="pt-4 subheading"> |
1049 | <label>Parent Email Id:</label> | 1056 | <label>Parent Email Id:</label> |
1050 | </v-flex> | 1057 | </v-flex> |
1051 | <v-flex xs12> | 1058 | <v-flex xs12> |
1052 | <v-text-field | 1059 | <v-text-field |
1053 | placeholder="fill Parent email" | 1060 | placeholder="fill Parent email" |
1054 | v-model="parentData.email" | 1061 | v-model="parentData.email" |
1055 | type="text" | 1062 | type="text" |
1056 | required | 1063 | required |
1057 | ></v-text-field> | 1064 | ></v-text-field> |
1058 | </v-flex> | 1065 | </v-flex> |
1059 | </v-layout> | 1066 | </v-layout> |
1060 | </v-flex> | 1067 | </v-flex> |
1061 | </v-layout> | 1068 | </v-layout> |
1062 | <v-layout wrap> | 1069 | <v-layout wrap> |
1063 | <v-flex xs12 sm6> | 1070 | <v-flex xs12 sm6> |
1064 | <v-layout wrap> | 1071 | <v-layout wrap> |
1065 | <v-flex xs12 class="pt-4 subheading"> | 1072 | <v-flex xs12 class="pt-4 subheading"> |
1066 | <label>Father Name:</label> | 1073 | <label>Father Name:</label> |
1067 | </v-flex> | 1074 | </v-flex> |
1068 | <v-flex xs12> | 1075 | <v-flex xs12> |
1069 | <v-text-field | 1076 | <v-text-field |
1070 | v-model="parentData.fatherName" | 1077 | v-model="parentData.fatherName" |
1071 | placeholder="Fill your father Name" | 1078 | placeholder="Fill your father Name" |
1072 | required | 1079 | required |
1073 | ></v-text-field> | 1080 | ></v-text-field> |
1074 | </v-flex> | 1081 | </v-flex> |
1075 | </v-layout> | 1082 | </v-layout> |
1076 | </v-flex> | 1083 | </v-flex> |
1077 | <v-flex xs12 sm6> | 1084 | <v-flex xs12 sm6> |
1078 | <v-layout wrap> | 1085 | <v-layout wrap> |
1079 | <v-flex xs12 class="pt-4 subheading"> | 1086 | <v-flex xs12 class="pt-4 subheading"> |
1080 | <label>Mother Name:</label> | 1087 | <label>Mother Name:</label> |
1081 | </v-flex> | 1088 | </v-flex> |
1082 | <v-flex xs12> | 1089 | <v-flex xs12> |
1083 | <v-text-field | 1090 | <v-text-field |
1084 | v-model="parentData.motherName" | 1091 | v-model="parentData.motherName" |
1085 | placeholder="fill your Mother Name" | 1092 | placeholder="fill your Mother Name" |
1086 | type="text" | 1093 | type="text" |
1087 | required | 1094 | required |
1088 | ></v-text-field> | 1095 | ></v-text-field> |
1089 | </v-flex> | 1096 | </v-flex> |
1090 | </v-layout> | 1097 | </v-layout> |
1091 | </v-flex> | 1098 | </v-flex> |
1092 | </v-layout> | 1099 | </v-layout> |
1093 | <v-layout wrap> | 1100 | <v-layout wrap> |
1094 | <v-flex xs12 sm6> | 1101 | <v-flex xs12 sm6> |
1095 | <v-layout wrap> | 1102 | <v-layout wrap> |
1096 | <v-flex xs12 class="pt-4 subheading"> | 1103 | <v-flex xs12 class="pt-4 subheading"> |
1097 | <label>Mother Cell No:</label> | 1104 | <label>Mother Cell No:</label> |
1098 | </v-flex> | 1105 | </v-flex> |
1099 | <v-flex xs12> | 1106 | <v-flex xs12> |
1100 | <v-text-field | 1107 | <v-text-field |
1101 | v-model="parentData.motherCellNo" | 1108 | v-model="parentData.motherCellNo" |
1102 | placeholder="fill your Mother Cell Number" | 1109 | placeholder="fill your Mother Cell Number" |
1103 | type="number" | 1110 | type="number" |
1104 | required | 1111 | required |
1105 | ></v-text-field> | 1112 | ></v-text-field> |
1106 | </v-flex> | 1113 | </v-flex> |
1107 | </v-layout> | 1114 | </v-layout> |
1108 | </v-flex> | 1115 | </v-flex> |
1109 | <v-flex xs12 sm6> | 1116 | <v-flex xs12 sm6> |
1110 | <v-layout wrap> | 1117 | <v-layout wrap> |
1111 | <v-flex xs12 class="pt-4 subheading"> | 1118 | <v-flex xs12 class="pt-4 subheading"> |
1112 | <label>Father Profession:</label> | 1119 | <label>Father Profession:</label> |
1113 | </v-flex> | 1120 | </v-flex> |
1114 | <v-flex xs12> | 1121 | <v-flex xs12> |
1115 | <v-text-field | 1122 | <v-text-field |
1116 | v-model="parentData.fatherProfession" | 1123 | v-model="parentData.fatherProfession" |
1117 | placeholder="fill your father profession" | 1124 | placeholder="fill your father profession" |
1118 | ></v-text-field> | 1125 | ></v-text-field> |
1119 | </v-flex> | 1126 | </v-flex> |
1120 | </v-layout> | 1127 | </v-layout> |
1121 | </v-flex> | 1128 | </v-flex> |
1122 | </v-layout> | 1129 | </v-layout> |
1123 | <v-layout wrap> | 1130 | <v-layout wrap> |
1124 | <v-flex xs12 sm6> | 1131 | <v-flex xs12 sm6> |
1125 | <v-layout wrap> | 1132 | <v-layout wrap> |
1126 | <v-flex xs12 class="pt-4 subheading"> | 1133 | <v-flex xs12 class="pt-4 subheading"> |
1127 | <label>Mother Profession:</label> | 1134 | <label>Mother Profession:</label> |
1128 | </v-flex> | 1135 | </v-flex> |
1129 | <v-flex xs12> | 1136 | <v-flex xs12> |
1130 | <v-text-field | 1137 | <v-text-field |
1131 | v-model="parentData.motherProfession" | 1138 | v-model="parentData.motherProfession" |
1132 | placeholder="fill your mother profession" | 1139 | placeholder="fill your mother profession" |
1133 | ></v-text-field> | 1140 | ></v-text-field> |
1134 | </v-flex> | 1141 | </v-flex> |
1135 | </v-layout> | 1142 | </v-layout> |
1136 | </v-flex> | 1143 | </v-flex> |
1137 | <v-flex xs12 sm6> | 1144 | <v-flex xs12 sm6> |
1138 | <v-layout wrap> | 1145 | <v-layout wrap> |
1139 | <v-flex xs12 class="pt-4 subheading"> | 1146 | <v-flex xs12 class="pt-4 subheading"> |
1140 | <label>Password:</label> | 1147 | <label>Password:</label> |
1141 | </v-flex> | 1148 | </v-flex> |
1142 | <v-flex xs12> | 1149 | <v-flex xs12> |
1143 | <v-text-field | 1150 | <v-text-field |
1144 | v-model="parentData.password" | 1151 | v-model="parentData.password" |
1145 | placeholder="Enter Your Password" | 1152 | placeholder="Enter Your Password" |
1146 | ></v-text-field> | 1153 | ></v-text-field> |
1147 | </v-flex> | 1154 | </v-flex> |
1148 | </v-layout> | 1155 | </v-layout> |
1149 | </v-flex> | 1156 | </v-flex> |
1150 | </v-layout> | 1157 | </v-layout> |
1151 | <v-flex sm12 class="hidden-xs-only"> | 1158 | <v-flex sm12 class="hidden-xs-only"> |
1152 | <v-card-actions> | 1159 | <v-card-actions> |
1153 | <v-spacer></v-spacer> | 1160 | <v-spacer></v-spacer> |
1154 | <v-btn | 1161 | <v-btn |
1155 | @click="submitParentDetails" | 1162 | @click="submitParentDetails" |
1156 | round | 1163 | round |
1157 | dark | 1164 | dark |
1158 | :loading="loading" | 1165 | :loading="loading" |
1159 | v-show="showParent" | 1166 | v-show="showParent" |
1160 | class="add-button" | 1167 | class="add-button" |
1161 | >Add</v-btn> | 1168 | >Add</v-btn> |
1162 | <v-btn | 1169 | <v-btn |
1163 | v-show="showNext" | 1170 | v-show="showNext" |
1164 | @click="e2 = 2" | 1171 | @click="e2 = 2" |
1165 | round | 1172 | round |
1166 | dark | 1173 | dark |
1167 | class="add-button" | 1174 | class="add-button" |
1168 | >Next</v-btn> | 1175 | >Next</v-btn> |
1169 | </v-card-actions> | 1176 | </v-card-actions> |
1170 | </v-flex> | 1177 | </v-flex> |
1171 | <v-flex | 1178 | <v-flex |
1172 | xs6 | 1179 | xs6 |
1173 | class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" | 1180 | class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" |
1174 | > | 1181 | > |
1175 | <v-btn | 1182 | <v-btn |
1176 | @click="submitParentDetails" | 1183 | @click="submitParentDetails" |
1177 | round | 1184 | round |
1178 | dark | 1185 | dark |
1179 | :loading="loading" | 1186 | :loading="loading" |
1180 | v-show="showParent" | 1187 | v-show="showParent" |
1181 | class="add-button" | 1188 | class="add-button" |
1182 | >Add</v-btn> | 1189 | >Add</v-btn> |
1183 | <v-btn | 1190 | <v-btn |
1184 | v-show="showNext" | 1191 | v-show="showNext" |
1185 | @click="e2 = 2" | 1192 | @click="e2 = 2" |
1186 | round | 1193 | round |
1187 | dark | 1194 | dark |
1188 | class="add-button" | 1195 | class="add-button" |
1189 | >Next</v-btn> | 1196 | >Next</v-btn> |
1190 | </v-flex> | 1197 | </v-flex> |
1191 | </v-form> | 1198 | </v-form> |
1192 | </v-flex> | 1199 | </v-flex> |
1193 | <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only"> | 1200 | <v-flex xs12 sm12 class="hidden-xs-only hidden-sm-only"> |
1194 | <v-form ref="parentForm" v-model="valid" lazy-validation> | 1201 | <v-form ref="parentForm" v-model="valid" lazy-validation> |
1195 | <v-layout wrap> | 1202 | <v-layout wrap> |
1196 | <v-flex xs12 sm6> | 1203 | <v-flex xs12 sm6> |
1197 | <v-layout> | 1204 | <v-layout> |
1198 | <v-flex xs4 class="pt-4 subheading"> | 1205 | <v-flex xs4 class="pt-4 subheading"> |
1199 | <label class="right">Father Cell No:</label> | 1206 | <label class="right">Father Cell No:</label> |
1200 | </v-flex> | 1207 | </v-flex> |
1201 | <v-flex xs8 class="ml-3"> | 1208 | <v-flex xs8 class="ml-3"> |
1202 | <v-text-field | 1209 | <v-text-field |
1203 | v-model.trim="parentData.fatherCellNo" | 1210 | v-model.trim="parentData.fatherCellNo" |
1204 | placeholder="fill your father Cell Number" | 1211 | placeholder="fill your father Cell Number" |
1205 | type="number" | 1212 | type="number" |
1206 | :rules="fatheCellNoRules" | 1213 | :rules="fatheCellNoRules" |
1207 | counter="10" | 1214 | counter="10" |
1208 | required | 1215 | required |
1216 | v-on:keyup="getParentDetails()" | ||
1209 | ></v-text-field> | 1217 | ></v-text-field> |
1210 | </v-flex> | 1218 | </v-flex> |
1211 | </v-layout> | 1219 | </v-layout> |
1212 | </v-flex> | 1220 | </v-flex> |
1213 | <v-flex xs12 sm6> | 1221 | <v-flex xs12 sm6> |
1214 | <v-layout> | 1222 | <v-layout> |
1215 | <v-flex xs4 class="pt-4 subheading"> | 1223 | <v-flex xs4 class="pt-4 subheading"> |
1216 | <label class="right">Parent Email Id:</label> | 1224 | <label class="right">Parent Email Id:</label> |
1217 | </v-flex> | 1225 | </v-flex> |
1218 | <v-flex xs8 class="ml-3"> | 1226 | <v-flex xs8 class="ml-3"> |
1219 | <v-text-field | 1227 | <v-text-field |
1220 | placeholder="fill Parent email" | 1228 | placeholder="fill Parent email" |
1221 | v-model="parentData.email" | 1229 | v-model="parentData.email" |
1222 | type="text" | 1230 | type="text" |
1223 | required | 1231 | required |
1224 | ></v-text-field> | 1232 | ></v-text-field> |
1225 | </v-flex> | 1233 | </v-flex> |
1226 | </v-layout> | 1234 | </v-layout> |
1227 | </v-flex> | 1235 | </v-flex> |
1228 | </v-layout> | 1236 | </v-layout> |
1229 | <v-layout wrap> | 1237 | <v-layout wrap> |
1230 | <v-flex xs12 sm6> | 1238 | <v-flex xs12 sm6> |
1231 | <v-layout> | 1239 | <v-layout> |
1232 | <v-flex xs4 class="pt-4 subheading"> | 1240 | <v-flex xs4 class="pt-4 subheading"> |
1233 | <label class="right">Father Name:</label> | 1241 | <label class="right">Father Name:</label> |
1234 | </v-flex> | 1242 | </v-flex> |
1235 | <v-flex xs8 class="ml-3"> | 1243 | <v-flex xs8 class="ml-3"> |
1236 | <v-text-field | 1244 | <v-text-field |
1237 | v-model="parentData.fatherName" | 1245 | v-model="parentData.fatherName" |
1238 | placeholder="Fill your father Name" | 1246 | placeholder="Fill your father Name" |
1239 | required | 1247 | required |
1240 | ></v-text-field> | 1248 | ></v-text-field> |
1241 | </v-flex> | 1249 | </v-flex> |
1242 | </v-layout> | 1250 | </v-layout> |
1243 | </v-flex> | 1251 | </v-flex> |
1244 | <v-flex xs12 sm6> | 1252 | <v-flex xs12 sm6> |
1245 | <v-layout> | 1253 | <v-layout> |
1246 | <v-flex xs4 class="pt-4 subheading"> | 1254 | <v-flex xs4 class="pt-4 subheading"> |
1247 | <label class="right">Mother Name:</label> | 1255 | <label class="right">Mother Name:</label> |
1248 | </v-flex> | 1256 | </v-flex> |
1249 | <v-flex xs8 class="ml-3"> | 1257 | <v-flex xs8 class="ml-3"> |
1250 | <v-text-field | 1258 | <v-text-field |
1251 | v-model="parentData.motherName" | 1259 | v-model="parentData.motherName" |
1252 | placeholder="fill your Mother Name" | 1260 | placeholder="fill your Mother Name" |
1253 | type="text" | 1261 | type="text" |
1254 | required | 1262 | required |
1255 | ></v-text-field> | 1263 | ></v-text-field> |
1256 | </v-flex> | 1264 | </v-flex> |
1257 | </v-layout> | 1265 | </v-layout> |
1258 | </v-flex> | 1266 | </v-flex> |
1259 | </v-layout> | 1267 | </v-layout> |
1260 | <v-layout wrap> | 1268 | <v-layout wrap> |
1261 | <v-flex xs12 sm6> | 1269 | <v-flex xs12 sm6> |
1262 | <v-layout> | 1270 | <v-layout> |
1263 | <v-flex xs4 class="pt-4 subheading"> | 1271 | <v-flex xs4 class="pt-4 subheading"> |
1264 | <label class="right">Mother Cell No:</label> | 1272 | <label class="right">Mother Cell No:</label> |
1265 | </v-flex> | 1273 | </v-flex> |
1266 | <v-flex xs8 class="ml-3"> | 1274 | <v-flex xs8 class="ml-3"> |
1267 | <v-text-field | 1275 | <v-text-field |
1268 | v-model="parentData.motherCellNo" | 1276 | v-model="parentData.motherCellNo" |
1269 | placeholder="fill your Mother Cell Number" | 1277 | placeholder="fill your Mother Cell Number" |
1270 | type="number" | 1278 | type="number" |
1271 | required | 1279 | required |
1272 | ></v-text-field> | 1280 | ></v-text-field> |
1273 | </v-flex> | 1281 | </v-flex> |
1274 | </v-layout> | 1282 | </v-layout> |
1275 | </v-flex> | 1283 | </v-flex> |
1276 | <v-flex xs12 sm6> | 1284 | <v-flex xs12 sm6> |
1277 | <v-layout> | 1285 | <v-layout> |
1278 | <v-flex xs4 class="pt-4 subheading"> | 1286 | <v-flex xs4 class="pt-4 subheading"> |
1279 | <label class="right">Father Profession:</label> | 1287 | <label class="right">Father Profession:</label> |
1280 | </v-flex> | 1288 | </v-flex> |
1281 | <v-flex xs8 class="ml-3"> | 1289 | <v-flex xs8 class="ml-3"> |
1282 | <v-text-field | 1290 | <v-text-field |
1283 | v-model="parentData.fatherProfession" | 1291 | v-model="parentData.fatherProfession" |
1284 | placeholder="fill your father profession" | 1292 | placeholder="fill your father profession" |
1285 | ></v-text-field> | 1293 | ></v-text-field> |
1286 | </v-flex> | 1294 | </v-flex> |
1287 | </v-layout> | 1295 | </v-layout> |
1288 | </v-flex> | 1296 | </v-flex> |
1289 | </v-layout> | 1297 | </v-layout> |
1290 | <v-layout wrap> | 1298 | <v-layout wrap> |
1291 | <v-flex xs12 sm6> | 1299 | <v-flex xs12 sm6> |
1292 | <v-layout> | 1300 | <v-layout> |
1293 | <v-flex xs4 class="pt-4 subheading"> | 1301 | <v-flex xs4 class="pt-4 subheading"> |
1294 | <label class="right">Mother Profession:</label> | 1302 | <label class="right">Mother Profession:</label> |
1295 | </v-flex> | 1303 | </v-flex> |
1296 | <v-flex xs8 class="ml-3"> | 1304 | <v-flex xs8 class="ml-3"> |
1297 | <v-text-field | 1305 | <v-text-field |
1298 | v-model="parentData.motherProfession" | 1306 | v-model="parentData.motherProfession" |
1299 | placeholder="fill your mother profession" | 1307 | placeholder="fill your mother profession" |
1300 | ></v-text-field> | 1308 | ></v-text-field> |
1301 | </v-flex> | 1309 | </v-flex> |
1302 | </v-layout> | 1310 | </v-layout> |
1303 | </v-flex> | 1311 | </v-flex> |
1304 | <v-flex xs12 sm6> | 1312 | <v-flex xs12 sm6> |
1305 | <v-layout> | 1313 | <v-layout> |
1306 | <v-flex xs4 class="pt-4 subheading"> | 1314 | <v-flex xs4 class="pt-4 subheading"> |
1307 | <label class="right">Password:</label> | 1315 | <label class="right">Password:</label> |
1308 | </v-flex> | 1316 | </v-flex> |
1309 | <v-flex xs8 class="ml-3"> | 1317 | <v-flex xs8 class="ml-3"> |
1310 | <v-text-field | 1318 | <v-text-field |
1311 | :append-icon="e1 ? 'visibility_off' : 'visibility'" | 1319 | :append-icon="e1 ? 'visibility_off' : 'visibility'" |
1312 | :append-icon-cb="() => (e1 = !e1)" | 1320 | :append-icon-cb="() => (e1 = !e1)" |
1313 | :type="e1 ? 'password' : 'text'" | 1321 | :type="e1 ? 'password' : 'text'" |
1314 | :rules="password" | 1322 | :rules="password" |
1315 | v-model="parentData.password" | 1323 | v-model="parentData.password" |
1316 | placeholder="Enter Your Password" | 1324 | placeholder="Enter Your Password" |
1317 | required | 1325 | required |
1318 | ></v-text-field> | 1326 | ></v-text-field> |
1319 | </v-flex> | 1327 | </v-flex> |
1320 | </v-layout> | 1328 | </v-layout> |
1321 | </v-flex> | 1329 | </v-flex> |
1322 | </v-layout> | 1330 | </v-layout> |
1323 | <v-flex sm12 class="hidden-xs-only"> | 1331 | <v-flex sm12 class="hidden-xs-only"> |
1324 | <v-card-actions> | 1332 | <v-card-actions> |
1325 | <v-spacer></v-spacer> | 1333 | <v-spacer></v-spacer> |
1326 | <v-btn | 1334 | <v-btn |
1327 | @click="submitParentDetails" | 1335 | @click="submitParentDetails" |
1328 | round | 1336 | round |
1329 | dark | 1337 | dark |
1330 | :loading="loading" | 1338 | :loading="loading" |
1331 | v-show="showParent" | 1339 | v-show="showParent" |
1332 | class="add-button" | 1340 | class="add-button" |
1333 | >Add</v-btn> | 1341 | >Add</v-btn> |
1334 | <v-btn | 1342 | <v-btn |
1335 | v-show="showNext" | 1343 | v-show="showNext" |
1336 | @click="e2 = 2" | 1344 | @click="e2 = 2" |
1337 | round | 1345 | round |
1338 | dark | 1346 | dark |
1339 | class="add-button" | 1347 | class="add-button" |
1340 | >Next</v-btn> | 1348 | >Next</v-btn> |
1341 | </v-card-actions> | 1349 | </v-card-actions> |
1342 | </v-flex> | 1350 | </v-flex> |
1343 | <v-flex | 1351 | <v-flex |
1344 | xs6 | 1352 | xs6 |
1345 | class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" | 1353 | class="hidden-md-only hidden-sm-only hidden-lg-only hidden-xl-only mx-auto mt-2" |
1346 | > | 1354 | > |
1347 | <v-btn | 1355 | <v-btn |
1348 | @click="submitParentDetails" | 1356 | @click="submitParentDetails" |
1349 | round | 1357 | round |
1350 | dark | 1358 | dark |
1351 | :loading="loading" | 1359 | :loading="loading" |
1352 | v-show="showParent" | 1360 | v-show="showParent" |
1353 | class="add-button" | 1361 | class="add-button" |
1354 | >Add</v-btn> | 1362 | >Add</v-btn> |
1355 | <v-btn | 1363 | <v-btn |
1356 | v-show="showNext" | 1364 | v-show="showNext" |
1357 | @click="e2 = 2" | 1365 | @click="e2 = 2" |
1358 | round | 1366 | round |
1359 | dark | 1367 | dark |
1360 | class="add-button" | 1368 | class="add-button" |
1361 | >Next</v-btn> | 1369 | >Next</v-btn> |
1362 | </v-flex> | 1370 | </v-flex> |
1363 | </v-form> | 1371 | </v-form> |
1364 | </v-flex> | 1372 | </v-flex> |
1365 | </v-container> | 1373 | </v-container> |
1366 | </v-stepper-content> | 1374 | </v-stepper-content> |
1367 | <v-stepper-content step="2"> | 1375 | <v-stepper-content step="2"> |
1368 | <v-flex xs12 sm12> | 1376 | <v-flex xs12 sm12> |
1369 | <v-form ref="form" v-model="valid" lazy-validation> | 1377 | <v-form ref="form" v-model="valid" lazy-validation> |
1370 | <v-layout> | 1378 | <v-layout> |
1371 | <v-flex | 1379 | <v-flex |
1372 | xs12 | 1380 | xs12 |
1373 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 1381 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
1374 | > | 1382 | > |
1375 | <v-avatar size="100px"> | 1383 | <v-avatar size="100px"> |
1376 | <img src="/static/icon/user.png" v-if="!imageUrl" /> | 1384 | <img src="/static/icon/user.png" v-if="!imageUrl" /> |
1377 | </v-avatar> | 1385 | </v-avatar> |
1378 | <input | 1386 | <input |
1379 | type="file" | 1387 | type="file" |
1380 | style="display: none" | 1388 | style="display: none" |
1381 | ref="image" | 1389 | ref="image" |
1382 | accept="image/*" | 1390 | accept="image/*" |
1383 | @change="onFilePicked" | 1391 | @change="onFilePicked" |
1384 | /> | 1392 | /> |
1385 | <img | 1393 | <img |
1386 | :src="imageData.imageUrl" | 1394 | :src="imageData.imageUrl" |
1387 | height="150" | 1395 | height="150" |
1388 | v-if="imageUrl" | 1396 | v-if="imageUrl" |
1389 | style="border-radius:50%; width:200px" | 1397 | style="border-radius:50%; width:200px" |
1390 | /> | 1398 | /> |
1391 | </v-flex> | 1399 | </v-flex> |
1392 | </v-layout> | 1400 | </v-layout> |
1393 | <v-layout wrap> | 1401 | <v-layout wrap> |
1394 | <v-flex xs12 sm6> | 1402 | <v-flex xs12 sm6> |
1395 | <v-layout> | 1403 | <v-layout> |
1396 | <v-flex x4 sm4 class="pt-4 subheading"> | 1404 | <v-flex x4 sm4 class="pt-4 subheading"> |
1397 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> | 1405 | <label class="right hidden-xs-only hidden-sm-only">Select Class:</label> |
1398 | <label | 1406 | <label |
1399 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1407 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1400 | >Class:</label> | 1408 | >Class:</label> |
1401 | </v-flex> | 1409 | </v-flex> |
1402 | <v-flex xs8 sm8 class="ml-3"> | 1410 | <v-flex xs8 sm8 class="ml-3"> |
1403 | <v-select | 1411 | <v-select |
1404 | :items="addclass" | 1412 | :items="addclass" |
1405 | label="Select Class" | 1413 | label="Select Class" |
1406 | v-model="addStudents.select" | 1414 | v-model="addStudents.select" |
1407 | item-text="classNum" | 1415 | item-text="classNum" |
1408 | item-value="_id" | 1416 | item-value="_id" |
1409 | name="Select Class" | 1417 | name="Select Class" |
1410 | :rules="classRules" | 1418 | :rules="classRules" |
1411 | @change="getSection(addStudents.select)" | 1419 | @change="getSection(addStudents.select)" |
1412 | required | 1420 | required |
1413 | ></v-select> | 1421 | ></v-select> |
1414 | </v-flex> | 1422 | </v-flex> |
1415 | </v-layout> | 1423 | </v-layout> |
1416 | </v-flex> | 1424 | </v-flex> |
1417 | <v-flex xs12 sm6> | 1425 | <v-flex xs12 sm6> |
1418 | <v-layout> | 1426 | <v-layout> |
1419 | <v-flex xs4 class="pt-4 subheading"> | 1427 | <v-flex xs4 class="pt-4 subheading"> |
1420 | <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> | 1428 | <label class="right hidden-xs-only hidden-sm-only">Select Section:</label> |
1421 | <label | 1429 | <label |
1422 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1430 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1423 | >Section:</label> | 1431 | >Section:</label> |
1424 | </v-flex> | 1432 | </v-flex> |
1425 | <v-flex xs8 class="ml-3"> | 1433 | <v-flex xs8 class="ml-3"> |
1426 | <v-select | 1434 | <v-select |
1427 | :items="addSection" | 1435 | :items="addSection" |
1428 | label="Select Section" | 1436 | label="Select Section" |
1429 | v-model="addStudents.selectSection" | 1437 | v-model="addStudents.selectSection" |
1430 | item-text="name" | 1438 | item-text="name" |
1431 | item-value="_id" | 1439 | item-value="_id" |
1432 | name="Select Section" | 1440 | name="Select Section" |
1433 | :rules="sectionRules" | 1441 | :rules="sectionRules" |
1434 | required | 1442 | required |
1435 | ></v-select> | 1443 | ></v-select> |
1436 | </v-flex> | 1444 | </v-flex> |
1437 | </v-layout> | 1445 | </v-layout> |
1438 | </v-flex> | 1446 | </v-flex> |
1439 | </v-layout> | 1447 | </v-layout> |
1440 | <v-layout wrap> | 1448 | <v-layout wrap> |
1441 | <v-flex xs12 sm6> | 1449 | <v-flex xs12 sm6> |
1442 | <v-layout> | 1450 | <v-layout> |
1443 | <v-flex xs4 sm4 class="pt-4 subheading"> | 1451 | <v-flex xs4 sm4 class="pt-4 subheading"> |
1444 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> | 1452 | <label class="right hidden-xs-only hidden-sm-only">Full Name:</label> |
1445 | <label | 1453 | <label |
1446 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1454 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1447 | >Name:</label> | 1455 | >Name:</label> |
1448 | </v-flex> | 1456 | </v-flex> |
1449 | <v-flex xs8 sm8 class="ml-3"> | 1457 | <v-flex xs8 sm8 class="ml-3"> |
1450 | <v-text-field | 1458 | <v-text-field |
1451 | v-model="addStudents.name" | 1459 | v-model="addStudents.name" |
1452 | placeholder="fill your full Name" | 1460 | placeholder="fill your full Name" |
1453 | name="name" | 1461 | name="name" |
1454 | type="text" | 1462 | type="text" |
1455 | :rules="nameRules" | 1463 | :rules="nameRules" |
1456 | required | 1464 | required |
1457 | ></v-text-field> | 1465 | ></v-text-field> |
1458 | </v-flex> | 1466 | </v-flex> |
1459 | </v-layout> | 1467 | </v-layout> |
1460 | </v-flex> | 1468 | </v-flex> |
1461 | <v-flex xs12 sm6> | 1469 | <v-flex xs12 sm6> |
1462 | <v-layout> | 1470 | <v-layout> |
1463 | <v-flex xs4 sm4 class="pt-4 subheading"> | 1471 | <v-flex xs4 sm4 class="pt-4 subheading"> |
1464 | <label class="right">Email:</label> | 1472 | <label class="right">Email:</label> |
1465 | </v-flex> | 1473 | </v-flex> |
1466 | <v-flex xs8 sm8 class="ml-3"> | 1474 | <v-flex xs8 sm8 class="ml-3"> |
1467 | <v-text-field | 1475 | <v-text-field |
1468 | placeholder="fill your email" | 1476 | placeholder="fill your email" |
1469 | v-model="addStudents.email" | 1477 | v-model="addStudents.email" |
1470 | type="text" | 1478 | type="text" |
1471 | name="email" | 1479 | name="email" |
1472 | required | 1480 | required |
1473 | ></v-text-field> | 1481 | ></v-text-field> |
1474 | </v-flex> | 1482 | </v-flex> |
1475 | </v-layout> | 1483 | </v-layout> |
1476 | </v-flex> | 1484 | </v-flex> |
1477 | </v-layout> | 1485 | </v-layout> |
1478 | <v-layout wrap> | 1486 | <v-layout wrap> |
1479 | <v-flex xs12 sm6> | 1487 | <v-flex xs12 sm6> |
1480 | <v-layout> | 1488 | <v-layout> |
1481 | <v-flex xs4 sm4 class="pt-4 subheading"> | 1489 | <v-flex xs4 sm4 class="pt-4 subheading"> |
1482 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> | 1490 | <label class="right hidden-sm-only hidden-xs-only">Date of Birth:</label> |
1483 | <label | 1491 | <label |
1484 | class="right hidden-lg-only hidden-xl-only hidden-md-only" | 1492 | class="right hidden-lg-only hidden-xl-only hidden-md-only" |
1485 | >D.O.B:</label> | 1493 | >D.O.B:</label> |
1486 | </v-flex> | 1494 | </v-flex> |
1487 | <v-flex xs8 sm8 class="ml-3"> | 1495 | <v-flex xs8 sm8 class="ml-3"> |
1488 | <v-menu | 1496 | <v-menu |
1489 | ref="menu" | 1497 | ref="menu" |
1490 | :close-on-content-click="false" | 1498 | :close-on-content-click="false" |
1491 | v-model="menu" | 1499 | v-model="menu" |
1492 | :nudge-right="40" | 1500 | :nudge-right="40" |
1493 | lazy | 1501 | lazy |
1494 | transition="scale-transition" | 1502 | transition="scale-transition" |
1495 | offset-y | 1503 | offset-y |
1496 | full-width | 1504 | full-width |
1497 | min-width="290px" | 1505 | min-width="290px" |
1498 | > | 1506 | > |
1499 | <v-text-field | 1507 | <v-text-field |
1500 | slot="activator" | 1508 | slot="activator" |
1501 | :rules="dateRules" | 1509 | :rules="dateRules" |
1502 | v-model="addStudents.date" | 1510 | v-model="addStudents.date" |
1503 | placeholder="Select date" | 1511 | placeholder="Select date" |
1504 | ></v-text-field> | 1512 | ></v-text-field> |
1505 | <v-date-picker | 1513 | <v-date-picker |
1506 | ref="picker" | 1514 | ref="picker" |
1507 | v-model="addStudents.date" | 1515 | v-model="addStudents.date" |
1508 | :max="new Date().toISOString().substr(0, 10)" | 1516 | :max="new Date().toISOString().substr(0, 10)" |
1509 | min="1950-01-01" | 1517 | min="1950-01-01" |
1510 | @input="menu = false" | 1518 | @input="menu = false" |
1511 | ></v-date-picker> | 1519 | ></v-date-picker> |
1512 | </v-menu> | 1520 | </v-menu> |
1513 | </v-flex> | 1521 | </v-flex> |
1514 | </v-layout> | 1522 | </v-layout> |
1515 | </v-flex> | 1523 | </v-flex> |
1516 | <v-flex xs12 sm6> | 1524 | <v-flex xs12 sm6> |
1517 | <v-layout> | 1525 | <v-layout> |
1518 | <v-flex xs4 class="pt-4 subheading"> | 1526 | <v-flex xs4 class="pt-4 subheading"> |
1519 | <label class="right">City:</label> | 1527 | <label class="right">City:</label> |
1520 | </v-flex> | 1528 | </v-flex> |
1521 | <v-flex xs8 class="ml-3"> | 1529 | <v-flex xs8 class="ml-3"> |
1522 | <v-text-field | 1530 | <v-text-field |
1523 | v-model="addStudents.city" | 1531 | v-model="addStudents.city" |
1524 | placeholder="fill your City Name" | 1532 | placeholder="fill your City Name" |
1525 | name="City" | 1533 | name="City" |
1526 | type="text" | 1534 | type="text" |
1527 | :rules="cityRules" | 1535 | :rules="cityRules" |
1528 | required | 1536 | required |
1529 | ></v-text-field> | 1537 | ></v-text-field> |
1530 | </v-flex> | 1538 | </v-flex> |
1531 | </v-layout> | 1539 | </v-layout> |
1532 | </v-flex> | 1540 | </v-flex> |
1533 | </v-layout> | 1541 | </v-layout> |
1534 | <v-layout wrap> | 1542 | <v-layout wrap> |
1535 | <v-flex xs12 sm6> | 1543 | <v-flex xs12 sm6> |
1536 | <v-layout> | 1544 | <v-layout> |
1537 | <v-flex xs4 class="pt-4 subheading"> | 1545 | <v-flex xs4 class="pt-4 subheading"> |
1538 | <label class="right">State:</label> | 1546 | <label class="right">State:</label> |
1539 | </v-flex> | 1547 | </v-flex> |
1540 | <v-flex xs8 class="ml-3"> | 1548 | <v-flex xs8 class="ml-3"> |
1541 | <v-text-field | 1549 | <v-text-field |
1542 | v-model="addStudents.state" | 1550 | v-model="addStudents.state" |
1543 | placeholder="fill your State Name" | 1551 | placeholder="fill your State Name" |
1544 | name="state" | 1552 | name="state" |
1545 | type="text" | 1553 | type="text" |
1546 | :rules="stateRules" | 1554 | :rules="stateRules" |
1547 | required | 1555 | required |
1548 | ></v-text-field> | 1556 | ></v-text-field> |
1549 | </v-flex> | 1557 | </v-flex> |
1550 | </v-layout> | 1558 | </v-layout> |
1551 | </v-flex> | 1559 | </v-flex> |
1552 | <v-flex xs12 sm6> | 1560 | <v-flex xs12 sm6> |
1553 | <v-layout> | 1561 | <v-layout> |
1554 | <v-flex xs4 class="pt-4 subheading"> | 1562 | <v-flex xs4 class="pt-4 subheading"> |
1555 | <label class="right">Pincode:</label> | 1563 | <label class="right">Pincode:</label> |
1556 | </v-flex> | 1564 | </v-flex> |
1557 | <v-flex xs8 class="ml-3"> | 1565 | <v-flex xs8 class="ml-3"> |
1558 | <v-text-field | 1566 | <v-text-field |
1559 | v-model="addStudents.pincode" | 1567 | v-model="addStudents.pincode" |
1560 | placeholder="fill your pincode" | 1568 | placeholder="fill your pincode" |
1561 | name="pincode" | 1569 | name="pincode" |
1562 | type="number" | 1570 | type="number" |
1563 | :rules="pincode" | 1571 | :rules="pincode" |
1564 | required | 1572 | required |
1565 | ></v-text-field> | 1573 | ></v-text-field> |
1566 | </v-flex> | 1574 | </v-flex> |
1567 | </v-layout> | 1575 | </v-layout> |
1568 | </v-flex> | 1576 | </v-flex> |
1569 | </v-layout> | 1577 | </v-layout> |
1570 | <v-layout wrap> | 1578 | <v-layout wrap> |
1571 | <v-flex xs12 sm6> | 1579 | <v-flex xs12 sm6> |
1572 | <v-layout> | 1580 | <v-layout> |
1573 | <v-flex xs4 class="pt-4 subheading"> | 1581 | <v-flex xs4 class="pt-4 subheading"> |
1574 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> | 1582 | <label class="right hidden-xs-only hidden-sm-only">Mobile No:</label> |
1575 | <label | 1583 | <label |
1576 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1584 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1577 | >Mobile:</label> | 1585 | >Mobile:</label> |
1578 | </v-flex> | 1586 | </v-flex> |
1579 | <v-flex xs8 class="ml-3"> | 1587 | <v-flex xs8 class="ml-3"> |
1580 | <v-text-field | 1588 | <v-text-field |
1581 | v-model="addStudents.mobile" | 1589 | v-model="addStudents.mobile" |
1582 | placeholder="fill your MobileNo" | 1590 | placeholder="fill your MobileNo" |
1583 | name="mobileNo" | 1591 | name="mobileNo" |
1584 | type="number" | 1592 | type="number" |
1585 | |||
1586 | ></v-text-field> | 1593 | ></v-text-field> |
1587 | </v-flex> | 1594 | </v-flex> |
1588 | </v-layout> | 1595 | </v-layout> |
1589 | </v-flex> | 1596 | </v-flex> |
1590 | <v-flex xs12 sm6> | 1597 | <v-flex xs12 sm6> |
1591 | <v-layout> | 1598 | <v-layout> |
1592 | <v-flex xs4 class="pt-4 subheading"> | 1599 | <v-flex xs4 class="pt-4 subheading"> |
1593 | <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> | 1600 | <label class="right hidden-xs-only hidden-sm-only">Select Country:</label> |
1594 | <label | 1601 | <label |
1595 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1602 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1596 | >Country:</label> | 1603 | >Country:</label> |
1597 | </v-flex> | 1604 | </v-flex> |
1598 | <v-flex xs8 class="ml-3"> | 1605 | <v-flex xs8 class="ml-3"> |
1599 | <v-autocomplete | 1606 | <v-autocomplete |
1600 | v-model="addStudents.country" | 1607 | v-model="addStudents.country" |
1601 | :rules="country" | 1608 | :rules="country" |
1602 | :items="countries" | 1609 | :items="countries" |
1603 | placeholder="Select Country Name" | 1610 | placeholder="Select Country Name" |
1604 | required | 1611 | required |
1605 | ></v-autocomplete> | 1612 | ></v-autocomplete> |
1606 | </v-flex> | 1613 | </v-flex> |
1607 | </v-layout> | 1614 | </v-layout> |
1608 | </v-flex> | 1615 | </v-flex> |
1609 | </v-layout> | 1616 | </v-layout> |
1610 | <v-layout wrap> | 1617 | <v-layout wrap> |
1611 | <v-flex xs12 sm6> | 1618 | <v-flex xs12 sm6> |
1612 | <v-layout> | 1619 | <v-layout> |
1613 | <v-flex xs4 class="pt-4 subheading"> | 1620 | <v-flex xs4 class="pt-4 subheading"> |
1614 | <label class="right">Gender:</label> | 1621 | <label class="right">Gender:</label> |
1615 | </v-flex> | 1622 | </v-flex> |
1616 | <v-flex xs8 class="ml-3"> | 1623 | <v-flex xs8 class="ml-3"> |
1617 | <v-select | 1624 | <v-select |
1618 | :items="gender" | 1625 | :items="gender" |
1619 | v-model="addStudents.gender" | 1626 | v-model="addStudents.gender" |
1620 | :rules="genderRules" | 1627 | :rules="genderRules" |
1621 | label="Select Gender" | 1628 | label="Select Gender" |
1622 | required | 1629 | required |
1623 | ></v-select> | 1630 | ></v-select> |
1624 | </v-flex> | 1631 | </v-flex> |
1625 | </v-layout> | 1632 | </v-layout> |
1626 | </v-flex> | 1633 | </v-flex> |
1627 | <v-flex xs12 sm6> | 1634 | <v-flex xs12 sm6> |
1628 | <v-layout> | 1635 | <v-layout> |
1629 | <v-flex xs4 class="pt-4 subheading"> | 1636 | <v-flex xs4 class="pt-4 subheading"> |
1630 | <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> | 1637 | <label class="right hidden-xs-only hidden-sm-only">Blood Group:</label> |
1631 | <label | 1638 | <label |
1632 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1639 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1633 | >Blood:</label> | 1640 | >Blood:</label> |
1634 | </v-flex> | 1641 | </v-flex> |
1635 | <v-flex xs8 class="ml-3"> | 1642 | <v-flex xs8 class="ml-3"> |
1636 | <v-text-field | 1643 | <v-text-field |
1637 | v-model="addStudents.bloodGroup" | 1644 | v-model="addStudents.bloodGroup" |
1638 | placeholder="Fill your Blood Group" | 1645 | placeholder="Fill your Blood Group" |
1639 | required | 1646 | required |
1640 | ></v-text-field> | 1647 | ></v-text-field> |
1641 | </v-flex> | 1648 | </v-flex> |
1642 | </v-layout> | 1649 | </v-layout> |
1643 | </v-flex> | 1650 | </v-flex> |
1644 | </v-layout> | 1651 | </v-layout> |
1645 | <v-layout wrap> | 1652 | <v-layout wrap> |
1646 | <v-flex xs12 sm6> | 1653 | <v-flex xs12 sm6> |
1647 | <v-layout> | 1654 | <v-layout> |
1648 | <v-flex xs4 class="pt-4 subheading"> | 1655 | <v-flex xs4 class="pt-4 subheading"> |
1649 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> | 1656 | <label class="right hidden-xs-only hidden-sm-only">Roll Number:</label> |
1650 | <label | 1657 | <label |
1651 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1658 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1652 | >Roll No:</label> | 1659 | >Roll No:</label> |
1653 | </v-flex> | 1660 | </v-flex> |
1654 | <v-flex xs8 class="ml-3"> | 1661 | <v-flex xs8 class="ml-3"> |
1655 | <v-text-field | 1662 | <v-text-field |
1656 | v-model="addStudents.rollNo" | 1663 | v-model="addStudents.rollNo" |
1657 | placeholder="Fill your Roll Number" | 1664 | placeholder="Fill your Roll Number" |
1658 | :rules="rollNo" | 1665 | :rules="rollNo" |
1659 | required | 1666 | required |
1660 | ></v-text-field> | 1667 | ></v-text-field> |
1661 | </v-flex> | 1668 | </v-flex> |
1662 | </v-layout> | 1669 | </v-layout> |
1663 | </v-flex> | 1670 | </v-flex> |
1664 | <v-flex xs12 sm6> | 1671 | <v-flex xs12 sm6> |
1665 | <v-layout> | 1672 | <v-layout> |
1666 | <v-flex xs4 class="pt-4 subheading"> | 1673 | <v-flex xs4 class="pt-4 subheading"> |
1667 | <label class="right hidden-xs-only hidden-sm-only">Medical Notes:</label> | 1674 | <label class="right hidden-xs-only hidden-sm-only">Medical Notes:</label> |
1668 | <label | 1675 | <label |
1669 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1676 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1670 | >Medical:</label> | 1677 | >Medical:</label> |
1671 | </v-flex> | 1678 | </v-flex> |
1672 | <v-flex xs8 class="ml-3"> | 1679 | <v-flex xs8 class="ml-3"> |
1673 | <v-text-field | 1680 | <v-text-field |
1674 | v-model="addStudents.medicalNotes" | 1681 | v-model="addStudents.medicalNotes" |
1675 | placeholder="Fill your Medical Notes" | 1682 | placeholder="Fill your Medical Notes" |
1676 | required | 1683 | required |
1677 | ></v-text-field> | 1684 | ></v-text-field> |
1678 | </v-flex> | 1685 | </v-flex> |
1679 | </v-layout> | 1686 | </v-layout> |
1680 | </v-flex> | 1687 | </v-flex> |
1681 | </v-layout> | 1688 | </v-layout> |
1682 | <v-layout wrap> | 1689 | <v-layout wrap> |
1683 | <v-flex xs12 sm6> | 1690 | <v-flex xs12 sm6> |
1684 | <v-layout> | 1691 | <v-layout> |
1685 | <v-flex xs4 class="pt-4 subheading"> | 1692 | <v-flex xs4 class="pt-4 subheading"> |
1686 | <label class="right">Height:</label> | 1693 | <label class="right">Height:</label> |
1687 | </v-flex> | 1694 | </v-flex> |
1688 | <v-flex xs8 class="ml-3"> | 1695 | <v-flex xs8 class="ml-3"> |
1689 | <v-text-field | 1696 | <v-text-field |
1690 | v-model="addStudents.height" | 1697 | v-model="addStudents.height" |
1691 | placeholder="Fill your Height" | 1698 | placeholder="Fill your Height" |
1692 | required | 1699 | required |
1693 | ></v-text-field> | 1700 | ></v-text-field> |
1694 | </v-flex> | 1701 | </v-flex> |
1695 | </v-layout> | 1702 | </v-layout> |
1696 | </v-flex> | 1703 | </v-flex> |
1697 | <v-flex xs12 sm6> | 1704 | <v-flex xs12 sm6> |
1698 | <v-layout> | 1705 | <v-layout> |
1699 | <v-flex xs4 class="pt-4 subheading"> | 1706 | <v-flex xs4 class="pt-4 subheading"> |
1700 | <label class="right">Weight:</label> | 1707 | <label class="right">Weight:</label> |
1701 | </v-flex> | 1708 | </v-flex> |
1702 | <v-flex xs8 class="ml-3"> | 1709 | <v-flex xs8 class="ml-3"> |
1703 | <v-text-field | 1710 | <v-text-field |
1704 | v-model="addStudents.weight" | 1711 | v-model="addStudents.weight" |
1705 | placeholder="Fill your Weight" | 1712 | placeholder="Fill your Weight" |
1706 | required | 1713 | required |
1707 | ></v-text-field> | 1714 | ></v-text-field> |
1708 | </v-flex> | 1715 | </v-flex> |
1709 | </v-layout> | 1716 | </v-layout> |
1710 | </v-flex> | 1717 | </v-flex> |
1711 | </v-layout> | 1718 | </v-layout> |
1712 | <v-layout wrap> | 1719 | <v-layout wrap> |
1713 | <v-flex xs12 sm6> | 1720 | <v-flex xs12 sm6> |
1714 | <v-layout> | 1721 | <v-layout> |
1715 | <v-flex xs4 class="pt-4 subheading"> | 1722 | <v-flex xs4 class="pt-4 subheading"> |
1716 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> | 1723 | <label class="right hidden-xs-only hidden-sm-only">Uplaod Image:</label> |
1717 | <label | 1724 | <label |
1718 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1725 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1719 | >Uplaod :</label> | 1726 | >Uplaod :</label> |
1720 | </v-flex> | 1727 | </v-flex> |
1721 | <v-flex xs8 class="ml-3"> | 1728 | <v-flex xs8 class="ml-3"> |
1722 | <v-text-field | 1729 | <v-text-field |
1723 | label="Select Image" | 1730 | label="Select Image" |
1724 | @click="pickFile" | 1731 | @click="pickFile" |
1725 | v-model="imageName" | 1732 | v-model="imageName" |
1726 | append-icon="attach_file" | 1733 | append-icon="attach_file" |
1727 | ></v-text-field> | 1734 | ></v-text-field> |
1728 | </v-flex> | 1735 | </v-flex> |
1729 | </v-layout> | 1736 | </v-layout> |
1730 | </v-flex> | 1737 | </v-flex> |
1731 | <v-flex xs12 sm6> | 1738 | <v-flex xs12 sm6> |
1732 | <v-layout> | 1739 | <v-layout> |
1733 | <v-flex xs4 class="pt-4 subheading"> | 1740 | <v-flex xs4 class="pt-4 subheading"> |
1734 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> | 1741 | <label class="right hidden-xs-only hidden-sm-only">Academic Year:</label> |
1735 | <label | 1742 | <label |
1736 | class="right hidden-lg-only hidden-md-only hidden-xl-only" | 1743 | class="right hidden-lg-only hidden-md-only hidden-xl-only" |
1737 | >Year:</label> | 1744 | >Year:</label> |
1738 | </v-flex> | 1745 | </v-flex> |
1739 | <v-flex xs8 class="ml-3"> | 1746 | <v-flex xs8 class="ml-3"> |
1740 | <v-text-field | 1747 | <v-text-field |
1741 | v-model="addStudents.establishmentYear" | 1748 | v-model="addStudents.establishmentYear" |
1742 | placeholder="fill your Academic Year" | 1749 | placeholder="fill your Academic Year" |
1743 | name="state" | 1750 | name="state" |
1744 | type="number" | 1751 | type="number" |
1745 | :rules="establishmentYearRules" | 1752 | :rules="establishmentYearRules" |
1746 | required | 1753 | required |
1747 | ></v-text-field> | 1754 | ></v-text-field> |
1748 | </v-flex> | 1755 | </v-flex> |
1749 | </v-layout> | 1756 | </v-layout> |
1750 | </v-flex> | 1757 | </v-flex> |
1751 | </v-layout> | 1758 | </v-layout> |
1752 | <v-layout wrap class="hidden-xs-only hidden-sm-only"> | 1759 | <v-layout wrap class="hidden-xs-only hidden-sm-only"> |
1753 | <v-flex xs12 sm6> | 1760 | <v-flex xs12 sm6> |
1754 | <v-layout> | 1761 | <v-layout> |
1755 | <v-flex xs4 sm4 class="pt-4 subheading"> | 1762 | <v-flex xs4 sm4 class="pt-4 subheading"> |
1756 | <label class="right">Present Address:</label> | 1763 | <label class="right">Present Address:</label> |
1757 | </v-flex> | 1764 | </v-flex> |
1758 | <v-flex xs8 sm8 class="ml-3"> | 1765 | <v-flex xs8 sm8 class="ml-3"> |
1759 | <v-text-field | 1766 | <v-text-field |
1760 | v-model="addStudents.presentAddress" | 1767 | v-model="addStudents.presentAddress" |
1761 | :rules="presentAddress" | 1768 | :rules="presentAddress" |
1762 | placeholder="fill Your present Address" | 1769 | placeholder="fill Your present Address" |
1763 | @keyup="copyData" | 1770 | @keyup="copyData" |
1764 | ></v-text-field> | 1771 | ></v-text-field> |
1765 | </v-flex> | 1772 | </v-flex> |
1766 | </v-layout> | 1773 | </v-layout> |
1767 | </v-flex> | 1774 | </v-flex> |
1768 | <v-flex xs12 sm6> | 1775 | <v-flex xs12 sm6> |
1769 | <v-layout> | 1776 | <v-layout> |
1770 | <v-flex xs4 sm4 class="pt-4 subheading addressForm"> | 1777 | <v-flex xs4 sm4 class="pt-4 subheading addressForm"> |
1771 | <label class="right">Permanent Address:</label> | 1778 | <label class="right">Permanent Address:</label> |
1772 | </v-flex> | 1779 | </v-flex> |
1773 | <v-flex xs12 sm8 class="ml-3"> | 1780 | <v-flex xs12 sm8 class="ml-3"> |
1774 | <v-switch | 1781 | <v-switch |
1775 | v-model="addStudents.permanentAddress" | 1782 | v-model="addStudents.permanentAddress" |
1776 | label="Select Permanent Address" | 1783 | label="Select Permanent Address" |
1777 | :value="addStudents.presentAddress" | 1784 | :value="addStudents.presentAddress" |
1778 | ></v-switch> | 1785 | ></v-switch> |
1779 | </v-flex> | 1786 | </v-flex> |
1780 | </v-layout> | 1787 | </v-layout> |
1781 | </v-flex> | 1788 | </v-flex> |
1782 | </v-layout> | 1789 | </v-layout> |
1783 | <v-layout class="hidden-xs-only hidden-sm-only"> | 1790 | <v-layout class="hidden-xs-only hidden-sm-only"> |
1784 | <v-flex xs12 sm6> | 1791 | <v-flex xs12 sm6> |
1785 | <v-layout> | 1792 | <v-layout> |
1786 | <v-flex xs4 sm4 class="pt-4 subheading addressForm"> | 1793 | <v-flex xs4 sm4 class="pt-4 subheading addressForm"> |
1787 | <label class="right">Permanent Address:</label> | 1794 | <label class="right">Permanent Address:</label> |
1788 | </v-flex> | 1795 | </v-flex> |
1789 | <v-flex xs12 sm8 class="ml-3"> | 1796 | <v-flex xs12 sm8 class="ml-3"> |
1790 | <v-text-field | 1797 | <v-text-field |
1791 | v-model="addStudents.permanentAddress" | 1798 | v-model="addStudents.permanentAddress" |
1792 | :rules="permanentAddress" | 1799 | :rules="permanentAddress" |
1793 | placeholder="fill Your Permanent Address" | 1800 | placeholder="fill Your Permanent Address" |
1794 | ></v-text-field> | 1801 | ></v-text-field> |
1795 | </v-flex> | 1802 | </v-flex> |
1796 | </v-layout> | 1803 | </v-layout> |
1797 | </v-flex> | 1804 | </v-flex> |
1798 | </v-layout> | 1805 | </v-layout> |
1799 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> | 1806 | <v-layout class="hidden-lg-only hidden-md-only hidden-xl-only" wrap> |
1800 | <v-flex xs12 sm12> | 1807 | <v-flex xs12 sm12> |
1801 | <v-layout> | 1808 | <v-layout> |
1802 | <v-flex xs12 sm12 class="pt-4 subheading text-xs-center"> | 1809 | <v-flex xs12 sm12 class="pt-4 subheading text-xs-center"> |
1803 | <label class>Present Address:</label> | 1810 | <label class>Present Address:</label> |
1804 | </v-flex> | 1811 | </v-flex> |
1805 | </v-layout> | 1812 | </v-layout> |
1806 | <v-layout> | 1813 | <v-layout> |
1807 | <v-flex xs12 sm12> | 1814 | <v-flex xs12 sm12> |
1808 | <v-textarea | 1815 | <v-textarea |
1809 | name="input-4-3" | 1816 | name="input-4-3" |
1810 | v-model="addStudents.presentAddress" | 1817 | v-model="addStudents.presentAddress" |
1811 | :rules="presentAddress" | 1818 | :rules="presentAddress" |
1812 | placeholder="fill Your present Address" | 1819 | placeholder="fill Your present Address" |
1813 | required | 1820 | required |
1814 | ></v-textarea> | 1821 | ></v-textarea> |
1815 | </v-flex> | 1822 | </v-flex> |
1816 | </v-layout> | 1823 | </v-layout> |
1817 | </v-flex> | 1824 | </v-flex> |
1818 | <v-flex xs12 sm12> | 1825 | <v-flex xs12 sm12> |
1819 | <v-layout> | 1826 | <v-layout> |
1820 | <v-flex | 1827 | <v-flex |
1821 | xs12 | 1828 | xs12 |
1822 | sm12 | 1829 | sm12 |
1823 | class="pt-4 pr-4 subheading text-xs-center addressForm" | 1830 | class="pt-4 pr-4 subheading text-xs-center addressForm" |
1824 | > | 1831 | > |
1825 | <label>Permanent Address:</label> | 1832 | <label>Permanent Address:</label> |
1826 | </v-flex> | 1833 | </v-flex> |
1827 | </v-layout> | 1834 | </v-layout> |
1828 | <v-layout> | 1835 | <v-layout> |
1829 | <v-flex xs12 sm12> | 1836 | <v-flex xs12 sm12> |
1830 | <v-textarea | 1837 | <v-textarea |
1831 | name="input-4-3" | 1838 | name="input-4-3" |
1832 | v-model="addStudents.permanentAddress" | 1839 | v-model="addStudents.permanentAddress" |
1833 | :rules="permanentAddress" | 1840 | :rules="permanentAddress" |
1834 | placeholder="fill Your Permanent Address" | 1841 | placeholder="fill Your Permanent Address" |
1835 | required | 1842 | required |
1836 | ></v-textarea> | 1843 | ></v-textarea> |
1837 | </v-flex> | 1844 | </v-flex> |
1838 | </v-layout> | 1845 | </v-layout> |
1839 | </v-flex> | 1846 | </v-flex> |
1840 | </v-layout> | 1847 | </v-layout> |
1841 | <v-layout> | 1848 | <v-layout> |
1842 | <v-flex xs12 sm12> | 1849 | <v-flex xs12 sm12> |
1843 | <v-layout class="right"> | 1850 | <v-layout class="right"> |
1844 | <!-- <v-flex xs6> --> | 1851 | <!-- <v-flex xs6> --> |
1845 | <v-btn round dark @click="e2 = 1" class="clear-button">Back</v-btn> | 1852 | <v-btn round dark @click="e2 = 1" class="clear-button">Back</v-btn> |
1846 | <!-- </v-flex> | 1853 | <!-- </v-flex> |
1847 | <v-flex xs6>--> | 1854 | <v-flex xs6>--> |
1848 | <v-btn | 1855 | <v-btn |
1849 | @click="submit" | 1856 | @click="submit" |
1850 | round | 1857 | round |
1851 | dark | 1858 | dark |
1852 | :loading="loading" | 1859 | :loading="loading" |
1853 | class="add-button" | 1860 | class="add-button" |
1854 | >Add</v-btn> | 1861 | >Add</v-btn> |
1855 | <!-- </v-flex> --> | 1862 | <!-- </v-flex> --> |
1856 | </v-layout> | 1863 | </v-layout> |
1857 | </v-flex> | 1864 | </v-flex> |
1858 | </v-layout> | 1865 | </v-layout> |
1859 | </v-form> | 1866 | </v-form> |
1860 | </v-flex> | 1867 | </v-flex> |
1861 | </v-stepper-content> | 1868 | </v-stepper-content> |
1862 | </v-stepper-items> | 1869 | </v-stepper-items> |
1863 | </v-stepper> | 1870 | </v-stepper> |
1864 | </v-flex> | 1871 | </v-flex> |
1865 | </v-layout> | 1872 | </v-layout> |
1866 | </v-container> | 1873 | </v-container> |
1867 | </v-card> | 1874 | </v-card> |
1868 | </v-dialog> | 1875 | </v-dialog> |
1869 | <v-snackbar | 1876 | <v-snackbar |
1870 | :timeout="timeout" | 1877 | :timeout="timeout" |
1871 | :top="y === 'top'" | 1878 | :top="y === 'top'" |
1872 | :right="x === 'right'" | 1879 | :right="x === 'right'" |
1873 | :vertical="mode === 'vertical'" | 1880 | :vertical="mode === 'vertical'" |
1874 | v-model="snackbar" | 1881 | v-model="snackbar" |
1875 | :color="color" | 1882 | :color="color" |
1876 | >{{ text }}</v-snackbar> | 1883 | >{{ text }}</v-snackbar> |
1877 | <div class="loader" v-if="showLoader"> | 1884 | <div class="loader" v-if="showLoader"> |
1878 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 1885 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
1879 | </div> | 1886 | </div> |
1880 | </v-container> | 1887 | </v-container> |
1881 | </template> | 1888 | </template> |
1882 | 1889 | ||
1883 | <script> | 1890 | <script> |
1884 | import http from "@/Services/http.js"; | 1891 | import http from "@/Services/http.js"; |
1885 | import moment from "moment"; | 1892 | import moment from "moment"; |
1886 | import countryList from "@/script/country.js"; | 1893 | import countryList from "@/script/country.js"; |
1887 | import parent from "@/script/parents.js"; | 1894 | import parent from "@/script/parents.js"; |
1888 | 1895 | ||
1889 | export default { | 1896 | export default { |
1890 | data: () => ({ | 1897 | data: () => ({ |
1891 | e1: true, | 1898 | e1: true, |
1892 | e2: 0, | 1899 | e2: 0, |
1893 | showParent: true, | 1900 | showParent: true, |
1894 | showNext: false, | 1901 | showNext: false, |
1895 | snackbar: false, | 1902 | snackbar: false, |
1896 | y: "top", | 1903 | y: "top", |
1897 | x: "right", | 1904 | x: "right", |
1898 | role: "", | 1905 | role: "", |
1899 | mode: "", | 1906 | mode: "", |
1900 | append: "", | 1907 | append: "", |
1901 | timeout: 3000, | 1908 | timeout: 3000, |
1902 | text: "", | 1909 | text: "", |
1903 | show: true, | 1910 | show: true, |
1904 | color: "", | 1911 | color: "", |
1905 | showSearch: false, | 1912 | showSearch: false, |
1906 | showLoader: false, | 1913 | showLoader: false, |
1907 | loading: false, | 1914 | loading: false, |
1908 | editLoading: false, | 1915 | editLoading: false, |
1909 | date: null, | 1916 | date: null, |
1910 | search: "", | 1917 | search: "", |
1911 | password: "", | 1918 | password: "", |
1912 | menu: false, | 1919 | menu: false, |
1913 | menu1: false, | 1920 | menu1: false, |
1914 | editStudentDialog: false, | 1921 | editStudentDialog: false, |
1915 | profileStudentDialog: false, | 1922 | profileStudentDialog: false, |
1916 | addStudentDialog: false, | 1923 | addStudentDialog: false, |
1917 | valid: true, | 1924 | valid: true, |
1918 | addclass: [], | 1925 | addclass: [], |
1919 | addSection: [], | 1926 | addSection: [], |
1920 | gender: ["Male", "Female"], | 1927 | gender: ["Male", "Female"], |
1921 | pagination: { | 1928 | pagination: { |
1922 | rowsPerPage: 10 | 1929 | rowsPerPage: 10 |
1923 | }, | 1930 | }, |
1924 | imageData: {}, | 1931 | imageData: {}, |
1925 | imageName: "", | 1932 | imageName: "", |
1926 | imageUrl: "", | 1933 | imageUrl: "", |
1927 | imageFile: "", | 1934 | imageFile: "", |
1928 | editImageName: "", | 1935 | editImageName: "", |
1929 | editImageUrl: "", | 1936 | editImageUrl: "", |
1930 | nameRules: [v => !!v || " Full Name is required"], | 1937 | nameRules: [v => !!v || " Full Name is required"], |
1931 | dateRules: [v => !!v || " DOB is required"], | 1938 | dateRules: [v => !!v || " DOB is required"], |
1932 | cityRules: [v => !!v || " City Name is required"], | 1939 | cityRules: [v => !!v || " City Name is required"], |
1933 | pincode: [v => !!v || " Pincode is required"], | 1940 | pincode: [v => !!v || " Pincode is required"], |
1934 | country: [v => !!v || " Country Name is required"], | 1941 | country: [v => !!v || " Country Name is required"], |
1935 | rollNo: [v => !!v || "Roll No is required"], | 1942 | rollNo: [v => !!v || "Roll No is required"], |
1936 | permanentAddress: [v => !!v || " Permanent Address is required"], | 1943 | permanentAddress: [v => !!v || " Permanent Address is required"], |
1937 | presentAddress: [v => !!v || " Present Address is required"], | 1944 | presentAddress: [v => !!v || " Present Address is required"], |
1938 | stateRules: [v => !!v || "State Name is required"], | 1945 | stateRules: [v => !!v || "State Name is required"], |
1939 | classRules: [v => !!v || " Class Name is required"], | 1946 | classRules: [v => !!v || " Class Name is required"], |
1940 | sectionRules: [v => !!v || " Section Name is required"], | 1947 | sectionRules: [v => !!v || " Section Name is required"], |
1941 | genderRules: [v => !!v || " Select Gender is required"], | 1948 | genderRules: [v => !!v || " Select Gender is required"], |
1942 | fatheCellNoRules: [ | 1949 | fatheCellNoRules: [ |
1943 | v => !!v || " father Cell Number is required", | 1950 | v => !!v || " father Cell Number is required", |
1944 | v => v <= 10000000000 || "Max 10 characters is required" | 1951 | v => v <= 10000000000 || "Max 10 characters is required" |
1945 | ], | 1952 | ], |
1946 | password: [ | 1953 | password: [ |
1947 | v => !!v || "Password field is Required.", | 1954 | v => !!v || "Password field is Required." |
1948 | // v => (/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 | 1955 | // v => (/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8 |
1949 | ], | 1956 | ], |
1950 | mobileNoRule: [v => !!v || " Mobile Number is required"], | 1957 | mobileNoRule: [v => !!v || " Mobile Number is required"], |
1951 | establishmentYearRules: [v => !!v || " Academic Year is required"], | 1958 | establishmentYearRules: [v => !!v || " Academic Year is required"], |
1952 | errorMessages: "", | 1959 | errorMessages: "", |
1953 | countries: [], | 1960 | countries: [], |
1954 | headers: [ | 1961 | headers: [ |
1955 | { | 1962 | { |
1956 | text: "Roll No.", | 1963 | text: "Roll No.", |
1957 | align: "center", | 1964 | align: "center", |
1958 | sortable: false, | 1965 | sortable: false, |
1959 | value: "rollNo" | 1966 | value: "rollNo" |
1960 | }, | 1967 | }, |
1961 | { | 1968 | { |
1962 | text: "Profile Pic", | 1969 | text: "Profile Pic", |
1963 | value: "profilePicUrl", | 1970 | value: "profilePicUrl", |
1964 | sortable: false, | 1971 | sortable: false, |
1965 | align: "center" | 1972 | align: "center" |
1966 | }, | 1973 | }, |
1967 | { text: "Name", value: "name", sortable: false, align: "center" }, | 1974 | { text: "Name", value: "name", sortable: false, align: "center" }, |
1968 | { text: "Gender", value: "gender", sortable: false, align: "center" }, | 1975 | { text: "Gender", value: "gender", sortable: false, align: "center" }, |
1969 | { | 1976 | { |
1970 | text: "Father Name", | 1977 | text: "Father Name", |
1971 | value: "fatherName", | 1978 | value: "fatherName", |
1972 | sortable: false, | 1979 | sortable: false, |
1973 | align: "center" | 1980 | align: "center" |
1974 | }, | 1981 | }, |
1975 | { | 1982 | { |
1976 | text: "Mother Name", | 1983 | text: "Mother Name", |
1977 | value: "motherName", | 1984 | value: "motherName", |
1978 | sortable: false, | 1985 | sortable: false, |
1979 | align: "center" | 1986 | align: "center" |
1980 | }, | 1987 | }, |
1981 | { | 1988 | { |
1982 | text: "Academic Year", | 1989 | text: "Academic Year", |
1983 | value: "establishmentYear", | 1990 | value: "establishmentYear", |
1984 | sortable: false, | 1991 | sortable: false, |
1985 | align: "center" | 1992 | align: "center" |
1986 | }, | 1993 | }, |
1987 | // { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, | 1994 | // { text: "Mobile No", value: "mobile", sortable: false, align: "center" }, |
1988 | { | 1995 | { |
1989 | text: "Status", | 1996 | text: "Status", |
1990 | value: "status", | 1997 | value: "status", |
1991 | sortable: false, | 1998 | sortable: false, |
1992 | align: "center" | 1999 | align: "center" |
1993 | }, | 2000 | }, |
1994 | { text: "Action", value: "", sortable: false, align: "center" } | 2001 | { text: "Action", value: "", sortable: false, align: "center" } |
1995 | ], | 2002 | ], |
1996 | studentsData: [], | 2003 | studentsData: [], |
1997 | parentId: "", | 2004 | parentId: "", |
1998 | editedIndex: -1, | 2005 | editedIndex: -1, |
1999 | parentData: {}, | 2006 | parentData: {}, |
2000 | addStudents: { | 2007 | addStudents: { |
2001 | role: "STUDENT", | 2008 | role: "STUDENT", |
2002 | name: "", | 2009 | name: "", |
2003 | email: "", | 2010 | email: "", |
2004 | date: "", | 2011 | date: "", |
2005 | city: "", | 2012 | city: "", |
2006 | pincode: "", | 2013 | pincode: "", |
2007 | country: "", | 2014 | country: "", |
2008 | permanentAddress: "", | 2015 | permanentAddress: "", |
2009 | presentAddress: "", | 2016 | presentAddress: "", |
2010 | mobile: "", | 2017 | mobile: "", |
2011 | state: "", | 2018 | state: "", |
2012 | gender: "", | 2019 | gender: "", |
2013 | select: "", | 2020 | select: "", |
2014 | selectSection: "", | 2021 | selectSection: "", |
2015 | bloodGroup: "", | 2022 | bloodGroup: "", |
2016 | allergies: "", | 2023 | allergies: "", |
2017 | medicalNotes: "", | 2024 | medicalNotes: "", |
2018 | height: "", | 2025 | height: "", |
2019 | weight: "", | 2026 | weight: "", |
2020 | rollNo: "", | 2027 | rollNo: "", |
2021 | establishmentYear: new Date().getFullYear() | 2028 | establishmentYear: new Date().getFullYear() |
2022 | }, | 2029 | }, |
2023 | selectStudents: { | 2030 | selectStudents: { |
2024 | select: "", | 2031 | select: "", |
2025 | selectSection: "" | 2032 | selectSection: "" |
2026 | }, | 2033 | }, |
2027 | editedItem: { | 2034 | editedItem: { |
2028 | role: "STUDENT", | 2035 | role: "STUDENT", |
2029 | name: "", | 2036 | name: "", |
2030 | email: "", | 2037 | email: "", |
2031 | dob: "", | 2038 | dob: "", |
2032 | city: "", | 2039 | city: "", |
2033 | pincode: "", | 2040 | pincode: "", |
2034 | country: "", | 2041 | country: "", |
2035 | permanentAddress: "", | 2042 | permanentAddress: "", |
2036 | presentAddress: "", | 2043 | presentAddress: "", |
2037 | mobile: "", | 2044 | mobile: "", |
2038 | state: "", | 2045 | state: "", |
2039 | gender: "", | 2046 | gender: "", |
2040 | select: "", | 2047 | select: "", |
2041 | selectSection: "", | 2048 | selectSection: "", |
2042 | bloodGroup: "", | 2049 | bloodGroup: "", |
2043 | allergies: "", | 2050 | allergies: "", |
2044 | medicalNotes: "", | 2051 | medicalNotes: "", |
2045 | height: "", | 2052 | height: "", |
2046 | weight: "", | 2053 | weight: "", |
2047 | rollNo: "", | 2054 | rollNo: "", |
2048 | establishmentYear: new Date().getFullYear() | 2055 | establishmentYear: new Date().getFullYear() |
2049 | } | 2056 | } |
2050 | }), | 2057 | }), |
2051 | watch: { | 2058 | watch: { |
2052 | menu(val) { | 2059 | menu(val) { |
2053 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 2060 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
2054 | }, | 2061 | }, |
2055 | menu1(val) { | 2062 | menu1(val) { |
2056 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 2063 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
2057 | } | 2064 | } |
2058 | }, | 2065 | }, |
2059 | methods: { | 2066 | methods: { |
2060 | findStudents() { | 2067 | findStudents() { |
2061 | this.showLoader = true; | 2068 | this.showLoader = true; |
2062 | http() | 2069 | http() |
2063 | .get("/getStudentWithClass", { | 2070 | .get("/getStudentWithClass", { |
2064 | params: { | 2071 | params: { |
2065 | classId: this.selectStudents.select, | 2072 | classId: this.selectStudents.select, |
2066 | sectionId: this.selectStudents.selectSection | 2073 | sectionId: this.selectStudents.selectSection |
2067 | } | 2074 | } |
2068 | }) | 2075 | }) |
2069 | .then(response => { | 2076 | .then(response => { |
2070 | this.studentsData = response.data.data; | 2077 | this.studentsData = response.data.data; |
2071 | this.showLoader = false; | 2078 | this.showLoader = false; |
2072 | }) | 2079 | }) |
2073 | .catch(err => { | 2080 | .catch(err => { |
2074 | console.log("err====>", err); | 2081 | console.log("err====>", err); |
2075 | this.showLoader = false; | 2082 | this.showLoader = false; |
2076 | }); | 2083 | }); |
2077 | }, | 2084 | }, |
2078 | getSections(_id) { | 2085 | getSections(_id) { |
2079 | var token = this.$store.state.token; | 2086 | var token = this.$store.state.token; |
2080 | this.showLoader = true; | 2087 | this.showLoader = true; |
2081 | http() | 2088 | http() |
2082 | .get( | 2089 | .get( |
2083 | "/getSectionsList", | 2090 | "/getSectionsList", |
2084 | { params: { classId: _id } }, | 2091 | { params: { classId: _id } }, |
2085 | { | 2092 | { |
2086 | headers: { Authorization: "Bearer " + token } | 2093 | headers: { Authorization: "Bearer " + token } |
2087 | } | 2094 | } |
2088 | ) | 2095 | ) |
2089 | .then(response => { | 2096 | .then(response => { |
2090 | this.addSection = response.data.data; | 2097 | this.addSection = response.data.data; |
2091 | this.showLoader = false; | 2098 | this.showLoader = false; |
2092 | }) | 2099 | }) |
2093 | .catch(err => { | 2100 | .catch(err => { |
2094 | this.showLoader = false; | 2101 | this.showLoader = false; |
2095 | }); | 2102 | }); |
2096 | }, | 2103 | }, |
2097 | getSection(_id) { | 2104 | getSection(_id) { |
2098 | var token = this.$store.state.token; | 2105 | var token = this.$store.state.token; |
2099 | this.showLoader = true; | 2106 | this.showLoader = true; |
2100 | http() | 2107 | http() |
2101 | .get( | 2108 | .get( |
2102 | "/getSectionsList", | 2109 | "/getSectionsList", |
2103 | { params: { classId: _id } }, | 2110 | { params: { classId: _id } }, |
2104 | { | 2111 | { |
2105 | headers: { Authorization: "Bearer " + token } | 2112 | headers: { Authorization: "Bearer " + token } |
2106 | } | 2113 | } |
2107 | ) | 2114 | ) |
2108 | .then(response => { | 2115 | .then(response => { |
2109 | this.addSection = response.data.data; | 2116 | this.addSection = response.data.data; |
2110 | this.showLoader = false; | 2117 | this.showLoader = false; |
2111 | }) | 2118 | }) |
2112 | .catch(err => { | 2119 | .catch(err => { |
2113 | this.showLoader = false; | 2120 | this.showLoader = false; |
2114 | }); | 2121 | }); |
2115 | }, | 2122 | }, |
2116 | pickFile() { | 2123 | pickFile() { |
2117 | this.$refs.image.click(); | 2124 | this.$refs.image.click(); |
2118 | }, | 2125 | }, |
2119 | pickEditFile() { | 2126 | pickEditFile() { |
2120 | this.$refs.editDataImage.click(); | 2127 | this.$refs.editDataImage.click(); |
2121 | }, | 2128 | }, |
2122 | dates: function(date) { | 2129 | dates: function(date) { |
2123 | return moment(date).format("MMMM DD, YYYY"); | 2130 | return moment(date).format("MMMM DD, YYYY"); |
2124 | return date | 2131 | return date; |
2125 | }, | 2132 | }, |
2126 | onFilePicked(e) { | 2133 | onFilePicked(e) { |
2127 | // console.log(e) | 2134 | // console.log(e) |
2128 | const files = e.target.files; | 2135 | const files = e.target.files; |
2129 | this.imageData.upload = e.target.files[0]; | 2136 | this.imageData.upload = e.target.files[0]; |
2130 | if (files[0] !== undefined) { | 2137 | if (files[0] !== undefined) { |
2131 | this.imageName = files[0].name; | 2138 | this.imageName = files[0].name; |
2132 | if (this.imageName.lastIndexOf(".") <= 0) { | 2139 | if (this.imageName.lastIndexOf(".") <= 0) { |
2133 | return; | 2140 | return; |
2134 | } | 2141 | } |
2135 | const fr = new FileReader(); | 2142 | const fr = new FileReader(); |
2136 | fr.readAsDataURL(files[0]); | 2143 | fr.readAsDataURL(files[0]); |
2137 | fr.addEventListener("load", () => { | 2144 | fr.addEventListener("load", () => { |
2138 | this.imageUrl = fr.result; | 2145 | this.imageUrl = fr.result; |
2139 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 2146 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
2140 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 2147 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
2141 | }); | 2148 | }); |
2142 | } else { | 2149 | } else { |
2143 | this.imageName = ""; | 2150 | this.imageName = ""; |
2144 | this.imageFile = ""; | 2151 | this.imageFile = ""; |
2145 | this.imageUrl = ""; | 2152 | this.imageUrl = ""; |
2146 | } | 2153 | } |
2147 | }, | 2154 | }, |
2148 | onEditFilePicked(e) { | 2155 | onEditFilePicked(e) { |
2149 | console.log(e); | 2156 | console.log(e); |
2150 | const files = e.target.files; | 2157 | const files = e.target.files; |
2151 | if (files[0] !== undefined) { | 2158 | if (files[0] !== undefined) { |
2152 | this.editImageName = files[0].name; | 2159 | this.editImageName = files[0].name; |
2153 | console.log("this.editImageName", this.editImageName); | 2160 | console.log("this.editImageName", this.editImageName); |
2154 | 2161 | ||
2155 | if (this.editImageName.lastIndexOf(".") <= 0) { | 2162 | if (this.editImageName.lastIndexOf(".") <= 0) { |
2156 | return; | 2163 | return; |
2157 | } | 2164 | } |
2158 | const fr = new FileReader(); | 2165 | const fr = new FileReader(); |
2159 | fr.readAsDataURL(files[0]); | 2166 | fr.readAsDataURL(files[0]); |
2160 | fr.addEventListener("load", () => { | 2167 | fr.addEventListener("load", () => { |
2161 | this.editImageUrl = fr.result; | 2168 | this.editImageUrl = fr.result; |
2162 | this.editiImageFile = files[0]; // this is an image file that can be sent to server... | 2169 | this.editiImageFile = files[0]; // this is an image file that can be sent to server... |
2163 | }); | 2170 | }); |
2164 | } else { | 2171 | } else { |
2165 | this.editImageName = ""; | 2172 | this.editImageName = ""; |
2166 | this.editiImageFile = ""; | 2173 | this.editiImageFile = ""; |
2167 | } | 2174 | } |
2168 | }, | 2175 | }, |
2169 | editItem(item) { | 2176 | editItem(item) { |
2170 | this.editedIndex = this.studentsData.indexOf(item); | 2177 | this.editedIndex = this.studentsData.indexOf(item); |
2171 | this.editedItem = Object.assign({}, item); | 2178 | this.editedItem = Object.assign({}, item); |
2172 | this.editedItem.fatherName = item.parentId.fatherName; | 2179 | this.editedItem.fatherName = item.parentId.fatherName; |
2173 | this.editedItem.fatherCellNo = item.parentId.fatherCellNo; | 2180 | this.editedItem.fatherCellNo = item.parentId.fatherCellNo; |
2174 | this.editedItem.motherName = item.parentId.motherName; | 2181 | this.editedItem.motherName = item.parentId.motherName; |
2175 | this.editedItem.motherCellNo = item.parentId.motherCellNo; | 2182 | this.editedItem.motherCellNo = item.parentId.motherCellNo; |
2176 | this.editedItem.dob = | 2183 | this.editedItem.dob = |
2177 | this.editedItem.dob != undefined | 2184 | this.editedItem.dob != undefined |
2178 | ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) | 2185 | ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) |
2179 | : (this.editedItem.dob = ""); | 2186 | : (this.editedItem.dob = ""); |
2180 | this.editStudentDialog = true; | 2187 | this.editStudentDialog = true; |
2181 | }, | 2188 | }, |
2182 | profile(item) { | 2189 | profile(item) { |
2183 | this.editedIndex = this.studentsData.indexOf(item); | 2190 | this.editedIndex = this.studentsData.indexOf(item); |
2184 | this.editedItem = Object.assign({}, item); | 2191 | this.editedItem = Object.assign({}, item); |
2185 | this.editedItem.fatherName = item.parentId.fatherName; | 2192 | this.editedItem.fatherName = item.parentId.fatherName; |
2186 | this.editedItem.fatherCellNo = item.parentId.fatherCellNo; | 2193 | this.editedItem.fatherCellNo = item.parentId.fatherCellNo; |
2187 | this.editedItem.motherName = item.parentId.motherName; | 2194 | this.editedItem.motherName = item.parentId.motherName; |
2188 | this.editedItem.motherCellNo = item.parentId.motherCellNo; | 2195 | this.editedItem.motherCellNo = item.parentId.motherCellNo; |
2189 | 2196 | ||
2190 | this.profileStudentDialog = true; | 2197 | this.profileStudentDialog = true; |
2191 | }, | 2198 | }, |
2192 | deleteItem(item) { | 2199 | deleteItem(item) { |
2193 | let deleteStudent = { | 2200 | let deleteStudent = { |
2194 | studentId: item._id | 2201 | studentId: item._id |
2195 | }; | 2202 | }; |
2196 | http() | 2203 | http() |
2197 | .delete( | 2204 | .delete( |
2198 | "/deleteStudent", | 2205 | "/deleteStudent", |
2199 | confirm("Are you sure you want to delete this?") && { | 2206 | confirm("Are you sure you want to delete this?") && { |
2200 | params: deleteStudent | 2207 | params: deleteStudent |
2201 | } | 2208 | } |
2202 | ) | 2209 | ) |
2203 | .then(response => { | 2210 | .then(response => { |
2204 | this.snackbar = true; | 2211 | this.snackbar = true; |
2205 | this.text = response.data.message; | 2212 | this.text = response.data.message; |
2206 | this.color = "green"; | 2213 | this.color = "green"; |
2207 | this.findStudents(); | 2214 | this.findStudents(); |
2208 | }) | 2215 | }) |
2209 | .catch(error => { | 2216 | .catch(error => { |
2210 | this.snackbar = true; | 2217 | this.snackbar = true; |
2211 | this.text = error.response.data.message; | 2218 | this.text = error.response.data.message; |
2212 | this.color = "error"; | 2219 | this.color = "error"; |
2213 | }); | 2220 | }); |
2214 | }, | 2221 | }, |
2215 | close() { | 2222 | close() { |
2216 | this.editStudentDialog = false; | 2223 | this.editStudentDialog = false; |
2217 | }, | 2224 | }, |
2218 | closeStudentProfile() { | 2225 | closeStudentProfile() { |
2219 | this.profileStudentDialog = false; | 2226 | this.profileStudentDialog = false; |
2220 | }, | 2227 | }, |
2221 | copyData() { | 2228 | copyData() { |
2222 | this.addStudents.permanentAddress = this.addStudents.presentAddress; | 2229 | this.addStudents.permanentAddress = this.addStudents.presentAddress; |
2223 | }, | 2230 | }, |
2224 | submit() { | 2231 | submit() { |
2225 | if (this.$refs.form.validate()) { | 2232 | if (this.$refs.form.validate()) { |
2226 | let addStudent = { | 2233 | let addStudent = { |
2227 | parentId: this.parentId, | 2234 | parentId: this.parentId, |
2228 | name: this.addStudents.name, | 2235 | name: this.addStudents.name, |
2229 | email: this.addStudents.email, | 2236 | email: this.addStudents.email, |
2230 | role: this.addStudents.role, | 2237 | role: this.addStudents.role, |
2231 | dob: this.addStudents.date, | 2238 | dob: this.addStudents.date, |
2232 | city: this.addStudents.city, | 2239 | city: this.addStudents.city, |
2233 | pincode: this.addStudents.pincode, | 2240 | pincode: this.addStudents.pincode, |
2234 | country: this.addStudents.country, | 2241 | country: this.addStudents.country, |
2235 | permanentAddress: this.addStudents.permanentAddress, | 2242 | permanentAddress: this.addStudents.permanentAddress, |
2236 | presentAddress: this.addStudents.presentAddress, | 2243 | presentAddress: this.addStudents.presentAddress, |
2237 | mobile: this.addStudents.mobile, | 2244 | mobile: this.addStudents.mobile, |
2238 | state: this.addStudents.state, | 2245 | state: this.addStudents.state, |
2239 | gender: this.addStudents.gender, | 2246 | gender: this.addStudents.gender, |
2240 | establishmentYear: this.addStudents.establishmentYear, | 2247 | establishmentYear: this.addStudents.establishmentYear, |
2241 | classId: this.addStudents.select, | 2248 | classId: this.addStudents.select, |
2242 | sectionId: this.addStudents.selectSection, | 2249 | sectionId: this.addStudents.selectSection, |
2243 | bloodGroup: this.addStudents.bloodGroup, | 2250 | bloodGroup: this.addStudents.bloodGroup, |
2244 | medicalNotes: this.addStudents.medicalNotes, | 2251 | medicalNotes: this.addStudents.medicalNotes, |
2245 | height: this.addStudents.height, | 2252 | height: this.addStudents.height, |
2246 | weight: this.addStudents.weight, | 2253 | weight: this.addStudents.weight, |
2247 | rollNo: this.addStudents.rollNo | 2254 | rollNo: this.addStudents.rollNo |
2248 | }; | 2255 | }; |
2249 | if (this.imageUrl) { | 2256 | if (this.imageUrl) { |
2250 | var str = this.imageUrl; | 2257 | var str = this.imageUrl; |
2251 | const [baseUrl, imageUrl] = str.split(/,/); | 2258 | const [baseUrl, imageUrl] = str.split(/,/); |
2252 | addStudent.upload = imageUrl; | 2259 | addStudent.upload = imageUrl; |
2253 | } | 2260 | } |
2254 | this.loading = true; | 2261 | this.loading = true; |
2255 | http() | 2262 | http() |
2256 | .post("/createStudent", addStudent) | 2263 | .post("/createStudent", addStudent) |
2257 | .then(response => { | 2264 | .then(response => { |
2258 | this.snackbar = true; | 2265 | this.snackbar = true; |
2259 | this.text = "New Student added successfully"; | 2266 | this.text = "New Student added successfully"; |
2260 | this.color = "green"; | 2267 | this.color = "green"; |
2261 | this.addStudentDialog = false; | 2268 | this.addStudentDialog = false; |
2262 | this.clear(); | 2269 | this.clear(); |
2263 | this.clearParents(); | 2270 | this.clearParents(); |
2264 | this.loading = false; | 2271 | this.loading = false; |
2265 | }) | 2272 | }) |
2266 | .catch(error => { | 2273 | .catch(error => { |
2267 | this.snackbar = true; | 2274 | this.snackbar = true; |
2268 | this.text = error.response.data.message; | 2275 | this.text = error.response.data.message; |
2269 | this.color = "error"; | 2276 | this.color = "error"; |
2270 | this.loading = false; | 2277 | this.loading = false; |
2271 | }); | 2278 | }); |
2272 | } | 2279 | } |
2273 | }, | 2280 | }, |
2274 | clear() { | 2281 | clear() { |
2275 | this.$refs.form.reset(); | 2282 | this.$refs.form.reset(); |
2276 | this.imageUrl = ""; | 2283 | this.imageUrl = ""; |
2277 | }, | 2284 | }, |
2278 | clearParents() { | 2285 | clearParents() { |
2279 | this.$refs.parentForm.reset(); | 2286 | this.$refs.parentForm.reset(); |
2280 | }, | 2287 | }, |
2281 | save() { | 2288 | save() { |
2282 | let editStudent = { | 2289 | let editStudent = { |
2283 | studentId: this.editedItem._id, | 2290 | studentId: this.editedItem._id, |
2284 | name: this.editedItem.name, | 2291 | name: this.editedItem.name, |
2285 | email: this.editedItem.email, | 2292 | email: this.editedItem.email, |
2286 | role: this.editedItem.role, | 2293 | role: this.editedItem.role, |
2287 | dob: this.editedItem.dob, | 2294 | dob: this.editedItem.dob, |
2288 | city: this.editedItem.city, | 2295 | city: this.editedItem.city, |
2289 | pincode: this.editedItem.pincode, | 2296 | pincode: this.editedItem.pincode, |
2290 | country: this.editedItem.country, | 2297 | country: this.editedItem.country, |
2291 | permanentAddress: this.editedItem.permanentAddress, | 2298 | permanentAddress: this.editedItem.permanentAddress, |
2292 | presentAddress: this.editedItem.presentAddress, | 2299 | presentAddress: this.editedItem.presentAddress, |
2293 | mobile: this.editedItem.mobile, | 2300 | mobile: this.editedItem.mobile, |
2294 | state: this.editedItem.state, | 2301 | state: this.editedItem.state, |
2295 | gender: this.editedItem.gender, | 2302 | gender: this.editedItem.gender, |
2296 | establishmentYear: this.editedItem.establishmentYear, | 2303 | establishmentYear: this.editedItem.establishmentYear, |
2297 | classId: this.editedItem.select, | 2304 | classId: this.editedItem.select, |
2298 | sectionId: this.editedItem.selectSection, | 2305 | sectionId: this.editedItem.selectSection, |
2299 | bloodGroup: this.editedItem.bloodGroup, | 2306 | bloodGroup: this.editedItem.bloodGroup, |
2300 | medicalNotes: this.editedItem.medicalNotes, | 2307 | medicalNotes: this.editedItem.medicalNotes, |
2301 | height: this.editedItem.height, | 2308 | height: this.editedItem.height, |
2302 | weight: this.editedItem.weight, | 2309 | weight: this.editedItem.weight, |
2303 | rollNo: this.editedItem.rollNo | 2310 | rollNo: this.editedItem.rollNo |
2304 | }; | 2311 | }; |
2305 | if (this.editImageUrl) { | 2312 | if (this.editImageUrl) { |
2306 | var str = this.editImageUrl; | 2313 | var str = this.editImageUrl; |
2307 | const [baseUrl, editImageUrl] = str.split(/,/); | 2314 | const [baseUrl, editImageUrl] = str.split(/,/); |
2308 | editStudent.upload = editImageUrl; | 2315 | editStudent.upload = editImageUrl; |
2309 | } | 2316 | } |
2310 | this.editLoading = true; | 2317 | this.editLoading = true; |
2311 | http() | 2318 | http() |
2312 | .put("/updateStudent", editStudent) | 2319 | .put("/updateStudent", editStudent) |
2313 | .then(response => { | 2320 | .then(response => { |
2314 | this.snackbar = true; | 2321 | this.snackbar = true; |
2315 | this.text = response.data.message; | 2322 | this.text = response.data.message; |
2316 | this.color = "green"; | 2323 | this.color = "green"; |
2317 | this.imageUrl = ""; | 2324 | this.imageUrl = ""; |
2318 | this.findStudents(); | 2325 | this.findStudents(); |
2319 | this.close(); | 2326 | this.close(); |
2320 | this.editLoading = false; | 2327 | this.editLoading = false; |
2321 | }) | 2328 | }) |
2322 | .catch(error => { | 2329 | .catch(error => { |
2323 | this.snackbar = true; | 2330 | this.snackbar = true; |
2324 | this.text = error.response.data.statusText; | 2331 | this.text = error.response.data.statusText; |
2325 | this.color = "error"; | 2332 | this.color = "error"; |
2326 | this.editLoading = false; | 2333 | this.editLoading = false; |
2327 | }); | 2334 | }); |
2328 | }, | 2335 | }, |
2329 | submitParentDetails() { | 2336 | submitParentDetails() { |
2330 | if (this.$refs.parentForm.validate()) { | 2337 | if (this.$refs.parentForm.validate()) { |
2331 | this.parentData.fatherCellNo = this.parentData.fatherCellNo; | 2338 | this.parentData.fatherCellNo = this.parentData.fatherCellNo; |
2332 | this.parentData.motherCellNo = this.parentData.motherCellNo; | 2339 | this.parentData.motherCellNo = this.parentData.motherCellNo; |
2333 | let addparentDetails = { | 2340 | let addparentDetails = { |
2334 | email: this.parentData.email, | 2341 | email: this.parentData.email, |
2335 | fatherName: this.parentData.fatherName, | 2342 | fatherName: this.parentData.fatherName, |
2336 | fatherCellNo: this.parentData.fatherCellNo, | 2343 | fatherCellNo: this.parentData.fatherCellNo, |
2337 | motherName: this.parentData.motherName, | 2344 | motherName: this.parentData.motherName, |
2338 | motherCellNo: this.parentData.motherCellNo, | 2345 | motherCellNo: this.parentData.motherCellNo, |
2339 | fatherProfession: this.parentData.fatherProfession, | 2346 | fatherProfession: this.parentData.fatherProfession, |
2340 | motherProfession: this.parentData.motherProfession, | 2347 | motherProfession: this.parentData.motherProfession, |
2341 | password: this.parentData.password, | 2348 | password: this.parentData.password, |
2342 | role: "PARENT" | 2349 | role: "PARENT" |
2343 | }; | 2350 | }; |
2344 | this.loading = true; | 2351 | this.loading = true; |
2345 | http() | 2352 | http() |
2346 | .post("/createParent", addparentDetails) | 2353 | .post("/createParent", addparentDetails) |
2347 | .then(response => { | 2354 | .then(response => { |
2348 | this.parentId = response.data.data.id; | 2355 | this.parentId = response.data.data.id; |
2349 | this.e2 = 2; | 2356 | this.e2 = 2; |
2350 | this.snackbar = true; | 2357 | this.snackbar = true; |
2351 | this.text = response.data.message; | 2358 | this.text = response.data.message; |
2352 | this.color = "green"; | 2359 | this.color = "green"; |
2353 | // this.getStudentList(); | 2360 | // this.getStudentList(); |
2354 | this.clear(); | 2361 | this.clear(); |
2355 | this.loading = false; | 2362 | this.loading = false; |
2356 | }) | 2363 | }) |
2357 | .catch(error => { | 2364 | .catch(error => { |
2358 | this.snackbar = true; | 2365 | this.snackbar = true; |
2359 | this.text = error.response.data.message; | 2366 | this.text = error.response.data.message; |
2360 | this.color = "error"; | 2367 | this.color = "error"; |
2361 | if (error.response.data.statusText) { | 2368 | if (error.response.data.statusText) { |
2362 | this.text = error.response.data.statusText; | 2369 | this.text = error.response.data.statusText; |
2363 | } | 2370 | } |
2364 | this.loading = false; | 2371 | this.loading = false; |
2365 | }); | 2372 | }); |
2366 | } | 2373 | } |
2367 | }, | 2374 | }, |
2368 | getParentDetails() { | 2375 | getParentDetails() { |
2376 | console.log("AYYYYYYYYYYYYYYYYYYAAAAAAAAAAAAAAA"); | ||
2369 | if (this.parentData.fatherCellNo.length > 9) { | 2377 | if (this.parentData.fatherCellNo.length > 9) { |
2370 | this.showLoader = true; | 2378 | this.showLoader = true; |
2371 | http() | 2379 | http() |
2372 | .get("getParticularParent", { | 2380 | .get("getParticularParent", { |
2373 | params: { fatherCellNo: this.parentData.fatherCellNo }, | 2381 | params: { fatherCellNo: this.parentData.fatherCellNo }, |
2374 | headers: { | 2382 | headers: { |
2375 | Authorization: "Bearer " + this.$store.state.token | 2383 | Authorization: "Bearer " + this.$store.state.token |
2376 | } | 2384 | } |
2377 | }) | 2385 | }) |
2378 | .then(response => { | 2386 | .then(response => { |
2379 | this.showNext = true; | 2387 | this.showNext = true; |
2380 | this.showParent = false; | 2388 | this.showParent = false; |
2381 | this.parentData = response.data.data; | 2389 | this.parentData = response.data.data; |
2382 | this.parentId = response.data.data._id; | 2390 | this.parentId = response.data.data._id; |
2383 | this.showLoader = false; | 2391 | this.showLoader = false; |
2384 | }) | 2392 | }) |
2385 | .catch(error => { | 2393 | .catch(error => { |
2386 | console.log("err====>", error.response.data.message); | 2394 | console.log("err====>", error.response.data.message); |
2387 | this.text = error.response.data.message; | 2395 | this.text = error.response.data.message; |
2388 | this.snackbar = true; | 2396 | this.snackbar = true; |
2389 | if (this.text === "Data not found!") { | 2397 | if (this.text === "Data not found!") { |
2390 | this.showNext = false; | 2398 | this.showNext = false; |
2391 | this.showParent = true; | 2399 | this.showParent = true; |
2392 | this.parentData.email = ""; | 2400 | this.parentData.email = ""; |
2393 | this.parentData.fatherName = ""; | 2401 | this.parentData.fatherName = ""; |
2394 | this.parentData.motherName = ""; | 2402 | this.parentData.motherName = ""; |
2395 | this.parentData.motherCellNo = ""; | 2403 | this.parentData.motherCellNo = ""; |
2396 | this.parentData.fatherProfession = ""; | 2404 | this.parentData.fatherProfession = ""; |
2397 | this.parentData.motherProfession = ""; | 2405 | this.parentData.motherProfession = ""; |
2398 | this.parentData.password = ""; | 2406 | this.parentData.password = ""; |
2399 | } | 2407 | } |
2400 | this.showLoader = false; | 2408 | this.showLoader = false; |
2401 | }); | 2409 | }); |
2402 | } | 2410 | } |
2403 | }, | 2411 | }, |
2404 | suspendStudentStatus(status, id) { | 2412 | suspendStudentStatus(status, id) { |
2405 | let suspendStudentData = { | 2413 | let suspendStudentData = { |
2406 | studentId: id, | 2414 | studentId: id, |
2407 | status: status | 2415 | status: status |
2408 | }; | 2416 | }; |
2409 | http() | 2417 | http() |
2410 | .put("/suspendStudentAccount", suspendStudentData) | 2418 | .put("/suspendStudentAccount", suspendStudentData) |
2411 | .then(response => { | 2419 | .then(response => { |
2412 | this.findStudents(); | 2420 | this.findStudents(); |
2413 | this.text = response.data.message; | 2421 | this.text = response.data.message; |
2414 | this.color = "green"; | 2422 | this.color = "green"; |
2415 | this.snackbar = true; | 2423 | this.snackbar = true; |
2416 | }) | 2424 | }) |
2417 | .catch(error => { | 2425 | .catch(error => { |
2418 | this.snackbar = true; | 2426 | this.snackbar = true; |
2419 | this.color = "error"; | 2427 | this.color = "error"; |
2420 | this.text = error.response.data.message; | 2428 | this.text = error.response.data.message; |
2421 | }); | 2429 | }); |
2422 | }, | 2430 | }, |
2423 | displaySearch() { | 2431 | displaySearch() { |
2424 | (this.show = false), (this.showSearch = true); | 2432 | (this.show = false), (this.showSearch = true); |
2425 | }, | 2433 | }, |
2426 | closeSearch() { | 2434 | closeSearch() { |
2427 | this.showSearch = false; | 2435 | this.showSearch = false; |
2428 | this.show = true; | 2436 | this.show = true; |
2429 | this.search = ""; | 2437 | this.search = ""; |
2430 | } | 2438 | } |
2431 | }, | 2439 | }, |
2432 | mounted() { | 2440 | mounted() { |
2433 | const getCountryList = countryList(); | 2441 | const getCountryList = countryList(); |
2434 | this.role = this.$store.state.role; | 2442 | this.role = this.$store.state.role; |
2435 | this.countries = getCountryList; | 2443 | this.countries = getCountryList; |
2436 | var token = this.$store.state.token; | 2444 | var token = this.$store.state.token; |
2437 | http() | 2445 | http() |
2438 | .get("/getClassesList", { | 2446 | .get("/getClassesList", { |
2439 | headers: { Authorization: "Bearer " + token } | 2447 | headers: { Authorization: "Bearer " + token } |
2440 | }) | 2448 | }) |
2441 | .then(response => { | 2449 | .then(response => { |
2442 | this.addclass = response.data.data; | 2450 | this.addclass = response.data.data; |
2443 | }) | 2451 | }) |
2444 | .catch(error => { | 2452 | .catch(error => { |
2445 | this.showLoader = false; | 2453 | this.showLoader = false; |
2446 | if (error.response.status === 401) { | 2454 | if (error.response.status === 401) { |
2447 | this.$router.replace({ path: "/" }); | 2455 | this.$router.replace({ path: "/" }); |
2448 | this.$store.dispatch("setToken", null); | 2456 | this.$store.dispatch("setToken", null); |
2449 | this.$store.dispatch("Id", null); | 2457 | this.$store.dispatch("Id", null); |
2450 | this.$store.dispatch("Role", null); | 2458 | this.$store.dispatch("Role", null); |
2451 | } | 2459 | } |
2452 | }); | 2460 | }); |
2453 | } | 2461 | } |
2454 | }; | 2462 | }; |
2455 | </script> | 2463 | </script> |
2456 | <style scoped> | 2464 | <style scoped> |
2457 | .active { | 2465 | .active { |
src/pages/changeStudents/changeStudents.vue
File was created | 1 | <template> | |
2 | <v-app id="login"> | ||
3 | <v-container fluid fill-height> | ||
4 | <v-layout> | ||
5 | <v-flex xs12 sm8 md8 lg5 offset-sm2 offset-lg3 class="mt-5"> | ||
6 | <v-card flat class="card-style pa-2" dark id="form"> | ||
7 | <v-layout> | ||
8 | <v-flex xs12> | ||
9 | <label class="title text-xs-center">Change Student</label> | ||
10 | </v-flex> | ||
11 | </v-layout> | ||
12 | <v-card-text> | ||
13 | <v-flex xs12 sm8 md8 lg8 offset-sm2> | ||
14 | <v-form class="mt-3"> | ||
15 | <v-select | ||
16 | :items="studentsData" | ||
17 | item-text="name" | ||
18 | item-value="_id" | ||
19 | v-model="changeStudent" | ||
20 | label="Students" | ||
21 | ></v-select> | ||
22 | </v-form> | ||
23 | </v-flex> | ||
24 | </v-card-text> | ||
25 | <v-card-actions> | ||
26 | <v-flex text-xs-center> | ||
27 | <v-btn round dark :loading="loading" @click="change" class="add-button">Change</v-btn> | ||
28 | </v-flex> | ||
29 | </v-card-actions> | ||
30 | <v-snackbar | ||
31 | :timeout="timeout" | ||
32 | :top="y === 'top'" | ||
33 | :right="x === 'right'" | ||
34 | :vertical="mode === 'vertical'" | ||
35 | v-model="snackbar" | ||
36 | :color="color" | ||
37 | >{{ text }}</v-snackbar> | ||
38 | </v-card> | ||
39 | </v-flex> | ||
40 | </v-layout> | ||
41 | </v-container> | ||
42 | </v-app> | ||
43 | </template> | ||
44 | <script> | ||
45 | import http from "@/Services/http.js"; | ||
46 | |||
47 | export default { | ||
48 | data() { | ||
49 | return { | ||
50 | snackbar: false, | ||
51 | y: "top", | ||
52 | x: "right", | ||
53 | mode: "", | ||
54 | timeout: 4000, | ||
55 | text: "", | ||
56 | loading: false, | ||
57 | valid: false, | ||
58 | changeStudent: {}, | ||
59 | studentsData: [] | ||
60 | }; | ||
61 | }, | ||
62 | mounted() { | ||
63 | this.getparentStudents(); | ||
64 | }, | ||
65 | methods: { | ||
66 | change() { | ||
67 | console.log("changeStudent", this.changeStudent); | ||
68 | localStorage.setItem("parentStudentId", this.changeStudent); | ||
69 | this.$router.replace({ path: "/" }); | ||
70 | }, | ||
71 | getparentStudents() { | ||
72 | this.showLoader = true; | ||
73 | http() | ||
74 | .get("/parentStudentsList") | ||
75 | .then(response => { | ||
76 | // console.log("resssssss", response.data.data.students[0].classId); | ||
77 | this.studentsData = response.data.data.students; | ||
78 | localStorage.setItem( | ||
79 | "parentClassId", | ||
80 | response.data.data.students[0].classId | ||
81 | ); | ||
82 | this.showLoader = false; | ||
83 | }) | ||
84 | .catch(err => { | ||
85 | console.log("err====>", err); | ||
86 | this.showLoader = false; | ||
87 | }); | ||
88 | } | ||
89 | }, | ||
90 | computed: { | ||
91 | color() { | ||
92 | return this.loading ? "success" : "error"; | ||
93 | } | ||
94 | } | ||
95 | }; | ||
96 | </script> | ||
97 | <style scoped> | ||
98 | img { | ||
99 | position: absolute; | ||
100 | top: 13px; | ||
101 | left: 50px; | ||
102 | } | ||
103 | .v-btn--large { | ||
104 | padding: 0px 74px; | ||
105 | } | ||
106 | @media screen and (max-width: 769px) { | ||
107 | .v-btn--large { | ||
108 | font-size: 14px; | ||
109 | height: 44px; | ||
110 | padding: 0 32px; | ||
111 | } | ||
112 | } | ||
113 | </style> | ||
114 |
src/router/paths.js
1 | export default [{ | 1 | export default [{ |
2 | path: '*', | 2 | path: '*', |
3 | meta: { | 3 | meta: { |
4 | public: true, | 4 | public: true, |
5 | }, | 5 | }, |
6 | redirect: { | 6 | redirect: { |
7 | path: '/404' | 7 | path: '/404' |
8 | } | 8 | } |
9 | }, | 9 | }, |
10 | { | 10 | { |
11 | path: '/404', | 11 | path: '/404', |
12 | meta: { | 12 | meta: { |
13 | public: true, | 13 | public: true, |
14 | }, | 14 | }, |
15 | name: 'NotFound', | 15 | name: 'NotFound', |
16 | component: () => | 16 | component: () => |
17 | import ( | 17 | import ( |
18 | /* webpackChunkName: "routes" */ | 18 | /* webpackChunkName: "routes" */ |
19 | /* webpackMode: "lazy-once" */ | 19 | /* webpackMode: "lazy-once" */ |
20 | `@/pages/NotFound/NotFound.vue` | 20 | `@/pages/NotFound/NotFound.vue` |
21 | ) | 21 | ) |
22 | }, | 22 | }, |
23 | { | 23 | { |
24 | path: '*', | 24 | path: '*', |
25 | meta: {}, | 25 | meta: {}, |
26 | name: 'dashboardAdmin', | 26 | name: 'dashboardAdmin', |
27 | props: (route) => ({ type: route.query.type }), | 27 | props: (route) => ({ type: route.query.type }), |
28 | component: () => | 28 | component: () => |
29 | import ( | 29 | import ( |
30 | /* webpackChunkName: "routes" */ | 30 | /* webpackChunkName: "routes" */ |
31 | /* webpackMode: "lazy-once" */ | 31 | /* webpackMode: "lazy-once" */ |
32 | `@/pages/Dashboard/dashboard.vue` | 32 | `@/pages/Dashboard/dashboard.vue` |
33 | ) | 33 | ) |
34 | }, | 34 | }, |
35 | { | 35 | { |
36 | path: '/500', | 36 | path: '/500', |
37 | meta: { | 37 | meta: { |
38 | public: true, | 38 | public: true, |
39 | }, | 39 | }, |
40 | name: 'ServerError', | 40 | name: 'ServerError', |
41 | component: () => | 41 | component: () => |
42 | import ( | 42 | import ( |
43 | /* webpackChunkName: "routes" */ | 43 | /* webpackChunkName: "routes" */ |
44 | /* webpackMode: "lazy-once" */ | 44 | /* webpackMode: "lazy-once" */ |
45 | `@/pages/NotFound/Error.vue` | 45 | `@/pages/NotFound/Error.vue` |
46 | ) | 46 | ) |
47 | }, | 47 | }, |
48 | { | 48 | { |
49 | path: '/changepassword', | 49 | path: '/changepassword', |
50 | meta: {}, | 50 | meta: {}, |
51 | name: 'changepassword', | 51 | name: 'changepassword', |
52 | props: (route) => ({ type: route.query.type }), | 52 | props: (route) => ({ type: route.query.type }), |
53 | component: () => | 53 | component: () => |
54 | import ( | 54 | import ( |
55 | /* webpackChunkName: "routes" */ | 55 | /* webpackChunkName: "routes" */ |
56 | /* webpackMode: "lazy-once" */ | 56 | /* webpackMode: "lazy-once" */ |
57 | `@/pages/Authentication/changepassword.vue` | 57 | `@/pages/Authentication/changepassword.vue` |
58 | ) | 58 | ) |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | path: '/teachers', | 61 | path: '/teachers', |
62 | meta: { breadcrumb: false }, | 62 | meta: { breadcrumb: false }, |
63 | name: 'Teachers', | 63 | name: 'Teachers', |
64 | component: () => | 64 | component: () => |
65 | import ( | 65 | import ( |
66 | /* webpackChunkName: "routes" */ | 66 | /* webpackChunkName: "routes" */ |
67 | /* webpackMode: "lazy-once" */ | 67 | /* webpackMode: "lazy-once" */ |
68 | `@/pages/Teachers/teachers.vue` | 68 | `@/pages/Teachers/teachers.vue` |
69 | ) | 69 | ) |
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | path: '/', | 72 | path: '/', |
73 | meta: { | 73 | meta: { |
74 | public: true, | 74 | public: true, |
75 | }, | 75 | }, |
76 | name: 'Login', | 76 | name: 'Login', |
77 | component: () => | 77 | component: () => |
78 | import ( | 78 | import ( |
79 | /* webpackChunkName: "routes" */ | 79 | /* webpackChunkName: "routes" */ |
80 | /* webpackMode: "lazy-once" */ | 80 | /* webpackMode: "lazy-once" */ |
81 | `@/pages/Authentication/Login.vue` | 81 | `@/pages/Authentication/Login.vue` |
82 | ) | 82 | ) |
83 | }, | 83 | }, |
84 | { | 84 | { |
85 | path: '/forgetpassword', | 85 | path: '/forgetpassword', |
86 | meta: { | 86 | meta: { |
87 | public: true, | 87 | public: true, |
88 | }, | 88 | }, |
89 | name: 'forgetpassword', | 89 | name: 'forgetpassword', |
90 | component: () => | 90 | component: () => |
91 | import ( | 91 | import ( |
92 | /* webpackChunkName: "routes" */ | 92 | /* webpackChunkName: "routes" */ |
93 | /* webpackMode: "lazy-once" */ | 93 | /* webpackMode: "lazy-once" */ |
94 | `@/pages/Authentication/forgetpassword.vue` | 94 | `@/pages/Authentication/forgetpassword.vue` |
95 | ) | 95 | ) |
96 | }, | 96 | }, |
97 | { | 97 | { |
98 | path: '/students', | 98 | path: '/students', |
99 | meta: {}, | 99 | meta: {}, |
100 | name: 'Students', | 100 | name: 'Students', |
101 | props: (route) => ({ type: route.query.type }), | 101 | props: (route) => ({ type: route.query.type }), |
102 | component: () => | 102 | component: () => |
103 | import ( | 103 | import ( |
104 | /* webpackChunkName: "routes" */ | 104 | /* webpackChunkName: "routes" */ |
105 | /* webpackMode: "lazy-once" */ | 105 | /* webpackMode: "lazy-once" */ |
106 | `@/pages/Students/students.vue` | 106 | `@/pages/Students/students.vue` |
107 | ) | 107 | ) |
108 | }, | 108 | }, |
109 | { | 109 | { |
110 | path: '/class', | 110 | path: '/class', |
111 | meta: {}, | 111 | meta: {}, |
112 | name: 'Class', | 112 | name: 'Class', |
113 | props: (route) => ({ type: route.query.type }), | 113 | props: (route) => ({ type: route.query.type }), |
114 | component: () => | 114 | component: () => |
115 | import ( | 115 | import ( |
116 | /* webpackChunkName: "routes" */ | 116 | /* webpackChunkName: "routes" */ |
117 | /* webpackMode: "lazy-once" */ | 117 | /* webpackMode: "lazy-once" */ |
118 | `@/pages/Class/addclass.vue` | 118 | `@/pages/Class/addclass.vue` |
119 | ) | 119 | ) |
120 | }, | 120 | }, |
121 | { | 121 | { |
122 | path: '/section', | 122 | path: '/section', |
123 | meta: {}, | 123 | meta: {}, |
124 | name: 'Section', | 124 | name: 'Section', |
125 | props: (route) => ({ type: route.query.type }), | 125 | props: (route) => ({ type: route.query.type }), |
126 | component: () => | 126 | component: () => |
127 | import ( | 127 | import ( |
128 | /* webpackChunkName: "routes" */ | 128 | /* webpackChunkName: "routes" */ |
129 | /* webpackMode: "lazy-once" */ | 129 | /* webpackMode: "lazy-once" */ |
130 | `@/pages/Section/section.vue` | 130 | `@/pages/Section/section.vue` |
131 | ) | 131 | ) |
132 | }, | 132 | }, |
133 | { | 133 | { |
134 | path: '/noticeBoard', | 134 | path: '/noticeBoard', |
135 | meta: {}, | 135 | meta: {}, |
136 | name: 'Notice Board', | 136 | name: 'Notice Board', |
137 | props: (route) => ({ type: route.query.type }), | 137 | props: (route) => ({ type: route.query.type }), |
138 | component: () => | 138 | component: () => |
139 | import ( | 139 | import ( |
140 | /* webpackChunkName: "routes" */ | 140 | /* webpackChunkName: "routes" */ |
141 | /* webpackMode: "lazy-once" */ | 141 | /* webpackMode: "lazy-once" */ |
142 | `@/pages/NoticeBoard/noticeBoard.vue` | 142 | `@/pages/NoticeBoard/noticeBoard.vue` |
143 | ) | 143 | ) |
144 | }, | 144 | }, |
145 | { | 145 | { |
146 | path: '/news', | 146 | path: '/news', |
147 | meta: {}, | 147 | meta: {}, |
148 | name: 'News', | 148 | name: 'News', |
149 | props: (route) => ({ type: route.query.type }), | 149 | props: (route) => ({ type: route.query.type }), |
150 | component: () => | 150 | component: () => |
151 | import ( | 151 | import ( |
152 | /* webpackChunkName: "routes" */ | 152 | /* webpackChunkName: "routes" */ |
153 | /* webpackMode: "lazy-once" */ | 153 | /* webpackMode: "lazy-once" */ |
154 | `@/pages/News/news.vue` | 154 | `@/pages/News/news.vue` |
155 | ) | 155 | ) |
156 | }, | 156 | }, |
157 | // { | 157 | // { |
158 | // path: '/reminder', | 158 | // path: '/reminder', |
159 | // meta: { }, | 159 | // meta: { }, |
160 | // name: 'reminder', | 160 | // name: 'reminder', |
161 | // props: (route) => ({ type: route.query.type }), | 161 | // props: (route) => ({ type: route.query.type }), |
162 | // component: () => import( | 162 | // component: () => import( |
163 | // /* webpackChunkName: "routes" */ | 163 | // /* webpackChunkName: "routes" */ |
164 | // /* webpackMode: "lazy-once" */ | 164 | // /* webpackMode: "lazy-once" */ |
165 | // `@/pages/Reminder/reminder.vue` | 165 | // `@/pages/Reminder/reminder.vue` |
166 | // ) | 166 | // ) |
167 | // }, | 167 | // }, |
168 | { | 168 | { |
169 | path: '/timeTable', | 169 | path: '/timeTable', |
170 | meta: {}, | 170 | meta: {}, |
171 | name: 'Time Table', | 171 | name: 'Time Table', |
172 | props: (route) => ({ type: route.query.type }), | 172 | props: (route) => ({ type: route.query.type }), |
173 | component: () => | 173 | component: () => |
174 | import ( | 174 | import ( |
175 | /* webpackChunkName: "routes" */ | 175 | /* webpackChunkName: "routes" */ |
176 | /* webpackMode: "lazy-once" */ | 176 | /* webpackMode: "lazy-once" */ |
177 | `@/pages/TimeTable/timeTable.vue` | 177 | `@/pages/TimeTable/timeTable.vue` |
178 | ) | 178 | ) |
179 | }, | 179 | }, |
180 | { | 180 | { |
181 | path: '/notification', | 181 | path: '/notification', |
182 | meta: {}, | 182 | meta: {}, |
183 | name: 'Notification', | 183 | name: 'Notification', |
184 | props: (route) => ({ type: route.query.type }), | 184 | props: (route) => ({ type: route.query.type }), |
185 | component: () => | 185 | component: () => |
186 | import ( | 186 | import ( |
187 | /* webpackChunkName: "routes" */ | 187 | /* webpackChunkName: "routes" */ |
188 | /* webpackMode: "lazy-once" */ | 188 | /* webpackMode: "lazy-once" */ |
189 | `@/pages/Notification/notification.vue` | 189 | `@/pages/Notification/notification.vue` |
190 | ) | 190 | ) |
191 | }, | 191 | }, |
192 | { | 192 | { |
193 | path: '/parents', | 193 | path: '/parents', |
194 | meta: {}, | 194 | meta: {}, |
195 | name: 'Parents', | 195 | name: 'Parents', |
196 | props: (route) => ({ type: route.query.type }), | 196 | props: (route) => ({ type: route.query.type }), |
197 | component: () => | 197 | component: () => |
198 | import ( | 198 | import ( |
199 | /* webpackChunkName: "routes" */ | 199 | /* webpackChunkName: "routes" */ |
200 | /* webpackMode: "lazy-once" */ | 200 | /* webpackMode: "lazy-once" */ |
201 | `@/pages/Parent/parents.vue` | 201 | `@/pages/Parent/parents.vue` |
202 | ) | 202 | ) |
203 | }, | 203 | }, |
204 | // { | 204 | // { |
205 | // path: '/subject', | 205 | // path: '/subject', |
206 | // meta: {}, | 206 | // meta: {}, |
207 | // name: 'Subject', | 207 | // name: 'Subject', |
208 | // props: (route) => ({ type: route.query.type }), | 208 | // props: (route) => ({ type: route.query.type }), |
209 | // component: () => | 209 | // component: () => |
210 | // import ( | 210 | // import ( |
211 | // /* webpackChunkName: "routes" */ | 211 | // /* webpackChunkName: "routes" */ |
212 | // /* webpackMode: "lazy-once" */ | 212 | // /* webpackMode: "lazy-once" */ |
213 | // `@/pages/Subjects/subjects.vue` | 213 | // `@/pages/Subjects/subjects.vue` |
214 | // ) | 214 | // ) |
215 | // }, | 215 | // }, |
216 | { | 216 | { |
217 | path: '/dashboard', | 217 | path: '/dashboard', |
218 | meta: {}, | 218 | meta: {}, |
219 | name: 'Dashboard', | 219 | name: 'Dashboard', |
220 | props: (route) => ({ type: route.query.type }), | 220 | props: (route) => ({ type: route.query.type }), |
221 | component: () => | 221 | component: () => |
222 | import ( | 222 | import ( |
223 | /* webpackChunkName: "routes" */ | 223 | /* webpackChunkName: "routes" */ |
224 | /* webpackMode: "lazy-once" */ | 224 | /* webpackMode: "lazy-once" */ |
225 | `@/pages/Dashboard/dashboard.vue` | 225 | `@/pages/Dashboard/dashboard.vue` |
226 | ) | 226 | ) |
227 | }, | 227 | }, |
228 | { | 228 | { |
229 | path: '/socialMedia', | 229 | path: '/socialMedia', |
230 | meta: {}, | 230 | meta: {}, |
231 | name: 'Social Media', | 231 | name: 'Social Media', |
232 | props: (route) => ({ type: route.query.type }), | 232 | props: (route) => ({ type: route.query.type }), |
233 | component: () => | 233 | component: () => |
234 | import ( | 234 | import ( |
235 | /* webpackChunkName: "routes" */ | 235 | /* webpackChunkName: "routes" */ |
236 | /* webpackMode: "lazy-once" */ | 236 | /* webpackMode: "lazy-once" */ |
237 | `@/pages/socialMedia/socialMedia.vue` | 237 | `@/pages/socialMedia/socialMedia.vue` |
238 | ) | 238 | ) |
239 | }, | 239 | }, |
240 | { | 240 | { |
241 | path: '/gallery', | 241 | path: '/gallery', |
242 | meta: {}, | 242 | meta: {}, |
243 | name: 'Gallery', | 243 | name: 'Gallery', |
244 | props: (route) => ({ type: route.query.type }), | 244 | props: (route) => ({ type: route.query.type }), |
245 | component: () => | 245 | component: () => |
246 | import ( | 246 | import ( |
247 | /* webpackChunkName: "routes" */ | 247 | /* webpackChunkName: "routes" */ |
248 | /* webpackMode: "lazy-once" */ | 248 | /* webpackMode: "lazy-once" */ |
249 | `@/pages/Gallery/gallery.vue` | 249 | `@/pages/Gallery/gallery.vue` |
250 | ) | 250 | ) |
251 | }, | 251 | }, |
252 | { | 252 | { |
253 | path: '/event', | 253 | path: '/event', |
254 | meta: {}, | 254 | meta: {}, |
255 | name: 'Event', | 255 | name: 'Event', |
256 | props: (route) => ({ type: route.query.type }), | 256 | props: (route) => ({ type: route.query.type }), |
257 | component: () => | 257 | component: () => |
258 | import ( | 258 | import ( |
259 | /* webpackChunkName: "routes" */ | 259 | /* webpackChunkName: "routes" */ |
260 | /* webpackMode: "lazy-once" */ | 260 | /* webpackMode: "lazy-once" */ |
261 | `@/pages/Event/event.vue` | 261 | `@/pages/Event/event.vue` |
262 | ) | 262 | ) |
263 | }, | 263 | }, |
264 | { | 264 | { |
265 | path: '/holiday', | 265 | path: '/holiday', |
266 | meta: {}, | 266 | meta: {}, |
267 | name: 'Holiday', | 267 | name: 'Holiday', |
268 | props: (route) => ({ type: route.query.type }), | 268 | props: (route) => ({ type: route.query.type }), |
269 | component: () => | 269 | component: () => |
270 | import ( | 270 | import ( |
271 | /* webpackChunkName: "routes" */ | 271 | /* webpackChunkName: "routes" */ |
272 | /* webpackMode: "lazy-once" */ | 272 | /* webpackMode: "lazy-once" */ |
273 | `@/pages/Holiday/holiday.vue` | 273 | `@/pages/Holiday/holiday.vue` |
274 | ) | 274 | ) |
275 | }, | 275 | }, |
276 | { | 276 | { |
277 | path: '/user', | 277 | path: '/user', |
278 | meta: {}, | 278 | meta: {}, |
279 | name: 'User', | 279 | name: 'User', |
280 | props: (route) => ({ type: route.query.type }), | 280 | props: (route) => ({ type: route.query.type }), |
281 | component: () => | 281 | component: () => |
282 | import ( | 282 | import ( |
283 | /* webpackChunkName: "routes" */ | 283 | /* webpackChunkName: "routes" */ |
284 | /* webpackMode: "lazy-once" */ | 284 | /* webpackMode: "lazy-once" */ |
285 | `@/pages/User/user.vue` | 285 | `@/pages/User/user.vue` |
286 | ) | 286 | ) |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | path: '/AttendenceStudent', | 289 | path: '/AttendenceStudent', |
290 | meta: {}, | 290 | meta: {}, |
291 | name: 'Student Attendence', | 291 | name: 'Student Attendence', |
292 | props: (route) => ({ type: route.query.type }), | 292 | props: (route) => ({ type: route.query.type }), |
293 | component: () => | 293 | component: () => |
294 | import ( | 294 | import ( |
295 | /* webpackChunkName: "routes" */ | 295 | /* webpackChunkName: "routes" */ |
296 | /* webpackMode: "lazy-once" */ | 296 | /* webpackMode: "lazy-once" */ |
297 | `@/pages/Attendence/studentAttendence.vue` | 297 | `@/pages/Attendence/studentAttendence.vue` |
298 | ) | 298 | ) |
299 | }, | 299 | }, |
300 | { | 300 | { |
301 | path: '/AttendenceTeacher', | 301 | path: '/AttendenceTeacher', |
302 | meta: {}, | 302 | meta: {}, |
303 | name: 'Teacher Attendence', | 303 | name: 'Teacher Attendence', |
304 | props: (route) => ({ type: route.query.type }), | 304 | props: (route) => ({ type: route.query.type }), |
305 | component: () => | 305 | component: () => |
306 | import ( | 306 | import ( |
307 | /* webpackChunkName: "routes" */ | 307 | /* webpackChunkName: "routes" */ |
308 | /* webpackMode: "lazy-once" */ | 308 | /* webpackMode: "lazy-once" */ |
309 | `@/pages/Attendence/teacherAttendence.vue` | 309 | `@/pages/Attendence/teacherAttendence.vue` |
310 | ) | 310 | ) |
311 | }, | 311 | }, |
312 | { | 312 | { |
313 | path: '/salaryTemplate', | 313 | path: '/salaryTemplate', |
314 | meta: {}, | 314 | meta: {}, |
315 | name: 'Salary Template', | 315 | name: 'Salary Template', |
316 | props: (route) => ({ type: route.query.type }), | 316 | props: (route) => ({ type: route.query.type }), |
317 | component: () => | 317 | component: () => |
318 | import ( | 318 | import ( |
319 | `@/pages/Payroll/salaryTemplate.vue` | 319 | `@/pages/Payroll/salaryTemplate.vue` |
320 | ) | 320 | ) |
321 | }, | 321 | }, |
322 | { | 322 | { |
323 | path: '/hourlyTemplate', | 323 | path: '/hourlyTemplate', |
324 | meta: {}, | 324 | meta: {}, |
325 | name: 'Hourly Template', | 325 | name: 'Hourly Template', |
326 | props: (route) => ({ type: route.query.type }), | 326 | props: (route) => ({ type: route.query.type }), |
327 | component: () => | 327 | component: () => |
328 | import ( | 328 | import ( |
329 | `@/pages/Payroll/hourlyTemplate.vue` | 329 | `@/pages/Payroll/hourlyTemplate.vue` |
330 | ) | 330 | ) |
331 | }, | 331 | }, |
332 | { | 332 | { |
333 | path: '/manageSalary', | 333 | path: '/manageSalary', |
334 | meta: {}, | 334 | meta: {}, |
335 | name: 'Manage Salary', | 335 | name: 'Manage Salary', |
336 | props: (route) => ({ type: route.query.type }), | 336 | props: (route) => ({ type: route.query.type }), |
337 | component: () => | 337 | component: () => |
338 | import ( | 338 | import ( |
339 | `@/pages/Payroll/manageSalary.vue` | 339 | `@/pages/Payroll/manageSalary.vue` |
340 | ) | 340 | ) |
341 | }, | 341 | }, |
342 | // { | 342 | // { |
343 | // path: '/makePayment', | 343 | // path: '/makePayment', |
344 | // meta: {}, | 344 | // meta: {}, |
345 | // name: 'Make Payment', | 345 | // name: 'Make Payment', |
346 | // props: (route) => ({ type: route.query.type }), | 346 | // props: (route) => ({ type: route.query.type }), |
347 | // component: () => | 347 | // component: () => |
348 | // import ( | 348 | // import ( |
349 | // `@/pages/Payroll/makePayment.vue` | 349 | // `@/pages/Payroll/makePayment.vue` |
350 | // ) | 350 | // ) |
351 | // }, | 351 | // }, |
352 | { | 352 | { |
353 | path: '/AttendenceUser', | 353 | path: '/AttendenceUser', |
354 | meta: {}, | 354 | meta: {}, |
355 | name: 'User Attendence', | 355 | name: 'User Attendence', |
356 | props: (route) => ({ type: route.query.type }), | 356 | props: (route) => ({ type: route.query.type }), |
357 | component: () => | 357 | component: () => |
358 | import ( | 358 | import ( |
359 | /* webpackChunkName: "routes" */ | 359 | /* webpackChunkName: "routes" */ |
360 | /* webpackMode: "lazy-once" */ | 360 | /* webpackMode: "lazy-once" */ |
361 | `@/pages/Attendence/userAttendence.vue` | 361 | `@/pages/Attendence/userAttendence.vue` |
362 | ) | 362 | ) |
363 | }, | 363 | }, |
364 | { | 364 | { |
365 | path: '/feeTypes', | 365 | path: '/feeTypes', |
366 | meta: {}, | 366 | meta: {}, |
367 | name: 'Fee Types', | 367 | name: 'Fee Types', |
368 | props: (route) => ({ type: route.query.type }), | 368 | props: (route) => ({ type: route.query.type }), |
369 | component: () => | 369 | component: () => |
370 | import ( | 370 | import ( |
371 | /* webpackChunkName: "routes" */ | 371 | /* webpackChunkName: "routes" */ |
372 | /* webpackMode: "lazy-once" */ | 372 | /* webpackMode: "lazy-once" */ |
373 | `@/pages/Account/feeTypes.vue` | 373 | `@/pages/Account/feeTypes.vue` |
374 | ) | 374 | ) |
375 | }, | 375 | }, |
376 | { | 376 | { |
377 | path: '/invoice', | 377 | path: '/invoice', |
378 | meta: {}, | 378 | meta: {}, |
379 | name: 'Invoice', | 379 | name: 'Invoice', |
380 | props: (route) => ({ type: route.query.type }), | 380 | props: (route) => ({ type: route.query.type }), |
381 | component: () => | 381 | component: () => |
382 | import ( | 382 | import ( |
383 | /* webpackChunkName: "routes" */ | 383 | /* webpackChunkName: "routes" */ |
384 | /* webpackMode: "lazy-once" */ | 384 | /* webpackMode: "lazy-once" */ |
385 | `@/pages/Account/invoice.vue` | 385 | `@/pages/Account/invoice.vue` |
386 | ) | 386 | ) |
387 | }, | 387 | }, |
388 | { | 388 | { |
389 | path: '/paymentHistory', | 389 | path: '/paymentHistory', |
390 | meta: {}, | 390 | meta: {}, |
391 | name: 'Payment History', | 391 | name: 'Payment History', |
392 | props: (route) => ({ type: route.query.type }), | 392 | props: (route) => ({ type: route.query.type }), |
393 | component: () => | 393 | component: () => |
394 | import ( | 394 | import ( |
395 | /* webpackChunkName: "routes" */ | 395 | /* webpackChunkName: "routes" */ |
396 | /* webpackMode: "lazy-once" */ | 396 | /* webpackMode: "lazy-once" */ |
397 | `@/pages/Account/paymentHistory.vue` | 397 | `@/pages/Account/paymentHistory.vue` |
398 | ) | 398 | ) |
399 | }, | 399 | }, |
400 | { | 400 | { |
401 | path: '/expense', | 401 | path: '/expense', |
402 | meta: {}, | 402 | meta: {}, |
403 | name: 'Expense', | 403 | name: 'Expense', |
404 | props: (route) => ({ type: route.query.type }), | 404 | props: (route) => ({ type: route.query.type }), |
405 | component: () => | 405 | component: () => |
406 | import ( | 406 | import ( |
407 | /* webpackChunkName: "routes" */ | 407 | /* webpackChunkName: "routes" */ |
408 | /* webpackMode: "lazy-once" */ | 408 | /* webpackMode: "lazy-once" */ |
409 | `@/pages/Account/expense.vue` | 409 | `@/pages/Account/expense.vue` |
410 | ) | 410 | ) |
411 | }, | 411 | }, |
412 | { | 412 | { |
413 | path: '/income', | 413 | path: '/income', |
414 | meta: {}, | 414 | meta: {}, |
415 | name: 'Income', | 415 | name: 'Income', |
416 | props: (route) => ({ type: route.query.type }), | 416 | props: (route) => ({ type: route.query.type }), |
417 | component: () => | 417 | component: () => |
418 | import ( | 418 | import ( |
419 | /* webpackChunkName: "routes" */ | 419 | /* webpackChunkName: "routes" */ |
420 | /* webpackMode: "lazy-once" */ | 420 | /* webpackMode: "lazy-once" */ |
421 | `@/pages/Account/income.vue` | 421 | `@/pages/Account/income.vue` |
422 | ) | 422 | ) |
423 | }, | 423 | }, |
424 | { | 424 | { |
425 | path: '/libraryMember', | 425 | path: '/libraryMember', |
426 | meta: {}, | 426 | meta: {}, |
427 | name: 'Library Member', | 427 | name: 'Library Member', |
428 | props: (route) => ({ type: route.query.type }), | 428 | props: (route) => ({ type: route.query.type }), |
429 | component: () => | 429 | component: () => |
430 | import ( | 430 | import ( |
431 | /* webpackChunkName: "routes" */ | 431 | /* webpackChunkName: "routes" */ |
432 | /* webpackMode: "lazy-once" */ | 432 | /* webpackMode: "lazy-once" */ |
433 | `@/pages/Library/member.vue` | 433 | `@/pages/Library/member.vue` |
434 | ) | 434 | ) |
435 | }, | 435 | }, |
436 | { | 436 | { |
437 | path: '/books', | 437 | path: '/books', |
438 | meta: {}, | 438 | meta: {}, |
439 | name: 'Books', | 439 | name: 'Books', |
440 | props: (route) => ({ type: route.query.type }), | 440 | props: (route) => ({ type: route.query.type }), |
441 | component: () => | 441 | component: () => |
442 | import ( | 442 | import ( |
443 | /* webpackChunkName: "routes" */ | 443 | /* webpackChunkName: "routes" */ |
444 | /* webpackMode: "lazy-once" */ | 444 | /* webpackMode: "lazy-once" */ |
445 | `@/pages/Library/books.vue` | 445 | `@/pages/Library/books.vue` |
446 | ) | 446 | ) |
447 | }, | 447 | }, |
448 | { | 448 | { |
449 | path: '/issue', | 449 | path: '/issue', |
450 | meta: {}, | 450 | meta: {}, |
451 | name: 'Issue', | 451 | name: 'Issue', |
452 | props: (route) => ({ type: route.query.type }), | 452 | props: (route) => ({ type: route.query.type }), |
453 | component: () => | 453 | component: () => |
454 | import ( | 454 | import ( |
455 | /* webpackChunkName: "routes" */ | 455 | /* webpackChunkName: "routes" */ |
456 | /* webpackMode: "lazy-once" */ | 456 | /* webpackMode: "lazy-once" */ |
457 | `@/pages/Library/issue.vue` | 457 | `@/pages/Library/issue.vue` |
458 | ) | 458 | ) |
459 | }, | 459 | }, |
460 | { | 460 | { |
461 | path: '/e-books', | 461 | path: '/e-books', |
462 | meta: {}, | 462 | meta: {}, |
463 | name: 'E-Books', | 463 | name: 'E-Books', |
464 | props: (route) => ({ type: route.query.type }), | 464 | props: (route) => ({ type: route.query.type }), |
465 | component: () => | 465 | component: () => |
466 | import ( | 466 | import ( |
467 | /* webpackChunkName: "routes" */ | 467 | /* webpackChunkName: "routes" */ |
468 | /* webpackMode: "lazy-once" */ | 468 | /* webpackMode: "lazy-once" */ |
469 | `@/pages/Library/eBook.vue` | 469 | `@/pages/Library/eBook.vue` |
470 | ) | 470 | ) |
471 | }, | 471 | }, |
472 | { | 472 | { |
473 | path: '/editInvoice/:invoiceid', | 473 | path: '/editInvoice/:invoiceid', |
474 | meta: {}, | 474 | meta: {}, |
475 | name: 'Edit Invoice', | 475 | name: 'Edit Invoice', |
476 | // props: (route) => ({ type: route.query.type }), | 476 | // props: (route) => ({ type: route.query.type }), |
477 | component: () => | 477 | component: () => |
478 | import ( | 478 | import ( |
479 | /* webpackChunkName: "routes" */ | 479 | /* webpackChunkName: "routes" */ |
480 | /* webpackMode: "lazy-once" */ | 480 | /* webpackMode: "lazy-once" */ |
481 | `@/pages/Account/editInvoice.vue` | 481 | `@/pages/Account/editInvoice.vue` |
482 | ) | 482 | ) |
483 | }, | 483 | }, |
484 | { | 484 | { |
485 | path: '/StudentsAttendence/:id', | 485 | path: '/StudentsAttendence/:id', |
486 | meta: {}, | 486 | meta: {}, |
487 | name: 'View Students Attendence', | 487 | name: 'View Students Attendence', |
488 | props: (route) => ({ type: route.query.type }), | 488 | props: (route) => ({ type: route.query.type }), |
489 | component: () => | 489 | component: () => |
490 | import ( | 490 | import ( |
491 | /* webpackChunkName: "routes" */ | 491 | /* webpackChunkName: "routes" */ |
492 | /* webpackMode: "lazy-once" */ | 492 | /* webpackMode: "lazy-once" */ |
493 | `@/pages/Attendence/viewStudentsAttendence.vue` | 493 | `@/pages/Attendence/viewStudentsAttendence.vue` |
494 | ) | 494 | ) |
495 | }, | 495 | }, |
496 | { | 496 | { |
497 | path: '/TeacherAttendence/:teacherId', | 497 | path: '/TeacherAttendence/:teacherId', |
498 | meta: {}, | 498 | meta: {}, |
499 | name: 'View Teacher Attendence', | 499 | name: 'View Teacher Attendence', |
500 | props: (route) => ({ type: route.query.type }), | 500 | props: (route) => ({ type: route.query.type }), |
501 | component: () => | 501 | component: () => |
502 | import ( | 502 | import ( |
503 | /* webpackChunkName: "routes" */ | 503 | /* webpackChunkName: "routes" */ |
504 | /* webpackMode: "lazy-once" */ | 504 | /* webpackMode: "lazy-once" */ |
505 | `@/pages/Attendence/viewTeacherAttendence.vue` | 505 | `@/pages/Attendence/viewTeacherAttendence.vue` |
506 | ) | 506 | ) |
507 | }, | 507 | }, |
508 | { | 508 | { |
509 | path: '/viewInvoice/:viewInvoiceId', | 509 | path: '/viewInvoice/:viewInvoiceId', |
510 | meta: {}, | 510 | meta: {}, |
511 | name: 'View Invoice', | 511 | name: 'View Invoice', |
512 | props: (route) => ({ type: route.query.type }), | 512 | props: (route) => ({ type: route.query.type }), |
513 | component: () => | 513 | component: () => |
514 | import ( | 514 | import ( |
515 | /* webpackChunkName: "routes" */ | 515 | /* webpackChunkName: "routes" */ |
516 | /* webpackMode: "lazy-once" */ | 516 | /* webpackMode: "lazy-once" */ |
517 | `@/pages/Account/viewInvoice.vue` | 517 | `@/pages/Account/viewInvoice.vue` |
518 | ) | 518 | ) |
519 | }, | 519 | }, |
520 | { | 520 | { |
521 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', | 521 | path: '/viewPaymentInvoice/:viewPaymentInvoiceId', |
522 | meta: {}, | 522 | meta: {}, |
523 | name: 'View Payment Invoice', | 523 | name: 'View Payment Invoice', |
524 | props: (route) => ({ type: route.query.type }), | 524 | props: (route) => ({ type: route.query.type }), |
525 | component: () => | 525 | component: () => |
526 | import ( | 526 | import ( |
527 | /* webpackChunkName: "routes" */ | 527 | /* webpackChunkName: "routes" */ |
528 | /* webpackMode: "lazy-once" */ | 528 | /* webpackMode: "lazy-once" */ |
529 | `@/pages/Account/viewPaymentInvoice.vue` | 529 | `@/pages/Account/viewPaymentInvoice.vue` |
530 | ) | 530 | ) |
531 | }, | 531 | }, |
532 | { | 532 | { |
533 | path: '/globalPayment', | 533 | path: '/globalPayment', |
534 | meta: {}, | 534 | meta: {}, |
535 | name: 'Global Payment', | 535 | name: 'Global Payment', |
536 | props: (route) => ({ type: route.query.type }), | 536 | props: (route) => ({ type: route.query.type }), |
537 | component: () => | 537 | component: () => |
538 | import ( | 538 | import ( |
539 | /* webpackChunkName: "routes" */ | 539 | /* webpackChunkName: "routes" */ |
540 | /* webpackMode: "lazy-once" */ | 540 | /* webpackMode: "lazy-once" */ |
541 | `@/pages/Account/globalPayment.vue` | 541 | `@/pages/Account/globalPayment.vue` |
542 | ) | 542 | ) |
543 | }, | 543 | }, |
544 | { | 544 | { |
545 | path: '/exam', | 545 | path: '/exam', |
546 | meta: {}, | 546 | meta: {}, |
547 | name: 'Exam', | 547 | name: 'Exam', |
548 | props: (route) => ({ type: route.query.type }), | 548 | props: (route) => ({ type: route.query.type }), |
549 | component: () => | 549 | component: () => |
550 | import ( | 550 | import ( |
551 | /* webpackChunkName: "routes" */ | 551 | /* webpackChunkName: "routes" */ |
552 | /* webpackMode: "lazy-once" */ | 552 | /* webpackMode: "lazy-once" */ |
553 | `@/pages/Exam/exam.vue` | 553 | `@/pages/Exam/exam.vue` |
554 | ) | 554 | ) |
555 | }, | 555 | }, |
556 | { | 556 | { |
557 | path: '/grade', | 557 | path: '/grade', |
558 | meta: {}, | 558 | meta: {}, |
559 | name: 'Grade', | 559 | name: 'Grade', |
560 | props: (route) => ({ type: route.query.type }), | 560 | props: (route) => ({ type: route.query.type }), |
561 | component: () => | 561 | component: () => |
562 | import ( | 562 | import ( |
563 | /* webpackChunkName: "routes" */ | 563 | /* webpackChunkName: "routes" */ |
564 | /* webpackMode: "lazy-once" */ | 564 | /* webpackMode: "lazy-once" */ |
565 | `@/pages/Exam/grade.vue` | 565 | `@/pages/Exam/grade.vue` |
566 | ) | 566 | ) |
567 | }, | 567 | }, |
568 | { | 568 | { |
569 | path: '/examSchedule', | 569 | path: '/examSchedule', |
570 | meta: {}, | 570 | meta: {}, |
571 | name: 'Exam Schedule', | 571 | name: 'Exam Schedule', |
572 | props: (route) => ({ type: route.query.type }), | 572 | props: (route) => ({ type: route.query.type }), |
573 | component: () => | 573 | component: () => |
574 | import ( | 574 | import ( |
575 | /* webpackChunkName: "routes" */ | 575 | /* webpackChunkName: "routes" */ |
576 | /* webpackMode: "lazy-once" */ | 576 | /* webpackMode: "lazy-once" */ |
577 | `@/pages/Exam/examSchedule.vue` | 577 | `@/pages/Exam/examSchedule.vue` |
578 | ) | 578 | ) |
579 | }, | 579 | }, |
580 | { | 580 | { |
581 | path: '/examAttendence', | 581 | path: '/examAttendence', |
582 | meta: {}, | 582 | meta: {}, |
583 | name: 'Exam Attendence', | 583 | name: 'Exam Attendence', |
584 | props: (route) => ({ type: route.query.type }), | 584 | props: (route) => ({ type: route.query.type }), |
585 | component: () => | 585 | component: () => |
586 | import ( | 586 | import ( |
587 | /* webpackChunkName: "routes" */ | 587 | /* webpackChunkName: "routes" */ |
588 | /* webpackMode: "lazy-once" */ | 588 | /* webpackMode: "lazy-once" */ |
589 | `@/pages/Exam/examAttendence.vue` | 589 | `@/pages/Exam/examAttendence.vue` |
590 | ) | 590 | ) |
591 | }, | 591 | }, |
592 | { | 592 | { |
593 | path: '/mark', | 593 | path: '/mark', |
594 | meta: {}, | 594 | meta: {}, |
595 | name: 'Mark', | 595 | name: 'Mark', |
596 | props: (route) => ({ type: route.query.type }), | 596 | props: (route) => ({ type: route.query.type }), |
597 | component: () => | 597 | component: () => |
598 | import ( | 598 | import ( |
599 | /* webpackChunkName: "routes" */ | 599 | /* webpackChunkName: "routes" */ |
600 | /* webpackMode: "lazy-once" */ | 600 | /* webpackMode: "lazy-once" */ |
601 | `@/pages/Mark/mark.vue` | 601 | `@/pages/Mark/mark.vue` |
602 | ) | 602 | ) |
603 | }, | 603 | }, |
604 | { | 604 | { |
605 | path: '/viewMark/:markId', | 605 | path: '/viewMark/:markId', |
606 | meta: {}, | 606 | meta: {}, |
607 | name: 'view Mark', | 607 | name: 'view Mark', |
608 | props: (route) => ({ type: route.query.type }), | 608 | props: (route) => ({ type: route.query.type }), |
609 | component: () => | 609 | component: () => |
610 | import ( | 610 | import ( |
611 | /* webpackChunkName: "routes" */ | 611 | /* webpackChunkName: "routes" */ |
612 | /* webpackMode: "lazy-once" */ | 612 | /* webpackMode: "lazy-once" */ |
613 | `@/pages/Mark/viewMark.vue` | 613 | `@/pages/Mark/viewMark.vue` |
614 | ) | 614 | ) |
615 | }, | 615 | }, |
616 | { | 616 | { |
617 | path: '/markDistribution', | 617 | path: '/markDistribution', |
618 | meta: {}, | 618 | meta: {}, |
619 | name: 'Mark Distribution', | 619 | name: 'Mark Distribution', |
620 | props: (route) => ({ type: route.query.type }), | 620 | props: (route) => ({ type: route.query.type }), |
621 | component: () => | 621 | component: () => |
622 | import ( | 622 | import ( |
623 | /* webpackChunkName: "routes" */ | 623 | /* webpackChunkName: "routes" */ |
624 | /* webpackMode: "lazy-once" */ | 624 | /* webpackMode: "lazy-once" */ |
625 | `@/pages/Mark/markDistribution.vue` | 625 | `@/pages/Mark/markDistribution.vue` |
626 | ) | 626 | ) |
627 | }, | 627 | }, |
628 | { | 628 | { |
629 | path: '/meet', | 629 | path: '/meet', |
630 | meta: {}, | 630 | meta: {}, |
631 | name: 'Meet', | 631 | name: 'Meet', |
632 | props: (route) => ({ type: route.query.type }), | 632 | props: (route) => ({ type: route.query.type }), |
633 | component: () => | 633 | component: () => |
634 | import ( | 634 | import ( |
635 | /* webpackChunkName: "routes" */ | 635 | /* webpackChunkName: "routes" */ |
636 | /* webpackMode: "lazy-once" */ | 636 | /* webpackMode: "lazy-once" */ |
637 | `@/pages/Meet/meet.vue` | 637 | `@/pages/Meet/meet.vue` |
638 | ) | 638 | ) |
639 | }, | 639 | }, |
640 | { | 640 | { |
641 | path: '/academicYear', | 641 | path: '/academicYear', |
642 | meta: {}, | 642 | meta: {}, |
643 | name: 'Academic Year', | 643 | name: 'Academic Year', |
644 | props: (route) => ({ type: route.query.type }), | 644 | props: (route) => ({ type: route.query.type }), |
645 | component: () => | 645 | component: () => |
646 | import ( | 646 | import ( |
647 | /* webpackChunkName: "routes" */ | 647 | /* webpackChunkName: "routes" */ |
648 | /* webpackMode: "lazy-once" */ | 648 | /* webpackMode: "lazy-once" */ |
649 | `@/pages/Administrator/academicYear.vue` | 649 | `@/pages/Administrator/academicYear.vue` |
650 | ) | 650 | ) |
651 | }, | 651 | }, |
652 | { | 652 | { |
653 | path: '/systemAdmin', | 653 | path: '/systemAdmin', |
654 | meta: {}, | 654 | meta: {}, |
655 | name: 'System Admin', | 655 | name: 'System Admin', |
656 | props: (route) => ({ type: route.query.type }), | 656 | props: (route) => ({ type: route.query.type }), |
657 | component: () => | 657 | component: () => |
658 | import ( | 658 | import ( |
659 | /* webpackChunkName: "routes" */ | 659 | /* webpackChunkName: "routes" */ |
660 | /* webpackMode: "lazy-once" */ | 660 | /* webpackMode: "lazy-once" */ |
661 | `@/pages/Administrator/systemAdmin.vue` | 661 | `@/pages/Administrator/systemAdmin.vue` |
662 | ) | 662 | ) |
663 | }, | 663 | }, |
664 | { | 664 | { |
665 | path: '/resetPassword', | 665 | path: '/resetPassword', |
666 | meta: {}, | 666 | meta: {}, |
667 | name: 'Change Password', | 667 | name: 'Change Password', |
668 | props: (route) => ({ type: route.query.type }), | 668 | props: (route) => ({ type: route.query.type }), |
669 | component: () => | 669 | component: () => |
670 | import ( | 670 | import ( |
671 | /* webpackChunkName: "routes" */ | 671 | /* webpackChunkName: "routes" */ |
672 | /* webpackMode: "lazy-once" */ | 672 | /* webpackMode: "lazy-once" */ |
673 | `@/pages/Administrator/resetPassword.vue` | 673 | `@/pages/Administrator/resetPassword.vue` |
674 | ) | 674 | ) |
675 | }, | 675 | }, |
676 | { | 676 | { |
677 | path: '/role', | 677 | path: '/role', |
678 | meta: {}, | 678 | meta: {}, |
679 | name: 'Role', | 679 | name: 'Role', |
680 | props: (route) => ({ type: route.query.type }), | 680 | props: (route) => ({ type: route.query.type }), |
681 | component: () => | 681 | component: () => |
682 | import ( | 682 | import ( |
683 | /* webpackChunkName: "routes" */ | 683 | /* webpackChunkName: "routes" */ |
684 | /* webpackMode: "lazy-once" */ | 684 | /* webpackMode: "lazy-once" */ |
685 | `@/pages/Administrator/role.vue` | 685 | `@/pages/Administrator/role.vue` |
686 | ) | 686 | ) |
687 | }, | 687 | }, |
688 | { | 688 | { |
689 | path: '/bulkImport', | 689 | path: '/bulkImport', |
690 | meta: {}, | 690 | meta: {}, |
691 | name: 'Bulk Import', | 691 | name: 'Bulk Import', |
692 | props: (route) => ({ type: route.query.type }), | 692 | props: (route) => ({ type: route.query.type }), |
693 | component: () => | 693 | component: () => |
694 | import ( | 694 | import ( |
695 | /* webpackChunkName: "routes" */ | 695 | /* webpackChunkName: "routes" */ |
696 | /* webpackMode: "lazy-once" */ | 696 | /* webpackMode: "lazy-once" */ |
697 | `@/pages/Administrator/bulkImport.vue` | 697 | `@/pages/Administrator/bulkImport.vue` |
698 | ) | 698 | ) |
699 | }, | 699 | }, |
700 | { | 700 | { |
701 | path: '/studentReport', | 701 | path: '/studentReport', |
702 | meta: {}, | 702 | meta: {}, |
703 | name: 'Student Report', | 703 | name: 'Student Report', |
704 | props: (route) => ({ type: route.query.type }), | 704 | props: (route) => ({ type: route.query.type }), |
705 | component: () => | 705 | component: () => |
706 | import ( | 706 | import ( |
707 | /* webpackChunkName: "routes" */ | 707 | /* webpackChunkName: "routes" */ |
708 | /* webpackMode: "lazy-once" */ | 708 | /* webpackMode: "lazy-once" */ |
709 | `@/pages/Report/studentReport.vue` | 709 | `@/pages/Report/studentReport.vue` |
710 | ) | 710 | ) |
711 | }, | 711 | }, |
712 | { | 712 | { |
713 | path: '/progressCardReport', | 713 | path: '/progressCardReport', |
714 | meta: {}, | 714 | meta: {}, |
715 | name: 'Progress Card Report', | 715 | name: 'Progress Card Report', |
716 | props: (route) => ({ type: route.query.type }), | 716 | props: (route) => ({ type: route.query.type }), |
717 | component: () => | 717 | component: () => |
718 | import ( | 718 | import ( |
719 | /* webpackChunkName: "routes" */ | 719 | /* webpackChunkName: "routes" */ |
720 | /* webpackMode: "lazy-once" */ | 720 | /* webpackMode: "lazy-once" */ |
721 | `@/pages/Report/progressCardReport.vue` | 721 | `@/pages/Report/progressCardReport.vue` |
722 | ) | 722 | ) |
723 | }, | 723 | }, |
724 | { | 724 | { |
725 | path: '/idCard', | 725 | path: '/idCard', |
726 | meta: {}, | 726 | meta: {}, |
727 | name: 'Id Card Report', | 727 | name: 'Id Card Report', |
728 | props: (route) => ({ type: route.query.type }), | 728 | props: (route) => ({ type: route.query.type }), |
729 | component: () => | 729 | component: () => |
730 | import ( | 730 | import ( |
731 | `@/pages/Report/idCard.vue` | 731 | `@/pages/Report/idCard.vue` |
732 | ) | 732 | ) |
733 | }, | 733 | }, |
734 | { | 734 | { |
735 | path: '/admitCard', | 735 | path: '/admitCard', |
736 | meta: {}, | 736 | meta: {}, |
737 | name: 'Admit Card Report', | 737 | name: 'Admit Card Report', |
738 | props: (route) => ({ type: route.query.type }), | 738 | props: (route) => ({ type: route.query.type }), |
739 | component: () => | 739 | component: () => |
740 | import ( | 740 | import ( |
741 | `@/pages/Report/admitCard.vue` | 741 | `@/pages/Report/admitCard.vue` |
742 | ) | 742 | ) |
743 | }, | 743 | }, |
744 | { | 744 | { |
745 | path: '/generalSetting', | 745 | path: '/generalSetting', |
746 | meta: {}, | 746 | meta: {}, |
747 | name: 'General Setting', | 747 | name: 'General Setting', |
748 | props: (route) => ({ type: route.query.type }), | 748 | props: (route) => ({ type: route.query.type }), |
749 | component: () => | 749 | component: () => |
750 | import ( | 750 | import ( |
751 | /* webpackChunkName: "routes" */ | 751 | /* webpackChunkName: "routes" */ |
752 | /* webpackMode: "lazy-once" */ | 752 | /* webpackMode: "lazy-once" */ |
753 | `@/pages/generalSetting/generalSetting.vue` | 753 | `@/pages/generalSetting/generalSetting.vue` |
754 | ) | 754 | ) |
755 | }, | 755 | }, |
756 | { | 756 | { |
757 | path: '/assignment', | 757 | path: '/assignment', |
758 | meta: {}, | 758 | meta: {}, |
759 | name: 'Assignment', | 759 | name: 'Assignment', |
760 | props: (route) => ({ type: route.query.type }), | 760 | props: (route) => ({ type: route.query.type }), |
761 | component: () => | 761 | component: () => |
762 | import ( | 762 | import ( |
763 | `@/pages/Academic/assignment.vue` | 763 | `@/pages/Academic/assignment.vue` |
764 | ) | 764 | ) |
765 | }, | 765 | }, |
766 | { | 766 | { |
767 | path: '/routine', | 767 | path: '/routine', |
768 | meta: {}, | 768 | meta: {}, |
769 | name: 'Routine', | 769 | name: 'Routine', |
770 | props: (route) => ({ type: route.query.type }), | 770 | props: (route) => ({ type: route.query.type }), |
771 | component: () => | 771 | component: () => |
772 | import ( | 772 | import ( |
773 | `@/pages/Academic/routine.vue` | 773 | `@/pages/Academic/routine.vue` |
774 | ) | 774 | ) |
775 | }, | 775 | }, |
776 | { | 776 | { |
777 | path: '/subject', | 777 | path: '/subject', |
778 | meta: {}, | 778 | meta: {}, |
779 | name: 'Subject', | 779 | name: 'Subject', |
780 | props: (route) => ({ type: route.query.type }), | 780 | props: (route) => ({ type: route.query.type }), |
781 | component: () => | 781 | component: () => |
782 | import ( | 782 | import ( |
783 | `@/pages/Academic/subject.vue` | 783 | `@/pages/Academic/subject.vue` |
784 | ) | 784 | ) |
785 | }, | 785 | }, |
786 | { | 786 | { |
787 | path: '/syllabus', | 787 | path: '/syllabus', |
788 | meta: {}, | 788 | meta: {}, |
789 | name: 'Syllabus', | 789 | name: 'Syllabus', |
790 | props: (route) => ({ type: route.query.type }), | 790 | props: (route) => ({ type: route.query.type }), |
791 | component: () => | 791 | component: () => |
792 | import ( | 792 | import ( |
793 | `@/pages/Academic/syllabus.vue` | 793 | `@/pages/Academic/syllabus.vue` |
794 | ) | 794 | ) |
795 | }, | 795 | }, |
796 | { | 796 | { |
797 | path: '/course', | 797 | path: '/course', |
798 | meta: {}, | 798 | meta: {}, |
799 | name: 'Course', | 799 | name: 'Course', |
800 | props: (route) => ({ type: route.query.type }), | 800 | props: (route) => ({ type: route.query.type }), |
801 | component: () => | 801 | component: () => |
802 | import ( | 802 | import ( |
803 | /* webpackChunkName: "routes" */ | 803 | /* webpackChunkName: "routes" */ |
804 | /* webpackMode: "lazy-once" */ | 804 | /* webpackMode: "lazy-once" */ |
805 | `@/pages/Course/course.vue` | 805 | `@/pages/Course/course.vue` |
806 | ) | 806 | ) |
807 | }, | 807 | }, |
808 | { | 808 | { |
809 | path: '/courseDetail', | ||
810 | meta: {}, | ||
811 | name: 'Course Detail', | ||
812 | props: (route) => ({ type: route.query.type }), | ||
813 | component: () => | ||
814 | import ( | ||
815 | /* webpackChunkName: "routes" */ | ||
816 | /* webpackMode: "lazy-once" */ | ||
817 | `@/pages/Course/courseDetail.vue` | ||
818 | ) | ||
819 | }, | ||
820 | { | ||
809 | path: '/enrollStudents', | 821 | path: '/enrollStudents', |
810 | meta: {}, | 822 | meta: {}, |
811 | name: 'Enroll Students', | 823 | name: 'Enroll Students', |
812 | props: (route) => ({ type: route.query.type }), | 824 | props: (route) => ({ type: route.query.type }), |
813 | component: () => | 825 | component: () => |
814 | import ( | 826 | import ( |
815 | /* webpackChunkName: "routes" */ | 827 | /* webpackChunkName: "routes" */ |
816 | /* webpackMode: "lazy-once" */ | 828 | /* webpackMode: "lazy-once" */ |
817 | `@/pages/Course/enrollStudents.vue` | 829 | `@/pages/Course/enrollStudents.vue` |
818 | ) | 830 | ) |
819 | }, | 831 | }, |
820 | { | 832 | { |
833 | path: '/changeStudents', | ||
834 | meta: {}, | ||
835 | name: 'Change Students', | ||
836 | props: (route) => ({ type: route.query.type }), | ||
837 | component: () => | ||
838 | import ( | ||
839 | /* webpackChunkName: "routes" */ | ||
840 | /* webpackMode: "lazy-once" */ | ||
841 | `@/pages/changeStudents/changeStudents.vue` | ||
842 | ) | ||
843 | }, | ||
844 | { | ||
821 | path: '/annoucement', | 845 | path: '/annoucement', |
822 | meta: {}, | 846 | meta: {}, |
823 | name: 'Annoucement', | 847 | name: 'Annoucement', |
824 | props: (route) => ({ type: route.query.type }), | 848 | props: (route) => ({ type: route.query.type }), |
825 | component: () => | 849 | component: () => |
826 | import ( | 850 | import ( |
827 | /* webpackChunkName: "routes" */ | 851 | /* webpackChunkName: "routes" */ |
828 | /* webpackMode: "lazy-once" */ | 852 | /* webpackMode: "lazy-once" */ |
829 | `@/pages/Annoucement/annoucement.vue` | 853 | `@/pages/Annoucement/annoucement.vue` |
830 | ) | 854 | ) |
831 | }, | 855 | }, |
832 | //////SCHOOL | 856 | //////SCHOOL |
833 | 857 | ||
834 | { | 858 | { |
835 | path: '/school', | 859 | path: '/school', |
836 | meta: {}, | 860 | meta: {}, |
837 | name: 'School', | 861 | name: 'School', |
838 | props: (route) => ({ type: route.query.type }), | 862 | props: (route) => ({ type: route.query.type }), |
839 | component: () => | 863 | component: () => |
840 | import ( | 864 | import ( |
841 | /* webpackChunkName: "routes" */ | 865 | /* webpackChunkName: "routes" */ |
842 | /* webpackMode: "lazy-once" */ | 866 | /* webpackMode: "lazy-once" */ |
843 | `@/pages/School/school.vue` | 867 | `@/pages/School/school.vue` |
844 | ) | 868 | ) |
845 | }, | 869 | }, |
846 | { | 870 | { |
847 | path: '/schooldashboard', | 871 | path: '/schooldashboard', |
848 | meta: {}, | 872 | meta: {}, |
849 | name: 'View School Dashboard', | 873 | name: 'View School Dashboard', |
850 | props: (route) => ({ type: route.query.type }), | 874 | props: (route) => ({ type: route.query.type }), |
851 | component: () => | 875 | component: () => |
852 | import ( | 876 | import ( |
853 | /* webpackChunkName: "routes" */ | 877 | /* webpackChunkName: "routes" */ |
854 | /* webpackMode: "lazy-once" */ | 878 | /* webpackMode: "lazy-once" */ |
855 | `@/pages/School/viewSchoolDashboard.vue` | 879 | `@/pages/School/viewSchoolDashboard.vue` |
856 | ) | 880 | ) |
857 | } | 881 | } |
858 | ]; | 882 | ]; |