Commit 9d0f438058f40e3eb91ab511d318160dd06f4549

Authored by Shikha Mishra
1 parent b372c241b2

show list of added while adding time table and routine

src/pages/Academic/routine.vue
... ... @@ -742,11 +742,33 @@ export default {
742 742 http()
743 743 .post("/createRoutine", routineData)
744 744 .then((response) => {
745   - this.getRoutineList();
746 745 this.text = "Routine added successfully";
747   - this.clear();
  746 + // this.clear();
748 747 this.snackbar = true;
749 748 this.color = "green";
  749 + console.log("===this.addRoutine===", this.addRoutine);
  750 + http()
  751 + .get(
  752 + "/getRoutineList",
  753 + {
  754 + params: {
  755 + classId: this.addRoutine.classId,
  756 + sectionId: this.addRoutine.sectionId,
  757 + },
  758 + },
  759 + {
  760 + headers: { Authorization: "Bearer " + this.token },
  761 + }
  762 + )
  763 + .then((response) => {
  764 + this.routineList = response.data.data;
  765 + this.showLoader = false;
  766 + this.showTable = true;
  767 + this.hideTable = false;
  768 + })
  769 + .catch((err) => {
  770 + console.log("err====>", err);
  771 + });
750 772 this.addRoutineDialog = false;
751 773 })
752 774 .catch((error) => {
... ...
src/pages/TimeTable/timeTable.vue
... ... @@ -1334,7 +1334,25 @@ export default {
1334 1334 this.text = "New Time Table added successfully";
1335 1335 }
1336 1336 this.color = "green";
1337   - this.clear();
  1337 + // this.clear();
  1338 + http()
  1339 + .get("/getParticularClassTimeTable", {
  1340 + params: {
  1341 + classId: this.timeTable.select,
  1342 + sectionId: this.timeTable.selectSection,
  1343 + },
  1344 + })
  1345 + .then((response) => {
  1346 + this.desserts = response.data.data;
  1347 + this.showData = true;
  1348 + this.loadingFindData = false;
  1349 + })
  1350 + .catch((error) => {
  1351 + this.loadingFindData = false;
  1352 + this.snackbar = true;
  1353 + this.text = error.response.data.message;
  1354 + this.text = error.response.data.statusText;
  1355 + });
1338 1356 this.addTimeTableDialog = false;
1339 1357 this.loading = false;
1340 1358 })
... ...