Commit 76f4f9c781bb07e672274fb1e07915a9c74ee372
1 parent
05b51389ce
Exists in
master
and in
3 other branches
all api add in section Page and Time Table and other changes
Showing
5 changed files
with
1955 additions
and
8 deletions
Show diff stats
src/Services/http.js
1 | import axios from 'axios' | 1 | import axios from 'axios' |
2 | import store from '@/store/store' | 2 | import store from '@/store/store' |
3 | 3 | ||
4 | export default () => { | 4 | export default () => { |
5 | return axios.create({ | 5 | return axios.create({ |
6 | baseURL:'http://192.168.2.221:3002/v1', | 6 | baseURL:'http://192.168.4.220:3002/v1', |
7 | headers: { | 7 | headers: { |
8 | Authorization: `Bearer ${store.state.token}` | 8 | Authorization: `Bearer ${store.state.token}` |
9 | } | 9 | } |
10 | }) | 10 | }) |
11 | } | 11 | } |
12 | 12 |
src/pages/Section/section.vue
File was created | 1 | <template> | |
2 | <v-app id="pages-dasboard"> | ||
3 | <v-toolbar | ||
4 | class="fixcolors" | ||
5 | fixed | ||
6 | app | ||
7 | > | ||
8 | <v-toolbar-title class="ml-0 pl-3"> | ||
9 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | ||
10 | </v-toolbar-title> | ||
11 | <!-- ****** SEARCH ALL EXISTING SECTION ****** --> | ||
12 | <v-flex xs7 sm3 class="userSearch"> | ||
13 | <v-text-field | ||
14 | flat | ||
15 | append-icon="search" | ||
16 | label="Find your Teachers" | ||
17 | v-model="search" | ||
18 | color="white" | ||
19 | dark | ||
20 | > | ||
21 | </v-text-field> | ||
22 | </v-flex> | ||
23 | <v-spacer></v-spacer> | ||
24 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | ||
25 | <v-btn icon large flat slot="activator"> | ||
26 | <v-avatar size="40px"> | ||
27 | <img src="/static/icon/user.png"/> | ||
28 | </v-avatar> | ||
29 | </v-btn> | ||
30 | <v-list class="pa-0"> | ||
31 | <v-list-tile v-for="(item,index) in items" :to="!item.href ? { name: item.name } : null" :href="item.href" @click="item.click" ripple="ripple" :disabled="item.disabled" :target="item.target" rel="noopener" :key="index"> | ||
32 | <v-list-tile-action v-if="item.icon"> | ||
33 | <v-icon>{{ item.icon }}</v-icon> | ||
34 | </v-list-tile-action> | ||
35 | <v-list-tile-content> | ||
36 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | ||
37 | </v-list-tile-content> | ||
38 | </v-list-tile> | ||
39 | </v-list> | ||
40 | </v-menu> | ||
41 | </v-toolbar> | ||
42 | <v-tabs grow slider-color="black"> | ||
43 | <v-tab | ||
44 | ripple | ||
45 | @click="activeTab('existing')" | ||
46 | v-bind:class="{ active: isActive }" | ||
47 | id="tab" | ||
48 | class="subheading" | ||
49 | >Existing Section</v-tab> | ||
50 | <v-tab | ||
51 | ripple | ||
52 | @click="activeTab('new')" | ||
53 | v-bind:class="{ active: newActive }" | ||
54 | id="tab1"User | ||
55 | class="subheading" | ||
56 | >Add New Section</v-tab> | ||
57 | |||
58 | <!-- ****** EDIT SECTION ****** --> | ||
59 | <v-tab-item> | ||
60 | <v-snackbar | ||
61 | :timeout="timeout" | ||
62 | :top="y === 'top'" | ||
63 | :right="x === 'right'" | ||
64 | :vertical="mode === 'vertical'" | ||
65 | v-model="snackbar" | ||
66 | color="success" | ||
67 | >{{ text }}</v-snackbar> | ||
68 | <v-dialog v-model="dialog" max-width="500px"> | ||
69 | <v-toolbar color="white"> | ||
70 | <v-spacer></v-spacer> | ||
71 | <v-toolbar-title>Edit Section</v-toolbar-title> | ||
72 | <v-spacer></v-spacer> | ||
73 | </v-toolbar> | ||
74 | <v-card> | ||
75 | <v-card-text> | ||
76 | <v-container> | ||
77 | <v-layout wrap justify-center> | ||
78 | <v-flex xs12 sm9> | ||
79 | <v-form ref="forms" v-model="validEdit" lazy-validation> | ||
80 | <v-layout style="position:relative;"> | ||
81 | <v-flex xs4 class="pt-4 subheading"> | ||
82 | <label>Class Name:</label> | ||
83 | </v-flex> | ||
84 | <v-flex xs8> | ||
85 | <v-autocomplete | ||
86 | :items="addclass" | ||
87 | :label="editedItem.classData.classNum" | ||
88 | v-model="select" | ||
89 | item-text="classNum" | ||
90 | :rules="classRules" | ||
91 | item-value="_id" | ||
92 | name="Select Class" | ||
93 | ></v-autocomplete> | ||
94 | </v-flex> | ||
95 | </v-layout> | ||
96 | <v-layout style="position:relative;"> | ||
97 | <v-flex xs4 class="pt-4 subheading"> | ||
98 | <label>Section Name:</label> | ||
99 | </v-flex> | ||
100 | <v-flex xs8> | ||
101 | <v-text-field | ||
102 | v-model="editedItem.name" | ||
103 | placeholder="fill your Section Name" | ||
104 | type="text" | ||
105 | required | ||
106 | ></v-text-field> | ||
107 | </v-flex> | ||
108 | |||
109 | </v-layout> | ||
110 | <v-card-actions> | ||
111 | <v-btn round dark @click.native="close">Cancel</v-btn> | ||
112 | <v-spacer></v-spacer> | ||
113 | <v-btn round dark @click="save">Save</v-btn> | ||
114 | </v-card-actions> | ||
115 | </v-form> | ||
116 | </v-flex> | ||
117 | </v-layout> | ||
118 | </v-container> | ||
119 | </v-card-text> | ||
120 | </v-card> | ||
121 | </v-dialog> | ||
122 | |||
123 | <!-- ****** PROFILE VIEW SECTION DATA ****** --> | ||
124 | |||
125 | <v-dialog v-model="dialog1" max-width="600px"> | ||
126 | <v-toolbar color="white"> | ||
127 | <v-spacer></v-spacer> | ||
128 | <v-toolbar-title>Section</v-toolbar-title> | ||
129 | <v-spacer></v-spacer> | ||
130 | <v-icon @click="close1">close</v-icon> | ||
131 | </v-toolbar> | ||
132 | <v-card> | ||
133 | <v-flex align-center justify-center layout text-xs-center> | ||
134 | <v-avatar size="50px" style="position:absolute; top:20px;"> | ||
135 | <img src="/static/icon/user.png"> | ||
136 | </v-avatar> | ||
137 | </v-flex> | ||
138 | <v-card-text> | ||
139 | <v-container grid-list-md> | ||
140 | <v-layout wrap> | ||
141 | <v-flex><br><br> | ||
142 | <v-layout> | ||
143 | <v-flex xs5 sm6> | ||
144 | <h5 class="right my-1">Class Name:</h5> | ||
145 | </v-flex> | ||
146 | <v-flex sm6 xs8> | ||
147 | <h5 class="my-1">{{ editedItem.classData.classNum }}</h5> | ||
148 | </v-flex> | ||
149 | </v-layout> | ||
150 | <v-layout> | ||
151 | <v-flex xs5 sm6> | ||
152 | <h5 class="right my-1">Section Name:</h5> | ||
153 | </v-flex> | ||
154 | <v-flex sm6 xs8> | ||
155 | <h5 class="my-1">{{ editedItem.name }}</h5> | ||
156 | </v-flex> | ||
157 | </v-layout> | ||
158 | </v-flex> | ||
159 | </v-layout> | ||
160 | </v-container> | ||
161 | </v-card-text> | ||
162 | </v-card> | ||
163 | </v-dialog> | ||
164 | |||
165 | <v-snackbar | ||
166 | :timeout="timeout" | ||
167 | :top="y === 'top'" | ||
168 | :right="x === 'right'" | ||
169 | :vertical="mode === 'vertical'" | ||
170 | v-model="snackbar" | ||
171 | color="success" | ||
172 | >{{ text }}</v-snackbar> | ||
173 | |||
174 | <!-- ****** EXISTING-USERS StudentS Table ****** --> | ||
175 | |||
176 | <v-data-table | ||
177 | :headers="headers" | ||
178 | :items="desserts" | ||
179 | :pagination.sync="pagination" | ||
180 | :search="search" | ||
181 | > | ||
182 | <template slot="items" slot-scope="props"> | ||
183 | <td id="td" class="text-xs-center">{{ props.index}}</td> | ||
184 | <td id="td" class="text-xs-center">{{ props.item.classData.classNum}}</td> | ||
185 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> | ||
186 | <td class="text-xs-center"> | ||
187 | <span> | ||
188 | <img | ||
189 | style="cursor:pointer; width:25px; height:18px; " | ||
190 | class="mr-5" | ||
191 | @click="profile(props.item)" | ||
192 | src="/static/icon/eye1.png" | ||
193 | > | ||
194 | <img | ||
195 | style="cursor:pointer; width:20px; height:18px; " | ||
196 | class="mr-5" | ||
197 | @click="editItem(props.item)" | ||
198 | src="/static/icon/edit1.png" | ||
199 | > | ||
200 | <img | ||
201 | style="cursor:pointer; height:20px; " | ||
202 | class="mr-5" | ||
203 | @click="deleteItem(props.item)" | ||
204 | src="/static/icon/delete1.png" | ||
205 | > | ||
206 | </span> | ||
207 | </td> | ||
208 | </template> | ||
209 | <v-alert | ||
210 | slot="no-results" | ||
211 | :value="true" | ||
212 | color="error" | ||
213 | icon="warning" | ||
214 | >Your search for "{{ search }}" found no results.</v-alert> | ||
215 | </v-data-table> | ||
216 | </v-tab-item> | ||
217 | |||
218 | <!-- ****** ADD multiple Students ****** --> | ||
219 | |||
220 | <v-tab-item> | ||
221 | <v-container> | ||
222 | <v-snackbar | ||
223 | :timeout="timeout" | ||
224 | :top="y === 'top'" | ||
225 | :right="x === 'right'" | ||
226 | :vertical="mode === 'vertical'" | ||
227 | v-model="snackbar" | ||
228 | color="success" | ||
229 | >{{ text }}</v-snackbar> | ||
230 | <v-flex xs12 sm8 offset-sm2 class="top"> | ||
231 | <v-card flat> | ||
232 | <v-container fluid fill-height> | ||
233 | <v-layout align-center> | ||
234 | <v-flex xs12> | ||
235 | <v-flex offset-xs5> | ||
236 | <v-avatar size="55px"> | ||
237 | <img src="/static/icon/user.png"> | ||
238 | </v-avatar> | ||
239 | </v-flex> | ||
240 | <v-form ref="form" v-model="valid" lazy-validation> | ||
241 | <v-layout> | ||
242 | <v-flex xs4 class="pt-4 subheading"> | ||
243 | <label class="right">Section Name:</label> | ||
244 | </v-flex> | ||
245 | <v-flex xs6 class="ml-3"> | ||
246 | <v-text-field | ||
247 | v-model="editedItem.name" | ||
248 | placeholder="fill your Section Name" | ||
249 | name="name" | ||
250 | type="text" | ||
251 | :rules="nameRules" | ||
252 | required | ||
253 | ></v-text-field> | ||
254 | </v-flex> | ||
255 | </v-layout> | ||
256 | <v-layout> | ||
257 | <v-flex xs4 class="pt-4 subheading"> | ||
258 | <label class="right">Select Class:</label> | ||
259 | </v-flex> | ||
260 | <v-flex xs6 class="ml-3"> | ||
261 | <v-autocomplete | ||
262 | :items="addclass" | ||
263 | label="Select Class" | ||
264 | v-model="select" | ||
265 | item-text="classNum" | ||
266 | item-value="_id" | ||
267 | name="Select Class" | ||
268 | :rules="classRules" | ||
269 | required | ||
270 | ></v-autocomplete> | ||
271 | </v-flex> | ||
272 | </v-layout> | ||
273 | <v-layout> | ||
274 | <v-flex xs4 class="pt-4 subheading"> | ||
275 | <label class="right">Session:</label> | ||
276 | </v-flex> | ||
277 | <v-flex xs6 class="ml-3"> | ||
278 | <v-text-field | ||
279 | v-model="editedItem.session" | ||
280 | placeholder="fill your Session" | ||
281 | name="name" | ||
282 | type="text" | ||
283 | :rules="sessionRules" | ||
284 | required | ||
285 | ></v-text-field> | ||
286 | </v-flex> | ||
287 | </v-layout> | ||
288 | <v-layout> | ||
289 | <v-flex xs12 sm9 offset-sm2> | ||
290 | <v-card-actions> | ||
291 | <v-btn @click="clear" round dark>clear</v-btn> | ||
292 | <v-spacer></v-spacer> | ||
293 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | ||
294 | </v-card-actions> | ||
295 | </v-flex> | ||
296 | </v-layout> | ||
297 | </v-form> | ||
298 | </v-flex> | ||
299 | </v-layout> | ||
300 | </v-container> | ||
301 | </v-card> | ||
302 | </v-flex> | ||
303 | </v-container> | ||
304 | </v-tab-item> | ||
305 | </v-tabs> | ||
306 | <div class="loader" v-if="showLoader"> | ||
307 | <v-progress-circular indeterminate color="white"></v-progress-circular> | ||
308 | </div> | ||
309 | </v-app> | ||
310 | </template> | ||
311 | |||
312 | <script> | ||
313 | import http from "@/Services/http.js"; | ||
314 | import Util from "@/util"; | ||
315 | |||
316 | export default { | ||
317 | data: () => ({ | ||
318 | snackbar: false, | ||
319 | y: "top", | ||
320 | x: "right", | ||
321 | mode: "", | ||
322 | timeout: 3000, | ||
323 | text: "", | ||
324 | showLoader:false, | ||
325 | loading: false, | ||
326 | date:null, | ||
327 | search: '', | ||
328 | menu: false, | ||
329 | menu1:false, | ||
330 | dialog: false, | ||
331 | dialog1: false, | ||
332 | valid: true, | ||
333 | validEdit:true, | ||
334 | isActive: true, | ||
335 | newActive: false, | ||
336 | details: [], | ||
337 | AddUsercredentials: {}, | ||
338 | pagination: { | ||
339 | rowsPerPage: 15 | ||
340 | }, | ||
341 | nameRules: [v => !!v || " Section Name is required"], | ||
342 | classRules: [v => !!v || " Class Name is required"], | ||
343 | sessionRules: [v => !!v || " Session is required"], | ||
344 | headers: [ | ||
345 | { | ||
346 | text: "No", | ||
347 | align: "center", | ||
348 | sortable: false, | ||
349 | value: "No" | ||
350 | }, | ||
351 | { text: "Class Name", value: "name", sortable: false, align: "center" }, | ||
352 | { text: "Section Name", value: "sectionName", sortable: false, align: "center" }, | ||
353 | { text: "Action", value: "", sortable: false, align: "center" } | ||
354 | ], | ||
355 | desserts: [], | ||
356 | addclass:[], | ||
357 | // addIncharge:[], | ||
358 | // selectIncharge:'', | ||
359 | select:'', | ||
360 | selectId:'', | ||
361 | editedIndex: -1, | ||
362 | editedItem: { | ||
363 | classData:{ | ||
364 | classNum:"", | ||
365 | }, | ||
366 | name:'', | ||
367 | session:new Date().getFullYear() | ||
368 | |||
369 | }, | ||
370 | items: [ | ||
371 | { | ||
372 | href: "/changepassword", | ||
373 | title: "Change Password", | ||
374 | click: e => { | ||
375 | console.log(e); | ||
376 | } | ||
377 | }, | ||
378 | { | ||
379 | href: "#", | ||
380 | title: "Logout", | ||
381 | click: e => { | ||
382 | window.getApp.$emit("APP_LOGOUT"); | ||
383 | } | ||
384 | } | ||
385 | ] | ||
386 | }), | ||
387 | watch: { | ||
388 | menu (val) { | ||
389 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | ||
390 | }, | ||
391 | menu1 (val) { | ||
392 | val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) | ||
393 | } | ||
394 | }, | ||
395 | methods: { | ||
396 | getSectionList() { | ||
397 | this.showLoader = true; | ||
398 | var token = this.$store.state.token; | ||
399 | http() | ||
400 | .get("/getAllSections", { | ||
401 | headers: { Authorization: "Bearer " + token } | ||
402 | }) | ||
403 | .then(response => { | ||
404 | this.desserts = response.data.data; | ||
405 | this.showLoader = false; | ||
406 | // console.log("getAllSections=====>",response.data.data) | ||
407 | |||
408 | }) | ||
409 | .catch(err => { | ||
410 | // console.log("err====>", err); | ||
411 | this.showLoader = false; | ||
412 | this.$router.replace({ path: '/' }); | ||
413 | }); | ||
414 | }, | ||
415 | editItem(item) { | ||
416 | this.editedIndex = this.desserts.indexOf(item); | ||
417 | this.editedItem = Object.assign({}, item); | ||
418 | console.log(this.editedItem) | ||
419 | this.dialog = true; | ||
420 | }, | ||
421 | profile(item) { | ||
422 | this.editedIndex = this.desserts.indexOf(item); | ||
423 | this.editedItem = Object.assign({}, item); | ||
424 | this.dialog1 = true; | ||
425 | }, | ||
426 | deleteItem(item) { | ||
427 | let deleteStudent = { | ||
428 | sectionId: item._id | ||
429 | }; | ||
430 | http() | ||
431 | .delete("/deleteSection", confirm('Are you sure you want to delete this?') && { params: deleteStudent }) | ||
432 | .then(response => { | ||
433 | // console.log("deleteUers",deleteStudent) | ||
434 | if ((this.snackbar = true)) { | ||
435 | this.text = "Successfully delete Existing User"; | ||
436 | } | ||
437 | this.getSectionList(); | ||
438 | }) | ||
439 | .catch(error => { | ||
440 | // console.log(error); | ||
441 | }); | ||
442 | }, | ||
443 | activeTab(type) { | ||
444 | switch (type) { | ||
445 | case "existing": | ||
446 | this.newActive = false; | ||
447 | this.isActive = true; | ||
448 | break; | ||
449 | |||
450 | default: | ||
451 | this.newActive = true; | ||
452 | this.isActive = false; | ||
453 | break; | ||
454 | } | ||
455 | }, | ||
456 | close() { | ||
457 | this.dialog = false; | ||
458 | setTimeout(() => { | ||
459 | this.editedItem = Object.assign({}, this.defaultItem); | ||
460 | this.editedIndex = -1; | ||
461 | }, 300); | ||
462 | }, | ||
463 | close1() { | ||
464 | this.dialog1 = false; | ||
465 | }, | ||
466 | close2() { | ||
467 | this.dialog2 = false; | ||
468 | }, | ||
469 | submit() { | ||
470 | if (this.$refs.forms.validate()) { | ||
471 | let addSection = { | ||
472 | name: this.editedItem.name, | ||
473 | classId: this.select, | ||
474 | session:this.editedItem.session | ||
475 | }; | ||
476 | console.log(addSection) | ||
477 | http() | ||
478 | .post("/createSection", addSection) | ||
479 | .then(response => { | ||
480 | console.log(addSection) | ||
481 | // this.getStudentList(); | ||
482 | if (this.snackbar = true) { | ||
483 | this.text = "New user added successfully"; | ||
484 | } | ||
485 | |||
486 | this.clear(); | ||
487 | }) | ||
488 | .catch(error => { | ||
489 | // console.log(error); | ||
490 | if (this.snackbar = true) { | ||
491 | this.text = error.response.data.message; | ||
492 | } | ||
493 | }); | ||
494 | } | ||
495 | }, | ||
496 | mail() { | ||
497 | }, | ||
498 | download() { | ||
499 | }, | ||
500 | clear() { | ||
501 | this.$refs.form.reset(); | ||
502 | }, | ||
503 | save() { | ||
504 | // if (this.$refs.form.validate()) { | ||
505 | let editStudent = { | ||
506 | name: this.editedItem.name, | ||
507 | classId: this.select, | ||
508 | sectionId: this.editedItem._id | ||
509 | }; | ||
510 | http() | ||
511 | .put("/updateSection", editStudent) | ||
512 | .then(response => { | ||
513 | // console.log("editStudent",editStudent); | ||
514 | if ((this.snackbar = true)) { | ||
515 | this.text = "Successfully Edit Existing User"; | ||
516 | } | ||
517 | this.getSectionList(); | ||
518 | // this.showLoader = false; | ||
519 | }) | ||
520 | .catch(error => { | ||
521 | this.text = error.response.data.message; | ||
522 | // console.log(error); | ||
523 | }); | ||
524 | this.close(); | ||
525 | // } | ||
526 | }, | ||
527 | handleDrawerToggle() { | ||
528 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | ||
529 | }, | ||
530 | handleFullScreen() { | ||
531 | Util.toggleFullScreen(); | ||
532 | } | ||
533 | }, | ||
534 | mounted() { | ||
535 | this.getSectionList(); | ||
536 | |||
537 | var token = this.$store.state.token; | ||
538 | http() | ||
539 | .get("/getClassesList", { | ||
540 | headers: { Authorization: "Bearer " + token } | ||
541 | }) | ||
542 | .then(response => { | ||
543 | this.addclass = response.data.data; | ||
544 | console.log("getClassesList=====>",this.addclass) | ||
545 | |||
546 | }) | ||
547 | .catch(err => { | ||
548 | // console.log("err====>", err); | ||
549 | this.$router.replace({ path: '/' }); | ||
550 | }); | ||
551 | }, | ||
552 | |||
553 | computed:{ | ||
554 | toolbarColor() { | ||
555 | return this.$vuetify.options.extra.mainNav; | ||
556 | } | ||
557 | } | ||
558 | }; | ||
559 | </script> | ||
560 | <style scoped> | ||
561 | .v-tabs__div { | ||
562 | text-transform: none; | ||
563 | } | ||
564 | .v-input__prepend-outer { | ||
565 | margin-right: 0px !important; | ||
566 | } | ||
567 | .v-card__actions .v-btn { | ||
568 | margin: 0 15px; | ||
569 | min-width: 120px; | ||
570 | } | ||
571 | .primary { | ||
572 | background-color: #aaa !important; | ||
573 | border-color: #aaa !important; | ||
574 | } | ||
575 | h4 { | ||
576 | background-repeat: no-repeat; | ||
577 | padding: 8px; | ||
578 | margin: auto; | ||
579 | font-size: 25px; | ||
580 | } | ||
581 | #name { | ||
582 | position: absolute; | ||
583 | left: 100px; | ||
584 | top: 17px; | ||
585 | } | ||
586 | #icon { | ||
587 | position: absolute; | ||
588 | right: 8px; | ||
589 | top: 8px; | ||
590 | } | ||
591 | #m { | ||
592 | position: relative; | ||
593 | left: 135px; | ||
594 | top: -15px; | ||
595 | } | ||
596 | #G { | ||
597 | position: absolute; | ||
598 | top: 38px; | ||
599 | color: white; | ||
600 | } | ||
601 | #bt { | ||
602 | position: relative; | ||
603 | top: -20px; | ||
604 | left: 115px; | ||
605 | } | ||
606 | #e { | ||
607 | position: relative; | ||
608 | top: 5px; | ||
609 | right: -30px; | ||
610 | height: 17px; | ||
611 | cursor: pointer; | ||
612 | } | ||
613 | #d { | ||
614 | position: relative; | ||
615 | top: 5px; | ||
616 | right: -70px; | ||
617 | height: 17px; | ||
618 | cursor: pointer; | ||
619 | } | ||
620 | #td { | ||
621 | border: 1px solid #dddddd; | ||
622 | text-align: left; | ||
623 | padding: 8px; | ||
624 | } | ||
625 | #dialog { | ||
626 | height: 550px; | ||
627 | } | ||
628 | .active { | ||
629 | background-color: black; | ||
630 | color: white !important; | ||
631 | } | ||
632 | .activebtn { | ||
633 | color: black !important; | ||
634 | } | ||
635 | #flex { | ||
636 | height: 300px; | ||
637 | } | ||
638 | .top{ | ||
639 | margin-top:100px; | ||
640 | } | ||
641 | .v-tabs__item a{ | ||
642 | font-size:16px !important; | ||
643 | } | ||
644 | @media screen and (max-width: 769px){ | ||
645 | .top{ | ||
646 | margin-top:0 !important; | ||
647 | } | ||
648 | .userSearch .v-icon { | ||
649 | font-size: 20px !important; | ||
650 | margin-left: 20px ; | ||
651 | } | ||
652 | } | ||
653 | @media screen and (max-width: 380px) { | ||
654 | .right { | ||
655 | float: none !important; | ||
656 | } | ||
657 | .subheading { | ||
658 | font-size: 14px !important; | ||
659 | } | ||
660 | .v-card__actions .v-btn{ | ||
661 | margin: 0 0px; | ||
662 | min-width: 100px; | ||
663 | } | ||
664 | /* .searchIcon .v-icon { | ||
665 | font-size: 20px; | ||
666 | margin-left: 20px; | ||
667 | } */ | ||
668 | .subheading { | ||
669 | font-size: 12px !important; | ||
670 | } | ||
671 | h5 { | ||
672 | font-size: 13px; | ||
673 | } | ||
674 | } | ||
675 | .v-icon{ | ||
676 | font-size:30px; | ||
677 | } | ||
678 | @media screen and (min-width: 1270px){ | ||
679 | .hide{ | ||
680 | display: none; | ||
681 | } | ||
682 | /* } | ||
683 | @media screen and (max-width: 962px) { | ||
684 | .imglogo{ | ||
685 | position: absolute; | ||
686 | top: 13px; | ||
687 | left: 13px !important; | ||
688 | width: 70px; | ||
689 | height: 24px; | ||
690 | } */ | ||
691 | } | ||
692 | @media screen and (max-width: 420px){ | ||
693 | .userSearch .v-text-field .v-label{ | ||
694 | line-height: 24px !important; | ||
695 | } | ||
696 | .userSearch .v-label{ | ||
697 | font-size: 13px !important; | ||
698 | } | ||
699 | .v-list__tile { | ||
700 | font-size:14px; | ||
701 | padding: 0 10px; | ||
702 | } | ||
703 | .name{ | ||
704 | font-size:15px; | ||
705 | } | ||
706 | } | ||
707 | </style> |
src/pages/Teachers/teachers.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 Teachers ****** --> | 7 | <!-- ****** SEARCH ALL Teachers ****** --> |
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 Teachers" | 12 | label="Find your Teachers" |
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 Teachers</v-tab> | 54 | >Existing Teachers</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 Teachers</v-tab> | 62 | >Add New Teachers</v-tab> |
63 | <!-- ****** EDIT TEACHERS DETAILS ****** --> | 63 | <!-- ****** EDIT TEACHERS DETAILS ****** --> |
64 | <v-tab-item> | 64 | <v-tab-item> |
65 | <v-snackbar | 65 | <v-snackbar |
66 | :timeout="timeout" | 66 | :timeout="timeout" |
67 | :top="y === 'top'" | 67 | :top="y === 'top'" |
68 | :right="x === 'right'" | 68 | :right="x === 'right'" |
69 | :vertical="mode === 'vertical'" | 69 | :vertical="mode === 'vertical'" |
70 | v-model="snackbar" | 70 | v-model="snackbar" |
71 | color="success" | 71 | color="success" |
72 | >{{ text }}</v-snackbar> | 72 | >{{ text }}</v-snackbar> |
73 | <v-dialog v-model="dialog" max-width="1000px"> | 73 | <v-dialog v-model="dialog" max-width="1000px"> |
74 | <v-flex xs12 sm12 class="my-4"> | 74 | <v-flex xs12 sm12 class="my-4"> |
75 | <v-toolbar color="white"> | 75 | <v-toolbar color="white"> |
76 | <v-spacer></v-spacer> | 76 | <v-spacer></v-spacer> |
77 | <v-toolbar-title>Edit Profile</v-toolbar-title> | 77 | <v-toolbar-title>Edit Profile</v-toolbar-title> |
78 | <v-spacer></v-spacer> | 78 | <v-spacer></v-spacer> |
79 | </v-toolbar> | 79 | </v-toolbar> |
80 | <v-card flat> | 80 | <v-card flat> |
81 | <v-form ref="form"> | 81 | <v-form ref="form"> |
82 | <v-container fluid> | 82 | <v-container fluid> |
83 | <v-layout> | 83 | <v-layout> |
84 | <v-flex | 84 | <v-flex |
85 | xs12 | 85 | xs12 |
86 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | 86 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" |
87 | > | 87 | > |
88 | <v-avatar size="100px"> | 88 | <v-avatar size="100px"> |
89 | <img src="/static/icon/user.png" v-if="!imageUrl"> | 89 | <img src="/static/icon/user.png" v-if="!imageUrl"> |
90 | </v-avatar> | 90 | </v-avatar> |
91 | <input | 91 | <input |
92 | type="file" | 92 | type="file" |
93 | style="display: none" | 93 | style="display: none" |
94 | ref="image" | 94 | ref="image" |
95 | accept="image/*" | 95 | accept="image/*" |
96 | @change="onFilePicked" | 96 | @change="onFilePicked" |
97 | > | 97 | > |
98 | <img | 98 | <img |
99 | :src="imageData.imageUrl" | 99 | :src="imageData.imageUrl" |
100 | height="150" | 100 | height="150" |
101 | v-if="imageUrl" | 101 | v-if="imageUrl" |
102 | style="border-radius:50%; width:200px" | 102 | style="border-radius:50%; width:200px" |
103 | > | 103 | > |
104 | </v-flex> | 104 | </v-flex> |
105 | </v-layout> | 105 | </v-layout> |
106 | <v-layout> | 106 | <v-layout> |
107 | <v-flex xs12 sm6> | 107 | <v-flex xs12 sm6> |
108 | <v-layout> | 108 | <v-layout> |
109 | <v-flex xs4 class="pt-4 subheading"> | 109 | <v-flex xs4 class="pt-4 subheading"> |
110 | <label class="right">Full Name:</label> | 110 | <label class="right">Full Name:</label> |
111 | </v-flex> | 111 | </v-flex> |
112 | <v-flex xs8 class="ml-3"> | 112 | <v-flex xs8 class="ml-3"> |
113 | <v-text-field | 113 | <v-text-field |
114 | v-model="editedItem.name" | 114 | v-model="editedItem.name" |
115 | placeholder="fill your full Name" | 115 | placeholder="fill your full Name" |
116 | name="name" | 116 | name="name" |
117 | type="text" | 117 | type="text" |
118 | required | 118 | required |
119 | ></v-text-field> | 119 | ></v-text-field> |
120 | </v-flex> | 120 | </v-flex> |
121 | </v-layout> | 121 | </v-layout> |
122 | </v-flex> | 122 | </v-flex> |
123 | <v-flex xs12 sm6> | 123 | <v-flex xs12 sm6> |
124 | <v-layout> | 124 | <v-layout> |
125 | <v-flex xs4 class="pt-4 subheading"> | 125 | <v-flex xs4 class="pt-4 subheading"> |
126 | <label class="right">Email ID:</label> | 126 | <label class="right">Email ID:</label> |
127 | </v-flex> | 127 | </v-flex> |
128 | <v-flex xs8 class="ml-3"> | 128 | <v-flex xs8 class="ml-3"> |
129 | <v-text-field | 129 | <v-text-field |
130 | placeholder="fill your email" | 130 | placeholder="fill your email" |
131 | v-model="editedItem.email" | 131 | v-model="editedItem.email" |
132 | type="text" | 132 | type="text" |
133 | name="email" | 133 | name="email" |
134 | required | 134 | required |
135 | ></v-text-field> | 135 | ></v-text-field> |
136 | </v-flex> | 136 | </v-flex> |
137 | </v-layout> | 137 | </v-layout> |
138 | </v-flex> | 138 | </v-flex> |
139 | </v-layout> | 139 | </v-layout> |
140 | <v-layout> | 140 | <v-layout> |
141 | <v-flex xs12 sm6> | 141 | <v-flex xs12 sm6> |
142 | <v-layout> | 142 | <v-layout> |
143 | <v-flex xs4 class="pt-4 subheading"> | 143 | <v-flex xs4 class="pt-4 subheading"> |
144 | <label class="right">Date of Birth:</label> | 144 | <label class="right">Date of Birth:</label> |
145 | </v-flex> | 145 | </v-flex> |
146 | <v-flex xs8 class="ml-3"> | 146 | <v-flex xs8 class="ml-3"> |
147 | <v-menu | 147 | <v-menu |
148 | ref="menu" | 148 | ref="menu" |
149 | :close-on-content-click="false" | 149 | :close-on-content-click="false" |
150 | v-model="menu2" | 150 | v-model="menu2" |
151 | :nudge-right="40" | 151 | :nudge-right="40" |
152 | lazy | 152 | lazy |
153 | transition="scale-transition" | 153 | transition="scale-transition" |
154 | offset-y | 154 | offset-y |
155 | full-width | 155 | full-width |
156 | min-width="290px" | 156 | min-width="290px" |
157 | > | 157 | > |
158 | <v-text-field | 158 | <v-text-field |
159 | slot="activator" | 159 | slot="activator" |
160 | v-model="editedItem.dob" | 160 | v-model="editedItem.dob" |
161 | placeholder="Select date" | 161 | placeholder="Select date" |
162 | ></v-text-field> | 162 | ></v-text-field> |
163 | <v-date-picker | 163 | <v-date-picker |
164 | ref="picker" | 164 | ref="picker" |
165 | v-model="editedItem.dob" | 165 | v-model="editedItem.dob" |
166 | :max="new Date().toISOString().substr(0, 10)" | 166 | :max="new Date().toISOString().substr(0, 10)" |
167 | min="1950-01-01" | 167 | min="1950-01-01" |
168 | @input="menu2 = false" | 168 | @input="menu2 = false" |
169 | ></v-date-picker> | 169 | ></v-date-picker> |
170 | </v-menu> | 170 | </v-menu> |
171 | </v-flex> | 171 | </v-flex> |
172 | </v-layout> | 172 | </v-layout> |
173 | </v-flex> | 173 | </v-flex> |
174 | <v-flex xs12 sm6> | 174 | <v-flex xs12 sm6> |
175 | <v-layout> | 175 | <v-layout> |
176 | <v-flex xs4 class="pt-4 subheading"> | 176 | <v-flex xs4 class="pt-4 subheading"> |
177 | <label class="right">City:</label> | 177 | <label class="right">City:</label> |
178 | </v-flex> | 178 | </v-flex> |
179 | <v-flex xs8 class="ml-3"> | 179 | <v-flex xs8 class="ml-3"> |
180 | <v-text-field | 180 | <v-text-field |
181 | v-model="editedItem.city" | 181 | v-model="editedItem.city" |
182 | placeholder="fill your City Name" | 182 | placeholder="fill your City Name" |
183 | name="City" | 183 | name="City" |
184 | type="text" | 184 | type="text" |
185 | required | 185 | required |
186 | ></v-text-field> | 186 | ></v-text-field> |
187 | </v-flex> | 187 | </v-flex> |
188 | </v-layout> | 188 | </v-layout> |
189 | </v-flex> | 189 | </v-flex> |
190 | </v-layout> | 190 | </v-layout> |
191 | <v-layout> | 191 | <v-layout> |
192 | <v-flex xs12 sm6> | 192 | <v-flex xs12 sm6> |
193 | <v-layout> | 193 | <v-layout> |
194 | <v-flex xs4 class="pt-4 subheading"> | 194 | <v-flex xs4 class="pt-4 subheading"> |
195 | <label class="right">State:</label> | 195 | <label class="right">State:</label> |
196 | </v-flex> | 196 | </v-flex> |
197 | <v-flex xs8 class="ml-3"> | 197 | <v-flex xs8 class="ml-3"> |
198 | <v-text-field | 198 | <v-text-field |
199 | v-model="editedItem.state" | 199 | v-model="editedItem.state" |
200 | placeholder="fill your State Name" | 200 | placeholder="fill your State Name" |
201 | name="state" | 201 | name="state" |
202 | type="text" | 202 | type="text" |
203 | required | 203 | required |
204 | ></v-text-field> | 204 | ></v-text-field> |
205 | </v-flex> | 205 | </v-flex> |
206 | </v-layout> | 206 | </v-layout> |
207 | </v-flex> | 207 | </v-flex> |
208 | <v-flex xs12 sm6> | 208 | <v-flex xs12 sm6> |
209 | <v-layout> | 209 | <v-layout> |
210 | <v-flex xs4 class="pt-4 subheading"> | 210 | <v-flex xs4 class="pt-4 subheading"> |
211 | <label class="right">PinCode:</label> | 211 | <label class="right">PinCode:</label> |
212 | </v-flex> | 212 | </v-flex> |
213 | <v-flex xs8 class="ml-3"> | 213 | <v-flex xs8 class="ml-3"> |
214 | <v-text-field | 214 | <v-text-field |
215 | v-model="editedItem.pincode" | 215 | v-model="editedItem.pincode" |
216 | placeholder="fill your pincode" | 216 | placeholder="fill your pincode" |
217 | name="pincode" | 217 | name="pincode" |
218 | type="number" | 218 | type="number" |
219 | required | 219 | required |
220 | ></v-text-field> | 220 | ></v-text-field> |
221 | </v-flex> | 221 | </v-flex> |
222 | </v-layout> | 222 | </v-layout> |
223 | </v-flex> | 223 | </v-flex> |
224 | </v-layout> | 224 | </v-layout> |
225 | <v-layout> | 225 | <v-layout> |
226 | <v-flex xs12 sm6> | 226 | <v-flex xs12 sm6> |
227 | <v-layout> | 227 | <v-layout> |
228 | <v-flex xs4 class="pt-4 subheading"> | 228 | <v-flex xs4 class="pt-4 subheading"> |
229 | <label class="right">Mobile NO:</label> | 229 | <label class="right">Mobile NO:</label> |
230 | </v-flex> | 230 | </v-flex> |
231 | <v-flex xs8 class="ml-3"> | 231 | <v-flex xs8 class="ml-3"> |
232 | <v-text-field | 232 | <v-text-field |
233 | v-model="editedItem.mobileNo" | 233 | v-model="editedItem.mobileNo" |
234 | placeholder="fill your MobileNo" | 234 | placeholder="fill your MobileNo" |
235 | name="mobileNo" | 235 | name="mobileNo" |
236 | type="number" | 236 | type="number" |
237 | required | 237 | required |
238 | ></v-text-field> | 238 | ></v-text-field> |
239 | </v-flex> | 239 | </v-flex> |
240 | </v-layout> | 240 | </v-layout> |
241 | </v-flex> | 241 | </v-flex> |
242 | <v-flex xs12 sm6> | 242 | <v-flex xs12 sm6> |
243 | <v-layout> | 243 | <v-layout> |
244 | <v-flex xs4 class="pt-4 subheading"> | 244 | <v-flex xs4 class="pt-4 subheading"> |
245 | <label class="right">Select Country:</label> | 245 | <label class="right">Select Country:</label> |
246 | </v-flex> | 246 | </v-flex> |
247 | <v-flex xs8 class="ml-3"> | 247 | <v-flex xs8 class="ml-3"> |
248 | <v-autocomplete | 248 | <v-autocomplete |
249 | v-model="editedItem.country" | 249 | v-model="editedItem.country" |
250 | :items="countries" | 250 | :items="countries" |
251 | placeholder="Select Country Name" | 251 | placeholder="Select Country Name" |
252 | required | 252 | required |
253 | ></v-autocomplete> | 253 | ></v-autocomplete> |
254 | </v-flex> | 254 | </v-flex> |
255 | </v-layout> | 255 | </v-layout> |
256 | </v-flex> | 256 | </v-flex> |
257 | </v-layout> | 257 | </v-layout> |
258 | <v-layout> | 258 | <v-layout> |
259 | <v-flex xs12 sm6> | 259 | <v-flex xs12 sm6> |
260 | <v-layout> | 260 | <v-layout> |
261 | <v-flex xs4 class="pt-4 subheading"> | 261 | <v-flex xs4 class="pt-4 subheading"> |
262 | <label class="right">Join Date</label> | 262 | <label class="right">Join Date</label> |
263 | </v-flex> | 263 | </v-flex> |
264 | <v-flex xs8 class="ml-3"> | 264 | <v-flex xs8 class="ml-3"> |
265 | <v-menu | 265 | <v-menu |
266 | ref="menu" | 266 | ref="menu" |
267 | :close-on-content-click="false" | 267 | :close-on-content-click="false" |
268 | v-model="menu3" | 268 | v-model="menu3" |
269 | :nudge-right="40" | 269 | :nudge-right="40" |
270 | lazy | 270 | lazy |
271 | transition="scale-transition" | 271 | transition="scale-transition" |
272 | offset-y | 272 | offset-y |
273 | full-width | 273 | full-width |
274 | min-width="290px" | 274 | min-width="290px" |
275 | > | 275 | > |
276 | <v-text-field | 276 | <v-text-field |
277 | slot="activator" | 277 | slot="activator" |
278 | v-model="editedItem.joinDate" | 278 | v-model="editedItem.joinDate" |
279 | placeholder="Select date" | 279 | placeholder="Select date" |
280 | ></v-text-field> | 280 | ></v-text-field> |
281 | <v-date-picker | 281 | <v-date-picker |
282 | ref="picker" | 282 | ref="picker" |
283 | v-model="editedItem.joinDate" | 283 | v-model="editedItem.joinDate" |
284 | :max="new Date().toISOString().substr(0, 10)" | 284 | :max="new Date().toISOString().substr(0, 10)" |
285 | min="1950-01-01" | 285 | min="1950-01-01" |
286 | @input="menu3 = false" | 286 | @input="menu3 = false" |
287 | ></v-date-picker> | 287 | ></v-date-picker> |
288 | </v-menu> | 288 | </v-menu> |
289 | </v-flex> | 289 | </v-flex> |
290 | </v-layout> | 290 | </v-layout> |
291 | </v-flex> | 291 | </v-flex> |
292 | <v-flex xs12 sm6> | 292 | <v-flex xs12 sm6> |
293 | <v-layout> | 293 | <v-layout> |
294 | <v-flex xs4 class="pt-4 subheading"> | 294 | <v-flex xs4 class="pt-4 subheading"> |
295 | <label class="right">Uplaod Image:</label> | 295 | <label class="right">Uplaod Image:</label> |
296 | </v-flex> | 296 | </v-flex> |
297 | <v-flex xs8 class="ml-3"> | 297 | <v-flex xs8 class="ml-3"> |
298 | <v-text-field | 298 | <v-text-field |
299 | label="Select Image" | 299 | label="Select Image" |
300 | @click="pickFile" | 300 | @click="pickFile" |
301 | v-model="imageName" | 301 | v-model="imageName" |
302 | prepend-icon="attach_file" | 302 | prepend-icon="attach_file" |
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-layout> | 307 | </v-layout> |
308 | <v-layout> | 308 | <v-layout> |
309 | <v-flex xs12 sm12> | 309 | <v-flex xs12 sm12> |
310 | <v-layout> | 310 | <v-layout> |
311 | <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> | 311 | <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> |
312 | <label class>Present Address:</label> | 312 | <label class>Present Address:</label> |
313 | </v-flex> | 313 | </v-flex> |
314 | <v-flex xs12> | 314 | <v-flex xs12> |
315 | <v-text-field | 315 | <v-text-field |
316 | name="input-4-3" | 316 | name="input-4-3" |
317 | v-model="editedItem.presentAddress" | 317 | v-model="editedItem.presentAddress" |
318 | placeholder="fill Your present Address" | 318 | placeholder="fill Your present Address" |
319 | required | 319 | required |
320 | ></v-text-field> | 320 | ></v-text-field> |
321 | </v-flex> | 321 | </v-flex> |
322 | </v-layout> | 322 | </v-layout> |
323 | </v-flex> | 323 | </v-flex> |
324 | <v-flex xs12 sm12> | 324 | <v-flex xs12 sm12> |
325 | <v-layout> | 325 | <v-layout> |
326 | <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | 326 | <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> |
327 | <label>Permanent Address:</label> | 327 | <label>Permanent Address:</label> |
328 | </v-flex> | 328 | </v-flex> |
329 | <v-flex xs12> | 329 | <v-flex xs12> |
330 | <v-text-field | 330 | <v-text-field |
331 | name="input-4-3" | 331 | name="input-4-3" |
332 | v-model="editedItem.permanentAddress" | 332 | v-model="editedItem.permanentAddress" |
333 | placeholder="fill Your Permanent Address" | 333 | placeholder="fill Your Permanent Address" |
334 | required | 334 | required |
335 | ></v-text-field> | 335 | ></v-text-field> |
336 | </v-flex> | 336 | </v-flex> |
337 | </v-layout> | 337 | </v-layout> |
338 | </v-flex> | 338 | </v-flex> |
339 | </v-layout> | 339 | </v-layout> |
340 | <v-layout> | 340 | <v-layout> |
341 | <v-flex xs12 sm12> | 341 | <v-flex xs12 sm12> |
342 | <v-card-actions> | 342 | <v-card-actions> |
343 | <v-btn round dark @click.native="close">Cancel</v-btn> | 343 | <v-btn round dark @click.native="close">Cancel</v-btn> |
344 | <v-spacer></v-spacer> | 344 | <v-spacer></v-spacer> |
345 | <v-btn round dark @click="save">Save</v-btn> | 345 | <v-btn round dark @click="save">Save</v-btn> |
346 | </v-card-actions> | 346 | </v-card-actions> |
347 | </v-flex> | 347 | </v-flex> |
348 | </v-layout> | 348 | </v-layout> |
349 | </v-container> | 349 | </v-container> |
350 | </v-form> | 350 | </v-form> |
351 | </v-card> | 351 | </v-card> |
352 | </v-flex> | 352 | </v-flex> |
353 | </v-dialog> | 353 | </v-dialog> |
354 | 354 | ||
355 | <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** --> | 355 | <!-- ****** PROFILE VIEW TEACHERS DETAILS ****** --> |
356 | 356 | ||
357 | <v-dialog v-model="dialog1" max-width="600px"> | 357 | <v-dialog v-model="dialog1" max-width="600px"> |
358 | <v-toolbar color="white"> | 358 | <v-toolbar color="white"> |
359 | <v-spacer></v-spacer> | 359 | <v-spacer></v-spacer> |
360 | <v-toolbar-title>Profile</v-toolbar-title> | 360 | <v-toolbar-title>Profile</v-toolbar-title> |
361 | <v-spacer></v-spacer> | 361 | <v-spacer></v-spacer> |
362 | <v-icon @click="close1">close</v-icon> | 362 | <v-icon @click="close1">close</v-icon> |
363 | </v-toolbar> | 363 | </v-toolbar> |
364 | <v-card> | 364 | <v-card> |
365 | <v-flex align-center justify-center layout text-xs-center> | 365 | <v-flex align-center justify-center layout text-xs-center> |
366 | <v-avatar size="50px" style="position:absolute; top:20px;"> | 366 | <v-avatar size="50px" style="position:absolute; top:20px;"> |
367 | <img src="/static/icon/user.png"> | 367 | <img src="/static/icon/user.png"> |
368 | </v-avatar> | 368 | </v-avatar> |
369 | </v-flex> | 369 | </v-flex> |
370 | <v-card-text> | 370 | <v-card-text> |
371 | <v-container grid-list-md> | 371 | <v-container grid-list-md> |
372 | <v-layout wrap> | 372 | <v-layout wrap> |
373 | <v-flex> | 373 | <v-flex> |
374 | <br> | 374 | <br> |
375 | <br> | 375 | <br> |
376 | <v-layout> | 376 | <v-layout> |
377 | <v-flex xs5 sm6> | 377 | <v-flex xs5 sm6> |
378 | <h5 class="right my-1">Full Name:</h5> | 378 | <h5 class="right my-1">Full Name:</h5> |
379 | </v-flex> | 379 | </v-flex> |
380 | <v-flex sm6 xs8> | 380 | <v-flex sm6 xs8> |
381 | <h5 class="my-1">{{ editedItem.name }}</h5> | 381 | <h5 class="my-1">{{ editedItem.name }}</h5> |
382 | </v-flex> | 382 | </v-flex> |
383 | </v-layout> | 383 | </v-layout> |
384 | <v-layout> | 384 | <v-layout> |
385 | <v-flex xs5 sm6> | 385 | <v-flex xs5 sm6> |
386 | <h5 class="right my-1">Email:</h5> | 386 | <h5 class="right my-1">Email:</h5> |
387 | </v-flex> | 387 | </v-flex> |
388 | <v-flex sm6 xs8> | 388 | <v-flex sm6 xs8> |
389 | <h5 class="my-1">{{ editedItem.email }}</h5> | 389 | <h5 class="my-1">{{ editedItem.email }}</h5> |
390 | </v-flex> | 390 | </v-flex> |
391 | </v-layout> | 391 | </v-layout> |
392 | <v-layout> | 392 | <v-layout> |
393 | <v-flex xs5 sm6> | 393 | <v-flex xs5 sm6> |
394 | <h5 class="right my-1">City:</h5> | 394 | <h5 class="right my-1">City:</h5> |
395 | </v-flex> | 395 | </v-flex> |
396 | <v-flex sm6 xs8> | 396 | <v-flex sm6 xs8> |
397 | <h5 class="my-1">{{ editedItem.city }}</h5> | 397 | <h5 class="my-1">{{ editedItem.city }}</h5> |
398 | </v-flex> | 398 | </v-flex> |
399 | </v-layout> | 399 | </v-layout> |
400 | <v-layout> | 400 | <v-layout> |
401 | <v-flex xs5 sm6> | 401 | <v-flex xs5 sm6> |
402 | <h5 class="right my-1">State:</h5> | 402 | <h5 class="right my-1">State:</h5> |
403 | </v-flex> | 403 | </v-flex> |
404 | <v-flex sm6 xs8> | 404 | <v-flex sm6 xs8> |
405 | <h5 class="my-1">{{ editedItem.state }}</h5> | 405 | <h5 class="my-1">{{ editedItem.state }}</h5> |
406 | </v-flex> | 406 | </v-flex> |
407 | </v-layout> | 407 | </v-layout> |
408 | <v-layout> | 408 | <v-layout> |
409 | <v-flex xs5 sm6> | 409 | <v-flex xs5 sm6> |
410 | <h5 class="right my-1">Country:</h5> | 410 | <h5 class="right my-1">Country:</h5> |
411 | </v-flex> | 411 | </v-flex> |
412 | <v-flex sm6 xs8> | 412 | <v-flex sm6 xs8> |
413 | <h5 class="my-1">{{ editedItem.country }}</h5> | 413 | <h5 class="my-1">{{ editedItem.country }}</h5> |
414 | </v-flex> | 414 | </v-flex> |
415 | </v-layout> | 415 | </v-layout> |
416 | <v-layout> | 416 | <v-layout> |
417 | <v-flex xs5 sm6> | 417 | <v-flex xs5 sm6> |
418 | <h5 class="right my-1">Pincode:</h5> | 418 | <h5 class="right my-1">Pincode:</h5> |
419 | </v-flex> | 419 | </v-flex> |
420 | <v-flex sm6 xs8> | 420 | <v-flex sm6 xs8> |
421 | <h5 class="my-1">{{ editedItem.pincode }}</h5> | 421 | <h5 class="my-1">{{ editedItem.pincode }}</h5> |
422 | </v-flex> | 422 | </v-flex> |
423 | </v-layout> | 423 | </v-layout> |
424 | <v-layout> | 424 | <v-layout> |
425 | <v-flex xs5 sm6> | 425 | <v-flex xs5 sm6> |
426 | <h5 class="right my-1">Mobile No:</h5> | 426 | <h5 class="right my-1">Mobile No:</h5> |
427 | </v-flex> | 427 | </v-flex> |
428 | <v-flex sm6 xs8> | 428 | <v-flex sm6 xs8> |
429 | <h5 class="my-1">{{ editedItem.mobileNo }}</h5> | 429 | <h5 class="my-1">{{ editedItem.mobileNo }}</h5> |
430 | </v-flex> | 430 | </v-flex> |
431 | </v-layout> | 431 | </v-layout> |
432 | <v-layout> | 432 | <v-layout> |
433 | <v-flex xs5 sm6> | 433 | <v-flex xs5 sm6> |
434 | <h5 class="right my-1">Join Date:</h5> | 434 | <h5 class="right my-1">Join Date:</h5> |
435 | </v-flex> | 435 | </v-flex> |
436 | <v-flex sm6 xs8> | 436 | <v-flex sm6 xs8> |
437 | <h5 class="my-1">{{ editedItem.joinDate }}</h5> | 437 | <h5 class="my-1">{{ editedItem.joinDate }}</h5> |
438 | </v-flex> | 438 | </v-flex> |
439 | </v-layout> | 439 | </v-layout> |
440 | <v-layout> | 440 | <v-layout> |
441 | <v-flex xs5 sm6> | 441 | <v-flex xs5 sm6> |
442 | <h5 class="right my-1">Date Of Birth:</h5> | 442 | <h5 class="right my-1">Date Of Birth:</h5> |
443 | </v-flex> | 443 | </v-flex> |
444 | <v-flex sm6 xs8> | 444 | <v-flex sm6 xs8> |
445 | <h5 class="my-1">{{ editedItem.dob }}</h5> | 445 | <h5 class="my-1">{{ editedItem.dob }}</h5> |
446 | </v-flex> | 446 | </v-flex> |
447 | </v-layout> | 447 | </v-layout> |
448 | <v-layout> | 448 | <v-layout> |
449 | <v-flex xs6 sm6 > | 449 | <v-flex xs6 sm6 > |
450 | <h5 class="right my-1">Permanent Address:</h5> | 450 | <h5 class="right my-1">Permanent Address:</h5> |
451 | </v-flex> | 451 | </v-flex> |
452 | <v-flex sm6 xs8> | 452 | <v-flex sm6 xs8> |
453 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> | 453 | <h5 class="my-1">{{ editedItem.permanentAddress }}</h5> |
454 | </v-flex> | 454 | </v-flex> |
455 | </v-layout> | 455 | </v-layout> |
456 | <v-layout> | 456 | <v-layout> |
457 | <v-flex xs6 sm6 > | 457 | <v-flex xs6 sm6 > |
458 | <h5 class="right my-1">present Address:</h5> | 458 | <h5 class="right my-1">present Address:</h5> |
459 | </v-flex> | 459 | </v-flex> |
460 | <v-flex sm6 xs8> | 460 | <v-flex sm6 xs8> |
461 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> | 461 | <h5 class="my-1">{{ editedItem.presentAddress }}</h5> |
462 | </v-flex> | 462 | </v-flex> |
463 | </v-layout> | 463 | </v-layout> |
464 | </v-flex> | 464 | </v-flex> |
465 | </v-layout> | 465 | </v-layout> |
466 | </v-container> | 466 | </v-container> |
467 | </v-card-text> | 467 | </v-card-text> |
468 | </v-card> | 468 | </v-card> |
469 | </v-dialog> | 469 | </v-dialog> |
470 | <v-snackbar | 470 | <v-snackbar |
471 | :timeout="timeout" | 471 | :timeout="timeout" |
472 | :top="y === 'top'" | 472 | :top="y === 'top'" |
473 | :right="x === 'right'" | 473 | :right="x === 'right'" |
474 | :vertical="mode === 'vertical'" | 474 | :vertical="mode === 'vertical'" |
475 | v-model="snackbar" | 475 | v-model="snackbar" |
476 | color="success" | 476 | color="success" |
477 | >{{ text }}</v-snackbar> | 477 | >{{ text }}</v-snackbar> |
478 | 478 | ||
479 | <!-- ****** EXISTING-Teachers TABLE DATA****** --> | 479 | <!-- ****** EXISTING-Teachers TABLE DATA****** --> |
480 | <v-data-table | 480 | <v-data-table |
481 | :headers="headers" | 481 | :headers="headers" |
482 | :items="desserts" | 482 | :items="desserts" |
483 | :pagination.sync="pagination" | 483 | :pagination.sync="pagination" |
484 | :search="search" | 484 | :search="search" |
485 | > | 485 | > |
486 | <template slot="items" slot-scope="props"> | 486 | <template slot="items" slot-scope="props"> |
487 | <td id="td" class="text-xs-center">{{ props.index}}</td> | 487 | <td id="td" class="text-xs-center">{{ props.index}}</td> |
488 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> | 488 | <td id="td" class="text-xs-center">{{ props.item.name}}</td> |
489 | <td id="td" class="text-xs-center">{{ props.item.email }}</td> | 489 | <td id="td" class="text-xs-center">{{ props.item.email }}</td> |
490 | <td id="td" class="text-xs-center">{{ props.item.dob }}</td> | 490 | <td id="td" class="text-xs-center">{{ props.item.dob }}</td> |
491 | <td id="td" class="text-xs-center">{{ props.item.joinDate}}</td> | 491 | <td id="td" class="text-xs-center">{{ props.item.joinDate}}</td> |
492 | <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td> | 492 | <td id="td" class="text-xs-center">{{ props.item.mobileNo }}</td> |
493 | <td class="text-xs-center"> | 493 | <td class="text-xs-center"> |
494 | <span> | 494 | <span> |
495 | <img | 495 | <img |
496 | style="cursor:pointer; width:25px; height:18px; " | 496 | style="cursor:pointer; width:25px; height:18px; " |
497 | class="mr-5" | 497 | class="mr-5" |
498 | @click="profile(props.item)" | 498 | @click="profile(props.item)" |
499 | src="/static/icon/eye1.png" | 499 | src="/static/icon/eye1.png" |
500 | > | 500 | > |
501 | <img | 501 | <img |
502 | style="cursor:pointer; width:20px; height:18px; " | 502 | style="cursor:pointer; width:20px; height:18px; " |
503 | class="mr-5" | 503 | class="mr-5" |
504 | @click="editItem(props.item)" | 504 | @click="editItem(props.item)" |
505 | src="/static/icon/edit1.png" | 505 | src="/static/icon/edit1.png" |
506 | > | 506 | > |
507 | <img | 507 | <img |
508 | style="cursor:pointer; height:20px; " | 508 | style="cursor:pointer; height:20px; " |
509 | class="mr-5" | 509 | class="mr-5" |
510 | @click="deleteItem(props.item)" | 510 | @click="deleteItem(props.item)" |
511 | src="/static/icon/delete1.png" | 511 | src="/static/icon/delete1.png" |
512 | > | 512 | > |
513 | </span> | 513 | </span> |
514 | </td> | 514 | </td> |
515 | </template> | 515 | </template> |
516 | <v-alert | 516 | <v-alert |
517 | slot="no-results" | 517 | slot="no-results" |
518 | :value="true" | 518 | :value="true" |
519 | color="error" | 519 | color="error" |
520 | icon="warning" | 520 | icon="warning" |
521 | >Your search for "{{ search }}" found no results.</v-alert> | 521 | >Your search for "{{ search }}" found no results.</v-alert> |
522 | </v-data-table> | 522 | </v-data-table> |
523 | </v-tab-item> | 523 | </v-tab-item> |
524 | 524 | ||
525 | <!-- ****** Add Teachers Data****** --> | 525 | <!-- ****** Add Teachers Data****** --> |
526 | <v-tab-item> | 526 | <v-tab-item> |
527 | <v-container> | 527 | <v-container> |
528 | <v-snackbar | 528 | <v-snackbar |
529 | :timeout="timeout" | 529 | :timeout="timeout" |
530 | :top="y === 'top'" | 530 | :top="y === 'top'" |
531 | :right="x === 'right'" | 531 | :right="x === 'right'" |
532 | :vertical="mode === 'vertical'" | 532 | :vertical="mode === 'vertical'" |
533 | v-model="snackbar" | 533 | v-model="snackbar" |
534 | color="success" | 534 | color="success" |
535 | >{{ text }}</v-snackbar> | 535 | >{{ text }}</v-snackbar> |
536 | <v-flex xs12 sm12 class="my-4"> | 536 | <v-flex xs12 sm12 class="my-4"> |
537 | <v-card flat> | 537 | <v-card flat> |
538 | <v-form ref="form" v-model="valid" lazy-validation> | 538 | <v-form ref="form" v-model="valid" lazy-validation> |
539 | <v-container fluid> | 539 | <v-container fluid> |
540 | <v-layout> | 540 | <v-layout> |
541 | <v-flex | 541 | <v-flex |
542 | xs12 | 542 | xs12 |
543 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | 543 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" |
544 | > | 544 | > |
545 | <v-avatar size="100px"> | 545 | <v-avatar size="100px"> |
546 | <img src="/static/icon/user.png" v-if="!imageUrl"> | 546 | <img src="/static/icon/user.png" v-if="!imageUrl"> |
547 | </v-avatar> | 547 | </v-avatar> |
548 | <!-- <input | 548 | <!-- <input |
549 | type="file" | 549 | type="file" |
550 | style="display: none" | 550 | style="display: none" |
551 | ref="image" | 551 | ref="image" |
552 | accept="image/*" | 552 | accept="image/*" |
553 | @change="onFilePicked" | 553 | @change="onFilePicked" |
554 | > --> | 554 | > --> |
555 | <img | 555 | <img |
556 | :src="imageData.imageUrl" | 556 | :src="imageData.imageUrl" |
557 | height="150" | 557 | height="150" |
558 | v-if="imageUrl" | 558 | v-if="imageUrl" |
559 | style="border-radius:50%; width:200px" | 559 | style="border-radius:50%; width:200px" |
560 | > | 560 | > |
561 | </v-flex> | 561 | </v-flex> |
562 | </v-layout> | 562 | </v-layout> |
563 | <v-layout> | 563 | <v-layout> |
564 | <v-flex xs12 sm6> | 564 | <v-flex xs12 sm6> |
565 | <v-layout> | 565 | <v-layout> |
566 | <v-flex xs4 class="pt-4 subheading"> | 566 | <v-flex xs4 class="pt-4 subheading"> |
567 | <label class="right">Full Name:</label> | 567 | <label class="right">Full Name:</label> |
568 | </v-flex> | 568 | </v-flex> |
569 | <v-flex xs8 class="ml-3"> | 569 | <v-flex xs8 class="ml-3"> |
570 | <v-text-field | 570 | <v-text-field |
571 | v-model="addTeachers.name" | 571 | v-model="addTeachers.name" |
572 | placeholder="fill your full Name" | 572 | placeholder="fill your full Name" |
573 | name="name" | 573 | name="name" |
574 | type="text" | 574 | type="text" |
575 | :rules="nameRules" | 575 | :rules="nameRules" |
576 | required | 576 | required |
577 | ></v-text-field> | 577 | ></v-text-field> |
578 | </v-flex> | 578 | </v-flex> |
579 | </v-layout> | 579 | </v-layout> |
580 | </v-flex> | 580 | </v-flex> |
581 | <v-flex xs12 sm6> | 581 | <v-flex xs12 sm6> |
582 | <v-layout> | 582 | <v-layout> |
583 | <v-flex xs4 class="pt-4 subheading"> | 583 | <v-flex xs4 class="pt-4 subheading"> |
584 | <label class="right">Email ID:</label> | 584 | <label class="right">Email ID:</label> |
585 | </v-flex> | 585 | </v-flex> |
586 | <v-flex xs8 class="ml-3"> | 586 | <v-flex xs8 class="ml-3"> |
587 | <v-text-field | 587 | <v-text-field |
588 | placeholder="fill your email" | 588 | placeholder="fill your email" |
589 | :rules="emailRules" | 589 | :rules="emailRules" |
590 | v-model="addTeachers.email" | 590 | v-model="addTeachers.email" |
591 | type="text" | 591 | type="text" |
592 | name="email" | 592 | name="email" |
593 | required | 593 | required |
594 | ></v-text-field> | 594 | ></v-text-field> |
595 | </v-flex> | 595 | </v-flex> |
596 | </v-layout> | 596 | </v-layout> |
597 | </v-flex> | 597 | </v-flex> |
598 | </v-layout> | 598 | </v-layout> |
599 | <v-layout> | 599 | <v-layout> |
600 | <v-flex xs12 sm6> | 600 | <v-flex xs12 sm6> |
601 | <v-layout> | 601 | <v-layout> |
602 | <v-flex xs4 class="pt-4 subheading"> | 602 | <v-flex xs4 class="pt-4 subheading"> |
603 | <label class="right">Date of Birth:</label> | 603 | <label class="right">Date of Birth:</label> |
604 | </v-flex> | 604 | </v-flex> |
605 | <v-flex xs8 class="ml-3"> | 605 | <v-flex xs8 class="ml-3"> |
606 | <v-menu | 606 | <v-menu |
607 | ref="menu" | 607 | ref="menu" |
608 | :close-on-content-click="false" | 608 | :close-on-content-click="false" |
609 | v-model="menu" | 609 | v-model="menu" |
610 | :nudge-right="40" | 610 | :nudge-right="40" |
611 | lazy | 611 | lazy |
612 | transition="scale-transition" | 612 | transition="scale-transition" |
613 | offset-y | 613 | offset-y |
614 | full-width | 614 | full-width |
615 | min-width="290px" | 615 | min-width="290px" |
616 | > | 616 | > |
617 | <v-text-field | 617 | <v-text-field |
618 | slot="activator" | 618 | slot="activator" |
619 | :rules="dateRules" | 619 | :rules="dateRules" |
620 | v-model="addTeachers.date" | 620 | v-model="addTeachers.date" |
621 | placeholder="Select date" | 621 | placeholder="Select date" |
622 | ></v-text-field> | 622 | ></v-text-field> |
623 | <v-date-picker | 623 | <v-date-picker |
624 | ref="picker" | 624 | ref="picker" |
625 | v-model="addTeachers.date" | 625 | v-model="addTeachers.date" |
626 | :max="new Date().toISOString().substr(0, 10)" | 626 | :max="new Date().toISOString().substr(0, 10)" |
627 | min="1950-01-01" | 627 | min="1950-01-01" |
628 | @input="menu = false" | 628 | @input="menu = false" |
629 | ></v-date-picker> | 629 | ></v-date-picker> |
630 | </v-menu> | 630 | </v-menu> |
631 | </v-flex> | 631 | </v-flex> |
632 | </v-layout> | 632 | </v-layout> |
633 | </v-flex> | 633 | </v-flex> |
634 | <v-flex xs12 sm6> | 634 | <v-flex xs12 sm6> |
635 | <v-layout> | 635 | <v-layout> |
636 | <v-flex xs4 class="pt-4 subheading"> | 636 | <v-flex xs4 class="pt-4 subheading"> |
637 | <label class="right">City:</label> | 637 | <label class="right">City:</label> |
638 | </v-flex> | 638 | </v-flex> |
639 | <v-flex xs8 class="ml-3"> | 639 | <v-flex xs8 class="ml-3"> |
640 | <v-text-field | 640 | <v-text-field |
641 | v-model="addTeachers.city" | 641 | v-model="addTeachers.city" |
642 | placeholder="fill your City Name" | 642 | placeholder="fill your City Name" |
643 | name="City" | 643 | name="City" |
644 | type="text" | 644 | type="text" |
645 | :rules="cityRules" | 645 | :rules="cityRules" |
646 | required | 646 | required |
647 | ></v-text-field> | 647 | ></v-text-field> |
648 | </v-flex> | 648 | </v-flex> |
649 | </v-layout> | 649 | </v-layout> |
650 | </v-flex> | 650 | </v-flex> |
651 | </v-layout> | 651 | </v-layout> |
652 | <v-layout> | 652 | <v-layout> |
653 | <v-flex xs12 sm6> | 653 | <v-flex xs12 sm6> |
654 | <v-layout> | 654 | <v-layout> |
655 | <v-flex xs4 class="pt-4 subheading"> | 655 | <v-flex xs4 class="pt-4 subheading"> |
656 | <label class="right">State:</label> | 656 | <label class="right">State:</label> |
657 | </v-flex> | 657 | </v-flex> |
658 | <v-flex xs8 class="ml-3"> | 658 | <v-flex xs8 class="ml-3"> |
659 | <v-text-field | 659 | <v-text-field |
660 | v-model="addTeachers.state" | 660 | v-model="addTeachers.state" |
661 | placeholder="fill your State Name" | 661 | placeholder="fill your State Name" |
662 | name="state" | 662 | name="state" |
663 | type="text" | 663 | type="text" |
664 | :rules="stateRules" | 664 | :rules="stateRules" |
665 | required | 665 | required |
666 | ></v-text-field> | 666 | ></v-text-field> |
667 | </v-flex> | 667 | </v-flex> |
668 | </v-layout> | 668 | </v-layout> |
669 | </v-flex> | 669 | </v-flex> |
670 | <v-flex xs12 sm6> | 670 | <v-flex xs12 sm6> |
671 | <v-layout> | 671 | <v-layout> |
672 | <v-flex xs4 class="pt-4 subheading"> | 672 | <v-flex xs4 class="pt-4 subheading"> |
673 | <label class="right">PinCode:</label> | 673 | <label class="right">PinCode:</label> |
674 | </v-flex> | 674 | </v-flex> |
675 | <v-flex xs8 class="ml-3"> | 675 | <v-flex xs8 class="ml-3"> |
676 | <v-text-field | 676 | <v-text-field |
677 | v-model="addTeachers.pincode" | 677 | v-model="addTeachers.pincode" |
678 | placeholder="fill your pincode" | 678 | placeholder="fill your pincode" |
679 | name="pincode" | 679 | name="pincode" |
680 | type="number" | 680 | type="number" |
681 | :rules="pincode" | 681 | :rules="pincode" |
682 | required | 682 | required |
683 | ></v-text-field> | 683 | ></v-text-field> |
684 | </v-flex> | 684 | </v-flex> |
685 | </v-layout> | 685 | </v-layout> |
686 | </v-flex> | 686 | </v-flex> |
687 | </v-layout> | 687 | </v-layout> |
688 | <v-layout> | 688 | <v-layout> |
689 | <v-flex xs12 sm6> | 689 | <v-flex xs12 sm6> |
690 | <v-layout> | 690 | <v-layout> |
691 | <v-flex xs4 class="pt-4 subheading"> | 691 | <v-flex xs4 class="pt-4 subheading"> |
692 | <label class="right">Mobile NO:</label> | 692 | <label class="right">Mobile NO:</label> |
693 | </v-flex> | 693 | </v-flex> |
694 | <v-flex xs8 class="ml-3"> | 694 | <v-flex xs8 class="ml-3"> |
695 | <v-text-field | 695 | <v-text-field |
696 | v-model="addTeachers.mobileNo" | 696 | v-model="addTeachers.mobileNo" |
697 | placeholder="fill your MobileNo" | 697 | placeholder="fill your MobileNo" |
698 | name="mobileNo" | 698 | name="mobileNo" |
699 | type="number" | 699 | type="number" |
700 | :rules="mobileNoRules" | 700 | :rules="mobileNoRules" |
701 | required | 701 | required |
702 | ></v-text-field> | 702 | ></v-text-field> |
703 | </v-flex> | 703 | </v-flex> |
704 | </v-layout> | 704 | </v-layout> |
705 | </v-flex> | 705 | </v-flex> |
706 | <v-flex xs12 sm6> | 706 | <v-flex xs12 sm6> |
707 | <v-layout> | 707 | <v-layout> |
708 | <v-flex xs4 class="pt-4 subheading"> | 708 | <v-flex xs4 class="pt-4 subheading"> |
709 | <label class="right">Select Country:</label> | 709 | <label class="right">Select Country:</label> |
710 | </v-flex> | 710 | </v-flex> |
711 | <v-flex xs8 class="ml-3"> | 711 | <v-flex xs8 class="ml-3"> |
712 | <v-autocomplete | 712 | <v-autocomplete |
713 | v-model="addTeachers.country" | 713 | v-model="addTeachers.country" |
714 | :rules="country" | 714 | :rules="country" |
715 | :items="countries" | 715 | :items="countries" |
716 | placeholder="Select Country Name" | 716 | placeholder="Select Country Name" |
717 | required | 717 | required |
718 | ></v-autocomplete> | 718 | ></v-autocomplete> |
719 | </v-flex> | 719 | </v-flex> |
720 | </v-layout> | 720 | </v-layout> |
721 | </v-flex> | 721 | </v-flex> |
722 | </v-layout> | 722 | </v-layout> |
723 | <v-layout> | 723 | <v-layout> |
724 | <v-flex xs12 sm6> | 724 | <v-flex xs12 sm6> |
725 | <v-layout> | 725 | <v-layout> |
726 | <v-flex xs4 class="pt-4 subheading"> | 726 | <v-flex xs4 class="pt-4 subheading"> |
727 | <label class="right">Join Date</label> | 727 | <label class="right">Join Date</label> |
728 | </v-flex> | 728 | </v-flex> |
729 | <v-flex xs8 class="ml-3"> | 729 | <v-flex xs8 class="ml-3"> |
730 | <v-menu | 730 | <v-menu |
731 | ref="menu1" | 731 | ref="menu1" |
732 | :close-on-content-click="false" | 732 | :close-on-content-click="false" |
733 | v-model="menu1" | 733 | v-model="menu1" |
734 | :nudge-right="40" | 734 | :nudge-right="40" |
735 | lazy | 735 | lazy |
736 | transition="scale-transition" | 736 | transition="scale-transition" |
737 | offset-y | 737 | offset-y |
738 | full-width | 738 | full-width |
739 | min-width="290px" | 739 | min-width="290px" |
740 | > | 740 | > |
741 | <v-text-field | 741 | <v-text-field |
742 | slot="activator" | 742 | slot="activator" |
743 | :rules="joinDateRules" | 743 | :rules="joinDateRules" |
744 | v-model="addTeachers.joinDate" | 744 | v-model="addTeachers.joinDate" |
745 | placeholder="Select date" | 745 | placeholder="Select date" |
746 | ></v-text-field> | 746 | ></v-text-field> |
747 | <v-date-picker | 747 | <v-date-picker |
748 | ref="picker" | 748 | ref="picker" |
749 | v-model="addTeachers.joinDate" | 749 | v-model="addTeachers.joinDate" |
750 | :max="new Date().toISOString().substr(0, 10)" | 750 | :max="new Date().toISOString().substr(0, 10)" |
751 | min="1950-01-01" | 751 | min="1950-01-01" |
752 | @input="menu1 = false" | 752 | @input="menu1 = false" |
753 | ></v-date-picker> | 753 | ></v-date-picker> |
754 | </v-menu> | 754 | </v-menu> |
755 | </v-flex> | 755 | </v-flex> |
756 | </v-layout> | 756 | </v-layout> |
757 | </v-flex> | 757 | </v-flex> |
758 | <v-flex xs12 sm6> | 758 | <v-flex xs12 sm6> |
759 | <v-layout> | 759 | <v-layout> |
760 | <v-flex xs4 class="pt-4 subheading"> | 760 | <v-flex xs4 class="pt-4 subheading"> |
761 | <label class="right">Uplaod Image:</label> | 761 | <label class="right">Uplaod Image:</label> |
762 | </v-flex> | 762 | </v-flex> |
763 | <v-flex xs8 class="ml-3"> | 763 | <v-flex xs8 class="ml-3"> |
764 | <v-text-field | 764 | <v-text-field |
765 | label="Select Image" | 765 | label="Select Image" |
766 | @click="pickFile" | 766 | @click="pickFile" |
767 | v-model="imageName" | 767 | v-model="imageName" |
768 | prepend-icon="attach_file" | 768 | prepend-icon="attach_file" |
769 | ></v-text-field> | 769 | ></v-text-field> |
770 | <input | 770 | <input |
771 | type="file" | 771 | type="file" |
772 | style="display: none" | 772 | style="display: none" |
773 | ref="image" | 773 | ref="image" |
774 | accept="image/*" | 774 | accept="image/*" |
775 | @change="onFilePicked" | 775 | @change="onFilePicked" |
776 | > | 776 | > |
777 | </v-flex> | 777 | </v-flex> |
778 | </v-layout> | 778 | </v-layout> |
779 | </v-flex> | 779 | </v-flex> |
780 | </v-layout> | 780 | </v-layout> |
781 | <v-layout> | 781 | <v-layout> |
782 | <v-flex xs12 sm12> | 782 | <v-flex xs12 sm12> |
783 | <v-layout> | 783 | <v-layout> |
784 | <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> | 784 | <v-flex xs3 class="pt-4 subheading pl-4" style="max-width: 17%;"> |
785 | <label class>Present Address:</label> | 785 | <label class>Present Address:</label> |
786 | </v-flex> | 786 | </v-flex> |
787 | <v-flex xs12> | 787 | <v-flex xs12> |
788 | <v-text-field | 788 | <v-text-field |
789 | name="input-4-3" | 789 | name="input-4-3" |
790 | v-model="addTeachers.presentAddress" | 790 | v-model="addTeachers.presentAddress" |
791 | :rules="presentAddress" | 791 | :rules="presentAddress" |
792 | placeholder="fill Your present Address" | 792 | placeholder="fill Your present Address" |
793 | required | 793 | required |
794 | ></v-text-field> | 794 | ></v-text-field> |
795 | </v-flex> | 795 | </v-flex> |
796 | </v-layout> | 796 | </v-layout> |
797 | </v-flex> | 797 | </v-flex> |
798 | <v-flex xs12 sm12> | 798 | <v-flex xs12 sm12> |
799 | <v-layout> | 799 | <v-layout> |
800 | <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> | 800 | <v-flex xs3 class="pt-4 subheading" style="max-width: 17%;"> |
801 | <label>Permanent Address:</label> | 801 | <label>Permanent Address:</label> |
802 | </v-flex> | 802 | </v-flex> |
803 | <v-flex xs12> | 803 | <v-flex xs12> |
804 | <v-text-field | 804 | <v-text-field |
805 | name="input-4-3" | 805 | name="input-4-3" |
806 | v-model="addTeachers.permanentAddress" | 806 | v-model="addTeachers.permanentAddress" |
807 | :rules="permanentAddress" | 807 | :rules="permanentAddress" |
808 | placeholder="fill Your Permanent Address" | 808 | placeholder="fill Your Permanent Address" |
809 | required | 809 | required |
810 | ></v-text-field> | 810 | ></v-text-field> |
811 | </v-flex> | 811 | </v-flex> |
812 | </v-layout> | 812 | </v-layout> |
813 | </v-flex> | 813 | </v-flex> |
814 | </v-layout> | 814 | </v-layout> |
815 | <v-layout> | 815 | <v-layout> |
816 | <v-flex xs12 sm12> | 816 | <v-flex xs12 sm12> |
817 | <v-card-actions> | 817 | <v-card-actions> |
818 | <v-btn @click="clear" round dark>clear</v-btn> | 818 | <v-btn @click="clear" round dark>clear</v-btn> |
819 | <v-spacer></v-spacer> | 819 | <v-spacer></v-spacer> |
820 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | 820 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> |
821 | </v-card-actions> | 821 | </v-card-actions> |
822 | </v-flex> | 822 | </v-flex> |
823 | </v-layout> | 823 | </v-layout> |
824 | </v-container> | 824 | </v-container> |
825 | </v-form> | 825 | </v-form> |
826 | </v-card> | 826 | </v-card> |
827 | </v-flex> | 827 | </v-flex> |
828 | </v-container> | 828 | </v-container> |
829 | </v-tab-item> | 829 | </v-tab-item> |
830 | </v-tabs> | 830 | </v-tabs> |
831 | <div class="loader" v-if="showLoader"> | 831 | <div class="loader" v-if="showLoader"> |
832 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 832 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
833 | </div> | 833 | </div> |
834 | </v-app> | 834 | </v-app> |
835 | </template> | 835 | </template> |
836 | 836 | ||
837 | <script> | 837 | <script> |
838 | // import AppToolbar from '@/components/AppToolbar'; | 838 | // import AppToolbar from '@/components/AppToolbar'; |
839 | import http from "@/Services/http.js"; | 839 | import http from "@/Services/http.js"; |
840 | import Util from "@/util"; | 840 | import Util from "@/util"; |
841 | 841 | ||
842 | export default { | 842 | export default { |
843 | components: { | 843 | components: { |
844 | // "one-month": onemonth, | 844 | // "one-month": onemonth, |
845 | }, | 845 | }, |
846 | data: () => ({ | 846 | data: () => ({ |
847 | component: "report-generate", | 847 | component: "report-generate", |
848 | snackbar: false, | 848 | snackbar: false, |
849 | y: "top", | 849 | y: "top", |
850 | x: "right", | 850 | x: "right", |
851 | mode: "", | 851 | mode: "", |
852 | timeout: 3000, | 852 | timeout: 3000, |
853 | text: "", | 853 | text: "", |
854 | showLoader:false, | 854 | showLoader:false, |
855 | loading: false, | 855 | loading: false, |
856 | date: null, | 856 | date: null, |
857 | search: "", | 857 | search: "", |
858 | menu: false, | 858 | menu: false, |
859 | menu1: false, | 859 | menu1: false, |
860 | menu2: false, | 860 | menu2: false, |
861 | menu3: false, | 861 | menu3: false, |
862 | dialog: false, | 862 | dialog: false, |
863 | dialog1: false, | 863 | dialog1: false, |
864 | valid: true, | 864 | valid: true, |
865 | isActive: true, | 865 | isActive: true, |
866 | newActive: false, | 866 | newActive: false, |
867 | pagination: { | 867 | pagination: { |
868 | rowsPerPage: 15 | 868 | rowsPerPage: 15 |
869 | }, | 869 | }, |
870 | imageData: {}, | 870 | imageData: {}, |
871 | imageName: "", | 871 | imageName: "", |
872 | imageUrl: "", | 872 | imageUrl: "", |
873 | imageFile: "", | 873 | imageFile: "", |
874 | nameRules: [v => !!v || " Full Name is required"], | 874 | nameRules: [v => !!v || " Full Name is required"], |
875 | dateRules: [v => !!v || " DOB is required"], | 875 | dateRules: [v => !!v || " DOB is required"], |
876 | cityRules: [v => !!v || " City Name is required"], | 876 | cityRules: [v => !!v || " City Name is required"], |
877 | pincode: [v => !!v || " Pincode is required"], | 877 | pincode: [v => !!v || " Pincode is required"], |
878 | country: [v => !!v || " Country Name is required"], | 878 | country: [v => !!v || " Country Name is required"], |
879 | permanentAddress: [v => !!v || " Permanent Address is required"], | 879 | permanentAddress: [v => !!v || " Permanent Address is required"], |
880 | presentAddress: [v => !!v || " Present Address is required"], | 880 | presentAddress: [v => !!v || " Present Address is required"], |
881 | mobileNoRules: [v => !!v || "Mobile Number is required"], | 881 | mobileNoRules: [v => !!v || "Mobile Number is required"], |
882 | stateRules: [v => !!v || "State Name is required"], | 882 | stateRules: [v => !!v || "State Name is required"], |
883 | joinDateRules: [v => !!v || " Join Date is required"], | 883 | joinDateRules: [v => !!v || " Join Date is required"], |
884 | errorMessages: "", | 884 | errorMessages: "", |
885 | emailRules: [ | 885 | emailRules: [ |
886 | v => !!v || "E-mail is required", | 886 | v => !!v || "E-mail is required", |
887 | v => | 887 | v => |
888 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || | 888 | /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || |
889 | "E-mail must be valid" | 889 | "E-mail must be valid" |
890 | ], | 890 | ], |
891 | countries: [ | 891 | countries: [ |
892 | "Afghanistan", | 892 | "Afghanistan", |
893 | "Albania", | 893 | "Albania", |
894 | "Algeria", | 894 | "Algeria", |
895 | "Andorra", | 895 | "Andorra", |
896 | "Angola", | 896 | "Angola", |
897 | "Anguilla", | 897 | "Anguilla", |
898 | "Antigua & Barbuda", | 898 | "Antigua & Barbuda", |
899 | "Argentina", | 899 | "Argentina", |
900 | "Armenia", | 900 | "Armenia", |
901 | "Aruba", | 901 | "Aruba", |
902 | "Australia", | 902 | "Australia", |
903 | "Austria", | 903 | "Austria", |
904 | "Azerbaijan", | 904 | "Azerbaijan", |
905 | "Bahamas", | 905 | "Bahamas", |
906 | "Bahrain", | 906 | "Bahrain", |
907 | "Bangladesh", | 907 | "Bangladesh", |
908 | "Barbados", | 908 | "Barbados", |
909 | "Belarus", | 909 | "Belarus", |
910 | "Belgium", | 910 | "Belgium", |
911 | "Belize", | 911 | "Belize", |
912 | "Benin", | 912 | "Benin", |
913 | "Bermuda", | 913 | "Bermuda", |
914 | "Bhutan", | 914 | "Bhutan", |
915 | "Bolivia", | 915 | "Bolivia", |
916 | "Bosnia & Herzegovina", | 916 | "Bosnia & Herzegovina", |
917 | "Botswana", | 917 | "Botswana", |
918 | "Brazil", | 918 | "Brazil", |
919 | "British Virgin Islands", | 919 | "British Virgin Islands", |
920 | "Brunei", | 920 | "Brunei", |
921 | "Bulgaria", | 921 | "Bulgaria", |
922 | "Burkina Faso", | 922 | "Burkina Faso", |
923 | "Burundi", | 923 | "Burundi", |
924 | "Cambodia", | 924 | "Cambodia", |
925 | "Cameroon", | 925 | "Cameroon", |
926 | "Cape Verde", | 926 | "Cape Verde", |
927 | "Cayman Islands", | 927 | "Cayman Islands", |
928 | "Chad", | 928 | "Chad", |
929 | "Chile", | 929 | "Chile", |
930 | "China", | 930 | "China", |
931 | "Colombia", | 931 | "Colombia", |
932 | "Congo", | 932 | "Congo", |
933 | "Cook Islands", | 933 | "Cook Islands", |
934 | "Costa Rica", | 934 | "Costa Rica", |
935 | "Cote D Ivoire", | 935 | "Cote D Ivoire", |
936 | "Croatia", | 936 | "Croatia", |
937 | "Cruise Ship", | 937 | "Cruise Ship", |
938 | "Cuba", | 938 | "Cuba", |
939 | "Cyprus", | 939 | "Cyprus", |
940 | "Czech Republic", | 940 | "Czech Republic", |
941 | "Denmark", | 941 | "Denmark", |
942 | "Djibouti", | 942 | "Djibouti", |
943 | "Dominica", | 943 | "Dominica", |
944 | "Dominican Republic", | 944 | "Dominican Republic", |
945 | "Ecuador", | 945 | "Ecuador", |
946 | "Egypt", | 946 | "Egypt", |
947 | "El Salvador", | 947 | "El Salvador", |
948 | "Equatorial Guinea", | 948 | "Equatorial Guinea", |
949 | "Estonia", | 949 | "Estonia", |
950 | "Ethiopia", | 950 | "Ethiopia", |
951 | "Falkland Islands", | 951 | "Falkland Islands", |
952 | "Faroe Islands", | 952 | "Faroe Islands", |
953 | "Fiji", | 953 | "Fiji", |
954 | "Finland", | 954 | "Finland", |
955 | "France", | 955 | "France", |
956 | "French Polynesia", | 956 | "French Polynesia", |
957 | "French West Indies", | 957 | "French West Indies", |
958 | "Gabon", | 958 | "Gabon", |
959 | "Gambia", | 959 | "Gambia", |
960 | "Georgia", | 960 | "Georgia", |
961 | "Germany", | 961 | "Germany", |
962 | "Ghana", | 962 | "Ghana", |
963 | "Gibraltar", | 963 | "Gibraltar", |
964 | "Greece", | 964 | "Greece", |
965 | "Greenland", | 965 | "Greenland", |
966 | "Grenada", | 966 | "Grenada", |
967 | "Guam", | 967 | "Guam", |
968 | "Guatemala", | 968 | "Guatemala", |
969 | "Guernsey", | 969 | "Guernsey", |
970 | "Guinea", | 970 | "Guinea", |
971 | "Guinea Bissau", | 971 | "Guinea Bissau", |
972 | "Guyana", | 972 | "Guyana", |
973 | "Haiti", | 973 | "Haiti", |
974 | "Honduras", | 974 | "Honduras", |
975 | "Hong Kong", | 975 | "Hong Kong", |
976 | "Hungary", | 976 | "Hungary", |
977 | "Iceland", | 977 | "Iceland", |
978 | "India", | 978 | "India", |
979 | "Indonesia", | 979 | "Indonesia", |
980 | "Iran", | 980 | "Iran", |
981 | "Iraq", | 981 | "Iraq", |
982 | "Ireland", | 982 | "Ireland", |
983 | "Isle of Man", | 983 | "Isle of Man", |
984 | "Israel", | 984 | "Israel", |
985 | "Italy", | 985 | "Italy", |
986 | "Jamaica", | 986 | "Jamaica", |
987 | "Japan", | 987 | "Japan", |
988 | "Jersey", | 988 | "Jersey", |
989 | "Jordan", | 989 | "Jordan", |
990 | "Kazakhstan", | 990 | "Kazakhstan", |
991 | "Kenya", | 991 | "Kenya", |
992 | "Kuwait", | 992 | "Kuwait", |
993 | "Kyrgyz Republic", | 993 | "Kyrgyz Republic", |
994 | "Laos", | 994 | "Laos", |
995 | "Latvia", | 995 | "Latvia", |
996 | "Lebanon", | 996 | "Lebanon", |
997 | "Lesotho", | 997 | "Lesotho", |
998 | "Liberia", | 998 | "Liberia", |
999 | "Libya", | 999 | "Libya", |
1000 | "Liechtenstein", | 1000 | "Liechtenstein", |
1001 | "Lithuania", | 1001 | "Lithuania", |
1002 | "Luxembourg", | 1002 | "Luxembourg", |
1003 | "Macau", | 1003 | "Macau", |
1004 | "Macedonia", | 1004 | "Macedonia", |
1005 | "Madagascar", | 1005 | "Madagascar", |
1006 | "Malawi", | 1006 | "Malawi", |
1007 | "Malaysia", | 1007 | "Malaysia", |
1008 | "Maldives", | 1008 | "Maldives", |
1009 | "Mali", | 1009 | "Mali", |
1010 | "Malta", | 1010 | "Malta", |
1011 | "Mauritania", | 1011 | "Mauritania", |
1012 | "Mauritius", | 1012 | "Mauritius", |
1013 | "Mexico", | 1013 | "Mexico", |
1014 | "Moldova", | 1014 | "Moldova", |
1015 | "Monaco", | 1015 | "Monaco", |
1016 | "Mongolia", | 1016 | "Mongolia", |
1017 | "Montenegro", | 1017 | "Montenegro", |
1018 | "Montserrat", | 1018 | "Montserrat", |
1019 | "Morocco", | 1019 | "Morocco", |
1020 | "Mozambique", | 1020 | "Mozambique", |
1021 | "Namibia", | 1021 | "Namibia", |
1022 | "Nepal", | 1022 | "Nepal", |
1023 | "Netherlands", | 1023 | "Netherlands", |
1024 | "Netherlands Antilles", | 1024 | "Netherlands Antilles", |
1025 | "New Caledonia", | 1025 | "New Caledonia", |
1026 | "New Zealand", | 1026 | "New Zealand", |
1027 | "Nicaragua", | 1027 | "Nicaragua", |
1028 | "Niger", | 1028 | "Niger", |
1029 | "Nigeria", | 1029 | "Nigeria", |
1030 | "Norway", | 1030 | "Norway", |
1031 | "Oman", | 1031 | "Oman", |
1032 | "Pakistan", | 1032 | "Pakistan", |
1033 | "Palestine", | 1033 | "Palestine", |
1034 | "Panama", | 1034 | "Panama", |
1035 | "Papua New Guinea", | 1035 | "Papua New Guinea", |
1036 | "Paraguay", | 1036 | "Paraguay", |
1037 | "Peru", | 1037 | "Peru", |
1038 | "Philippines", | 1038 | "Philippines", |
1039 | "Poland", | 1039 | "Poland", |
1040 | "Portugal", | 1040 | "Portugal", |
1041 | "Puerto Rico", | 1041 | "Puerto Rico", |
1042 | "Qatar", | 1042 | "Qatar", |
1043 | "Reunion", | 1043 | "Reunion", |
1044 | "Romania", | 1044 | "Romania", |
1045 | "Russia", | 1045 | "Russia", |
1046 | "Rwanda", | 1046 | "Rwanda", |
1047 | "Saint Pierre & Miquelon", | 1047 | "Saint Pierre & Miquelon", |
1048 | "Samoa", | 1048 | "Samoa", |
1049 | "San Marino", | 1049 | "San Marino", |
1050 | "Satellite", | 1050 | "Satellite", |
1051 | "Saudi Arabia", | 1051 | "Saudi Arabia", |
1052 | "Senegal", | 1052 | "Senegal", |
1053 | "Serbia", | 1053 | "Serbia", |
1054 | "Seychelles", | 1054 | "Seychelles", |
1055 | "Sierra Leone", | 1055 | "Sierra Leone", |
1056 | "Singapore", | 1056 | "Singapore", |
1057 | "Slovakia", | 1057 | "Slovakia", |
1058 | "Slovenia", | 1058 | "Slovenia", |
1059 | "South Africa", | 1059 | "South Africa", |
1060 | "South Korea", | 1060 | "South Korea", |
1061 | "Spain", | 1061 | "Spain", |
1062 | "Sri Lanka", | 1062 | "Sri Lanka", |
1063 | "St Kitts & Nevis", | 1063 | "St Kitts & Nevis", |
1064 | "St Lucia", | 1064 | "St Lucia", |
1065 | "St Vincent", | 1065 | "St Vincent", |
1066 | "St. Lucia", | 1066 | "St. Lucia", |
1067 | "Sudan", | 1067 | "Sudan", |
1068 | "Suriname", | 1068 | "Suriname", |
1069 | "Swaziland", | 1069 | "Swaziland", |
1070 | "Sweden", | 1070 | "Sweden", |
1071 | "Switzerland", | 1071 | "Switzerland", |
1072 | "Syria", | 1072 | "Syria", |
1073 | "Taiwan", | 1073 | "Taiwan", |
1074 | "Tajikistan", | 1074 | "Tajikistan", |
1075 | "Tanzania", | 1075 | "Tanzania", |
1076 | "Thailand", | 1076 | "Thailand", |
1077 | "Timor L'Este", | 1077 | "Timor L'Este", |
1078 | "Togo", | 1078 | "Togo", |
1079 | "Tonga", | 1079 | "Tonga", |
1080 | "Trinidad & Tobago", | 1080 | "Trinidad & Tobago", |
1081 | "Tunisia", | 1081 | "Tunisia", |
1082 | "Turkey", | 1082 | "Turkey", |
1083 | "Turkmenistan", | 1083 | "Turkmenistan", |
1084 | "Turks & Caicos", | 1084 | "Turks & Caicos", |
1085 | "Uganda", | 1085 | "Uganda", |
1086 | "Ukraine", | 1086 | "Ukraine", |
1087 | "United Arab Emirates", | 1087 | "United Arab Emirates", |
1088 | "United Kingdom", | 1088 | "United Kingdom", |
1089 | "United States", | 1089 | "United States", |
1090 | "Uruguay", | 1090 | "Uruguay", |
1091 | "Uzbekistan", | 1091 | "Uzbekistan", |
1092 | "Venezuela", | 1092 | "Venezuela", |
1093 | "Vietnam", | 1093 | "Vietnam", |
1094 | "Virgin Islands (US)", | 1094 | "Virgin Islands (US)", |
1095 | "Yemen", | 1095 | "Yemen", |
1096 | "Zambia", | 1096 | "Zambia", |
1097 | "Zimbabwe" | 1097 | "Zimbabwe" |
1098 | ], | 1098 | ], |
1099 | headers: [ | 1099 | headers: [ |
1100 | { | 1100 | { |
1101 | text: "No", | 1101 | text: "No", |
1102 | align: "center", | 1102 | align: "center", |
1103 | sortable: false, | 1103 | sortable: false, |
1104 | value: "No" | 1104 | value: "No" |
1105 | }, | 1105 | }, |
1106 | { text: "Name", value: "name", sortable: false, align: "center" }, | 1106 | { text: "Name", value: "name", sortable: false, align: "center" }, |
1107 | { text: "Email", value: "email", sortable: false, align: "center" }, | 1107 | { text: "Email", value: "email", sortable: false, align: "center" }, |
1108 | { text: "DOB", value: "dob", sortable: false, align: "center" }, | 1108 | { text: "DOB", value: "dob", sortable: false, align: "center" }, |
1109 | { text: "Join Date", value: "joinDate", sortable: false, align: "center" }, | 1109 | { text: "Join Date", value: "joinDate", sortable: false, align: "center" }, |
1110 | { text: "Mobile No", value: "mobileNo", sortable: false, align: "center" }, | 1110 | { text: "Mobile No", value: "mobileNo", sortable: false, align: "center" }, |
1111 | { text: "Action", value: "", sortable: false, align: "center" } | 1111 | { text: "Action", value: "", sortable: false, align: "center" } |
1112 | ], | 1112 | ], |
1113 | desserts: [], | 1113 | desserts: [], |
1114 | editedIndex: -1, | 1114 | editedIndex: -1, |
1115 | upload:'', | 1115 | upload:'', |
1116 | editedItem: { | 1116 | editedItem: { |
1117 | role: "TEACHER", | 1117 | role: "TEACHER", |
1118 | name: "", | 1118 | name: "", |
1119 | email: "", | 1119 | email: "", |
1120 | date: null, | 1120 | date: null, |
1121 | city: "", | 1121 | city: "", |
1122 | pincode: "", | 1122 | pincode: "", |
1123 | country: "", | 1123 | country: "", |
1124 | permanentAddress: "", | 1124 | permanentAddress: "", |
1125 | presentAddress: "", | 1125 | presentAddress: "", |
1126 | mobileNo: "", | 1126 | mobileNo: "", |
1127 | state: "", | 1127 | state: "", |
1128 | joinDate: null | 1128 | joinDate: null |
1129 | }, | 1129 | }, |
1130 | addTeachers: { | 1130 | addTeachers: { |
1131 | role: "TEACHER", | 1131 | role: "TEACHER", |
1132 | name: "", | 1132 | name: "", |
1133 | email: "", | 1133 | email: "", |
1134 | date: null, | 1134 | date: null, |
1135 | city: "", | 1135 | city: "", |
1136 | pincode: "", | 1136 | pincode: "", |
1137 | country: "", | 1137 | country: "", |
1138 | permanentAddress: "", | 1138 | permanentAddress: "", |
1139 | presentAddress: "", | 1139 | presentAddress: "", |
1140 | mobileNo: "", | 1140 | mobileNo: "", |
1141 | state: "", | 1141 | state: "", |
1142 | joinDate: null | 1142 | joinDate: null |
1143 | }, | 1143 | }, |
1144 | defaultItem: { | 1144 | defaultItem: { |
1145 | role: "TEACHER", | 1145 | role: "TEACHER", |
1146 | name: "", | 1146 | name: "", |
1147 | email: "" | 1147 | email: "" |
1148 | }, | 1148 | }, |
1149 | userName: "", | 1149 | userName: "", |
1150 | items: [ | 1150 | items: [ |
1151 | { | 1151 | { |
1152 | href: "/changepassword", | 1152 | href: "/changepassword", |
1153 | title: "Change Password", | 1153 | title: "Change Password", |
1154 | click: e => { | 1154 | click: e => { |
1155 | console.log(e); | 1155 | console.log(e); |
1156 | } | 1156 | } |
1157 | }, | 1157 | }, |
1158 | { | 1158 | { |
1159 | href: "#", | 1159 | href: "#", |
1160 | title: "Logout", | 1160 | title: "Logout", |
1161 | click: e => { | 1161 | click: e => { |
1162 | window.getApp.$emit("APP_LOGOUT"); | 1162 | window.getApp.$emit("APP_LOGOUT"); |
1163 | } | 1163 | } |
1164 | } | 1164 | } |
1165 | ] | 1165 | ] |
1166 | }), | 1166 | }), |
1167 | watch: { | 1167 | watch: { |
1168 | menu(val) { | 1168 | menu(val) { |
1169 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 1169 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
1170 | }, | 1170 | }, |
1171 | menu1(val) { | 1171 | menu1(val) { |
1172 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | 1172 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); |
1173 | } | 1173 | } |
1174 | }, | 1174 | }, |
1175 | methods: { | 1175 | methods: { |
1176 | save (date) { | 1176 | save (date) { |
1177 | this.$refs.menu.save(date) | 1177 | this.$refs.menu.save(date) |
1178 | }, | 1178 | }, |
1179 | save (date) { | 1179 | save (date) { |
1180 | this.$refs.menu1.save(date) | 1180 | this.$refs.menu1.save(date) |
1181 | }, | 1181 | }, |
1182 | pickFile() { | 1182 | pickFile() { |
1183 | this.$refs.image.click(); | 1183 | this.$refs.image.click(); |
1184 | }, | 1184 | }, |
1185 | 1185 | ||
1186 | onFilePicked(e) { | 1186 | onFilePicked(e) { |
1187 | // console.log(e) | 1187 | // console.log(e) |
1188 | const files = e.target.files; | 1188 | const files = e.target.files; |
1189 | this.upload = e.target.files[0]; | 1189 | this.upload = e.target.files[0]; |
1190 | console.log("imageData-upload========>",this.upload) | 1190 | console.log("imageData-upload========>",this.upload) |
1191 | if (files[0] !== undefined) { | 1191 | if (files[0] !== undefined) { |
1192 | this.imageName = files[0].name; | 1192 | this.imageName = files[0].name; |
1193 | if (this.imageName.lastIndexOf(".") <= 0) { | 1193 | if (this.imageName.lastIndexOf(".") <= 0) { |
1194 | return; | 1194 | return; |
1195 | } | 1195 | } |
1196 | const fr = new FileReader(); | 1196 | const fr = new FileReader(); |
1197 | fr.readAsDataURL(files[0]); | 1197 | fr.readAsDataURL(files[0]); |
1198 | fr.addEventListener("load", () => { | 1198 | fr.addEventListener("load", () => { |
1199 | this.imageUrl = fr.result; | 1199 | this.imageUrl = fr.result; |
1200 | this.imageFile = files[0]; // this is an image file that can be sent to server... | 1200 | this.imageFile = files[0]; // this is an image file that can be sent to server... |
1201 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | 1201 | // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); |
1202 | // console.log("upload=======>", this.imageData.imageUrl); | 1202 | // console.log("upload=======>", this.imageData.imageUrl); |
1203 | console.log("imageFile", this.imageFile); | 1203 | console.log("imageFile", this.imageFile); |
1204 | }); | 1204 | }); |
1205 | } else { | 1205 | } else { |
1206 | this.imageName = ""; | 1206 | this.imageName = ""; |
1207 | this.imageFile = ""; | 1207 | this.imageFile = ""; |
1208 | this.imageUrl = ""; | 1208 | this.imageUrl = ""; |
1209 | } | 1209 | } |
1210 | }, | 1210 | }, |
1211 | getTeacherList() { | 1211 | getTeacherList() { |
1212 | this.showLoader = true; | 1212 | this.showLoader = true; |
1213 | var token = this.$store.state.token; | 1213 | var token = this.$store.state.token; |
1214 | http() | 1214 | http() |
1215 | .get("/getTeachersList", { | 1215 | .get("/getTeachersList", { |
1216 | headers: { Authorization: "Bearer " + token } | 1216 | headers: { Authorization: "Bearer " + token } |
1217 | }) | 1217 | }) |
1218 | .then(response => { | 1218 | .then(response => { |
1219 | this.desserts = response.data.data; | 1219 | this.desserts = response.data.data; |
1220 | this.showLoader = false; | 1220 | this.showLoader = false; |
1221 | // console.log("getTeacherList=====>",this.desserts) | 1221 | // console.log("getTeacherList=====>",this.desserts) |
1222 | }) | 1222 | }) |
1223 | .catch(err => { | 1223 | .catch(err => { |
1224 | // console.log("err====>", err); | 1224 | // console.log("err====>", err); |
1225 | this.showLoader = false; | 1225 | this.showLoader = false; |
1226 | this.$router.replace({ path: "/" }); | 1226 | this.$router.replace({ path: "/" }); |
1227 | }); | 1227 | }); |
1228 | }, | 1228 | }, |
1229 | editItem(item) { | 1229 | editItem(item) { |
1230 | this.editedIndex = this.desserts.indexOf(item); | 1230 | this.editedIndex = this.desserts.indexOf(item); |
1231 | this.editedItem = Object.assign({}, item); | 1231 | this.editedItem = Object.assign({}, item); |
1232 | this.dialog = true; | 1232 | this.dialog = true; |
1233 | }, | 1233 | }, |
1234 | profile(item) { | 1234 | profile(item) { |
1235 | this.editedIndex = this.desserts.indexOf(item); | 1235 | this.editedIndex = this.desserts.indexOf(item); |
1236 | this.editedItem = Object.assign({}, item); | 1236 | this.editedItem = Object.assign({}, item); |
1237 | this.dialog1 = true; | 1237 | this.dialog1 = true; |
1238 | }, | 1238 | }, |
1239 | deleteItem(item) { | 1239 | deleteItem(item) { |
1240 | let deleteTeachers = { | 1240 | let deleteTeachers = { |
1241 | teacherId: item._id | 1241 | teacherId: item._id |
1242 | }; | 1242 | }; |
1243 | // console.log("deleteUers",deleteTeachers) | 1243 | // console.log("deleteUers",deleteTeachers) |
1244 | http() | 1244 | http() |
1245 | .delete( | 1245 | .delete( |
1246 | "/deleteTeacher", | 1246 | "/deleteTeacher", |
1247 | confirm("Are you sure you want to delete this?") && { | 1247 | confirm("Are you sure you want to delete this?") && { |
1248 | params: deleteTeachers | 1248 | params: deleteTeachers |
1249 | } | 1249 | } |
1250 | ) | 1250 | ) |
1251 | .then(response => { | 1251 | .then(response => { |
1252 | // console.log("deleteUers",deleteTeachers) | 1252 | // console.log("deleteUers",deleteTeachers) |
1253 | if ((this.snackbar = true)) { | 1253 | if ((this.snackbar = true)) { |
1254 | this.text = "Successfully delete Existing User"; | 1254 | this.text = "Successfully delete Existing User"; |
1255 | } | 1255 | } |
1256 | this.getTeacherList(); | 1256 | this.getTeacherList(); |
1257 | }) | 1257 | }) |
1258 | .catch(error => { | 1258 | .catch(error => { |
1259 | console.log(error); | 1259 | console.log(error); |
1260 | }); | 1260 | }); |
1261 | }, | 1261 | }, |
1262 | activeTab(type) { | 1262 | activeTab(type) { |
1263 | switch (type) { | 1263 | switch (type) { |
1264 | case "existing": | 1264 | case "existing": |
1265 | this.newActive = false; | 1265 | this.newActive = false; |
1266 | this.isActive = true; | 1266 | this.isActive = true; |
1267 | break; | 1267 | break; |
1268 | 1268 | ||
1269 | default: | 1269 | default: |
1270 | this.newActive = true; | 1270 | this.newActive = true; |
1271 | this.isActive = false; | 1271 | this.isActive = false; |
1272 | break; | 1272 | break; |
1273 | } | 1273 | } |
1274 | }, | 1274 | }, |
1275 | close() { | 1275 | close() { |
1276 | this.dialog = false; | 1276 | this.dialog = false; |
1277 | setTimeout(() => { | 1277 | setTimeout(() => { |
1278 | this.editedItem = Object.assign({}, this.defaultItem); | 1278 | this.editedItem = Object.assign({}, this.defaultItem); |
1279 | this.editedIndex = -1; | 1279 | this.editedIndex = -1; |
1280 | }, 300); | 1280 | }, 300); |
1281 | }, | 1281 | }, |
1282 | close1() { | 1282 | close1() { |
1283 | this.dialog1 = false; | 1283 | this.dialog1 = false; |
1284 | }, | 1284 | }, |
1285 | // close2() { | 1285 | // close2() { |
1286 | // this.dialog2 = false; | 1286 | // this.dialog2 = false; |
1287 | // }, | 1287 | // }, |
1288 | submit() { | 1288 | submit() { |
1289 | if (this.$refs.form.validate()) { | 1289 | if (this.$refs.form.validate()) { |
1290 | let images = new FormData(); | 1290 | let images = new FormData(); |
1291 | images.append("upload", this.imageFile); | 1291 | images.append("upload", this.imageFile); |
1292 | console.log(images); | 1292 | console.log(images); |
1293 | // var form_data = new FormData(); | 1293 | // var form_data = new FormData(); |
1294 | // for (var key in addTeacher) { | 1294 | // for (var key in addTeacher) { |
1295 | // if (key === 'upload') { | 1295 | // if (key === 'upload') { |
1296 | // form_data.append(key, this.imageFile); | 1296 | // form_data.append(key, this.imageFile); |
1297 | // } else { | 1297 | // } else { |
1298 | // form_data.append(key, addTeacher[key]) | 1298 | // form_data.append(key, addTeacher[key]) |
1299 | // } | 1299 | // } |
1300 | // } | 1300 | // } |
1301 | console.log("images",images) | 1301 | console.log("images",images) |
1302 | let addTeacher = { | 1302 | let addTeacher = { |
1303 | name: this.addTeachers.name, | 1303 | name: this.addTeachers.name, |
1304 | email: this.addTeachers.email, | 1304 | email: this.addTeachers.email, |
1305 | role: this.addTeachers.role, | 1305 | role: this.addTeachers.role, |
1306 | dob: this.addTeachers.date, | 1306 | dob: this.addTeachers.date, |
1307 | city: this.addTeachers.city, | 1307 | city: this.addTeachers.city, |
1308 | pincode: this.addTeachers.pincode, | 1308 | pincode: this.addTeachers.pincode, |
1309 | country: this.addTeachers.country, | 1309 | country: this.addTeachers.country, |
1310 | permanentAddress: this.addTeachers.permanentAddress, | 1310 | permanentAddress: this.addTeachers.permanentAddress, |
1311 | presentAddress: this.addTeachers.presentAddress, | 1311 | presentAddress: this.addTeachers.presentAddress, |
1312 | mobileNo: this.addTeachers.mobileNo, | 1312 | mobileNo: this.addTeachers.mobileNo, |
1313 | state: this.addTeachers.state, | 1313 | state: this.addTeachers.state, |
1314 | joinDate: this.addTeachers.joinDate, | 1314 | joinDate: this.addTeachers.joinDate, |
1315 | images | 1315 | images |
1316 | // upload:this.imageFile | 1316 | // upload:this.imageFile |
1317 | }; | 1317 | }; |
1318 | // console.log("addTeacher============>", addTeacher); | 1318 | // console.log("addTeacher============>", addTeacher); |
1319 | http() | 1319 | http() |
1320 | .post("/createTeacher", addTeacher) | 1320 | .post("/createTeacher", addTeacher) |
1321 | .then(response => { | 1321 | .then(response => { |
1322 | console.log("addTeacher", addTeacher); | 1322 | console.log("addTeacher", addTeacher); |
1323 | this.getTeacherList(); | 1323 | this.getTeacherList(); |
1324 | if ((this.snackbar = true)) { | 1324 | if ((this.snackbar = true)) { |
1325 | this.text = "New user added successfully"; | 1325 | this.text = "New user added successfully"; |
1326 | } | 1326 | } |
1327 | 1327 | ||
1328 | this.clear(); | 1328 | this.clear(); |
1329 | }) | 1329 | }) |
1330 | .catch(error => { | 1330 | .catch(error => { |
1331 | // console.log(error); | 1331 | // console.log(error); |
1332 | if ((this.snackbar = true)) { | 1332 | if ((this.snackbar = true)) { |
1333 | this.text = error.response.data.message; | 1333 | this.text = error.response.data.message; |
1334 | } | 1334 | } |
1335 | }); | 1335 | }); |
1336 | } | 1336 | } |
1337 | }, | 1337 | }, |
1338 | mail() {}, | 1338 | mail() {}, |
1339 | download() {}, | 1339 | download() {}, |
1340 | clear() { | 1340 | clear() { |
1341 | this.$refs.form.reset(); | 1341 | this.$refs.form.reset(); |
1342 | }, | 1342 | }, |
1343 | save() { | 1343 | save() { |
1344 | let editTeacher = { | 1344 | let editTeacher = { |
1345 | teacherId: this.editedItem._id, | 1345 | teacherId: this.editedItem._id, |
1346 | name: this.editedItem.name, | 1346 | name: this.editedItem.name, |
1347 | email: this.editedItem.email, | 1347 | email: this.editedItem.email, |
1348 | role: this.editedItem.role, | 1348 | role: this.editedItem.role, |
1349 | dob: this.editedItem.date, | 1349 | dob: this.editedItem.date, |
1350 | city: this.editedItem.city, | 1350 | city: this.editedItem.city, |
1351 | pincode: this.editedItem.pincode, | 1351 | pincode: this.editedItem.pincode, |
1352 | country: this.editedItem.country, | 1352 | country: this.editedItem.country, |
1353 | permanentAddress: this.editedItem.permanentAddress, | 1353 | permanentAddress: this.editedItem.permanentAddress, |
1354 | presentAddress: this.editedItem.presentAddress, | 1354 | presentAddress: this.editedItem.presentAddress, |
1355 | mobileNo: this.editedItem.mobileNo, | 1355 | mobileNo: this.editedItem.mobileNo, |
1356 | state: this.editedItem.state, | 1356 | state: this.editedItem.state, |
1357 | joinDate: this.editedItem.joinDate, | 1357 | joinDate: this.editedItem.joinDate, |
1358 | // imageData, | 1358 | // imageData, |
1359 | }; | 1359 | }; |
1360 | http() | 1360 | http() |
1361 | .put("/updateTeacher", editTeacher) | 1361 | .put("/updateTeacher", editTeacher) |
1362 | .then(response => { | 1362 | .then(response => { |
1363 | console.log("editTeacher",editTeacher); | 1363 | console.log("editTeacher",editTeacher); |
1364 | if ((this.snackbar = true)) { | 1364 | if ((this.snackbar = true)) { |
1365 | this.text = "Successfully Edit Existing User"; | 1365 | this.text = "Successfully Edit Existing User"; |
1366 | } | 1366 | } |
1367 | this.getTeacherList(); | 1367 | this.getTeacherList(); |
1368 | }) | 1368 | }) |
1369 | .catch(error => { | 1369 | .catch(error => { |
1370 | console.log(error); | 1370 | console.log(error); |
1371 | }); | 1371 | }); |
1372 | this.close(); | 1372 | this.close(); |
1373 | }, | 1373 | }, |
1374 | handleDrawerToggle() { | 1374 | handleDrawerToggle() { |
1375 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | 1375 | window.getApp.$emit("APP_DRAWER_TOGGLED"); |
1376 | }, | 1376 | }, |
1377 | handleFullScreen() { | 1377 | handleFullScreen() { |
1378 | Util.toggleFullScreen(); | 1378 | Util.toggleFullScreen(); |
1379 | } | 1379 | } |
1380 | }, | 1380 | }, |
1381 | mounted() { | 1381 | mounted() { |
1382 | this.getTeacherList(); | 1382 | this.getTeacherList(); |
1383 | // console.log("Id",this.$store.state.id) | 1383 | // console.log("Id",this.$store.state.id) |
1384 | // console.log("token",this.$store.state.token) | 1384 | // console.log("token",this.$store.state.token) |
1385 | }, | 1385 | }, |
1386 | computed: { | 1386 | computed: { |
1387 | toolbarColor() { | 1387 | toolbarColor() { |
1388 | return this.$vuetify.options.extra.mainNav; | 1388 | return this.$vuetify.options.extra.mainNav; |
1389 | } | 1389 | } |
1390 | } | 1390 | } |
1391 | }; | 1391 | }; |
1392 | </script> | 1392 | </script> |
1393 | <style scoped> | 1393 | <style scoped> |
1394 | .v-tabs__div { | 1394 | .v-tabs__div { |
1395 | text-transform: none; | 1395 | text-transform: none; |
1396 | } | 1396 | } |
1397 | .v-input__prepend-outer { | 1397 | .v-input__prepend-outer { |
1398 | margin-right: 0px !important; | 1398 | margin-right: 0px !important; |
1399 | } | 1399 | } |
1400 | .v-card__actions .v-btn { | 1400 | .v-card__actions .v-btn { |
1401 | margin: 0 15px; | 1401 | margin: 0 15px; |
1402 | min-width: 120px; | 1402 | min-width: 120px; |
1403 | } | 1403 | } |
1404 | .primary { | 1404 | .primary { |
1405 | background-color: #aaa !important; | 1405 | background-color: #aaa !important; |
1406 | border-color: #aaa !important; | 1406 | border-color: #aaa !important; |
1407 | } | 1407 | } |
1408 | h4 { | 1408 | h4 { |
1409 | background-repeat: no-repeat; | 1409 | background-repeat: no-repeat; |
1410 | padding: 8px; | 1410 | padding: 8px; |
1411 | margin: auto; | 1411 | margin: auto; |
1412 | font-size: 25px; | 1412 | font-size: 25px; |
1413 | } | 1413 | } |
1414 | #name { | 1414 | #name { |
1415 | position: absolute; | 1415 | position: absolute; |
1416 | left: 100px; | 1416 | left: 100px; |
1417 | top: 17px; | 1417 | top: 17px; |
1418 | } | 1418 | } |
1419 | #icon { | 1419 | #icon { |
1420 | position: absolute; | 1420 | position: absolute; |
1421 | right: 8px; | 1421 | right: 8px; |
1422 | top: 8px; | 1422 | top: 8px; |
1423 | } | 1423 | } |
1424 | #m { | 1424 | #m { |
1425 | position: relative; | 1425 | position: relative; |
1426 | left: 135px; | 1426 | left: 135px; |
1427 | top: -15px; | 1427 | top: -15px; |
1428 | } | 1428 | } |
1429 | #G { | 1429 | #G { |
1430 | position: absolute; | 1430 | position: absolute; |
1431 | top: 38px; | 1431 | top: 38px; |
1432 | color: white; | 1432 | color: white; |
1433 | } | 1433 | } |
1434 | #bt { | 1434 | #bt { |
1435 | position: relative; | 1435 | position: relative; |
1436 | top: -20px; | 1436 | top: -20px; |
1437 | left: 115px; | 1437 | left: 115px; |
1438 | } | 1438 | } |
1439 | #e { | 1439 | #e { |
1440 | position: relative; | 1440 | position: relative; |
1441 | top: 5px; | 1441 | top: 5px; |
1442 | right: -30px; | 1442 | right: -30px; |
1443 | height: 17px; | 1443 | height: 17px; |
1444 | cursor: pointer; | 1444 | cursor: pointer; |
1445 | } | 1445 | } |
1446 | #d { | 1446 | #d { |
1447 | position: relative; | 1447 | position: relative; |
1448 | top: 5px; | 1448 | top: 5px; |
1449 | right: -70px; | 1449 | right: -70px; |
1450 | height: 17px; | 1450 | height: 17px; |
1451 | cursor: pointer; | 1451 | cursor: pointer; |
1452 | } | 1452 | } |
1453 | #td { | 1453 | #td { |
1454 | border: 1px solid #dddddd; | 1454 | border: 1px solid #dddddd; |
1455 | text-align: left; | 1455 | text-align: left; |
1456 | padding: 8px; | 1456 | padding: 8px; |
1457 | } | 1457 | } |
1458 | #dialog { | 1458 | #dialog { |
1459 | height: 550px; | 1459 | height: 550px; |
1460 | } | 1460 | } |
1461 | .active { | 1461 | .active { |
1462 | background-color: black; | 1462 | background-color: black; |
1463 | color: white !important; | 1463 | color: white !important; |
1464 | } | 1464 | } |
1465 | .activebtn { | 1465 | .activebtn { |
1466 | color: black !important; | 1466 | color: black !important; |
1467 | } | 1467 | } |
1468 | #flex { | 1468 | #flex { |
1469 | height: 300px; | 1469 | height: 300px; |
1470 | } | 1470 | } |
1471 | .v-tabs__item a { | 1471 | .v-tabs__item a { |
1472 | font-size: 16px !important; | 1472 | font-size: 16px !important; |
1473 | } | 1473 | } |
1474 | @media screen and (max-width: 769px) { | 1474 | @media screen and (max-width: 769px) { |
1475 | .top { | 1475 | .top { |
1476 | margin-top: 0 !important; | 1476 | margin-top: 0 !important; |
1477 | } | 1477 | } |
1478 | .userSearch .v-icon { | 1478 | .userSearch .v-icon { |
1479 | font-size: 20px !important; | 1479 | font-size: 20px !important; |
1480 | margin-left: 20px; | 1480 | margin-left: 20px; |
1481 | } | 1481 | } |
1482 | } | 1482 | } |
1483 | @media screen and (max-width: 380px) { | 1483 | @media screen and (max-width: 380px) { |
1484 | .right { | 1484 | .right { |
1485 | float: none !important; | 1485 | float: none !important; |
1486 | } | 1486 | } |
1487 | .subheading { | 1487 | .subheading { |
1488 | font-size: 14px !important; | 1488 | font-size: 14px !important; |
1489 | } | 1489 | } |
1490 | .v-card__actions .v-btn { | 1490 | .v-card__actions .v-btn { |
1491 | margin: 0 0px; | 1491 | margin: 0 0px; |
1492 | min-width: 100px; | 1492 | min-width: 100px; |
1493 | } | 1493 | } |
1494 | /* .searchIcon .v-icon { | 1494 | /* .searchIcon .v-icon { |
1495 | font-size: 20px; | 1495 | font-size: 20px; |
1496 | margin-left: 20px; | 1496 | margin-left: 20px; |
1497 | } */ | 1497 | } */ |
1498 | .subheading { | 1498 | .subheading { |
1499 | font-size: 12px !important; | 1499 | font-size: 12px !important; |
1500 | } | 1500 | } |
1501 | h5 { | 1501 | h5 { |
1502 | font-size: 13px; | 1502 | font-size: 13px; |
1503 | } | 1503 | } |
1504 | } | 1504 | } |
1505 | .v-icon { | 1505 | .v-icon { |
1506 | font-size: 30px; | 1506 | font-size: 30px; |
1507 | } | 1507 | } |
1508 | @media screen and (min-width: 1270px) { | 1508 | @media screen and (min-width: 1270px) { |
1509 | .hide { | 1509 | .hide { |
1510 | display: none; | 1510 | display: none; |
1511 | } | 1511 | } |
1512 | /* } | 1512 | /* } |
1513 | @media screen and (max-width: 962px) { | 1513 | @media screen and (max-width: 962px) { |
1514 | .imglogo{ | 1514 | .imglogo{ |
1515 | position: absolute; | 1515 | position: absolute; |
1516 | top: 13px; | 1516 | top: 13px; |
1517 | left: 13px !important; | 1517 | left: 13px !important; |
1518 | width: 70px; | 1518 | width: 70px; |
1519 | height: 24px; | 1519 | height: 24px; |
1520 | } */ | 1520 | } */ |
1521 | } | 1521 | } |
1522 | @media screen and (max-width: 420px) { | 1522 | @media screen and (max-width: 420px) { |
1523 | .userSearch .v-text-field .v-label { | 1523 | .userSearch .v-text-field .v-label { |
1524 | line-height: 24px !important; | 1524 | line-height: 24px !important; |
1525 | } | 1525 | } |
1526 | .userSearch .v-label { | 1526 | .userSearch .v-label { |
1527 | font-size: 13px !important; | 1527 | font-size: 13px !important; |
1528 | } | 1528 | } |
1529 | .v-list__tile { | 1529 | .v-list__tile { |
1530 | font-size: 14px; | 1530 | font-size: 14px; |
1531 | padding: 0 10px; | 1531 | padding: 0 10px; |
1532 | } | 1532 | } |
1533 | .name { | 1533 | .name { |
1534 | font-size: 15px; | 1534 | font-size: 15px; |
1535 | } | 1535 | } |
1536 | } | 1536 | } |
1537 | </style> | 1537 | </style> |
src/pages/TimeTable/timeTable.vue
File was created | 1 | <template> | |
2 | <v-app id="pages-dasboard"> | ||
3 | <v-toolbar class="fixcolors" fixed app> | ||
4 | <v-toolbar-title class="ml-0 pl-3"> | ||
5 | <v-toolbar-side-icon @click.stop="handleDrawerToggle" class="hide"></v-toolbar-side-icon> | ||
6 | </v-toolbar-title> | ||
7 | <!-- ****** SEARCH ALL EXISTING TIME-TABLE ****** --> | ||
8 | <v-flex xs7 sm3 class="userSearch"> | ||
9 | <v-text-field | ||
10 | flat | ||
11 | append-icon="search" | ||
12 | label="Find your Teachers" | ||
13 | v-model="search" | ||
14 | color="white" | ||
15 | dark | ||
16 | ></v-text-field> | ||
17 | </v-flex> | ||
18 | <v-spacer></v-spacer> | ||
19 | <v-menu offset-y origin="center center" :nudge-bottom="10" transition="scale-transition"> | ||
20 | <v-btn icon large flat slot="activator"> | ||
21 | <v-avatar size="40px"> | ||
22 | <img src="/static/icon/user.png"> | ||
23 | </v-avatar> | ||
24 | </v-btn> | ||
25 | <v-list class="pa-0"> | ||
26 | <v-list-tile | ||
27 | v-for="(item,index) in items" | ||
28 | :to="!item.href ? { name: item.name } : null" | ||
29 | :href="item.href" | ||
30 | @click="item.click" | ||
31 | ripple="ripple" | ||
32 | :disabled="item.disabled" | ||
33 | :target="item.target" | ||
34 | rel="noopener" | ||
35 | :key="index" | ||
36 | > | ||
37 | <v-list-tile-action v-if="item.icon"> | ||
38 | <v-icon>{{ item.icon }}</v-icon> | ||
39 | </v-list-tile-action> | ||
40 | <v-list-tile-content> | ||
41 | <v-list-tile-title>{{ item.title }}</v-list-tile-title> | ||
42 | </v-list-tile-content> | ||
43 | </v-list-tile> | ||
44 | </v-list> | ||
45 | </v-menu> | ||
46 | </v-toolbar> | ||
47 | <v-tabs grow slider-color="black"> | ||
48 | <v-tab | ||
49 | ripple | ||
50 | @click="activeTab('existing')" | ||
51 | v-bind:class="{ active: isActive }" | ||
52 | id="tab" | ||
53 | class="subheading" | ||
54 | >Existing Time Table</v-tab> | ||
55 | <v-tab | ||
56 | ripple | ||
57 | @click="activeTab('new')" | ||
58 | v-bind:class="{ active: newActive }" | ||
59 | id="tab1" | ||
60 | User | ||
61 | class="subheading" | ||
62 | >Add New Time Table</v-tab> | ||
63 | |||
64 | <!-- ****** EDITS TIME-TABLE****** --> | ||
65 | |||
66 | <v-tab-item> | ||
67 | <v-snackbar | ||
68 | :timeout="timeout" | ||
69 | :top="y === 'top'" | ||
70 | :right="x === 'right'" | ||
71 | :vertical="mode === 'vertical'" | ||
72 | v-model="snackbar" | ||
73 | color="success" | ||
74 | >{{ text }}</v-snackbar> | ||
75 | <v-dialog v-model="dialog" max-width="1000px"> | ||
76 | <v-flex xs12 sm12 class> | ||
77 | <v-toolbar color="white"> | ||
78 | <v-spacer></v-spacer> | ||
79 | <v-toolbar-title>Edit Time Table</v-toolbar-title> | ||
80 | <v-spacer></v-spacer> | ||
81 | </v-toolbar> | ||
82 | <v-card flat> | ||
83 | <v-form ref="form"> | ||
84 | <v-container fluid> | ||
85 | <v-layout> | ||
86 | <v-flex | ||
87 | xs12 | ||
88 | class="text-xs-center text-sm-center text-md-center text-lg-center mr-4" | ||
89 | > | ||
90 | <v-avatar size="100px"> | ||
91 | <img src="/static/icon/user.png" v-if="!imageUrl"> | ||
92 | </v-avatar> | ||
93 | <input | ||
94 | type="file" | ||
95 | style="display: none" | ||
96 | ref="image" | ||
97 | accept="image/*" | ||
98 | @change="onFilePicked" | ||
99 | > | ||
100 | <img | ||
101 | :src="imageData.imageUrl" | ||
102 | height="150" | ||
103 | v-if="imageUrl" | ||
104 | style="border-radius:50%; width:200px" | ||
105 | > | ||
106 | </v-flex> | ||
107 | </v-layout> | ||
108 | <v-flex xs12 sm12> | ||
109 | <v-layout> | ||
110 | <v-flex xs4 class="pt-4 subheading"> | ||
111 | <label class="right">class No:</label> | ||
112 | </v-flex> | ||
113 | <v-flex xs12 sm5 class="ml-3"> | ||
114 | <v-select | ||
115 | :items="addclass" | ||
116 | label="Select Class" | ||
117 | v-model="editedItem.classNum" | ||
118 | item-text="classNum" | ||
119 | item-value= "_id" | ||
120 | @change="getSections(editedItem.classNum)" | ||
121 | ></v-select> | ||
122 | </v-flex> | ||
123 | </v-layout> | ||
124 | </v-flex> | ||
125 | <v-flex xs12 sm12> | ||
126 | <v-layout> | ||
127 | <v-flex xs4 class="pt-4 subheading"> | ||
128 | <label class="right">Section Name:</label> | ||
129 | </v-flex> | ||
130 | <v-flex xs5 class="ml-3"> | ||
131 | <v-select | ||
132 | :items="addSection" | ||
133 | label="Select Section" | ||
134 | v-model="editedItem.selectSection" | ||
135 | item-text="name" | ||
136 | item-value="_id" | ||
137 | ></v-select> | ||
138 | </v-flex> | ||
139 | </v-layout> | ||
140 | </v-flex> | ||
141 | <v-layout> | ||
142 | <v-flex xs12 sm8 offset-sm2> | ||
143 | <v-card-actions> | ||
144 | <v-btn round dark @click.native="close">Cancel</v-btn> | ||
145 | <v-spacer></v-spacer> | ||
146 | <v-btn round dark @click="save">Save</v-btn> | ||
147 | </v-card-actions> | ||
148 | </v-flex> | ||
149 | </v-layout> | ||
150 | </v-container> | ||
151 | </v-form> | ||
152 | </v-card> | ||
153 | </v-flex> | ||
154 | </v-dialog> | ||
155 | |||
156 | <!-- ****** ADD LECTURES TIME-TABLE ****** --> | ||
157 | |||
158 | <v-dialog v-model="dialogAddLecture" max-width="1000px"> | ||
159 | <v-flex xs12 sm12 class> | ||
160 | <v-toolbar color="white"> | ||
161 | <v-spacer></v-spacer> | ||
162 | <v-toolbar-title>Add Lecture</v-toolbar-title> | ||
163 | <v-spacer></v-spacer> | ||
164 | </v-toolbar> | ||
165 | <v-card flat> | ||
166 | <v-form ref="form" v-model="valid" lazy-validation> | ||
167 | <v-container fluid> | ||
168 | <v-flex xs12 sm12> | ||
169 | <v-layout> | ||
170 | <v-flex xs4 class="pt-4 subheading"> | ||
171 | <label class="right">Subject Name:</label> | ||
172 | </v-flex> | ||
173 | <v-flex xs5 class="ml-3"> | ||
174 | <v-text-field | ||
175 | v-model="addlectures.subjectName" | ||
176 | :rules="subjectNameRules" | ||
177 | placeholder="fill your Subject Name" | ||
178 | type="text" | ||
179 | ></v-text-field> | ||
180 | </v-flex> | ||
181 | </v-layout> | ||
182 | </v-flex> | ||
183 | <v-flex xs12 sm12> | ||
184 | <v-layout> | ||
185 | <v-flex xs4 class="pt-4 subheading"> | ||
186 | <label class="right">Time In:</label> | ||
187 | </v-flex> | ||
188 | <v-flex xs5 class="ml-3"> | ||
189 | <v-text-field | ||
190 | v-model="addlectures.timeIn" | ||
191 | :rules="timeInRules" | ||
192 | placeholder="fill your Time In" | ||
193 | type="text" | ||
194 | ></v-text-field> | ||
195 | </v-flex> | ||
196 | </v-layout> | ||
197 | </v-flex> | ||
198 | <v-flex xs12 sm12> | ||
199 | <v-layout> | ||
200 | <v-flex xs4 class="pt-4 subheading"> | ||
201 | <label class="right">Time Out:</label> | ||
202 | </v-flex> | ||
203 | <v-flex xs5 class="ml-3"> | ||
204 | <v-text-field | ||
205 | v-model="addlectures.timeOut" | ||
206 | :rules="timeOutRules" | ||
207 | placeholder="fill your Time Out" | ||
208 | type="text" | ||
209 | ></v-text-field> | ||
210 | </v-flex> | ||
211 | </v-layout> | ||
212 | </v-flex> | ||
213 | <v-flex xs12 sm12> | ||
214 | <v-layout> | ||
215 | <v-flex xs4 class="pt-4 subheading"> | ||
216 | <label class="right">Select Teacher:</label> | ||
217 | </v-flex> | ||
218 | <v-flex xs5 class="ml-3"> | ||
219 | <v-select | ||
220 | :items="addTeachers" | ||
221 | label="Select Teacher" | ||
222 | v-model="addlectures.teacherId" | ||
223 | :rules="subjectNameRules" | ||
224 | item-text="name" | ||
225 | item-value="_id" | ||
226 | required | ||
227 | ></v-select> | ||
228 | </v-flex> | ||
229 | </v-layout> | ||
230 | </v-flex> | ||
231 | <v-layout> | ||
232 | <v-flex xs12 sm8 offset-sm2> | ||
233 | <v-card-actions> | ||
234 | <v-btn round dark @click.native="closedialogLecture">Cancel</v-btn> | ||
235 | <v-spacer></v-spacer> | ||
236 | <!-- <v-btn round dark @click="updateParticularTable">Save</v-btn> --> | ||
237 | <v-btn round dark @click="AddLecture">Save</v-btn> | ||
238 | |||
239 | </v-card-actions> | ||
240 | </v-flex> | ||
241 | </v-layout> | ||
242 | </v-container> | ||
243 | </v-form> | ||
244 | </v-card> | ||
245 | </v-flex> | ||
246 | </v-dialog> | ||
247 | |||
248 | <!-- ****** EDIT LECTURES TIME-TABLE ****** --> | ||
249 | |||
250 | <v-dialog v-model="dialogUpdateLectures" max-width="1000px"> | ||
251 | <v-flex xs12 sm12 class> | ||
252 | <v-toolbar color="white"> | ||
253 | <v-spacer></v-spacer> | ||
254 | <v-toolbar-title>Edit Lecture</v-toolbar-title> | ||
255 | <v-spacer></v-spacer> | ||
256 | </v-toolbar> | ||
257 | <v-card flat> | ||
258 | <v-form ref="form"> | ||
259 | <v-container fluid> | ||
260 | <v-flex xs12 sm12> | ||
261 | <v-layout> | ||
262 | <v-flex xs4 class="pt-4 subheading"> | ||
263 | <label class="right">Subject Name:</label> | ||
264 | </v-flex> | ||
265 | <v-flex xs5 class="ml-3"> | ||
266 | <v-text-field | ||
267 | v-model="updateLectures.subjectName" | ||
268 | placeholder="fill your Subject Name" | ||
269 | type="text" | ||
270 | ></v-text-field> | ||
271 | </v-flex> | ||
272 | </v-layout> | ||
273 | </v-flex> | ||
274 | <v-flex xs12 sm12> | ||
275 | <v-layout> | ||
276 | <v-flex xs4 class="pt-4 subheading"> | ||
277 | <label class="right">Time In:</label> | ||
278 | </v-flex> | ||
279 | <v-flex xs5 class="ml-3"> | ||
280 | <v-text-field | ||
281 | v-model="updateLectures.timeIn" | ||
282 | placeholder="fill your Time In" | ||
283 | type="text" | ||
284 | ></v-text-field> | ||
285 | </v-flex> | ||
286 | </v-layout> | ||
287 | </v-flex> | ||
288 | <v-flex xs12 sm12> | ||
289 | <v-layout> | ||
290 | <v-flex xs4 class="pt-4 subheading"> | ||
291 | <label class="right">Time Out:</label> | ||
292 | </v-flex> | ||
293 | <v-flex xs5 class="ml-3"> | ||
294 | <v-text-field | ||
295 | v-model="updateLectures.timeOut" | ||
296 | placeholder="fill your Time Out" | ||
297 | type="text" | ||
298 | ></v-text-field> | ||
299 | </v-flex> | ||
300 | </v-layout> | ||
301 | </v-flex> | ||
302 | <v-flex xs12 sm12> | ||
303 | <v-layout> | ||
304 | <v-flex xs4 class="pt-4 subheading"> | ||
305 | <label class="right">Select Teacher:</label> | ||
306 | </v-flex> | ||
307 | <v-flex xs5 class="ml-3"> | ||
308 | <v-select | ||
309 | :items="addTeachers" | ||
310 | label="Select Teacher" | ||
311 | v-model="updateLectures.teacherId" | ||
312 | item-text="name" | ||
313 | item-value="_id" | ||
314 | required | ||
315 | ></v-select> | ||
316 | </v-flex> | ||
317 | </v-layout> | ||
318 | </v-flex> | ||
319 | <v-layout> | ||
320 | <v-flex xs12 sm8 offset-sm2> | ||
321 | <v-card-actions> | ||
322 | <v-btn round dark @click.native="closeUpdateLectures">Cancel</v-btn> | ||
323 | <v-spacer></v-spacer> | ||
324 | <v-btn round dark @click="updateParticularTable">Save</v-btn> | ||
325 | |||
326 | </v-card-actions> | ||
327 | </v-flex> | ||
328 | </v-layout> | ||
329 | </v-container> | ||
330 | </v-form> | ||
331 | </v-card> | ||
332 | </v-flex> | ||
333 | </v-dialog> | ||
334 | |||
335 | <v-snackbar | ||
336 | :timeout="timeout" | ||
337 | :top="y === 'top'" | ||
338 | :right="x === 'right'" | ||
339 | :vertical="mode === 'vertical'" | ||
340 | v-model="snackbar" | ||
341 | color="success" | ||
342 | >{{ text }}</v-snackbar> | ||
343 | |||
344 | <!-- ****** EXISTING-USERS TIME-TABLE ****** --> | ||
345 | <v-flex xs12> | ||
346 | <v-data-table :headers="headers" :items="desserts" item-key="_id"> | ||
347 | <template slot="items" slot-scope="props"> | ||
348 | <tr | ||
349 | style="cursor: pointer;" | ||
350 | @click="getTimeTable(props.item), props.expanded = !props.expanded" | ||
351 | > | ||
352 | <td class="text-xs-center">{{ props.index }}</td> | ||
353 | <td class="text-xs-center">{{ props.item.classData.classNum}}</td> | ||
354 | <td class="text-xs-center">{{ props.item.sectionData.name }}</td> | ||
355 | <td class="text-xs-center"> | ||
356 | <span> | ||
357 | <img | ||
358 | style="cursor:pointer; width:20px; height:18px; " | ||
359 | class="mr-5" | ||
360 | @click="editItem(props.item)" | ||
361 | src="/static/icon/edit1.png" | ||
362 | > | ||
363 | <img | ||
364 | style="cursor:pointer; height:20px; " | ||
365 | class="mr-5" | ||
366 | @click="deleteItem(props.item)" | ||
367 | src="/static/icon/delete1.png" | ||
368 | > | ||
369 | </span> | ||
370 | </td> | ||
371 | </tr> | ||
372 | </template> | ||
373 | <template slot="expand" slot-scope="props"> | ||
374 | <v-data-table | ||
375 | :items="timeTableList.schedule" | ||
376 | hide-actions | ||
377 | item-key="title" | ||
378 | style="width: auto;" | ||
379 | > | ||
380 | <template slot="items" slot-scope="props"> | ||
381 | <tr> | ||
382 | <td class="text-xs-left subheading"> <b> {{ props.item.day }} </b> </td> | ||
383 | <td> | ||
384 | <b> Subject</b><br/> | ||
385 | <b> Time In</b><br/> | ||
386 | <b> Time Out</b> | ||
387 | </td> | ||
388 | <td v-for="list in props.item.lectures"> | ||
389 | <b> {{ list.subjectName }} </b> | ||
390 | <img | ||
391 | style="cursor:pointer; width:20px; height:18px; " | ||
392 | class="mr-2 ml-2" | ||
393 | src="/static/icon/edit1.png" | ||
394 | @click="updateTimeTable(list, timeTableList)" | ||
395 | > | ||
396 | <img | ||
397 | style="cursor:pointer; height:20px; " | ||
398 | src="/static/icon/delete1.png" | ||
399 | @click="deleteTimeTable(list, timeTableList)" | ||
400 | > | ||
401 | <br/> {{list.timeIn.slice(0,16)}} <br/> {{list.timeOut.slice(0,16)}} | ||
402 | </td> | ||
403 | <td > | ||
404 | <v-icon | ||
405 | color="black" | ||
406 | @click="addLecture(props.item._id, timeTableList._id)" | ||
407 | >add_circle_outline</v-icon> | ||
408 | </td> | ||
409 | </tr> | ||
410 | </template> | ||
411 | </v-data-table> | ||
412 | </template> | ||
413 | </v-data-table> | ||
414 | <br> | ||
415 | <br> | ||
416 | </v-flex> | ||
417 | </v-tab-item> | ||
418 | |||
419 | <!-- ****** ADD MULTIPLE TIME-TABLE ****** --> | ||
420 | |||
421 | <v-tab-item> | ||
422 | <v-container> | ||
423 | <v-snackbar | ||
424 | :timeout="timeout" | ||
425 | :top="y === 'top'" | ||
426 | :right="x === 'right'" | ||
427 | :vertical="mode === 'vertical'" | ||
428 | v-model="snackbar" | ||
429 | color="success" | ||
430 | >{{ text }}</v-snackbar> | ||
431 | <v-flex xs12 sm12 class="my-4"> | ||
432 | <v-card flat> | ||
433 | <v-form ref="form" v-model="valid" lazy-validation> | ||
434 | <v-container fluid> | ||
435 | <v-layout> | ||
436 | <v-flex | ||
437 | xs12 | ||
438 | class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" | ||
439 | > | ||
440 | <v-avatar size="100px"> | ||
441 | <img src="/static/icon/user.png" v-if="!imageUrl"> | ||
442 | </v-avatar> | ||
443 | <input | ||
444 | type="file" | ||
445 | style="display: none" | ||
446 | ref="image" | ||
447 | accept="image/*" | ||
448 | @change="onFilePicked" | ||
449 | > | ||
450 | <img | ||
451 | :src="imageData.imageUrl" | ||
452 | height="150" | ||
453 | v-if="imageUrl" | ||
454 | style="border-radius:50%; width:200px" | ||
455 | > | ||
456 | </v-flex> | ||
457 | </v-layout> | ||
458 | <v-flex xs12> | ||
459 | <v-layout> | ||
460 | <v-flex xs4 class="pt-4 subheading"> | ||
461 | <label class="right">Select Class:</label> | ||
462 | </v-flex> | ||
463 | <v-flex xs4 class="ml-3"> | ||
464 | <v-select | ||
465 | :items="addclass" | ||
466 | label="Select Class" | ||
467 | v-model="timeTable.select" | ||
468 | item-text="classNum" | ||
469 | item-value="_id" | ||
470 | @change="getSections(timeTable.select)" | ||
471 | required | ||
472 | ></v-select> | ||
473 | </v-flex> | ||
474 | </v-layout> | ||
475 | </v-flex> | ||
476 | <v-flex xs12> | ||
477 | <v-layout> | ||
478 | <v-flex xs4 class="pt-4 subheading"> | ||
479 | <label class="right">Select Section:</label> | ||
480 | </v-flex> | ||
481 | <v-flex xs4 class="ml-3"> | ||
482 | <v-select | ||
483 | :items="addSection" | ||
484 | label="Select Section" | ||
485 | v-model="timeTable.selectSection" | ||
486 | item-text="name" | ||
487 | item-value="_id" | ||
488 | required | ||
489 | ></v-select> | ||
490 | </v-flex> | ||
491 | </v-layout> | ||
492 | </v-flex> | ||
493 | <v-flex xs12> | ||
494 | <v-layout> | ||
495 | <v-flex xs4 class="pt-4 subheading"> | ||
496 | <label class="right">Select Teacher:</label> | ||
497 | </v-flex> | ||
498 | <v-flex xs4 class="ml-3"> | ||
499 | <v-select | ||
500 | :items="addTeachers" | ||
501 | label="Select Teacher" | ||
502 | v-model="timeTable.selectTeacher" | ||
503 | item-text="name" | ||
504 | item-value="_id" | ||
505 | required | ||
506 | ></v-select> | ||
507 | </v-flex> | ||
508 | </v-layout> | ||
509 | </v-flex> | ||
510 | <v-flex xs12> | ||
511 | <v-layout> | ||
512 | <v-flex xs4 class="pt-4 subheading"> | ||
513 | <label class="right">Select Day:</label> | ||
514 | </v-flex> | ||
515 | <v-flex xs4 class="ml-3"> | ||
516 | <v-select | ||
517 | :items="addOneDay" | ||
518 | label="Select Day" | ||
519 | v-model="timeTable.selectDay" | ||
520 | item-text="name" | ||
521 | item-value="_id" | ||
522 | required | ||
523 | ></v-select> | ||
524 | </v-flex> | ||
525 | </v-layout> | ||
526 | </v-flex> | ||
527 | <v-flex xs12> | ||
528 | <v-layout> | ||
529 | <v-flex xs4 class="pt-4 subheading"> | ||
530 | <label class="right">Time In:</label> | ||
531 | </v-flex> | ||
532 | <v-flex xs4 class="ml-3"> | ||
533 | <v-text-field | ||
534 | v-model="timeTable.timeIn" | ||
535 | placeholder="fill your Time In" | ||
536 | type="text" | ||
537 | :rules="timeInRules" | ||
538 | required | ||
539 | ></v-text-field> | ||
540 | </v-flex> | ||
541 | </v-layout> | ||
542 | </v-flex> | ||
543 | <v-flex xs12> | ||
544 | <v-layout> | ||
545 | <v-flex xs4 class="pt-4 subheading"> | ||
546 | <label class="right">Time Out:</label> | ||
547 | </v-flex> | ||
548 | <v-flex xs4 class="ml-3"> | ||
549 | <v-text-field | ||
550 | placeholder="fill your Time Out" | ||
551 | :rules="timeOutRules" | ||
552 | v-model="timeTable.timeOut" | ||
553 | type="text" | ||
554 | required | ||
555 | ></v-text-field> | ||
556 | </v-flex> | ||
557 | </v-layout> | ||
558 | </v-flex> | ||
559 | <v-flex xs12> | ||
560 | <v-layout> | ||
561 | <v-flex xs4 class="pt-4 subheading"> | ||
562 | <label class="right">Lecture No:</label> | ||
563 | </v-flex> | ||
564 | <v-flex xs4 class="ml-3"> | ||
565 | <v-text-field | ||
566 | placeholder="fill your Lecture No" | ||
567 | :rules="lectureRules" | ||
568 | v-model="timeTable.lectureNum" | ||
569 | type="number" | ||
570 | required | ||
571 | ></v-text-field> | ||
572 | </v-flex> | ||
573 | </v-layout> | ||
574 | </v-flex> | ||
575 | <v-flex xs12> | ||
576 | <v-layout> | ||
577 | <v-flex xs4 class="pt-4 subheading"> | ||
578 | <label class="right">Subject Name:</label> | ||
579 | </v-flex> | ||
580 | <v-flex xs4 class="ml-3"> | ||
581 | <v-text-field | ||
582 | placeholder="fill your Subject Name" | ||
583 | :rules="subjectNameRules" | ||
584 | v-model="timeTable.subjectName" | ||
585 | type="text" | ||
586 | required | ||
587 | ></v-text-field> | ||
588 | </v-flex> | ||
589 | </v-layout> | ||
590 | </v-flex> | ||
591 | <v-layout> | ||
592 | <v-flex xs12 sm6 offset-sm3> | ||
593 | <v-card-actions> | ||
594 | <v-btn @click="clear" round dark>clear</v-btn> | ||
595 | <v-spacer></v-spacer> | ||
596 | <v-btn @click="submit" round dark :loading="loading">Add</v-btn> | ||
597 | </v-card-actions> | ||
598 | </v-flex> | ||
599 | </v-layout> | ||
600 | </v-container> | ||
601 | </v-form> | ||
602 | </v-card> | ||
603 | </v-flex> | ||
604 | </v-container> | ||
605 | </v-tab-item> | ||
606 | </v-tabs> | ||
607 | <div class="loader" v-if="showLoader"> | ||
608 | <v-progress-circular indeterminate color="white"></v-progress-circular> | ||
609 | </div> | ||
610 | </v-app> | ||
611 | </template> | ||
612 | |||
613 | <script> | ||
614 | import http from "@/Services/http.js"; | ||
615 | import Util from "@/util"; | ||
616 | |||
617 | export default { | ||
618 | data: () => ({ | ||
619 | y: "top", | ||
620 | x: "right", | ||
621 | mode: "", | ||
622 | timeout: 3000, | ||
623 | text: "", | ||
624 | search: "", | ||
625 | snackbar: false, | ||
626 | loading: false, | ||
627 | showLoader: false, | ||
628 | menu: false, | ||
629 | menu1: false, | ||
630 | dialog: false, | ||
631 | dialogAddLecture : false, | ||
632 | dialogUpdateLectures:false, | ||
633 | dialog1: false, | ||
634 | valid: true, | ||
635 | // validLeacture:true, | ||
636 | isActive: true, | ||
637 | newActive: false, | ||
638 | addclass: [], | ||
639 | addSection: [], | ||
640 | addTeachers: [], | ||
641 | gender: ["Male", "Female"], | ||
642 | AddUsercredentials: {}, | ||
643 | pagination: { | ||
644 | rowsPerPage: 15 | ||
645 | }, | ||
646 | imageData: {}, | ||
647 | imageName: "", | ||
648 | imageUrl: "", | ||
649 | imageFile: "", | ||
650 | timeInRules: [v => !!v || "Time In is required"], | ||
651 | timeOutRules: [v => !!v || "Time Out is required"], | ||
652 | lectureRules: [v => !!v || "Lecture No is required"], | ||
653 | subjectNameRules: [v => !!v || "Subject Name is required"], | ||
654 | headers: [ | ||
655 | { | ||
656 | text: "No", | ||
657 | align: "center", | ||
658 | sortable: false, | ||
659 | value: "No" | ||
660 | }, | ||
661 | { | ||
662 | text: "Class Name", | ||
663 | value: "subjectName", | ||
664 | sortable: false, | ||
665 | align: "center" | ||
666 | }, | ||
667 | { | ||
668 | text: "Section Name", | ||
669 | value: "sectionData", | ||
670 | sortable: false, | ||
671 | align: "center" | ||
672 | }, | ||
673 | { text: "Action", value: "", sortable: false, align: "center" } | ||
674 | ], | ||
675 | daysHeaders: [ | ||
676 | { text: "Day", value: "dayday", sortable: false, align: "center" }, | ||
677 | { | ||
678 | text: "Subject Name", | ||
679 | value: "subjectName", | ||
680 | sortable: false, | ||
681 | align: "center" | ||
682 | }, | ||
683 | { text: "Time In", value: "timeIn", sortable: false, align: "center" }, | ||
684 | { text: "Time Out", value: "timeOut", sortable: false, align: "center" } | ||
685 | ], | ||
686 | addOneDay: [ | ||
687 | "Monday", | ||
688 | "Tuesday", | ||
689 | "Wednesday", | ||
690 | "Thursday", | ||
691 | "Friday", | ||
692 | "Saturday", | ||
693 | "Sunday" | ||
694 | ], | ||
695 | desserts: [], | ||
696 | timeTableList: [], | ||
697 | editedIndex: -1, | ||
698 | timeTable: { | ||
699 | select: "", | ||
700 | selectSection: "", | ||
701 | selectDay: "", | ||
702 | timeIn: "", | ||
703 | timeOut: "", | ||
704 | lectureNum: "", | ||
705 | subjectName: "", | ||
706 | selectTeacher: "" | ||
707 | }, | ||
708 | editedItem: { | ||
709 | classNum:"", | ||
710 | selectSection: "" | ||
711 | }, | ||
712 | addlectures: { | ||
713 | timeIn: "", | ||
714 | timeOut: "", | ||
715 | subjectName: "", | ||
716 | teacherId: "", | ||
717 | scheduleId:"", | ||
718 | timeTableId:"" | ||
719 | }, | ||
720 | updateLectures:{ | ||
721 | timeIn: "", | ||
722 | timeOut: "", | ||
723 | subjectName: "", | ||
724 | teacherId: "", | ||
725 | lectureId:"", | ||
726 | scheduleId:"", | ||
727 | }, | ||
728 | items: [ | ||
729 | { | ||
730 | href: "/changepassword", | ||
731 | title: "Change Password", | ||
732 | click: e => { | ||
733 | console.log(e); | ||
734 | } | ||
735 | }, | ||
736 | { | ||
737 | href: "#", | ||
738 | title: "Logout", | ||
739 | click: e => { | ||
740 | window.getApp.$emit("APP_LOGOUT"); | ||
741 | } | ||
742 | } | ||
743 | ] | ||
744 | }), | ||
745 | watch: { | ||
746 | menu(val) { | ||
747 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | ||
748 | }, | ||
749 | menu1(val) { | ||
750 | val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); | ||
751 | } | ||
752 | }, | ||
753 | methods: { | ||
754 | getSections(_id) { | ||
755 | var token = this.$store.state.token; | ||
756 | http() | ||
757 | .get( | ||
758 | "/getSectionsList", | ||
759 | { params: { classId: _id } }, | ||
760 | { | ||
761 | headers: { Authorization: "Bearer " + token } | ||
762 | } | ||
763 | ) | ||
764 | .then(response => { | ||
765 | this.addSection = response.data.data; | ||
766 | // console.log("getSectionsList=====>", this.addSection); | ||
767 | }) | ||
768 | .catch(err => { | ||
769 | // console.log("err====>", err); | ||
770 | }); | ||
771 | }, | ||
772 | getTimeTable(item) { | ||
773 | this.showLoader = true; | ||
774 | var token = this.$store.state.token; | ||
775 | http() | ||
776 | .get( | ||
777 | "/getParticularTimeTable", | ||
778 | { params: { timeTableId: item._id } }, | ||
779 | { | ||
780 | headers: { Authorization: "Bearer " + token } | ||
781 | } | ||
782 | ) | ||
783 | .then(response => { | ||
784 | this.timeTableList = response.data.data; | ||
785 | this.showLoader = false; | ||
786 | // console.log("getParticularTimeTable=====>", this.timeTableList); | ||
787 | }) | ||
788 | .catch(err => { | ||
789 | this.showLoader = false; | ||
790 | // console.log("err====>", err); | ||
791 | }); | ||
792 | }, | ||
793 | pickFile() { | ||
794 | this.$refs.image.click(); | ||
795 | }, | ||
796 | |||
797 | onFilePicked(e) { | ||
798 | // console.log(e) | ||
799 | const files = e.target.files; | ||
800 | this.imageData.upload = e.target.files[0]; | ||
801 | if (files[0] !== undefined) { | ||
802 | this.imageName = files[0].name; | ||
803 | if (this.imageName.lastIndexOf(".") <= 0) { | ||
804 | return; | ||
805 | } | ||
806 | const fr = new FileReader(); | ||
807 | fr.readAsDataURL(files[0]); | ||
808 | fr.addEventListener("load", () => { | ||
809 | this.imageUrl = fr.result; | ||
810 | this.imageFile = files[0]; // this is an image file that can be sent to server... | ||
811 | this.imageData.imageUrl = URL.createObjectURL(this.imageFile); | ||
812 | // console.log("upload=======>", this.imageData.imageUrl); | ||
813 | // console.log("imageFile", this.imageFile); | ||
814 | }); | ||
815 | } else { | ||
816 | this.imageName = ""; | ||
817 | this.imageFile = ""; | ||
818 | this.imageUrl = ""; | ||
819 | } | ||
820 | }, | ||
821 | getTimeTableList() { | ||
822 | this.showLoader = true; | ||
823 | var token = this.$store.state.token; | ||
824 | http() | ||
825 | .get("/getTimeTablesList", { | ||
826 | headers: { Authorization: "Bearer " + token } | ||
827 | }) | ||
828 | .then(response => { | ||
829 | this.desserts = response.data.data; | ||
830 | this.showLoader = false; | ||
831 | // console.log("getTimeTableList=====>", response.data.data); | ||
832 | }) | ||
833 | .catch(err => { | ||
834 | // console.log("err====>", err); | ||
835 | this.showLoader = false; | ||
836 | this.$router.replace({ path: "/" }); | ||
837 | }); | ||
838 | }, | ||
839 | editItem(item) { | ||
840 | this.editedIndex = this.desserts.indexOf(item); | ||
841 | this.editedItem = Object.assign({}, item); | ||
842 | this.dialog = true; | ||
843 | }, | ||
844 | updateTimeTable(timeToUpdate, classToUpdate){ | ||
845 | console.log('timeToUpdate, classToUpdate', timeToUpdate._id, classToUpdate.schedule); | ||
846 | for (let i = 0; i < classToUpdate.schedule.length; i++){ | ||
847 | this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; | ||
848 | } | ||
849 | this.updateLectures.lectureId = timeToUpdate._id, | ||
850 | this.updateLectures= timeToUpdate | ||
851 | this.dialogUpdateLectures = true; | ||
852 | }, | ||
853 | addLecture(scheduleId, timeTableId){ | ||
854 | // console.log('timeToAdd, classToAdd', scheduleId, timeTableId); | ||
855 | this.addlectures.scheduleId = scheduleId | ||
856 | this.addlectures.timeTableId = timeTableId | ||
857 | this.dialogAddLecture = true; | ||
858 | }, | ||
859 | AddLecture(){ | ||
860 | if (this.$refs.form.validate()) { | ||
861 | http() | ||
862 | .post("/addLecture", this.addlectures) | ||
863 | .then(response => { | ||
864 | // console.log("addTimeTable=====>", this.addlectures); | ||
865 | if ((this.snackbar = true)) { | ||
866 | this.text = "New Add Lecture successfully"; | ||
867 | } | ||
868 | this.closedialogLecture(); | ||
869 | }) | ||
870 | .catch(error => { | ||
871 | if ((this.snackbar = true)) { | ||
872 | this.text = error.response.data.message; | ||
873 | } | ||
874 | }); | ||
875 | } | ||
876 | }, | ||
877 | updateParticularTable(){ | ||
878 | let EditLecture = { | ||
879 | lectureId:this.updateLectures.lectureId, | ||
880 | scheduleId:this.updateLectures.scheduleId, | ||
881 | updatedLecture:{ | ||
882 | timeIn:this.updateLectures.timeIn, | ||
883 | timeOut: this.updateLectures.timeOut, | ||
884 | subjectName: this.updateLectures.subjectName, | ||
885 | teacherId: this.updateLectures.teacherId, | ||
886 | } | ||
887 | } | ||
888 | console.log("updateLecture", EditLecture); | ||
889 | http() | ||
890 | .put("/updateLecture", EditLecture) | ||
891 | .then(response => { | ||
892 | console.log("updateLecture", EditLecture); | ||
893 | if ((this.snackbar = true)) { | ||
894 | this.text = "Successfully Edit Update Lecture"; | ||
895 | } | ||
896 | this.$router.go(0) | ||
897 | }) | ||
898 | .catch(error => { | ||
899 | // console.log(error); | ||
900 | }); | ||
901 | this.closeUpdateLectures() | ||
902 | }, | ||
903 | deleteItem(item) { | ||
904 | let deleteTimeTable = { | ||
905 | timeTableId: item._id | ||
906 | }; | ||
907 | http() | ||
908 | .delete( | ||
909 | "/deleteTimeTable", | ||
910 | confirm("Are you sure you want to delete this?") && { | ||
911 | params: deleteTimeTable | ||
912 | } | ||
913 | ) | ||
914 | .then(response => { | ||
915 | // console.log("deleteUers",deleteTimeTable) | ||
916 | if ((this.snackbar = true)) { | ||
917 | this.text = "Successfully delete Existing User"; | ||
918 | } | ||
919 | this.getTimeTableList(); | ||
920 | }) | ||
921 | .catch(error => { | ||
922 | // console.log(error); | ||
923 | }); | ||
924 | }, | ||
925 | activeTab(type) { | ||
926 | switch (type) { | ||
927 | case "existing": | ||
928 | this.newActive = false; | ||
929 | this.isActive = true; | ||
930 | break; | ||
931 | |||
932 | default: | ||
933 | this.newActive = true; | ||
934 | this.isActive = false; | ||
935 | break; | ||
936 | } | ||
937 | }, | ||
938 | close() { | ||
939 | this.dialog = false; | ||
940 | setTimeout(() => { | ||
941 | this.editedItem = Object.assign({}, this.defaultItem); | ||
942 | this.editedIndex = -1; | ||
943 | }, 300); | ||
944 | }, | ||
945 | close1() { | ||
946 | this.dialog1 = false; | ||
947 | }, | ||
948 | closedialogLecture() { | ||
949 | this.dialogAddLecture = false; | ||
950 | this.$router.go(0) | ||
951 | }, | ||
952 | closeUpdateLectures(){ | ||
953 | this.dialogUpdateLectures = false; | ||
954 | }, | ||
955 | submit() { | ||
956 | if (this.$refs.form.validate()) { | ||
957 | let imageData = new FormData(); | ||
958 | imageData.append("upload", this.imageFile); | ||
959 | // console.log(imageData); | ||
960 | let addTimeTable = { | ||
961 | sectionId: this.timeTable.selectSection, | ||
962 | classId: this.timeTable.select, | ||
963 | schedule: [ | ||
964 | { | ||
965 | day: this.timeTable.selectDay, | ||
966 | lectures: [ | ||
967 | { | ||
968 | timeIn: this.timeTable.timeIn, | ||
969 | timeOut: this.timeTable.timeOut, | ||
970 | lectureNum: this.timeTable.lectureNum, | ||
971 | subjectName: this.timeTable.subjectName, | ||
972 | teacherId: this.timeTable.selectTeacher | ||
973 | } | ||
974 | ] | ||
975 | } | ||
976 | ] | ||
977 | }; | ||
978 | http() | ||
979 | .post("/createTimeTable", addTimeTable) | ||
980 | .then(response => { | ||
981 | // console.log("addTimeTable=====>", addTimeTable); | ||
982 | if ((this.snackbar = true)) { | ||
983 | this.text = "New Time Table added successfully"; | ||
984 | } | ||
985 | this.getTimeTableList(); | ||
986 | this.clear(); | ||
987 | }) | ||
988 | .catch(error => { | ||
989 | // console.log(error); | ||
990 | if ((this.snackbar = true)) { | ||
991 | this.text = error.response.data.message; | ||
992 | } | ||
993 | }); | ||
994 | } | ||
995 | }, | ||
996 | mail() {}, | ||
997 | download() {}, | ||
998 | clear() { | ||
999 | this.$refs.form.reset(); | ||
1000 | }, | ||
1001 | save() { | ||
1002 | let imageData = new FormData(); | ||
1003 | imageData.append("upload", this.imageFile); | ||
1004 | // console.log(imageData); | ||
1005 | let editTimeTable = { | ||
1006 | timeTableId: this.editedItem._id, | ||
1007 | classId: this.editedItem.classNum, | ||
1008 | sectionId: this.editedItem.selectSection | ||
1009 | // imageData | ||
1010 | }; | ||
1011 | http() | ||
1012 | .put("/updateTimeTable", editTimeTable) | ||
1013 | .then(response => { | ||
1014 | console.log("editTimeTable",editTimeTable); | ||
1015 | if ((this.snackbar = true)) { | ||
1016 | this.text = "Successfully Edit Existing User"; | ||
1017 | } | ||
1018 | this.getTimeTableList(); | ||
1019 | }) | ||
1020 | .catch(error => { | ||
1021 | // console.log(error); | ||
1022 | }); | ||
1023 | this.close(); | ||
1024 | }, | ||
1025 | handleDrawerToggle() { | ||
1026 | window.getApp.$emit("APP_DRAWER_TOGGLED"); | ||
1027 | }, | ||
1028 | handleFullScreen() { | ||
1029 | Util.toggleFullScreen(); | ||
1030 | }, | ||
1031 | deleteTimeTable(timeToDelete){ | ||
1032 | // console.log('timeToUpdate', timeToDelete._id); | ||
1033 | let deleteLecture = { | ||
1034 | lectureId: timeToDelete._id | ||
1035 | }; | ||
1036 | http() | ||
1037 | .delete( | ||
1038 | "/deleteLecture", | ||
1039 | confirm("Are you sure you want to delete this?") && { | ||
1040 | params: deleteLecture | ||
1041 | } | ||
1042 | ) | ||
1043 | .then(response => { | ||
1044 | // console.log("deleteLecture",deleteLecture) | ||
1045 | if ((this.snackbar = true)) { | ||
1046 | this.text = "Successfully delete Existing User"; | ||
1047 | } | ||
1048 | this.$router.go(0) | ||
1049 | // this.getTimeTable(); | ||
1050 | }) | ||
1051 | .catch(error => { | ||
1052 | console.log(error); | ||
1053 | }); | ||
1054 | }, | ||
1055 | }, | ||
1056 | mounted() { | ||
1057 | this.getTimeTableList(); | ||
1058 | var token = this.$store.state.token; | ||
1059 | http() | ||
1060 | .get("/getClassesList", { | ||
1061 | headers: { Authorization: "Bearer " + token } | ||
1062 | }) | ||
1063 | .then(response => { | ||
1064 | this.addclass = response.data.data; | ||
1065 | // console.log("getClassesList=====>",this.addclass) | ||
1066 | }) | ||
1067 | .catch(err => { | ||
1068 | // console.log("err====>", err); | ||
1069 | }); | ||
1070 | |||
1071 | http() | ||
1072 | .get("/getTeachersList", { | ||
1073 | headers: { Authorization: "Bearer " + token } | ||
1074 | }) | ||
1075 | .then(response => { | ||
1076 | this.addTeachers = response.data.data; | ||
1077 | // console.log("getClassesList=====>",this.addTeachers) | ||
1078 | }) | ||
1079 | .catch(err => { | ||
1080 | // console.log("err====>", err); | ||
1081 | }); | ||
1082 | }, | ||
1083 | computed: { | ||
1084 | toolbarColor() { | ||
1085 | return this.$vuetify.options.extra.mainNav; | ||
1086 | } | ||
1087 | } | ||
1088 | }; | ||
1089 | </script> | ||
1090 | <style scoped> | ||
1091 | .theme--light .v-label, .application .theme--light.v-label { | ||
1092 | color: black; | ||
1093 | } | ||
1094 | .v-tabs__div { | ||
1095 | text-transform: none; | ||
1096 | } | ||
1097 | .v-input__prepend-outer { | ||
1098 | margin-right: 0px !important; | ||
1099 | } | ||
1100 | .v-card__actions .v-btn { | ||
1101 | margin: 0 15px; | ||
1102 | min-width: 120px; | ||
1103 | } | ||
1104 | .primary { | ||
1105 | background-color: #aaa !important; | ||
1106 | border-color: #aaa !important; | ||
1107 | } | ||
1108 | h4 { | ||
1109 | background-repeat: no-repeat; | ||
1110 | padding: 8px; | ||
1111 | margin: auto; | ||
1112 | font-size: 25px; | ||
1113 | } | ||
1114 | #name { | ||
1115 | position: absolute; | ||
1116 | left: 100px; | ||
1117 | top: 17px; | ||
1118 | } | ||
1119 | #icon { | ||
1120 | position: absolute; | ||
1121 | right: 8px; | ||
1122 | top: 8px; | ||
1123 | } | ||
1124 | #m { | ||
1125 | position: relative; | ||
1126 | left: 135px; | ||
1127 | top: -15px; | ||
1128 | } | ||
1129 | #G { | ||
1130 | position: absolute; | ||
1131 | top: 38px; | ||
1132 | color: white; | ||
1133 | } | ||
1134 | #bt { | ||
1135 | position: relative; | ||
1136 | top: -20px; | ||
1137 | left: 115px; | ||
1138 | } | ||
1139 | #e { | ||
1140 | position: relative; | ||
1141 | top: 5px; | ||
1142 | right: -30px; | ||
1143 | height: 17px; | ||
1144 | cursor: pointer; | ||
1145 | } | ||
1146 | #d { | ||
1147 | position: relative; | ||
1148 | top: 5px; | ||
1149 | right: -70px; | ||
1150 | height: 17px; | ||
1151 | cursor: pointer; | ||
1152 | } | ||
1153 | #td { | ||
1154 | border: 1px solid #dddddd; | ||
1155 | text-align: left; | ||
1156 | padding: 8px; | ||
1157 | } | ||
1158 | #dialog { | ||
1159 | height: 550px; | ||
1160 | } | ||
1161 | .active { | ||
1162 | background-color: black; | ||
1163 | color: white !important; | ||
1164 | } | ||
1165 | .activebtn { | ||
1166 | color: black !important; | ||
1167 | } | ||
1168 | #flex { | ||
1169 | height: 300px; | ||
1170 | } | ||
1171 | .top { | ||
1172 | margin-top: 100px; | ||
1173 | } | ||
1174 | .v-tabs__item a { | ||
1175 | font-size: 16px !important; | ||
1176 | } | ||
1177 | @media screen and (max-width: 769px) { | ||
1178 | .top { | ||
1179 | margin-top: 0 !important; | ||
1180 | } | ||
1181 | .userSearch .v-icon { | ||
1182 | font-size: 20px !important; | ||
1183 | margin-left: 20px; | ||
1184 | } | ||
1185 | } | ||
1186 | @media screen and (max-width: 380px) { | ||
1187 | .right { | ||
1188 | float: none !important; | ||
1189 | } | ||
1190 | .subheading { | ||
1191 | font-size: 14px !important; | ||
1192 | } | ||
1193 | .v-card__actions .v-btn { | ||
1194 | margin: 0 0px; | ||
1195 | min-width: 100px; | ||
1196 | } | ||
1197 | /* .searchIcon .v-icon { | ||
1198 | font-size: 20px; | ||
1199 | margin-left: 20px; | ||
1200 | } */ | ||
1201 | .subheading { | ||
1202 | font-size: 12px !important; | ||
1203 | } | ||
1204 | h5 { | ||
1205 | font-size: 13px; | ||
1206 | } | ||
1207 | } | ||
1208 | .v-icon { | ||
1209 | font-size: 30px; | ||
1210 | } | ||
1211 | @media screen and (min-width: 1270px) { | ||
1212 | .hide { | ||
1213 | display: none; | ||
1214 | } | ||
1215 | /* } | ||
1216 | @media screen and (max-width: 962px) { | ||
1217 | .imglogo{ | ||
1218 | position: absolute; | ||
1219 | top: 13px; | ||
1220 | left: 13px !important; | ||
1221 | width: 70px; | ||
1222 | height: 24px; | ||
1223 | } */ | ||
1224 | } | ||
1225 | @media screen and (max-width: 420px) { | ||
1226 | .userSearch .v-text-field .v-label { | ||
1227 | line-height: 24px !important; | ||
1228 | } | ||
1229 | .userSearch .v-label { | ||
1230 | font-size: 13px !important; | ||
1231 | } | ||
1232 | .v-list__tile { | ||
1233 | font-size: 14px; | ||
1234 | padding: 0 10px; | ||
1235 | } | ||
1236 | .name { | ||
1237 | font-size: 15px; | ||
1238 | } | ||
1239 | } | ||
1240 | </style> |
static/icon/delete1.png
682 Bytes