From 9d0f438058f40e3eb91ab511d318160dd06f4549 Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Thu, 20 Aug 2020 11:53:39 +0530 Subject: [PATCH] show list of added while adding time table and routine --- src/pages/Academic/routine.vue | 26 ++++++++++++++++++++++++-- src/pages/TimeTable/timeTable.vue | 20 +++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/pages/Academic/routine.vue b/src/pages/Academic/routine.vue index 4370a8c..c716c7e 100644 --- a/src/pages/Academic/routine.vue +++ b/src/pages/Academic/routine.vue @@ -742,11 +742,33 @@ export default { http() .post("/createRoutine", routineData) .then((response) => { - this.getRoutineList(); this.text = "Routine added successfully"; - this.clear(); + // this.clear(); this.snackbar = true; this.color = "green"; + console.log("===this.addRoutine===", this.addRoutine); + http() + .get( + "/getRoutineList", + { + params: { + classId: this.addRoutine.classId, + sectionId: this.addRoutine.sectionId, + }, + }, + { + headers: { Authorization: "Bearer " + this.token }, + } + ) + .then((response) => { + this.routineList = response.data.data; + this.showLoader = false; + this.showTable = true; + this.hideTable = false; + }) + .catch((err) => { + console.log("err====>", err); + }); this.addRoutineDialog = false; }) .catch((error) => { diff --git a/src/pages/TimeTable/timeTable.vue b/src/pages/TimeTable/timeTable.vue index 81df41b..9175918 100644 --- a/src/pages/TimeTable/timeTable.vue +++ b/src/pages/TimeTable/timeTable.vue @@ -1334,7 +1334,25 @@ export default { this.text = "New Time Table added successfully"; } this.color = "green"; - this.clear(); + // this.clear(); + http() + .get("/getParticularClassTimeTable", { + params: { + classId: this.timeTable.select, + sectionId: this.timeTable.selectSection, + }, + }) + .then((response) => { + this.desserts = response.data.data; + this.showData = true; + this.loadingFindData = false; + }) + .catch((error) => { + this.loadingFindData = false; + this.snackbar = true; + this.text = error.response.data.message; + this.text = error.response.data.statusText; + }); this.addTimeTableDialog = false; this.loading = false; }) -- 2.0.0