From 3816c82ec6ee39fd3b2d801841a15b3f1e4b6c12 Mon Sep 17 00:00:00 2001 From: Neeraj Sharma Date: Tue, 16 Apr 2019 13:32:48 +0530 Subject: [PATCH] add select time by time-picker in Time Table --- src/pages/TimeTable/timeTable.vue | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pages/TimeTable/timeTable.vue b/src/pages/TimeTable/timeTable.vue index 9e625ab..bcabe42 100644 --- a/src/pages/TimeTable/timeTable.vue +++ b/src/pages/TimeTable/timeTable.vue @@ -282,7 +282,7 @@ - + Edit Lecture @@ -848,9 +848,11 @@ timeOut: null, subjectName: "", teacherId: "", + }, + updateLecturesId:{ lectureId: "", scheduleId: "" - }, + }, menu1: false, menu2: false, menu3: false, @@ -990,13 +992,12 @@ classToUpdate.schedule ); for (let i = 0; i < classToUpdate.schedule.length; i++) { - this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; + this.updateLecturesId.scheduleId = classToUpdate.schedule[i]._id; } - (this.updateLectures.lectureId = timeToUpdate._id), - (this.updateLectures = timeToUpdate); - this.updateLectures.timeIn = this.updateLectures.timeIn.substring(11,15) - this.updateLectures.timeOut = this.updateLectures.timeOut.substring(11,15) - // console.log("updateLectures",this.updateLectures) + this.updateLecturesId.lectureId = timeToUpdate._id, + this.updateLectures = timeToUpdate; + console.log("updateLectures",this.updateLectures) + console.log("updateLectures",this.updateLecturesId) this.dialogUpdateLectures = true; }, addLecture(scheduleId, timeTableId) { @@ -1016,6 +1017,7 @@ this.text = "New Add Lecture successfully"; } this.closedialogLecture(); + // this.$router.go(0); }) .catch(error => { if ((this.snackbar = true)) { @@ -1028,8 +1030,8 @@ }, updateParticularTable() { let EditLecture = { - lectureId: this.updateLectures.lectureId, - scheduleId: this.updateLectures.scheduleId, + lectureId: this.updateLecturesId.lectureId, + scheduleId: this.updateLecturesId.scheduleId, updatedLecture: { timeIn: this.updateLectures.timeIn, timeOut: this.updateLectures.timeOut, @@ -1037,7 +1039,7 @@ teacherId: this.updateLectures.teacherId } }; - console.log("updateLecture", EditLecture); + console.log("EditLecture", EditLecture); http() .put("/updateLecture", EditLecture) .then(response => { -- 2.0.0