Commit 3f818713703aa13672d8542f1296b55aff791692
1 parent
be4bdd6416
Exists in
master
and in
2 other branches
Added functionality to login with phone-no,label change in course detail,show st…
…art-time and link in latest event, teacher dashboard UI chnage and set router of notice board, solved issue of update api in meeting event
Showing
4 changed files
with
115 additions
and
22 deletions
Show diff stats
src/pages/Authentication/Login.vue
... | ... | @@ -30,12 +30,12 @@ |
30 | 30 | <v-toolbar-title class="text-xs-center subheadline">SCHOOL LOGIN</v-toolbar-title> |
31 | 31 | <v-flex xs12 sm12 md12 lg12> |
32 | 32 | <v-form ref="form" v-model="valid" lazy-validation> |
33 | - <label class="title">Email</label> | |
33 | + <label class="title">Email / PhoneNo</label> | |
34 | 34 | <v-text-field |
35 | 35 | style="padding: 0px; margin: 0px;" |
36 | 36 | v-model.trim="userLogincredentials.email" |
37 | 37 | :rules="nameRules" |
38 | - placeholder="Enter your email" | |
38 | + placeholder="Enter your email / phoneNo" | |
39 | 39 | required |
40 | 40 | ></v-text-field> |
41 | 41 | <label class="title">Password</label> |
... | ... | @@ -113,6 +113,10 @@ export default { |
113 | 113 | email: this.userLogincredentials.email, |
114 | 114 | password: this.userLogincredentials.password |
115 | 115 | }; |
116 | + if (/^[0-9]{10}$/.test(this.userLogincredentials.email)) { | |
117 | + userdata.fatherCellNo = this.userLogincredentials.email; | |
118 | + delete userdata.email; | |
119 | + } | |
116 | 120 | http() |
117 | 121 | .post("/schoolLogin", userdata) |
118 | 122 | .then(response => { | ... | ... |
src/pages/Course/courseDetail.vue
... | ... | @@ -382,7 +382,7 @@ |
382 | 382 | <v-layout> |
383 | 383 | <v-flex xs5 sm6> |
384 | 384 | <h5 class="right my-1"> |
385 | - <b>You Tube Link Url:</b> | |
385 | + <b>Chapter Point:</b> | |
386 | 386 | </h5> |
387 | 387 | </v-flex> |
388 | 388 | <v-flex sm6 xs8> |
... | ... | @@ -863,7 +863,6 @@ export default { |
863 | 863 | .then(response => { |
864 | 864 | this.editChapter.courseId = ""; |
865 | 865 | this.courseData = response.data.data; |
866 | - // console.log("this.courseData", this.courseData); | |
867 | 866 | this.showLoader = false; |
868 | 867 | }) |
869 | 868 | .catch(err => { |
... | ... | @@ -883,9 +882,7 @@ export default { |
883 | 882 | this.CourseDetailsList = response.data.data; |
884 | 883 | if (response.data.data[0]) { |
885 | 884 | this.chapters = response.data.data[0].chapters; |
886 | - console.log(" this.chapters - ", this.chapters); | |
887 | 885 | } |
888 | - // console.log("response.data.data", this.CourseDetailsList); | |
889 | 886 | this.showLoader = false; |
890 | 887 | }) |
891 | 888 | .catch(error => { |
... | ... | @@ -899,7 +896,6 @@ export default { |
899 | 896 | }); |
900 | 897 | }, |
901 | 898 | courseTableRow(id) { |
902 | - // console.log("click7", id); | |
903 | 899 | this.courseId = id; |
904 | 900 | }, |
905 | 901 | addChapters(item) { |
... | ... | @@ -913,7 +909,6 @@ export default { |
913 | 909 | for (let i = 0; i < this.findsChapterPoint.length; i++) { |
914 | 910 | this.addChapterItem.chapterPoints.push(this.findsChapterPoint[i].value); |
915 | 911 | } |
916 | - // console.log("this.addChapterItem", this.addChapterItem); | |
917 | 912 | this.loading = true; |
918 | 913 | http() |
919 | 914 | .put("/addChapters", this.addChapterItem) |
... | ... | @@ -1015,7 +1010,6 @@ export default { |
1015 | 1010 | var chapterPoints = []; |
1016 | 1011 | for (let i = 0; i < this.finds.length; i++) { |
1017 | 1012 | chapterPoints.push(this.finds[i].value); |
1018 | - // console.log("this.finds[i].value", this.finds[i].value); | |
1019 | 1013 | chapters = [ |
1020 | 1014 | { |
1021 | 1015 | chapterName: this.addCourseDetail.chapterName, |
... | ... | @@ -1027,7 +1021,6 @@ export default { |
1027 | 1021 | ]; |
1028 | 1022 | } |
1029 | 1023 | if (this.$refs.form.validate()) { |
1030 | - // console.log("this.addCourseDetail", this.addCourseDetail); | |
1031 | 1024 | var courseDetailsData = { |
1032 | 1025 | classId: this.addCourseDetail.classId, |
1033 | 1026 | courseId: this.addCourseDetail.courseId, |
... | ... | @@ -1060,7 +1053,6 @@ export default { |
1060 | 1053 | }, |
1061 | 1054 | saveChapter() { |
1062 | 1055 | this.editedItem.courseDetailId = this.editedItem._id; |
1063 | - // console.log("this.updates", this.updates); | |
1064 | 1056 | var chapterPoints = []; |
1065 | 1057 | for (let i = 0; i < this.updates.length; i++) { |
1066 | 1058 | chapterPoints.push(this.updates[i].value); | ... | ... |
src/pages/Dashboard/dashboard.vue
... | ... | @@ -90,9 +90,19 @@ |
90 | 90 | </v-list-tile> |
91 | 91 | <v-list-tile> |
92 | 92 | <v-list-tile-content> |
93 | + <v-list-tile-title>Start Time : {{particularEvent.startTime}}</v-list-tile-title> | |
94 | + </v-list-tile-content> | |
95 | + </v-list-tile> | |
96 | + <v-list-tile> | |
97 | + <v-list-tile-content> | |
93 | 98 | <v-list-tile-title>Duration : {{particularEvent.duration}}</v-list-tile-title> |
94 | 99 | </v-list-tile-content> |
95 | 100 | </v-list-tile> |
101 | + <v-list-tile> | |
102 | + <v-list-tile-content> | |
103 | + <v-list-tile-title>Link : <a :href="particularEvent.link">{{particularEvent.link}}</a></v-list-tile-title> | |
104 | + </v-list-tile-content> | |
105 | + </v-list-tile> | |
96 | 106 | </v-list> |
97 | 107 | </v-card-text> |
98 | 108 | </v-card> |
... | ... | @@ -215,7 +225,8 @@ |
215 | 225 | </v-flex> |
216 | 226 | </v-layout> |
217 | 227 | |
218 | - <v-card class="mt-2 card" v-if="role != 'PARENT'"> | |
228 | + <!-- FOR ADMIN ROLE --> | |
229 | + <v-card class="mt-2 card" v-if="role == 'ADMIN'"> | |
219 | 230 | <!-- <full-calendar |
220 | 231 | ref="calendar" |
221 | 232 | defaultView="month" |
... | ... | @@ -267,6 +278,87 @@ |
267 | 278 | </template> |
268 | 279 | </v-data-table> |
269 | 280 | </v-card> |
281 | + | |
282 | + <!-- FOR TEACHER ROLE --> | |
283 | + <v-card class="mt-2 card" v-if="role == 'TEACHER'"> | |
284 | + <v-layout> | |
285 | + <v-flex xs6 sm6 md6> | |
286 | + <h4 class="pa-3"> | |
287 | + <b>Notice</b> | |
288 | + </h4> | |
289 | + <v-data-table | |
290 | + :items="noticeData" | |
291 | + class="elevation-0" | |
292 | + flat | |
293 | + hide-actions | |
294 | + hide-headers | |
295 | + style="border-spacing: 0 !important;" | |
296 | + > | |
297 | + <template | |
298 | + slot="items" | |
299 | + slot-scope="props" | |
300 | + v-if="props.index < 5" | |
301 | + style="border-spacing: 0 !important;" | |
302 | + > | |
303 | + <tr class="td-notice"> | |
304 | + <td class="grey--text" style="width:18px">{{ props.index + 1}}</td> | |
305 | + <td> | |
306 | + <span class="grey--text caption">{{ date(props.item.created) }}</span> | |
307 | + <br /> | |
308 | + <span class="body-2">{{ props.item.title}}</span> | |
309 | + </td> | |
310 | + <td class="noticeDecritpion grey--text mt-2">{{ props.item.description}}</td> | |
311 | + | |
312 | + <td class="text-xs-center"> | |
313 | + <span> | |
314 | + <v-tooltip top> | |
315 | + <img | |
316 | + slot="activator" | |
317 | + style="cursor:pointer; width:25px; height:25px; " | |
318 | + @click="profile" | |
319 | + src="/static/icon/view.png" | |
320 | + /> | |
321 | + <span>View</span> | |
322 | + </v-tooltip> | |
323 | + </span> | |
324 | + </td> | |
325 | + </tr> | |
326 | + </template> | |
327 | + </v-data-table> | |
328 | + </v-flex> | |
329 | + | |
330 | + <v-flex xs6 sm6 md6> | |
331 | + <v-card-text> | |
332 | + <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> | |
333 | + <div | |
334 | + v-for="(activity,index) in activityList" | |
335 | + :key="index" | |
336 | + class="mt-2" | |
337 | + style="cursor: pointer;" | |
338 | + @click="seeEventDetails(activity)" | |
339 | + > | |
340 | + <span | |
341 | + :style="{ 'background-color': colorsArray[index%colorsArray.length] }" | |
342 | + style="height: 12px;width: 12px;border-radius: 50%;display: inline-block;vertical-align: top;" | |
343 | + ></span> | |
344 | + <div style="display: inline-block;" class="ml-2"> | |
345 | + <div> | |
346 | + <div | |
347 | + class="grey--text lighten-1 caption" | |
348 | + v-if="activity.dateOfEvent" | |
349 | + >{{moment(activity.dateOfEvent).format("DD MMMM, YYYY")}}</div> | |
350 | + <div class="body-2" v-if="activity.title">{{activity.title}}</div> | |
351 | + </div> | |
352 | + </div> | |
353 | + </div> | |
354 | + <div v-if="activityList.length == 0"> | |
355 | + <p class="text-center title grey lighten-4 error--text">No Data Found!</p> | |
356 | + </div> | |
357 | + </v-card-text> | |
358 | + </v-flex> | |
359 | + </v-layout> | |
360 | + </v-card> | |
361 | + | |
270 | 362 | <!-- COURSES --> |
271 | 363 | <v-layout v-if="role == 'PARENT'"> |
272 | 364 | <v-flex xs12> |
... | ... | @@ -400,8 +492,9 @@ |
400 | 492 | <v-flex xs12 class="py-3"> |
401 | 493 | <v-layout wrap> |
402 | 494 | <v-flex xs12 sm12 md4> |
403 | - <img src="/static/icon/user.png" v-if="!userData.schoolLogoUrl" width="80" /> | |
404 | - <img :src="userData.schoolLogoUrl" v-else-if="userData.schoolLogoUrl" width="80" /> | |
495 | + <img src="/static/icon/user.png" v-if="!userData.profilePicUrl && !userData.schoolLogoUrl" width="80" /> | |
496 | + <img :src="userData.profilePicUrl" onerror="this.src='/static/icon/user.png';" v-if="userData.profilePicUrl" width="80" /> | |
497 | + <img :src="userData.schoolLogoUrl" onerror="this.src='/static/icon/user.png';" v-if="userData.schoolLogoUrl" width="80" /> | |
405 | 498 | </v-flex> |
406 | 499 | <v-flex xs12 sm12 md6> |
407 | 500 | <p class="mb-0 body-1"> |
... | ... | @@ -419,7 +512,7 @@ |
419 | 512 | <vue-event-calendar :events="activityEvents" @day-changed="handleDayChanged($event)"></vue-event-calendar> |
420 | 513 | |
421 | 514 | <!-- LATEST EVENTS --> |
422 | - <v-card class="my-3 elevation-0"> | |
515 | + <v-card class="my-3 elevation-0" v-if="role != 'TEACHER'"> | |
423 | 516 | <v-card-text> |
424 | 517 | <v-card-title class="justify-center subheading font-weight-bold">Latest Events</v-card-title> |
425 | 518 | <div |
... | ... | @@ -657,7 +750,6 @@ export default { |
657 | 750 | tooltip: { |
658 | 751 | y: { |
659 | 752 | formatter: function(val, opts) { |
660 | - // console.log("opts",opts.w.config.xaxis.categories) | |
661 | 753 | return "" + val + " "; |
662 | 754 | } |
663 | 755 | } |
... | ... | @@ -713,7 +805,7 @@ export default { |
713 | 805 | // this.editedIndex = this.desserts.indexOf(item); |
714 | 806 | // this.notice = Object.assign({}, item); |
715 | 807 | // this.dialogNotice = true; |
716 | - this.$router.push({ name: "NoticeBoard" }); | |
808 | + this.$router.push("/noticeBoard"); | |
717 | 809 | }, |
718 | 810 | date: function(date) { |
719 | 811 | return moment(date).format("MMMM DD, YYYY HH:mm"); |
... | ... | @@ -730,7 +822,6 @@ export default { |
730 | 822 | }, |
731 | 823 | eventSelected(event) { |
732 | 824 | this.selected = event; |
733 | - console.log("this.selected", this.selected); | |
734 | 825 | }, |
735 | 826 | // eventDropStart: function(event) { |
736 | 827 | // event.editable = false; |
... | ... | @@ -837,7 +928,6 @@ export default { |
837 | 928 | .then(response => { |
838 | 929 | this.userData = response.data.data; |
839 | 930 | this.showLoader = false; |
840 | - console.log("sdsdfsdfsd - ", response); | |
841 | 931 | }) |
842 | 932 | .catch(error => { |
843 | 933 | this.showLoader = false; |
... | ... | @@ -871,7 +961,6 @@ export default { |
871 | 961 | // this.collectionData = response.data.data; |
872 | 962 | this.series[0].data[0] = this.feeData.totalFees; |
873 | 963 | this.series[0].data[1] = this.feeData.totalCollection; |
874 | - // console.log("this.series====", this.series); | |
875 | 964 | |
876 | 965 | this.showLoader = false; |
877 | 966 | }) |
... | ... | @@ -896,7 +985,6 @@ export default { |
896 | 985 | // data: array |
897 | 986 | // } |
898 | 987 | // ]; |
899 | - // console.log("this.series====", this.series); | |
900 | 988 | this.showLoader = false; |
901 | 989 | }) |
902 | 990 | .catch(error => { |
... | ... | @@ -910,7 +998,6 @@ export default { |
910 | 998 | await http() |
911 | 999 | .get("/parentStudentsList") |
912 | 1000 | .then(response => { |
913 | - // console.log("resssssss", response.data.data.students[0].classId); | |
914 | 1001 | this.studentsData = response.data.data; |
915 | 1002 | localStorage.setItem( |
916 | 1003 | "parentStudentId", |
... | ... | @@ -1057,4 +1144,8 @@ export default { |
1057 | 1144 | |
1058 | 1145 | <style scoped> |
1059 | 1146 | @import "fullcalendar/dist/fullcalendar.css"; |
1147 | + | |
1148 | +a { | |
1149 | + color: white; | |
1150 | +} | |
1060 | 1151 | </style> |
1061 | 1152 | \ No newline at end of file | ... | ... |
src/pages/meetingEvent/meetingEvent.vue
... | ... | @@ -79,6 +79,7 @@ |
79 | 79 | ></v-text-field> |
80 | 80 | <v-time-picker |
81 | 81 | v-model="editedItem.startTime" |
82 | + format="24hr" | |
82 | 83 | @change="$refs.menuEdit.save(editedItem.startTime)" |
83 | 84 | ></v-time-picker> |
84 | 85 | </v-menu> |
... | ... | @@ -370,6 +371,7 @@ |
370 | 371 | ></v-text-field> |
371 | 372 | <v-time-picker |
372 | 373 | v-model="meetEvent.startTime" |
374 | + format="24hr" | |
373 | 375 | @change="$refs.menuA.save(meetEvent.startTime)" |
374 | 376 | ></v-time-picker> |
375 | 377 | </v-menu> |
... | ... | @@ -578,6 +580,7 @@ export default { |
578 | 580 | this.editedIndex = this.events.indexOf(item); |
579 | 581 | this.editedItem = Object.assign({}, item); |
580 | 582 | this.editedItem.meetingEventId = item._id; |
583 | + this.editedItem.startTime = moment(this.editedItem.startTime, ["h:mm A"]).format("HH:mm"); | |
581 | 584 | this.editEventdialog = true; |
582 | 585 | }, |
583 | 586 | profile(item) { |
... | ... | @@ -650,6 +653,7 @@ export default { |
650 | 653 | submit() { |
651 | 654 | if (this.$refs.form.validate()) { |
652 | 655 | this.loading = true; |
656 | + this.meetEvent.startTime = moment(this.meetEvent.startTime, "hh:mm").format("LT"); | |
653 | 657 | http() |
654 | 658 | .post("/createMeetingEvent", this.meetEvent) |
655 | 659 | .then(response => { |
... | ... | @@ -674,6 +678,8 @@ export default { |
674 | 678 | }, |
675 | 679 | save() { |
676 | 680 | delete this.editedItem.classId; |
681 | + this.editedItem.courseId = this.editedItem.courseId._id; | |
682 | + this.editedItem.startTime = moment(this.editedItem.startTime, "hh:mm").format("LT"); | |
677 | 683 | http() |
678 | 684 | .put("/updateMeetingEvent", this.editedItem) |
679 | 685 | .then(response => { | ... | ... |