From fc9854ffb884eae820f8f20f45a754015c73c039 Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Thu, 20 Aug 2020 18:08:33 +0530 Subject: [PATCH] Show list of added data after adding the exam schedule --- src/pages/Exam/examSchedule.vue | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/pages/Exam/examSchedule.vue b/src/pages/Exam/examSchedule.vue index 8160d34..734cee8 100644 --- a/src/pages/Exam/examSchedule.vue +++ b/src/pages/Exam/examSchedule.vue @@ -869,9 +869,32 @@ export default { this.snackbar = true; this.text = response.data.message; this.color = "green"; + http() + .get("/getSchedulesList", { + params: { + classId: this.addSchedule.classId, + sectionId: this.addSchedule.sectionId, + }, + headers: { Authorization: "Bearer " + this.token }, + }) + .then((response) => { + this.ScheduleData = response.data.data; + this.showLoader = false; + }) + .catch((error) => { + this.showLoader = false; + this.loadingSearch = false; + this.snackbar = true; + this.color = "error"; + this.text = error.response.data.message; + if (error.response.status === 401) { + this.$router.replace({ path: "/" }); + this.$store.dispatch("setToken", null); + this.$store.dispatch("Id", null); + } + }); this.addExamScheduleDialog = false; - this.getSchedulesList(); - this.clear(); + // this.clear(); }) .catch((error) => { this.snackbar = true; -- 2.0.0