Commit 2fe1115d8acbc633d6271510df37dea1e0ba3d1a
1 parent
67a276510b
Exists in
master
and in
3 other branches
added csv button and fixed bugs
Showing
7 changed files
with
71 additions
and
70 deletions
Show diff stats
src/api/menu.js
1 | const adminMenu = [ | 1 | const adminMenu = [ |
2 | // { header: 'Apps' }, | 2 | // { header: 'Apps' }, |
3 | { | 3 | { |
4 | title: 'Dashboard', | 4 | title: 'Dashboard', |
5 | // group: 'apps', | 5 | // group: 'apps', |
6 | name: 'Dashboard', | 6 | name: 'Dashboard', |
7 | icon: '/static/icon/dashboard.png', | 7 | icon: '/static/icon/dashboard.png', |
8 | }, | 8 | }, |
9 | { | 9 | { |
10 | title: 'Class', | 10 | title: 'Class', |
11 | // group: 'apps', | 11 | // group: 'apps', |
12 | name: 'Class', | 12 | name: 'Class', |
13 | icon: '/static/icon/class.png', | 13 | icon: '/static/icon/class.png', |
14 | }, | 14 | }, |
15 | { | 15 | { |
16 | title: 'Section', | 16 | title: 'Section', |
17 | // group: 'apps', | 17 | // group: 'apps', |
18 | name: 'Section', | 18 | name: 'Section', |
19 | icon: '/static/icon/section.png', | 19 | icon: '/static/icon/section.png', |
20 | }, | 20 | }, |
21 | { | 21 | { |
22 | title: 'Subjects', | 22 | title: 'Subjects', |
23 | name: 'Subject', | 23 | name: 'Subject', |
24 | icon: '/static/icon/subject.png', | 24 | icon: '/static/icon/subject.png', |
25 | }, | 25 | }, |
26 | { | 26 | { |
27 | title: 'Parents', | 27 | title: 'Parents', |
28 | // group: 'apps', | 28 | // group: 'apps', |
29 | name: 'Parents', | 29 | name: 'Parents', |
30 | icon: '/static/icon/parents.png', | 30 | icon: '/static/icon/parents.png', |
31 | }, | 31 | }, |
32 | { | 32 | { |
33 | title: 'Teachers', | 33 | title: 'Teachers', |
34 | // group: '', | 34 | // group: '', |
35 | name: 'Teachers', | 35 | name: 'Teachers', |
36 | icon: '/static/icon/teacher.png', | 36 | icon: '/static/icon/teacher.png', |
37 | }, | 37 | }, |
38 | { | 38 | { |
39 | title: 'Students', | 39 | title: 'Students', |
40 | // group: 'apps', | 40 | // group: 'apps', |
41 | name: 'Students', | 41 | name: 'Students', |
42 | icon: '/static/icon/student.png', | 42 | icon: '/static/icon/student.png', |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | title: 'User', | 45 | title: 'User', |
46 | name: 'User', | 46 | name: 'User', |
47 | icon: '/static/icon/users.png', | 47 | icon: '/static/icon/users.png', |
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | title: 'Attendance', | 50 | title: 'Attendance', |
51 | group: 'Attendance', | 51 | group: 'Attendance', |
52 | component: 'Attendance', | 52 | component: 'Attendance', |
53 | icon: '/static/icon/attendence.png', | 53 | icon: '/static/icon/attendence.png', |
54 | items: [ | 54 | items: [ |
55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'StudentAttendence', action: '', }, | 55 | { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, |
56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'TeacherAttendence', action: '', } | 56 | { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', } |
57 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, | 57 | // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', 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: 'ExamSchedule', 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: 'MarkDistribution', 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: 'Administrator', | 85 | title: 'Administrator', |
86 | group: 'Administrator', | 86 | group: 'Administrator', |
87 | component: 'Administrator', | 87 | component: 'Administrator', |
88 | icon: '/static/icon/adminstrator.png', | 88 | icon: '/static/icon/adminstrator.png', |
89 | items: [ | 89 | items: [ |
90 | { name: 'AcademicYear', title: 'Academic Year', component: 'AcademicYear', action: '', }, | 90 | { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, |
91 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, | 91 | // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, |
92 | { name: 'resetPassword', title: 'Reset Password', component: 'resetPassword', action: '', }, | 92 | { name: 'resetPassword', title: 'Reset Password', component: 'Reset Password', action: '', }, |
93 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, | 93 | { name: 'Role', title: 'Role', component: 'Role', action: '', }, |
94 | { name: 'BulkImport', title: 'Bulk Import', component: 'BulkImport', action: '', }, | 94 | { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, |
95 | 95 | ||
96 | ] | 96 | ] |
97 | }, | 97 | }, |
98 | { | 98 | { |
99 | title: 'Notice Board', | 99 | title: 'Notice Board', |
100 | name: 'NoticeBoard', | 100 | name: 'Notice Board', |
101 | icon: '/static/icon/notice board.png', | 101 | icon: '/static/icon/notice board.png', |
102 | }, | 102 | }, |
103 | { | 103 | { |
104 | title: 'News', | 104 | title: 'News', |
105 | name: 'News', | 105 | name: 'News', |
106 | icon: '/static/icon/news.png', | 106 | icon: '/static/icon/news.png', |
107 | }, | 107 | }, |
108 | // { | 108 | // { |
109 | // title: 'Reminder', | 109 | // title: 'Reminder', |
110 | // name: 'reminder', | 110 | // name: 'reminder', |
111 | // icon: 'alarm_add', | 111 | // icon: 'alarm_add', |
112 | // }, | 112 | // }, |
113 | { | 113 | { |
114 | title: 'Time Table', | 114 | title: 'Time Table', |
115 | name: 'TimeTable', | 115 | name: 'Time Table', |
116 | icon: '/static/icon/time table.png', | 116 | icon: '/static/icon/time table.png', |
117 | }, | 117 | }, |
118 | { | 118 | { |
119 | title: 'Library', | 119 | title: 'Library', |
120 | group: 'Library', | 120 | group: 'Library', |
121 | component: 'Library', | 121 | component: 'Library', |
122 | icon: '/static/icon/library.png', | 122 | icon: '/static/icon/library.png', |
123 | items: [ | 123 | items: [ |
124 | { name: 'LibraryMember', title: ' Library Member', component: 'LibraryMember', action: '', }, | 124 | { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, |
125 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 125 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
126 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 126 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
127 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } | 127 | { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } |
128 | 128 | ||
129 | ] | 129 | ] |
130 | }, | 130 | }, |
131 | { | 131 | { |
132 | title: 'Report', | 132 | title: 'Report', |
133 | group: 'Report', | 133 | group: 'Report', |
134 | component: 'Report', | 134 | component: 'Report', |
135 | icon: '/static/icon/reports.png', | 135 | icon: '/static/icon/reports.png', |
136 | items: [ | 136 | items: [ |
137 | { name: 'studentReport', title: 'Student Report', component: 'studentReport', action: '', }, | 137 | { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, |
138 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'ProgressCardReport', action: '', } | 138 | { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', } |
139 | ] | 139 | ] |
140 | }, | 140 | }, |
141 | { | 141 | { |
142 | title: 'Notification', | 142 | title: 'Notification', |
143 | name: 'Notification', | 143 | name: 'Notification', |
144 | icon: '/static/icon/notification.png', | 144 | icon: '/static/icon/notification.png', |
145 | }, | 145 | }, |
146 | { | 146 | { |
147 | title: 'Social Media', | 147 | title: 'Social Media', |
148 | name: 'SocialMedia', | 148 | name: 'Social Media', |
149 | icon: '/static/icon/dashboard icons-35.png', | 149 | icon: '/static/icon/dashboard icons-35.png', |
150 | }, | 150 | }, |
151 | { | 151 | { |
152 | title: 'Gallery', | 152 | title: 'Gallery', |
153 | name: 'Gallery', | 153 | name: 'Gallery', |
154 | icon: '/static/icon/gallery.png', | 154 | icon: '/static/icon/gallery.png', |
155 | }, | 155 | }, |
156 | { | 156 | { |
157 | title: 'Event', | 157 | title: 'Event', |
158 | name: 'Event', | 158 | name: 'Event', |
159 | icon: '/static/icon/events.png', | 159 | icon: '/static/icon/events.png', |
160 | }, | 160 | }, |
161 | { | 161 | { |
162 | title: 'Account', | 162 | title: 'Account', |
163 | group: 'Account', | 163 | group: 'Account', |
164 | component: 'Account', | 164 | component: 'Account', |
165 | icon: '/static/icon/accounts.png', | 165 | icon: '/static/icon/accounts.png', |
166 | items: [ | 166 | items: [ |
167 | { name: 'feeTypes', title: 'Fee Types', component: 'feeTypes', action: '', }, | 167 | { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, |
168 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 168 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
169 | { name: 'PaymentHistory', title: 'Payment History', component: 'PaymentHistory', action: '', }, | 169 | { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, |
170 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 170 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
171 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 171 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
172 | { name: 'GlobalPayment', title: 'Global Payment', component: 'GlobalPayment', action: '', } | 172 | { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } |
173 | ] | 173 | ] |
174 | }, | 174 | }, |
175 | { | 175 | { |
176 | title: 'Holiday', | 176 | title: 'Holiday', |
177 | name: 'Holiday', | 177 | name: 'Holiday', |
178 | icon: '/static/icon/holiday.png', | 178 | icon: '/static/icon/holiday.png', |
179 | }, | 179 | }, |
180 | { | 180 | { |
181 | title: 'General Setting', | 181 | title: 'General Setting', |
182 | name: 'GeneralSetting', | 182 | name: 'General Setting', |
183 | icon: '/static/icon/settings.png', | 183 | icon: '/static/icon/settings.png', |
184 | } | 184 | } |
185 | ]; | 185 | ]; |
186 | 186 | ||
187 | const libraryMenu = [{ | 187 | const libraryMenu = [{ |
188 | title: 'Library', | 188 | title: 'Library', |
189 | group: 'Library', | 189 | group: 'Library', |
190 | component: 'Library', | 190 | component: 'Library', |
191 | icon: '/static/schoolIcons/Library.png', | 191 | icon: '/static/schoolIcons/Library.png', |
192 | items: [ | 192 | items: [ |
193 | { name: 'libraryMember', title: ' Library Member', component: 'libraryMember', action: '', }, | 193 | { name: 'libraryMember', title: ' Library Member', component: 'libraryMember', action: '', }, |
194 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, | 194 | { name: 'Books', title: 'Books', component: 'Books', action: '', }, |
195 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, | 195 | { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, |
196 | { name: 'eBooks', title: 'E-Books', component: 'eBooks', action: '', } | 196 | { name: 'eBooks', title: 'E-Books', component: 'eBooks', action: '', } |
197 | 197 | ||
198 | ] | 198 | ] |
199 | }]; | 199 | }]; |
200 | 200 | ||
201 | const accountMenu = [{ | 201 | const accountMenu = [{ |
202 | title: 'Account', | 202 | title: 'Account', |
203 | group: 'Account', | 203 | group: 'Account', |
204 | component: 'Account', | 204 | component: 'Account', |
205 | icon: '/static/schoolIcons/Account.png', | 205 | icon: '/static/schoolIcons/Account.png', |
206 | items: [ | 206 | items: [ |
207 | { name: 'feeTypes', title: 'Fee Types', component: 'feeTypes', action: '', }, | 207 | { name: 'feeTypes', title: 'Fee Types', component: 'feeTypes', action: '', }, |
208 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, | 208 | { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, |
209 | { name: 'paymentHistory', title: 'Payment History', component: 'paymentHistory', action: '', }, | 209 | { name: 'paymentHistory', title: 'Payment History', component: 'paymentHistory', action: '', }, |
210 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, | 210 | { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, |
211 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, | 211 | { name: 'Income', title: 'Income', component: 'Income', action: '', }, |
212 | { name: 'GlobalPayment', title: 'Global Payment', component: 'GlobalPayment', action: '', } | 212 | { name: 'GlobalPayment', title: 'Global Payment', component: 'GlobalPayment', action: '', } |
213 | ] | 213 | ] |
214 | }]; | 214 | }]; |
215 | 215 | ||
216 | const schoolMenu = [ | 216 | const schoolMenu = [ |
217 | // { header: 'Apps' }, | 217 | // { header: 'Apps' }, |
218 | { | 218 | { |
219 | title: 'School', | 219 | title: 'School', |
220 | // group: 'apps', | 220 | // group: 'apps', |
221 | path: '/school', | 221 | path: '/school', |
222 | icon: '/static/schoolIcons/Dashboard.png', | 222 | icon: '/static/schoolIcons/Dashboard.png', |
223 | } | 223 | } |
224 | ]; | 224 | ]; |
225 | 225 | ||
226 | // reorder menu | 226 | // reorder menu |
227 | // Menu.forEach((item) => { | 227 | // Menu.forEach((item) => { |
228 | // if (item.items) { | 228 | // if (item.items) { |
229 | // item.items.sort((x, y) => { | 229 | // item.items.sort((x, y) => { |
230 | // let textA = x.title.toUpperCase(); | 230 | // let textA = x.title.toUpperCase(); |
231 | // let textB = y.title.toUpperCase(); | 231 | // let textB = y.title.toUpperCase(); |
232 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; | 232 | // return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; |
233 | // }); | 233 | // }); |
234 | // } | 234 | // } |
235 | // }); | 235 | // }); |
236 | 236 | ||
237 | export default { adminMenu, schoolMenu, libraryMenu, accountMenu }; | 237 | export default { adminMenu, schoolMenu, libraryMenu, accountMenu }; |
src/pages/Attendence/studentAttendence.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <v-snackbar | 3 | <v-snackbar |
4 | :timeout="timeout" | 4 | :timeout="timeout" |
5 | :top="y === 'top'" | 5 | :top="y === 'top'" |
6 | :right="x === 'right'" | 6 | :right="x === 'right'" |
7 | :vertical="mode === 'vertical'" | 7 | :vertical="mode === 'vertical'" |
8 | v-model="snackbar" | 8 | v-model="snackbar" |
9 | color="success" | 9 | color="success" |
10 | >{{ text }}</v-snackbar> | 10 | >{{ text }}</v-snackbar> |
11 | <!-- ****** ATTENDENCE STUDENTS TABLE ****** --> | 11 | <!-- ****** ATTENDENCE STUDENTS TABLE ****** --> |
12 | <!-- <download-csv :data="json_data"> | 12 | <!-- <download-csv :data="json_data"> |
13 | <v-btn>Download Data</v-btn> | 13 | <v-btn>Download Data</v-btn> |
14 | </download-csv>--> | 14 | </download-csv>--> |
15 | <v-toolbar color="transparent" flat> | 15 | <v-toolbar color="transparent" flat> |
16 | <v-spacer></v-spacer> | 16 | <v-spacer></v-spacer> |
17 | <v-flex xs12 sm4 md2> | 17 | <v-flex xs12 sm4 md2> |
18 | <v-select | 18 | <v-select |
19 | small | 19 | small |
20 | :items="addclass" | 20 | :items="addclass" |
21 | label="Select Class" | 21 | label="Select Class" |
22 | v-model="selectStudents.select" | 22 | v-model="selectStudents.select" |
23 | item-text="classNum" | 23 | item-text="classNum" |
24 | item-value="_id" | 24 | item-value="_id" |
25 | name="Select Class" | 25 | name="Select Class" |
26 | @change="getSections(selectStudents.select)" | 26 | @change="getSections(selectStudents.select)" |
27 | class="px-2" | 27 | class="px-2" |
28 | required | 28 | required |
29 | ></v-select> | 29 | ></v-select> |
30 | </v-flex> | 30 | </v-flex> |
31 | <v-card-title class="body-1" v-show="show"> | 31 | <v-card-title class="body-1" v-show="show"> |
32 | <v-btn icon large flat @click="displaySearch"> | 32 | <v-btn icon large flat @click="displaySearch"> |
33 | <v-avatar size="27"> | 33 | <v-avatar size="27"> |
34 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> | 34 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> |
35 | </v-avatar> | 35 | </v-avatar> |
36 | </v-btn> | 36 | </v-btn> |
37 | </v-card-title> | 37 | </v-card-title> |
38 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 38 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
39 | <v-layout> | 39 | <v-layout> |
40 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 40 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
41 | <v-icon @click="closeSearch" color="error">close</v-icon> | 41 | <v-icon @click="closeSearch" color="error">close</v-icon> |
42 | </v-layout> | 42 | </v-layout> |
43 | </v-flex> | 43 | </v-flex> |
44 | </v-toolbar> | 44 | </v-toolbar> |
45 | <v-data-table | 45 | <v-data-table |
46 | :headers="headers" | 46 | :headers="headers" |
47 | :items="studentsList" | 47 | :items="studentsList" |
48 | :pagination.sync="pagination" | 48 | :pagination.sync="pagination" |
49 | :search="search" | 49 | :search="search" |
50 | > | 50 | > |
51 | <template slot="items" slot-scope="props"> | 51 | <template slot="items" slot-scope="props"> |
52 | <tr class="tr"> | 52 | <tr class="tr"> |
53 | <td class="td td-row">{{ props.index + 1}}</td> | 53 | <td class="td td-row">{{ props.index + 1}}</td> |
54 | <td class="text-xs-center td td-row"> | 54 | <td class="text-xs-center td td-row"> |
55 | <v-avatar size="40"> | 55 | <v-avatar size="40"> |
56 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 56 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
57 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 57 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
58 | </v-avatar> | 58 | </v-avatar> |
59 | </td> | 59 | </td> |
60 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 60 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
61 | <td class="text-xs-center td td-row">{{ props.item.rollNo}}</td> | 61 | <td class="text-xs-center td td-row">{{ props.item.rollNo}}</td> |
62 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> | 62 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> |
63 | <td class="text-xs-center td td-row"> | 63 | <td class="text-xs-center td td-row"> |
64 | <router-link :to="{ name:'ViewStudentsAttendence',params: { id:props.item._id } }"> | 64 | <router-link :to="{ name:'View Students Attendence',params: { id:props.item._id } }"> |
65 | <v-tooltip top> | 65 | <v-tooltip top> |
66 | <img | 66 | <img |
67 | slot="activator" | 67 | slot="activator" |
68 | style="cursor:pointer; width:20px; height:25px; " | 68 | style="cursor:pointer; width:20px; height:25px; " |
69 | class="mr-3" | 69 | class="mr-3" |
70 | src="/static/icon/dashboard icons-47.png" | 70 | src="/static/icon/dashboard icons-47.png" |
71 | /> | 71 | /> |
72 | <span>View</span> | 72 | <span>View</span> |
73 | </v-tooltip> | 73 | </v-tooltip> |
74 | </router-link> | 74 | </router-link> |
75 | <v-tooltip top> | 75 | <v-tooltip top> |
76 | <img | 76 | <img |
77 | slot="activator" | 77 | slot="activator" |
78 | style="cursor:pointer; width:20px; height:20px; " | 78 | style="cursor:pointer; width:20px; height:20px; " |
79 | @click="deleteItem(props.item)" | 79 | @click="deleteItem(props.item)" |
80 | class="mr-3" | 80 | class="mr-3" |
81 | src="/static/icon/dashboard icons-51.png" | 81 | src="/static/icon/dashboard icons-51.png" |
82 | /> | 82 | /> |
83 | <span>Delete</span> | 83 | <span>Delete</span> |
84 | </v-tooltip> | 84 | </v-tooltip> |
85 | </td> | 85 | </td> |
86 | </tr> | 86 | </tr> |
87 | </template> | 87 | </template> |
88 | <v-alert | 88 | <v-alert |
89 | slot="no-results" | 89 | slot="no-results" |
90 | :value="true" | 90 | :value="true" |
91 | color="error" | 91 | color="error" |
92 | icon="warning" | 92 | icon="warning" |
93 | >Your search for "{{ search }}" found no results.</v-alert> | 93 | >Your search for "{{ search }}" found no results.</v-alert> |
94 | </v-data-table> | 94 | </v-data-table> |
95 | <div class="loader" v-if="showLoader"> | 95 | <div class="loader" v-if="showLoader"> |
96 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 96 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
97 | </div> | 97 | </div> |
98 | </v-container> | 98 | </v-container> |
99 | </template> | 99 | </template> |
100 | 100 | ||
101 | <script> | 101 | <script> |
102 | import http from "@/Services/http.js"; | 102 | import http from "@/Services/http.js"; |
103 | import moment from "moment"; | 103 | import moment from "moment"; |
104 | 104 | ||
105 | export default { | 105 | export default { |
106 | data: () => ({ | 106 | data: () => ({ |
107 | snackbar: false, | 107 | snackbar: false, |
108 | y: "top", | 108 | y: "top", |
109 | x: "right", | 109 | x: "right", |
110 | mode: "", | 110 | mode: "", |
111 | timeout: 3000, | 111 | timeout: 3000, |
112 | text: "", | 112 | text: "", |
113 | show: true, | 113 | show: true, |
114 | showSearch: false, | 114 | showSearch: false, |
115 | showLoader: false, | 115 | showLoader: false, |
116 | loading: false, | 116 | loading: false, |
117 | date: null, | 117 | date: null, |
118 | search: "", | 118 | search: "", |
119 | addclass: [], | 119 | addclass: [], |
120 | pagination: { | 120 | pagination: { |
121 | rowsPerPage: 10 | 121 | rowsPerPage: 10 |
122 | }, | 122 | }, |
123 | imageData: {}, | 123 | imageData: {}, |
124 | imageName: "", | 124 | imageName: "", |
125 | imageUrl: "", | 125 | imageUrl: "", |
126 | imageFile: "", | 126 | imageFile: "", |
127 | headers: [ | 127 | headers: [ |
128 | { | 128 | { |
129 | text: "No", | 129 | text: "No", |
130 | align: "", | 130 | align: "", |
131 | sortable: false, | 131 | sortable: false, |
132 | value: "index" | 132 | value: "index" |
133 | }, | 133 | }, |
134 | { | 134 | { |
135 | text: "Profile Pic", | 135 | text: "Profile Pic", |
136 | value: "profilprofilePicUrlePicUrl", | 136 | value: "profilprofilePicUrlePicUrl", |
137 | sortable: false, | 137 | sortable: false, |
138 | align: "center" | 138 | align: "center" |
139 | }, | 139 | }, |
140 | { text: "Name", value: "name", sortable: false, align: "center" }, | 140 | { text: "Name", value: "name", sortable: false, align: "center" }, |
141 | { text: "Roll No", value: "rollNo", sortable: false, align: "center" }, | 141 | { text: "Roll No", value: "rollNo", sortable: false, align: "center" }, |
142 | { text: "Email", value: "email", sortable: false, align: "center" }, | 142 | { text: "Email", value: "email", sortable: false, align: "center" }, |
143 | { text: "Action", value: "", sortable: false, align: "center" } | 143 | { text: "Action", value: "", sortable: false, align: "center" } |
144 | ], | 144 | ], |
145 | // json_data: [], | 145 | // json_data: [], |
146 | studentsList: [], | 146 | studentsList: [], |
147 | parentId: "", | 147 | parentId: "", |
148 | token: "", | 148 | token: "", |
149 | selectStudents: { | 149 | selectStudents: { |
150 | select: "", | 150 | select: "", |
151 | selectSection: "" | 151 | selectSection: "" |
152 | } | 152 | } |
153 | }), | 153 | }), |
154 | methods: { | 154 | methods: { |
155 | getSections(_id) { | 155 | getSections(_id) { |
156 | this.showLoader = true; | 156 | this.showLoader = true; |
157 | var token = this.$store.state.token; | 157 | var token = this.$store.state.token; |
158 | http() | 158 | http() |
159 | .get( | 159 | .get( |
160 | "/getStudentsList", | 160 | "/getStudentsList", |
161 | { params: { classId: _id } }, | 161 | { params: { classId: _id } }, |
162 | { | 162 | { |
163 | headers: { Authorization: "Bearer " + token } | 163 | headers: { Authorization: "Bearer " + token } |
164 | } | 164 | } |
165 | ) | 165 | ) |
166 | .then(response => { | 166 | .then(response => { |
167 | this.showLoader = false; | 167 | this.showLoader = false; |
168 | this.studentsList = response.data.data; | 168 | this.studentsList = response.data.data; |
169 | }) | 169 | }) |
170 | .catch(error => { | 170 | .catch(error => { |
171 | this.showLoader = false; | 171 | this.showLoader = false; |
172 | if (error.response.status === 401) { | 172 | if (error.response.status === 401) { |
173 | this.$router.replace({ path: "/" }); | 173 | this.$router.replace({ path: "/" }); |
174 | this.$store.dispatch("setToken", null); | 174 | this.$store.dispatch("setToken", null); |
175 | this.$store.dispatch("Id", null); | 175 | this.$store.dispatch("Id", null); |
176 | } | 176 | } |
177 | }); | 177 | }); |
178 | }, | 178 | }, |
179 | getAllClass() { | 179 | getAllClass() { |
180 | http() | 180 | http() |
181 | .get("/getClassesList", { | 181 | .get("/getClassesList", { |
182 | headers: { Authorization: "Bearer " + this.token } | 182 | headers: { Authorization: "Bearer " + this.token } |
183 | }) | 183 | }) |
184 | .then(response => { | 184 | .then(response => { |
185 | this.addclass = response.data.data; | 185 | this.addclass = response.data.data; |
186 | }) | 186 | }) |
187 | .catch(error => { | 187 | .catch(error => { |
188 | // console.log("err====>", err); | 188 | // console.log("err====>", err); |
189 | // this.$router.replace({ path: "/" }); | 189 | // this.$router.replace({ path: "/" }); |
190 | }); | 190 | }); |
191 | }, | 191 | }, |
192 | displaySearch() { | 192 | displaySearch() { |
193 | (this.show = false), (this.showSearch = true); | 193 | (this.show = false), (this.showSearch = true); |
194 | }, | 194 | }, |
195 | closeSearch() { | 195 | closeSearch() { |
196 | this.showSearch = false; | 196 | this.showSearch = false; |
197 | this.show = true; | 197 | this.show = true; |
198 | this.search = ""; | 198 | this.search = ""; |
199 | } | 199 | } |
200 | }, | 200 | }, |
201 | mounted() { | 201 | mounted() { |
202 | // this.getStudentList(); | 202 | // this.getStudentList(); |
203 | this.token = this.$store.state.token; | 203 | this.token = this.$store.state.token; |
204 | this.getAllClass(); | 204 | this.getAllClass(); |
205 | } | 205 | } |
206 | }; | 206 | }; |
207 | </script> | 207 | </script> |
src/pages/Attendence/teacherAttendence.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** ATTENDENCE TACHERS TABLE ****** --> | 3 | <!-- ****** ATTENDENCE TACHERS TABLE ****** --> |
4 | <v-toolbar color="transparent" flat> | 4 | <v-toolbar color="transparent" flat> |
5 | <v-btn | 5 | <v-btn |
6 | fab | 6 | fab |
7 | dark | 7 | dark |
8 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 8 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
9 | small | 9 | small |
10 | @click="addTeacherAttendenceDialog = true" | 10 | @click="addTeacherAttendenceDialog = true" |
11 | > | 11 | > |
12 | <v-icon dark>add</v-icon> | 12 | <v-icon dark>add</v-icon> |
13 | </v-btn> | 13 | </v-btn> |
14 | <v-btn | 14 | <v-btn |
15 | round | 15 | round |
16 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 16 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
17 | dark | 17 | dark |
18 | @click="addTeacherAttendenceDialog = true" | 18 | @click="addTeacherAttendenceDialog = true" |
19 | > | 19 | > |
20 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Teacher Attendence | 20 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Teacher Attendence |
21 | </v-btn> | 21 | </v-btn> |
22 | <v-spacer></v-spacer> | 22 | <v-spacer></v-spacer> |
23 | <v-card-title class="body-1" v-show="show"> | 23 | <v-card-title class="body-1" v-show="show"> |
24 | <v-btn icon large flat @click="displaySearch"> | 24 | <v-btn icon large flat @click="displaySearch"> |
25 | <v-avatar size="27"> | 25 | <v-avatar size="27"> |
26 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> | 26 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> |
27 | </v-avatar> | 27 | </v-avatar> |
28 | </v-btn> | 28 | </v-btn> |
29 | </v-card-title> | 29 | </v-card-title> |
30 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 30 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
31 | <v-layout> | 31 | <v-layout> |
32 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 32 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
33 | <v-icon @click="closeSearch" color="error">close</v-icon> | 33 | <v-icon @click="closeSearch" color="error">close</v-icon> |
34 | </v-layout> | 34 | </v-layout> |
35 | </v-flex> | 35 | </v-flex> |
36 | </v-toolbar> | 36 | </v-toolbar> |
37 | <v-data-table | 37 | <v-data-table |
38 | :headers="headers" | 38 | :headers="headers" |
39 | :items="desserts" | 39 | :items="desserts" |
40 | :pagination.sync="pagination" | 40 | :pagination.sync="pagination" |
41 | :search="search" | 41 | :search="search" |
42 | > | 42 | > |
43 | <template slot="items" slot-scope="props"> | 43 | <template slot="items" slot-scope="props"> |
44 | <tr class="tr"> | 44 | <tr class="tr"> |
45 | <td class="td td-row">{{ props.index + 1}}</td> | 45 | <td class="td td-row">{{ props.index + 1}}</td> |
46 | <td class="text-xs-center td td-row"> | 46 | <td class="text-xs-center td td-row"> |
47 | <v-avatar size="40"> | 47 | <v-avatar size="40"> |
48 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 48 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
49 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 49 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
50 | </v-avatar> | 50 | </v-avatar> |
51 | </td> | 51 | </td> |
52 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 52 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
53 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 53 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
54 | <td class="td td-row text-xs-center">{{ props.item.mobileNo }}</td> | 54 | <td class="td td-row text-xs-center">{{ props.item.mobileNo }}</td> |
55 | <td class="text-xs-center td td-row"> | 55 | <td class="text-xs-center td td-row"> |
56 | <router-link | 56 | <router-link |
57 | :to="{ name:'ViewTeacherAttendence',params: { teacherId:props.item._id } }" | 57 | :to="{ name:'View Teacher Attendence',params: { teacherId:props.item._id } }" |
58 | > | 58 | > |
59 | <span> | 59 | <span> |
60 | <v-tooltip top> | 60 | <v-tooltip top> |
61 | <img | 61 | <img |
62 | slot="activator" | 62 | slot="activator" |
63 | style="cursor:pointer; width:25px; height:25px; " | 63 | style="cursor:pointer; width:25px; height:25px; " |
64 | src="/static/icon/dashboard icons-47.png" | 64 | src="/static/icon/dashboard icons-47.png" |
65 | /> | 65 | /> |
66 | <span>View</span> | 66 | <span>View</span> |
67 | </v-tooltip> | 67 | </v-tooltip> |
68 | </span> | 68 | </span> |
69 | </router-link> | 69 | </router-link> |
70 | </td> | 70 | </td> |
71 | </tr> | 71 | </tr> |
72 | </template> | 72 | </template> |
73 | <v-alert | 73 | <v-alert |
74 | slot="no-results" | 74 | slot="no-results" |
75 | :value="true" | 75 | :value="true" |
76 | color="error" | 76 | color="error" |
77 | icon="warning" | 77 | icon="warning" |
78 | >Your search for "{{ search }}" found no results.</v-alert> | 78 | >Your search for "{{ search }}" found no results.</v-alert> |
79 | </v-data-table> | 79 | </v-data-table> |
80 | <!-- ****** Add Teachers Attendece****** --> | 80 | <!-- ****** Add Teachers Attendece****** --> |
81 | <v-dialog v-model="addTeacherAttendenceDialog" width="1600"> | 81 | <v-dialog v-model="addTeacherAttendenceDialog" width="1600"> |
82 | <v-card flat class="pa-2"> | 82 | <v-card flat class="pa-2"> |
83 | <v-layout> | 83 | <v-layout> |
84 | <v-flex xs12> | 84 | <v-flex xs12> |
85 | <label class="title text-xs-center">Add Teacher Attendence</label> | 85 | <label class="title text-xs-center">Add Teacher Attendence</label> |
86 | <v-icon size="24" class="right" @click="addTeacherAttendenceDialog = false">cancel</v-icon> | 86 | <v-icon size="24" class="right" @click="addTeacherAttendenceDialog = false">cancel</v-icon> |
87 | </v-flex> | 87 | </v-flex> |
88 | </v-layout> | 88 | </v-layout> |
89 | <v-flex xs12 class="mt-4"> | 89 | <v-flex xs12 class="mt-4"> |
90 | <v-form ref="form" v-model="valid" lazy-validation> | 90 | <v-form ref="form" v-model="valid" lazy-validation> |
91 | <v-layout wrap> | 91 | <v-layout wrap> |
92 | <v-flex xs12 class="px-4"> | 92 | <v-flex xs12 class="px-4"> |
93 | <v-layout> | 93 | <v-layout> |
94 | <v-flex xs6 sm6 lg3 md4> | 94 | <v-flex xs6 sm6 lg3 md4> |
95 | <v-menu | 95 | <v-menu |
96 | ref="menu" | 96 | ref="menu" |
97 | :close-on-content-click="false" | 97 | :close-on-content-click="false" |
98 | v-model="menu" | 98 | v-model="menu" |
99 | :nudge-right="40" | 99 | :nudge-right="40" |
100 | lazy | 100 | lazy |
101 | transition="scale-transition" | 101 | transition="scale-transition" |
102 | offset-y | 102 | offset-y |
103 | full-width | 103 | full-width |
104 | min-width="290px" | 104 | min-width="290px" |
105 | > | 105 | > |
106 | <v-text-field | 106 | <v-text-field |
107 | slot="activator" | 107 | slot="activator" |
108 | v-model="date" | 108 | v-model="date" |
109 | label="Select Date" | 109 | label="Select Date" |
110 | append-icon="event" | 110 | append-icon="event" |
111 | :rules="dataValid" | 111 | :rules="dataValid" |
112 | readonly | 112 | readonly |
113 | ></v-text-field> | 113 | ></v-text-field> |
114 | <v-date-picker | 114 | <v-date-picker |
115 | ref="picker" | 115 | ref="picker" |
116 | v-model="date" | 116 | v-model="date" |
117 | :max="new Date().toISOString().substr(0, 10)" | 117 | :max="new Date().toISOString().substr(0, 10)" |
118 | min="1950-01-01" | 118 | min="1950-01-01" |
119 | @change="save" | 119 | @change="save" |
120 | ></v-date-picker> | 120 | ></v-date-picker> |
121 | </v-menu> | 121 | </v-menu> |
122 | </v-flex> | 122 | </v-flex> |
123 | <v-flex xs6 sm6 lg9 md8> | 123 | <v-flex xs6 sm6 lg9 md8> |
124 | <v-btn class="right mt-3 add-button" dark round @click="showTable">Attendence</v-btn> | 124 | <v-btn class="right mt-3 add-button" dark round @click="showTable">Attendence</v-btn> |
125 | </v-flex> | 125 | </v-flex> |
126 | </v-layout> | 126 | </v-layout> |
127 | </v-flex> | 127 | </v-flex> |
128 | </v-layout> | 128 | </v-layout> |
129 | </v-form> | 129 | </v-form> |
130 | </v-flex> | 130 | </v-flex> |
131 | <v-flex xs12 v-show="attendeceTable" class> | 131 | <v-flex xs12 v-show="attendeceTable" class> |
132 | <v-data-table | 132 | <v-data-table |
133 | :headers="headers" | 133 | :headers="headers" |
134 | :items="teachersData" | 134 | :items="teachersData" |
135 | :pagination.sync="pagination" | 135 | :pagination.sync="pagination" |
136 | :search="search" | 136 | :search="search" |
137 | > | 137 | > |
138 | <template slot="items" slot-scope="props"> | 138 | <template slot="items" slot-scope="props"> |
139 | <tr class="tr"> | 139 | <tr class="tr"> |
140 | <td class="td td-row">{{ props.index + 1}}</td> | 140 | <td class="td td-row">{{ props.index + 1}}</td> |
141 | <td class="text-xs-center td td-row"> | 141 | <td class="text-xs-center td td-row"> |
142 | <v-avatar size="40"> | 142 | <v-avatar size="40"> |
143 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 143 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
144 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 144 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
145 | </v-avatar> | 145 | </v-avatar> |
146 | </td> | 146 | </td> |
147 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 147 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
148 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> | 148 | <td class="text-xs-center td td-row">{{ props.item.email }}</td> |
149 | <td class="text-xs-center td td-row">{{ props.item.mobileNo }}</td> | 149 | <td class="text-xs-center td td-row">{{ props.item.mobileNo }}</td> |
150 | <td class="text-xs-center td td-row"> | 150 | <td class="text-xs-center td td-row"> |
151 | <v-radio-group v-model="props.item.attendence" :mandatory="false" row> | 151 | <v-radio-group v-model="props.item.attendence" :mandatory="false" row> |
152 | <v-radio | 152 | <v-radio |
153 | v-for="attendences in attendenceType" | 153 | v-for="attendences in attendenceType" |
154 | :key="attendences.value" | 154 | :key="attendences.value" |
155 | :label="`${attendences.label}`" | 155 | :label="`${attendences.label}`" |
156 | :value="attendences.value" | 156 | :value="attendences.value" |
157 | ></v-radio> | 157 | ></v-radio> |
158 | </v-radio-group> | 158 | </v-radio-group> |
159 | </td> | 159 | </td> |
160 | </tr> | 160 | </tr> |
161 | </template> | 161 | </template> |
162 | </v-data-table> | 162 | </v-data-table> |
163 | <v-flex xs12> | 163 | <v-flex xs12> |
164 | <v-card-actions> | 164 | <v-card-actions> |
165 | <v-spacer></v-spacer> | 165 | <v-spacer></v-spacer> |
166 | <v-btn @click="submit()" class="add-button" round dark>Submit</v-btn> | 166 | <v-btn @click="submit()" class="add-button" round dark>Submit</v-btn> |
167 | </v-card-actions> | 167 | </v-card-actions> |
168 | </v-flex> | 168 | </v-flex> |
169 | </v-flex> | 169 | </v-flex> |
170 | </v-card> | 170 | </v-card> |
171 | </v-dialog> | 171 | </v-dialog> |
172 | <v-snackbar | 172 | <v-snackbar |
173 | :timeout="timeout" | 173 | :timeout="timeout" |
174 | :top="y === 'top'" | 174 | :top="y === 'top'" |
175 | :right="x === 'right'" | 175 | :right="x === 'right'" |
176 | :vertical="mode === 'vertical'" | 176 | :vertical="mode === 'vertical'" |
177 | v-model="snackbar" | 177 | v-model="snackbar" |
178 | color="success" | 178 | color="success" |
179 | >{{ text }}</v-snackbar> | 179 | >{{ text }}</v-snackbar> |
180 | <div class="loader" v-if="showLoader"> | 180 | <div class="loader" v-if="showLoader"> |
181 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 181 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
182 | </div> | 182 | </div> |
183 | </v-container> | 183 | </v-container> |
184 | </template> | 184 | </template> |
185 | 185 | ||
186 | <script> | 186 | <script> |
187 | import http from "@/Services/http.js"; | 187 | import http from "@/Services/http.js"; |
188 | import moment from "moment"; | 188 | import moment from "moment"; |
189 | 189 | ||
190 | export default { | 190 | export default { |
191 | data: () => ({ | 191 | data: () => ({ |
192 | snackbar: false, | 192 | snackbar: false, |
193 | y: "top", | 193 | y: "top", |
194 | x: "right", | 194 | x: "right", |
195 | mode: "", | 195 | mode: "", |
196 | timeout: 5000, | 196 | timeout: 5000, |
197 | text: "", | 197 | text: "", |
198 | date: null, | 198 | date: null, |
199 | menu: false, | 199 | menu: false, |
200 | show: true, | 200 | show: true, |
201 | showSearch: false, | 201 | showSearch: false, |
202 | addTeacherAttendenceDialog: false, | 202 | addTeacherAttendenceDialog: false, |
203 | attendeceTable: false, | 203 | attendeceTable: false, |
204 | showLoader: false, | 204 | showLoader: false, |
205 | loading: false, | 205 | loading: false, |
206 | search: "", | 206 | search: "", |
207 | valid: true, | 207 | valid: true, |
208 | isActive: true, | 208 | isActive: true, |
209 | newActive: false, | 209 | newActive: false, |
210 | dataValid: [v => !!v || "Date is required"], | 210 | dataValid: [v => !!v || "Date is required"], |
211 | attendenceType: [ | 211 | attendenceType: [ |
212 | { | 212 | { |
213 | label: "Present", | 213 | label: "Present", |
214 | value: "present" | 214 | value: "present" |
215 | }, | 215 | }, |
216 | { | 216 | { |
217 | label: "Late Present With Excuset", | 217 | label: "Late Present With Excuset", |
218 | value: "latePresentWithExcuse" | 218 | value: "latePresentWithExcuse" |
219 | }, | 219 | }, |
220 | { | 220 | { |
221 | label: "Late Present", | 221 | label: "Late Present", |
222 | value: "latePresent" | 222 | value: "latePresent" |
223 | }, | 223 | }, |
224 | { | 224 | { |
225 | label: "Absent", | 225 | label: "Absent", |
226 | value: "absent" | 226 | value: "absent" |
227 | } | 227 | } |
228 | ], | 228 | ], |
229 | pagination: { | 229 | pagination: { |
230 | rowsPerPage: 8 | 230 | rowsPerPage: 8 |
231 | }, | 231 | }, |
232 | headers: [ | 232 | headers: [ |
233 | { | 233 | { |
234 | text: "No", | 234 | text: "No", |
235 | align: "", | 235 | align: "", |
236 | sortable: false, | 236 | sortable: false, |
237 | value: "No" | 237 | value: "No" |
238 | }, | 238 | }, |
239 | { | 239 | { |
240 | text: "Profile Pic", | 240 | text: "Profile Pic", |
241 | value: "profilePicUrl", | 241 | value: "profilePicUrl", |
242 | sortable: false, | 242 | sortable: false, |
243 | align: "center" | 243 | align: "center" |
244 | }, | 244 | }, |
245 | { text: "Name", value: "name", sortable: false, align: "center" }, | 245 | { text: "Name", value: "name", sortable: false, align: "center" }, |
246 | { text: "Email", value: "email", sortable: false, align: "center" }, | 246 | { text: "Email", value: "email", sortable: false, align: "center" }, |
247 | { | 247 | { |
248 | text: "Mobile No", | 248 | text: "Mobile No", |
249 | value: "mobileNo", | 249 | value: "mobileNo", |
250 | sortable: false, | 250 | sortable: false, |
251 | align: "center" | 251 | align: "center" |
252 | }, | 252 | }, |
253 | { text: "Attendance", value: "", sortable: false, align: "center" } | 253 | { text: "Attendance", value: "", sortable: false, align: "center" } |
254 | ], | 254 | ], |
255 | desserts: [], | 255 | desserts: [], |
256 | teachersData: [], | 256 | teachersData: [], |
257 | addTeachers: {} | 257 | addTeachers: {} |
258 | }), | 258 | }), |
259 | watch: { | 259 | watch: { |
260 | menu(val) { | 260 | menu(val) { |
261 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "DAY")); | 261 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "DAY")); |
262 | } | 262 | } |
263 | }, | 263 | }, |
264 | methods: { | 264 | methods: { |
265 | save(date) { | 265 | save(date) { |
266 | this.$refs.menu.save(date); | 266 | this.$refs.menu.save(date); |
267 | }, | 267 | }, |
268 | showTable() { | 268 | showTable() { |
269 | this.attendeceTable = true; | 269 | this.attendeceTable = true; |
270 | this.getTeacherList(); | 270 | this.getTeacherList(); |
271 | }, | 271 | }, |
272 | getTeacherList() { | 272 | getTeacherList() { |
273 | this.showLoader = true; | 273 | this.showLoader = true; |
274 | var token = this.$store.state.token; | 274 | var token = this.$store.state.token; |
275 | http() | 275 | http() |
276 | .get("/getTeachersList", { | 276 | .get("/getTeachersList", { |
277 | headers: { Authorization: "Bearer " + token } | 277 | headers: { Authorization: "Bearer " + token } |
278 | }) | 278 | }) |
279 | .then(response => { | 279 | .then(response => { |
280 | this.teachersData = response.data.data; | 280 | this.teachersData = response.data.data; |
281 | this.desserts = response.data.data; | 281 | this.desserts = response.data.data; |
282 | var attendence = ""; | 282 | var attendence = ""; |
283 | for (let i = 0; i < this.teachersData.length; i++) { | 283 | for (let i = 0; i < this.teachersData.length; i++) { |
284 | this.teachersData[i].attendence = "present"; | 284 | this.teachersData[i].attendence = "present"; |
285 | } | 285 | } |
286 | this.showLoader = false; | 286 | this.showLoader = false; |
287 | // console.log("getTeacherList=====>",this.desserts) | 287 | // console.log("getTeacherList=====>",this.desserts) |
288 | }) | 288 | }) |
289 | .catch(error => { | 289 | .catch(error => { |
290 | this.showLoader = false; | 290 | this.showLoader = false; |
291 | if (error.response.status === 401) { | 291 | if (error.response.status === 401) { |
292 | this.$router.replace({ path: "/" }); | 292 | this.$router.replace({ path: "/" }); |
293 | this.$store.dispatch("setToken", null); | 293 | this.$store.dispatch("setToken", null); |
294 | this.$store.dispatch("Id", null); | 294 | this.$store.dispatch("Id", null); |
295 | } | 295 | } |
296 | }); | 296 | }); |
297 | }, | 297 | }, |
298 | submit() { | 298 | submit() { |
299 | var teachersAttendence = []; | 299 | var teachersAttendence = []; |
300 | for (var j = 0; j < this.teachersData.length; j++) { | 300 | for (var j = 0; j < this.teachersData.length; j++) { |
301 | teachersAttendence.push({ | 301 | teachersAttendence.push({ |
302 | teacherId: this.teachersData[j]._id, | 302 | teacherId: this.teachersData[j]._id, |
303 | attendanceType: this.teachersData[j].attendence | 303 | attendanceType: this.teachersData[j].attendence |
304 | }); | 304 | }); |
305 | } | 305 | } |
306 | if (this.$refs.form.validate()) { | 306 | if (this.$refs.form.validate()) { |
307 | let attendanceData = { | 307 | let attendanceData = { |
308 | date: this.date, | 308 | date: this.date, |
309 | teachers: teachersAttendence | 309 | teachers: teachersAttendence |
310 | }; | 310 | }; |
311 | http() | 311 | http() |
312 | .post("/createTeacherAttendance", attendanceData) | 312 | .post("/createTeacherAttendance", attendanceData) |
313 | .then(response => { | 313 | .then(response => { |
314 | this.snackbar = true; | 314 | this.snackbar = true; |
315 | this.text = response.data.message; | 315 | this.text = response.data.message; |
316 | this.addTeacherAttendenceDialog = false; | 316 | this.addTeacherAttendenceDialog = false; |
317 | }) | 317 | }) |
318 | .catch(error => { | 318 | .catch(error => { |
319 | this.snackbar = true; | 319 | this.snackbar = true; |
320 | this.text = error.response.data.message; | 320 | this.text = error.response.data.message; |
321 | }); | 321 | }); |
322 | } | 322 | } |
323 | }, | 323 | }, |
324 | clear() { | 324 | clear() { |
325 | this.$refs.form.reset(); | 325 | this.$refs.form.reset(); |
326 | this.imageUrl = ""; | 326 | this.imageUrl = ""; |
327 | }, | 327 | }, |
328 | 328 | ||
329 | displaySearch() { | 329 | displaySearch() { |
330 | (this.show = false), (this.showSearch = true); | 330 | (this.show = false), (this.showSearch = true); |
331 | }, | 331 | }, |
332 | closeSearch() { | 332 | closeSearch() { |
333 | this.showSearch = false; | 333 | this.showSearch = false; |
334 | this.show = true; | 334 | this.show = true; |
335 | this.search = ""; | 335 | this.search = ""; |
336 | } | 336 | } |
337 | }, | 337 | }, |
338 | mounted() { | 338 | mounted() { |
339 | this.getTeacherList(); | 339 | this.getTeacherList(); |
340 | } | 340 | } |
341 | }; | 341 | }; |
342 | </script> | 342 | </script> |
src/pages/Attendence/viewStudentsAttendence.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid grid-list-md class="body-color"> | 2 | <v-container fluid grid-list-md class="body-color"> |
3 | <div v-show="hideData"> | 3 | <div v-show="hideData"> |
4 | <v-layout row> | 4 | <v-layout row> |
5 | <v-btn @click="exportPdf" round class="right open-dialog-button" dark> | 5 | <v-btn @click="exportPdf" round class="right open-dialog-button" dark> |
6 | Export Pdf | 6 | Export Pdf |
7 | <v-icon dark right size="20">save_alt</v-icon> | 7 | <v-icon dark right size="20">save_alt</v-icon> |
8 | </v-btn> | 8 | </v-btn> |
9 | <v-dialog v-model="dialogExport" max-width="500px"> | 9 | <v-dialog v-model="dialogExport" max-width="500px"> |
10 | <v-btn round slot="activator" class="right open-dialog-button" dark> | 10 | <v-btn round slot="activator" class="right open-dialog-button" dark> |
11 | Export csv | 11 | Export csv |
12 | <v-icon dark right size="20">save_alt</v-icon> | 12 | <v-icon dark right size="20">save_alt</v-icon> |
13 | </v-btn> | 13 | </v-btn> |
14 | <v-card flat class="card-style pa-2" dark> | 14 | <v-card flat class="card-style pa-2" dark> |
15 | <v-layout> | 15 | <v-layout> |
16 | <v-flex xs12> | 16 | <v-flex xs12> |
17 | <label class="title text-xs-center">Export</label> | 17 | <label class="title text-xs-center">Export</label> |
18 | <v-icon size="24" class="right" @click="dialogExport = false">cancel</v-icon> | 18 | <v-icon size="24" class="right" @click="dialogExport = false">cancel</v-icon> |
19 | </v-flex> | 19 | </v-flex> |
20 | </v-layout> | 20 | </v-layout> |
21 | <v-card-text> | 21 | <v-card-text> |
22 | <v-container grid-list-md> | 22 | <v-container grid-list-md> |
23 | <v-layout wrap> | 23 | <v-layout wrap> |
24 | <v-flex xs12> | 24 | <v-flex xs12> |
25 | <v-menu | 25 | <v-menu |
26 | ref="menuStartDate" | 26 | ref="menuStartDate" |
27 | :close-on-content-click="false" | 27 | :close-on-content-click="false" |
28 | v-model="menuStartDate" | 28 | v-model="menuStartDate" |
29 | :nudge-right="40" | 29 | :nudge-right="40" |
30 | :return-value.sync="startDate" | 30 | :return-value.sync="startDate" |
31 | lazy | 31 | lazy |
32 | transition="scale-transition" | 32 | transition="scale-transition" |
33 | offset-y | 33 | offset-y |
34 | full-width | 34 | full-width |
35 | min-width="290px" | 35 | min-width="290px" |
36 | > | 36 | > |
37 | <v-text-field | 37 | <v-text-field |
38 | slot="activator" | 38 | slot="activator" |
39 | v-model="startDate" | 39 | v-model="startDate" |
40 | label="Select Start Date" | 40 | label="Select Start Date" |
41 | prepend-icon="event" | 41 | prepend-icon="event" |
42 | readonly | 42 | readonly |
43 | ></v-text-field> | 43 | ></v-text-field> |
44 | <v-date-picker | 44 | <v-date-picker |
45 | v-model="startDate" | 45 | v-model="startDate" |
46 | @input="$refs.menuStartDate.save(startDate)" | 46 | @input="$refs.menuStartDate.save(startDate)" |
47 | ></v-date-picker> | 47 | ></v-date-picker> |
48 | </v-menu> | 48 | </v-menu> |
49 | </v-flex> | 49 | </v-flex> |
50 | <v-flex xs12> | 50 | <v-flex xs12> |
51 | <v-menu | 51 | <v-menu |
52 | ref="menuEndDate" | 52 | ref="menuEndDate" |
53 | :close-on-content-click="false" | 53 | :close-on-content-click="false" |
54 | v-model="menuEndDate" | 54 | v-model="menuEndDate" |
55 | :nudge-right="40" | 55 | :nudge-right="40" |
56 | :return-value.sync="endDate" | 56 | :return-value.sync="endDate" |
57 | lazy | 57 | lazy |
58 | transition="scale-transition" | 58 | transition="scale-transition" |
59 | offset-y | 59 | offset-y |
60 | full-width | 60 | full-width |
61 | min-width="290px" | 61 | min-width="290px" |
62 | > | 62 | > |
63 | <v-text-field | 63 | <v-text-field |
64 | slot="activator" | 64 | slot="activator" |
65 | v-model="endDate" | 65 | v-model="endDate" |
66 | label="Select End Date" | 66 | label="Select End Date" |
67 | prepend-icon="event" | 67 | prepend-icon="event" |
68 | readonly | 68 | readonly |
69 | ></v-text-field> | 69 | ></v-text-field> |
70 | <v-date-picker v-model="endDate" @input="$refs.menuEndDate.save(endDate)"></v-date-picker> | 70 | <v-date-picker v-model="endDate" @input="$refs.menuEndDate.save(endDate)"></v-date-picker> |
71 | </v-menu> | 71 | </v-menu> |
72 | </v-flex> | 72 | </v-flex> |
73 | <v-flex xs12> | 73 | <v-flex xs12> |
74 | <v-card-actions> | 74 | <v-card-actions> |
75 | <v-spacer></v-spacer> | 75 | <v-spacer></v-spacer> |
76 | <download-csv :data="json_data"> | 76 | <download-csv :data="json_data"> |
77 | <v-btn class="add-button" round @click.native="exportData">Export</v-btn> | 77 | <v-btn class="add-button" round @click.native="exportData">Export</v-btn> |
78 | </download-csv> | 78 | </download-csv> |
79 | </v-card-actions> | 79 | </v-card-actions> |
80 | </v-flex> | 80 | </v-flex> |
81 | </v-layout> | 81 | </v-layout> |
82 | </v-container> | 82 | </v-container> |
83 | </v-card-text> | 83 | </v-card-text> |
84 | </v-card> | 84 | </v-card> |
85 | </v-dialog> | 85 | </v-dialog> |
86 | </v-layout> | 86 | </v-layout> |
87 | <v-layout wrap> | 87 | <v-layout wrap> |
88 | <v-flex xs12 sm12 md4> | 88 | <v-flex xs12 sm12 md4> |
89 | <v-card flat> | 89 | <v-card flat> |
90 | <!-- <v-layout> | 90 | <!-- <v-layout> |
91 | <v-flex xs12> | 91 | <v-flex xs12> |
92 | <label class="title card-style text-xs-center">Profile</label> | 92 | <label class="title card-style text-xs-center">Profile</label> |
93 | </v-flex> | 93 | </v-flex> |
94 | </v-layout>--> | 94 | </v-layout>--> |
95 | <h3 class="py-2 text-xs-center card-style white--text">Profile</h3> | 95 | <h3 class="py-2 text-xs-center card-style white--text">Profile</h3> |
96 | <v-card-text> | 96 | <v-card-text> |
97 | <v-container> | 97 | <v-container> |
98 | <v-layout wrap> | 98 | <v-layout wrap> |
99 | <v-flex xs12> | 99 | <v-flex xs12> |
100 | <v-layout> | 100 | <v-layout> |
101 | <v-flex | 101 | <v-flex |
102 | xs12 | 102 | xs12 |
103 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 103 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
104 | > | 104 | > |
105 | <v-avatar size="80px"> | 105 | <v-avatar size="80px"> |
106 | <img src="/static/icon/user.png" v-if="!studentData.profilePicUrl" /> | 106 | <img src="/static/icon/user.png" v-if="!studentData.profilePicUrl" /> |
107 | <img | 107 | <img |
108 | :src="studentData.profilePicUrl" | 108 | :src="studentData.profilePicUrl" |
109 | v-else-if="studentData.profilePicUrl" | 109 | v-else-if="studentData.profilePicUrl" |
110 | /> | 110 | /> |
111 | </v-avatar> | 111 | </v-avatar> |
112 | </v-flex> | 112 | </v-flex> |
113 | </v-layout> | 113 | </v-layout> |
114 | <v-layout> | 114 | <v-layout> |
115 | <v-flex xs12 sm12> | 115 | <v-flex xs12 sm12> |
116 | <h3 class="text-xs-center"> | 116 | <h3 class="text-xs-center"> |
117 | <b>{{ studentData.name }}</b> | 117 | <b>{{ studentData.name }}</b> |
118 | </h3> | 118 | </h3> |
119 | <p class="text-xs-center grey--text">Student</p> | 119 | <p class="text-xs-center grey--text">Student</p> |
120 | </v-flex> | 120 | </v-flex> |
121 | </v-layout> | 121 | </v-layout> |
122 | <v-layout style="border: 1px solid lightgrey;"> | 122 | <v-layout style="border: 1px solid lightgrey;"> |
123 | <v-flex xs6 sm6 class="pa-0"> | 123 | <v-flex xs6 sm6 class="pa-0"> |
124 | <h4 class="right"> | 124 | <h4 class="right"> |
125 | <b>Roll No :</b> | 125 | <b>Roll No :</b> |
126 | </h4> | 126 | </h4> |
127 | </v-flex> | 127 | </v-flex> |
128 | <v-flex sm6 xs6 class="pa-0"> | 128 | <v-flex sm6 xs6 class="pa-0"> |
129 | <h4>{{ studentData.rollNo }}</h4> | 129 | <h4>{{ studentData.rollNo }}</h4> |
130 | </v-flex> | 130 | </v-flex> |
131 | </v-layout> | 131 | </v-layout> |
132 | <v-layout style="border: 1px solid lightgrey;"> | 132 | <v-layout style="border: 1px solid lightgrey;"> |
133 | <v-flex xs6 sm6 class="pa-0"> | 133 | <v-flex xs6 sm6 class="pa-0"> |
134 | <h4 class="right"> | 134 | <h4 class="right"> |
135 | <b>Class :</b> | 135 | <b>Class :</b> |
136 | </h4> | 136 | </h4> |
137 | </v-flex> | 137 | </v-flex> |
138 | <v-flex sm6 xs6 class="right pa-0"> | 138 | <v-flex sm6 xs6 class="right pa-0"> |
139 | <h4>{{ studentData.classId.classNum }}</h4> | 139 | <h4>{{ studentData.classId.classNum }}</h4> |
140 | </v-flex> | 140 | </v-flex> |
141 | </v-layout> | 141 | </v-layout> |
142 | <v-layout style="border: 1px solid lightgrey;"> | 142 | <v-layout style="border: 1px solid lightgrey;"> |
143 | <v-flex xs6 sm6 class="right pa-0"> | 143 | <v-flex xs6 sm6 class="right pa-0"> |
144 | <h4 class="right"> | 144 | <h4 class="right"> |
145 | <b>Section :</b> | 145 | <b>Section :</b> |
146 | </h4> | 146 | </h4> |
147 | </v-flex> | 147 | </v-flex> |
148 | <v-flex sm6 xs6 class="right pa-0"> | 148 | <v-flex sm6 xs6 class="right pa-0"> |
149 | <h4>{{ studentData.sectionId.name}}</h4> | 149 | <h4>{{ studentData.sectionId.name}}</h4> |
150 | </v-flex> | 150 | </v-flex> |
151 | </v-layout> | 151 | </v-layout> |
152 | </v-flex> | 152 | </v-flex> |
153 | </v-layout> | 153 | </v-layout> |
154 | </v-container> | 154 | </v-container> |
155 | </v-card-text> | 155 | </v-card-text> |
156 | </v-card> | 156 | </v-card> |
157 | </v-flex> | 157 | </v-flex> |
158 | <v-flex xs12 sm12 md8> | 158 | <v-flex xs12 sm12 md8> |
159 | <v-card flat> | 159 | <v-card flat> |
160 | <h3 class="py-2 text-xs-center card-style white--text"> | 160 | <h3 class="py-2 text-xs-center card-style white--text"> |
161 | Attendence | 161 | Attendence |
162 | <span class="ml-4"> | 162 | <span class="ml-4"> |
163 | <v-avatar class="green caption" size="12"></v-avatar> | 163 | <v-avatar class="green caption" size="12"></v-avatar> |
164 | <span class="subheading">Present</span> | 164 | <span class="subheading">Present</span> |
165 | </span> | 165 | </span> |
166 | <span class="ml-4"> | 166 | <span class="ml-4"> |
167 | <v-avatar color="red caption" size="12" class></v-avatar> | 167 | <v-avatar color="red caption" size="12" class></v-avatar> |
168 | <span class="subheading">Absent</span> | 168 | <span class="subheading">Absent</span> |
169 | </span> | 169 | </span> |
170 | </h3> | 170 | </h3> |
171 | <YearCalendar | 171 | <YearCalendar |
172 | v-model="year" | 172 | v-model="year" |
173 | :activeDates="activeDates" | 173 | :activeDates="activeDates" |
174 | prefixClass="your_customized_wrapper_class" | 174 | prefixClass="your_customized_wrapper_class" |
175 | :activeClass="activeClass" | 175 | :activeClass="activeClass" |
176 | ></YearCalendar> | 176 | ></YearCalendar> |
177 | </v-card> | 177 | </v-card> |
178 | </v-flex> | 178 | </v-flex> |
179 | </v-layout> | 179 | </v-layout> |
180 | </div> | 180 | </div> |
181 | <v-layout v-show="showPdfData"> | 181 | <v-layout v-show="showPdfData"> |
182 | <v-container> | 182 | <v-container> |
183 | <v-flex xs12 sm12 md8 offset-sm2> | 183 | <v-flex xs12 sm12 md8 offset-sm2> |
184 | <v-btn class="right add-button" @click="generatePDF2Canvas()" :loading="loadingPdf" dark> | 184 | <v-btn class="right add-button" @click="generatePDF2Canvas()" :loading="loadingPdf" dark> |
185 | Download | 185 | Download |
186 | <v-icon dark right size="20">save_alt</v-icon> | 186 | <v-icon dark right size="20">save_alt</v-icon> |
187 | </v-btn> | 187 | </v-btn> |
188 | </v-flex> | 188 | </v-flex> |
189 | </v-container> | 189 | </v-container> |
190 | </v-layout> | 190 | </v-layout> |
191 | <v-layout v-show="showPdfData"> | 191 | <v-layout v-show="showPdfData"> |
192 | <v-container> | 192 | <v-container> |
193 | <v-layout v-show="showPdfData"> | 193 | <v-layout v-show="showPdfData"> |
194 | <v-flex xs12 sm12 md8 offset-sm2> | 194 | <v-flex xs12 sm12 md8 offset-sm2> |
195 | <div ref="printMe"> | 195 | <div ref="printMe"> |
196 | <v-flex xs12 class="pl-3"> | 196 | <v-flex xs12 class="pl-3"> |
197 | <v-layout> | 197 | <v-layout> |
198 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 198 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
199 | <h4> | 199 | <h4> |
200 | <b>Name</b> | 200 | <b>Name</b> |
201 | </h4> | 201 | </h4> |
202 | </v-flex> | 202 | </v-flex> |
203 | <v-flex sm10 xs6 class="pa-0"> | 203 | <v-flex sm10 xs6 class="pa-0"> |
204 | <h4>: {{ studentData.name }}</h4> | 204 | <h4>: {{ studentData.name }}</h4> |
205 | </v-flex> | 205 | </v-flex> |
206 | </v-layout> | 206 | </v-layout> |
207 | <v-layout> | 207 | <v-layout> |
208 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 208 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
209 | <h4> | 209 | <h4> |
210 | <b>Type</b> | 210 | <b>Type</b> |
211 | </h4> | 211 | </h4> |
212 | </v-flex> | 212 | </v-flex> |
213 | <v-flex sm10 xs6 class="pa-0 mb-1"> | 213 | <v-flex sm10 xs6 class="pa-0 mb-1"> |
214 | <h4>: Student</h4> | 214 | <h4>: Student</h4> |
215 | </v-flex> | 215 | </v-flex> |
216 | </v-layout> | 216 | </v-layout> |
217 | <v-layout> | 217 | <v-layout> |
218 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 218 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
219 | <h4> | 219 | <h4> |
220 | <b>Roll No</b> | 220 | <b>Roll No</b> |
221 | </h4> | 221 | </h4> |
222 | </v-flex> | 222 | </v-flex> |
223 | <v-flex sm10 xs6 class="pa-0 mb-1"> | 223 | <v-flex sm10 xs6 class="pa-0 mb-1"> |
224 | <h4>: {{ studentData.rollNo }}</h4> | 224 | <h4>: {{ studentData.rollNo }}</h4> |
225 | </v-flex> | 225 | </v-flex> |
226 | </v-layout> | 226 | </v-layout> |
227 | <v-layout> | 227 | <v-layout> |
228 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 228 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
229 | <h4> | 229 | <h4> |
230 | <b>Class</b> | 230 | <b>Class</b> |
231 | </h4> | 231 | </h4> |
232 | </v-flex> | 232 | </v-flex> |
233 | <v-flex sm10 xs6 class="pa-0 mb-1"> | 233 | <v-flex sm10 xs6 class="pa-0 mb-1"> |
234 | <h4>: {{ studentData.classId.classNum }}</h4> | 234 | <h4>: {{ studentData.classId.classNum }}</h4> |
235 | </v-flex> | 235 | </v-flex> |
236 | </v-layout> | 236 | </v-layout> |
237 | <v-layout> | 237 | <v-layout> |
238 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 238 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
239 | <h4> | 239 | <h4> |
240 | <b>Section</b> | 240 | <b>Section</b> |
241 | </h4> | 241 | </h4> |
242 | </v-flex> | 242 | </v-flex> |
243 | <v-flex sm10 xs6 class="pa-0 mb-3"> | 243 | <v-flex sm10 xs6 class="pa-0 mb-3"> |
244 | <h4>: {{ studentData.sectionId.name}}</h4> | 244 | <h4>: {{ studentData.sectionId.name}}</h4> |
245 | </v-flex> | 245 | </v-flex> |
246 | </v-layout> | 246 | </v-layout> |
247 | </v-flex> | 247 | </v-flex> |
248 | <v-card flat> | 248 | <v-card flat> |
249 | <h3 class="py-2 text-xs-center grey lighten-1 white--text"> | 249 | <h3 class="py-2 text-xs-center grey lighten-1 white--text"> |
250 | Attendence | 250 | Attendence |
251 | <span class="ml-4"> | 251 | <span class="ml-4"> |
252 | <v-avatar class="green caption" size="12"></v-avatar> | 252 | <v-avatar class="green caption" size="12"></v-avatar> |
253 | <span class="subheading">Present</span> | 253 | <span class="subheading">Present</span> |
254 | </span> | 254 | </span> |
255 | <span class="ml-4"> | 255 | <span class="ml-4"> |
256 | <v-avatar color="red caption" size="12" class></v-avatar> | 256 | <v-avatar color="red caption" size="12" class></v-avatar> |
257 | <span class="subheading">Absent</span> | 257 | <span class="subheading">Absent</span> |
258 | </span> | 258 | </span> |
259 | </h3> | 259 | </h3> |
260 | <YearCalendar | 260 | <YearCalendar |
261 | v-model="year" | 261 | v-model="year" |
262 | :activeDates="activeDates" | 262 | :activeDates="activeDates" |
263 | prefixClass="your_customized_wrapper_class" | 263 | prefixClass="your_customized_wrapper_class" |
264 | :activeClass="activeClass" | 264 | :activeClass="activeClass" |
265 | ></YearCalendar> | 265 | ></YearCalendar> |
266 | </v-card> | 266 | </v-card> |
267 | </div> | 267 | </div> |
268 | </v-flex> | 268 | </v-flex> |
269 | </v-layout> | 269 | </v-layout> |
270 | </v-container> | 270 | </v-container> |
271 | </v-layout> | 271 | </v-layout> |
272 | <img :src="output" v-show="false" /> | 272 | <img :src="output" v-show="false" /> |
273 | <div class="loader" v-if="showLoader"> | 273 | <div class="loader" v-if="showLoader"> |
274 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 274 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
275 | </div> | 275 | </div> |
276 | </v-container> | 276 | </v-container> |
277 | </template> | 277 | </template> |
278 | 278 | ||
279 | <script lang="js"> | 279 | <script lang="js"> |
280 | import moment from "moment"; | 280 | import moment from "moment"; |
281 | import http from "@/Services/http.js"; | 281 | import http from "@/Services/http.js"; |
282 | import YearCalendar from "vue-material-year-calendar"; | 282 | import YearCalendar from "vue-material-year-calendar"; |
283 | import jsPDF from 'jspdf'; | 283 | import jsPDF from 'jspdf'; |
284 | // eslint-disable-next-line | 284 | // eslint-disable-next-line |
285 | import autoTable from 'jspdf-autotable'; | 285 | import autoTable from 'jspdf-autotable'; |
286 | 286 | ||
287 | export default { | 287 | export default { |
288 | components: { YearCalendar }, | 288 | components: { YearCalendar }, |
289 | data() { | 289 | data() { |
290 | return { | 290 | return { |
291 | showPdfData:false, | 291 | showPdfData:false, |
292 | hideData:true, | 292 | hideData:true, |
293 | loadingPdf:false, | 293 | loadingPdf:false, |
294 | output:null, | 294 | output:null, |
295 | studentsList: [], | 295 | studentsList: [], |
296 | json_data: [], | 296 | json_data: [], |
297 | dialogExport: false, | 297 | dialogExport: false, |
298 | startDate: "", | 298 | startDate: "", |
299 | endDate: "", | 299 | endDate: "", |
300 | menuEndDate: false, | 300 | menuEndDate: false, |
301 | menuStartDate: false, | 301 | menuStartDate: false, |
302 | showLoader: false, | 302 | showLoader: false, |
303 | token: "", | 303 | token: "", |
304 | year: new Date().getFullYear(), | 304 | year: new Date().getFullYear(), |
305 | activeDates: [], | 305 | activeDates: [], |
306 | activeClass: "", | 306 | activeClass: "", |
307 | studentData: {} | 307 | studentData: {} |
308 | }; | 308 | }; |
309 | }, | 309 | }, |
310 | mounted() { | 310 | mounted() { |
311 | this.token = this.$store.state.token; | 311 | this.token = this.$store.state.token; |
312 | this.getStudentAttendence(); | 312 | this.getStudentAttendence(); |
313 | this.getStudentData(); | 313 | this.getStudentData(); |
314 | }, | 314 | }, |
315 | methods: { | 315 | methods: { |
316 | dates: function(date) { | 316 | dates: function(date) { |
317 | return moment(date).format("MMMM DD, YYYY"); | 317 | return moment(date).format("MMMM DD, YYYY"); |
318 | }, | 318 | }, |
319 | getStudentAttendence() { | 319 | getStudentAttendence() { |
320 | this.showLoader = true; | 320 | this.showLoader = true; |
321 | http() | 321 | http() |
322 | .get( | 322 | .get( |
323 | "/studentAttendance", | 323 | "/studentAttendance", |
324 | { params: { studentId: this.$route.params.id } }, | 324 | { params: { studentId: this.$route.params.id } }, |
325 | { | 325 | { |
326 | headers: { Authorization: "Bearer " + this.token } | 326 | headers: { Authorization: "Bearer " + this.token } |
327 | } | 327 | } |
328 | ) | 328 | ) |
329 | .then(response => { | 329 | .then(response => { |
330 | this.showLoader = false; | 330 | this.showLoader = false; |
331 | let array = []; | 331 | let array = []; |
332 | for (let i = 0; i < response.data.data.length; i++) { | 332 | for (let i = 0; i < response.data.data.length; i++) { |
333 | if (response.data.data[i].students[0].isPresent == true) { | 333 | if (response.data.data[i].students[0].isPresent == true) { |
334 | array.push({ | 334 | array.push({ |
335 | date: response.data.data[i].date, | 335 | date: response.data.data[i].date, |
336 | className: "green" | 336 | className: "green" |
337 | }); | 337 | }); |
338 | } else if (response.data.data[i].students[0].isPresent == false) { | 338 | } else if (response.data.data[i].students[0].isPresent == false) { |
339 | array.push({ | 339 | array.push({ |
340 | date: response.data.data[i].date, | 340 | date: response.data.data[i].date, |
341 | className: "red" | 341 | className: "red" |
342 | }); | 342 | }); |
343 | } | 343 | } |
344 | } | 344 | } |
345 | this.activeDates = array; | 345 | this.activeDates = array; |
346 | }) | 346 | }) |
347 | .catch(error => { | 347 | .catch(error => { |
348 | this.showLoader = false; | 348 | this.showLoader = false; |
349 | if (error.response.status === 401) { | 349 | if (error.response.status === 401) { |
350 | this.$router.replace({ path: "/" }); | 350 | this.$router.replace({ path: "/" }); |
351 | this.$store.dispatch("setToken", null); | 351 | this.$store.dispatch("setToken", null); |
352 | this.$store.dispatch("Id", null); | 352 | this.$store.dispatch("Id", null); |
353 | this.$store.dispatch("Role", null); | 353 | this.$store.dispatch("Role", null); |
354 | } | 354 | } |
355 | }); | 355 | }); |
356 | }, | 356 | }, |
357 | getStudentData() { | 357 | getStudentData() { |
358 | http() | 358 | http() |
359 | .get( | 359 | .get( |
360 | "/getParticularStudentDetail", | 360 | "/getParticularStudentDetail", |
361 | { params: { studentId: this.$route.params.id } }, | 361 | { params: { studentId: this.$route.params.id } }, |
362 | { | 362 | { |
363 | headers: { Authorization: "Bearer " + this.token } | 363 | headers: { Authorization: "Bearer " + this.token } |
364 | } | 364 | } |
365 | ) | 365 | ) |
366 | .then(response => { | 366 | .then(response => { |
367 | this.studentData = response.data.data; | 367 | this.studentData = response.data.data; |
368 | }) | 368 | }) |
369 | .catch(err => { | 369 | .catch(err => { |
370 | console.log("err====>", err); | 370 | console.log("err====>", err); |
371 | // this.$router.replace({ path: '/' }); | 371 | // this.$router.replace({ path: '/' }); |
372 | }); | 372 | }); |
373 | }, | 373 | }, |
374 | exportData() { | 374 | exportData() { |
375 | http() | 375 | http() |
376 | .get( | 376 | .get( |
377 | "/studentAttendanceByMonth", | 377 | "/studentAttendanceByMonth", |
378 | { | 378 | { |
379 | params: { | 379 | params: { |
380 | studentId: this.$route.params.id, | 380 | studentId: this.$route.params.id, |
381 | startDate: this.startDate, | 381 | startDate: this.startDate, |
382 | endDate: this.endDate | 382 | endDate: this.endDate |
383 | } | 383 | } |
384 | }, | 384 | }, |
385 | { | 385 | { |
386 | headers: { Authorization: "Bearer " + this.token } | 386 | headers: { Authorization: "Bearer " + this.token } |
387 | } | 387 | } |
388 | ) | 388 | ) |
389 | .then(response => { | 389 | .then(response => { |
390 | this.json_data = response.data.data; | 390 | this.json_data = response.data.data; |
391 | this.dialogExport = true; | 391 | this.dialogExport = false; |
392 | }) | 392 | }) |
393 | .catch(err => { | 393 | .catch(err => { |
394 | console.log("err====>", err); | 394 | console.log("err====>", err); |
395 | // this.$router.replace({ path: '/' }); | 395 | // this.$router.replace({ path: '/' }); |
396 | }); | 396 | }); |
397 | }, | 397 | }, |
398 | exportPdf(){ | 398 | exportPdf(){ |
399 | this.hideData = false; | 399 | this.hideData = false; |
400 | this.showPdfData = true | 400 | this.showPdfData = true |
401 | }, | 401 | }, |
402 | async generatePDF2Canvas(){ | 402 | async generatePDF2Canvas(){ |
403 | this.loadingPdf = true | 403 | this.loadingPdf = true |
404 | const el = this.$refs.printMe; | 404 | const el = this.$refs.printMe; |
405 | // add option type to get the image version | 405 | // add option type to get the image version |
406 | // if not provided the promise will return | 406 | // if not provided the promise will return |
407 | // the canvas. | 407 | // the canvas. |
408 | const options = { | 408 | const options = { |
409 | type: 'dataURL' | 409 | type: 'dataURL' |
410 | } | 410 | } |
411 | this.output = await this.$html2canvas(el, options); | 411 | this.output = await this.$html2canvas(el, options); |
412 | if(this.output) { | 412 | if(this.output) { |
413 | this.loadingPdf = false | 413 | this.loadingPdf = false |
414 | } | 414 | } |
415 | let doc = new jsPDF(); | 415 | let doc = new jsPDF(); |
416 | doc.addImage(this.output, 'JPEG', 5, 10, 200, 280); | 416 | doc.addImage(this.output, 'JPEG', 5, 10, 200, 280); |
417 | doc.save("Attendance.pdf"); | 417 | doc.save("Attendance.pdf"); |
418 | } | 418 | } |
419 | } | 419 | } |
420 | }; | 420 | }; |
421 | </script> | 421 | </script> |
422 | 422 | ||
423 | <style lang="stylus"> | 423 | <style lang="stylus"> |
424 | .your_customized_wrapper_class { | 424 | .your_customized_wrapper_class { |
425 | background-color: #0aa; | 425 | background-color: #0aa; |
426 | color: white; | 426 | color: white; |
427 | 427 | ||
428 | &.red { | 428 | &.red { |
429 | background-color: red; | 429 | background-color: red; |
430 | color: white; | 430 | color: white; |
431 | 431 | ||
432 | &:after { | 432 | &:after { |
433 | background-size: 100% 100%; | 433 | background-size: 100% 100%; |
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | &.blue { | 437 | &.blue { |
438 | background-color: #0000aa; | 438 | background-color: #0000aa; |
439 | color: white; | 439 | color: white; |
440 | } | 440 | } |
441 | 441 | ||
442 | &.your_customized_classname { | 442 | &.your_customized_classname { |
443 | background-color: yellow; | 443 | background-color: yellow; |
444 | color: black; | 444 | color: black; |
445 | } | 445 | } |
446 | } | 446 | } |
447 | </style> | 447 | </style> |
448 | <style scoped> | 448 | <style scoped> |
449 | .add-button { | 449 | .add-button { |
450 | background: #feb83c !important; | 450 | background: #feb83c !important; |
451 | border-color: #feb83c !important; | 451 | border-color: #feb83c !important; |
452 | text-transform: none !important; | 452 | text-transform: none !important; |
453 | -webkit-box-shadow: none !important; | 453 | -webkit-box-shadow: none !important; |
454 | box-shadow: none !important; | 454 | box-shadow: none !important; |
455 | } | 455 | } |
456 | .card-style { | 456 | .card-style { |
457 | background: #7f62f8 !important; | 457 | background: #7f62f8 !important; |
458 | border-color: #7f62f8 !important; | 458 | border-color: #7f62f8 !important; |
459 | border-radius: 12px; | 459 | border-radius: 12px; |
460 | } | 460 | } |
461 | .open-dialog-button { | 461 | .open-dialog-button { |
462 | background: #827bfa !important; | 462 | background: #827bfa !important; |
463 | border-color: #827bfa !important; | 463 | border-color: #827bfa !important; |
464 | text-transform: none !important; | 464 | text-transform: none !important; |
465 | } | 465 | } |
466 | </style> | 466 | </style> |
src/pages/Attendence/viewTeacherAttendence.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid grid-list-md> | 2 | <v-container fluid grid-list-md> |
3 | <div v-show="hideData"> | 3 | <div v-show="hideData"> |
4 | <v-layout row> | 4 | <v-layout row> |
5 | <v-btn @click="exportPdf" round class="right open-dialog-button" dark> | 5 | <v-btn @click="exportPdf" round class="right open-dialog-button" dark> |
6 | Export Pdf | 6 | Export Pdf |
7 | <v-icon dark right size="20">save_alt</v-icon> | 7 | <v-icon dark right size="20">save_alt</v-icon> |
8 | </v-btn> | 8 | </v-btn> |
9 | <v-dialog v-model="dialogExport" max-width="500px"> | 9 | <v-dialog v-model="dialogExport" max-width="500px"> |
10 | <!-- <v-btn round slot="activator" class="right open-dialog-button" dark> | 10 | <v-btn round slot="activator" class="right open-dialog-button" dark> |
11 | Export csv | 11 | Export csv |
12 | <v-icon dark right size="20">save_alt</v-icon> | 12 | <v-icon dark right size="20">save_alt</v-icon> |
13 | </v-btn> --> | 13 | </v-btn> |
14 | <v-card flat class="card-style pa-2" dark> | 14 | <v-card flat class="card-style pa-2" dark> |
15 | <h3 class=" title text-xs-center">Export</h3> | 15 | <h3 class=" title text-xs-center">Export</h3> |
16 | <v-card-text> | 16 | <v-card-text> |
17 | <v-container grid-list-md> | 17 | <v-container grid-list-md> |
18 | <v-layout wrap> | 18 | <v-layout wrap> |
19 | <v-flex xs12> | 19 | <v-flex xs12> |
20 | <v-menu | 20 | <v-menu |
21 | ref="menuStartDate" | 21 | ref="menuStartDate" |
22 | :close-on-content-click="false" | 22 | :close-on-content-click="false" |
23 | v-model="menuStartDate" | 23 | v-model="menuStartDate" |
24 | :nudge-right="40" | 24 | :nudge-right="40" |
25 | :return-value.sync="startDate" | 25 | :return-value.sync="startDate" |
26 | lazy | 26 | lazy |
27 | transition="scale-transition" | 27 | transition="scale-transition" |
28 | offset-y | 28 | offset-y |
29 | full-width | 29 | full-width |
30 | min-width="290px" | 30 | min-width="290px" |
31 | > | 31 | > |
32 | <v-text-field | 32 | <v-text-field |
33 | slot="activator" | 33 | slot="activator" |
34 | v-model="startDate" | 34 | v-model="startDate" |
35 | label="Select Start Date" | 35 | label="Select Start Date" |
36 | prepend-icon="event" | 36 | prepend-icon="event" |
37 | readonly | 37 | readonly |
38 | ></v-text-field> | 38 | ></v-text-field> |
39 | <v-date-picker | 39 | <v-date-picker |
40 | v-model="startDate" | 40 | v-model="startDate" |
41 | @input="$refs.menuStartDate.save(startDate)" | 41 | @input="$refs.menuStartDate.save(startDate)" |
42 | ></v-date-picker> | 42 | ></v-date-picker> |
43 | </v-menu> | 43 | </v-menu> |
44 | </v-flex> | 44 | </v-flex> |
45 | <v-flex xs12> | 45 | <v-flex xs12> |
46 | <v-menu | 46 | <v-menu |
47 | ref="menuEndDate" | 47 | ref="menuEndDate" |
48 | :close-on-content-click="false" | 48 | :close-on-content-click="false" |
49 | v-model="menuEndDate" | 49 | v-model="menuEndDate" |
50 | :nudge-right="40" | 50 | :nudge-right="40" |
51 | :return-value.sync="endDate" | 51 | :return-value.sync="endDate" |
52 | lazy | 52 | lazy |
53 | transition="scale-transition" | 53 | transition="scale-transition" |
54 | offset-y | 54 | offset-y |
55 | full-width | 55 | full-width |
56 | min-width="290px" | 56 | min-width="290px" |
57 | > | 57 | > |
58 | <v-text-field | 58 | <v-text-field |
59 | slot="activator" | 59 | slot="activator" |
60 | v-model="endDate" | 60 | v-model="endDate" |
61 | label="Select End Date" | 61 | label="Select End Date" |
62 | prepend-icon="event" | 62 | prepend-icon="event" |
63 | readonly | 63 | readonly |
64 | ></v-text-field> | 64 | ></v-text-field> |
65 | <v-date-picker v-model="endDate" @input="$refs.menuEndDate.save(endDate)"></v-date-picker> | 65 | <v-date-picker v-model="endDate" @input="$refs.menuEndDate.save(endDate)"></v-date-picker> |
66 | </v-menu> | 66 | </v-menu> |
67 | </v-flex> | 67 | </v-flex> |
68 | </v-layout> | 68 | </v-layout> |
69 | </v-container> | 69 | </v-container> |
70 | </v-card-text> | 70 | </v-card-text> |
71 | <v-card-actions> | 71 | <v-card-actions> |
72 | <v-spacer></v-spacer> | 72 | <v-spacer></v-spacer> |
73 | <v-btn flat @click.native="dialogExport = false">Close</v-btn> | 73 | <v-btn flat @click.native="dialogExport = false">Close</v-btn> |
74 | <download-csv :data="json_data"> | 74 | <download-csv :data="json_data"> |
75 | <v-btn flat @click.native="exportData">Export</v-btn> | 75 | <v-btn flat @click.native="exportData">Export</v-btn> |
76 | </download-csv> | 76 | </download-csv> |
77 | </v-card-actions> | 77 | </v-card-actions> |
78 | </v-card> | 78 | </v-card> |
79 | </v-dialog> | 79 | </v-dialog> |
80 | </v-layout> | 80 | </v-layout> |
81 | <v-layout wrap> | 81 | <v-layout wrap> |
82 | <v-flex xs12 sm12 md4> | 82 | <v-flex xs12 sm12 md4> |
83 | <v-card flat> | 83 | <v-card flat> |
84 | <h3 class="py-2 text-xs-center card-style white--text">Profile</h3> | 84 | <h3 class="py-2 text-xs-center card-style white--text">Profile</h3> |
85 | <v-card-text> | 85 | <v-card-text> |
86 | <v-container> | 86 | <v-container> |
87 | <v-layout wrap> | 87 | <v-layout wrap> |
88 | <v-flex xs12> | 88 | <v-flex xs12> |
89 | <v-layout> | 89 | <v-layout> |
90 | <v-flex | 90 | <v-flex |
91 | xs12 | 91 | xs12 |
92 | class="text-xs-center text-sm-center text-md-center text-lg-center" | 92 | class="text-xs-center text-sm-center text-md-center text-lg-center" |
93 | > | 93 | > |
94 | <v-avatar size="80px"> | 94 | <v-avatar size="80px"> |
95 | <img src="/static/icon/user.png" v-if="!teacherData.profilePicUrl" /> | 95 | <img src="/static/icon/user.png" v-if="!teacherData.profilePicUrl" /> |
96 | <img | 96 | <img |
97 | :src="teacherData.profilePicUrl" | 97 | :src="teacherData.profilePicUrl" |
98 | v-else-if="teacherData.profilePicUrl" | 98 | v-else-if="teacherData.profilePicUrl" |
99 | /> | 99 | /> |
100 | </v-avatar> | 100 | </v-avatar> |
101 | </v-flex> | 101 | </v-flex> |
102 | </v-layout> | 102 | </v-layout> |
103 | <v-layout> | 103 | <v-layout> |
104 | <v-flex xs12 sm12> | 104 | <v-flex xs12 sm12> |
105 | <h3 class="text-xs-center"> | 105 | <h3 class="text-xs-center"> |
106 | <b>{{ teacherData.name }}</b> | 106 | <b>{{ teacherData.name }}</b> |
107 | </h3> | 107 | </h3> |
108 | <p class="text-xs-center grey--text">Teacher</p> | 108 | <p class="text-xs-center grey--text">Teacher</p> |
109 | </v-flex> | 109 | </v-flex> |
110 | </v-layout> | 110 | </v-layout> |
111 | <!-- <v-layout style="border: 1px solid lightgrey;"> | 111 | <!-- <v-layout style="border: 1px solid lightgrey;"> |
112 | <v-flex xs6 sm6 class="pa-0"> | 112 | <v-flex xs6 sm6 class="pa-0"> |
113 | <h4 class="right"> | 113 | <h4 class="right"> |
114 | <b>Gender :</b> | 114 | <b>Gender :</b> |
115 | </h4> | 115 | </h4> |
116 | </v-flex> | 116 | </v-flex> |
117 | <v-flex sm6 xs6 class="pa-0"> | 117 | <v-flex sm6 xs6 class="pa-0"> |
118 | <h4>{{ teacherData.teacherData.gender }}</h4> | 118 | <h4>{{ teacherData.teacherData.gender }}</h4> |
119 | </v-flex> | 119 | </v-flex> |
120 | </v-layout>--> | 120 | </v-layout>--> |
121 | <v-layout style="border: 1px solid lightgrey;"> | 121 | <v-layout style="border: 1px solid lightgrey;"> |
122 | <v-flex xs6 sm6 class="pa-0"> | 122 | <v-flex xs6 sm6 class="pa-0"> |
123 | <h4 class="right"> | 123 | <h4 class="right"> |
124 | <b>D.O.B:</b> | 124 | <b>D.O.B:</b> |
125 | </h4> | 125 | </h4> |
126 | </v-flex> | 126 | </v-flex> |
127 | <v-flex sm6 xs6 class="right pa-0"> | 127 | <v-flex sm6 xs6 class="right pa-0"> |
128 | <h4>{{ dates(teacherData.dob) }}</h4> | 128 | <h4>{{ dates(teacherData.dob) }}</h4> |
129 | </v-flex> | 129 | </v-flex> |
130 | </v-layout> | 130 | </v-layout> |
131 | <v-layout style="border: 1px solid lightgrey;"> | 131 | <v-layout style="border: 1px solid lightgrey;"> |
132 | <v-flex xs6 sm6 class="right pa-0"> | 132 | <v-flex xs6 sm6 class="right pa-0"> |
133 | <h4 class="right"> | 133 | <h4 class="right"> |
134 | <b>Phone :</b> | 134 | <b>Phone :</b> |
135 | </h4> | 135 | </h4> |
136 | </v-flex> | 136 | </v-flex> |
137 | <v-flex sm6 xs6 class="right pa-0"> | 137 | <v-flex sm6 xs6 class="right pa-0"> |
138 | <h4>{{ teacherData.mobileNo}}</h4> | 138 | <h4>{{ teacherData.mobileNo}}</h4> |
139 | </v-flex> | 139 | </v-flex> |
140 | </v-layout> | 140 | </v-layout> |
141 | </v-flex> | 141 | </v-flex> |
142 | </v-layout> | 142 | </v-layout> |
143 | </v-container> | 143 | </v-container> |
144 | </v-card-text> | 144 | </v-card-text> |
145 | </v-card> | 145 | </v-card> |
146 | </v-flex> | 146 | </v-flex> |
147 | <v-flex xs12 sm12 md8> | 147 | <v-flex xs12 sm12 md8> |
148 | <v-card flat> | 148 | <v-card flat> |
149 | <h3 class="py-2 text-xs-center card-style white--text"> | 149 | <h3 class="py-2 text-xs-center card-style white--text"> |
150 | Attendence | 150 | Attendence |
151 | <span class="ml-4"> | 151 | <span class="ml-4"> |
152 | <v-avatar class="green caption" size="12"></v-avatar> | 152 | <v-avatar class="green caption" size="12"></v-avatar> |
153 | <span class="subheading">Present</span> | 153 | <span class="subheading">Present</span> |
154 | </span> | 154 | </span> |
155 | <span class="ml-4"> | 155 | <span class="ml-4"> |
156 | <v-avatar color="red caption" size="12" class></v-avatar> | 156 | <v-avatar color="red caption" size="12" class></v-avatar> |
157 | <span class="subheading">Absent</span> | 157 | <span class="subheading">Absent</span> |
158 | </span> | 158 | </span> |
159 | </h3> | 159 | </h3> |
160 | <YearCalendar | 160 | <YearCalendar |
161 | v-model="year" | 161 | v-model="year" |
162 | :activeDates="activeDates" | 162 | :activeDates="activeDates" |
163 | prefixClass="your_customized_wrapper_class" | 163 | prefixClass="your_customized_wrapper_class" |
164 | :activeClass="activeClass" | 164 | :activeClass="activeClass" |
165 | ></YearCalendar> | 165 | ></YearCalendar> |
166 | </v-card> | 166 | </v-card> |
167 | </v-flex> | 167 | </v-flex> |
168 | </v-layout> | 168 | </v-layout> |
169 | </div> | 169 | </div> |
170 | <v-layout v-show="showPdfData"> | 170 | <v-layout v-show="showPdfData"> |
171 | <v-container> | 171 | <v-container> |
172 | <v-flex xs12 sm12 md8 offset-sm2> | 172 | <v-flex xs12 sm12 md8 offset-sm2> |
173 | <v-btn class="right add-button" @click="generatePDF2Canvas()" :loading="loadingPdf" dark> | 173 | <v-btn class="right add-button" @click="generatePDF2Canvas()" :loading="loadingPdf" dark> |
174 | Download | 174 | Download |
175 | <v-icon dark right size="20">save_alt</v-icon> | 175 | <v-icon dark right size="20">save_alt</v-icon> |
176 | </v-btn> | 176 | </v-btn> |
177 | </v-flex> | 177 | </v-flex> |
178 | </v-container> | 178 | </v-container> |
179 | </v-layout> | 179 | </v-layout> |
180 | <v-layout v-show="showPdfData"> | 180 | <v-layout v-show="showPdfData"> |
181 | <v-container> | 181 | <v-container> |
182 | <v-layout v-show="showPdfData"> | 182 | <v-layout v-show="showPdfData"> |
183 | <v-flex xs12 sm12 md8 offset-sm2> | 183 | <v-flex xs12 sm12 md8 offset-sm2> |
184 | <div ref="printMe"> | 184 | <div ref="printMe"> |
185 | <v-flex xs12 class="pl-3"> | 185 | <v-flex xs12 class="pl-3"> |
186 | <v-layout> | 186 | <v-layout> |
187 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 187 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
188 | <h4> | 188 | <h4> |
189 | <b>Name</b> | 189 | <b>Name</b> |
190 | </h4> | 190 | </h4> |
191 | </v-flex> | 191 | </v-flex> |
192 | <v-flex sm10 xs6 class="pa-0"> | 192 | <v-flex sm10 xs6 class="pa-0"> |
193 | <h4>: {{ teacherData.name }}</h4> | 193 | <h4>: {{ teacherData.name }}</h4> |
194 | </v-flex> | 194 | </v-flex> |
195 | </v-layout> | 195 | </v-layout> |
196 | <v-layout> | 196 | <v-layout> |
197 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 197 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
198 | <h4> | 198 | <h4> |
199 | <b>Email</b> | 199 | <b>Email</b> |
200 | </h4> | 200 | </h4> |
201 | </v-flex> | 201 | </v-flex> |
202 | <v-flex sm10 xs6 class="pa-0 mb-1"> | 202 | <v-flex sm10 xs6 class="pa-0 mb-1"> |
203 | <h4>: {{ teacherData.email }}</h4> | 203 | <h4>: {{ teacherData.email }}</h4> |
204 | </v-flex> | 204 | </v-flex> |
205 | </v-layout> | 205 | </v-layout> |
206 | <v-layout> | 206 | <v-layout> |
207 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 207 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
208 | <h4> | 208 | <h4> |
209 | <b>City</b> | 209 | <b>City</b> |
210 | </h4> | 210 | </h4> |
211 | </v-flex> | 211 | </v-flex> |
212 | <v-flex sm10 xs6 class="pa-0 mb-3"> | 212 | <v-flex sm10 xs6 class="pa-0 mb-3"> |
213 | <h4>: {{ teacherData.city}}</h4> | 213 | <h4>: {{ teacherData.city}}</h4> |
214 | </v-flex> | 214 | </v-flex> |
215 | </v-layout> | 215 | </v-layout> |
216 | <v-layout> | 216 | <v-layout> |
217 | <v-flex xs6 sm2 class="pa-0 mb-1"> | 217 | <v-flex xs6 sm2 class="pa-0 mb-1"> |
218 | <h4> | 218 | <h4> |
219 | <b>Mobile No</b> | 219 | <b>Mobile No</b> |
220 | </h4> | 220 | </h4> |
221 | </v-flex> | 221 | </v-flex> |
222 | <v-flex sm10 xs6 class="pa-0 mb-3"> | 222 | <v-flex sm10 xs6 class="pa-0 mb-3"> |
223 | <h4>: {{ teacherData.mobileNo}}</h4> | 223 | <h4>: {{ teacherData.mobileNo}}</h4> |
224 | </v-flex> | 224 | </v-flex> |
225 | </v-layout> | 225 | </v-layout> |
226 | </v-flex> | 226 | </v-flex> |
227 | <v-card flat> | 227 | <v-card flat> |
228 | <h3 class="py-2 text-xs-center grey lighten-1 white--text"> | 228 | <h3 class="py-2 text-xs-center grey lighten-1 white--text"> |
229 | Attendence | 229 | Attendence |
230 | <span class="ml-4"> | 230 | <span class="ml-4"> |
231 | <v-avatar class="green caption" size="12"></v-avatar> | 231 | <v-avatar class="green caption" size="12"></v-avatar> |
232 | <span class="subheading">Present</span> | 232 | <span class="subheading">Present</span> |
233 | </span> | 233 | </span> |
234 | <span class="ml-4"> | 234 | <span class="ml-4"> |
235 | <v-avatar color="red caption" size="12" class></v-avatar> | 235 | <v-avatar color="red caption" size="12" class></v-avatar> |
236 | <span class="subheading">Absent</span> | 236 | <span class="subheading">Absent</span> |
237 | </span> | 237 | </span> |
238 | </h3> | 238 | </h3> |
239 | <YearCalendar | 239 | <YearCalendar |
240 | v-model="year" | 240 | v-model="year" |
241 | :activeDates="activeDates" | 241 | :activeDates="activeDates" |
242 | prefixClass="your_customized_wrapper_class" | 242 | prefixClass="your_customized_wrapper_class" |
243 | :activeClass="activeClass" | 243 | :activeClass="activeClass" |
244 | ></YearCalendar> | 244 | ></YearCalendar> |
245 | </v-card> | 245 | </v-card> |
246 | </div> | 246 | </div> |
247 | </v-flex> | 247 | </v-flex> |
248 | </v-layout> | 248 | </v-layout> |
249 | </v-container> | 249 | </v-container> |
250 | </v-layout> | 250 | </v-layout> |
251 | <!-- <img :src="output" v-show="false"/> --> | 251 | <!-- <img :src="output" v-show="false"/> --> |
252 | <div class="loader" v-if="showLoader"> | 252 | <div class="loader" v-if="showLoader"> |
253 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 253 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
254 | </div> | 254 | </div> |
255 | </v-container> | 255 | </v-container> |
256 | </template> | 256 | </template> |
257 | 257 | ||
258 | <script lang="js"> | 258 | <script lang="js"> |
259 | import moment from "moment"; | 259 | import moment from "moment"; |
260 | import http from "@/Services/http.js"; | 260 | import http from "@/Services/http.js"; |
261 | import YearCalendar from "vue-material-year-calendar"; | 261 | import YearCalendar from "vue-material-year-calendar"; |
262 | import jsPDF from 'jspdf'; | 262 | import jsPDF from 'jspdf'; |
263 | // eslint-disable-next-line | 263 | // eslint-disable-next-line |
264 | import autoTable from 'jspdf-autotable'; | 264 | import autoTable from 'jspdf-autotable'; |
265 | 265 | ||
266 | export default { | 266 | export default { |
267 | components: { YearCalendar }, | 267 | components: { YearCalendar }, |
268 | data() { | 268 | data() { |
269 | return { | 269 | return { |
270 | showPdfData:false, | 270 | showPdfData:false, |
271 | hideData:true, | 271 | hideData:true, |
272 | loadingPdf:false, | 272 | loadingPdf:false, |
273 | output:null, | 273 | output:null, |
274 | studentsList: [], | 274 | studentsList: [], |
275 | json_data: [], | 275 | json_data: [], |
276 | dialogExport: false, | 276 | dialogExport: false, |
277 | startDate: "", | 277 | startDate: "", |
278 | endDate: "", | 278 | endDate: "", |
279 | menuEndDate: false, | 279 | menuEndDate: false, |
280 | menuStartDate: false, | 280 | menuStartDate: false, |
281 | showLoader: false, | 281 | showLoader: false, |
282 | token: "", | 282 | token: "", |
283 | year: new Date().getFullYear(), | 283 | year: new Date().getFullYear(), |
284 | activeDates: [], | 284 | activeDates: [], |
285 | activeClass: "", | 285 | activeClass: "", |
286 | teacherData: {} | 286 | teacherData: {} |
287 | }; | 287 | }; |
288 | }, | 288 | }, |
289 | mounted() { | 289 | mounted() { |
290 | this.token = this.$store.state.token; | 290 | this.token = this.$store.state.token; |
291 | this.getTeacherAttendence(); | 291 | this.getTeacherAttendence(); |
292 | // this.getStudentData(); | 292 | // this.getStudentData(); |
293 | }, | 293 | }, |
294 | methods: { | 294 | methods: { |
295 | dates: function(date) { | 295 | dates: function(date) { |
296 | return moment(date).format("MMMM DD, YYYY"); | 296 | return moment(date).format("MMMM DD, YYYY"); |
297 | }, | 297 | }, |
298 | getTeacherAttendence() { | 298 | getTeacherAttendence() { |
299 | this.showLoader = true; | 299 | this.showLoader = true; |
300 | http() | 300 | http() |
301 | .get( | 301 | .get( |
302 | "/teacherAttendance", | 302 | "/teacherAttendance", |
303 | { params: { teacherId: this.$route.params.teacherId } }, | 303 | { params: { teacherId: this.$route.params.teacherId } }, |
304 | { | 304 | { |
305 | headers: { Authorization: "Bearer " + this.token } | 305 | headers: { Authorization: "Bearer " + this.token } |
306 | } | 306 | } |
307 | ) | 307 | ) |
308 | .then(response => { | 308 | .then(response => { |
309 | this.showLoader = false; | 309 | this.showLoader = false; |
310 | this.teacherData = response.data.data.teacherData; | 310 | this.teacherData = response.data.data.teacherData; |
311 | let array = []; | 311 | let array = []; |
312 | for (let i = 0; i < response.data.data.attendanceData.length; i++) { | 312 | for (let i = 0; i < response.data.data.attendanceData.length; i++) { |
313 | for (let j = 0; j < response.data.data.attendanceData[i].teachers.length; j++) { | 313 | for (let j = 0; j < response.data.data.attendanceData[i].teachers.length; j++) { |
314 | if (response.data.data.attendanceData[i].teachers[j].attendanceType === "present") { | 314 | if (response.data.data.attendanceData[i].teachers[j].attendanceType === "present") { |
315 | array.push({ | 315 | array.push({ |
316 | date: response.data.data.attendanceData[i].date, | 316 | date: response.data.data.attendanceData[i].date, |
317 | className: "green" | 317 | className: "green" |
318 | }); | 318 | }); |
319 | } else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "latePresentWithExcuse") { | 319 | } else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "latePresentWithExcuse") { |
320 | array.push({ | 320 | array.push({ |
321 | date: response.data.data.attendanceData[i].date, | 321 | date: response.data.data.attendanceData[i].date, |
322 | className: "yellow" | 322 | className: "yellow" |
323 | }); | 323 | }); |
324 | } | 324 | } |
325 | else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "latePresent") { | 325 | else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "latePresent") { |
326 | array.push({ | 326 | array.push({ |
327 | date: response.data.data.attendanceData[i].date, | 327 | date: response.data.data.attendanceData[i].date, |
328 | className: "black" | 328 | className: "black" |
329 | }); | 329 | }); |
330 | } | 330 | } |
331 | else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "absent") { | 331 | else if (response.data.data.attendanceData[i].teachers[j].attendanceType === "absent") { |
332 | array.push({ | 332 | array.push({ |
333 | date: response.data.data.attendanceData[i].date, | 333 | date: response.data.data.attendanceData[i].date, |
334 | className: "red" | 334 | className: "red" |
335 | }); | 335 | }); |
336 | } | 336 | } |
337 | } | 337 | } |
338 | this.activeDates = array; | 338 | this.activeDates = array; |
339 | } | 339 | } |
340 | }) | 340 | }) |
341 | .catch(error => { | 341 | .catch(error => { |
342 | this.showLoader = false; | 342 | this.showLoader = false; |
343 | if (error.response.status === 401) { | 343 | if (error.response.status === 401) { |
344 | this.$router.replace({ path: "/" }); | 344 | this.$router.replace({ path: "/" }); |
345 | this.$store.dispatch("setToken", null); | 345 | this.$store.dispatch("setToken", null); |
346 | this.$store.dispatch("Id", null); | 346 | this.$store.dispatch("Id", null); |
347 | this.$store.dispatch("Role", null); | 347 | this.$store.dispatch("Role", null); |
348 | } | 348 | } |
349 | }); | 349 | }); |
350 | }, | 350 | }, |
351 | // getStudentData() { | 351 | // getStudentData() { |
352 | // http() | 352 | // http() |
353 | // .get( | 353 | // .get( |
354 | // "/getParticularStudentDetail", | 354 | // "/getParticularStudentDetail", |
355 | // { params: { studentId: this.$route.params.id } }, | 355 | // { params: { studentId: this.$route.params.id } }, |
356 | // { | 356 | // { |
357 | // headers: { Authorization: "Bearer " + this.token } | 357 | // headers: { Authorization: "Bearer " + this.token } |
358 | // } | 358 | // } |
359 | // ) | 359 | // ) |
360 | // .then(response => { | 360 | // .then(response => { |
361 | // this.studentData = response.data.data; | 361 | // this.studentData = response.data.data; |
362 | // }) | 362 | // }) |
363 | // .catch(err => { | 363 | // .catch(err => { |
364 | // console.log("err====>", err); | 364 | // console.log("err====>", err); |
365 | // // this.$router.replace({ path: '/' }); | 365 | // // this.$router.replace({ path: '/' }); |
366 | // }); | 366 | // }); |
367 | // }, | 367 | // }, |
368 | // exportData() { | 368 | exportData() { |
369 | // http() | 369 | // console.log("id",this.$route.params.teacherId); |
370 | // .get( | 370 | http() |
371 | // "/studentAttendanceByMonth", | 371 | .get( |
372 | // { | 372 | "/teacherAttendanceByMonth", |
373 | // params: { | 373 | { |
374 | // studentId: this.$route.params.id, | 374 | params: { |
375 | // startDate: this.startDate, | 375 | teacherId: this.$route.params.teacherId, |
376 | // endDate: this.endDate | 376 | startDate: this.startDate, |
377 | // } | 377 | endDate: this.endDate |
378 | // }, | 378 | } |
379 | // { | 379 | }, |
380 | // headers: { Authorization: "Bearer " + this.token } | 380 | { |
381 | // } | 381 | headers: { Authorization: "Bearer " + this.token } |
382 | // ) | 382 | } |
383 | // .then(response => { | 383 | ) |
384 | // this.json_data = response.data.data; | 384 | .then(response => { |
385 | // this.dialogExport = true; | 385 | this.json_data = response.data.data; |
386 | // }) | 386 | this.dialogExport = false; |
387 | // .catch(err => { | 387 | }) |
388 | // console.log("err====>", err); | 388 | .catch(err => { |
389 | // // this.$router.replace({ path: '/' }); | 389 | console.log("err====>", err); |
390 | // }); | 390 | // this.$router.replace({ path: '/' }); |
391 | // }, | 391 | }); |
392 | }, | ||
392 | exportPdf(){ | 393 | exportPdf(){ |
393 | this.hideData = false; | 394 | this.hideData = false; |
394 | this.showPdfData = true | 395 | this.showPdfData = true |
395 | }, | 396 | }, |
396 | async generatePDF2Canvas(){ | 397 | async generatePDF2Canvas(){ |
397 | this.loadingPdf = true | 398 | this.loadingPdf = true |
398 | const el = this.$refs.printMe; | 399 | const el = this.$refs.printMe; |
399 | // add option type to get the image version | 400 | // add option type to get the image version |
400 | // if not provided the promise will return | 401 | // if not provided the promise will return |
401 | // the canvas. | 402 | // the canvas. |
402 | const options = { | 403 | const options = { |
403 | type: 'dataURL' | 404 | type: 'dataURL' |
404 | } | 405 | } |
405 | this.output = await this.$html2canvas(el, options); | 406 | this.output = await this.$html2canvas(el, options); |
406 | if(this.output) { | 407 | if(this.output) { |
407 | this.loadingPdf = false | 408 | this.loadingPdf = false |
408 | } | 409 | } |
409 | let doc = new jsPDF(); | 410 | let doc = new jsPDF(); |
410 | doc.addImage(this.output, 'JPEG', 5, 10, 200, 280); | 411 | doc.addImage(this.output, 'JPEG', 5, 10, 200, 280); |
411 | doc.save("Attendance.pdf"); | 412 | doc.save("Attendance.pdf"); |
412 | } | 413 | } |
413 | } | 414 | } |
414 | }; | 415 | }; |
415 | </script> | 416 | </script> |
416 | <style scoped> | 417 | <style scoped> |
417 | .add-button { | 418 | .add-button { |
418 | background: #feb83c !important; | 419 | background: #feb83c !important; |
419 | border-color: #feb83c !important; | 420 | border-color: #feb83c !important; |
420 | text-transform: none !important; | 421 | text-transform: none !important; |
421 | -webkit-box-shadow: none !important; | 422 | -webkit-box-shadow: none !important; |
422 | box-shadow: none !important; | 423 | box-shadow: none !important; |
423 | } | 424 | } |
424 | .card-style { | 425 | .card-style { |
425 | background: #7f62f8 !important; | 426 | background: #7f62f8 !important; |
426 | border-color: #7f62f8 !important; | 427 | border-color: #7f62f8 !important; |
427 | border-radius: 12px; | 428 | border-radius: 12px; |
428 | } | 429 | } |
429 | .open-dialog-button { | 430 | .open-dialog-button { |
430 | background: #827bfa !important; | 431 | background: #827bfa !important; |
431 | border-color: #827bfa !important; | 432 | border-color: #827bfa !important; |
432 | text-transform: none !important; | 433 | text-transform: none !important; |
433 | } | 434 | } |
434 | </style> | 435 | </style> |
435 | 436 |
src/pages/Mark/mark.vue
1 | <template> | 1 | <template> |
2 | <v-container fluid class="body-color"> | 2 | <v-container fluid class="body-color"> |
3 | <!-- ****** EXISTING MARK TABLE ****** --> | 3 | <!-- ****** EXISTING MARK TABLE ****** --> |
4 | <v-toolbar color="transparent" flat> | 4 | <v-toolbar color="transparent" flat> |
5 | <v-btn | 5 | <v-btn |
6 | fab | 6 | fab |
7 | dark | 7 | dark |
8 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" | 8 | class="open-dialog-button hidden-xl-only hidden-md-only hidden-lg-only" |
9 | small | 9 | small |
10 | @click="addMarkDialog = true" | 10 | @click="addMarkDialog = true" |
11 | > | 11 | > |
12 | <v-icon dark>add</v-icon> | 12 | <v-icon dark>add</v-icon> |
13 | </v-btn> | 13 | </v-btn> |
14 | <v-btn | 14 | <v-btn |
15 | round | 15 | round |
16 | class="open-dialog-button hidden-sm-only hidden-xs-only" | 16 | class="open-dialog-button hidden-sm-only hidden-xs-only" |
17 | dark | 17 | dark |
18 | @click="addMarkDialog = true" | 18 | @click="addMarkDialog = true" |
19 | > | 19 | > |
20 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Mark | 20 | <v-icon class="white--text pr-1" size="20">add</v-icon>Add Mark |
21 | </v-btn> | 21 | </v-btn> |
22 | <v-layout class="hidden-sm-only hidden-xs-only"> | 22 | <v-layout class="hidden-sm-only hidden-xs-only"> |
23 | <v-flex md3 lg2 class="ml-2"> | 23 | <v-flex md3 lg2 class="ml-2"> |
24 | <v-select | 24 | <v-select |
25 | v-model="getMark.classId" | 25 | v-model="getMark.classId" |
26 | label="Select your class" | 26 | label="Select your class" |
27 | type="text" | 27 | type="text" |
28 | :items="classList" | 28 | :items="classList" |
29 | item-text="classNum" | 29 | item-text="classNum" |
30 | item-value="_id" | 30 | item-value="_id" |
31 | @change="getSections(getMark.classId)" | 31 | @change="getSections(getMark.classId)" |
32 | required | 32 | required |
33 | ></v-select> | 33 | ></v-select> |
34 | </v-flex> | 34 | </v-flex> |
35 | <v-flex md3 lg2 class="ml-2"> | 35 | <v-flex md3 lg2 class="ml-2"> |
36 | <v-select | 36 | <v-select |
37 | :items="addSection" | 37 | :items="addSection" |
38 | label="Select your Section" | 38 | label="Select your Section" |
39 | v-model="getMark.sectionId" | 39 | v-model="getMark.sectionId" |
40 | item-text="name" | 40 | item-text="name" |
41 | item-value="_id" | 41 | item-value="_id" |
42 | name="Select Section" | 42 | name="Select Section" |
43 | required | 43 | required |
44 | ></v-select> | 44 | ></v-select> |
45 | </v-flex> | 45 | </v-flex> |
46 | <v-spacer></v-spacer> | 46 | <v-spacer></v-spacer> |
47 | <v-btn | 47 | <v-btn |
48 | @click="getStudents" | 48 | @click="getStudents" |
49 | round | 49 | round |
50 | dark | 50 | dark |
51 | :loading="loading" | 51 | :loading="loading" |
52 | class="right open-dialog-button mt-2" | 52 | class="right open-dialog-button mt-2" |
53 | >Mark</v-btn> | 53 | >Mark</v-btn> |
54 | </v-layout> | 54 | </v-layout> |
55 | <v-spacer class="hidden-lg-only hidden-xl-only hidden-md-only"></v-spacer> | 55 | <v-spacer class="hidden-lg-only hidden-xl-only hidden-md-only"></v-spacer> |
56 | <v-card-title class="body-1" v-show="show"> | 56 | <v-card-title class="body-1" v-show="show"> |
57 | <v-btn icon large flat @click="displaySearch"> | 57 | <v-btn icon large flat @click="displaySearch"> |
58 | <v-avatar size="27"> | 58 | <v-avatar size="27"> |
59 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> | 59 | <img src="/static/icon/dashboard icons-49.png" alt="icon" /> |
60 | </v-avatar> | 60 | </v-avatar> |
61 | </v-btn> | 61 | </v-btn> |
62 | </v-card-title> | 62 | </v-card-title> |
63 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> | 63 | <v-flex xs8 sm8 md3 lg2 v-show="showSearch"> |
64 | <v-layout> | 64 | <v-layout> |
65 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> | 65 | <v-text-field v-model="search" label="Search" prepend-inner-icon="search" color="primary"></v-text-field> |
66 | <v-icon @click="closeSearch" color="error">close</v-icon> | 66 | <v-icon @click="closeSearch" color="error">close</v-icon> |
67 | </v-layout> | 67 | </v-layout> |
68 | </v-flex> | 68 | </v-flex> |
69 | </v-toolbar> | 69 | </v-toolbar> |
70 | <v-card flat class="elevation-0 transparent hidden-lg-only hidden-xl-only hidden-md-only"> | 70 | <v-card flat class="elevation-0 transparent hidden-lg-only hidden-xl-only hidden-md-only"> |
71 | <v-flex xs12 sm12 lg12> | 71 | <v-flex xs12 sm12 lg12> |
72 | <v-layout wrap> | 72 | <v-layout wrap> |
73 | <v-flex xs12 sm12 lg3> | 73 | <v-flex xs12 sm12 lg3> |
74 | <v-layout> | 74 | <v-layout> |
75 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 75 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
76 | <label class="right">Class:</label> | 76 | <label class="right">Class:</label> |
77 | </v-flex> | 77 | </v-flex> |
78 | <v-flex xs12 sm12 lg8 class="ml-2"> | 78 | <v-flex xs12 sm12 lg8 class="ml-2"> |
79 | <v-select | 79 | <v-select |
80 | v-model="getMark.classId" | 80 | v-model="getMark.classId" |
81 | label="Select your class" | 81 | label="Select your class" |
82 | type="text" | 82 | type="text" |
83 | :items="classList" | 83 | :items="classList" |
84 | item-text="classNum" | 84 | item-text="classNum" |
85 | item-value="_id" | 85 | item-value="_id" |
86 | @change="getSections(getMark.classId)" | 86 | @change="getSections(getMark.classId)" |
87 | required | 87 | required |
88 | ></v-select> | 88 | ></v-select> |
89 | </v-flex> | 89 | </v-flex> |
90 | </v-layout> | 90 | </v-layout> |
91 | </v-flex> | 91 | </v-flex> |
92 | <v-flex xs12 sm12 lg3> | 92 | <v-flex xs12 sm12 lg3> |
93 | <v-layout> | 93 | <v-layout> |
94 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> | 94 | <v-flex xs3 sm6 lg2 class="subheading mt-4"> |
95 | <label class="right">Section:</label> | 95 | <label class="right">Section:</label> |
96 | </v-flex> | 96 | </v-flex> |
97 | <v-flex xs12 sm12 lg8 class="ml-2"> | 97 | <v-flex xs12 sm12 lg8 class="ml-2"> |
98 | <v-select | 98 | <v-select |
99 | :items="addSection" | 99 | :items="addSection" |
100 | label="Select your Section" | 100 | label="Select your Section" |
101 | v-model="getMark.sectionId" | 101 | v-model="getMark.sectionId" |
102 | item-text="name" | 102 | item-text="name" |
103 | item-value="_id" | 103 | item-value="_id" |
104 | name="Select Section" | 104 | name="Select Section" |
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 lg6> | 110 | <v-flex xs12 sm12 lg6> |
111 | <v-btn | 111 | <v-btn |
112 | @click="getStudents" | 112 | @click="getStudents" |
113 | round | 113 | round |
114 | dark | 114 | dark |
115 | :loading="loading" | 115 | :loading="loading" |
116 | class="right mt-3 open-dialog-button" | 116 | class="right mt-3 open-dialog-button" |
117 | >Mark</v-btn> | 117 | >Mark</v-btn> |
118 | </v-flex> | 118 | </v-flex> |
119 | </v-layout> | 119 | </v-layout> |
120 | </v-flex> | 120 | </v-flex> |
121 | </v-card> | 121 | </v-card> |
122 | <v-data-table | 122 | <v-data-table |
123 | :headers="headers" | 123 | :headers="headers" |
124 | :items="getStudentsList" | 124 | :items="getStudentsList" |
125 | :pagination.sync="pagination" | 125 | :pagination.sync="pagination" |
126 | :search="search" | 126 | :search="search" |
127 | > | 127 | > |
128 | <template slot="items" slot-scope="props"> | 128 | <template slot="items" slot-scope="props"> |
129 | <tr class="tr"> | 129 | <tr class="tr"> |
130 | <td class="td td-row">{{ props.index + 1}}</td> | 130 | <td class="td td-row">{{ props.index + 1}}</td> |
131 | <td class="td td-row text-xs-center"> | 131 | <td class="td td-row text-xs-center"> |
132 | <v-avatar size="40"> | 132 | <v-avatar size="40"> |
133 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 133 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
134 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 134 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
135 | </v-avatar> | 135 | </v-avatar> |
136 | </td> | 136 | </td> |
137 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> | 137 | <td class="td td-row text-xs-center">{{ props.item.name}}</td> |
138 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> | 138 | <td class="td td-row text-xs-center">{{ props.item.rollNo }}</td> |
139 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> | 139 | <td class="td td-row text-xs-center">{{ props.item.email }}</td> |
140 | <td class="td td-row text-xs-center"> | 140 | <td class="td td-row text-xs-center"> |
141 | <span> | 141 | <span> |
142 | <router-link :to="{ name:'viewMark',params: { markId:props.item._id } }"> | 142 | <router-link :to="{ name:'view Mark',params: { markId:props.item._id } }"> |
143 | <v-tooltip top> | 143 | <v-tooltip top> |
144 | <img | 144 | <img |
145 | slot="activator" | 145 | slot="activator" |
146 | style="cursor:pointer; width:25px; height:25px; " | 146 | style="cursor:pointer; width:25px; height:25px; " |
147 | src="/static/icon/dashboard icons-47.png" | 147 | src="/static/icon/dashboard icons-47.png" |
148 | /> | 148 | /> |
149 | <span>View</span> | 149 | <span>View</span> |
150 | </v-tooltip> | 150 | </v-tooltip> |
151 | </router-link> | 151 | </router-link> |
152 | </span> | 152 | </span> |
153 | </td> | 153 | </td> |
154 | </tr> | 154 | </tr> |
155 | </template> | 155 | </template> |
156 | <v-alert | 156 | <v-alert |
157 | slot="no-results" | 157 | slot="no-results" |
158 | :value="true" | 158 | :value="true" |
159 | color="error" | 159 | color="error" |
160 | icon="warning" | 160 | icon="warning" |
161 | >Your search for "{{ search }}" found no results.</v-alert> | 161 | >Your search for "{{ search }}" found no results.</v-alert> |
162 | </v-data-table> | 162 | </v-data-table> |
163 | <!-- ****** ADD Mark Schedule ****** --> | 163 | <!-- ****** ADD Mark Schedule ****** --> |
164 | <v-dialog v-model="addMarkDialog" max-width> | 164 | <v-dialog v-model="addMarkDialog" max-width> |
165 | <v-card flat class> | 165 | <v-card flat class> |
166 | <v-layout class="pa-3 card-style white--text"> | 166 | <v-layout class="pa-3 card-style white--text"> |
167 | <v-flex xs12> | 167 | <v-flex xs12> |
168 | <label class="title text-xs-center">Add Mark</label> | 168 | <label class="title text-xs-center">Add Mark</label> |
169 | <v-icon size="24" class="right white--text" @click="addMarkDialog = false">cancel</v-icon> | 169 | <v-icon size="24" class="right white--text" @click="addMarkDialog = false">cancel</v-icon> |
170 | </v-flex> | 170 | </v-flex> |
171 | </v-layout> | 171 | </v-layout> |
172 | <v-form ref="form" v-model="valid" lazy-validation> | 172 | <v-form ref="form" v-model="valid" lazy-validation> |
173 | <v-container fluid> | 173 | <v-container fluid> |
174 | <v-flex xs12 sm12 lg12> | 174 | <v-flex xs12 sm12 lg12> |
175 | <v-layout wrap> | 175 | <v-layout wrap> |
176 | <v-flex xs12 sm12 lg10> | 176 | <v-flex xs12 sm12 lg10> |
177 | <v-layout wrap> | 177 | <v-layout wrap> |
178 | <v-flex xs12 sm12 lg3> | 178 | <v-flex xs12 sm12 lg3> |
179 | <v-flex xs3 sm2 lg2 class="subheading"> | 179 | <v-flex xs3 sm2 lg2 class="subheading"> |
180 | <label>Exam:</label> | 180 | <label>Exam:</label> |
181 | </v-flex> | 181 | </v-flex> |
182 | <v-flex xs12 sm12 lg10> | 182 | <v-flex xs12 sm12 lg10> |
183 | <v-select | 183 | <v-select |
184 | label="Select your Exam Name" | 184 | label="Select your Exam Name" |
185 | :items="examList" | 185 | :items="examList" |
186 | v-model="addMark.examId" | 186 | v-model="addMark.examId" |
187 | :rules="examRules" | 187 | :rules="examRules" |
188 | item-text="examName" | 188 | item-text="examName" |
189 | item-value="_id" | 189 | item-value="_id" |
190 | ></v-select> | 190 | ></v-select> |
191 | </v-flex> | 191 | </v-flex> |
192 | </v-flex> | 192 | </v-flex> |
193 | <v-flex xs12 sm12 lg3> | 193 | <v-flex xs12 sm12 lg3> |
194 | <v-flex xs3 sm6 lg2 class="subheading"> | 194 | <v-flex xs3 sm6 lg2 class="subheading"> |
195 | <label>Class:</label> | 195 | <label>Class:</label> |
196 | </v-flex> | 196 | </v-flex> |
197 | <v-flex xs12 sm12 lg10 class> | 197 | <v-flex xs12 sm12 lg10 class> |
198 | <v-select | 198 | <v-select |
199 | v-model="addMark.classId" | 199 | v-model="addMark.classId" |
200 | label="Select your class" | 200 | label="Select your class" |
201 | type="text" | 201 | type="text" |
202 | :items="classList" | 202 | :items="classList" |
203 | item-text="classNum" | 203 | item-text="classNum" |
204 | item-value="_id" | 204 | item-value="_id" |
205 | :rules="classRules" | 205 | :rules="classRules" |
206 | @change="getSections(addMark.classId)" | 206 | @change="getSections(addMark.classId)" |
207 | required | 207 | required |
208 | ></v-select> | 208 | ></v-select> |
209 | </v-flex> | 209 | </v-flex> |
210 | </v-flex> | 210 | </v-flex> |
211 | <v-flex xs12 sm12 lg3> | 211 | <v-flex xs12 sm12 lg3> |
212 | <v-flex xs3 sm6 lg2 class="subheading"> | 212 | <v-flex xs3 sm6 lg2 class="subheading"> |
213 | <label>Section:</label> | 213 | <label>Section:</label> |
214 | </v-flex> | 214 | </v-flex> |
215 | <v-flex xs12 sm12 lg10 class> | 215 | <v-flex xs12 sm12 lg10 class> |
216 | <v-select | 216 | <v-select |
217 | :items="addSection" | 217 | :items="addSection" |
218 | label="Select your Section" | 218 | label="Select your Section" |
219 | v-model="addMark.sectionId" | 219 | v-model="addMark.sectionId" |
220 | item-text="name" | 220 | item-text="name" |
221 | item-value="_id" | 221 | item-value="_id" |
222 | name="Select Section" | 222 | name="Select Section" |
223 | :rules="sectionRules" | 223 | :rules="sectionRules" |
224 | required | 224 | required |
225 | ></v-select> | 225 | ></v-select> |
226 | </v-flex> | 226 | </v-flex> |
227 | </v-flex> | 227 | </v-flex> |
228 | <v-flex xs12 sm12 lg3> | 228 | <v-flex xs12 sm12 lg3> |
229 | <v-flex xs3 sm6 lg2 class="subheading"> | 229 | <v-flex xs3 sm6 lg2 class="subheading"> |
230 | <label>Subject:</label> | 230 | <label>Subject:</label> |
231 | </v-flex> | 231 | </v-flex> |
232 | <v-flex xs12 sm12 lg10 class> | 232 | <v-flex xs12 sm12 lg10 class> |
233 | <v-select | 233 | <v-select |
234 | :items="subjects" | 234 | :items="subjects" |
235 | label="Select your Subject" | 235 | label="Select your Subject" |
236 | v-model="addMark.subjectId" | 236 | v-model="addMark.subjectId" |
237 | item-text="subjectName" | 237 | item-text="subjectName" |
238 | item-value="_id" | 238 | item-value="_id" |
239 | name="Select Section" | 239 | name="Select Section" |
240 | :rules="subjectRules" | 240 | :rules="subjectRules" |
241 | required | 241 | required |
242 | ></v-select> | 242 | ></v-select> |
243 | </v-flex> | 243 | </v-flex> |
244 | </v-flex> | 244 | </v-flex> |
245 | </v-layout> | 245 | </v-layout> |
246 | </v-flex> | 246 | </v-flex> |
247 | <v-flex xs12 sm12 lg2> | 247 | <v-flex xs12 sm12 lg2> |
248 | <v-flex xs12 sm12 lg12> | 248 | <v-flex xs12 sm12 lg12> |
249 | <v-btn | 249 | <v-btn |
250 | @click="findStudents" | 250 | @click="findStudents" |
251 | round | 251 | round |
252 | dark | 252 | dark |
253 | :loading="loading" | 253 | :loading="loading" |
254 | class="right mt-4 open-dialog-button" | 254 | class="right mt-4 open-dialog-button" |
255 | >Mark</v-btn> | 255 | >Mark</v-btn> |
256 | </v-flex> | 256 | </v-flex> |
257 | </v-flex> | 257 | </v-flex> |
258 | </v-layout> | 258 | </v-layout> |
259 | </v-flex> | 259 | </v-flex> |
260 | <!-- ****** ADD MARK TABLE DATA ****** --> | 260 | <!-- ****** ADD MARK TABLE DATA ****** --> |
261 | <v-card class="mt-4 elevation-0 body-color"> | 261 | <v-card class="mt-4 elevation-0 body-color"> |
262 | <v-data-table | 262 | <v-data-table |
263 | :headers="headerOfMark" | 263 | :headers="headerOfMark" |
264 | :items="getStudentData" | 264 | :items="getStudentData" |
265 | :pagination.sync="pagination" | 265 | :pagination.sync="pagination" |
266 | :search="search" | 266 | :search="search" |
267 | class="body-color" | 267 | class="body-color" |
268 | > | 268 | > |
269 | <template slot="items" slot-scope="props"> | 269 | <template slot="items" slot-scope="props"> |
270 | <tr class="tr"> | 270 | <tr class="tr"> |
271 | <td class="td td-row">{{ props.index + 1}}</td> | 271 | <td class="td td-row">{{ props.index + 1}}</td> |
272 | <td class="text-xs-center td td-row"> | 272 | <td class="text-xs-center td td-row"> |
273 | <v-avatar size="40"> | 273 | <v-avatar size="40"> |
274 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> | 274 | <img :src="props.item.profilePicUrl" v-if="props.item.profilePicUrl" /> |
275 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> | 275 | <img src="/static/icon/user.png" v-else-if="!props.item.profilePicUrl" /> |
276 | </v-avatar> | 276 | </v-avatar> |
277 | </td> | 277 | </td> |
278 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> | 278 | <td class="text-xs-center td td-row">{{ props.item.name}}</td> |
279 | <td class="text-xs-center td td-row">{{ props.item.rollNo }}</td> | 279 | <td class="text-xs-center td td-row">{{ props.item.rollNo }}</td> |
280 | <td | 280 | <td |
281 | class="text-xs-center markTable td td-row" | 281 | class="text-xs-center markTable td td-row" |
282 | v-for="(marks, index) in props.item.marksObtained" | 282 | v-for="(marks, index) in props.item.marksObtained" |
283 | :key="'A'+ index" | 283 | :key="'A'+ index" |
284 | > | 284 | > |
285 | <v-text-field v-model="marks.marksScored"></v-text-field> | 285 | <v-text-field v-model="marks.marksScored"></v-text-field> |
286 | </td> | 286 | </td> |
287 | </tr> | 287 | </tr> |
288 | </template> | 288 | </template> |
289 | <v-alert | 289 | <v-alert |
290 | slot="no-results" | 290 | slot="no-results" |
291 | :value="true" | 291 | :value="true" |
292 | color="error" | 292 | color="error" |
293 | icon="warning" | 293 | icon="warning" |
294 | >Your search for "{{ search }}" found no results.</v-alert> | 294 | >Your search for "{{ search }}" found no results.</v-alert> |
295 | </v-data-table> | 295 | </v-data-table> |
296 | </v-card> | 296 | </v-card> |
297 | <v-layout class="mt-2"> | 297 | <v-layout class="mt-2"> |
298 | <v-flex xs12 sm12> | 298 | <v-flex xs12 sm12> |
299 | <v-layout> | 299 | <v-layout> |
300 | <v-flex xs12> | 300 | <v-flex xs12> |
301 | <v-btn | 301 | <v-btn |
302 | @click="submit" | 302 | @click="submit" |
303 | round | 303 | round |
304 | dark | 304 | dark |
305 | :loading="loading" | 305 | :loading="loading" |
306 | class="right add-button" | 306 | class="right add-button" |
307 | >Add Mark</v-btn> | 307 | >Add Mark</v-btn> |
308 | </v-flex> | 308 | </v-flex> |
309 | </v-layout> | 309 | </v-layout> |
310 | </v-flex> | 310 | </v-flex> |
311 | </v-layout> | 311 | </v-layout> |
312 | </v-container> | 312 | </v-container> |
313 | </v-form> | 313 | </v-form> |
314 | </v-card> | 314 | </v-card> |
315 | </v-dialog> | 315 | </v-dialog> |
316 | <div class="loader" v-if="showLoader"> | 316 | <div class="loader" v-if="showLoader"> |
317 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 317 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
318 | </div> | 318 | </div> |
319 | <v-snackbar | 319 | <v-snackbar |
320 | :timeout="timeout" | 320 | :timeout="timeout" |
321 | :top="y === 'top'" | 321 | :top="y === 'top'" |
322 | :right="x === 'right'" | 322 | :right="x === 'right'" |
323 | :vertical="mode === 'vertical'" | 323 | :vertical="mode === 'vertical'" |
324 | v-model="snackbar" | 324 | v-model="snackbar" |
325 | :color="color" | 325 | :color="color" |
326 | >{{ text }}</v-snackbar> | 326 | >{{ text }}</v-snackbar> |
327 | </v-container> | 327 | </v-container> |
328 | </template> | 328 | </template> |
329 | 329 | ||
330 | <script> | 330 | <script> |
331 | import http from "@/Services/http.js"; | 331 | import http from "@/Services/http.js"; |
332 | import moment from "moment"; | 332 | import moment from "moment"; |
333 | 333 | ||
334 | export default { | 334 | export default { |
335 | data: () => ({ | 335 | data: () => ({ |
336 | show: true, | 336 | show: true, |
337 | showSearch: false, | 337 | showSearch: false, |
338 | snackbar: false, | 338 | snackbar: false, |
339 | date: null, | 339 | date: null, |
340 | color: "", | 340 | color: "", |
341 | y: "top", | 341 | y: "top", |
342 | x: "right", | 342 | x: "right", |
343 | mode: "", | 343 | mode: "", |
344 | timeout: 10000, | 344 | timeout: 10000, |
345 | text: "", | 345 | text: "", |
346 | loading: false, | 346 | loading: false, |
347 | search: "", | 347 | search: "", |
348 | show: true, | 348 | show: true, |
349 | showSearch: false, | 349 | showSearch: false, |
350 | showLoader: false, | 350 | showLoader: false, |
351 | dialog: false, | 351 | dialog: false, |
352 | dialog1: false, | 352 | dialog1: false, |
353 | valid: true, | 353 | valid: true, |
354 | 354 | ||
355 | addMarkDialog: false, | 355 | addMarkDialog: false, |
356 | addSection: [], | 356 | addSection: [], |
357 | pagination: { | 357 | pagination: { |
358 | rowsPerPage: 10 | 358 | rowsPerPage: 10 |
359 | }, | 359 | }, |
360 | classRules: [v => !!v || "Class is required"], | 360 | classRules: [v => !!v || "Class is required"], |
361 | sectionRules: [v => !!v || "section is required"], | 361 | sectionRules: [v => !!v || "section is required"], |
362 | subjectRules: [v => !!v || "Subject is required"], | 362 | subjectRules: [v => !!v || "Subject is required"], |
363 | examRules: [v => !!v || "Exam is required"], | 363 | examRules: [v => !!v || "Exam is required"], |
364 | 364 | ||
365 | headerOfMark: [ | 365 | headerOfMark: [ |
366 | { | 366 | { |
367 | align: "", | 367 | align: "", |
368 | text: "No", | 368 | text: "No", |
369 | sortable: false, | 369 | sortable: false, |
370 | value: "No" | 370 | value: "No" |
371 | }, | 371 | }, |
372 | { | 372 | { |
373 | text: "Profile Pic", | 373 | text: "Profile Pic", |
374 | vaue: "profilePicUrl", | 374 | vaue: "profilePicUrl", |
375 | sortable: false, | 375 | sortable: false, |
376 | align: "center" | 376 | align: "center" |
377 | }, | 377 | }, |
378 | { | 378 | { |
379 | text: "Name", | 379 | text: "Name", |
380 | vaue: "name", | 380 | vaue: "name", |
381 | sortable: false, | 381 | sortable: false, |
382 | align: "center" | 382 | align: "center" |
383 | }, | 383 | }, |
384 | { | 384 | { |
385 | text: "Roll No.", | 385 | text: "Roll No.", |
386 | value: "rollNo", | 386 | value: "rollNo", |
387 | sortable: false, | 387 | sortable: false, |
388 | align: "center" | 388 | align: "center" |
389 | } | 389 | } |
390 | ], | 390 | ], |
391 | headers: [ | 391 | headers: [ |
392 | { | 392 | { |
393 | align: "", | 393 | align: "", |
394 | text: "No", | 394 | text: "No", |
395 | sortable: false, | 395 | sortable: false, |
396 | value: "No" | 396 | value: "No" |
397 | }, | 397 | }, |
398 | { | 398 | { |
399 | text: "Profile Pic", | 399 | text: "Profile Pic", |
400 | vaue: "profilePicUrl", | 400 | vaue: "profilePicUrl", |
401 | sortable: false, | 401 | sortable: false, |
402 | align: "center" | 402 | align: "center" |
403 | }, | 403 | }, |
404 | { | 404 | { |
405 | text: "Name", | 405 | text: "Name", |
406 | vaue: "name", | 406 | vaue: "name", |
407 | sortable: false, | 407 | sortable: false, |
408 | align: "center" | 408 | align: "center" |
409 | }, | 409 | }, |
410 | { | 410 | { |
411 | text: "Roll No.", | 411 | text: "Roll No.", |
412 | value: "rollNo", | 412 | value: "rollNo", |
413 | sortable: false, | 413 | sortable: false, |
414 | align: "center" | 414 | align: "center" |
415 | }, | 415 | }, |
416 | { | 416 | { |
417 | text: "Email", | 417 | text: "Email", |
418 | value: "email", | 418 | value: "email", |
419 | sortable: false, | 419 | sortable: false, |
420 | align: "center" | 420 | align: "center" |
421 | }, | 421 | }, |
422 | { text: "Action", value: "", sortable: false, align: "center" } | 422 | { text: "Action", value: "", sortable: false, align: "center" } |
423 | ], | 423 | ], |
424 | classList: [], | 424 | classList: [], |
425 | examList: [], | 425 | examList: [], |
426 | subjects: [], | 426 | subjects: [], |
427 | addMark: {}, | 427 | addMark: {}, |
428 | getMark: {}, | 428 | getMark: {}, |
429 | getScheduleData: {}, | 429 | getScheduleData: {}, |
430 | markData: [], | 430 | markData: [], |
431 | getStudentData: [], | 431 | getStudentData: [], |
432 | getStudentsList: [], | 432 | getStudentsList: [], |
433 | token: "" | 433 | token: "" |
434 | }), | 434 | }), |
435 | methods: { | 435 | methods: { |
436 | getClass() { | 436 | getClass() { |
437 | this.showLoader = true; | 437 | this.showLoader = true; |
438 | http() | 438 | http() |
439 | .get("/getClassesList", { | 439 | .get("/getClassesList", { |
440 | headers: { Authorization: "Bearer " + this.token } | 440 | headers: { Authorization: "Bearer " + this.token } |
441 | }) | 441 | }) |
442 | .then(response => { | 442 | .then(response => { |
443 | this.classList = response.data.data; | 443 | this.classList = response.data.data; |
444 | this.showLoader = false; | 444 | this.showLoader = false; |
445 | }) | 445 | }) |
446 | .catch(err => { | 446 | .catch(err => { |
447 | // console.log("err====>", err); | 447 | // console.log("err====>", err); |
448 | this.showLoader = false; | 448 | this.showLoader = false; |
449 | }); | 449 | }); |
450 | }, | 450 | }, |
451 | getSections(_id) { | 451 | getSections(_id) { |
452 | this.showLoader = true; | 452 | this.showLoader = true; |
453 | for (let i = 0; i < this.classList.length; i++) { | 453 | for (let i = 0; i < this.classList.length; i++) { |
454 | if (_id == this.classList[i]._id) { | 454 | if (_id == this.classList[i]._id) { |
455 | this.subjects = this.classList[i].subjects; | 455 | this.subjects = this.classList[i].subjects; |
456 | } | 456 | } |
457 | } | 457 | } |
458 | http() | 458 | http() |
459 | .get( | 459 | .get( |
460 | "/getSectionsList", | 460 | "/getSectionsList", |
461 | { params: { classId: _id } }, | 461 | { params: { classId: _id } }, |
462 | { | 462 | { |
463 | headers: { Authorization: "Bearer " + this.token } | 463 | headers: { Authorization: "Bearer " + this.token } |
464 | } | 464 | } |
465 | ) | 465 | ) |
466 | .then(response => { | 466 | .then(response => { |
467 | this.addSection = response.data.data; | 467 | this.addSection = response.data.data; |
468 | this.showLoader = false; | 468 | this.showLoader = false; |
469 | }) | 469 | }) |
470 | .catch(err => { | 470 | .catch(err => { |
471 | this.showLoader = false; | 471 | this.showLoader = false; |
472 | // console.log("err====>", err); | 472 | // console.log("err====>", err); |
473 | }); | 473 | }); |
474 | }, | 474 | }, |
475 | getExamList() { | 475 | getExamList() { |
476 | this.showLoader = true; | 476 | this.showLoader = true; |
477 | this.loadingSearch = true; | 477 | this.loadingSearch = true; |
478 | http() | 478 | http() |
479 | .get("/getExamsList", { | 479 | .get("/getExamsList", { |
480 | headers: { Authorization: "Bearer " + this.token } | 480 | headers: { Authorization: "Bearer " + this.token } |
481 | }) | 481 | }) |
482 | .then(response => { | 482 | .then(response => { |
483 | this.examList = response.data.data; | 483 | this.examList = response.data.data; |
484 | this.showLoader = false; | 484 | this.showLoader = false; |
485 | this.loadingSearch = false; | 485 | this.loadingSearch = false; |
486 | }) | 486 | }) |
487 | .catch(error => { | 487 | .catch(error => { |
488 | // console.log("err====>", err); | 488 | // console.log("err====>", err); |
489 | this.showLoader = false; | 489 | this.showLoader = false; |
490 | this.loadingSearch = false; | 490 | this.loadingSearch = false; |
491 | this.snackbar = true; | 491 | this.snackbar = true; |
492 | this.text = error.response.data.message; | 492 | this.text = error.response.data.message; |
493 | if (error.response.status === 401) { | 493 | if (error.response.status === 401) { |
494 | this.$router.replace({ path: "/" }); | 494 | this.$router.replace({ path: "/" }); |
495 | this.$store.dispatch("setToken", null); | 495 | this.$store.dispatch("setToken", null); |
496 | this.$store.dispatch("Id", null); | 496 | this.$store.dispatch("Id", null); |
497 | this.$store.dispatch("Role", null); | 497 | this.$store.dispatch("Role", null); |
498 | } | 498 | } |
499 | }); | 499 | }); |
500 | }, | 500 | }, |
501 | findStudents() { | 501 | findStudents() { |
502 | this.getStudentData = []; | 502 | this.getStudentData = []; |
503 | if (this.$refs.form.validate()) { | 503 | if (this.$refs.form.validate()) { |
504 | this.showLoader = true; | 504 | this.showLoader = true; |
505 | http() | 505 | http() |
506 | .get("/getStudentWithClass", { | 506 | .get("/getStudentWithClass", { |
507 | params: { | 507 | params: { |
508 | classId: this.addMark.classId, | 508 | classId: this.addMark.classId, |
509 | sectionId: this.addMark.sectionId | 509 | sectionId: this.addMark.sectionId |
510 | } | 510 | } |
511 | }) | 511 | }) |
512 | .then(response => { | 512 | .then(response => { |
513 | this.getStudentData = response.data.data; | 513 | this.getStudentData = response.data.data; |
514 | this.showLoader = false; | 514 | this.showLoader = false; |
515 | this.showLoader = true; | 515 | this.showLoader = true; |
516 | http() | 516 | http() |
517 | .get("/getMarkDistributionsList", { | 517 | .get("/getMarkDistributionsList", { |
518 | params: this.addMark | 518 | params: this.addMark |
519 | }) | 519 | }) |
520 | .then(response => { | 520 | .then(response => { |
521 | this.showLoader = false; | 521 | this.showLoader = false; |
522 | this.headerOfMark.length = 4; | 522 | this.headerOfMark.length = 4; |
523 | for (var i = 0; i < response.data.data.length; i++) { | 523 | for (var i = 0; i < response.data.data.length; i++) { |
524 | this.headerOfMark.push({ | 524 | this.headerOfMark.push({ |
525 | text: | 525 | text: |
526 | response.data.data[i].distributionType + | 526 | response.data.data[i].distributionType + |
527 | " (" + | 527 | " (" + |
528 | response.data.data[i].markValue + | 528 | response.data.data[i].markValue + |
529 | ")", | 529 | ")", |
530 | sortable: false, | 530 | sortable: false, |
531 | align: "center" | 531 | align: "center" |
532 | }); | 532 | }); |
533 | } | 533 | } |
534 | for (var n = 0; n < this.getStudentData.length; n++) { | 534 | for (var n = 0; n < this.getStudentData.length; n++) { |
535 | this.getStudentData[n].marksObtained = []; | 535 | this.getStudentData[n].marksObtained = []; |
536 | for (var j = 0; j < response.data.data.length; j++) { | 536 | for (var j = 0; j < response.data.data.length; j++) { |
537 | this.getStudentData[n].marksObtained.push({ | 537 | this.getStudentData[n].marksObtained.push({ |
538 | markDistributionId: response.data.data[j]._id, | 538 | markDistributionId: response.data.data[j]._id, |
539 | marksScored: 0 | 539 | marksScored: 0 |
540 | }); | 540 | }); |
541 | } | 541 | } |
542 | } | 542 | } |
543 | }) | 543 | }) |
544 | .catch(error => { | 544 | .catch(error => { |
545 | this.showLoader = false; | 545 | this.showLoader = false; |
546 | }); | 546 | }); |
547 | }) | 547 | }) |
548 | .catch(error => { | 548 | .catch(error => { |
549 | this.showLoader = false; | 549 | this.showLoader = false; |
550 | }); | 550 | }); |
551 | } | 551 | } |
552 | }, | 552 | }, |
553 | submit() { | 553 | submit() { |
554 | for (var j = 0; j < this.getStudentData.length; j++) { | 554 | for (var j = 0; j < this.getStudentData.length; j++) { |
555 | let data = { | 555 | let data = { |
556 | examId: this.addMark.examId, | 556 | examId: this.addMark.examId, |
557 | classId: this.addMark.classId, | 557 | classId: this.addMark.classId, |
558 | sectionId: this.addMark.sectionId, | 558 | sectionId: this.addMark.sectionId, |
559 | subjectId: this.addMark.subjectId, | 559 | subjectId: this.addMark.subjectId, |
560 | studentId: this.getStudentData[j]._id, | 560 | studentId: this.getStudentData[j]._id, |
561 | studentsMarks: this.getStudentData[j].marksObtained | 561 | studentsMarks: this.getStudentData[j].marksObtained |
562 | }; | 562 | }; |
563 | http() | 563 | http() |
564 | .post("/createMark", data) | 564 | .post("/createMark", data) |
565 | .then(response => { | 565 | .then(response => { |
566 | this.getStudentData = []; | 566 | this.getStudentData = []; |
567 | this.snackbar = true; | 567 | this.snackbar = true; |
568 | this.addMarkDialog = false; | 568 | this.addMarkDialog = false; |
569 | this.text = response.data.message; | 569 | this.text = response.data.message; |
570 | this.color = "green"; | 570 | this.color = "green"; |
571 | this.loading = false; | 571 | this.loading = false; |
572 | }) | 572 | }) |
573 | .catch(error => { | 573 | .catch(error => { |
574 | this.snackbar = true; | 574 | this.snackbar = true; |
575 | this.text = error.response.data.message; | 575 | this.text = error.response.data.message; |
576 | this.color = "red"; | 576 | this.color = "red"; |
577 | }); | 577 | }); |
578 | } | 578 | } |
579 | }, | 579 | }, |
580 | getStudents() { | 580 | getStudents() { |
581 | this.showLoader = true; | 581 | this.showLoader = true; |
582 | http() | 582 | http() |
583 | .get("/getStudentWithClass", { | 583 | .get("/getStudentWithClass", { |
584 | params: { | 584 | params: { |
585 | classId: this.getMark.classId, | 585 | classId: this.getMark.classId, |
586 | sectionId: this.getMark.sectionId | 586 | sectionId: this.getMark.sectionId |
587 | } | 587 | } |
588 | }) | 588 | }) |
589 | .then(response => { | 589 | .then(response => { |
590 | this.getStudentsList = response.data.data; | 590 | this.getStudentsList = response.data.data; |
591 | this.showLoader = false; | 591 | this.showLoader = false; |
592 | }) | 592 | }) |
593 | .catch(error => { | 593 | .catch(error => { |
594 | console.log("err====>", error); | 594 | console.log("err====>", error); |
595 | this.showLoader = false; | 595 | this.showLoader = false; |
596 | }); | 596 | }); |
597 | }, | 597 | }, |
598 | displaySearch() { | 598 | displaySearch() { |
599 | (this.show = false), (this.showSearch = true); | 599 | (this.show = false), (this.showSearch = true); |
600 | }, | 600 | }, |
601 | closeSearch() { | 601 | closeSearch() { |
602 | this.showSearch = false; | 602 | this.showSearch = false; |
603 | this.show = true; | 603 | this.show = true; |
604 | this.search = ""; | 604 | this.search = ""; |
605 | } | 605 | } |
606 | }, | 606 | }, |
607 | mounted() { | 607 | mounted() { |
608 | this.token = this.$store.state.token; | 608 | this.token = this.$store.state.token; |
609 | this.getClass(); | 609 | this.getClass(); |
610 | this.getExamList(); | 610 | this.getExamList(); |
611 | } | 611 | } |
612 | }; | 612 | }; |
613 | </script> | 613 | </script> |
614 | <style scoped> | 614 | <style scoped> |
615 | .markTable { | 615 | .markTable { |
616 | max-width: 80px !important; | 616 | max-width: 80px !important; |
617 | } | 617 | } |
618 | </style> | 618 | </style> |
619 | 619 | ||
620 | 620 | ||
621 | 621 | ||
622 | 622 | ||
623 | 623 | ||
624 | 624 | ||
625 | 625 | ||
626 | 626 | ||
627 | 627 | ||
628 | 628 | ||
629 | 629 | ||
630 | 630 | ||
631 | 631 | ||
632 | 632 | ||
633 | 633 | ||
634 | 634 | ||
635 | 635 | ||
636 | 636 | ||
637 | 637 | ||
638 | 638 | ||
639 | 639 | ||
640 | 640 |
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: 'TimeTable', | 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: 'SocialMedia', | 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: 'StudentAttendence', | 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: 'TeacherAttendence', | 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: '/AttendenceUser', | 313 | // path: '/AttendenceUser', |
314 | // meta: {}, | 314 | // meta: {}, |
315 | // name: 'userAttendence', | 315 | // name: 'userAttendence', |
316 | // props: (route) => ({ type: route.query.type }), | 316 | // props: (route) => ({ type: route.query.type }), |
317 | // component: () => | 317 | // component: () => |
318 | // import ( | 318 | // import ( |
319 | // /* webpackChunkName: "routes" */ | 319 | // /* webpackChunkName: "routes" */ |
320 | // /* webpackMode: "lazy-once" */ | 320 | // /* webpackMode: "lazy-once" */ |
321 | // `@/pages/Attendence/userAttendence.vue` | 321 | // `@/pages/Attendence/userAttendence.vue` |
322 | // ) | 322 | // ) |
323 | // }, | 323 | // }, |
324 | { | 324 | { |
325 | path: '/feeTypes', | 325 | path: '/feeTypes', |
326 | meta: {}, | 326 | meta: {}, |
327 | name: 'feeTypes', | 327 | name: 'Fee Types', |
328 | props: (route) => ({ type: route.query.type }), | 328 | props: (route) => ({ type: route.query.type }), |
329 | component: () => | 329 | component: () => |
330 | import ( | 330 | import ( |
331 | /* webpackChunkName: "routes" */ | 331 | /* webpackChunkName: "routes" */ |
332 | /* webpackMode: "lazy-once" */ | 332 | /* webpackMode: "lazy-once" */ |
333 | `@/pages/Account/feeTypes.vue` | 333 | `@/pages/Account/feeTypes.vue` |
334 | ) | 334 | ) |
335 | }, | 335 | }, |
336 | { | 336 | { |
337 | path: '/invoice', | 337 | path: '/invoice', |
338 | meta: {}, | 338 | meta: {}, |
339 | name: 'Invoice', | 339 | name: 'Invoice', |
340 | props: (route) => ({ type: route.query.type }), | 340 | props: (route) => ({ type: route.query.type }), |
341 | component: () => | 341 | component: () => |
342 | import ( | 342 | import ( |
343 | /* webpackChunkName: "routes" */ | 343 | /* webpackChunkName: "routes" */ |
344 | /* webpackMode: "lazy-once" */ | 344 | /* webpackMode: "lazy-once" */ |
345 | `@/pages/Account/invoice.vue` | 345 | `@/pages/Account/invoice.vue` |
346 | ) | 346 | ) |
347 | }, | 347 | }, |
348 | { | 348 | { |
349 | path: '/paymentHistory', | 349 | path: '/paymentHistory', |
350 | meta: {}, | 350 | meta: {}, |
351 | name: 'PaymentHistory', | 351 | name: 'Payment History', |
352 | props: (route) => ({ type: route.query.type }), | 352 | props: (route) => ({ type: route.query.type }), |
353 | component: () => | 353 | component: () => |
354 | import ( | 354 | import ( |
355 | /* webpackChunkName: "routes" */ | 355 | /* webpackChunkName: "routes" */ |
356 | /* webpackMode: "lazy-once" */ | 356 | /* webpackMode: "lazy-once" */ |
357 | `@/pages/Account/paymentHistory.vue` | 357 | `@/pages/Account/paymentHistory.vue` |
358 | ) | 358 | ) |
359 | }, | 359 | }, |
360 | { | 360 | { |
361 | path: '/expense', | 361 | path: '/expense', |
362 | meta: {}, | 362 | meta: {}, |
363 | name: 'Expense', | 363 | name: 'Expense', |
364 | props: (route) => ({ type: route.query.type }), | 364 | props: (route) => ({ type: route.query.type }), |
365 | component: () => | 365 | component: () => |
366 | import ( | 366 | import ( |
367 | /* webpackChunkName: "routes" */ | 367 | /* webpackChunkName: "routes" */ |
368 | /* webpackMode: "lazy-once" */ | 368 | /* webpackMode: "lazy-once" */ |
369 | `@/pages/Account/expense.vue` | 369 | `@/pages/Account/expense.vue` |
370 | ) | 370 | ) |
371 | }, | 371 | }, |
372 | { | 372 | { |
373 | path: '/income', | 373 | path: '/income', |
374 | meta: {}, | 374 | meta: {}, |
375 | name: 'Income', | 375 | name: 'Income', |
376 | props: (route) => ({ type: route.query.type }), | 376 | props: (route) => ({ type: route.query.type }), |
377 | component: () => | 377 | component: () => |
378 | import ( | 378 | import ( |
379 | /* webpackChunkName: "routes" */ | 379 | /* webpackChunkName: "routes" */ |
380 | /* webpackMode: "lazy-once" */ | 380 | /* webpackMode: "lazy-once" */ |
381 | `@/pages/Account/income.vue` | 381 | `@/pages/Account/income.vue` |
382 | ) | 382 | ) |
383 | }, | 383 | }, |
384 | { | 384 | { |
385 | path: '/libraryMember', | 385 | path: '/libraryMember', |
386 | meta: {}, | 386 | meta: {}, |
387 | name: 'LibraryMember', | 387 | name: 'Library Member', |
388 | props: (route) => ({ type: route.query.type }), | 388 | props: (route) => ({ type: route.query.type }), |
389 | component: () => | 389 | component: () => |
390 | import ( | 390 | import ( |
391 | /* webpackChunkName: "routes" */ | 391 | /* webpackChunkName: "routes" */ |
392 | /* webpackMode: "lazy-once" */ | 392 | /* webpackMode: "lazy-once" */ |
393 | `@/pages/Library/member.vue` | 393 | `@/pages/Library/member.vue` |
394 | ) | 394 | ) |
395 | }, | 395 | }, |
396 | { | 396 | { |
397 | path: '/books', | 397 | path: '/books', |
398 | meta: {}, | 398 | meta: {}, |
399 | name: 'Books', | 399 | name: 'Books', |
400 | props: (route) => ({ type: route.query.type }), | 400 | props: (route) => ({ type: route.query.type }), |
401 | component: () => | 401 | component: () => |
402 | import ( | 402 | import ( |
403 | /* webpackChunkName: "routes" */ | 403 | /* webpackChunkName: "routes" */ |
404 | /* webpackMode: "lazy-once" */ | 404 | /* webpackMode: "lazy-once" */ |
405 | `@/pages/Library/books.vue` | 405 | `@/pages/Library/books.vue` |
406 | ) | 406 | ) |
407 | }, | 407 | }, |
408 | { | 408 | { |
409 | path: '/issue', | 409 | path: '/issue', |
410 | meta: {}, | 410 | meta: {}, |
411 | name: 'Issue', | 411 | name: 'Issue', |
412 | props: (route) => ({ type: route.query.type }), | 412 | props: (route) => ({ type: route.query.type }), |
413 | component: () => | 413 | component: () => |
414 | import ( | 414 | import ( |
415 | /* webpackChunkName: "routes" */ | 415 | /* webpackChunkName: "routes" */ |
416 | /* webpackMode: "lazy-once" */ | 416 | /* webpackMode: "lazy-once" */ |
417 | `@/pages/Library/issue.vue` | 417 | `@/pages/Library/issue.vue` |
418 | ) | 418 | ) |
419 | }, | 419 | }, |
420 | { | 420 | { |
421 | path: '/e-books', | 421 | path: '/e-books', |
422 | meta: {}, | 422 | meta: {}, |
423 | name: 'E-Books', | 423 | name: 'E-Books', |
424 | props: (route) => ({ type: route.query.type }), | 424 | props: (route) => ({ type: route.query.type }), |
425 | component: () => | 425 | component: () => |
426 | import ( | 426 | import ( |
427 | /* webpackChunkName: "routes" */ | 427 | /* webpackChunkName: "routes" */ |
428 | /* webpackMode: "lazy-once" */ | 428 | /* webpackMode: "lazy-once" */ |
429 | `@/pages/Library/eBook.vue` | 429 | `@/pages/Library/eBook.vue` |
430 | ) | 430 | ) |
431 | }, | 431 | }, |
432 | { | 432 | { |
433 | path: '/invoiceId/:invoiceid', | 433 | path: '/invoiceId/:invoiceid', |
434 | meta: {}, | 434 | meta: {}, |
435 | name: 'EditInvoice', | 435 | name: 'Edit Invoice', |
436 | // props: (route) => ({ type: route.query.type }), | 436 | // props: (route) => ({ type: route.query.type }), |
437 | component: () => | 437 | component: () => |
438 | import ( | 438 | import ( |
439 | /* webpackChunkName: "routes" */ | 439 | /* webpackChunkName: "routes" */ |
440 | /* webpackMode: "lazy-once" */ | 440 | /* webpackMode: "lazy-once" */ |
441 | `@/pages/Account/editInvoice.vue` | 441 | `@/pages/Account/editInvoice.vue` |
442 | ) | 442 | ) |
443 | }, | 443 | }, |
444 | { | 444 | { |
445 | path: '/StudentsAttendence/:id', | 445 | path: '/StudentsAttendence/:id', |
446 | meta: {}, | 446 | meta: {}, |
447 | name: 'ViewStudentsAttendence', | 447 | name: 'View Students Attendence', |
448 | props: (route) => ({ type: route.query.type }), | 448 | props: (route) => ({ type: route.query.type }), |
449 | component: () => | 449 | component: () => |
450 | import ( | 450 | import ( |
451 | /* webpackChunkName: "routes" */ | 451 | /* webpackChunkName: "routes" */ |
452 | /* webpackMode: "lazy-once" */ | 452 | /* webpackMode: "lazy-once" */ |
453 | `@/pages/Attendence/viewStudentsAttendence.vue` | 453 | `@/pages/Attendence/viewStudentsAttendence.vue` |
454 | ) | 454 | ) |
455 | }, | 455 | }, |
456 | { | 456 | { |
457 | path: '/TeacherAttendence/:teacherId', | 457 | path: '/TeacherAttendence/:teacherId', |
458 | meta: {}, | 458 | meta: {}, |
459 | name: 'ViewTeacherAttendence', | 459 | name: 'View Teacher Attendence', |
460 | props: (route) => ({ type: route.query.type }), | 460 | props: (route) => ({ type: route.query.type }), |
461 | component: () => | 461 | component: () => |
462 | import ( | 462 | import ( |
463 | /* webpackChunkName: "routes" */ | 463 | /* webpackChunkName: "routes" */ |
464 | /* webpackMode: "lazy-once" */ | 464 | /* webpackMode: "lazy-once" */ |
465 | `@/pages/Attendence/viewTeacherAttendence.vue` | 465 | `@/pages/Attendence/viewTeacherAttendence.vue` |
466 | ) | 466 | ) |
467 | }, | 467 | }, |
468 | { | 468 | { |
469 | path: '/viewInvoice/:viewInvoiceId', | 469 | path: '/viewInvoice/:viewInvoiceId', |
470 | meta: {}, | 470 | meta: {}, |
471 | name: 'ViewInvoice', | 471 | name: 'View Invoice', |
472 | props: (route) => ({ type: route.query.type }), | 472 | props: (route) => ({ type: route.query.type }), |
473 | component: () => | 473 | component: () => |
474 | import ( | 474 | import ( |
475 | /* webpackChunkName: "routes" */ | 475 | /* webpackChunkName: "routes" */ |
476 | /* webpackMode: "lazy-once" */ | 476 | /* webpackMode: "lazy-once" */ |
477 | `@/pages/Account/viewInvoice.vue` | 477 | `@/pages/Account/viewInvoice.vue` |
478 | ) | 478 | ) |
479 | }, | 479 | }, |
480 | { | 480 | { |
481 | path: '/globalPayment', | 481 | path: '/globalPayment', |
482 | meta: {}, | 482 | meta: {}, |
483 | name: 'GlobalPayment', | 483 | name: 'Global Payment', |
484 | props: (route) => ({ type: route.query.type }), | 484 | props: (route) => ({ type: route.query.type }), |
485 | component: () => | 485 | component: () => |
486 | import ( | 486 | import ( |
487 | /* webpackChunkName: "routes" */ | 487 | /* webpackChunkName: "routes" */ |
488 | /* webpackMode: "lazy-once" */ | 488 | /* webpackMode: "lazy-once" */ |
489 | `@/pages/Account/globalPayment.vue` | 489 | `@/pages/Account/globalPayment.vue` |
490 | ) | 490 | ) |
491 | }, | 491 | }, |
492 | { | 492 | { |
493 | path: '/exam', | 493 | path: '/exam', |
494 | meta: {}, | 494 | meta: {}, |
495 | name: 'Exam', | 495 | name: 'Exam', |
496 | props: (route) => ({ type: route.query.type }), | 496 | props: (route) => ({ type: route.query.type }), |
497 | component: () => | 497 | component: () => |
498 | import ( | 498 | import ( |
499 | /* webpackChunkName: "routes" */ | 499 | /* webpackChunkName: "routes" */ |
500 | /* webpackMode: "lazy-once" */ | 500 | /* webpackMode: "lazy-once" */ |
501 | `@/pages/Exam/exam.vue` | 501 | `@/pages/Exam/exam.vue` |
502 | ) | 502 | ) |
503 | }, | 503 | }, |
504 | { | 504 | { |
505 | path: '/grade', | 505 | path: '/grade', |
506 | meta: {}, | 506 | meta: {}, |
507 | name: 'Grade', | 507 | name: 'Grade', |
508 | props: (route) => ({ type: route.query.type }), | 508 | props: (route) => ({ type: route.query.type }), |
509 | component: () => | 509 | component: () => |
510 | import ( | 510 | import ( |
511 | /* webpackChunkName: "routes" */ | 511 | /* webpackChunkName: "routes" */ |
512 | /* webpackMode: "lazy-once" */ | 512 | /* webpackMode: "lazy-once" */ |
513 | `@/pages/Exam/grade.vue` | 513 | `@/pages/Exam/grade.vue` |
514 | ) | 514 | ) |
515 | }, | 515 | }, |
516 | { | 516 | { |
517 | path: '/examSchedule', | 517 | path: '/examSchedule', |
518 | meta: {}, | 518 | meta: {}, |
519 | name: 'ExamSchedule', | 519 | name: 'Exam Schedule', |
520 | props: (route) => ({ type: route.query.type }), | 520 | props: (route) => ({ type: route.query.type }), |
521 | component: () => | 521 | component: () => |
522 | import ( | 522 | import ( |
523 | /* webpackChunkName: "routes" */ | 523 | /* webpackChunkName: "routes" */ |
524 | /* webpackMode: "lazy-once" */ | 524 | /* webpackMode: "lazy-once" */ |
525 | `@/pages/Exam/examSchedule.vue` | 525 | `@/pages/Exam/examSchedule.vue` |
526 | ) | 526 | ) |
527 | }, | 527 | }, |
528 | { | 528 | { |
529 | path: '/mark', | 529 | path: '/mark', |
530 | meta: {}, | 530 | meta: {}, |
531 | name: 'Mark', | 531 | name: 'Mark', |
532 | props: (route) => ({ type: route.query.type }), | 532 | props: (route) => ({ type: route.query.type }), |
533 | component: () => | 533 | component: () => |
534 | import ( | 534 | import ( |
535 | /* webpackChunkName: "routes" */ | 535 | /* webpackChunkName: "routes" */ |
536 | /* webpackMode: "lazy-once" */ | 536 | /* webpackMode: "lazy-once" */ |
537 | `@/pages/Mark/mark.vue` | 537 | `@/pages/Mark/mark.vue` |
538 | ) | 538 | ) |
539 | }, | 539 | }, |
540 | { | 540 | { |
541 | path: '/viewMark/:markId', | 541 | path: '/viewMark/:markId', |
542 | meta: {}, | 542 | meta: {}, |
543 | name: 'viewMark', | 543 | name: 'view Mark', |
544 | props: (route) => ({ type: route.query.type }), | 544 | props: (route) => ({ type: route.query.type }), |
545 | component: () => | 545 | component: () => |
546 | import ( | 546 | import ( |
547 | /* webpackChunkName: "routes" */ | 547 | /* webpackChunkName: "routes" */ |
548 | /* webpackMode: "lazy-once" */ | 548 | /* webpackMode: "lazy-once" */ |
549 | `@/pages/Mark/viewMark.vue` | 549 | `@/pages/Mark/viewMark.vue` |
550 | ) | 550 | ) |
551 | }, | 551 | }, |
552 | { | 552 | { |
553 | path: '/markDistribution', | 553 | path: '/markDistribution', |
554 | meta: {}, | 554 | meta: {}, |
555 | name: 'MarkDistribution', | 555 | name: 'Mark Distribution', |
556 | props: (route) => ({ type: route.query.type }), | 556 | props: (route) => ({ type: route.query.type }), |
557 | component: () => | 557 | component: () => |
558 | import ( | 558 | import ( |
559 | /* webpackChunkName: "routes" */ | 559 | /* webpackChunkName: "routes" */ |
560 | /* webpackMode: "lazy-once" */ | 560 | /* webpackMode: "lazy-once" */ |
561 | `@/pages/Mark/markDistribution.vue` | 561 | `@/pages/Mark/markDistribution.vue` |
562 | ) | 562 | ) |
563 | }, | 563 | }, |
564 | { | 564 | { |
565 | path: '/promotion', | 565 | path: '/promotion', |
566 | meta: {}, | 566 | meta: {}, |
567 | name: 'Promotion', | 567 | name: 'Promotion', |
568 | props: (route) => ({ type: route.query.type }), | 568 | props: (route) => ({ type: route.query.type }), |
569 | component: () => | 569 | component: () => |
570 | import ( | 570 | import ( |
571 | /* webpackChunkName: "routes" */ | 571 | /* webpackChunkName: "routes" */ |
572 | /* webpackMode: "lazy-once" */ | 572 | /* webpackMode: "lazy-once" */ |
573 | `@/pages/Mark/promotion.vue` | 573 | `@/pages/Mark/promotion.vue` |
574 | ) | 574 | ) |
575 | }, | 575 | }, |
576 | { | 576 | { |
577 | path: '/academicYear', | 577 | path: '/academicYear', |
578 | meta: {}, | 578 | meta: {}, |
579 | name: 'AcademicYear', | 579 | name: 'Academic Year', |
580 | props: (route) => ({ type: route.query.type }), | 580 | props: (route) => ({ type: route.query.type }), |
581 | component: () => | 581 | component: () => |
582 | import ( | 582 | import ( |
583 | /* webpackChunkName: "routes" */ | 583 | /* webpackChunkName: "routes" */ |
584 | /* webpackMode: "lazy-once" */ | 584 | /* webpackMode: "lazy-once" */ |
585 | `@/pages/Administrator/academicYear.vue` | 585 | `@/pages/Administrator/academicYear.vue` |
586 | ) | 586 | ) |
587 | }, | 587 | }, |
588 | { | 588 | { |
589 | path: '/systemAdmin', | 589 | path: '/systemAdmin', |
590 | meta: {}, | 590 | meta: {}, |
591 | name: 'systemAdmin', | 591 | name: 'System Admin', |
592 | props: (route) => ({ type: route.query.type }), | 592 | props: (route) => ({ type: route.query.type }), |
593 | component: () => | 593 | component: () => |
594 | import ( | 594 | import ( |
595 | /* webpackChunkName: "routes" */ | 595 | /* webpackChunkName: "routes" */ |
596 | /* webpackMode: "lazy-once" */ | 596 | /* webpackMode: "lazy-once" */ |
597 | `@/pages/Administrator/systemAdmin.vue` | 597 | `@/pages/Administrator/systemAdmin.vue` |
598 | ) | 598 | ) |
599 | }, | 599 | }, |
600 | { | 600 | { |
601 | path: '/resetPassword', | 601 | path: '/resetPassword', |
602 | meta: {}, | 602 | meta: {}, |
603 | name: 'resetPassword', | 603 | name: 'Reset Password', |
604 | props: (route) => ({ type: route.query.type }), | 604 | props: (route) => ({ type: route.query.type }), |
605 | component: () => | 605 | component: () => |
606 | import ( | 606 | import ( |
607 | /* webpackChunkName: "routes" */ | 607 | /* webpackChunkName: "routes" */ |
608 | /* webpackMode: "lazy-once" */ | 608 | /* webpackMode: "lazy-once" */ |
609 | `@/pages/Administrator/resetPassword.vue` | 609 | `@/pages/Administrator/resetPassword.vue` |
610 | ) | 610 | ) |
611 | }, | 611 | }, |
612 | { | 612 | { |
613 | path: '/role', | 613 | path: '/role', |
614 | meta: {}, | 614 | meta: {}, |
615 | name: 'Role', | 615 | name: 'Role', |
616 | props: (route) => ({ type: route.query.type }), | 616 | props: (route) => ({ type: route.query.type }), |
617 | component: () => | 617 | component: () => |
618 | import ( | 618 | import ( |
619 | /* webpackChunkName: "routes" */ | 619 | /* webpackChunkName: "routes" */ |
620 | /* webpackMode: "lazy-once" */ | 620 | /* webpackMode: "lazy-once" */ |
621 | `@/pages/Administrator/role.vue` | 621 | `@/pages/Administrator/role.vue` |
622 | ) | 622 | ) |
623 | }, | 623 | }, |
624 | { | 624 | { |
625 | path: '/bulkImport', | 625 | path: '/bulkImport', |
626 | meta: {}, | 626 | meta: {}, |
627 | name: 'BulkImport', | 627 | name: 'Bulk Import', |
628 | props: (route) => ({ type: route.query.type }), | 628 | props: (route) => ({ type: route.query.type }), |
629 | component: () => | 629 | component: () => |
630 | import ( | 630 | import ( |
631 | /* webpackChunkName: "routes" */ | 631 | /* webpackChunkName: "routes" */ |
632 | /* webpackMode: "lazy-once" */ | 632 | /* webpackMode: "lazy-once" */ |
633 | `@/pages/Administrator/bulkImport.vue` | 633 | `@/pages/Administrator/bulkImport.vue` |
634 | ) | 634 | ) |
635 | }, | 635 | }, |
636 | { | 636 | { |
637 | path: '/studentReport', | 637 | path: '/studentReport', |
638 | meta: {}, | 638 | meta: {}, |
639 | name: 'studentReport', | 639 | name: 'Student Report', |
640 | props: (route) => ({ type: route.query.type }), | 640 | props: (route) => ({ type: route.query.type }), |
641 | component: () => | 641 | component: () => |
642 | import ( | 642 | import ( |
643 | /* webpackChunkName: "routes" */ | 643 | /* webpackChunkName: "routes" */ |
644 | /* webpackMode: "lazy-once" */ | 644 | /* webpackMode: "lazy-once" */ |
645 | `@/pages/Report/studentReport.vue` | 645 | `@/pages/Report/studentReport.vue` |
646 | ) | 646 | ) |
647 | }, | 647 | }, |
648 | { | 648 | { |
649 | path: '/progressCardReport', | 649 | path: '/progressCardReport', |
650 | meta: {}, | 650 | meta: {}, |
651 | name: 'ProgressCardReport', | 651 | name: 'Progress Card Report', |
652 | props: (route) => ({ type: route.query.type }), | 652 | props: (route) => ({ type: route.query.type }), |
653 | component: () => | 653 | component: () => |
654 | import ( | 654 | import ( |
655 | /* webpackChunkName: "routes" */ | 655 | /* webpackChunkName: "routes" */ |
656 | /* webpackMode: "lazy-once" */ | 656 | /* webpackMode: "lazy-once" */ |
657 | `@/pages/Report/progressCardReport.vue` | 657 | `@/pages/Report/progressCardReport.vue` |
658 | ) | 658 | ) |
659 | }, | 659 | }, |
660 | { | 660 | { |
661 | path: '/generalSetting', | 661 | path: '/generalSetting', |
662 | meta: {}, | 662 | meta: {}, |
663 | name: 'GeneralSetting', | 663 | name: 'General Setting', |
664 | props: (route) => ({ type: route.query.type }), | 664 | props: (route) => ({ type: route.query.type }), |
665 | component: () => | 665 | component: () => |
666 | import ( | 666 | import ( |
667 | /* webpackChunkName: "routes" */ | 667 | /* webpackChunkName: "routes" */ |
668 | /* webpackMode: "lazy-once" */ | 668 | /* webpackMode: "lazy-once" */ |
669 | `@/pages/generalSetting/generalSetting.vue` | 669 | `@/pages/generalSetting/generalSetting.vue` |
670 | ) | 670 | ) |
671 | }, | 671 | }, |
672 | 672 | ||
673 | //////SCHOOL | 673 | //////SCHOOL |
674 | 674 | ||
675 | { | 675 | { |
676 | path: '/school', | 676 | path: '/school', |
677 | meta: {}, | 677 | meta: {}, |
678 | name: 'School', | 678 | name: 'School', |
679 | props: (route) => ({ type: route.query.type }), | 679 | props: (route) => ({ type: route.query.type }), |
680 | component: () => | 680 | component: () => |
681 | import ( | 681 | import ( |
682 | /* webpackChunkName: "routes" */ | 682 | /* webpackChunkName: "routes" */ |
683 | /* webpackMode: "lazy-once" */ | 683 | /* webpackMode: "lazy-once" */ |
684 | `@/pages/School/school.vue` | 684 | `@/pages/School/school.vue` |
685 | ) | 685 | ) |
686 | }, | 686 | }, |
687 | { | 687 | { |
688 | path: '/schooldashboard/:schoolId', | 688 | path: '/schooldashboard/:schoolId', |
689 | meta: {}, | 689 | meta: {}, |
690 | name: 'viewSchoolDashboard', | 690 | name: 'View School Dashboard', |
691 | props: (route) => ({ type: route.query.type }), | 691 | props: (route) => ({ type: route.query.type }), |
692 | component: () => | 692 | component: () => |
693 | import ( | 693 | import ( |
694 | /* webpackChunkName: "routes" */ | 694 | /* webpackChunkName: "routes" */ |
695 | /* webpackMode: "lazy-once" */ | 695 | /* webpackMode: "lazy-once" */ |
696 | `@/pages/School/viewSchoolDashboard.vue` | 696 | `@/pages/School/viewSchoolDashboard.vue` |
697 | ) | 697 | ) |
698 | } | 698 | } |
699 | ]; | 699 | ]; |