Commit 3816c82ec6ee39fd3b2d801841a15b3f1e4b6c12
1 parent
fe582921b6
Exists in
master
and in
3 other branches
add select time by time-picker in Time Table
Showing
1 changed file
with
13 additions
and
11 deletions
Show diff stats
src/pages/TimeTable/timeTable.vue
... | ... | @@ -282,7 +282,7 @@ |
282 | 282 | |
283 | 283 | <v-dialog v-model="dialogUpdateLectures" max-width="1000px"> |
284 | 284 | <v-flex xs12 sm12 class> |
285 | - <v-toolbar color="white"> | |
285 | + <v-toolbar color="grey lighten-2"> | |
286 | 286 | <v-spacer></v-spacer> |
287 | 287 | <v-toolbar-title>Edit Lecture</v-toolbar-title> |
288 | 288 | <v-spacer></v-spacer> |
... | ... | @@ -848,9 +848,11 @@ |
848 | 848 | timeOut: null, |
849 | 849 | subjectName: "", |
850 | 850 | teacherId: "", |
851 | + }, | |
852 | + updateLecturesId:{ | |
851 | 853 | lectureId: "", |
852 | 854 | scheduleId: "" |
853 | - }, | |
855 | + }, | |
854 | 856 | menu1: false, |
855 | 857 | menu2: false, |
856 | 858 | menu3: false, |
... | ... | @@ -990,13 +992,12 @@ |
990 | 992 | classToUpdate.schedule |
991 | 993 | ); |
992 | 994 | for (let i = 0; i < classToUpdate.schedule.length; i++) { |
993 | - this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; | |
995 | + this.updateLecturesId.scheduleId = classToUpdate.schedule[i]._id; | |
994 | 996 | } |
995 | - (this.updateLectures.lectureId = timeToUpdate._id), | |
996 | - (this.updateLectures = timeToUpdate); | |
997 | - this.updateLectures.timeIn = this.updateLectures.timeIn.substring(11,15) | |
998 | - this.updateLectures.timeOut = this.updateLectures.timeOut.substring(11,15) | |
999 | - // console.log("updateLectures",this.updateLectures) | |
997 | + this.updateLecturesId.lectureId = timeToUpdate._id, | |
998 | + this.updateLectures = timeToUpdate; | |
999 | + console.log("updateLectures",this.updateLectures) | |
1000 | + console.log("updateLectures",this.updateLecturesId) | |
1000 | 1001 | this.dialogUpdateLectures = true; |
1001 | 1002 | }, |
1002 | 1003 | addLecture(scheduleId, timeTableId) { |
... | ... | @@ -1016,6 +1017,7 @@ |
1016 | 1017 | this.text = "New Add Lecture successfully"; |
1017 | 1018 | } |
1018 | 1019 | this.closedialogLecture(); |
1020 | + // this.$router.go(0); | |
1019 | 1021 | }) |
1020 | 1022 | .catch(error => { |
1021 | 1023 | if ((this.snackbar = true)) { |
... | ... | @@ -1028,8 +1030,8 @@ |
1028 | 1030 | }, |
1029 | 1031 | updateParticularTable() { |
1030 | 1032 | let EditLecture = { |
1031 | - lectureId: this.updateLectures.lectureId, | |
1032 | - scheduleId: this.updateLectures.scheduleId, | |
1033 | + lectureId: this.updateLecturesId.lectureId, | |
1034 | + scheduleId: this.updateLecturesId.scheduleId, | |
1033 | 1035 | updatedLecture: { |
1034 | 1036 | timeIn: this.updateLectures.timeIn, |
1035 | 1037 | timeOut: this.updateLectures.timeOut, |
... | ... | @@ -1037,7 +1039,7 @@ |
1037 | 1039 | teacherId: this.updateLectures.teacherId |
1038 | 1040 | } |
1039 | 1041 | }; |
1040 | - console.log("updateLecture", EditLecture); | |
1042 | + console.log("EditLecture", EditLecture); | |
1041 | 1043 | http() |
1042 | 1044 | .put("/updateLecture", EditLecture) |
1043 | 1045 | .then(response => { | ... | ... |