From add6421d55951776a8edf5c86d5ac309e0acf509 Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Mon, 17 Aug 2020 14:37:46 +0530 Subject: [PATCH] Improve updateCourseDetail API and improve design in course detail screen --- src/pages/Course/courseDetail.vue | 130 ++++++++++++++++++++------------------ src/pages/Report/admitCard.vue | 103 +++++++++++++++--------------- 2 files changed, 118 insertions(+), 115 deletions(-) diff --git a/src/pages/Course/courseDetail.vue b/src/pages/Course/courseDetail.vue index ecc07e5..787a829 100644 --- a/src/pages/Course/courseDetail.vue +++ b/src/pages/Course/courseDetail.vue @@ -421,73 +421,77 @@ - - - - - - add + + + + add + + + + addAdd Course Detail + + + + + + + + + - - - - - - + + + + icon + + + - - - - icon - - - + +
+ +
+
+ close +
+
+
- -
- -
-
- close -
-
-
-
@@ -142,7 +141,7 @@

{{ userData.name }}

-

{{ userData.address }}, {{ userData.pinCode }}

+

{{ userData.address }} {{ userData.pinCode }}

{{ getScheduleList.scheduleData[0].examId.examName }} Exam Admit Card

@@ -157,18 +156,18 @@ v-if="!getScheduleList.studentData.profilePicUrl" src="/static/icon/user.png" style="widht:80px;" - /> --> + />--> - + src="/static/icon/user.png" + v-if="!getScheduleList.studentData.profilePicUrl" + width="80" + /> + @@ -378,15 +377,15 @@ export default { showTable: false, showData: false, hideprintAdmitReport: false, - examRules: [v => !!v || "Exam Field is required"], - classRules: [v => !!v || "Class Field Required"], - sectionRules: [v => !!v || "Section Field is required"], - studentRules: [v => !!v || "Student Field is required"], - typeRules: [v => !!v || "Type Field is required"], - backgroundRules: [v => !!v || "Background Field is required"], + examRules: [(v) => !!v || "Exam Field is required"], + classRules: [(v) => !!v || "Class Field Required"], + sectionRules: [(v) => !!v || "Section Field is required"], + studentRules: [(v) => !!v || "Student Field is required"], + typeRules: [(v) => !!v || "Type Field is required"], + backgroundRules: [(v) => !!v || "Background Field is required"], pagination: { - rowsPerPage: 10 + rowsPerPage: 10, }, search: "", @@ -403,12 +402,12 @@ export default { typeList: [ { name: "Front Part", - value: "frontPart" + value: "frontPart", }, { name: "Back Part", - value: "backPart" - } + value: "backPart", + }, ], backgroundList: ["Yes", "No"], headers: [ @@ -416,33 +415,33 @@ export default { text: "No", align: "", sortable: false, - value: "No" + value: "No", }, { text: "Exam Date", align: "center", sortable: false, - value: "date" + value: "date", }, { text: "Start Time", align: "center", sortable: false, - value: "timeFrom" + value: "timeFrom", }, { text: "End Time", align: "center", sortable: false, - value: "timeTo" + value: "timeTo", }, { text: "Subject Name", align: "center", sortable: false, - value: "subjectName" - } - ] + value: "subjectName", + }, + ], }), mounted() { @@ -458,14 +457,14 @@ export default { this.loadingSearch = true; http() .get("/getExamsList", { - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, }) - .then(response => { + .then((response) => { this.examData = response.data.data; this.showLoader = false; this.loadingSearch = false; }) - .catch(error => { + .catch((error) => { this.showLoader = false; this.loadingSearch = false; this.snackbar = true; @@ -481,13 +480,13 @@ export default { this.showLoader = true; http() .get("/getClassesList", { - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, }) - .then(response => { + .then((response) => { this.classList = response.data.data; this.showLoader = false; }) - .catch(error => { + .catch((error) => { this.showLoader = false; // console.log("err====>", err); }); @@ -499,14 +498,14 @@ export default { "/getSectionsList", { params: { classId: _id } }, { - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, } ) - .then(response => { + .then((response) => { this.addSection = response.data.data; this.showLoader = false; }) - .catch(err => { + .catch((err) => { this.showLoader = false; // console.log("err====>", err); }); @@ -517,14 +516,14 @@ export default { .get("/getStudentWithClass", { params: { classId: this.getReport.classId, - sectionId: this.getReport.sectionId - } + sectionId: this.getReport.sectionId, + }, }) - .then(response => { + .then((response) => { this.getStudentsList = response.data.data; this.showLoader = false; }) - .catch(error => { + .catch((error) => { console.log("err====>", error); this.showLoader = false; }); @@ -538,16 +537,16 @@ export default { examId: this.getReport.examId, classId: this.getReport.classId, sectionId: this.getReport.sectionId, - studentId: this.getReport.studentId - } + studentId: this.getReport.studentId, + }, }) - .then(response => { + .then((response) => { this.showTable = true; this.getScheduleList = response.data.data; if (response.data.data.scheduleData.length === 0) { this.showLoader = false; this.snackbar = true; - this.text = 'Data not found!'; + this.text = "Data not found!"; this.color = "error"; return; } @@ -562,7 +561,7 @@ export default { } this.showLoader = false; }) - .catch(error => { + .catch((error) => { this.showLoader = false; }); } @@ -575,17 +574,17 @@ export default { getUserData() { http() .get("/getParticularUserDetail") - .then(response => { + .then((response) => { this.userData = response.data.data; }) - .catch(error => { + .catch((error) => { if (error.response.status === 401) { this.$router.replace({ path: "/" }); this.$store.dispatch("setToken", null); this.$store.dispatch("Id", null); } }); - } + }, // created() { // this.$root.$on("app:search", search => { // this.search = search; @@ -595,7 +594,7 @@ export default { // // dont forget to remove the listener // this.$root.$off("app:search"); // } - } + }, };