Commit 36fc987dfdd054276740ef3815b11d9d242ed144
1 parent
4b169b5749
Exists in
master
and in
3 other branches
add loader in all pages
Showing
4 changed files
with
30 additions
and
21 deletions
Show diff stats
src/pages/Event/event.vue
... | ... | @@ -338,6 +338,9 @@ |
338 | 338 | </v-container> |
339 | 339 | </v-tab-item> |
340 | 340 | </v-tabs> |
341 | + <div class="loader" v-if="showLoader"> | |
342 | + <v-progress-circular indeterminate color="white"></v-progress-circular> | |
343 | + </div> | |
341 | 344 | </v-app> |
342 | 345 | </template> |
343 | 346 | |
... | ... | @@ -353,6 +356,7 @@ export default { |
353 | 356 | mode: "", |
354 | 357 | timeout: 3000, |
355 | 358 | text: "", |
359 | + showLoader:false, | |
356 | 360 | loading: false, |
357 | 361 | date: null, |
358 | 362 | search: "", |
... | ... | @@ -457,6 +461,7 @@ export default { |
457 | 461 | } |
458 | 462 | }, |
459 | 463 | getEventList() { |
464 | + this.showLoader = true; | |
460 | 465 | var token = this.$store.state.token; |
461 | 466 | http() |
462 | 467 | .get("/getEventsList", { |
... | ... | @@ -464,11 +469,13 @@ export default { |
464 | 469 | }) |
465 | 470 | .then(response => { |
466 | 471 | this.desserts = response.data.data; |
472 | + this.showLoader = false; | |
467 | 473 | // console.log("getEventList=====>",this.desserts) |
468 | 474 | }) |
469 | 475 | .catch(err => { |
476 | + this.showLoader = false; | |
470 | 477 | // console.log("err====>", err); |
471 | - // this.$router.replace({ path: "/" }); | |
478 | + this.$router.replace({ path: "/" }); | |
472 | 479 | }); |
473 | 480 | }, |
474 | 481 | editItem(item) { | ... | ... |
src/pages/Reminder/reminder.vue
... | ... | @@ -332,6 +332,9 @@ |
332 | 332 | </v-container> |
333 | 333 | </v-tab-item> |
334 | 334 | </v-tabs> |
335 | + <div class="loader" v-if="showLoader"> | |
336 | + <v-progress-circular indeterminate color="white"></v-progress-circular> | |
337 | + </div> | |
335 | 338 | </v-app> |
336 | 339 | </template> |
337 | 340 | |
... | ... | @@ -350,6 +353,7 @@ export default { |
350 | 353 | loading: false, |
351 | 354 | date: null, |
352 | 355 | search: "", |
356 | + showLoader:false, | |
353 | 357 | menu: false, |
354 | 358 | menu1: false, |
355 | 359 | dialog: false, |
... | ... | @@ -429,25 +433,6 @@ export default { |
429 | 433 | } |
430 | 434 | }, |
431 | 435 | methods: { |
432 | - getSections(_id) { | |
433 | - // var token = this.$store.state.token; | |
434 | - // http() | |
435 | - // .get( | |
436 | - // "/getSectionsList", | |
437 | - // { params: { classId: _id } }, | |
438 | - // { | |
439 | - // headers: { Authorization: "Bearer " + token } | |
440 | - // } | |
441 | - // ) | |
442 | - // .then(response => { | |
443 | - // this.addSection = response.data.data; | |
444 | - // console.log("getSectionsList=====>", this.addSection); | |
445 | - // }) | |
446 | - // .catch(err => { | |
447 | - // // console.log("err====>", err); | |
448 | - // // this.$router.replace({ path: '/' }); | |
449 | - // }); | |
450 | - }, | |
451 | 436 | pickFile() { |
452 | 437 | this.$refs.image.click(); |
453 | 438 | }, |
... | ... | @@ -477,6 +462,7 @@ export default { |
477 | 462 | } |
478 | 463 | }, |
479 | 464 | getReminderList() { |
465 | + this.showLoader = true; | |
480 | 466 | var token = this.$store.state.token; |
481 | 467 | http() |
482 | 468 | .get("/getRemindersList", { |
... | ... | @@ -484,11 +470,13 @@ export default { |
484 | 470 | }) |
485 | 471 | .then(response => { |
486 | 472 | this.desserts = response.data.data; |
473 | + this.showLoader = false; | |
487 | 474 | // console.log("getRemindersList=====>",this.desserts) |
488 | 475 | }) |
489 | 476 | .catch(err => { |
490 | 477 | // console.log("err====>", err); |
491 | - // this.$router.replace({ path: "/" }); | |
478 | + this.showLoader = false; | |
479 | + this.$router.replace({ path: "/" }); | |
492 | 480 | }); |
493 | 481 | }, |
494 | 482 | editItem(item) { | ... | ... |
src/pages/Students/students.vue
... | ... | @@ -1085,6 +1085,9 @@ |
1085 | 1085 | </v-container> |
1086 | 1086 | </v-tab-item> |
1087 | 1087 | </v-tabs> |
1088 | + <div class="loader" v-if="showLoader"> | |
1089 | + <v-progress-circular indeterminate color="white"></v-progress-circular> | |
1090 | + </div> | |
1088 | 1091 | </v-app> |
1089 | 1092 | </template> |
1090 | 1093 | |
... | ... | @@ -1100,6 +1103,7 @@ export default { |
1100 | 1103 | mode: "", |
1101 | 1104 | timeout: 3000, |
1102 | 1105 | text: "", |
1106 | + showLoader:false, | |
1103 | 1107 | loading: false, |
1104 | 1108 | date: null, |
1105 | 1109 | search: "", |
... | ... | @@ -1493,6 +1497,7 @@ export default { |
1493 | 1497 | } |
1494 | 1498 | }, |
1495 | 1499 | getStudentList() { |
1500 | + this.showLoader = true; | |
1496 | 1501 | var token = this.$store.state.token; |
1497 | 1502 | http() |
1498 | 1503 | .get("/getStudentsList", { |
... | ... | @@ -1500,10 +1505,12 @@ export default { |
1500 | 1505 | }) |
1501 | 1506 | .then(response => { |
1502 | 1507 | this.desserts = response.data.data; |
1508 | + this.showLoader = false; | |
1503 | 1509 | // console.log("getStudentList=====>",this.desserts) |
1504 | 1510 | }) |
1505 | 1511 | .catch(err => { |
1506 | 1512 | // console.log("err====>", err); |
1513 | + this.showLoader = false; | |
1507 | 1514 | this.$router.replace({ path: "/" }); |
1508 | 1515 | }); |
1509 | 1516 | }, | ... | ... |
src/pages/Teachers/teachers.vue
... | ... | @@ -828,6 +828,9 @@ |
828 | 828 | </v-container> |
829 | 829 | </v-tab-item> |
830 | 830 | </v-tabs> |
831 | + <div class="loader" v-if="showLoader"> | |
832 | + <v-progress-circular indeterminate color="white"></v-progress-circular> | |
833 | + </div> | |
831 | 834 | </v-app> |
832 | 835 | </template> |
833 | 836 | |
... | ... | @@ -848,6 +851,7 @@ export default { |
848 | 851 | mode: "", |
849 | 852 | timeout: 3000, |
850 | 853 | text: "", |
854 | + showLoader:false, | |
851 | 855 | loading: false, |
852 | 856 | date: null, |
853 | 857 | search: "", |
... | ... | @@ -1205,6 +1209,7 @@ export default { |
1205 | 1209 | } |
1206 | 1210 | }, |
1207 | 1211 | getTeacherList() { |
1212 | + this.showLoader = true; | |
1208 | 1213 | var token = this.$store.state.token; |
1209 | 1214 | http() |
1210 | 1215 | .get("/getTeachersList", { |
... | ... | @@ -1212,10 +1217,12 @@ export default { |
1212 | 1217 | }) |
1213 | 1218 | .then(response => { |
1214 | 1219 | this.desserts = response.data.data; |
1220 | + this.showLoader = false; | |
1215 | 1221 | // console.log("getTeacherList=====>",this.desserts) |
1216 | 1222 | }) |
1217 | 1223 | .catch(err => { |
1218 | 1224 | // console.log("err====>", err); |
1225 | + this.showLoader = false; | |
1219 | 1226 | this.$router.replace({ path: "/" }); |
1220 | 1227 | }); |
1221 | 1228 | }, | ... | ... |