diff --git a/index.html b/index.html index 6083515..7e878a8 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ School Management - + diff --git a/src/Services/http.js b/src/Services/http.js index a862f5d..12a3bdf 100644 --- a/src/Services/http.js +++ b/src/Services/http.js @@ -4,6 +4,7 @@ import store from '@/store/store' export default () => { return axios.create({ baseURL:'http://192.168.4.220:3002/v1', + // baseURL:'http://139.59.58.160:8001/v1', headers: { Authorization: `Bearer ${store.state.token}` } diff --git a/src/api/menu.js b/src/api/menu.js index c2f29ec..fb359a6 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -44,11 +44,11 @@ const Menu = [ name: 'timeTable', icon: 'event_note', }, - // { - // title: 'Notification', - // name: 'notification', - // icon: 'notifications_active', - // }, + { + title: 'Notification', + name: 'notification', + icon: 'notifications_active', + }, ]; diff --git a/src/components/pageHeader/AppDrawer.vue b/src/components/pageHeader/AppDrawer.vue index 2d6ce24..a498bcd 100644 --- a/src/components/pageHeader/AppDrawer.vue +++ b/src/components/pageHeader/AppDrawer.vue @@ -8,10 +8,10 @@ v-model="drawer" width="260" > - - -

School-Managament

- + + +
School-Managament
+
@@ -97,9 +97,9 @@ export default { computeGroupActive () { return true; }, - // computeLogo () { - // return '/static/ana@2x.png'; - // }, + computeLogo () { + return '/static/icon.jpeg'; + }, sideToolbarColor () { return this.$vuetify.options.extra.sideNav; @@ -153,7 +153,7 @@ export default { } .imgLogo{ height: 22px; - width: 62px; + width: 20px;; } } @@ -163,5 +163,6 @@ export default { .theme--light .v-icon, .application .theme--light.v-icon { color: #39b982; } + diff --git a/src/pages/Authentication/Login.vue b/src/pages/Authentication/Login.vue index 4753b7c..e16d8ac 100644 --- a/src/pages/Authentication/Login.vue +++ b/src/pages/Authentication/Login.vue @@ -2,8 +2,8 @@ - -

School-Management

+ logo +

School-Management

@@ -106,6 +106,7 @@ export default { }, methods: { login() { + this.loading = true; var userdata = { email: this.userLogincredentials.email, password: this.userLogincredentials.password, @@ -117,13 +118,11 @@ export default { .then(response => { this.$store.dispatch("setToken", response.data.data.token); this.$store.dispatch("Id", response.data.data.id); - this.loading = true; - setTimeout(() => { - this.$router.push("/teachers"); - }, 2000); + this.loading = false; + this.$router.push("/teachers"); }) - .catch(err => { - this.text = "Email or Password not matched !!"; + .catch(error => { + this.text = error.response.data.message this.snackbar = true; this.loading = false; }); @@ -151,7 +150,7 @@ export default { img { position: absolute; top: 13px; - left: 50px; + left: 8px; } .v-btn--large { padding: 0px 84px; @@ -174,10 +173,17 @@ a { margin-left:18px; } img{ -top:16px; -left:10px; +top: 21px; +left: 10px; height: 24px; -width: 66px;; +width: 33px; +} +.logoSchool{ +font-size: 18px; +margin-top: 20px !important; +} +h5 { + font-size: 14px !important; } } \ No newline at end of file diff --git a/src/pages/Authentication/forgetpassword.vue b/src/pages/Authentication/forgetpassword.vue index 333580b..51fe7e5 100644 --- a/src/pages/Authentication/forgetpassword.vue +++ b/src/pages/Authentication/forgetpassword.vue @@ -2,8 +2,8 @@ - -

School-Management

+ logo +

School-Management

@@ -249,7 +249,7 @@ export default { img{ position:absolute; top:13px; -left:50px; +left:8px; } .v-btn--large { padding: 0px 74px; @@ -267,11 +267,21 @@ h5 { } } @media screen and (max-width: 600px) { +.theme--light .v-btn, .application .theme--light.v-btn { + color: white !important; +} img{ -top:16px; -left:10px; +top: 21px; +left: 10px; height: 24px; -width: 66px;; +width: 33px; +} +.logoSchool{ +font-size: 18px; +margin-top: 20px !important; +} +.content { + padding: 0px 0px 0px 0px !important; } } \ No newline at end of file diff --git a/src/pages/Class/addclass.vue b/src/pages/Class/addclass.vue index c6fff95..2737b3e 100644 --- a/src/pages/Class/addclass.vue +++ b/src/pages/Class/addclass.vue @@ -274,8 +274,6 @@ export default { loading: false, date: null, search: "", - menu: false, - menu1: false, dialog: false, dialog1: false, valid: true, @@ -293,7 +291,7 @@ export default { sortable: false, value: "No" }, - { text: "Class Name", value: "name", sortable: false, align: "center" }, + { text: "Class Name", value: "classNum", sortable: false, align: "center" }, { text: "Action", value: "", sortable: false, align: "center" } ], desserts: [], @@ -324,14 +322,6 @@ export default { } ] }), - watch: { - menu(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - }, - menu1(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - } - }, methods: { getClassList() { this.showLoader = true; diff --git a/src/pages/Event/event.vue b/src/pages/Event/event.vue index d2d76cb..7c10044 100644 --- a/src/pages/Event/event.vue +++ b/src/pages/Event/event.vue @@ -9,7 +9,7 @@ (this.$refs.picker.activePicker = "YEAR")); - }, - menu1(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - } - }, methods: { pickFile() { this.$refs.image.click(); diff --git a/src/pages/News/news.vue b/src/pages/News/news.vue index d3b8adc..9476030 100644 --- a/src/pages/News/news.vue +++ b/src/pages/News/news.vue @@ -9,7 +9,7 @@ (this.$refs.picker.activePicker = "YEAR")); - }, - menu1(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - } - }, methods: { getSections(_id) { var token = this.$store.state.token; @@ -585,12 +573,6 @@ export default { this.editedItem = Object.assign({}, item); this.dialog1 = true; }, - // report(item) { - // this.editedIndex = this.desserts.indexOf(item); - // this.editedItem = Object.assign({}, item); - // this.dialog2 = true; - // }, - deleteItem(item) { let deleteNews = { newsId: item._id @@ -636,9 +618,6 @@ export default { close1() { this.dialog1 = false; }, - // close2() { - // this.dialog2 = false; - // }, submit() { if (this.$refs.form.validate()) { let imageData = new FormData(); @@ -719,9 +698,6 @@ export default { this.$router.replace({ path: "/" }); }); }, - - // console.log("Id",this.$store.state.id) - // console.log("token",this.$store.state.token) computed: { toolbarColor() { return this.$vuetify.options.extra.mainNav; diff --git a/src/pages/Notification/notification.vue b/src/pages/Notification/notification.vue new file mode 100644 index 0000000..a62584d --- /dev/null +++ b/src/pages/Notification/notification.vue @@ -0,0 +1,742 @@ + + + + \ No newline at end of file diff --git a/src/pages/Reminder/reminder.vue b/src/pages/Reminder/reminder.vue index c600e63..ed9cba2 100644 --- a/src/pages/Reminder/reminder.vue +++ b/src/pages/Reminder/reminder.vue @@ -9,7 +9,7 @@ !!v || " Tilte is required"], descriptionRules: [v => !!v || " Description is required"], - errorMessages: "", - emailRules: [ - v => !!v || "E-mail is required", - v => - /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || - "E-mail must be valid" - ], headers: [ { text: "No", @@ -424,14 +412,6 @@ export default { } ] }), - watch: { - menu(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - }, - menu1(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - } - }, methods: { pickFile() { this.$refs.image.click(); @@ -601,19 +581,6 @@ export default { }, mounted() { this.getReminderList(); - // var token = this.$store.state.token; - // http() - // .get("/getReminderList", { - // headers: { Authorization: "Bearer " + token } - // }) - // .then(response => { - // this.addclass = response.data.data; - // // console.log("getClassesList=====>",this.addclass) - // }) - // .catch(err => { - // // console.log("err====>", err); - // this.$router.replace({ path: "/" }); - // }); }, computed: { toolbarColor() { diff --git a/src/pages/Section/section.vue b/src/pages/Section/section.vue index f070639..fde45f0 100644 --- a/src/pages/Section/section.vue +++ b/src/pages/Section/section.vue @@ -13,7 +13,7 @@ (this.$refs.picker.activePicker = 'YEAR')) - }, - menu1 (val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = 'YEAR')) - } - }, - methods: { + methods: { getSectionList() { this.showLoader = true; var token = this.$store.state.token; diff --git a/src/pages/TimeTable/timeTable.vue b/src/pages/TimeTable/timeTable.vue index bde2ba9..81b07cf 100644 --- a/src/pages/TimeTable/timeTable.vue +++ b/src/pages/TimeTable/timeTable.vue @@ -9,7 +9,7 @@ class No: - @@ -133,7 +133,7 @@ label="Select Section" v-model="editedItem.selectSection" item-text="name" - item-value="_id" + item-value="_id" > @@ -235,7 +235,6 @@ Save - @@ -322,7 +321,6 @@ Cancel Save - @@ -331,7 +329,7 @@ - + - + + Your search for "{{ search }}" found no results.

@@ -625,11 +642,9 @@ export default { snackbar: false, loading: false, showLoader: false, - menu: false, - menu1: false, dialog: false, - dialogAddLecture : false, - dialogUpdateLectures:false, + dialogAddLecture: false, + dialogUpdateLectures: false, dialog1: false, valid: true, // validLeacture:true, @@ -660,13 +675,13 @@ export default { }, { text: "Class Name", - value: "subjectName", + value: "classData.classNum", sortable: false, align: "center" }, { text: "Section Name", - value: "sectionData", + value: "sectionData.name", sortable: false, align: "center" }, @@ -706,24 +721,24 @@ export default { selectTeacher: "" }, editedItem: { - classNum:"", + classNum: "", selectSection: "" }, addlectures: { - timeIn: "", - timeOut: "", - subjectName: "", - teacherId: "", - scheduleId:"", - timeTableId:"" + timeIn: "", + timeOut: "", + subjectName: "", + teacherId: "", + scheduleId: "", + timeTableId: "" }, - updateLectures:{ - timeIn: "", - timeOut: "", - subjectName: "", - teacherId: "", - lectureId:"", - scheduleId:"", + updateLectures: { + timeIn: "", + timeOut: "", + subjectName: "", + teacherId: "", + lectureId: "", + scheduleId: "" }, items: [ { @@ -742,14 +757,6 @@ export default { } ] }), - watch: { - menu(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - }, - menu1(val) { - val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR")); - } - }, methods: { getSections(_id) { var token = this.$store.state.token; @@ -841,31 +848,35 @@ export default { this.editedItem = Object.assign({}, item); this.dialog = true; }, - updateTimeTable(timeToUpdate, classToUpdate){ - console.log('timeToUpdate, classToUpdate', timeToUpdate._id, classToUpdate.schedule); - for (let i = 0; i < classToUpdate.schedule.length; i++){ - this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; + updateTimeTable(timeToUpdate, classToUpdate) { + console.log( + "timeToUpdate, classToUpdate", + timeToUpdate._id, + classToUpdate.schedule + ); + for (let i = 0; i < classToUpdate.schedule.length; i++) { + this.updateLectures.scheduleId = classToUpdate.schedule[i]._id; } - this.updateLectures.lectureId = timeToUpdate._id, - this.updateLectures= timeToUpdate + (this.updateLectures.lectureId = timeToUpdate._id), + (this.updateLectures = timeToUpdate); this.dialogUpdateLectures = true; }, - addLecture(scheduleId, timeTableId){ + addLecture(scheduleId, timeTableId) { // console.log('timeToAdd, classToAdd', scheduleId, timeTableId); - this.addlectures.scheduleId = scheduleId - this.addlectures.timeTableId = timeTableId + this.addlectures.scheduleId = scheduleId; + this.addlectures.timeTableId = timeTableId; this.dialogAddLecture = true; }, - AddLecture(){ + AddLecture() { if (this.$refs.form.validate()) { - http() + http() .post("/addLecture", this.addlectures) .then(response => { // console.log("addTimeTable=====>", this.addlectures); if ((this.snackbar = true)) { this.text = "New Add Lecture successfully"; } - this.closedialogLecture(); + this.closedialogLecture(); }) .catch(error => { if ((this.snackbar = true)) { @@ -874,31 +885,31 @@ export default { }); } }, - updateParticularTable(){ - let EditLecture = { - lectureId:this.updateLectures.lectureId, - scheduleId:this.updateLectures.scheduleId, - updatedLecture:{ - timeIn:this.updateLectures.timeIn, - timeOut: this.updateLectures.timeOut, - subjectName: this.updateLectures.subjectName, - teacherId: this.updateLectures.teacherId, - } - } + updateParticularTable() { + let EditLecture = { + lectureId: this.updateLectures.lectureId, + scheduleId: this.updateLectures.scheduleId, + updatedLecture: { + timeIn: this.updateLectures.timeIn, + timeOut: this.updateLectures.timeOut, + subjectName: this.updateLectures.subjectName, + teacherId: this.updateLectures.teacherId + } + }; console.log("updateLecture", EditLecture); - http() - .put("/updateLecture", EditLecture) - .then(response => { - console.log("updateLecture", EditLecture); - if ((this.snackbar = true)) { - this.text = "Successfully Edit Update Lecture"; - } - this.$router.go(0) - }) - .catch(error => { - // console.log(error); - }); - this.closeUpdateLectures() + http() + .put("/updateLecture", EditLecture) + .then(response => { + console.log("updateLecture", EditLecture); + if ((this.snackbar = true)) { + this.text = "Successfully Edit Update Lecture"; + } + this.$router.go(0); + }) + .catch(error => { + // console.log(error); + }); + this.closeUpdateLectures(); }, deleteItem(item) { let deleteTimeTable = { @@ -942,14 +953,14 @@ export default { this.editedIndex = -1; }, 300); }, - close1() { + close1() { this.dialog1 = false; }, closedialogLecture() { this.dialogAddLecture = false; - this.$router.go(0) + this.$router.go(0); }, - closeUpdateLectures(){ + closeUpdateLectures() { this.dialogUpdateLectures = false; }, submit() { @@ -1008,18 +1019,18 @@ export default { sectionId: this.editedItem.selectSection // imageData }; - http() - .put("/updateTimeTable", editTimeTable) - .then(response => { - console.log("editTimeTable",editTimeTable); - if ((this.snackbar = true)) { - this.text = "Successfully Edit Existing User"; - } - this.getTimeTableList(); - }) - .catch(error => { - // console.log(error); - }); + http() + .put("/updateTimeTable", editTimeTable) + .then(response => { + console.log("editTimeTable", editTimeTable); + if ((this.snackbar = true)) { + this.text = "Successfully Edit Existing User"; + } + this.getTimeTableList(); + }) + .catch(error => { + // console.log(error); + }); this.close(); }, handleDrawerToggle() { @@ -1028,7 +1039,7 @@ export default { handleFullScreen() { Util.toggleFullScreen(); }, - deleteTimeTable(timeToDelete){ + deleteTimeTable(timeToDelete) { // console.log('timeToUpdate', timeToDelete._id); let deleteLecture = { lectureId: timeToDelete._id @@ -1045,13 +1056,13 @@ export default { if ((this.snackbar = true)) { this.text = "Successfully delete Existing User"; } - this.$router.go(0) + this.$router.go(0); // this.getTimeTable(); }) .catch(error => { console.log(error); }); - }, + } }, mounted() { this.getTimeTableList(); @@ -1088,8 +1099,9 @@ export default { };