Commit 3816c82ec6ee39fd3b2d801841a15b3f1e4b6c12

Authored by Neeraj Sharma
1 parent fe582921b6

add select time by time-picker in Time Table

Showing 1 changed file with 13 additions and 11 deletions   Show diff stats
src/pages/TimeTable/timeTable.vue
1 <template> 1 <template>
2 <v-app id="pages-dasboard"> 2 <v-app id="pages-dasboard">
3 <v-toolbar class="fixcolors" fixed app> 3 <v-toolbar class="fixcolors" fixed app>
4 <v-toolbar-title class="ml-0 pl-3"> 4 <v-toolbar-title class="ml-0 pl-3">
5 <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> 5 <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon>
6 </v-toolbar-title> 6 </v-toolbar-title>
7 <!-- ****** SEARCH ALL EXISTING TIME-TABLE ****** --> 7 <!-- ****** SEARCH ALL EXISTING TIME-TABLE ****** -->
8 <v-flex xs7 sm3 class="userSearch"> 8 <v-flex xs7 sm3 class="userSearch">
9 <v-text-field 9 <v-text-field
10 flat 10 flat
11 append-icon="search" 11 append-icon="search"
12 label="Find your Time Talbe" 12 label="Find your Time Talbe"
13 v-model="search" 13 v-model="search"
14 color="white" 14 color="white"
15 dark 15 dark
16 ></v-text-field> 16 ></v-text-field>
17 </v-flex> 17 </v-flex>
18 <v-spacer></v-spacer> 18 <v-spacer></v-spacer>
19 <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> 19 <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition">
20 <v-btn icon large flat slot="activator"> 20 <v-btn icon large flat slot="activator">
21 <v-avatar size="40px"> 21 <v-avatar size="40px">
22 <img src="/static/icon/user.png"> 22 <img src="/static/icon/user.png">
23 </v-avatar> 23 </v-avatar>
24 </v-btn> 24 </v-btn>
25 <v-list class="pa-0"> 25 <v-list class="pa-0">
26 <v-list-tile 26 <v-list-tile
27 v-for="(item,index) in items" 27 v-for="(item,index) in items"
28 :to="!item.href ? { name: item.name } : null" 28 :to="!item.href ? { name: item.name } : null"
29 :href="item.href" 29 :href="item.href"
30 @click="item.click" 30 @click="item.click"
31 ripple="ripple" 31 ripple="ripple"
32 :disabled="item.disabled" 32 :disabled="item.disabled"
33 :target="item.target" 33 :target="item.target"
34 rel="noopener" 34 rel="noopener"
35 :key="index" 35 :key="index"
36 > 36 >
37 <v-list-tile-action v-if="item.icon"> 37 <v-list-tile-action v-if="item.icon">
38 <v-icon>{{ item.icon }}</v-icon> 38 <v-icon>{{ item.icon }}</v-icon>
39 </v-list-tile-action> 39 </v-list-tile-action>
40 <v-list-tile-content> 40 <v-list-tile-content>
41 <v-list-tile-title>{{ item.title }}</v-list-tile-title> 41 <v-list-tile-title>{{ item.title }}</v-list-tile-title>
42 </v-list-tile-content> 42 </v-list-tile-content>
43 </v-list-tile> 43 </v-list-tile>
44 </v-list> 44 </v-list>
45 </v-menu> 45 </v-menu>
46 </v-toolbar> 46 </v-toolbar>
47 <v-tabs grow slider-color="black"> 47 <v-tabs grow slider-color="black">
48 <v-tab 48 <v-tab
49 ripple 49 ripple
50 @click="activeTab('existing')" 50 @click="activeTab('existing')"
51 v-bind:class="{ active: isActive }" 51 v-bind:class="{ active: isActive }"
52 id="tab" 52 id="tab"
53 class="subheading" 53 class="subheading"
54 >Existing Time Table</v-tab> 54 >Existing Time Table</v-tab>
55 <v-tab 55 <v-tab
56 ripple 56 ripple
57 @click="activeTab('new')" 57 @click="activeTab('new')"
58 v-bind:class="{ active: newActive }" 58 v-bind:class="{ active: newActive }"
59 id="tab1" 59 id="tab1"
60 User 60 User
61 class="subheading" 61 class="subheading"
62 >Add New Time Table</v-tab> 62 >Add New Time Table</v-tab>
63 63
64 <!-- ****** EDITS TIME-TABLE****** --> 64 <!-- ****** EDITS TIME-TABLE****** -->
65 65
66 <v-tab-item> 66 <v-tab-item>
67 <v-snackbar 67 <v-snackbar
68 :timeout="timeout" 68 :timeout="timeout"
69 :top="y === 'top'" 69 :top="y === 'top'"
70 :right="x === 'right'" 70 :right="x === 'right'"
71 :vertical="mode === 'vertical'" 71 :vertical="mode === 'vertical'"
72 v-model="snackbar" 72 v-model="snackbar"
73 color="success" 73 color="success"
74 >{{ text }}</v-snackbar> 74 >{{ text }}</v-snackbar>
75 <v-dialog v-model="dialog" max-width="1000px"> 75 <v-dialog v-model="dialog" max-width="1000px">
76 <v-flex xs12 sm12 class> 76 <v-flex xs12 sm12 class>
77 <v-toolbar color="grey lighten-2"> 77 <v-toolbar color="grey lighten-2">
78 <v-spacer></v-spacer> 78 <v-spacer></v-spacer>
79 <v-toolbar-title> 79 <v-toolbar-title>
80 <h3>Edit Time Table</h3> 80 <h3>Edit Time Table</h3>
81 </v-toolbar-title> 81 </v-toolbar-title>
82 <v-spacer></v-spacer> 82 <v-spacer></v-spacer>
83 </v-toolbar> 83 </v-toolbar>
84 <v-card flat> 84 <v-card flat>
85 <v-form ref="form"> 85 <v-form ref="form">
86 <v-container fluid> 86 <v-container fluid>
87 <v-layout> 87 <v-layout>
88 <v-flex 88 <v-flex
89 xs12 89 xs12
90 class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" 90 class="text-xs-center text-sm-center text-md-center text-lg-center mr-4"
91 > 91 >
92 <v-avatar size="100px"> 92 <v-avatar size="100px">
93 <img src="/static/icon/user.png" v-if="!imageUrl"> 93 <img src="/static/icon/user.png" v-if="!imageUrl">
94 </v-avatar> 94 </v-avatar>
95 <input 95 <input
96 type="file" 96 type="file"
97 style="display: none" 97 style="display: none"
98 ref="image" 98 ref="image"
99 accept="image/*" 99 accept="image/*"
100 @change="onFilePicked" 100 @change="onFilePicked"
101 > 101 >
102 <img 102 <img
103 :src="imageData.imageUrl" 103 :src="imageData.imageUrl"
104 height="150" 104 height="150"
105 v-if="imageUrl" 105 v-if="imageUrl"
106 style="border-radius:50%; width:200px" 106 style="border-radius:50%; width:200px"
107 > 107 >
108 </v-flex> 108 </v-flex>
109 </v-layout> 109 </v-layout>
110 <v-flex xs12 sm12> 110 <v-flex xs12 sm12>
111 <v-layout> 111 <v-layout>
112 <v-flex xs4 class="pt-4 subheading"> 112 <v-flex xs4 class="pt-4 subheading">
113 <label class="right">class No:</label> 113 <label class="right">class No:</label>
114 </v-flex> 114 </v-flex>
115 <v-flex xs12 sm5 class="ml-3"> 115 <v-flex xs12 sm5 class="ml-3">
116 <v-select 116 <v-select
117 :items="addclass" 117 :items="addclass"
118 label="Select Class" 118 label="Select Class"
119 v-model="editedItem.classNum" 119 v-model="editedItem.classNum"
120 item-text="classNum" 120 item-text="classNum"
121 item-value="_id" 121 item-value="_id"
122 @change="getSections(editedItem.classNum)" 122 @change="getSections(editedItem.classNum)"
123 ></v-select> 123 ></v-select>
124 </v-flex> 124 </v-flex>
125 </v-layout> 125 </v-layout>
126 </v-flex> 126 </v-flex>
127 <v-flex xs12 sm12> 127 <v-flex xs12 sm12>
128 <v-layout> 128 <v-layout>
129 <v-flex xs4 class="pt-4 subheading"> 129 <v-flex xs4 class="pt-4 subheading">
130 <label class="right">Section Name:</label> 130 <label class="right">Section Name:</label>
131 </v-flex> 131 </v-flex>
132 <v-flex xs5 class="ml-3"> 132 <v-flex xs5 class="ml-3">
133 <v-select 133 <v-select
134 :items="addSection" 134 :items="addSection"
135 label="Select Section" 135 label="Select Section"
136 v-model="editedItem.selectSection" 136 v-model="editedItem.selectSection"
137 item-text="name" 137 item-text="name"
138 item-value="_id" 138 item-value="_id"
139 ></v-select> 139 ></v-select>
140 </v-flex> 140 </v-flex>
141 </v-layout> 141 </v-layout>
142 </v-flex> 142 </v-flex>
143 <v-layout> 143 <v-layout>
144 <v-flex xs12 sm8 offset-sm2> 144 <v-flex xs12 sm8 offset-sm2>
145 <v-card-actions> 145 <v-card-actions>
146 <v-btn round dark @click.native="close">Cancel</v-btn> 146 <v-btn round dark @click.native="close">Cancel</v-btn>
147 <v-spacer></v-spacer> 147 <v-spacer></v-spacer>
148 <v-btn round dark @click="save">Save</v-btn> 148 <v-btn round dark @click="save">Save</v-btn>
149 </v-card-actions> 149 </v-card-actions>
150 </v-flex> 150 </v-flex>
151 </v-layout> 151 </v-layout>
152 </v-container> 152 </v-container>
153 </v-form> 153 </v-form>
154 </v-card> 154 </v-card>
155 </v-flex> 155 </v-flex>
156 </v-dialog> 156 </v-dialog>
157 157
158 <!-- ****** ADD LECTURES IN TIME-TABLE ****** --> 158 <!-- ****** ADD LECTURES IN TIME-TABLE ****** -->
159 159
160 <v-dialog v-model="dialogAddLecture" max-width="1000px"> 160 <v-dialog v-model="dialogAddLecture" max-width="1000px">
161 <v-flex xs12 sm12> 161 <v-flex xs12 sm12>
162 <v-toolbar color="grey lighten-2"> 162 <v-toolbar color="grey lighten-2">
163 <v-spacer></v-spacer> 163 <v-spacer></v-spacer>
164 <v-toolbar-title> 164 <v-toolbar-title>
165 <h3>Add Lecture</h3> 165 <h3>Add Lecture</h3>
166 </v-toolbar-title> 166 </v-toolbar-title>
167 <v-spacer></v-spacer> 167 <v-spacer></v-spacer>
168 </v-toolbar> 168 </v-toolbar>
169 <v-card flat> 169 <v-card flat>
170 <v-form ref="form" v-model="valid" lazy-validation> 170 <v-form ref="form" v-model="valid" lazy-validation>
171 <v-container fluid> 171 <v-container fluid>
172 <v-flex xs12 sm12> 172 <v-flex xs12 sm12>
173 <v-layout> 173 <v-layout>
174 <v-flex xs4 class="pt-4 subheading"> 174 <v-flex xs4 class="pt-4 subheading">
175 <label class="right">Subject Name:</label> 175 <label class="right">Subject Name:</label>
176 </v-flex> 176 </v-flex>
177 <v-flex xs5 class="ml-3"> 177 <v-flex xs5 class="ml-3">
178 <v-text-field 178 <v-text-field
179 v-model="addlectures.subjectName" 179 v-model="addlectures.subjectName"
180 :rules="subjectNameRules" 180 :rules="subjectNameRules"
181 placeholder="fill your Subject Name" 181 placeholder="fill your Subject Name"
182 type="text" 182 type="text"
183 ></v-text-field> 183 ></v-text-field>
184 </v-flex> 184 </v-flex>
185 </v-layout> 185 </v-layout>
186 </v-flex> 186 </v-flex>
187 <v-flex xs12 sm12> 187 <v-flex xs12 sm12>
188 <v-layout> 188 <v-layout>
189 <v-flex xs4 class="pt-4 subheading"> 189 <v-flex xs4 class="pt-4 subheading">
190 <label class="right">Time In:</label> 190 <label class="right">Time In:</label>
191 </v-flex> 191 </v-flex>
192 <v-flex xs5 class="ml-3"> 192 <v-flex xs5 class="ml-3">
193 <v-menu 193 <v-menu
194 ref="menuD" 194 ref="menuD"
195 :close-on-content-click="false" 195 :close-on-content-click="false"
196 v-model="menu5" 196 v-model="menu5"
197 :nudge-right="40" 197 :nudge-right="40"
198 :return-value.sync="addlectures.timeIn" 198 :return-value.sync="addlectures.timeIn"
199 lazy 199 lazy
200 transition="scale-transition" 200 transition="scale-transition"
201 offset-y 201 offset-y
202 full-width 202 full-width
203 max-width="290px" 203 max-width="290px"
204 min-width="290px" 204 min-width="290px"
205 > 205 >
206 <v-text-field 206 <v-text-field
207 slot="activator" 207 slot="activator"
208 v-model="addlectures.timeIn" 208 v-model="addlectures.timeIn"
209 label="Select your Time Out" 209 label="Select your Time Out"
210 append-icon="access_time" 210 append-icon="access_time"
211 :rules="timeInRules" 211 :rules="timeInRules"
212 ></v-text-field> 212 ></v-text-field>
213 <v-time-picker v-model="addlectures.timeIn" @change="$refs.menuD.save(addlectures.timeIn)"></v-time-picker> 213 <v-time-picker v-model="addlectures.timeIn" @change="$refs.menuD.save(addlectures.timeIn)"></v-time-picker>
214 </v-menu> 214 </v-menu>
215 </v-flex> 215 </v-flex>
216 </v-layout> 216 </v-layout>
217 </v-flex> 217 </v-flex>
218 <v-flex xs12 sm12> 218 <v-flex xs12 sm12>
219 <v-layout> 219 <v-layout>
220 <v-flex xs4 class="pt-4 subheading"> 220 <v-flex xs4 class="pt-4 subheading">
221 <label class="right">Time Out:</label> 221 <label class="right">Time Out:</label>
222 </v-flex> 222 </v-flex>
223 <v-flex xs5 class="ml-3"> 223 <v-flex xs5 class="ml-3">
224 <v-menu 224 <v-menu
225 ref="menuE" 225 ref="menuE"
226 :close-on-content-click="false" 226 :close-on-content-click="false"
227 v-model="menu6" 227 v-model="menu6"
228 :nudge-right="40" 228 :nudge-right="40"
229 :return-value.sync="addlectures.timeOut" 229 :return-value.sync="addlectures.timeOut"
230 lazy 230 lazy
231 transition="scale-transition" 231 transition="scale-transition"
232 offset-y 232 offset-y
233 full-width 233 full-width
234 max-width="290px" 234 max-width="290px"
235 min-width="290px" 235 min-width="290px"
236 > 236 >
237 <v-text-field 237 <v-text-field
238 slot="activator" 238 slot="activator"
239 :rules="timeOutRules" 239 :rules="timeOutRules"
240 v-model="addlectures.timeOut" 240 v-model="addlectures.timeOut"
241 label="Select your Time Out" 241 label="Select your Time Out"
242 append-icon="access_time" 242 append-icon="access_time"
243 ></v-text-field> 243 ></v-text-field>
244 <v-time-picker v-model="addlectures.timeOut" @change="$refs.menuE.save(addlectures.timeOut)"></v-time-picker> 244 <v-time-picker v-model="addlectures.timeOut" @change="$refs.menuE.save(addlectures.timeOut)"></v-time-picker>
245 </v-menu> 245 </v-menu>
246 </v-flex> 246 </v-flex>
247 </v-layout> 247 </v-layout>
248 </v-flex> 248 </v-flex>
249 <v-flex xs12 sm12> 249 <v-flex xs12 sm12>
250 <v-layout> 250 <v-layout>
251 <v-flex xs4 class="pt-4 subheading"> 251 <v-flex xs4 class="pt-4 subheading">
252 <label class="right">Select Teacher:</label> 252 <label class="right">Select Teacher:</label>
253 </v-flex> 253 </v-flex>
254 <v-flex xs5 class="ml-3"> 254 <v-flex xs5 class="ml-3">
255 <v-select 255 <v-select
256 :items="addTeachers" 256 :items="addTeachers"
257 v-model="addlectures.teacherId" 257 v-model="addlectures.teacherId"
258 :rules="subjectNameRules" 258 :rules="subjectNameRules"
259 item-text="name" 259 item-text="name"
260 item-value="_id" 260 item-value="_id"
261 required 261 required
262 ></v-select> 262 ></v-select>
263 </v-flex> 263 </v-flex>
264 </v-layout> 264 </v-layout>
265 </v-flex> 265 </v-flex>
266 <v-layout> 266 <v-layout>
267 <v-flex xs12 sm8 offset-sm2> 267 <v-flex xs12 sm8 offset-sm2>
268 <v-card-actions> 268 <v-card-actions>
269 <v-btn round dark @click.native="closedialogLecture">Cancel</v-btn> 269 <v-btn round dark @click.native="closedialogLecture">Cancel</v-btn>
270 <v-spacer></v-spacer> 270 <v-spacer></v-spacer>
271 <v-btn round dark @click="AddLecture">Save</v-btn> 271 <v-btn round dark @click="AddLecture">Save</v-btn>
272 </v-card-actions> 272 </v-card-actions>
273 </v-flex> 273 </v-flex>
274 </v-layout> 274 </v-layout>
275 </v-container> 275 </v-container>
276 </v-form> 276 </v-form>
277 </v-card> 277 </v-card>
278 </v-flex> 278 </v-flex>
279 </v-dialog> 279 </v-dialog>
280 280
281 <!-- ****** EDIT PARTICULAR LECTURES TIME-TABLE ****** --> 281 <!-- ****** EDIT PARTICULAR LECTURES TIME-TABLE ****** -->
282 282
283 <v-dialog v-model="dialogUpdateLectures" max-width="1000px"> 283 <v-dialog v-model="dialogUpdateLectures" max-width="1000px">
284 <v-flex xs12 sm12 class> 284 <v-flex xs12 sm12 class>
285 <v-toolbar color="white"> 285 <v-toolbar color="grey lighten-2">
286 <v-spacer></v-spacer> 286 <v-spacer></v-spacer>
287 <v-toolbar-title>Edit Lecture</v-toolbar-title> 287 <v-toolbar-title>Edit Lecture</v-toolbar-title>
288 <v-spacer></v-spacer> 288 <v-spacer></v-spacer>
289 </v-toolbar> 289 </v-toolbar>
290 <v-card flat> 290 <v-card flat>
291 <v-form ref="form"> 291 <v-form ref="form">
292 <v-container fluid> 292 <v-container fluid>
293 <v-flex xs12 sm12> 293 <v-flex xs12 sm12>
294 <v-layout> 294 <v-layout>
295 <v-flex xs4 class="pt-4 subheading"> 295 <v-flex xs4 class="pt-4 subheading">
296 <label class="right">Subject Name:</label> 296 <label class="right">Subject Name:</label>
297 </v-flex> 297 </v-flex>
298 <v-flex xs5 class="ml-3"> 298 <v-flex xs5 class="ml-3">
299 <v-text-field 299 <v-text-field
300 v-model="updateLectures.subjectName" 300 v-model="updateLectures.subjectName"
301 placeholder="fill your Subject Name" 301 placeholder="fill your Subject Name"
302 type="text" 302 type="text"
303 ></v-text-field> 303 ></v-text-field>
304 </v-flex> 304 </v-flex>
305 </v-layout> 305 </v-layout>
306 </v-flex> 306 </v-flex>
307 <v-flex xs12 sm12> 307 <v-flex xs12 sm12>
308 <v-layout> 308 <v-layout>
309 <v-flex xs4 class="pt-4 subheading"> 309 <v-flex xs4 class="pt-4 subheading">
310 <label class="right">Time In:</label> 310 <label class="right">Time In:</label>
311 </v-flex> 311 </v-flex>
312 <v-flex xs5 class="ml-3"> 312 <v-flex xs5 class="ml-3">
313 <v-menu 313 <v-menu
314 ref="menuC" 314 ref="menuC"
315 :close-on-content-click="false" 315 :close-on-content-click="false"
316 v-model="menu4" 316 v-model="menu4"
317 :nudge-right="40" 317 :nudge-right="40"
318 :return-value.sync="updateLectures.timeIn" 318 :return-value.sync="updateLectures.timeIn"
319 lazy 319 lazy
320 transition="scale-transition" 320 transition="scale-transition"
321 offset-y 321 offset-y
322 full-width 322 full-width
323 max-width="290px" 323 max-width="290px"
324 min-width="290px" 324 min-width="290px"
325 > 325 >
326 <v-text-field 326 <v-text-field
327 slot="activator" 327 slot="activator"
328 v-model="updateLectures.timeIn" 328 v-model="updateLectures.timeIn"
329 placeholder="Select your Time In" 329 placeholder="Select your Time In"
330 append-icon="access_time" 330 append-icon="access_time"
331 ></v-text-field> 331 ></v-text-field>
332 <v-time-picker v-model="updateLectures.timeIn" @change="$refs.menuC.save(updateLectures.timeIn)"></v-time-picker> 332 <v-time-picker v-model="updateLectures.timeIn" @change="$refs.menuC.save(updateLectures.timeIn)"></v-time-picker>
333 </v-menu> 333 </v-menu>
334 </v-flex> 334 </v-flex>
335 </v-layout> 335 </v-layout>
336 </v-flex> 336 </v-flex>
337 <v-flex xs12 sm12> 337 <v-flex xs12 sm12>
338 <v-layout> 338 <v-layout>
339 <v-flex xs4 class="pt-4 subheading"> 339 <v-flex xs4 class="pt-4 subheading">
340 <label class="right">Time Out:</label> 340 <label class="right">Time Out:</label>
341 </v-flex> 341 </v-flex>
342 <v-flex xs5 class="ml-3"> 342 <v-flex xs5 class="ml-3">
343 <v-menu 343 <v-menu
344 ref="menuB" 344 ref="menuB"
345 :close-on-content-click="false" 345 :close-on-content-click="false"
346 v-model="menu3" 346 v-model="menu3"
347 :nudge-right="40" 347 :nudge-right="40"
348 :return-value.sync="updateLectures.timeOut" 348 :return-value.sync="updateLectures.timeOut"
349 lazy 349 lazy
350 transition="scale-transition" 350 transition="scale-transition"
351 offset-y 351 offset-y
352 full-width 352 full-width
353 max-width="290px" 353 max-width="290px"
354 min-width="290px" 354 min-width="290px"
355 > 355 >
356 <v-text-field 356 <v-text-field
357 slot="activator" 357 slot="activator"
358 v-model="updateLectures.timeOut" 358 v-model="updateLectures.timeOut"
359 placeholder="Select your Time Out" 359 placeholder="Select your Time Out"
360 append-icon="access_time" 360 append-icon="access_time"
361 ></v-text-field> 361 ></v-text-field>
362 <v-time-picker v-model="updateLectures.timeOut" @change="$refs.menuB.save(updateLectures.timeOut)"></v-time-picker> 362 <v-time-picker v-model="updateLectures.timeOut" @change="$refs.menuB.save(updateLectures.timeOut)"></v-time-picker>
363 </v-menu> 363 </v-menu>
364 </v-flex> 364 </v-flex>
365 </v-layout> 365 </v-layout>
366 </v-flex> 366 </v-flex>
367 <v-flex xs12 sm12> 367 <v-flex xs12 sm12>
368 <v-layout> 368 <v-layout>
369 <v-flex xs4 class="pt-4 subheading"> 369 <v-flex xs4 class="pt-4 subheading">
370 <label class="right">Select Teacher:</label> 370 <label class="right">Select Teacher:</label>
371 </v-flex> 371 </v-flex>
372 <v-flex xs5 class="ml-3"> 372 <v-flex xs5 class="ml-3">
373 <v-select 373 <v-select
374 :items="addTeachers" 374 :items="addTeachers"
375 label="Select Teacher" 375 label="Select Teacher"
376 v-model="updateLectures.teacherId" 376 v-model="updateLectures.teacherId"
377 item-text="name" 377 item-text="name"
378 item-value="_id" 378 item-value="_id"
379 required 379 required
380 ></v-select> 380 ></v-select>
381 </v-flex> 381 </v-flex>
382 </v-layout> 382 </v-layout>
383 </v-flex> 383 </v-flex>
384 <v-layout> 384 <v-layout>
385 <v-flex xs12 sm8 offset-sm2> 385 <v-flex xs12 sm8 offset-sm2>
386 <v-card-actions> 386 <v-card-actions>
387 <v-btn round dark @click.native="closeUpdateLectures">Cancel</v-btn> 387 <v-btn round dark @click.native="closeUpdateLectures">Cancel</v-btn>
388 <v-spacer></v-spacer> 388 <v-spacer></v-spacer>
389 <v-btn round dark @click="updateParticularTable(updateLectures.timeIn,updateLectures.timeOut)">Save</v-btn> 389 <v-btn round dark @click="updateParticularTable(updateLectures.timeIn,updateLectures.timeOut)">Save</v-btn>
390 </v-card-actions> 390 </v-card-actions>
391 </v-flex> 391 </v-flex>
392 </v-layout> 392 </v-layout>
393 </v-container> 393 </v-container>
394 </v-form> 394 </v-form>
395 </v-card> 395 </v-card>
396 </v-flex> 396 </v-flex>
397 </v-dialog> 397 </v-dialog>
398 <v-snackbar 398 <v-snackbar
399 :timeout="timeout" 399 :timeout="timeout"
400 :top="y === 'top'" 400 :top="y === 'top'"
401 :right="x === 'right'" 401 :right="x === 'right'"
402 :vertical="mode === 'vertical'" 402 :vertical="mode === 'vertical'"
403 v-model="snackbar" 403 v-model="snackbar"
404 color="success" 404 color="success"
405 >{{ text }}</v-snackbar> 405 >{{ text }}</v-snackbar>
406 406
407 <!-- ****** EXISTING-USERS TIME-TABLE ****** --> 407 <!-- ****** EXISTING-USERS TIME-TABLE ****** -->
408 408
409 <v-card flat> 409 <v-card flat>
410 <v-card-actions> 410 <v-card-actions>
411 <v-layout> 411 <v-layout>
412 <label class = "right mt-4 ml-5 ">Select Class:</label> 412 <label class = "right mt-4 ml-5 ">Select Class:</label>
413 <v-select 413 <v-select
414 :items="addclass" 414 :items="addclass"
415 label="Select Class" 415 label="Select Class"
416 v-model="selectTimeTable.select" 416 v-model="selectTimeTable.select"
417 item-text="classNum" 417 item-text="classNum"
418 item-value="_id" 418 item-value="_id"
419 name="Select Class" 419 name="Select Class"
420 @change="getSections(selectTimeTable.select)" 420 @change="getSections(selectTimeTable.select)"
421 class="px-4" 421 class="px-4"
422 required 422 required
423 ></v-select> 423 ></v-select>
424 <label class="right mt-4">Select Section:</label> 424 <label class="right mt-4">Select Section:</label>
425 <v-select 425 <v-select
426 :items="addSection" 426 :items="addSection"
427 label="Select Section" 427 label="Select Section"
428 v-model="selectTimeTable.selectSection" 428 v-model="selectTimeTable.selectSection"
429 item-text="name" 429 item-text="name"
430 item-value="_id" 430 item-value="_id"
431 name="Select Section" 431 name="Select Section"
432 class="pl-3" 432 class="pl-3"
433 required 433 required
434 ></v-select> 434 ></v-select>
435 </v-layout> 435 </v-layout>
436 <v-spacer></v-spacer> 436 <v-spacer></v-spacer>
437 <v-btn @click="findTimeTable()" round dark :loading="loading" class= "left">Find</v-btn> 437 <v-btn @click="findTimeTable()" round dark :loading="loading" class= "left">Find</v-btn>
438 </v-card-actions> 438 </v-card-actions>
439 </v-card> 439 </v-card>
440 <v-flex xs12> 440 <v-flex xs12>
441 <v-data-table 441 <v-data-table
442 :headers="headers" 442 :headers="headers"
443 :items="desserts" 443 :items="desserts"
444 :pagination.sync="pagination" 444 :pagination.sync="pagination"
445 :search="search" 445 :search="search"
446 item-key="_id" 446 item-key="_id"
447 > 447 >
448 <template slot="items" slot-scope="props"> 448 <template slot="items" slot-scope="props">
449 <tr 449 <tr
450 style="cursor: pointer;" 450 style="cursor: pointer;"
451 @click="getTimeTable(props.item), props.expanded = !props.expanded" 451 @click="getTimeTable(props.item), props.expanded = !props.expanded"
452 > 452 >
453 <td class="text-xs-center">{{ props.index }}</td> 453 <td class="text-xs-center">{{ props.index }}</td>
454 <td class="text-xs-center">{{ props.item.classData.classNum}}</td> 454 <td class="text-xs-center">{{ props.item.classData.classNum}}</td>
455 <td class="text-xs-center">{{ props.item.sectionData.name }}</td> 455 <td class="text-xs-center">{{ props.item.sectionData.name }}</td>
456 <td class="text-xs-center"> 456 <td class="text-xs-center">
457 <span> 457 <span>
458 <img 458 <img
459 style="cursor:pointer; width:20px; height:18px; " 459 style="cursor:pointer; width:20px; height:18px; "
460 class="mr-5" 460 class="mr-5"
461 @click="editItem(props.item)" 461 @click="editItem(props.item)"
462 src="/static/icon/edit1.png" 462 src="/static/icon/edit1.png"
463 > 463 >
464 <img 464 <img
465 style="cursor:pointer; height:20px; " 465 style="cursor:pointer; height:20px; "
466 class="mr-5" 466 class="mr-5"
467 @click="deleteItem(props.item)" 467 @click="deleteItem(props.item)"
468 src="/static/icon/delete1.png" 468 src="/static/icon/delete1.png"
469 > 469 >
470 </span> 470 </span>
471 </td> 471 </td>
472 </tr> 472 </tr>
473 </template> 473 </template>
474 <template slot="expand" slot-scope="props"> 474 <template slot="expand" slot-scope="props">
475 <v-data-table 475 <v-data-table
476 :items="timeTableList.schedule" 476 :items="timeTableList.schedule"
477 hide-actions 477 hide-actions
478 item-key="title" 478 item-key="title"
479 style="width: auto;" 479 style="width: auto;"
480 > 480 >
481 <template slot="items" slot-scope="props"> 481 <template slot="items" slot-scope="props">
482 <tr> 482 <tr>
483 <td class="text-xs-left subheading"> 483 <td class="text-xs-left subheading">
484 <b>{{ props.item.day }}</b> 484 <b>{{ props.item.day }}</b>
485 </td> 485 </td>
486 <td> 486 <td>
487 <b>Subject</b> 487 <b>Subject</b>
488 <br> 488 <br>
489 <b>Time In</b> 489 <b>Time In</b>
490 <br> 490 <br>
491 <b>Time Out</b> 491 <b>Time Out</b>
492 </td> 492 </td>
493 <td v-for="list in props.item.lectures"> 493 <td v-for="list in props.item.lectures">
494 <b>{{ list.subjectName }}</b> 494 <b>{{ list.subjectName }}</b>
495 <img 495 <img
496 style="cursor:pointer; width:20px; height:18px; " 496 style="cursor:pointer; width:20px; height:18px; "
497 class="mr-2 ml-2" 497 class="mr-2 ml-2"
498 src="/static/icon/edit1.png" 498 src="/static/icon/edit1.png"
499 @click="updateTimeTable(list, timeTableList)" 499 @click="updateTimeTable(list, timeTableList)"
500 > 500 >
501 <img 501 <img
502 style="cursor:pointer; height:20px; " 502 style="cursor:pointer; height:20px; "
503 src="/static/icon/delete1.png" 503 src="/static/icon/delete1.png"
504 @click="deleteTimeTable(list, timeTableList)" 504 @click="deleteTimeTable(list, timeTableList)"
505 > 505 >
506 <br> 506 <br>
507 {{list.timeIn.slice(0,16)}} 507 {{list.timeIn.slice(0,16)}}
508 <br> 508 <br>
509 {{list.timeOut.slice(0,16)}} 509 {{list.timeOut.slice(0,16)}}
510 </td> 510 </td>
511 <td> 511 <td>
512 <v-icon 512 <v-icon
513 color="black" 513 color="black"
514 @click="addLecture(props.item._id, timeTableList._id)" 514 @click="addLecture(props.item._id, timeTableList._id)"
515 >add_circle_outline</v-icon> 515 >add_circle_outline</v-icon>
516 </td> 516 </td>
517 </tr> 517 </tr>
518 </template> 518 </template>
519 </v-data-table> 519 </v-data-table>
520 </template> 520 </template>
521 <v-alert 521 <v-alert
522 slot="no-results" 522 slot="no-results"
523 :value="true" 523 :value="true"
524 color="error" 524 color="error"
525 icon="warning" 525 icon="warning"
526 >Your search for "{{ search }}" found no results.</v-alert> 526 >Your search for "{{ search }}" found no results.</v-alert>
527 </v-data-table> 527 </v-data-table>
528 <br> 528 <br>
529 <br> 529 <br>
530 </v-flex> 530 </v-flex>
531 </v-tab-item> 531 </v-tab-item>
532 532
533 <!-- ****** ADD MULTIPLE TIME-TABLE ****** --> 533 <!-- ****** ADD MULTIPLE TIME-TABLE ****** -->
534 534
535 <v-tab-item> 535 <v-tab-item>
536 <v-container> 536 <v-container>
537 <v-snackbar 537 <v-snackbar
538 :timeout="timeout" 538 :timeout="timeout"
539 :top="y === 'top'" 539 :top="y === 'top'"
540 :right="x === 'right'" 540 :right="x === 'right'"
541 :vertical="mode === 'vertical'" 541 :vertical="mode === 'vertical'"
542 v-model="snackbar" 542 v-model="snackbar"
543 color="success" 543 color="success"
544 >{{ text }}</v-snackbar> 544 >{{ text }}</v-snackbar>
545 <v-flex xs12 sm12 class="my-4"> 545 <v-flex xs12 sm12 class="my-4">
546 <v-card flat> 546 <v-card flat>
547 <v-form ref="form" v-model="valid" lazy-validation> 547 <v-form ref="form" v-model="valid" lazy-validation>
548 <v-container fluid> 548 <v-container fluid>
549 <v-layout> 549 <v-layout>
550 <v-flex 550 <v-flex
551 xs12 551 xs12
552 class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" 552 class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4"
553 > 553 >
554 <v-avatar size="100px"> 554 <v-avatar size="100px">
555 <img src="/static/icon/user.png" v-if="!imageUrl"> 555 <img src="/static/icon/user.png" v-if="!imageUrl">
556 </v-avatar> 556 </v-avatar>
557 <input 557 <input
558 type="file" 558 type="file"
559 style="display: none" 559 style="display: none"
560 ref="image" 560 ref="image"
561 accept="image/*" 561 accept="image/*"
562 @change="onFilePicked" 562 @change="onFilePicked"
563 > 563 >
564 <img 564 <img
565 :src="imageData.imageUrl" 565 :src="imageData.imageUrl"
566 height="150" 566 height="150"
567 v-if="imageUrl" 567 v-if="imageUrl"
568 style="border-radius:50%; width:200px" 568 style="border-radius:50%; width:200px"
569 > 569 >
570 </v-flex> 570 </v-flex>
571 </v-layout> 571 </v-layout>
572 <v-flex xs12> 572 <v-flex xs12>
573 <v-layout> 573 <v-layout>
574 <v-flex xs4 class="pt-4 subheading"> 574 <v-flex xs4 class="pt-4 subheading">
575 <label class="right">Select Class:</label> 575 <label class="right">Select Class:</label>
576 </v-flex> 576 </v-flex>
577 <v-flex xs4 class="ml-3"> 577 <v-flex xs4 class="ml-3">
578 <v-select 578 <v-select
579 :items="addclass" 579 :items="addclass"
580 label="Select Class" 580 label="Select Class"
581 v-model="timeTable.select" 581 v-model="timeTable.select"
582 item-text="classNum" 582 item-text="classNum"
583 item-value="_id" 583 item-value="_id"
584 @change="getSections(timeTable.select)" 584 @change="getSections(timeTable.select)"
585 required 585 required
586 ></v-select> 586 ></v-select>
587 </v-flex> 587 </v-flex>
588 </v-layout> 588 </v-layout>
589 </v-flex> 589 </v-flex>
590 <v-flex xs12> 590 <v-flex xs12>
591 <v-layout> 591 <v-layout>
592 <v-flex xs4 class="pt-4 subheading"> 592 <v-flex xs4 class="pt-4 subheading">
593 <label class="right">Select Section:</label> 593 <label class="right">Select Section:</label>
594 </v-flex> 594 </v-flex>
595 <v-flex xs4 class="ml-3"> 595 <v-flex xs4 class="ml-3">
596 <v-select 596 <v-select
597 :items="addSection" 597 :items="addSection"
598 label="Select Section" 598 label="Select Section"
599 v-model="timeTable.selectSection" 599 v-model="timeTable.selectSection"
600 item-text="name" 600 item-text="name"
601 item-value="_id" 601 item-value="_id"
602 required 602 required
603 ></v-select> 603 ></v-select>
604 </v-flex> 604 </v-flex>
605 </v-layout> 605 </v-layout>
606 </v-flex> 606 </v-flex>
607 <v-flex xs12> 607 <v-flex xs12>
608 <v-layout> 608 <v-layout>
609 <v-flex xs4 class="pt-4 subheading"> 609 <v-flex xs4 class="pt-4 subheading">
610 <label class="right">Select Teacher:</label> 610 <label class="right">Select Teacher:</label>
611 </v-flex> 611 </v-flex>
612 <v-flex xs4 class="ml-3"> 612 <v-flex xs4 class="ml-3">
613 <v-select 613 <v-select
614 :items="addTeachers" 614 :items="addTeachers"
615 label="Select Teacher" 615 label="Select Teacher"
616 v-model="timeTable.selectTeacher" 616 v-model="timeTable.selectTeacher"
617 item-text="name" 617 item-text="name"
618 item-value="_id" 618 item-value="_id"
619 required 619 required
620 ></v-select> 620 ></v-select>
621 </v-flex> 621 </v-flex>
622 </v-layout> 622 </v-layout>
623 </v-flex> 623 </v-flex>
624 <v-flex xs12> 624 <v-flex xs12>
625 <v-layout> 625 <v-layout>
626 <v-flex xs4 class="pt-4 subheading"> 626 <v-flex xs4 class="pt-4 subheading">
627 <label class="right">Select Day:</label> 627 <label class="right">Select Day:</label>
628 </v-flex> 628 </v-flex>
629 <v-flex xs4 class="ml-3"> 629 <v-flex xs4 class="ml-3">
630 <v-select 630 <v-select
631 :items="addOneDay" 631 :items="addOneDay"
632 label="Select Day" 632 label="Select Day"
633 v-model="timeTable.selectDay" 633 v-model="timeTable.selectDay"
634 item-text="name" 634 item-text="name"
635 item-value="_id" 635 item-value="_id"
636 required 636 required
637 ></v-select> 637 ></v-select>
638 </v-flex> 638 </v-flex>
639 </v-layout> 639 </v-layout>
640 </v-flex> 640 </v-flex>
641 <v-flex xs12> 641 <v-flex xs12>
642 <v-layout> 642 <v-layout>
643 <v-flex xs4 class="pt-4 subheading"> 643 <v-flex xs4 class="pt-4 subheading">
644 <label class="right">Subject Name:</label> 644 <label class="right">Subject Name:</label>
645 </v-flex> 645 </v-flex>
646 <v-flex xs4 class="ml-3"> 646 <v-flex xs4 class="ml-3">
647 <v-text-field 647 <v-text-field
648 placeholder="fill your Subject Name" 648 placeholder="fill your Subject Name"
649 :rules="subjectNameRules" 649 :rules="subjectNameRules"
650 v-model="timeTable.subjectName" 650 v-model="timeTable.subjectName"
651 type="text" 651 type="text"
652 required 652 required
653 ></v-text-field> 653 ></v-text-field>
654 </v-flex> 654 </v-flex>
655 </v-layout> 655 </v-layout>
656 </v-flex> 656 </v-flex>
657 <v-flex xs12> 657 <v-flex xs12>
658 <v-layout> 658 <v-layout>
659 <v-flex xs4 class="pt-4 subheading"> 659 <v-flex xs4 class="pt-4 subheading">
660 <label class="right">Time In:</label> 660 <label class="right">Time In:</label>
661 </v-flex> 661 </v-flex>
662 <v-flex xs4 class="ml-3"> 662 <v-flex xs4 class="ml-3">
663 <v-menu 663 <v-menu
664 ref="menuA" 664 ref="menuA"
665 :close-on-content-click="false" 665 :close-on-content-click="false"
666 v-model="menu2" 666 v-model="menu2"
667 :nudge-right="40" 667 :nudge-right="40"
668 :return-value.sync="timeTable.timeIn" 668 :return-value.sync="timeTable.timeIn"
669 lazy 669 lazy
670 transition="scale-transition" 670 transition="scale-transition"
671 offset-y 671 offset-y
672 full-width 672 full-width
673 max-width="290px" 673 max-width="290px"
674 min-width="290px" 674 min-width="290px"
675 > 675 >
676 <v-text-field 676 <v-text-field
677 slot="activator" 677 slot="activator"
678 v-model="timeTable.timeIn" 678 v-model="timeTable.timeIn"
679 label="Select your timeIn" 679 label="Select your timeIn"
680 append-icon="access_time" 680 append-icon="access_time"
681 ></v-text-field> 681 ></v-text-field>
682 <v-time-picker v-model="timeTable.timeIn" @change="$refs.menuA.save(timeTable.timeIn)"></v-time-picker> 682 <v-time-picker v-model="timeTable.timeIn" @change="$refs.menuA.save(timeTable.timeIn)"></v-time-picker>
683 </v-menu> 683 </v-menu>
684 </v-flex> 684 </v-flex>
685 </v-layout> 685 </v-layout>
686 </v-flex> 686 </v-flex>
687 <v-flex xs12> 687 <v-flex xs12>
688 <v-layout> 688 <v-layout>
689 <v-flex xs4 class="pt-4 subheading"> 689 <v-flex xs4 class="pt-4 subheading">
690 <label class="right">Time Out:</label> 690 <label class="right">Time Out:</label>
691 </v-flex> 691 </v-flex>
692 <v-flex xs4 class="ml-3"> 692 <v-flex xs4 class="ml-3">
693 <v-menu 693 <v-menu
694 ref="menu" 694 ref="menu"
695 :close-on-content-click="false" 695 :close-on-content-click="false"
696 v-model="menu1" 696 v-model="menu1"
697 :nudge-right="40" 697 :nudge-right="40"
698 :return-value.sync="timeTable.timeOut" 698 :return-value.sync="timeTable.timeOut"
699 lazy 699 lazy
700 transition="scale-transition" 700 transition="scale-transition"
701 offset-y 701 offset-y
702 full-width 702 full-width
703 max-width="290px" 703 max-width="290px"
704 min-width="290px" 704 min-width="290px"
705 > 705 >
706 <v-text-field 706 <v-text-field
707 slot="activator" 707 slot="activator"
708 v-model="timeTable.timeOut" 708 v-model="timeTable.timeOut"
709 label="Select your Time Out" 709 label="Select your Time Out"
710 append-icon="access_time" 710 append-icon="access_time"
711 ></v-text-field> 711 ></v-text-field>
712 <v-time-picker v-model="timeTable.timeOut" @change="$refs.menu.save(timeTable.timeOut)"></v-time-picker> 712 <v-time-picker v-model="timeTable.timeOut" @change="$refs.menu.save(timeTable.timeOut)"></v-time-picker>
713 </v-menu> 713 </v-menu>
714 </v-flex> 714 </v-flex>
715 </v-layout> 715 </v-layout>
716 </v-flex> 716 </v-flex>
717 <v-layout> 717 <v-layout>
718 <v-flex xs12 sm6 offset-sm3> 718 <v-flex xs12 sm6 offset-sm3>
719 <v-card-actions> 719 <v-card-actions>
720 <v-btn @click="clear" round dark>clear</v-btn> 720 <v-btn @click="clear" round dark>clear</v-btn>
721 <v-spacer></v-spacer> 721 <v-spacer></v-spacer>
722 <v-btn @click="submit" round dark :loading="loading">Add</v-btn> 722 <v-btn @click="submit" round dark :loading="loading">Add</v-btn>
723 </v-card-actions> 723 </v-card-actions>
724 </v-flex> 724 </v-flex>
725 </v-layout> 725 </v-layout>
726 </v-container> 726 </v-container>
727 </v-form> 727 </v-form>
728 </v-card> 728 </v-card>
729 </v-flex> 729 </v-flex>
730 </v-container> 730 </v-container>
731 </v-tab-item> 731 </v-tab-item>
732 </v-tabs> 732 </v-tabs>
733 <div class="loader" v-if="showLoader"> 733 <div class="loader" v-if="showLoader">
734 <v-progress-circular indeterminate color="white"></v-progress-circular> 734 <v-progress-circular indeterminate color="white"></v-progress-circular>
735 </div> 735 </div>
736 </v-app> 736 </v-app>
737 </template> 737 </template>
738 <script> 738 <script>
739 import http from "@/Services/http.js"; 739 import http from "@/Services/http.js";
740 import Util from "@/util"; 740 import Util from "@/util";
741 741
742 export default { 742 export default {
743 data: () => ({ 743 data: () => ({
744 y: "top", 744 y: "top",
745 x: "right", 745 x: "right",
746 mode: "", 746 mode: "",
747 timeout: 3000, 747 timeout: 3000,
748 text: "", 748 text: "",
749 search: "", 749 search: "",
750 snackbar: false, 750 snackbar: false,
751 loading: false, 751 loading: false,
752 showLoader: false, 752 showLoader: false,
753 dialog: false, 753 dialog: false,
754 dialogAddLecture: false, 754 dialogAddLecture: false,
755 dialogUpdateLectures: false, 755 dialogUpdateLectures: false,
756 dialog1: false, 756 dialog1: false,
757 valid: true, 757 valid: true,
758 // validLeacture:true, 758 // validLeacture:true,
759 isActive: true, 759 isActive: true,
760 newActive: false, 760 newActive: false,
761 addclass: [], 761 addclass: [],
762 addSection: [], 762 addSection: [],
763 addTeachers: [], 763 addTeachers: [],
764 gender: ["Male", "Female"], 764 gender: ["Male", "Female"],
765 AddUsercredentials: {}, 765 AddUsercredentials: {},
766 pagination: { 766 pagination: {
767 rowsPerPage: 15 767 rowsPerPage: 15
768 }, 768 },
769 imageData: {}, 769 imageData: {},
770 imageName: "", 770 imageName: "",
771 imageUrl: "", 771 imageUrl: "",
772 imageFile: "", 772 imageFile: "",
773 timeInRules: [v => !!v || "Time In is required"], 773 timeInRules: [v => !!v || "Time In is required"],
774 timeOutRules: [v => !!v || "Time Out is required"], 774 timeOutRules: [v => !!v || "Time Out is required"],
775 lectureRules: [v => !!v || "Lecture No is required"], 775 lectureRules: [v => !!v || "Lecture No is required"],
776 subjectNameRules: [v => !!v || "Subject Name is required"], 776 subjectNameRules: [v => !!v || "Subject Name is required"],
777 headers: [ 777 headers: [
778 { 778 {
779 text: "No", 779 text: "No",
780 align: "center", 780 align: "center",
781 sortable: false, 781 sortable: false,
782 value: "No" 782 value: "No"
783 }, 783 },
784 { 784 {
785 text: "Class Name", 785 text: "Class Name",
786 value: "classData.classNum", 786 value: "classData.classNum",
787 sortable: false, 787 sortable: false,
788 align: "center" 788 align: "center"
789 }, 789 },
790 { 790 {
791 text: "Section Name", 791 text: "Section Name",
792 value: "sectionData.name", 792 value: "sectionData.name",
793 sortable: false, 793 sortable: false,
794 align: "center" 794 align: "center"
795 }, 795 },
796 { text: "Action", value: "", sortable: false, align: "center" } 796 { text: "Action", value: "", sortable: false, align: "center" }
797 ], 797 ],
798 daysHeaders: [ 798 daysHeaders: [
799 { text: "Day", value: "dayday", sortable: false, align: "center" }, 799 { text: "Day", value: "dayday", sortable: false, align: "center" },
800 { 800 {
801 text: "Subject Name", 801 text: "Subject Name",
802 value: "subjectName", 802 value: "subjectName",
803 sortable: false, 803 sortable: false,
804 align: "center" 804 align: "center"
805 }, 805 },
806 { text: "Time In", value: "timeIn", sortable: false, align: "center" }, 806 { text: "Time In", value: "timeIn", sortable: false, align: "center" },
807 { text: "Time Out", value: "timeOut", sortable: false, align: "center" } 807 { text: "Time Out", value: "timeOut", sortable: false, align: "center" }
808 ], 808 ],
809 addOneDay: [ 809 addOneDay: [
810 "Monday", 810 "Monday",
811 "Tuesday", 811 "Tuesday",
812 "Wednesday", 812 "Wednesday",
813 "Thursday", 813 "Thursday",
814 "Friday", 814 "Friday",
815 "Saturday", 815 "Saturday",
816 "Sunday" 816 "Sunday"
817 ], 817 ],
818 desserts: [], 818 desserts: [],
819 timeTableList: [], 819 timeTableList: [],
820 editedIndex: -1, 820 editedIndex: -1,
821 selectTimeTable: { 821 selectTimeTable: {
822 select: "", 822 select: "",
823 selectSection: "", 823 selectSection: "",
824 }, 824 },
825 timeTable: { 825 timeTable: {
826 select: "", 826 select: "",
827 selectSection: "", 827 selectSection: "",
828 selectDay: "", 828 selectDay: "",
829 timeIn: null, 829 timeIn: null,
830 timeOut: null, 830 timeOut: null,
831 subjectName: "", 831 subjectName: "",
832 selectTeacher: "" 832 selectTeacher: ""
833 }, 833 },
834 editedItem: { 834 editedItem: {
835 classNum: "", 835 classNum: "",
836 selectSection: "" 836 selectSection: ""
837 }, 837 },
838 addlectures: { 838 addlectures: {
839 timeIn: null, 839 timeIn: null,
840 timeOut: null, 840 timeOut: null,
841 subjectName: "", 841 subjectName: "",
842 teacherId: "", 842 teacherId: "",
843 scheduleId: "", 843 scheduleId: "",
844 timeTableId: "" 844 timeTableId: ""
845 }, 845 },
846 updateLectures: { 846 updateLectures: {
847 timeIn: null, 847 timeIn: null,
848 timeOut: null, 848 timeOut: null,
849 subjectName: "", 849 subjectName: "",
850 teacherId: "", 850 teacherId: "",
851 },
852 updateLecturesId:{
851 lectureId: "", 853 lectureId: "",
852 scheduleId: "" 854 scheduleId: ""
853 }, 855 },
854 menu1: false, 856 menu1: false,
855 menu2: false, 857 menu2: false,
856 menu3: false, 858 menu3: false,
857 menu4: false, 859 menu4: false,
858 menu5: false, 860 menu5: false,
859 menu6: false, 861 menu6: false,
860 862
861 items: [ 863 items: [
862 { 864 {
863 href: "/changepassword", 865 href: "/changepassword",
864 title: "Change Password", 866 title: "Change Password",
865 click: e => { 867 click: e => {
866 console.log(e); 868 console.log(e);
867 } 869 }
868 }, 870 },
869 { 871 {
870 href: "#", 872 href: "#",
871 title: "Logout", 873 title: "Logout",
872 click: e => { 874 click: e => {
873 window.getApp.$emit("APP_LOGOUT"); 875 window.getApp.$emit("APP_LOGOUT");
874 } 876 }
875 } 877 }
876 ] 878 ]
877 }), 879 }),
878 methods: { 880 methods: {
879 findTimeTable(){ 881 findTimeTable(){
880 http().get( 882 http().get(
881 "/getParticularClassTimeTable", 883 "/getParticularClassTimeTable",
882 { params: { sectionId: this.selectTimeTable.selectSection, classId: this.selectTimeTable.select} }, 884 { params: { sectionId: this.selectTimeTable.selectSection, classId: this.selectTimeTable.select} },
883 ) 885 )
884 .then(response => { 886 .then(response => {
885 this.desserts = response.data.data; 887 this.desserts = response.data.data;
886 // console.log("findTimeTable=====>", this.desserts); 888 // console.log("findTimeTable=====>", this.desserts);
887 }) 889 })
888 .catch(error => { 890 .catch(error => {
889 console.log("err====>", error); 891 console.log("err====>", error);
890 if ((this.snackbar = true)) { 892 if ((this.snackbar = true)) {
891 this.text = error.response.data.message; 893 this.text = error.response.data.message;
892 this.text = error.response.data.statusText; 894 this.text = error.response.data.statusText;
893 } 895 }
894 }); 896 });
895 }, 897 },
896 getSections(_id) { 898 getSections(_id) {
897 var token = this.$store.state.token; 899 var token = this.$store.state.token;
898 http() 900 http()
899 .get( 901 .get(
900 "/getSectionsList", 902 "/getSectionsList",
901 { params: { classId: _id } }, 903 { params: { classId: _id } },
902 { 904 {
903 headers: { Authorization: "Bearer " + token } 905 headers: { Authorization: "Bearer " + token }
904 } 906 }
905 ) 907 )
906 .then(response => { 908 .then(response => {
907 this.addSection = response.data.data; 909 this.addSection = response.data.data;
908 // console.log("getSectionsList=====>", this.addSection); 910 // console.log("getSectionsList=====>", this.addSection);
909 }) 911 })
910 .catch(err => { 912 .catch(err => {
911 // console.log("err====>", err); 913 // console.log("err====>", err);
912 }); 914 });
913 }, 915 },
914 getTimeTable(item) { 916 getTimeTable(item) {
915 this.showLoader = true; 917 this.showLoader = true;
916 var token = this.$store.state.token; 918 var token = this.$store.state.token;
917 http() 919 http()
918 .get( 920 .get(
919 "/getParticularTimeTable", 921 "/getParticularTimeTable",
920 { params: { timeTableId: item._id } }, 922 { params: { timeTableId: item._id } },
921 { 923 {
922 headers: { Authorization: "Bearer " + token } 924 headers: { Authorization: "Bearer " + token }
923 } 925 }
924 ) 926 )
925 .then(response => { 927 .then(response => {
926 this.timeTableList = response.data.data; 928 this.timeTableList = response.data.data;
927 this.showLoader = false; 929 this.showLoader = false;
928 // console.log("getParticularTimeTable=====>", this.timeTableList); 930 // console.log("getParticularTimeTable=====>", this.timeTableList);
929 }) 931 })
930 .catch(err => { 932 .catch(err => {
931 this.showLoader = false; 933 this.showLoader = false;
932 // console.log("err====>", err); 934 // console.log("err====>", err);
933 }); 935 });
934 }, 936 },
935 pickFile() { 937 pickFile() {
936 this.$refs.image.click(); 938 this.$refs.image.click();
937 }, 939 },
938 940
939 onFilePicked(e) { 941 onFilePicked(e) {
940 // console.log(e) 942 // console.log(e)
941 const files = e.target.files; 943 const files = e.target.files;
942 this.imageData.upload = e.target.files[0]; 944 this.imageData.upload = e.target.files[0];
943 if (files[0] !== undefined) { 945 if (files[0] !== undefined) {
944 this.imageName = files[0].name; 946 this.imageName = files[0].name;
945 if (this.imageName.lastIndexOf(".") <= 0) { 947 if (this.imageName.lastIndexOf(".") <= 0) {
946 return; 948 return;
947 } 949 }
948 const fr = new FileReader(); 950 const fr = new FileReader();
949 fr.readAsDataURL(files[0]); 951 fr.readAsDataURL(files[0]);
950 fr.addEventListener("load", () => { 952 fr.addEventListener("load", () => {
951 this.imageUrl = fr.result; 953 this.imageUrl = fr.result;
952 this.imageFile = files[0]; // this is an image file that can be sent to server... 954 this.imageFile = files[0]; // this is an image file that can be sent to server...
953 this.imageData.imageUrl = URL.createObjectURL(this.imageFile); 955 this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
954 // console.log("upload=======>", this.imageData.imageUrl); 956 // console.log("upload=======>", this.imageData.imageUrl);
955 // console.log("imageFile", this.imageFile); 957 // console.log("imageFile", this.imageFile);
956 }); 958 });
957 } else { 959 } else {
958 this.imageName = ""; 960 this.imageName = "";
959 this.imageFile = ""; 961 this.imageFile = "";
960 this.imageUrl = ""; 962 this.imageUrl = "";
961 } 963 }
962 }, 964 },
963 // getTimeTableList() { 965 // getTimeTableList() {
964 // this.showLoader = true; 966 // this.showLoader = true;
965 // var token = this.$store.state.token; 967 // var token = this.$store.state.token;
966 // http() 968 // http()
967 // .get("/getTimeTablesList", { 969 // .get("/getTimeTablesList", {
968 // headers: { Authorization: "Bearer " + token } 970 // headers: { Authorization: "Bearer " + token }
969 // }) 971 // })
970 // .then(response => { 972 // .then(response => {
971 // this.desserts = response.data.data; 973 // this.desserts = response.data.data;
972 // this.showLoader = false; 974 // this.showLoader = false;
973 // // console.log("getTimeTableList=====>", response.data.data); 975 // // console.log("getTimeTableList=====>", response.data.data);
974 // }) 976 // })
975 // .catch(err => { 977 // .catch(err => {
976 // // console.log("err====>", err); 978 // // console.log("err====>", err);
977 // this.showLoader = false; 979 // this.showLoader = false;
978 // this.$router.replace({ path: "/" }); 980 // this.$router.replace({ path: "/" });
979 // }); 981 // });
980 // }, 982 // },
981 editItem(item) { 983 editItem(item) {
982 this.editedIndex = this.desserts.indexOf(item); 984 this.editedIndex = this.desserts.indexOf(item);
983 this.editedItem = Object.assign({}, item); 985 this.editedItem = Object.assign({}, item);
984 this.dialog = true; 986 this.dialog = true;
985 }, 987 },
986 updateTimeTable(timeToUpdate, classToUpdate) { 988 updateTimeTable(timeToUpdate, classToUpdate) {
987 console.log( 989 console.log(
988 "timeToUpdate, classToUpdate", 990 "timeToUpdate, classToUpdate",
989 timeToUpdate._id, 991 timeToUpdate._id,
990 classToUpdate.schedule 992 classToUpdate.schedule
991 ); 993 );
992 for (let i = 0; i < classToUpdate.schedule.length; i++) { 994 for (let i = 0; i < classToUpdate.schedule.length; i++) {
993 this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; 995 this.updateLecturesId.scheduleId = classToUpdate.schedule[i]._id;
994 } 996 }
995 (this.updateLectures.lectureId = timeToUpdate._id), 997 this.updateLecturesId.lectureId = timeToUpdate._id,
996 (this.updateLectures = timeToUpdate); 998 this.updateLectures = timeToUpdate;
997 this.updateLectures.timeIn = this.updateLectures.timeIn.substring(11,15) 999 console.log("updateLectures",this.updateLectures)
998 this.updateLectures.timeOut = this.updateLectures.timeOut.substring(11,15) 1000 console.log("updateLectures",this.updateLecturesId)
999 // console.log("updateLectures",this.updateLectures)
1000 this.dialogUpdateLectures = true; 1001 this.dialogUpdateLectures = true;
1001 }, 1002 },
1002 addLecture(scheduleId, timeTableId) { 1003 addLecture(scheduleId, timeTableId) {
1003 // console.log('timeToAdd, classToAdd', scheduleId, timeTableId); 1004 // console.log('timeToAdd, classToAdd', scheduleId, timeTableId);
1004 this.addlectures.scheduleId = scheduleId; 1005 this.addlectures.scheduleId = scheduleId;
1005 this.addlectures.timeTableId = timeTableId; 1006 this.addlectures.timeTableId = timeTableId;
1006 this.dialogAddLecture = true; 1007 this.dialogAddLecture = true;
1007 }, 1008 },
1008 AddLecture() { 1009 AddLecture() {
1009 // console.log("add") 1010 // console.log("add")
1010 // if (this.$refs.form.validate()) { 1011 // if (this.$refs.form.validate()) {
1011 http() 1012 http()
1012 .post("/addLecture", this.addlectures) 1013 .post("/addLecture", this.addlectures)
1013 .then(response => { 1014 .then(response => {
1014 // console.log("addTimeTable=====>", this.addlectures); 1015 // console.log("addTimeTable=====>", this.addlectures);
1015 if ((this.snackbar = true)) { 1016 if ((this.snackbar = true)) {
1016 this.text = "New Add Lecture successfully"; 1017 this.text = "New Add Lecture successfully";
1017 } 1018 }
1018 this.closedialogLecture(); 1019 this.closedialogLecture();
1020 // this.$router.go(0);
1019 }) 1021 })
1020 .catch(error => { 1022 .catch(error => {
1021 if ((this.snackbar = true)) { 1023 if ((this.snackbar = true)) {
1022 this.text = error.response.data.message; 1024 this.text = error.response.data.message;
1023 this.text = error.response.data.statusText; 1025 this.text = error.response.data.statusText;
1024 1026
1025 } 1027 }
1026 }); 1028 });
1027 // } 1029 // }
1028 }, 1030 },
1029 updateParticularTable() { 1031 updateParticularTable() {
1030 let EditLecture = { 1032 let EditLecture = {
1031 lectureId: this.updateLectures.lectureId, 1033 lectureId: this.updateLecturesId.lectureId,
1032 scheduleId: this.updateLectures.scheduleId, 1034 scheduleId: this.updateLecturesId.scheduleId,
1033 updatedLecture: { 1035 updatedLecture: {
1034 timeIn: this.updateLectures.timeIn, 1036 timeIn: this.updateLectures.timeIn,
1035 timeOut: this.updateLectures.timeOut, 1037 timeOut: this.updateLectures.timeOut,
1036 subjectName: this.updateLectures.subjectName, 1038 subjectName: this.updateLectures.subjectName,
1037 teacherId: this.updateLectures.teacherId 1039 teacherId: this.updateLectures.teacherId
1038 } 1040 }
1039 }; 1041 };
1040 console.log("updateLecture", EditLecture); 1042 console.log("EditLecture", EditLecture);
1041 http() 1043 http()
1042 .put("/updateLecture", EditLecture) 1044 .put("/updateLecture", EditLecture)
1043 .then(response => { 1045 .then(response => {
1044 console.log("updateLecture", EditLecture); 1046 console.log("updateLecture", EditLecture);
1045 if ((this.snackbar = true)) { 1047 if ((this.snackbar = true)) {
1046 this.text = "Successfully Edit Update Lecture"; 1048 this.text = "Successfully Edit Update Lecture";
1047 } 1049 }
1048 this.closeUpdateLectures(); 1050 this.closeUpdateLectures();
1049 this.$router.go(0); 1051 this.$router.go(0);
1050 }) 1052 })
1051 .catch(error => { 1053 .catch(error => {
1052 // console.log(error); 1054 // console.log(error);
1053 if ((this.snackbar = true)) { 1055 if ((this.snackbar = true)) {
1054 this.text = error.response.data.message; 1056 this.text = error.response.data.message;
1055 this.text = error.response.data.statusText; 1057 this.text = error.response.data.statusText;
1056 } 1058 }
1057 }); 1059 });
1058 }, 1060 },
1059 deleteItem(item) { 1061 deleteItem(item) {
1060 let deleteTimeTable = { 1062 let deleteTimeTable = {
1061 timeTableId: item._id 1063 timeTableId: item._id
1062 }; 1064 };
1063 http() 1065 http()
1064 .delete( 1066 .delete(
1065 "/deleteTimeTable", 1067 "/deleteTimeTable",
1066 confirm("Are you sure you want to delete this?") && { 1068 confirm("Are you sure you want to delete this?") && {
1067 params: deleteTimeTable 1069 params: deleteTimeTable
1068 } 1070 }
1069 ) 1071 )
1070 .then(response => { 1072 .then(response => {
1071 // console.log("deleteUers",deleteTimeTable) 1073 // console.log("deleteUers",deleteTimeTable)
1072 if ((this.snackbar = true)) { 1074 if ((this.snackbar = true)) {
1073 this.text = "Successfully delete Existing User"; 1075 this.text = "Successfully delete Existing User";
1074 } 1076 }
1075 this.findTimeTable(); 1077 this.findTimeTable();
1076 }) 1078 })
1077 .catch(error => { 1079 .catch(error => {
1078 // console.log(error); 1080 // console.log(error);
1079 }); 1081 });
1080 }, 1082 },
1081 activeTab(type) { 1083 activeTab(type) {
1082 switch (type) { 1084 switch (type) {
1083 case "existing": 1085 case "existing":
1084 this.newActive = false; 1086 this.newActive = false;
1085 this.isActive = true; 1087 this.isActive = true;
1086 break; 1088 break;
1087 1089
1088 default: 1090 default:
1089 this.newActive = true; 1091 this.newActive = true;
1090 this.isActive = false; 1092 this.isActive = false;
1091 break; 1093 break;
1092 } 1094 }
1093 }, 1095 },
1094 close() { 1096 close() {
1095 this.dialog = false; 1097 this.dialog = false;
1096 setTimeout(() => { 1098 setTimeout(() => {
1097 this.editedItem = Object.assign({}, this.defaultItem); 1099 this.editedItem = Object.assign({}, this.defaultItem);
1098 this.editedIndex = -1; 1100 this.editedIndex = -1;
1099 }, 300); 1101 }, 300);
1100 }, 1102 },
1101 close1() { 1103 close1() {
1102 this.dialog1 = false; 1104 this.dialog1 = false;
1103 }, 1105 },
1104 closedialogLecture() { 1106 closedialogLecture() {
1105 this.dialogAddLecture = false; 1107 this.dialogAddLecture = false;
1106 }, 1108 },
1107 closeUpdateLectures() { 1109 closeUpdateLectures() {
1108 this.dialogUpdateLectures = false; 1110 this.dialogUpdateLectures = false;
1109 }, 1111 },
1110 submit() { 1112 submit() {
1111 if (this.$refs.form.validate()) { 1113 if (this.$refs.form.validate()) {
1112 let imageData = new FormData(); 1114 let imageData = new FormData();
1113 imageData.append("upload", this.imageFile); 1115 imageData.append("upload", this.imageFile);
1114 // console.log(imageData); 1116 // console.log(imageData);
1115 let addTimeTable = { 1117 let addTimeTable = {
1116 sectionId: this.timeTable.selectSection, 1118 sectionId: this.timeTable.selectSection,
1117 classId: this.timeTable.select, 1119 classId: this.timeTable.select,
1118 schedule: [ 1120 schedule: [
1119 { 1121 {
1120 day: this.timeTable.selectDay, 1122 day: this.timeTable.selectDay,
1121 lectures: [ 1123 lectures: [
1122 { 1124 {
1123 timeIn: this.timeTable.timeIn, 1125 timeIn: this.timeTable.timeIn,
1124 timeOut: this.timeTable.timeOut, 1126 timeOut: this.timeTable.timeOut,
1125 subjectName: this.timeTable.subjectName, 1127 subjectName: this.timeTable.subjectName,
1126 teacherId: this.timeTable.selectTeacher 1128 teacherId: this.timeTable.selectTeacher
1127 } 1129 }
1128 ] 1130 ]
1129 } 1131 }
1130 ] 1132 ]
1131 }; 1133 };
1132 http() 1134 http()
1133 .post("/createTimeTable", addTimeTable) 1135 .post("/createTimeTable", addTimeTable)
1134 .then(response => { 1136 .then(response => {
1135 // console.log("addTimeTable=====>", addTimeTable); 1137 // console.log("addTimeTable=====>", addTimeTable);
1136 if ((this.snackbar = true)) { 1138 if ((this.snackbar = true)) {
1137 this.text = "New Time Table added successfully"; 1139 this.text = "New Time Table added successfully";
1138 } 1140 }
1139 this.clear(); 1141 this.clear();
1140 }) 1142 })
1141 .catch(error => { 1143 .catch(error => {
1142 // console.log(error); 1144 // console.log(error);
1143 if ((this.snackbar = true)) { 1145 if ((this.snackbar = true)) {
1144 this.text = error.response.data.message; 1146 this.text = error.response.data.message;
1145 } 1147 }
1146 }); 1148 });
1147 } 1149 }
1148 }, 1150 },
1149 mail() {}, 1151 mail() {},
1150 download() {}, 1152 download() {},
1151 clear() { 1153 clear() {
1152 this.$refs.form.reset(); 1154 this.$refs.form.reset();
1153 }, 1155 },
1154 save() { 1156 save() {
1155 let imageData = new FormData(); 1157 let imageData = new FormData();
1156 imageData.append("upload", this.imageFile); 1158 imageData.append("upload", this.imageFile);
1157 // console.log(imageData); 1159 // console.log(imageData);
1158 let editTimeTable = { 1160 let editTimeTable = {
1159 timeTableId: this.editedItem._id, 1161 timeTableId: this.editedItem._id,
1160 classId: this.editedItem.classNum, 1162 classId: this.editedItem.classNum,
1161 sectionId: this.editedItem.selectSection 1163 sectionId: this.editedItem.selectSection
1162 // imageData 1164 // imageData
1163 }; 1165 };
1164 http() 1166 http()
1165 .put("/updateTimeTable", editTimeTable) 1167 .put("/updateTimeTable", editTimeTable)
1166 .then(response => { 1168 .then(response => {
1167 console.log("editTimeTable", editTimeTable); 1169 console.log("editTimeTable", editTimeTable);
1168 if ((this.snackbar = true)) { 1170 if ((this.snackbar = true)) {
1169 this.text = "Successfully Edit Existing User"; 1171 this.text = "Successfully Edit Existing User";
1170 } 1172 }
1171 this.findTimeTable(); 1173 this.findTimeTable();
1172 }) 1174 })
1173 .catch(error => { 1175 .catch(error => {
1174 // console.log(error); 1176 // console.log(error);
1175 if ((this.snackbar = true)) { 1177 if ((this.snackbar = true)) {
1176 this.text = error.response.data.message; 1178 this.text = error.response.data.message;
1177 } 1179 }
1178 }); 1180 });
1179 this.close(); 1181 this.close();
1180 }, 1182 },
1181 handleDrawerToggle() { 1183 handleDrawerToggle() {
1182 window.getApp.$emit("APP_DRAWER_TOGGLED"); 1184 window.getApp.$emit("APP_DRAWER_TOGGLED");
1183 }, 1185 },
1184 handleFullScreen() { 1186 handleFullScreen() {
1185 Util.toggleFullScreen(); 1187 Util.toggleFullScreen();
1186 }, 1188 },
1187 deleteTimeTable(timeToDelete) { 1189 deleteTimeTable(timeToDelete) {
1188 // console.log('timeToUpdate', timeToDelete._id); 1190 // console.log('timeToUpdate', timeToDelete._id);
1189 let deleteLecture = { 1191 let deleteLecture = {
1190 lectureId: timeToDelete._id 1192 lectureId: timeToDelete._id
1191 }; 1193 };
1192 http() 1194 http()
1193 .delete( 1195 .delete(
1194 "/deleteLecture", 1196 "/deleteLecture",
1195 confirm("Are you sure you want to delete this?") && { 1197 confirm("Are you sure you want to delete this?") && {
1196 params: deleteLecture 1198 params: deleteLecture
1197 } 1199 }
1198 ) 1200 )
1199 .then(response => { 1201 .then(response => {
1200 // console.log("deleteLecture",deleteLecture) 1202 // console.log("deleteLecture",deleteLecture)
1201 if ((this.snackbar = true)) { 1203 if ((this.snackbar = true)) {
1202 this.text = "Successfully delete Existing User"; 1204 this.text = "Successfully delete Existing User";
1203 } 1205 }
1204 this.$router.go(0); 1206 this.$router.go(0);
1205 // this.getTimeTable(); 1207 // this.getTimeTable();
1206 }) 1208 })
1207 .catch(error => { 1209 .catch(error => {
1208 console.log(error); 1210 console.log(error);
1209 }); 1211 });
1210 } 1212 }
1211 }, 1213 },
1212 mounted() { 1214 mounted() {
1213 // this.getTimeTableList(); 1215 // this.getTimeTableList();
1214 var token = this.$store.state.token; 1216 var token = this.$store.state.token;
1215 http() 1217 http()
1216 .get("/getClassesList", { 1218 .get("/getClassesList", {
1217 headers: { Authorization: "Bearer " + token } 1219 headers: { Authorization: "Bearer " + token }
1218 }) 1220 })
1219 .then(response => { 1221 .then(response => {
1220 this.addclass = response.data.data; 1222 this.addclass = response.data.data;
1221 // console.log("getClassesList=====>",this.addclass) 1223 // console.log("getClassesList=====>",this.addclass)
1222 }) 1224 })
1223 .catch(err => { 1225 .catch(err => {
1224 // console.log("err====>", err); 1226 // console.log("err====>", err);
1225 }); 1227 });
1226 1228
1227 http() 1229 http()
1228 .get("/getTeachersList", { 1230 .get("/getTeachersList", {
1229 headers: { Authorization: "Bearer " + token } 1231 headers: { Authorization: "Bearer " + token }
1230 }) 1232 })
1231 .then(response => { 1233 .then(response => {
1232 this.addTeachers = response.data.data; 1234 this.addTeachers = response.data.data;
1233 // console.log("getClassesList=====>",this.addTeachers) 1235 // console.log("getClassesList=====>",this.addTeachers)
1234 }) 1236 })
1235 .catch(err => { 1237 .catch(err => {
1236 // console.log("err====>", err); 1238 // console.log("err====>", err);
1237 }); 1239 });
1238 }, 1240 },
1239 computed: { 1241 computed: {
1240 toolbarColor() { 1242 toolbarColor() {
1241 return this.$vuetify.options.extra.mainNav; 1243 return this.$vuetify.options.extra.mainNav;
1242 } 1244 }
1243 } 1245 }
1244 }; 1246 };
1245 </script> 1247 </script>
1246 <style scoped> 1248 <style scoped>
1247 .theme--light .v-label, 1249 .theme--light .v-label,
1248 .application .theme--light.v-label { 1250 .application .theme--light.v-label {
1249 color: black; 1251 color: black;
1250 } 1252 }
1251 .v-tabs__div { 1253 .v-tabs__div {
1252 text-transform: none; 1254 text-transform: none;
1253 } 1255 }
1254 .v-input__prepend-outer { 1256 .v-input__prepend-outer {
1255 margin-right: 0px !important; 1257 margin-right: 0px !important;
1256 } 1258 }
1257 .v-card__actions .v-btn { 1259 .v-card__actions .v-btn {
1258 margin: 0 15px; 1260 margin: 0 15px;
1259 min-width: 120px; 1261 min-width: 120px;
1260 } 1262 }
1261 .primary { 1263 .primary {
1262 background-color: #aaa !important; 1264 background-color: #aaa !important;
1263 border-color: #aaa !important; 1265 border-color: #aaa !important;
1264 } 1266 }
1265 h4 { 1267 h4 {
1266 background-repeat: no-repeat; 1268 background-repeat: no-repeat;
1267 padding: 8px; 1269 padding: 8px;
1268 margin: auto; 1270 margin: auto;
1269 font-size: 25px; 1271 font-size: 25px;
1270 } 1272 }
1271 #name { 1273 #name {
1272 position: absolute; 1274 position: absolute;
1273 left: 100px; 1275 left: 100px;
1274 top: 17px; 1276 top: 17px;
1275 } 1277 }
1276 #icon { 1278 #icon {
1277 position: absolute; 1279 position: absolute;
1278 right: 8px; 1280 right: 8px;
1279 top: 8px; 1281 top: 8px;
1280 } 1282 }
1281 #m { 1283 #m {
1282 position: relative; 1284 position: relative;
1283 left: 135px; 1285 left: 135px;
1284 top: -15px; 1286 top: -15px;
1285 } 1287 }
1286 #G { 1288 #G {
1287 position: absolute; 1289 position: absolute;
1288 top: 38px; 1290 top: 38px;
1289 color: white; 1291 color: white;
1290 } 1292 }
1291 #bt { 1293 #bt {
1292 position: relative; 1294 position: relative;
1293 top: -20px; 1295 top: -20px;
1294 left: 115px; 1296 left: 115px;
1295 } 1297 }
1296 #e { 1298 #e {
1297 position: relative; 1299 position: relative;
1298 top: 5px; 1300 top: 5px;
1299 right: -30px; 1301 right: -30px;
1300 height: 17px; 1302 height: 17px;
1301 cursor: pointer; 1303 cursor: pointer;
1302 } 1304 }
1303 #d { 1305 #d {
1304 position: relative; 1306 position: relative;
1305 top: 5px; 1307 top: 5px;
1306 right: -70px; 1308 right: -70px;
1307 height: 17px; 1309 height: 17px;
1308 cursor: pointer; 1310 cursor: pointer;
1309 } 1311 }
1310 #td { 1312 #td {
1311 border: 1px solid #dddddd; 1313 border: 1px solid #dddddd;
1312 text-align: left; 1314 text-align: left;
1313 padding: 8px; 1315 padding: 8px;
1314 } 1316 }
1315 #dialog { 1317 #dialog {
1316 height: 550px; 1318 height: 550px;
1317 } 1319 }
1318 .active { 1320 .active {
1319 background-color: black; 1321 background-color: black;
1320 color: white !important; 1322 color: white !important;
1321 } 1323 }
1322 .activebtn { 1324 .activebtn {
1323 color: black !important; 1325 color: black !important;
1324 } 1326 }
1325 #flex { 1327 #flex {
1326 height: 300px; 1328 height: 300px;
1327 } 1329 }
1328 .top { 1330 .top {
1329 margin-top: 100px; 1331 margin-top: 100px;
1330 } 1332 }
1331 .v-tabs__item a { 1333 .v-tabs__item a {
1332 font-size: 16px !important; 1334 font-size: 16px !important;
1333 } 1335 }
1334 @media screen and (max-width: 769px) { 1336 @media screen and (max-width: 769px) {
1335 .top { 1337 .top {
1336 margin-top: 0 !important; 1338 margin-top: 0 !important;
1337 } 1339 }
1338 .userSearch .v-icon { 1340 .userSearch .v-icon {
1339 font-size: 20px !important; 1341 font-size: 20px !important;
1340 margin-left: 20px; 1342 margin-left: 20px;
1341 } 1343 }
1342 } 1344 }
1343 @media screen and (max-width: 380px) { 1345 @media screen and (max-width: 380px) {
1344 .pl-3 { 1346 .pl-3 {
1345 padding-left: 0px !important; 1347 padding-left: 0px !important;
1346 } 1348 }
1347 .right { 1349 .right {
1348 float: none !important; 1350 float: none !important;
1349 } 1351 }
1350 .subheading { 1352 .subheading {
1351 font-size: 14px !important; 1353 font-size: 14px !important;
1352 } 1354 }
1353 .v-card__actions .v-btn { 1355 .v-card__actions .v-btn {
1354 margin: 0 0px; 1356 margin: 0 0px;
1355 min-width: 100px; 1357 min-width: 100px;
1356 } 1358 }
1357 /* .searchIcon .v-icon { 1359 /* .searchIcon .v-icon {
1358 font-size: 20px; 1360 font-size: 20px;
1359 margin-left: 20px; 1361 margin-left: 20px;
1360 } */ 1362 } */
1361 .subheading { 1363 .subheading {
1362 font-size: 12px !important; 1364 font-size: 12px !important;
1363 } 1365 }
1364 h5 { 1366 h5 {
1365 font-size: 13px; 1367 font-size: 13px;
1366 } 1368 }
1367 } 1369 }
1368 .v-icon { 1370 .v-icon {
1369 font-size: 30px; 1371 font-size: 30px;
1370 } 1372 }
1371 @media screen and (min-width: 1270px) { 1373 @media screen and (min-width: 1270px) {
1372 .hide { 1374 .hide {
1373 display: none; 1375 display: none;
1374 } 1376 }
1375 } 1377 }
1376 @media screen and (max-width: 420px) { 1378 @media screen and (max-width: 420px) {
1377 .userSearch .v-text-field .v-label { 1379 .userSearch .v-text-field .v-label {
1378 line-height: 24px !important; 1380 line-height: 24px !important;
1379 } 1381 }
1380 .userSearch .v-label { 1382 .userSearch .v-label {
1381 font-size: 13px !important; 1383 font-size: 13px !important;
1382 } 1384 }
1383 .v-list__tile { 1385 .v-list__tile {
1384 font-size: 14px; 1386 font-size: 14px;
1385 padding: 0 10px; 1387 padding: 0 10px;
1386 } 1388 }
1387 .name { 1389 .name {
1388 font-size: 15px; 1390 font-size: 15px;
1389 } 1391 }
1390 } 1392 }