diff --git a/src/api/menu.js b/src/api/menu.js index c8891b6..499c709 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -1,66 +1,72 @@ -const Menu = [ -// { header: 'Apps' }, - { - title: 'Class', - // group: 'apps', - name: 'addclass', - icon: 'local_library', - }, - { - title: 'Section', - // group: 'apps', - name: 'section', - icon: 'view_module', - }, - { - title: 'Teachers', - // group: '', - name: 'teachers', - icon: 'group', - }, - { - title: 'Students', - // group: 'apps', - name: 'Students', - icon: 'school', - }, - // { - // title: 'Event', - // name: 'event', - // icon: 'event_available', - // }, - { - title: 'News', - name: 'news', - icon: 'notification_important', - }, - // { - // title: 'Reminder', - // name: 'reminder', - // icon: 'alarm_add', - // }, - { - title: 'Time Table', - name: 'timeTable', - icon: 'event_note', - }, - { - title: 'Notification', - name: 'notification', - icon: 'notifications_active', - }, +const Menu = [ + // { header: 'Apps' }, + { + title: 'Class', + // group: 'apps', + name: 'addclass', + icon: 'local_library', + }, + { + title: 'Section', + // group: 'apps', + name: 'section', + icon: 'view_module', + }, + { + title: 'Parents', + // group: 'apps', + name: 'parents', + icon: 'group', + }, + { + title: 'Teachers', + // group: '', + name: 'teachers', + icon: 'person', + }, + { + title: 'Students', + // group: 'apps', + name: 'Students', + icon: 'school', + }, + // { + // title: 'Event', + // name: 'event', + // icon: 'event_available', + // }, + { + title: 'News', + name: 'news', + icon: 'notification_important', + }, + // { + // title: 'Reminder', + // name: 'reminder', + // icon: 'alarm_add', + // }, + { + title: 'Time Table', + name: 'timeTable', + icon: 'event_note', + }, + { + title: 'Notification', + name: 'notification', + icon: 'notifications_active', + }, ]; // reorder menu Menu.forEach((item) => { - if (item.items) { - item.items.sort((x, y) => { - let textA = x.title.toUpperCase(); - let textB = y.title.toUpperCase(); - return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; - }); - } + if (item.items) { + item.items.sort((x, y) => { + let textA = x.title.toUpperCase(); + let textB = y.title.toUpperCase(); + return (textA < textB) ? -1 : (textA > textB) ? 1 : 0; + }); + } }); -export default Menu; +export default Menu; \ No newline at end of file diff --git a/src/pages/Parent/parents.vue b/src/pages/Parent/parents.vue new file mode 100644 index 0000000..189b754 --- /dev/null +++ b/src/pages/Parent/parents.vue @@ -0,0 +1,845 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ item.icon }} + + + {{ item.title }} + + + + + + + Existing Parents + Add New Parents + + + + + {{ text }} + + + + + + Edit Parent Profile + + + close + + + + + + + + + Email ID: + + + + + + + + + + + + Father Cell No: + + + + + + + + + + Mother Name: + + + + + + + + + + Mother Cell No: + + + + + + + + + + + + Save + + + + + + + + + + + + + + + + + Parent Profile + + close + + + + + + + + + + + + Email: + + + + {{ editedItem.email }} + + + + + + + + + + + Fahter Name: + + + + + {{ editedItem.fatherName }} + + + + + + + + + + + Mother Name: + + + + + {{ editedItem.motherName }} + + + + + + + + + + + Father Cell No: + + + + + {{ editedItem.fatherCellNo }} + + + + + + + + + + + Mother Cell No: + + + + + {{ editedItem.motherCellNo }} + + + + + + + + + + + + {{ text }} + + + + + {{ props.index}} + {{ props.item.email }} + {{ props.item.fatherName }} + {{ props.item.fatherCellNo }} + {{ props.item.motherName }} + {{ props.item.motherCellNo }} + + + + + + + + Your search for "{{ search }}" found no results. + + + + + + + + + + + + + {{ text }} + + + + + + + + Parent Email Id: + + + + + + + + + + Father Name: + + + + + + + + + + + + Father Cell No: + + + + + + + + + + Mother Name: + + + + + + + + + + + + Mother Cell No: + + + + + + + + + + clear + + Add + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/pages/Students/students.vue b/src/pages/Students/students.vue index 0d86664..c15cb5b 100644 --- a/src/pages/Students/students.vue +++ b/src/pages/Students/students.vue @@ -2036,8 +2036,6 @@ export default { this.imageUrl = fr.result; this.imageFile = files[0]; // this is an image file that can be sent to server... this.imageData.imageUrl = URL.createObjectURL(this.imageFile); - console.log("upload=======>", this.imageData.imageUrl); - console.log("imageFile", this.imageFile); }); } else { this.imageName = ""; @@ -2224,11 +2222,9 @@ export default { if (this.imageUrl) { editStudent.upload = this.imageUrl; } - console.log("editStudent", editStudent); http() .put("/updateStudent", editStudent) .then(response => { - console.log("editStudent", editStudent); if ((this.snackbar = true)) { this.text = "Successfully Student Existing User"; } @@ -2311,7 +2307,6 @@ export default { }) .then(response => { this.addclass = response.data.data; - // console.log("getClassesList=====>",this.addclass) }) .catch(err => { // console.log("err====>", err); diff --git a/src/pages/Teachers/teachers.vue b/src/pages/Teachers/teachers.vue index 9334714..e4e9287 100644 --- a/src/pages/Teachers/teachers.vue +++ b/src/pages/Teachers/teachers.vue @@ -1,6 +1,6 @@ - + @@ -19,7 +19,7 @@ - + @@ -71,13 +71,13 @@ color="success" >{{ text }} - - + + Edit Teacher Profile - - + + @@ -86,14 +86,20 @@ class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" > - - + src="/static/icon/user.png" + v-if="!editedItem.profilePicUrl && !imageUrl" + /> + + + /> @@ -349,29 +355,31 @@ - - + + - + - - Teacher Profile - - close - + + + Teacher Profile + + + close + - - - - - + + + + + @@ -421,7 +429,7 @@ {{ editedItem.pincode }} - + Mobile No: @@ -446,20 +454,20 @@ - - Permanent Address: - - - {{ editedItem.permanentAddress }} - + + Permanent Address: + + + {{ editedItem.permanentAddress }} + - - present Address: - - - {{ editedItem.presentAddress }} - + + present Address: + + + {{ editedItem.presentAddress }} + @@ -487,9 +495,11 @@ {{ props.index}} - - - + + + + + {{ props.item.name}} {{ props.item.email }} {{ dates(props.item.dob) }} @@ -502,19 +512,19 @@ class="mr-5" @click="profile(props.item)" src="/static/icon/eye1.png" - > + /> + /> + /> @@ -548,14 +558,14 @@ class="text-xs-center text-sm-center text-md-center text-lg-center my-4 mr-4" > - + + /> @@ -724,33 +734,33 @@ Join Date - - - - - - + + + + + + @@ -765,13 +775,13 @@ v-model="imageName" append-icon="attach_file" > - + @@ -850,13 +860,13 @@ export default { mode: "", timeout: 3000, text: "", - showLoader:false, + showLoader: false, loading: false, date: null, search: "", menu: false, menu1: false, - menu2: false, + menu2: false, menu3: false, dialog: false, dialog1: false, @@ -1102,17 +1112,32 @@ export default { sortable: false, value: "No" }, - { text: "Profile Pic", value: "profilePicUrl", sortable: false, align: "center" }, + { + text: "Profile Pic", + value: "profilePicUrl", + sortable: false, + align: "center" + }, { text: "Name", value: "name", sortable: false, align: "center" }, { text: "Email", value: "email", sortable: false, align: "center" }, { text: "DOB", value: "dob", sortable: false, align: "center" }, - { text: "Join Date", value: "joinDate", sortable: false, align: "center" }, - { text: "Mobile No", value: "mobileNo", sortable: false, align: "center" }, + { + text: "Join Date", + value: "joinDate", + sortable: false, + align: "center" + }, + { + text: "Mobile No", + value: "mobileNo", + sortable: false, + align: "center" + }, { text: "Action", value: "", sortable: false, align: "center" } ], desserts: [], editedIndex: -1, - upload:'', + upload: "", editedItem: { role: "TEACHER", name: "", @@ -1173,20 +1198,20 @@ export default { } }, methods: { - save (date) { - this.$refs.menu.save(date) + save(date) { + this.$refs.menu.save(date); }, - save (date) { - this.$refs.menu1.save(date) + save(date) { + this.$refs.menu1.save(date); }, pickFile() { - this.$refs.image.click (); + this.$refs.image.click(); }, onFilePicked(e) { // console.log(e) const files = e.target.files; this.upload = e.target.files[0]; - console.log("imageData-upload========>",this.upload) + console.log("imageData-upload========>", this.upload); if (files[0] !== undefined) { this.imageName = files[0].name; if (this.imageName.lastIndexOf(".") <= 0) { @@ -1199,7 +1224,7 @@ export default { this.imageFile = files[0]; // this is an image file that can be sent to server... // this.imageData.imageUrl = URL.createObjectURL(this.imageFile); // console.log("upload=======>", this.imageData.imageUrl); - console.log("imageFile", this.imageUrl ); + console.log("imageFile", this.imageUrl); }); } else { this.imageName = ""; @@ -1213,7 +1238,7 @@ export default { getTeacherList() { this.showLoader = true; var token = this.$store.state.token; - console.log("token",token) + console.log("token", token); http() .get("/getTeachersList", { headers: { Authorization: "Bearer " + token } @@ -1232,8 +1257,17 @@ export default { editItem(item) { this.editedIndex = this.desserts.indexOf(item); this.editedItem = Object.assign({}, item); - this.editedItem.dob = this.editedItem.dob != undefined ? this.editedItem.dob = this.editedItem.dob.substring(0, 10): this.editedItem.dob = '' - this.editedItem.joinDate = this.editedItem.joinDate != undefined ? this.editedItem.joinDate = this.editedItem.joinDate.substring(0, 10): this.editedItem.joinDate = '' + this.editedItem.dob = + this.editedItem.dob != undefined + ? (this.editedItem.dob = this.editedItem.dob.substring(0, 10)) + : (this.editedItem.dob = ""); + this.editedItem.joinDate = + this.editedItem.joinDate != undefined + ? (this.editedItem.joinDate = this.editedItem.joinDate.substring( + 0, + 10 + )) + : (this.editedItem.joinDate = ""); this.dialog = true; }, @@ -1280,7 +1314,7 @@ export default { }, close() { this.dialog = false; - setTimeout(() => { + setTimeout(() => { this.editedItem = Object.assign({}, this.defaultItem); this.editedIndex = -1; }, 300); @@ -1318,7 +1352,7 @@ export default { mobileNo: this.addTeachers.mobileNo, state: this.addTeachers.state, joinDate: this.addTeachers.joinDate, - upload:this.imageUrl + upload: this.imageUrl // upload:this.imageFile }; // console.log("addTeacher============>", addTeacher); @@ -1350,6 +1384,7 @@ export default { this.$refs.form.reset(); }, save() { + this.loading = true; let editTeacher = { teacherId: this.editedItem._id, name: this.editedItem.name, @@ -1363,21 +1398,21 @@ export default { presentAddress: this.editedItem.presentAddress, mobileNo: this.editedItem.mobileNo, state: this.editedItem.state, - joinDate: this.editedItem.joinDate, - upload:this.imageUrl + joinDate: this.editedItem.joinDate }; - this.loading = true; + if (this.imageUrl) { + editTeacher.upload = this.imageUrl; + } http() .put("/updateTeacher", editTeacher) .then(response => { - console.log("editTeacher",editTeacher); + console.log("editTeacher", editTeacher); if ((this.snackbar = true)) { this.text = "Successfully Edit Existing Teacher"; } this.loading = false; this.getTeacherList(); this.close(); - }) .catch(error => { console.log(error); @@ -1496,7 +1531,7 @@ h4 { @media screen and (max-width: 380px) { .pl-3 { - padding-left: 0px !important; + padding-left: 0px !important; } .right { float: none !important; @@ -1508,8 +1543,8 @@ h4 { margin: 0 0px; min-width: 100px; } - .presentInput{ - padding-left:48px !important; + .presentInput { + padding-left: 48px !important; } /* .searchIcon .v-icon { font-size: 20px; @@ -1521,9 +1556,8 @@ h4 { h5 { font-size: 13px; } - .pl-4{ + .pl-4 { padding-left: 0px !important; - } } .v-icon { diff --git a/src/pages/TimeTable/timeTable.vue b/src/pages/TimeTable/timeTable.vue index 2f9a427..42cb9da 100644 --- a/src/pages/TimeTable/timeTable.vue +++ b/src/pages/TimeTable/timeTable.vue @@ -1031,7 +1031,6 @@ export default { .then(response => { this.timeTableList = response.data.data; this.showLoader = false; - // console.log("getParticularTimeTable=====>", this.timeTableList); }) .catch(err => { this.showLoader = false; diff --git a/src/router/paths.js b/src/router/paths.js index e33bc05..e439281 100644 --- a/src/router/paths.js +++ b/src/router/paths.js @@ -1,169 +1,193 @@ export default [ - { - path: '*', - meta: { - public: true, + { + path: '*', + meta: { + public: true, + }, + redirect: { + path: '/404' + } }, - redirect: { - path: '/404' - } - }, - { - path: '/404', - meta: { - public: true, + { + path: '/404', + meta: { + public: true, + }, + name: 'NotFound', + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/NotFound/NotFound.vue` + ) + }, + { + path: '/500', + meta: { + public: true, + }, + name: 'ServerError', + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/NotFound/Error.vue` + ) + }, + { + path: '/changepassword', + meta: {}, + name: 'changepassword', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Authentication/changepassword.vue` + ) + }, + { + path: '/teachers', + meta: { breadcrumb: false }, + name: 'teachers', + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Teachers/teachers.vue` + ) + }, + { + path: '/', + meta: { + public: true, + }, + name: 'Login', + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Authentication/Login.vue` + ) }, - name: 'NotFound', - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/NotFound/NotFound.vue` - ) - }, - { - path: '/500', - meta: { - public: true, + { + path: '/forgetpassword', + meta: { + public: true, + }, + name: 'forgetpassword', + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Authentication/forgetpassword.vue` + ) }, - name: 'ServerError', - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/NotFound/Error.vue` - ) - }, - { - path: '/changepassword', - meta: { }, - name: 'changepassword', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Authentication/changepassword.vue` - ) - }, - { - path: '/teachers', - meta: { breadcrumb: false }, - name: 'teachers', - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Teachers/teachers.vue` - ) - }, - { - path: '/', - meta: { - public: true, + { + path: '/students', + meta: {}, + name: 'Students', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Students/students.vue` + ) }, - name: 'Login', - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Authentication/Login.vue` - ) - }, - { - path: '/forgetpassword', - meta: { - public: true, + { + path: '/addclass', + meta: {}, + name: 'addclass', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Class/addclass.vue` + ) }, - name: 'forgetpassword', - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Authentication/forgetpassword.vue` - ) - }, - { - path: '/students', - meta: { }, - name: 'Students', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Students/students.vue` - ) - }, - { - path: '/addclass', - meta: { }, - name: 'addclass', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Class/addclass.vue` - ) - }, - { - path: '/section', - meta: { }, - name: 'section', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Section/section.vue` - ) - }, - // { - // path: '/event', - // meta: { }, - // name: 'event', - // props: (route) => ({ type: route.query.type }), - // component: () => import( - // /* webpackChunkName: "routes" */ - // /* webpackMode: "lazy-once" */ - // `@/pages/Event/event.vue` - // ) - // }, - { - path: '/news', - meta: { }, - name: 'news', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/News/news.vue` - ) - }, - // { - // path: '/reminder', - // meta: { }, - // name: 'reminder', - // props: (route) => ({ type: route.query.type }), - // component: () => import( - // /* webpackChunkName: "routes" */ - // /* webpackMode: "lazy-once" */ - // `@/pages/Reminder/reminder.vue` - // ) - // }, - { - path: '/timeTable', - meta: { }, - name: 'timeTable', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/TimeTable/timeTable.vue` - ) - }, - { - path: '/notification', - meta: { }, - name: 'notification', - props: (route) => ({ type: route.query.type }), - component: () => import( - /* webpackChunkName: "routes" */ - /* webpackMode: "lazy-once" */ - `@/pages/Notification/notification.vue` - ) - } -]; + { + path: '/section', + meta: {}, + name: 'section', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Section/section.vue` + ) + }, + // { + // path: '/event', + // meta: { }, + // name: 'event', + // props: (route) => ({ type: route.query.type }), + // component: () => import( + // /* webpackChunkName: "routes" */ + // /* webpackMode: "lazy-once" */ + // `@/pages/Event/event.vue` + // ) + // }, + { + path: '/news', + meta: {}, + name: 'news', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/News/news.vue` + ) + }, + // { + // path: '/reminder', + // meta: { }, + // name: 'reminder', + // props: (route) => ({ type: route.query.type }), + // component: () => import( + // /* webpackChunkName: "routes" */ + // /* webpackMode: "lazy-once" */ + // `@/pages/Reminder/reminder.vue` + // ) + // }, + { + path: '/timeTable', + meta: {}, + name: 'timeTable', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/TimeTable/timeTable.vue` + ) + }, + { + path: '/notification', + meta: {}, + name: 'notification', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Notification/notification.vue` + ) + }, + { + path: '/parents', + meta: {}, + name: 'parents', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Parent/parents.vue` + ) + } +]; \ No newline at end of file