From ba420d0d1cf286e7d7db6943fb815bf6ecd4f713 Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Mon, 24 Aug 2020 15:51:35 +0530 Subject: [PATCH] Solve add subject issue subject was not adding without refreshing page, Make teacher and parent viewable while viweing teacher's and parent's detail, Show file name and make that file downloadable in notice board screen, Show school logo while printing student report, Student report data was not showing at some times issue solved and Hide meet link from teacher dashboard --- src/api/menu.js | 12 ++-- src/pages/Academic/routine.vue | 9 +-- src/pages/Academic/subject.vue | 10 ++-- src/pages/Academic/syllabus.vue | 2 +- src/pages/Account/editInvoice.vue | 4 +- src/pages/Account/invoice.vue | 5 +- src/pages/Account/viewInvoice.vue | 40 +++++++------- src/pages/NoticeBoard/noticeBoard.vue | 71 +++++++++++++++--------- src/pages/Parent/parents.vue | 2 +- src/pages/Report/studentReport.vue | 100 ++++++++++++++++++++-------------- src/pages/Teachers/teachers.vue | 2 +- src/router/paths.js | 28 +++++----- 12 files changed, 161 insertions(+), 124 deletions(-) diff --git a/src/api/menu.js b/src/api/menu.js index 4df4f42..0110dd5 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -19,7 +19,7 @@ const adminMenu = [ icon: '/static/icon/attendence.png', items: [ { name: 'AssignTeachers', title: 'Assign Teachers', component: 'AssignTeachers', action: '', }, - + ] }, { @@ -395,11 +395,11 @@ const teacherMenu = [{ ] }, -{ - title: 'Meet', - name: 'Meet', - icon: '/static/icon/meet_icon_navigation.png', -} + // { + // title: 'Meet', + // name: 'Meet', + // icon: '/static/icon/meet_icon_navigation.png', + // } ]; const parentMenu = [{ diff --git a/src/pages/Academic/routine.vue b/src/pages/Academic/routine.vue index dcd956f..6302ba7 100644 --- a/src/pages/Academic/routine.vue +++ b/src/pages/Academic/routine.vue @@ -681,8 +681,6 @@ export default { }, methods: { editItem(item, routineData) { - console.log("routineData", routineData); - console.log("item", item); this.editedIndex = this.routineList; this.editedItem = Object.assign({}, item); this.editedItem.lectureRoutineId = item._id; @@ -746,7 +744,7 @@ export default { // this.clear(); this.snackbar = true; this.color = "green"; - console.log("===this.addRoutine===", this.addRoutine); + // console.log("===this.addRoutine===", this.addRoutine); http() .get( "/getRoutineList", @@ -767,7 +765,10 @@ export default { this.hideTable = false; }) .catch((err) => { - console.log("err====>", err); + // console.log("err====>", err); + this.snackbar = true; + this.text = error.response.data.message; + this.color = "error"; }); this.addRoutineDialog = false; }) diff --git a/src/pages/Academic/subject.vue b/src/pages/Academic/subject.vue index 65db5a4..1156616 100644 --- a/src/pages/Academic/subject.vue +++ b/src/pages/Academic/subject.vue @@ -671,10 +671,10 @@ export default { this.getClassSubject(this.addSubject.classId); }) .catch((error) => { - // this.snackbar = true; - // this.text = error.response.data.message; - // this.color = "error"; - console.log("error", error); + this.snackbar = true; + this.text = error.response.data.message; + this.color = "error"; + // console.log("error", error); }); }, close() { @@ -738,7 +738,7 @@ export default { }, getClassSubject(_id) { this.showLoader = true; - console.log("class", _id); + // console.log("class", _id); // this.classId = this.classId; http() .get( diff --git a/src/pages/Academic/syllabus.vue b/src/pages/Academic/syllabus.vue index a080b3b..773b20d 100644 --- a/src/pages/Academic/syllabus.vue +++ b/src/pages/Academic/syllabus.vue @@ -669,7 +669,7 @@ export default { this.close(); }) .catch((err) => { - console.log("err====>", err); + // console.log("err====>", err); this.text = error.response.data.message; this.color = "error"; }); diff --git a/src/pages/Account/editInvoice.vue b/src/pages/Account/editInvoice.vue index 2f0bd10..e5e5fe5 100644 --- a/src/pages/Account/editInvoice.vue +++ b/src/pages/Account/editInvoice.vue @@ -48,7 +48,7 @@ { - console.log(error); + // console.log(error); this.snackbar = true; this.text = error.response.data.message; color: "red"; diff --git a/src/pages/Account/invoice.vue b/src/pages/Account/invoice.vue index 5d2eee2..a0f0a20 100644 --- a/src/pages/Account/invoice.vue +++ b/src/pages/Account/invoice.vue @@ -693,7 +693,6 @@ export default { // console.log("item", item); this.editedIndex = this.invoiceList.indexOf(item); this.editedItem = Object.assign({}, item); - console.log("editedItem", this.editedItem); this.dialog1 = true; }, editItem(item) { @@ -895,7 +894,7 @@ export default { this.feeTypeData.push({ feeTypeName: this.feeType.feeTypeName }); }, deleteSelectFee: function (index, feeTyp) { - console.log("---index----", index); + // console.log("---index----", index); this.feeTypeData.splice(index, 1); this.getAmmountDetails(feeTyp); if (this.feeTypeData.length == 0) { @@ -938,7 +937,7 @@ export default { name: "Select All", _id: "Select All", }); - console.log("=======studentist====", this.studentList); + // console.log("=======studentist====", this.studentList); this.showLoader = false; }) .catch((err) => { diff --git a/src/pages/Account/viewInvoice.vue b/src/pages/Account/viewInvoice.vue index f773acf..5cf2446 100644 --- a/src/pages/Account/viewInvoice.vue +++ b/src/pages/Account/viewInvoice.vue @@ -318,25 +318,25 @@ export default { discount: "", totalPaidAmount: "", subTotal: "", - feeTypeName: "" + feeTypeName: "", }, feeTypeData: [], token: "", invoiceParticularData: { studentId: { - name: "" + name: "", }, classId: { - classNum: "" - } + classNum: "", + }, }, userData: { - name: "" - } + name: "", + }, }), methods: { - dates: function(date) { + dates: function (date) { return moment(date).format("MMMM DD, YYYY"); }, getInvoiceList() { @@ -344,11 +344,11 @@ export default { .get("/getParticularInvoice", { params: { invoiceId: this.$route.params.viewInvoiceId, - schoolId: this.$store.state.schoolId + schoolId: this.$store.state.schoolId, }, - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, }) - .then(response => { + .then((response) => { this.invoiceParticularData = response.data.data; this.invoiceData = this.invoiceParticularData; this.invoiceData.date = this.invoiceParticularData.date.slice(0, 10); @@ -359,7 +359,7 @@ export default { (this.feeType.totalPaidAmount = response.data.data.totalPaidAmount); this.showLoader = false; }) - .catch(error => { + .catch((error) => { this.showLoader = false; if (error.response.status === 401) { this.$router.replace({ path: "/" }); @@ -373,12 +373,12 @@ export default { http() .get("/getFeesList", { params: { schoolId: this.$store.state.schoolId }, - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, }) - .then(response => { + .then((response) => { this.feeTypes = response.data.data; }) - .catch(err => { + .catch((err) => { // console.log("err====>", err); }); }, @@ -386,7 +386,7 @@ export default { let feeType = { subTotal: "", subParticularTotal: "", - paidAmount: "" + paidAmount: "", }; // *********** SUBTOTAL *********** feeType.subTotal = @@ -404,17 +404,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); } }); - } + }, }, mounted() { this.token = this.$store.state.token; @@ -423,14 +423,14 @@ export default { this.getUserData(); }, created() { - this.$root.$on("app:search", search => { + this.$root.$on("app:search", (search) => { this.search = search; }); }, beforeDestroy() { // dont forget to remove the listener this.$root.$off("app:search"); - } + }, }; diff --git a/src/pages/NoticeBoard/noticeBoard.vue b/src/pages/NoticeBoard/noticeBoard.vue index cb72ff2..2d29694 100644 --- a/src/pages/NoticeBoard/noticeBoard.vue +++ b/src/pages/NoticeBoard/noticeBoard.vue @@ -213,12 +213,20 @@ {{ props.item.title}} - {{ props.item.fileType }} + >{{ props.item.fileType }}--> + +
{{props.item.fileName}}
+
@@ -263,7 +271,12 @@ >Your search for "{{ search }}" found no results. - + @@ -401,6 +414,7 @@ export default { pagination: { rowsPerPage: 10, }, + imageData: {}, imageName: "", imageUrl: "", imageFile: "", @@ -440,14 +454,14 @@ export default { }, }), watch: { - addNoticeBoardDialog: function (val) { - if (!val) { - this.addNoticeBoard = []; - this.imageName = ""; - this.imageFile = ""; - this.imageUrl = ""; - } - }, + // addNoticeBoardDialog: function (val) { + // if (!val) { + // this.addNoticeBoard = []; + // this.imageName = ""; + // this.imageFile = ""; + // this.imageUrl = ""; + // } + // }, }, methods: { pickFile() { @@ -522,13 +536,13 @@ export default { }, submit() { var signatures = { - JVBERi0: "other", - iVBORw0KGgo: "image", - UEsDBBQ: "other", - "/": "image", - AAABAA: "image", - IywiV2hhdC: "other", - bmFtZSxl: "other", + // JVBERi0: "other", + // iVBORw0KGgo: "image", + // UEsDBBQ: "other", + // "/": "image", + // AAABAA: "image", + // IywiV2hhdC: "other", + // bmFtZSxl: "other", }; function detectMimeType(b64) { for (var s in signatures) { @@ -596,12 +610,12 @@ export default { fileName: this.imageName, }; var signatures = { - JVBERi0: "other", - iVBORw0KGgo: "image", - UEsDBBQ: "other", - "/": "image", - AAABAA: "image", - IywiV2hhdC: "other", + // JVBERi0: "other", + // iVBORw0KGgo: "image", + // UEsDBBQ: "other", + // "/": "image", + // AAABAA: "image", + // IywiV2hhdC: "other", }; function detectMimeType(b64) { for (var s in signatures) { @@ -659,4 +673,11 @@ export default { this.getNoticeDataList(); }, }; - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/pages/Parent/parents.vue b/src/pages/Parent/parents.vue index d349b3b..cf9807a 100644 --- a/src/pages/Parent/parents.vue +++ b/src/pages/Parent/parents.vue @@ -312,7 +312,7 @@ - + diff --git a/src/pages/Report/studentReport.vue b/src/pages/Report/studentReport.vue index 7701f21..3d8bc8d 100644 --- a/src/pages/Report/studentReport.vue +++ b/src/pages/Report/studentReport.vue @@ -224,7 +224,9 @@ {{ props.item.rollNo }} {{ props.item.email }} {{ props.item.classId.classNum }} - {{ props.item.sectionId.name }} + {{ props.item.sectionId ? props.item.sectionId.name: '-' }} - logo + + + + +

{{ userData.name }}

{{ userData.address }}

@@ -280,9 +289,10 @@ {{ studentReport.classId.classNum }} - {{ studentReport.sectionId.name }} + + {{ studentReport.sectionId ? studentReport.sectionId.name: '-' + }} + @@ -326,59 +336,59 @@ export default { hidePrintStudentReport: false, addSection: [], pagination: { - rowsPerPage: 10 + rowsPerPage: 10, }, - formRules: [v => !!v || "Form For is required"], - bloodGroupRules: [v => !!v || "Blood group is required"], - classRules: [v => !!v || "Class is required"], - sectionRules: [v => !!v || "Class is required"], - genderRules: [v => !!v || "Gender is required"], - routeRules: [v => !!v || "RouteI is required"], - hostelRules: [v => !!v || "Hostel is required"], - countryRules: [v => !!v || "Country is required"], + formRules: [(v) => !!v || "Form For is required"], + bloodGroupRules: [(v) => !!v || "Blood group is required"], + classRules: [(v) => !!v || "Class is required"], + sectionRules: [(v) => !!v || "Class is required"], + genderRules: [(v) => !!v || "Gender is required"], + routeRules: [(v) => !!v || "RouteI is required"], + hostelRules: [(v) => !!v || "Hostel is required"], + countryRules: [(v) => !!v || "Country is required"], headers: [ { align: "", text: "No", sortable: false, - value: "No" + value: "No", }, { text: "Profile Pic", vaue: "profilePicUrl", sortable: false, - align: "center" + align: "center", }, { text: "Name", vaue: "name", sortable: false, - align: "center" + align: "center", }, { text: "Roll No.", value: "rollNo", sortable: false, - align: "center" + align: "center", }, { text: "Email", value: "email", sortable: false, - align: "center" + align: "center", }, { text: "Class", value: "classId", sortable: false, - align: "center" + align: "center", }, { text: "Section", value: "sectionId", sortable: false, - align: "center" - } + align: "center", + }, ], classList: [], report: {}, @@ -387,12 +397,12 @@ export default { formList: [ { name: "Blood Group", - value: "bloodGroup" + value: "bloodGroup", }, "Country", "Gender", "Transport", - "Hostel" + "Hostel", // "Birthday" ], bloodGroupList: ["A+", "A-", "B+", "B-", "O+", "O-", "AB+", "AB-"], @@ -403,7 +413,7 @@ export default { route: [], Hostel: [], hostelList: [], - token: "" + token: "", }), methods: { clear() { @@ -413,13 +423,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(err => { + .catch((err) => { this.showLoader = false; if (error.response.status === 401) { this.$router.replace({ path: "/" }); @@ -496,20 +506,23 @@ export default { country: this.report.country, gender: this.report.gender, classId: this.report.classId, - sectionId: this.report.sectionId + sectionId: this.report.sectionId, }, - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, }) - .then(response => { + .then((response) => { this.getStudentsReportList = response.data.data; this.showTable = true; this.showLoader = false; this.clear(); // console.log("getSectionsList=====>", response.data.data); }) - .catch(error => { - console.log("err====>", error); + .catch((error) => { + // console.log("err====>", error); this.showLoader = false; + this.snackbar = true; + this.color = "error"; + this.text = error.response.data.message; }); } }, @@ -521,16 +534,19 @@ export default { "/getSectionsList", { params: { classId: this.report.classId } }, { - headers: { Authorization: "Bearer " + this.token } + headers: { Authorization: "Bearer " + this.token }, } ) - .then(response => { + .then((response) => { this.addSection = response.data.data; this.showLoader = false; }) - .catch(error => { - console.log("err====>", error); + .catch((error) => { + // console.log("err====>", error); this.showLoader = false; + this.snackbar = true; + this.color = "error"; + this.text = error.response.data.message; }); }, // getFormList() { @@ -561,17 +577,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); // } }); - } + }, }, mounted() { this.token = this.$store.state.token; @@ -583,14 +599,14 @@ export default { this.getClass(); }, created() { - this.$root.$on("app:search", search => { + this.$root.$on("app:search", (search) => { this.search = search; }); }, beforeDestroy() { // dont forget to remove the listener this.$root.$off("app:search"); - } + }, };