From 2fe1115d8acbc633d6271510df37dea1e0ba3d1a Mon Sep 17 00:00:00 2001 From: shikha Date: Wed, 5 Feb 2020 15:01:06 +0530 Subject: [PATCH] added csv button and fixed bugs --- src/api/menu.js | 34 ++++++++-------- src/pages/Attendence/studentAttendence.vue | 2 +- src/pages/Attendence/teacherAttendence.vue | 2 +- src/pages/Attendence/viewStudentsAttendence.vue | 2 +- src/pages/Attendence/viewTeacherAttendence.vue | 53 +++++++++++++------------ src/pages/Mark/mark.vue | 2 +- src/router/paths.js | 46 ++++++++++----------- 7 files changed, 71 insertions(+), 70 deletions(-) diff --git a/src/api/menu.js b/src/api/menu.js index f98dd02..6446186 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -52,8 +52,8 @@ const adminMenu = [ component: 'Attendance', icon: '/static/icon/attendence.png', items: [ - { name: 'StudentAttendence', title: 'Student Attendance', component: 'StudentAttendence', action: '', }, - { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'TeacherAttendence', action: '', } + { name: 'StudentAttendence', title: 'Student Attendance', component: 'Student Attendence', action: '', }, + { name: 'TeacherAttendence', title: 'Teacher Attendance', component: 'Teacher Attendence', action: '', } // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, ] }, @@ -64,7 +64,7 @@ const adminMenu = [ icon: '/static/icon/exam.png', items: [ { name: 'Exam', title: 'Exam', component: 'Exam', action: '', }, - { name: 'ExamSchedule', title: 'Exam Schedule', component: 'ExamSchedule', action: '', }, + { name: 'ExamSchedule', title: 'Exam Schedule', component: 'Exam Schedule', action: '', }, { name: 'Grade', title: 'Grade', component: 'Grade', action: '', }, // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, ] @@ -76,7 +76,7 @@ const adminMenu = [ icon: '/static/icon/marks.png', items: [ { name: 'Mark', title: 'Mark', component: 'Mark', action: '', }, - { name: 'MarkDistribution', title: 'Mark Distribution', component: 'MarkDistribution', action: '', }, + { name: 'MarkDistribution', title: 'Mark Distribution', component: 'Mark Distribution', action: '', }, { name: 'Promotion', title: 'promotion', component: 'Promotion', action: '', }, // { name: 'userAttendence', title: 'User Attendance', component: 'userAttendence', action: '', }, ] @@ -87,17 +87,17 @@ const adminMenu = [ component: 'Administrator', icon: '/static/icon/adminstrator.png', items: [ - { name: 'AcademicYear', title: 'Academic Year', component: 'AcademicYear', action: '', }, + { name: 'AcademicYear', title: 'Academic Year', component: 'Academic Year', action: '', }, // { name: 'systemAdmin', title: 'System Admin', component: 'systemAdmin', action: '', }, - { name: 'resetPassword', title: 'Reset Password', component: 'resetPassword', action: '', }, + { name: 'resetPassword', title: 'Reset Password', component: 'Reset Password', action: '', }, { name: 'Role', title: 'Role', component: 'Role', action: '', }, - { name: 'BulkImport', title: 'Bulk Import', component: 'BulkImport', action: '', }, + { name: 'BulkImport', title: 'Bulk Import', component: 'Bulk Import', action: '', }, ] }, { title: 'Notice Board', - name: 'NoticeBoard', + name: 'Notice Board', icon: '/static/icon/notice board.png', }, { @@ -112,7 +112,7 @@ const adminMenu = [ // }, { title: 'Time Table', - name: 'TimeTable', + name: 'Time Table', icon: '/static/icon/time table.png', }, { @@ -121,7 +121,7 @@ const adminMenu = [ component: 'Library', icon: '/static/icon/library.png', items: [ - { name: 'LibraryMember', title: ' Library Member', component: 'LibraryMember', action: '', }, + { name: 'LibraryMember', title: ' Library Member', component: 'Library Member', action: '', }, { name: 'Books', title: 'Books', component: 'Books', action: '', }, { name: 'Issue', title: ' Issue', component: 'Issue', action: '', }, { name: 'E-Books', title: 'E-Books', component: 'E-Books', action: '', } @@ -134,8 +134,8 @@ const adminMenu = [ component: 'Report', icon: '/static/icon/reports.png', items: [ - { name: 'studentReport', title: 'Student Report', component: 'studentReport', action: '', }, - { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'ProgressCardReport', action: '', } + { name: 'studentReport', title: 'Student Report', component: 'Student Report', action: '', }, + { name: 'ProgressCardReport', title: 'Progress Card Report', component: 'Progress Card Report', action: '', } ] }, { @@ -145,7 +145,7 @@ const adminMenu = [ }, { title: 'Social Media', - name: 'SocialMedia', + name: 'Social Media', icon: '/static/icon/dashboard icons-35.png', }, { @@ -164,12 +164,12 @@ const adminMenu = [ component: 'Account', icon: '/static/icon/accounts.png', items: [ - { name: 'feeTypes', title: 'Fee Types', component: 'feeTypes', action: '', }, + { name: 'feeTypes', title: 'Fee Types', component: 'Fee Types', action: '', }, { name: 'Invoice', title: 'Invoice', component: 'Invoice', action: '', }, - { name: 'PaymentHistory', title: 'Payment History', component: 'PaymentHistory', action: '', }, + { name: 'PaymentHistory', title: 'Payment History', component: 'Payment History', action: '', }, { name: 'Expense', title: 'Expense', component: 'Expense', action: '', }, { name: 'Income', title: 'Income', component: 'Income', action: '', }, - { name: 'GlobalPayment', title: 'Global Payment', component: 'GlobalPayment', action: '', } + { name: 'GlobalPayment', title: 'Global Payment', component: 'Global Payment', action: '', } ] }, { @@ -179,7 +179,7 @@ const adminMenu = [ }, { title: 'General Setting', - name: 'GeneralSetting', + name: 'General Setting', icon: '/static/icon/settings.png', } ]; diff --git a/src/pages/Attendence/studentAttendence.vue b/src/pages/Attendence/studentAttendence.vue index 54b814f..278e719 100644 --- a/src/pages/Attendence/studentAttendence.vue +++ b/src/pages/Attendence/studentAttendence.vue @@ -61,7 +61,7 @@ {{ props.item.rollNo}} {{ props.item.email }} - + {{ props.item.mobileNo }} diff --git a/src/pages/Attendence/viewStudentsAttendence.vue b/src/pages/Attendence/viewStudentsAttendence.vue index aa4b4f2..d422ad5 100644 --- a/src/pages/Attendence/viewStudentsAttendence.vue +++ b/src/pages/Attendence/viewStudentsAttendence.vue @@ -388,7 +388,7 @@ export default { ) .then(response => { this.json_data = response.data.data; - this.dialogExport = true; + this.dialogExport = false; }) .catch(err => { console.log("err====>", err); diff --git a/src/pages/Attendence/viewTeacherAttendence.vue b/src/pages/Attendence/viewTeacherAttendence.vue index 8e10bd7..6f06cae 100644 --- a/src/pages/Attendence/viewTeacherAttendence.vue +++ b/src/pages/Attendence/viewTeacherAttendence.vue @@ -7,10 +7,10 @@ save_alt - +

Export

@@ -365,30 +365,31 @@ export default { // // this.$router.replace({ path: '/' }); // }); // }, -// exportData() { -// http() -// .get( -// "/studentAttendanceByMonth", -// { -// params: { -// studentId: this.$route.params.id, -// startDate: this.startDate, -// endDate: this.endDate -// } -// }, -// { -// headers: { Authorization: "Bearer " + this.token } -// } -// ) -// .then(response => { -// this.json_data = response.data.data; -// this.dialogExport = true; -// }) -// .catch(err => { -// console.log("err====>", err); -// // this.$router.replace({ path: '/' }); -// }); -// }, + exportData() { + // console.log("id",this.$route.params.teacherId); + http() + .get( + "/teacherAttendanceByMonth", + { + params: { + teacherId: this.$route.params.teacherId, + startDate: this.startDate, + endDate: this.endDate + } + }, + { + headers: { Authorization: "Bearer " + this.token } + } + ) + .then(response => { + this.json_data = response.data.data; + this.dialogExport = false; + }) + .catch(err => { + console.log("err====>", err); + // this.$router.replace({ path: '/' }); + }); + }, exportPdf(){ this.hideData = false; this.showPdfData = true diff --git a/src/pages/Mark/mark.vue b/src/pages/Mark/mark.vue index bedd0c5..3db4c07 100644 --- a/src/pages/Mark/mark.vue +++ b/src/pages/Mark/mark.vue @@ -139,7 +139,7 @@ {{ props.item.email }} - + ({ type: route.query.type }), component: () => import ( @@ -228,7 +228,7 @@ export default [{ { path: '/socialMedia', meta: {}, - name: 'SocialMedia', + name: 'Social Media', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -288,7 +288,7 @@ export default [{ { path: '/AttendenceStudent', meta: {}, - name: 'StudentAttendence', + name: 'Student Attendence', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -300,7 +300,7 @@ export default [{ { path: '/AttendenceTeacher', meta: {}, - name: 'TeacherAttendence', + name: 'Teacher Attendence', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -324,7 +324,7 @@ export default [{ { path: '/feeTypes', meta: {}, - name: 'feeTypes', + name: 'Fee Types', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -348,7 +348,7 @@ export default [{ { path: '/paymentHistory', meta: {}, - name: 'PaymentHistory', + name: 'Payment History', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -384,7 +384,7 @@ export default [{ { path: '/libraryMember', meta: {}, - name: 'LibraryMember', + name: 'Library Member', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -432,7 +432,7 @@ export default [{ { path: '/invoiceId/:invoiceid', meta: {}, - name: 'EditInvoice', + name: 'Edit Invoice', // props: (route) => ({ type: route.query.type }), component: () => import ( @@ -444,7 +444,7 @@ export default [{ { path: '/StudentsAttendence/:id', meta: {}, - name: 'ViewStudentsAttendence', + name: 'View Students Attendence', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -456,7 +456,7 @@ export default [{ { path: '/TeacherAttendence/:teacherId', meta: {}, - name: 'ViewTeacherAttendence', + name: 'View Teacher Attendence', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -468,7 +468,7 @@ export default [{ { path: '/viewInvoice/:viewInvoiceId', meta: {}, - name: 'ViewInvoice', + name: 'View Invoice', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -480,7 +480,7 @@ export default [{ { path: '/globalPayment', meta: {}, - name: 'GlobalPayment', + name: 'Global Payment', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -516,7 +516,7 @@ export default [{ { path: '/examSchedule', meta: {}, - name: 'ExamSchedule', + name: 'Exam Schedule', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -540,7 +540,7 @@ export default [{ { path: '/viewMark/:markId', meta: {}, - name: 'viewMark', + name: 'view Mark', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -552,7 +552,7 @@ export default [{ { path: '/markDistribution', meta: {}, - name: 'MarkDistribution', + name: 'Mark Distribution', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -576,7 +576,7 @@ export default [{ { path: '/academicYear', meta: {}, - name: 'AcademicYear', + name: 'Academic Year', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -588,7 +588,7 @@ export default [{ { path: '/systemAdmin', meta: {}, - name: 'systemAdmin', + name: 'System Admin', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -600,7 +600,7 @@ export default [{ { path: '/resetPassword', meta: {}, - name: 'resetPassword', + name: 'Reset Password', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -624,7 +624,7 @@ export default [{ { path: '/bulkImport', meta: {}, - name: 'BulkImport', + name: 'Bulk Import', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -636,7 +636,7 @@ export default [{ { path: '/studentReport', meta: {}, - name: 'studentReport', + name: 'Student Report', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -648,7 +648,7 @@ export default [{ { path: '/progressCardReport', meta: {}, - name: 'ProgressCardReport', + name: 'Progress Card Report', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -660,7 +660,7 @@ export default [{ { path: '/generalSetting', meta: {}, - name: 'GeneralSetting', + name: 'General Setting', props: (route) => ({ type: route.query.type }), component: () => import ( @@ -687,7 +687,7 @@ export default [{ { path: '/schooldashboard/:schoolId', meta: {}, - name: 'viewSchoolDashboard', + name: 'View School Dashboard', props: (route) => ({ type: route.query.type }), component: () => import ( -- 2.0.0