From 575d7949244031c6103503f5875dd61b51481cc0 Mon Sep 17 00:00:00 2001 From: Shikha Mishra Date: Sat, 12 Sep 2020 13:13:14 +0530 Subject: [PATCH] show only students whose status is true in course attendance screen and fix issue of same student detail while viewing --- src/pages/Attendence/courseAttendance.vue | 2 +- src/pages/Attendence/viewCourseAttendance.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Attendence/courseAttendance.vue b/src/pages/Attendence/courseAttendance.vue index c1cbdc9..af6634e 100644 --- a/src/pages/Attendence/courseAttendance.vue +++ b/src/pages/Attendence/courseAttendance.vue @@ -175,7 +175,7 @@ export default { }, }) .then((response) => { - this.studentsData = response.data.data; + this.studentsData = response.data.data.filter((item) => item.status); this.showLoader = false; var attendance = ""; for (let i = 0; i < this.studentsData.length; i++) { diff --git a/src/pages/Attendence/viewCourseAttendance.vue b/src/pages/Attendence/viewCourseAttendance.vue index 907e0f1..da517bc 100644 --- a/src/pages/Attendence/viewCourseAttendance.vue +++ b/src/pages/Attendence/viewCourseAttendance.vue @@ -174,7 +174,7 @@ export default { }, getStudentAttendence() { this.showLoader = true; - var studentId = localStorage.getItem("parentStudentId"); + var studentId = this.$route.params.id || localStorage.getItem("parentStudentId"); http() .get( "/studentAttendance", @@ -197,7 +197,7 @@ export default { }); }, getStudentData() { - var particularStudentId = localStorage.getItem("parentStudentId"); + var particularStudentId = this.$route.params.id || localStorage.getItem("parentStudentId"); http() .get( "/getParticularStudentDetail", @@ -219,7 +219,7 @@ export default { }); }, getCourseAttendance(classId) { - var particularCourseStudentId = localStorage.getItem("parentStudentId"); + var particularCourseStudentId = this.$route.params.id || localStorage.getItem("parentStudentId"); http() .get( "/getStudentCourseAttendance", -- 2.0.0