diff --git a/src/api/menu.js b/src/api/menu.js index 4ccaa03..9f202fb 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -64,6 +64,7 @@ const adminMenu = [ items: [ { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, + { name: 'courseAttendance', title: 'Course Attendance', component: 'Course Attendance', action: '', }, // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, ] }, @@ -350,6 +351,7 @@ const teacherMenu = [{ items: [ { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', }, + { name: 'courseAttendance', title: 'Course Attendance', component: 'Course Attendance', action: '', }, // { name: 'userAttendence', title: 'User Attendance', component: 'User Attendence', action: '', }, ] }, diff --git a/src/pages/Attendence/courseAttendance.vue b/src/pages/Attendence/courseAttendance.vue new file mode 100644 index 0000000..c1cbdc9 --- /dev/null +++ b/src/pages/Attendence/courseAttendance.vue @@ -0,0 +1,200 @@ + + + \ No newline at end of file diff --git a/src/pages/Attendence/viewCourseAttendance.vue b/src/pages/Attendence/viewCourseAttendance.vue new file mode 100644 index 0000000..57d8092 --- /dev/null +++ b/src/pages/Attendence/viewCourseAttendance.vue @@ -0,0 +1,283 @@ + + + + + + \ No newline at end of file diff --git a/src/pages/Dashboard/LiveOnlineClass.vue b/src/pages/Dashboard/LiveOnlineClass.vue index e0b35be..1e6b723 100644 --- a/src/pages/Dashboard/LiveOnlineClass.vue +++ b/src/pages/Dashboard/LiveOnlineClass.vue @@ -165,6 +165,7 @@ export default { appLink: "", showStartSessionButton: true, showJoinSessionButton: true, + courseAttendanceId: {}, }; }, methods: { @@ -373,6 +374,8 @@ export default { http() .post("/createCourseAttendance", attendenceData) .then((response) => { + this.courseAttendanceId = response.data.data._id; + this.updateCourseAttendance(); this.loading = false; // this.snackbar = true; // this.color = "green"; @@ -397,6 +400,22 @@ export default { this.showLoader = false; }); }, + updateCourseAttendance() { + this.showLoader = true; + var payloadData = { + courseAttendanceId: this.courseAttendanceId, + liveClassId: this.attendenceLiveClassId, + endTime: this.formatAMPM(new Date()), + }; + http() + .put("/updateCourseAttendance", payloadData) + .then((response) => { + this.showLoader = false; + }) + .catch((error) => { + this.showLoader = false; + }); + }, async studentClasses() { this.liveLink = ""; this.room = ""; diff --git a/src/router/paths.js b/src/router/paths.js index 5d039c9..0d8ea39 100644 --- a/src/router/paths.js +++ b/src/router/paths.js @@ -486,6 +486,20 @@ export default [{ ) }, { + path: '/AttendanceCourse', + meta: {}, + name: 'Course Attendance', + props: (route) => ({ + type: route.query.type + }), + component: () => + import( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Attendence/courseAttendance.vue` + ) +}, +{ path: '/salaryTemplate', meta: {}, name: 'Salary Template', @@ -712,6 +726,20 @@ export default [{ ) }, { + path: '/CourseAttendance/:id', + meta: {}, + name: 'View Course Attendance', + props: (route) => ({ + type: route.query.type + }), + component: () => + import( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Attendence/viewCourseAttendance.vue` + ) +}, +{ path: '/viewInvoice/:viewInvoiceId', meta: {}, name: 'View Invoice',