Commit b0e0491ab864c7770b5910b8dff70f23917fa82c

Authored by Shikha Mishra
1 parent b039d39fb8

solve the issue of getAssignmentList API, Disable status bar while teacher login…

… in students screen, Improve add and show the functionality of selecting the class in the subject screen, routine screen while admin login, Match card color to project theme in library screen while admin login, Change the color of find button in student, course and meet while teacher login and Improve add and show the functionality of selecting the class in student attendance screen while teacher login
src/pages/Academic/assignment.vue
... ... @@ -249,11 +249,11 @@
249 249 <td class="text-xs-center td td-row">{{ props.item.sectionId.name }}</td>
250 250 <td
251 251 class="text-xs-center td td-row"
252   - v-if="role != 'ADMIN' "
  252 + v-if="role != 'TEACHER' "
253 253 >{{ props.item.teacherId.name }}</td>
254 254 <td
255 255 class="text-xs-center td td-row"
256   - v-if="role != 'TEACHER' "
  256 + v-if="role != 'ADMIN'"
257 257 >{{ props.item.schoolId .name }}</td>
258 258 <td class="text-xs-center td td-row">
259 259 <v-btn
... ... @@ -523,7 +523,7 @@ export default {
523 523 addAssignmentDialog: false,
524 524  
525 525 pagination: {
526   - rowsPerPage: 10
  526 + rowsPerPage: 10,
527 527 },
528 528 token: "",
529 529 headers: [
... ... @@ -531,45 +531,45 @@ export default {
531 531 text: "No",
532 532 align: "",
533 533 sortable: false,
534   - value: "No"
  534 + value: "No",
535 535 },
536 536 {
537 537 text: "Title",
538 538 value: "title",
539 539 sortable: false,
540   - align: "center"
  540 + align: "center",
541 541 },
542 542 {
543 543 text: "Description",
544 544 value: "description",
545 545 sortable: false,
546   - align: "center"
  546 + align: "center",
547 547 },
548 548 {
549 549 text: "Deadline",
550 550 value: "deadline",
551 551 sortable: false,
552   - align: "center"
  552 + align: "center",
553 553 },
554 554 {
555 555 text: "Section",
556 556 value: "name",
557 557 sortable: false,
558   - align: "center"
  558 + align: "center",
559 559 },
560 560 {
561 561 text: "Uploader",
562 562 value: "name",
563 563 sortable: false,
564   - align: "center"
  564 + align: "center",
565 565 },
566 566 {
567 567 text: "File",
568 568 value: "file",
569 569 sortable: false,
570   - align: "center"
  570 + align: "center",
571 571 },
572   - { text: "Action", value: "", sortable: false, align: "center" }
  572 + { text: "Action", value: "", sortable: false, align: "center" },
573 573 ],
574 574  
575 575 showPdfData: false,
... ... @@ -590,7 +590,7 @@ export default {
590 590 classId: "",
591 591 sectionId: "",
592 592 subjectName: "",
593   - fileType: ""
  593 + fileType: "",
594 594 },
595 595 addAssignment: {},
596 596 showAssignment: {},
... ... @@ -600,16 +600,16 @@ export default {
600 600 imageUrl: "",
601 601 imageFile: "",
602 602  
603   - titleRules: [v => !!v || " Title is required"],
604   - descriptionRules: [v => !!v || " Description is required"],
605   - deadlineRules: [v => !!v || " Deadline is required"],
606   - classRules: [v => !!v || "Class is required"],
607   - sectionRules: [v => !!v || "Section is required"],
608   - subjectRules: [v => !!v || "Student is required"],
609   - fileRules: [v => !!v || "File is required"]
  603 + titleRules: [(v) => !!v || " Title is required"],
  604 + descriptionRules: [(v) => !!v || " Description is required"],
  605 + deadlineRules: [(v) => !!v || " Deadline is required"],
  606 + classRules: [(v) => !!v || "Class is required"],
  607 + sectionRules: [(v) => !!v || "Section is required"],
  608 + subjectRules: [(v) => !!v || "Student is required"],
  609 + fileRules: [(v) => !!v || "File is required"],
610 610 }),
611 611 methods: {
612   - dates: function(date) {
  612 + dates: function (date) {
613 613 return moment(date).format("MMMM DD, YYYY");
614 614 },
615 615 pickFile() {
... ... @@ -629,25 +629,25 @@ export default {
629 629 },
630 630 deleteItem(item) {
631 631 let deleteAssignment = {
632   - assignmentId: item._id
  632 + assignmentId: item._id,
633 633 };
634 634 http()
635 635 .delete(
636 636 "/deleteAssignment",
637 637 confirm("Are you sure you want to delete this?") && {
638   - params: deleteAssignment
  638 + params: deleteAssignment,
639 639 },
640 640 {
641   - headers: { Authorization: "Bearer " + this.token }
  641 + headers: { Authorization: "Bearer " + this.token },
642 642 }
643 643 )
644   - .then(response => {
  644 + .then((response) => {
645 645 this.getAssignmentList();
646 646 this.snackbar = true;
647 647 this.text = "Successfully delete Existing Assignment";
648 648 this.color = "green";
649 649 })
650   - .catch(error => {
  650 + .catch((error) => {
651 651 this.snackbar = true;
652 652 this.text = error.response.data.message;
653 653 this.color = "error";
... ... @@ -668,7 +668,7 @@ export default {
668 668 sectionId: this.addAssignment.sectionId,
669 669 subjectName: this.addAssignment.subjectName,
670 670 file: this.addAssignment.imageName,
671   - fileName: this.imageName
  671 + fileName: this.imageName,
672 672 };
673 673 var signatures = {
674 674 JVBERi0: "other",
... ... @@ -677,7 +677,7 @@ export default {
677 677 "/": "image",
678 678 AAABAA: "image",
679 679 IywiV2hhdC: "other",
680   - bmFtZSxl: "other"
  680 + bmFtZSxl: "other",
681 681 };
682 682 function detectMimeType(b64) {
683 683 for (var s in signatures) {
... ... @@ -696,7 +696,7 @@ export default {
696 696 console.log("data===>", addAssignment);
697 697 http()
698 698 .post("/createAssignment", addAssignment)
699   - .then(response => {
  699 + .then((response) => {
700 700 this.getAssignmentList();
701 701 this.snackbar = true;
702 702 this.text = "Syllabus added successfully";
... ... @@ -704,7 +704,7 @@ export default {
704 704 this.addAssignmentDialog = false;
705 705 this.clear();
706 706 })
707   - .catch(error => {
  707 + .catch((error) => {
708 708 // console.log(error);
709 709 this.snackbar = true;
710 710 this.text = error.response.data.message;
... ... @@ -721,18 +721,18 @@ export default {
721 721 .get(
722 722 "/getAssignmentList",
723 723 {
724   - params: { classId: this.showAssignment.classId }
  724 + params: { classId: this.showAssignment.classId },
725 725 },
726 726 {
727   - headers: { Authorization: "Bearer " + this.token }
  727 + headers: { Authorization: "Bearer " + this.token },
728 728 }
729 729 )
730   - .then(response => {
  730 + .then((response) => {
731 731 this.assignmentData = response.data.data;
732 732 this.showLoader = false;
733 733 this.loadingSearch = false;
734 734 })
735   - .catch(error => {
  735 + .catch((error) => {
736 736 // console.log("err====>", err);
737 737 this.showLoader = false;
738 738 this.loadingSearch = false;
... ... @@ -759,7 +759,7 @@ export default {
759 759 sectionId: this.addAssignment.sectionId,
760 760 subjectName: this.addAssignment.subjectName,
761 761 file: this.addAssignment.imageName,
762   - fileName: this.imageName
  762 + fileName: this.imageName,
763 763 };
764 764 this.editLoading = true;
765 765 var signatures = {
... ... @@ -769,7 +769,7 @@ export default {
769 769 "/": "image",
770 770 AAABAA: "image",
771 771 IywiV2hhdC: "other",
772   - bmFtZSxl: "other"
  772 + bmFtZSxl: "other",
773 773 };
774 774 function detectMimeType(b64) {
775 775 for (var s in signatures) {
... ... @@ -786,15 +786,15 @@ export default {
786 786 }
787 787 http()
788 788 .put("/updateAssignment", editAssignment)
789   - .then(response => {
  789 + .then((response) => {
790 790 this.snackbar = true;
791 791 this.text = "Successfully Edit Existing Assignment";
792 792 this.color = "green";
  793 + this.getAssignmentList();
793 794 this.editLoading = false;
794 795 this.editAssignmentDialog = false;
795   - this.getAssignmentList();
796 796 })
797   - .catch(error => {
  797 + .catch((error) => {
798 798 this.editLoading = false;
799 799 // console.log(error);
800 800 });
... ... @@ -803,12 +803,12 @@ export default {
803 803 getClass() {
804 804 http()
805 805 .get("/getClassesList", {
806   - headers: { Authorization: "Bearer " + this.token }
  806 + headers: { Authorization: "Bearer " + this.token },
807 807 })
808   - .then(response => {
  808 + .then((response) => {
809 809 this.classList = response.data.data;
810 810 })
811   - .catch(error => {
  811 + .catch((error) => {
812 812 if (error.response.status === 401) {
813 813 this.$router.replace({ path: "/" });
814 814 this.$store.dispatch("setToken", null);
... ... @@ -824,14 +824,14 @@ export default {
824 824 "/getSectionsList",
825 825 { params: { classId: _id } },
826 826 {
827   - headers: { Authorization: "Bearer " + token }
  827 + headers: { Authorization: "Bearer " + token },
828 828 }
829 829 )
830   - .then(response => {
  830 + .then((response) => {
831 831 this.addSection = response.data.data;
832 832 this.showLoader = false;
833 833 })
834   - .catch(err => {
  834 + .catch((err) => {
835 835 this.showLoader = false;
836 836 });
837 837 },
... ... @@ -843,14 +843,14 @@ export default {
843 843 "/getParticularClass",
844 844 { params: { classId: _id } },
845 845 {
846   - headers: { Authorization: "Bearer " + this.token }
  846 + headers: { Authorization: "Bearer " + this.token },
847 847 }
848 848 )
849   - .then(response => {
  849 + .then((response) => {
850 850 this.subjectList = response.data.data;
851 851 this.showLoader = false;
852 852 })
853   - .catch(err => {
  853 + .catch((err) => {
854 854 this.showLoader = false;
855 855 });
856 856 },
... ... @@ -869,7 +869,7 @@ export default {
869 869 this.imageFile = files[0]; // this is an image file that can be sent to server...
870 870 this.imageData.imageUrl = URL.createObjectURL(this.imageFile);
871 871 });
872   - console.log("this.imageName", this.imageName);
  872 + // console.log("this.imageName", this.imageName);
873 873 } else {
874 874 this.imageName = "";
875 875 this.imageFile = "";
... ... @@ -896,12 +896,12 @@ export default {
896 896 }
897 897 var FileSaver = require("file-saver");
898 898 FileSaver.saveAs(item.file, "image.jpg");
899   - }
  899 + },
900 900 },
901 901 mounted() {
902 902 this.token = this.$store.state.token;
903 903 this.role = this.$store.state.role;
904 904 this.getClass();
905   - }
  905 + },
906 906 };
907 907 </script>
908 908 \ No newline at end of file
... ...
src/pages/Academic/routine.vue
... ... @@ -188,19 +188,19 @@
188 188 <v-select
189 189 :items="classList"
190 190 label="Select Your Class"
191   - v-model="addRoutine.classId"
  191 + v-model="addRoutineList.classId"
192 192 item-text="classNum"
193 193 item-value="_id"
194 194 name="Select Class"
195 195 :rules="classRules"
196   - @change="getSections(addRoutine.classId)"
  196 + @change="getSections(addRoutineList.classId)"
197 197 class="pl-2"
198 198 required
199 199 ></v-select>
200 200 </v-flex>
201 201 <v-flex xs8 sm3 md2 class="mr-3">
202 202 <v-select
203   - v-model="addRoutine.sectionId"
  203 + v-model="addRoutineList.sectionId"
204 204 label="Select your section"
205 205 :items="addSection"
206 206 item-text="name"
... ... @@ -633,7 +633,7 @@ export default {
633 633 "Thursday",
634 634 "Friday",
635 635 "Saturday",
636   - "Sunday"
  636 + "Sunday",
637 637 ],
638 638  
639 639 token: "",
... ... @@ -643,18 +643,18 @@ export default {
643 643 menu4: false,
644 644 menu3: false,
645 645  
646   - schoolRules: [v => !!v || "School Year is required"],
647   - classRules: [v => !!v || " Class Name is required"],
648   - teacherRules: [v => !!v || " Teacher Name is required"],
649   - sectionRules: [v => !!v || "Section is required"],
650   - studentRules: [v => !!v || " Student is required"],
651   - finalRules: [v => !!v || "Final MArk is required"],
652   - subjectRules: [v => !!v || " Subject Name is required"],
653   - dayRules: [v => !!v || "Day is required"],
654   - timeInRules: [v => !!v || "Start Time is required"],
655   - timeOutRules: [v => !!v || "End Time is required"],
656   - roomRules: [v => !!v || "Room is required"],
657   - periodRules: [v => !!v || "Period is required"],
  646 + schoolRules: [(v) => !!v || "School Year is required"],
  647 + classRules: [(v) => !!v || " Class Name is required"],
  648 + teacherRules: [(v) => !!v || " Teacher Name is required"],
  649 + sectionRules: [(v) => !!v || "Section is required"],
  650 + studentRules: [(v) => !!v || " Student is required"],
  651 + finalRules: [(v) => !!v || "Final MArk is required"],
  652 + subjectRules: [(v) => !!v || " Subject Name is required"],
  653 + dayRules: [(v) => !!v || "Day is required"],
  654 + timeInRules: [(v) => !!v || "Start Time is required"],
  655 + timeOutRules: [(v) => !!v || "End Time is required"],
  656 + roomRules: [(v) => !!v || "Room is required"],
  657 + periodRules: [(v) => !!v || "Period is required"],
658 658  
659 659 classList: [],
660 660 addSection: [],
... ... @@ -666,14 +666,14 @@ export default {
666 666 routineList: [],
667 667 editedIndex: -1,
668 668 addRoutine: {},
  669 + addRoutineList: {},
669 670 startingTime: "",
670   - editedItem: {}
671   -
  671 + editedItem: {},
672 672 }),
673 673 methods: {
674 674 editItem(item, routineData) {
675   - console.log("routineData", routineData)
676   - console.log("item", item)
  675 + console.log("routineData", routineData);
  676 + console.log("item", item);
677 677 this.editedIndex = this.routineList;
678 678 this.editedItem = Object.assign({}, item);
679 679 this.editedItem.lectureRoutineId = item._id;
... ... @@ -684,22 +684,22 @@ export default {
684 684 deleteItem(item) {
685 685 let deleteLecture = {
686 686 routineId: item._id,
687   - lectureId: item.lectureRoutine[0]._id
  687 + lectureId: item.lectureRoutine[0]._id,
688 688 };
689 689 http()
690 690 .delete(
691 691 "/deleteRoutineLecture",
692 692 confirm("Are you sure you want to delete this?") && {
693   - params: deleteLecture
  693 + params: deleteLecture,
694 694 }
695 695 )
696   - .then(response => {
  696 + .then((response) => {
697 697 this.snackbar = true;
698 698 this.text = "Successfully delete Existing Routine";
699 699 this.color = "green";
700 700 this.getRoutineList();
701 701 })
702   - .catch(error => {
  702 + .catch((error) => {
703 703 this.snackbar = true;
704 704 this.text = error.response.data.message;
705 705 this.color = "error";
... ... @@ -715,7 +715,7 @@ export default {
715 715 classId: this.addRoutine.classId,
716 716 sectionId: this.addRoutine.sectionId,
717 717 day: this.addRoutine.day,
718   - lectureRoutine: []
  718 + lectureRoutine: [],
719 719 };
720 720 if (this.$refs.form.validate()) {
721 721 routineData.lectureRoutine.push({
... ... @@ -724,11 +724,11 @@ export default {
724 724 endingTime: this.addRoutine.endingTime,
725 725 room: this.addRoutine.room,
726 726 period: this.addRoutine.period,
727   - subjectName: this.addRoutine.subjectName
  727 + subjectName: this.addRoutine.subjectName,
728 728 });
729 729 http()
730 730 .post("/createRoutine", routineData)
731   - .then(response => {
  731 + .then((response) => {
732 732 this.getRoutineList();
733 733 this.text = "Routine added successfully";
734 734 this.clear();
... ... @@ -736,7 +736,7 @@ export default {
736 736 this.color = "green";
737 737 this.addRoutineDialog = false;
738 738 })
739   - .catch(error => {
  739 + .catch((error) => {
740 740 // console.log(error);
741 741 this.snackbar = true;
742 742 this.text = error.response.data.message;
... ... @@ -758,12 +758,12 @@ export default {
758 758 startingTime: this.editedItem.startingTime,
759 759 endingTime: this.editedItem.endingTime,
760 760 room: this.editedItem.room,
761   - period: this.editedItem.period
  761 + period: this.editedItem.period,
762 762 };
763 763 this.editLoading = true;
764 764 http()
765 765 .put("/updateRoutine", editRoutine)
766   - .then(response => {
  766 + .then((response) => {
767 767 this.snackbar = true;
768 768 this.text = "Successfully Edit Existing Routine";
769 769 this.color = "green";
... ... @@ -793,7 +793,7 @@ export default {
793 793 // console.log("err====>", err);
794 794 // });
795 795 })
796   - .catch(error => {
  796 + .catch((error) => {
797 797 this.editLoading = false;
798 798 });
799 799 }
... ... @@ -801,12 +801,12 @@ export default {
801 801 getClass() {
802 802 http()
803 803 .get("/getClassesList", {
804   - headers: { Authorization: "Bearer " + this.token }
  804 + headers: { Authorization: "Bearer " + this.token },
805 805 })
806   - .then(response => {
  806 + .then((response) => {
807 807 this.classList = response.data.data;
808 808 })
809   - .catch(error => {
  809 + .catch((error) => {
810 810 if (error.response.status === 401) {
811 811 this.$router.replace({ path: "/" });
812 812 this.$store.dispatch("setToken", null);
... ... @@ -822,14 +822,14 @@ export default {
822 822 "/getSectionsList",
823 823 { params: { classId: _id } },
824 824 {
825   - headers: { Authorization: "Bearer " + token }
  825 + headers: { Authorization: "Bearer " + token },
826 826 }
827 827 )
828   - .then(response => {
  828 + .then((response) => {
829 829 this.addSection = response.data.data;
830 830 this.showLoader = false;
831 831 })
832   - .catch(err => {
  832 + .catch((err) => {
833 833 this.showLoader = false;
834 834 });
835 835 },
... ... @@ -841,14 +841,14 @@ export default {
841 841 "/getParticularClass",
842 842 { params: { classId: _id } },
843 843 {
844   - headers: { Authorization: "Bearer " + this.token }
  844 + headers: { Authorization: "Bearer " + this.token },
845 845 }
846 846 )
847   - .then(response => {
  847 + .then((response) => {
848 848 this.subjectList = response.data.data;
849 849 this.showLoader = false;
850 850 })
851   - .catch(err => {
  851 + .catch((err) => {
852 852 this.showLoader = false;
853 853 });
854 854 },
... ... @@ -857,14 +857,14 @@ export default {
857 857 var token = this.$store.state.token;
858 858 http()
859 859 .get("/getTeachersList", {
860   - headers: { Authorization: "Bearer " + token }
  860 + headers: { Authorization: "Bearer " + token },
861 861 })
862   - .then(response => {
  862 + .then((response) => {
863 863 this.teacherList = response.data.data;
864 864 this.showLoader = false;
865 865 // console.log("getTeacherList=====>",this.desserts)
866 866 })
867   - .catch(error => {
  867 + .catch((error) => {
868 868 this.showLoader = false;
869 869 if (error.response.status === 401) {
870 870 this.$router.replace({ path: "/" });
... ... @@ -880,21 +880,21 @@ export default {
880 880 "/getRoutineList",
881 881 {
882 882 params: {
883   - classId: this.addRoutine.classId,
884   - sectionId: this.addRoutine.sectionId
885   - }
  883 + classId: this.addRoutineList.classId,
  884 + sectionId: this.addRoutineList.sectionId,
  885 + },
886 886 },
887 887 {
888   - headers: { Authorization: "Bearer " + this.token }
  888 + headers: { Authorization: "Bearer " + this.token },
889 889 }
890 890 )
891   - .then(response => {
  891 + .then((response) => {
892 892 this.routineList = response.data.data;
893 893 this.showLoader = false;
894 894 this.showTable = true;
895 895 this.hideTable = false;
896 896 })
897   - .catch(err => {
  897 + .catch((err) => {
898 898 this.showLoader = false;
899 899 });
900 900 },
... ... @@ -905,14 +905,14 @@ export default {
905 905 this.showSearch = false;
906 906 this.show = true;
907 907 this.search = "";
908   - }
  908 + },
909 909 },
910 910 mounted() {
911 911 this.token = this.$store.state.token;
912 912 this.getClass();
913 913 this.getTeacherList();
914 914 this.role = this.$store.state.role;
915   - }
  915 + },
916 916 };
917 917 </script>
918 918  
... ...
src/pages/Academic/subject.vue
... ... @@ -133,7 +133,13 @@
133 133 <v-flex xs12 sm12>
134 134 <v-card-actions>
135 135 <v-spacer></v-spacer>
136   - <v-btn round dark @click="save" :loading="editLoading" class="add-button">Update Subject</v-btn>
  136 + <v-btn
  137 + round
  138 + dark
  139 + @click="save"
  140 + :loading="editLoading"
  141 + class="add-button"
  142 + >Update Subject</v-btn>
137 143 </v-card-actions>
138 144 </v-flex>
139 145 </v-form>
... ... @@ -259,7 +265,7 @@
259 265 <v-select
260 266 :items="classList"
261 267 label="Select Your Class"
262   - v-model="addSubject.classId"
  268 + v-model="getSubject.classId"
263 269 item-text="classNum"
264 270 item-value="_id"
265 271 name="Select Class"
... ... @@ -339,7 +345,7 @@
339 345 <span>Delete</span>
340 346 </v-tooltip>
341 347 </span>
342   - </td> -->
  348 + </td>-->
343 349 </tr>
344 350 </template>
345 351 <v-alert
... ... @@ -546,39 +552,39 @@ export default {
546 552 // newActive: false,
547 553 type: ["Optional", "Mandatory"],
548 554 pagination: {
549   - rowsPerPage: 10
  555 + rowsPerPage: 10,
550 556 },
551 557 token: "",
552   - classRules: [v => !!v || " Class Name is required"],
553   - teacherRules: [v => !!v || " Teacher Name is required"],
554   - typeRules: [v => !!v || "Type is required"],
555   - markRules: [v => !!v || " Pass Mark is required"],
556   - finalRules: [v => !!v || "Final MArk is required"],
557   - subjectRules: [v => !!v || " Subject Name is required"],
  558 + classRules: [(v) => !!v || " Class Name is required"],
  559 + teacherRules: [(v) => !!v || " Teacher Name is required"],
  560 + typeRules: [(v) => !!v || "Type is required"],
  561 + markRules: [(v) => !!v || " Pass Mark is required"],
  562 + finalRules: [(v) => !!v || "Final MArk is required"],
  563 + subjectRules: [(v) => !!v || " Subject Name is required"],
558 564 headers: [
559 565 {
560 566 text: "No",
561 567 align: "",
562 568 sortable: false,
563   - value: "No"
  569 + value: "No",
564 570 },
565 571 {
566 572 text: "Subject Name",
567 573 value: "subjectName",
568 574 sortable: false,
569   - align: "center"
  575 + align: "center",
570 576 },
571 577 {
572 578 text: "Subject Author",
573 579 value: "subjectAuthor",
574 580 sortable: false,
575   - align: "center"
  581 + align: "center",
576 582 },
577 583 {
578 584 text: "Subject Code",
579 585 value: "subjectCode",
580 586 sortable: false,
581   - align: "center"
  587 + align: "center",
582 588 },
583 589 // {
584 590 // text: "Teacher",
... ... @@ -590,19 +596,19 @@ export default {
590 596 text: "Pass Marks",
591 597 value: "passMarks",
592 598 sortable: false,
593   - align: "center"
  599 + align: "center",
594 600 },
595 601 {
596 602 text: "Final Marks",
597 603 value: "finalMarks",
598 604 sortable: false,
599   - align: "center"
  605 + align: "center",
600 606 },
601 607 {
602 608 text: "Type",
603 609 value: "type",
604 610 sortable: false,
605   - align: "center"
  611 + align: "center",
606 612 },
607 613 // { text: "Action", value: "", sortable: false, align: "center" }
608 614 ],
... ... @@ -611,11 +617,12 @@ export default {
611 617 teacherList: [],
612 618 editedIndex: -1,
613 619 addSubject: {},
  620 + getSubject: {},
614 621  
615 622 editedItem: {
616 623 // subjectName: "",
617 624 // subjectAuthor: ""
618   - }
  625 + },
619 626 }),
620 627 methods: {
621 628 pickFile() {
... ... @@ -636,25 +643,25 @@ export default {
636 643 deleteItem(item) {
637 644 let deleteSubject = {
638 645 classId: this.addSubject.classId,
639   - subjectId: item._id
  646 + subjectId: item._id,
640 647 };
641 648 http()
642 649 .delete(
643 650 "/deleteSubject",
644 651 confirm("Are you sure you want to delete this?") && {
645   - params: deleteSubject
  652 + params: deleteSubject,
646 653 }
647 654 )
648   - .then(response => {
  655 + .then((response) => {
649 656 this.snackbar = true;
650 657 this.color = "green";
651 658 this.text = "Successfully delete Existing Subject";
652 659 this.getClassSubject(this.addSubject.classId);
653 660 })
654   - .catch(error => {
655   - // this.snackbar = true;
656   - // this.text = error.response.data.message;
657   - // this.color = "error";
  661 + .catch((error) => {
  662 + // this.snackbar = true;
  663 + // this.text = error.response.data.message;
  664 + // this.color = "error";
658 665 console.log("error", error);
659 666 });
660 667 },
... ... @@ -666,10 +673,10 @@ export default {
666 673 },
667 674 submit() {
668 675 if (this.$refs.form.validate()) {
669   - this.addLoading = true;
  676 + this.addLoading = true;
670 677 http()
671 678 .post("/addSubject", this.addSubject)
672   - .then(response => {
  679 + .then((response) => {
673 680 this.snackbar = true;
674 681 this.text = "New Subject added successfully";
675 682 this.color = "green";
... ... @@ -677,7 +684,7 @@ export default {
677 684 this.addSubjectDialog = false;
678 685 this.getClassSubject(_id);
679 686 })
680   - .catch(error => {
  687 + .catch((error) => {
681 688 this.addLoading = false;
682 689 });
683 690 }
... ... @@ -696,12 +703,12 @@ export default {
696 703 finalMarks: this.editedItem.finalMarks,
697 704 subjectAuthor: this.editedItem.subjectAuthor,
698 705 subjectCode: this.editedItem.subjectCode,
699   - subjectName: this.editedItem.subjectName
  706 + subjectName: this.editedItem.subjectName,
700 707 };
701 708 this.editLoading = true;
702 709 http()
703 710 .put("/updateSubject", editSubject)
704   - .then(response => {
  711 + .then((response) => {
705 712 this.snackbar = true;
706 713 this.text = "Successfully Edit Existing Subject";
707 714 this.color = "green";
... ... @@ -709,7 +716,7 @@ export default {
709 716 this.editSubjectDialog = false;
710 717 this.getClassSubject(this.editedItem.classId);
711 718 })
712   - .catch(error => {
  719 + .catch((error) => {
713 720 this.editLoading = false;
714 721  
715 722 // console.log(error);
... ... @@ -725,26 +732,26 @@ export default {
725 732 "/getParticularClass",
726 733 { params: { classId: _id } },
727 734 {
728   - headers: { Authorization: "Bearer " + this.token }
  735 + headers: { Authorization: "Bearer " + this.token },
729 736 }
730 737 )
731   - .then(response => {
  738 + .then((response) => {
732 739 this.subjectList = response.data.data;
733 740 this.showLoader = false;
734 741 })
735   - .catch(err => {
  742 + .catch((err) => {
736 743 this.showLoader = false;
737 744 });
738 745 },
739 746 getClass() {
740 747 http()
741 748 .get("/getClassesList", {
742   - headers: { Authorization: "Bearer " + this.token }
  749 + headers: { Authorization: "Bearer " + this.token },
743 750 })
744   - .then(response => {
  751 + .then((response) => {
745 752 this.classList = response.data.data;
746 753 })
747   - .catch(error => {
  754 + .catch((error) => {
748 755 if (error.response.status === 401) {
749 756 this.$router.replace({ path: "/" });
750 757 this.$store.dispatch("setToken", null);
... ... @@ -757,14 +764,14 @@ export default {
757 764 var token = this.$store.state.token;
758 765 http()
759 766 .get("/getTeachersList", {
760   - headers: { Authorization: "Bearer " + token }
  767 + headers: { Authorization: "Bearer " + token },
761 768 })
762   - .then(response => {
  769 + .then((response) => {
763 770 this.teacherList = response.data.data;
764 771 this.showLoader = false;
765 772 // console.log("getTeacherList=====>",this.desserts)
766 773 })
767   - .catch(error => {
  774 + .catch((error) => {
768 775 this.showLoader = false;
769 776 if (error.response.status === 401) {
770 777 this.$router.replace({ path: "/" });
... ... @@ -780,7 +787,7 @@ export default {
780 787 this.showSearch = false;
781 788 this.show = true;
782 789 this.search = "";
783   - }
  790 + },
784 791 },
785 792 mounted() {
786 793 this.token = this.$store.state.token;
... ... @@ -788,6 +795,6 @@ export default {
788 795 this.getClass();
789 796 this.getTeacherList();
790 797 this.role = this.$store.state.role;
791   - }
  798 + },
792 799 };
793 800 </script>
794 801 \ No newline at end of file
... ...
src/pages/Annoucement/annoucement.vue
... ... @@ -213,7 +213,7 @@
213 213 round
214 214 dark
215 215 :loading="loading"
216   - class="add-button hidden-xs-only hidden-sm-only"
  216 + class="open-dialog-button hidden-xs-only hidden-sm-only"
217 217 >Find</v-btn>
218 218 <v-card-title class="body-1" v-show="show">
219 219 <v-btn icon large flat @click="displaySearch">
... ... @@ -497,7 +497,7 @@ export default {
497 497 addclass: [],
498 498 addSection: [],
499 499 pagination: {
500   - rowsPerPage: 10
  500 + rowsPerPage: 10,
501 501 },
502 502 imageData: {},
503 503 imageName: "",
... ... @@ -505,33 +505,33 @@ export default {
505 505 imageFile: "",
506 506 editImageName: "",
507 507 editImageUrl: "",
508   - courseRules: [v => !!v || " Course Name is required"],
509   - classRules: [v => !!v || " Class Name is required"],
510   - sectionRules: [v => !!v || "Section Name is required"],
  508 + courseRules: [(v) => !!v || " Course Name is required"],
  509 + classRules: [(v) => !!v || " Class Name is required"],
  510 + sectionRules: [(v) => !!v || "Section Name is required"],
511 511 errorMessages: "",
512 512 headers: [
513 513 {
514 514 text: "Image",
515 515 value: "attachementUrl",
516 516 sortable: false,
517   - align: "center"
  517 + align: "center",
518 518 },
519 519 {
520 520 text: "Discussion Type",
521 521 value: "discussionType",
522 522 sortable: false,
523   - align: "center"
  523 + align: "center",
524 524 },
525   - { text: "Action", value: "", sortable: false, align: "center" }
  525 + { text: "Action", value: "", sortable: false, align: "center" },
526 526 ],
527 527 courseData: [],
528 528 editedIndex: -1,
529 529 addAnnoucement: {
530   - select: ""
  530 + select: "",
531 531 },
532 532 selectAnnoucement: {},
533 533 editedItem: {},
534   - annoucementData: []
  534 + annoucementData: [],
535 535 }),
536 536 methods: {
537 537 getCourses(selectCourseId) {
... ... @@ -539,14 +539,14 @@ export default {
539 539 http()
540 540 .get("/getCourseesList", {
541 541 params: {
542   - classId: selectCourseId
543   - }
  542 + classId: selectCourseId,
  543 + },
544 544 })
545   - .then(response => {
  545 + .then((response) => {
546 546 this.courseData = response.data.data;
547 547 this.showLoader = false;
548 548 })
549   - .catch(err => {
  549 + .catch((err) => {
550 550 console.log("err====>", err);
551 551 this.showLoader = false;
552 552 });
... ... @@ -557,14 +557,14 @@ export default {
557 557 .get("/getAnnoucementesList", {
558 558 params: {
559 559 courseId: this.selectAnnoucement.courseId,
560   - classId: this.selectAnnoucement.classId
561   - }
  560 + classId: this.selectAnnoucement.classId,
  561 + },
562 562 })
563   - .then(response => {
  563 + .then((response) => {
564 564 this.annoucementData = response.data.data;
565 565 this.showLoader = false;
566 566 })
567   - .catch(err => {
  567 + .catch((err) => {
568 568 console.log("err====>", err);
569 569 this.showLoader = false;
570 570 });
... ... @@ -594,7 +594,7 @@ export default {
594 594 pickEditFile() {
595 595 this.$refs.editDataImage.click();
596 596 },
597   - dates: function(date) {
  597 + dates: function (date) {
598 598 return moment(date).format("MMMM DD, YYYY");
599 599 return date;
600 600 },
... ... @@ -651,22 +651,22 @@ export default {
651 651 },
652 652 deleteItem(item) {
653 653 let deleteAnnoucement = {
654   - annoucementId: item._id
  654 + annoucementId: item._id,
655 655 };
656 656 http()
657 657 .delete(
658 658 "/deleteAnnoucement",
659 659 confirm("Are you sure you want to delete this?") && {
660   - params: deleteAnnoucement
  660 + params: deleteAnnoucement,
661 661 }
662 662 )
663   - .then(response => {
  663 + .then((response) => {
664 664 this.snackbar = true;
665 665 this.text = response.data.message;
666 666 this.color = "green";
667 667 this.getAnnoucementes();
668 668 })
669   - .catch(error => {
  669 + .catch((error) => {
670 670 this.snackbar = true;
671 671 this.text = error.response.data.message;
672 672 this.color = "error";
... ... @@ -681,7 +681,7 @@ export default {
681 681 rowAnnoucement(id) {
682 682 this.$router.push({
683 683 name: "Annoucement Forum",
684   - params: { annoucementId: id }
  684 + params: { annoucementId: id },
685 685 });
686 686 },
687 687 submit() {
... ... @@ -690,7 +690,7 @@ export default {
690 690 classId: this.addAnnoucement.select,
691 691 sectionId: this.addAnnoucement.selectSection,
692 692 discussionType: this.addAnnoucement.discussionType,
693   - courseId: this.addAnnoucement.courseName
  693 + courseId: this.addAnnoucement.courseName,
694 694 };
695 695 if (this.imageUrl) {
696 696 var str = this.imageUrl;
... ... @@ -700,7 +700,7 @@ export default {
700 700 this.loading = true;
701 701 http()
702 702 .post("/createAnnoucement", addCourse)
703   - .then(response => {
  703 + .then((response) => {
704 704 this.snackbar = true;
705 705 this.text = "New Annoucement added successfully";
706 706 this.color = "green";
... ... @@ -708,7 +708,7 @@ export default {
708 708 this.clear();
709 709 this.loading = false;
710 710 })
711   - .catch(error => {
  711 + .catch((error) => {
712 712 this.snackbar = true;
713 713 this.text = error.response.data.message;
714 714 this.color = "error";
... ... @@ -725,7 +725,7 @@ export default {
725 725 annoucementId: this.editedItem._id,
726 726 discussionType: this.editedItem.discussionType,
727 727 classId: this.editedItem.select,
728   - courseId: this.editedItem.courseName
  728 + courseId: this.editedItem.courseName,
729 729 };
730 730 if (this.editImageUrl) {
731 731 var str = this.editImageUrl;
... ... @@ -735,7 +735,7 @@ export default {
735 735 this.editLoading = true;
736 736 http()
737 737 .put("/updateAnnoucement", editAnnoucement)
738   - .then(response => {
  738 + .then((response) => {
739 739 this.snackbar = true;
740 740 this.text = response.data.message;
741 741 this.color = "green";
... ... @@ -744,7 +744,7 @@ export default {
744 744 this.close();
745 745 this.editLoading = false;
746 746 })
747   - .catch(error => {
  747 + .catch((error) => {
748 748 this.snackbar = true;
749 749 this.text = error.response.data.statusText;
750 750 this.color = "error";
... ... @@ -759,18 +759,18 @@ export default {
759 759 this.showSearch = false;
760 760 this.show = true;
761 761 this.search = "";
762   - }
  762 + },
763 763 },
764 764 mounted() {
765 765 var token = this.$store.state.token;
766 766 http()
767 767 .get("/getClassesList", {
768   - headers: { Authorization: "Bearer " + token }
  768 + headers: { Authorization: "Bearer " + token },
769 769 })
770   - .then(response => {
  770 + .then((response) => {
771 771 this.addclass = response.data.data;
772 772 })
773   - .catch(error => {
  773 + .catch((error) => {
774 774 this.showLoader = false;
775 775 if (error.response.status === 401) {
776 776 this.$router.replace({ path: "/" });
... ... @@ -779,7 +779,7 @@ export default {
779 779 this.$store.dispatch("Role", null);
780 780 }
781 781 });
782   - }
  782 + },
783 783 };
784 784 </script>
785 785 <style>
... ...
src/pages/Attendence/studentAttendence.vue
... ... @@ -38,11 +38,11 @@
38 38 small
39 39 :items="addclass"
40 40 label="Select Class"
41   - v-model="getReport.classId"
  41 + v-model="getAttendence.classId"
42 42 item-text="classNum"
43 43 item-value="_id"
44 44 name="Select Class"
45   - @change="getSection(getReport.classId)"
  45 + @change="getSection(getAttendence.classId)"
46 46 class="px-2"
47 47 required
48 48 ></v-select>
... ... @@ -52,11 +52,11 @@
52 52 small
53 53 :items="addSection"
54 54 label="Select Section"
55   - v-model="getReport.sectionId"
  55 + v-model="getAttendence.sectionId"
56 56 item-text="name"
57 57 item-value="_id"
58 58 name="Select Section"
59   - @change="getStudents(getReport.sectionId)"
  59 + @change="getStudents(getAttendence.sectionId)"
60 60 class="px-2"
61 61 required
62 62 ></v-select>
... ... @@ -278,7 +278,7 @@ export default {
278 278 search: "",
279 279 addclass: [],
280 280 pagination: {
281   - rowsPerPage: 10
  281 + rowsPerPage: 10,
282 282 },
283 283 imageData: {},
284 284 imageName: "",
... ... @@ -289,30 +289,30 @@ export default {
289 289 text: "No",
290 290 align: "",
291 291 sortable: false,
292   - value: "index"
  292 + value: "index",
293 293 },
294 294 {
295 295 text: "Profile Pic",
296 296 value: "profilprofilePicUrlePicUrl",
297 297 sortable: false,
298   - align: "center"
  298 + align: "center",
299 299 },
300 300 { text: "Name", value: "name", sortable: false, align: "center" },
301 301 {
302 302 text: "Mobile No",
303 303 value: "fatherCellNo",
304 304 sortable: false,
305   - align: "center"
  305 + align: "center",
306 306 },
307 307 { text: "Email", value: "email", sortable: false, align: "center" },
308   - { text: "Attendance", value: "", sortable: false, align: "center" }
  308 + { text: "Attendance", value: "", sortable: false, align: "center" },
309 309 ],
310 310 // json_data: [],
311 311 parentId: "",
312 312 token: "",
313 313 selectStudents: {
314 314 select: "",
315   - selectSection: ""
  315 + selectSection: "",
316 316 },
317 317  
318 318 role: "",
... ... @@ -323,26 +323,27 @@ export default {
323 323 valid: true,
324 324  
325 325 getReport: {},
  326 + getAttendence: {},
326 327 studentsList: [],
327 328 studentsData: [],
328 329 addSection: [],
329 330  
330 331 SectionName: ["A", "B", "C", "D", "E", "F"],
331   - classRules: [v => !!v || "Class is required"],
332   - sectionRules: [v => !!v || "Class is required"],
333   - studentRules: [v => !!v || "Student is required"],
334   - dataValid: [v => !!v || "Date is required"],
  332 + classRules: [(v) => !!v || "Class is required"],
  333 + sectionRules: [(v) => !!v || "Class is required"],
  334 + studentRules: [(v) => !!v || "Student is required"],
  335 + dataValid: [(v) => !!v || "Date is required"],
335 336  
336 337 attendenceType: [
337 338 {
338 339 label: "Present",
339   - value: true
  340 + value: true,
340 341 },
341 342 {
342 343 label: "Absent",
343   - value: false
344   - }
345   - ]
  344 + value: false,
  345 + },
  346 + ],
346 347 }),
347 348 methods: {
348 349 save(date) {
... ... @@ -355,12 +356,12 @@ export default {
355 356 getAllClass() {
356 357 http()
357 358 .get("/getClassesList", {
358   - headers: { Authorization: "Bearer " + this.token }
  359 + headers: { Authorization: "Bearer " + this.token },
359 360 })
360   - .then(response => {
  361 + .then((response) => {
361 362 this.addclass = response.data.data;
362 363 })
363   - .catch(error => {
  364 + .catch((error) => {
364 365 // console.log("err====>", err);
365 366 // this.$router.replace({ path: "/" });
366 367 });
... ... @@ -372,14 +373,14 @@ export default {
372 373 "/getSectionsList",
373 374 { params: { classId: _id } },
374 375 {
375   - headers: { Authorization: "Bearer " + this.token }
  376 + headers: { Authorization: "Bearer " + this.token },
376 377 }
377 378 )
378   - .then(response => {
  379 + .then((response) => {
379 380 this.addSection = response.data.data;
380 381 this.showLoader = false;
381 382 })
382   - .catch(err => {
  383 + .catch((err) => {
383 384 this.showLoader = false;
384 385 // console.log("err====>", err);
385 386 });
... ... @@ -389,11 +390,11 @@ export default {
389 390 http()
390 391 .get("/getStudentWithClass", {
391 392 params: {
392   - classId: this.getReport.classId,
393   - sectionId: this.getReport.sectionId
394   - }
  393 + classId: this.getAttendence.classId,
  394 + sectionId: this.getAttendence.sectionId,
  395 + },
395 396 })
396   - .then(response => {
  397 + .then((response) => {
397 398 this.studentsData = response.data.data;
398 399 this.showLoader = false;
399 400 // this.addStudentAttendenceDialog = false;
... ... @@ -402,7 +403,7 @@ export default {
402 403 this.studentsData[i].attendence = true;
403 404 }
404 405 })
405   - .catch(error => {
  406 + .catch((error) => {
406 407 console.log("err====>", error);
407 408 this.showLoader = false;
408 409 });
... ... @@ -412,23 +413,23 @@ export default {
412 413 for (var j = 0; j < this.studentsData.length; j++) {
413 414 studentsAttendence.push({
414 415 studentId: this.studentsData[j]._id,
415   - isPresent: this.studentsData[j].attendence
  416 + isPresent: this.studentsData[j].attendence,
416 417 });
417 418 }
418 419 if (this.$refs.form.validate()) {
419 420 let attendanceData = {
420 421 sectionId: this.getReport.sectionId,
421 422 date: this.date,
422   - students: studentsAttendence
  423 + students: studentsAttendence,
423 424 };
424 425 http()
425 426 .put("/updateAttendance", attendanceData)
426   - .then(response => {
  427 + .then((response) => {
427 428 this.snackbar = true;
428 429 this.text = response.data.message;
429 430 this.addStudentAttendenceDialog = false;
430 431 })
431   - .catch(error => {
  432 + .catch((error) => {
432 433 this.snackbar = true;
433 434 this.text = error.response.data.message;
434 435 });
... ... @@ -442,13 +443,13 @@ export default {
442 443 this.showSearch = false;
443 444 this.show = true;
444 445 this.search = "";
445   - }
  446 + },
446 447 },
447 448 mounted() {
448 449 // this.getStudentList();
449 450 this.token = this.$store.state.token;
450 451 this.getAllClass();
451 452 this.role = this.$store.state.role;
452   - }
  453 + },
453 454 };
454 455 </script>
455 456 \ No newline at end of file
... ...
src/pages/Authentication/Login.vue
... ... @@ -92,12 +92,15 @@ export default {
92 92 mixins: [AllApiCalls],
93 93 data() {
94 94 return {
95   - // snackbar: false,
96   - // y: "top",
97   - // x: "right",
98   - // mode: "",
99   - // timeout: 3000,
100   - // text: "",
  95 + //SNACKBAR
  96 + y: "top",
  97 + x: "right",
  98 + mode: "",
  99 + timeout: 10000,
  100 + text: "",
  101 + snackbarColor: "",
  102 +
  103 + snackbar: false,
101 104 append: "",
102 105 e1: true,
103 106 loading: false,
... ... @@ -245,10 +248,12 @@ export default {
245 248 if (error.response.data.message) {
246 249 this.text = error.response.data.message;
247 250 this.snackbar = true;
  251 + this.snackbarColor = "error";
248 252 this.loading = false;
249 253 } else {
250 254 this.text = "Server appears to be offline";
251 255 this.snackbar = true;
  256 + this.snackbarColor = "error";
252 257 this.loading = false;
253 258 }
254 259 });
... ...
src/pages/Course/course.vue
... ... @@ -180,7 +180,7 @@
180 180 round
181 181 dark
182 182 :loading="loading"
183   - class="add-button hidden-xs-only hidden-sm-only"
  183 + class="open-dialog-button hidden-xs-only hidden-sm-only"
184 184 >Find</v-btn>
185 185 <v-card-title class="body-1" v-show="show">
186 186 <v-btn icon large flat @click="displaySearch">
... ... @@ -437,7 +437,7 @@ export default {
437 437 addclass: [],
438 438 addSection: [],
439 439 pagination: {
440   - rowsPerPage: 10
  440 + rowsPerPage: 10,
441 441 },
442 442 imageData: {},
443 443 imageName: "",
... ... @@ -445,33 +445,33 @@ export default {
445 445 imageFile: "",
446 446 editImageName: "",
447 447 editImageUrl: "",
448   - courseRules: [v => !!v || " Course Name is required"],
449   - classRules: [v => !!v || " Class Name is required"],
450   - sectionRules: [v => !!v || " Section Name is required"],
  448 + courseRules: [(v) => !!v || " Course Name is required"],
  449 + classRules: [(v) => !!v || " Class Name is required"],
  450 + sectionRules: [(v) => !!v || " Section Name is required"],
451 451 errorMessages: "",
452 452 headers: [
453 453 {
454 454 text: "Image",
455 455 value: "courseImageUrl",
456 456 sortable: false,
457   - align: "center"
  457 + align: "center",
458 458 },
459 459 {
460 460 text: "Course",
461 461 value: "course",
462 462 sortable: false,
463   - align: "center"
  463 + align: "center",
464 464 },
465   - { text: "Action", value: "", sortable: false, align: "center" }
  465 + { text: "Action", value: "", sortable: false, align: "center" },
466 466 ],
467 467 courseData: [],
468 468 editedIndex: -1,
469 469 addCourses: {},
470 470 selectStudents: {
471 471 select: "",
472   - selectSection: ""
  472 + selectSection: "",
473 473 },
474   - editedItem: {}
  474 + editedItem: {},
475 475 }),
476 476 methods: {
477 477 getCourses() {
... ... @@ -479,14 +479,14 @@ export default {
479 479 http()
480 480 .get("/getCourseesList", {
481 481 params: {
482   - classId: this.selectStudents.select
483   - }
  482 + classId: this.selectStudents.select,
  483 + },
484 484 })
485   - .then(response => {
  485 + .then((response) => {
486 486 this.courseData = response.data.data;
487 487 this.showLoader = false;
488 488 })
489   - .catch(err => {
  489 + .catch((err) => {
490 490 console.log("err====>", err);
491 491 this.showLoader = false;
492 492 });
... ... @@ -499,14 +499,14 @@ export default {
499 499 "/getSectionsList",
500 500 { params: { classId: _id } },
501 501 {
502   - headers: { Authorization: "Bearer " + token }
  502 + headers: { Authorization: "Bearer " + token },
503 503 }
504 504 )
505   - .then(response => {
  505 + .then((response) => {
506 506 this.addSection = response.data.data;
507 507 this.showLoader = false;
508 508 })
509   - .catch(err => {
  509 + .catch((err) => {
510 510 this.showLoader = false;
511 511 });
512 512 },
... ... @@ -516,7 +516,7 @@ export default {
516 516 pickEditFile() {
517 517 this.$refs.editDataImage.click();
518 518 },
519   - dates: function(date) {
  519 + dates: function (date) {
520 520 return moment(date).format("MMMM DD, YYYY");
521 521 return date;
522 522 },
... ... @@ -575,22 +575,22 @@ export default {
575 575 },
576 576 deleteItem(item) {
577 577 let deleteCourse = {
578   - courseId: item._id
  578 + courseId: item._id,
579 579 };
580 580 http()
581 581 .delete(
582 582 "/deleteCourse",
583 583 confirm("Are you sure you want to delete this?") && {
584   - params: deleteCourse
  584 + params: deleteCourse,
585 585 }
586 586 )
587   - .then(response => {
  587 + .then((response) => {
588 588 this.snackbar = true;
589 589 this.text = response.data.message;
590 590 this.color = "green";
591 591 this.getCourses();
592 592 })
593   - .catch(error => {
  593 + .catch((error) => {
594 594 this.snackbar = true;
595 595 this.text = error.response.data.message;
596 596 this.color = "error";
... ... @@ -607,7 +607,7 @@ export default {
607 607 let addCourse = {
608 608 classId: this.addCourses.select,
609 609 sectionId: this.addCourses.selectSection,
610   - courseName: this.addCourses.courseName
  610 + courseName: this.addCourses.courseName,
611 611 };
612 612 if (this.imageUrl) {
613 613 var str = this.imageUrl;
... ... @@ -617,7 +617,7 @@ export default {
617 617 this.loading = true;
618 618 http()
619 619 .post("/createCourse", addCourse)
620   - .then(response => {
  620 + .then((response) => {
621 621 this.snackbar = true;
622 622 this.text = "New Course added successfully";
623 623 this.color = "green";
... ... @@ -625,7 +625,7 @@ export default {
625 625 this.clear();
626 626 this.loading = false;
627 627 })
628   - .catch(error => {
  628 + .catch((error) => {
629 629 this.snackbar = true;
630 630 this.text = error.response.data.message;
631 631 this.color = "error";
... ... @@ -641,7 +641,7 @@ export default {
641 641 let editCourse = {
642 642 courseId: this.editedItem._id,
643 643 courseName: this.editedItem.courseName,
644   - classId: this.editedItem.select
  644 + classId: this.editedItem.select,
645 645 };
646 646 if (this.editImageUrl) {
647 647 var str = this.editImageUrl;
... ... @@ -651,7 +651,7 @@ export default {
651 651 this.editLoading = true;
652 652 http()
653 653 .put("/updateCourse", editCourse)
654   - .then(response => {
  654 + .then((response) => {
655 655 this.snackbar = true;
656 656 this.text = response.data.message;
657 657 this.color = "green";
... ... @@ -660,7 +660,7 @@ export default {
660 660 this.close();
661 661 this.editLoading = false;
662 662 })
663   - .catch(error => {
  663 + .catch((error) => {
664 664 this.snackbar = true;
665 665 this.text = error.response.data.statusText;
666 666 this.color = "error";
... ... @@ -675,18 +675,18 @@ export default {
675 675 this.showSearch = false;
676 676 this.show = true;
677 677 this.search = "";
678   - }
  678 + },
679 679 },
680 680 mounted() {
681 681 var token = this.$store.state.token;
682 682 http()
683 683 .get("/getClassesList", {
684   - headers: { Authorization: "Bearer " + token }
  684 + headers: { Authorization: "Bearer " + token },
685 685 })
686   - .then(response => {
  686 + .then((response) => {
687 687 this.addclass = response.data.data;
688 688 })
689   - .catch(error => {
  689 + .catch((error) => {
690 690 this.showLoader = false;
691 691 if (error.response.status === 401) {
692 692 this.$router.replace({ path: "/" });
... ... @@ -695,7 +695,7 @@ export default {
695 695 this.$store.dispatch("Role", null);
696 696 }
697 697 });
698   - }
  698 + },
699 699 };
700 700 </script>
701 701 <style scoped>
... ...
src/pages/Course/enrollStudents.vue
... ... @@ -136,29 +136,29 @@ export default {
136 136 search: "",
137 137 addclass: [],
138 138 pagination: {
139   - rowsPerPage: 10
  139 + rowsPerPage: 10,
140 140 },
141 141 headers: [
142 142 {
143 143 text: "Profile Pic",
144 144 value: "profilprofilePicUrlePicUrl",
145 145 sortable: false,
146   - align: "center"
  146 + align: "center",
147 147 },
148 148 { text: "Name", value: "name", sortable: false, align: "center" },
149 149 {
150 150 text: "Mobile No",
151 151 value: "fatherCellNo",
152 152 sortable: false,
153   - align: "center"
  153 + align: "center",
154 154 },
155   - { text: "Email", value: "email", sortable: false, align: "center" }
  155 + { text: "Email", value: "email", sortable: false, align: "center" },
156 156 // { text: "Action", value: "", sortable: false, align: "center" }
157 157 ],
158 158 token: "",
159 159 selectStudents: {
160 160 select: "",
161   - selectSection: ""
  161 + selectSection: "",
162 162 },
163 163  
164 164 role: "",
... ... @@ -170,7 +170,7 @@ export default {
170 170 studentsData: [],
171 171 courseData: [],
172 172 addSection: [],
173   - selected: []
  173 + selected: [],
174 174 }),
175 175 methods: {
176 176 save(date) {
... ... @@ -179,12 +179,12 @@ export default {
179 179 getAllClass() {
180 180 http()
181 181 .get("/getClassesList", {
182   - headers: { Authorization: "Bearer " + this.token }
  182 + headers: { Authorization: "Bearer " + this.token },
183 183 })
184   - .then(response => {
  184 + .then((response) => {
185 185 this.addclass = response.data.data;
186 186 })
187   - .catch(error => {
  187 + .catch((error) => {
188 188 // console.log("err====>", err);
189 189 // this.$router.replace({ path: "/" });
190 190 });
... ... @@ -194,14 +194,14 @@ export default {
194 194 http()
195 195 .get("/getCourseesList", {
196 196 params: {
197   - classId: classId
198   - }
  197 + classId: classId,
  198 + },
199 199 })
200   - .then(response => {
  200 + .then((response) => {
201 201 this.courseData = response.data.data;
202 202 this.showLoader = false;
203 203 })
204   - .catch(err => {
  204 + .catch((err) => {
205 205 console.log("err====>", err);
206 206 this.showLoader = false;
207 207 });
... ... @@ -211,10 +211,10 @@ export default {
211 211 http()
212 212 .get("/getStudentsList", {
213 213 params: {
214   - classId: this.getReport.classId
215   - }
  214 + classId: this.getReport.classId,
  215 + },
216 216 })
217   - .then(response => {
  217 + .then((response) => {
218 218 this.studentsData = response.data.data;
219 219 this.showLoader = false;
220 220 // this.addStudentAttendenceDialog = false;
... ... @@ -224,7 +224,7 @@ export default {
224 224 }
225 225 this.getParticularCourse();
226 226 })
227   - .catch(error => {
  227 + .catch((error) => {
228 228 console.log("err====>", error);
229 229 this.showLoader = false;
230 230 });
... ... @@ -238,23 +238,23 @@ export default {
238 238 for (var j = 0; j < this.studentsData.length; j++) {
239 239 studentsAttendence.push({
240 240 studentId: this.studentsData[j]._id,
241   - isPresent: this.studentsData[j].attendence
  241 + isPresent: this.studentsData[j].attendence,
242 242 });
243 243 }
244 244 if (this.$refs.form.validate()) {
245 245 let attendanceData = {
246 246 sectionId: this.getReport.sectionId,
247 247 date: this.date,
248   - students: studentsAttendence
  248 + students: studentsAttendence,
249 249 };
250 250 http()
251 251 .put("/updateAttendance", attendanceData)
252   - .then(response => {
  252 + .then((response) => {
253 253 this.snackbar = true;
254 254 this.text = response.data.message;
255 255 this.addStudentAttendenceDialog = false;
256 256 })
257   - .catch(error => {
  257 + .catch((error) => {
258 258 this.snackbar = true;
259 259 this.text = error.response.data.message;
260 260 });
... ... @@ -267,11 +267,11 @@ export default {
267 267 if (withdraw) {
268 268 var payload = {
269 269 courseId: this.getReport.courseId,
270   - enrollStudents: []
  270 + enrollStudents: [],
271 271 };
272 272 http()
273 273 .put("/enrollStudents", payload)
274   - .then(response => {
  274 + .then((response) => {
275 275 this.snackbar = true;
276 276 this.text = response.data.message;
277 277 this.selected = [];
... ... @@ -280,25 +280,25 @@ export default {
280 280 }
281 281 this.getParticularCourse();
282 282 })
283   - .catch(error => {
  283 + .catch((error) => {
284 284 this.snackbar = true;
285 285 this.text = error.response.data.message;
286 286 });
287 287 } else {
288 288 let selectedStudentsArray = [];
289 289 for (let item of this.studentsData) {
290   - if(item.enroll === false || !item.enroll) {
  290 + if (item.enroll === false || !item.enroll) {
291 291 selectedStudentsArray.push({ studentId: item._id });
292 292 }
293 293 }
294 294  
295 295 var payload = {
296 296 courseId: this.getReport.courseId,
297   - enrollStudents: selectedStudentsArray
  297 + enrollStudents: selectedStudentsArray,
298 298 };
299 299 http()
300 300 .put("/enrollStudents", payload)
301   - .then(response => {
  301 + .then((response) => {
302 302 this.snackbar = true;
303 303 this.text = response.data.message;
304 304 for (let i = 0; i < this.studentsData.length; i++) {
... ... @@ -306,7 +306,7 @@ export default {
306 306 }
307 307 this.getParticularCourse();
308 308 })
309   - .catch(error => {
  309 + .catch((error) => {
310 310 this.snackbar = true;
311 311 this.text = error.response.data.message;
312 312 });
... ... @@ -314,13 +314,13 @@ export default {
314 314 },
315 315  
316 316 selectParticularStudent(selected) {
317   - console.log("selected", selected);
  317 + // console.log("selected", selected);
318 318 let selectedStudentsArray = [];
319 319 selectedStudentsArray.push({ studentId: selected._id });
320 320  
321 321 let isExists = false;
322   - for(let item of this.selected) {
323   - if(item._id === selected._id) {
  322 + for (let item of this.selected) {
  323 + if (item._id === selected._id) {
324 324 isExists = true;
325 325 break;
326 326 }
... ... @@ -330,16 +330,16 @@ export default {
330 330 if (!isExists) this.selected.push(selected);
331 331 var payload = {
332 332 courseId: this.getReport.courseId,
333   - enrollStudents: selectedStudentsArray
  333 + enrollStudents: selectedStudentsArray,
334 334 };
335 335 http()
336 336 .put("/enrollStudents", payload)
337   - .then(response => {
  337 + .then((response) => {
338 338 this.snackbar = true;
339 339 this.text = response.data.message;
340 340 this.getParticularCourse();
341 341 })
342   - .catch(error => {
  342 + .catch((error) => {
343 343 this.snackbar = true;
344 344 this.text = error.response.data.message;
345 345 });
... ... @@ -351,16 +351,16 @@ export default {
351 351 ) {
352 352 var payloadDeleteStudents = {
353 353 courseId: this.getReport.courseId,
354   - enrollStudentsId: selected.enrollId
  354 + enrollStudentsId: selected.enrollId,
355 355 };
356 356 http()
357 357 .put("/deleteStudents", payloadDeleteStudents)
358   - .then(response => {
  358 + .then((response) => {
359 359 this.snackbar = true;
360 360 this.text = response.data.message;
361 361 this.getParticularCourse();
362 362 })
363   - .catch(error => {
  363 + .catch((error) => {
364 364 this.snackbar = true;
365 365 this.text = error.response.data.message;
366 366 });
... ... @@ -369,13 +369,13 @@ export default {
369 369 getParticularCourse() {
370 370 this.selected = [];
371 371 var payload = {
372   - courseId: this.getReport.courseId
  372 + courseId: this.getReport.courseId,
373 373 };
374 374 http()
375 375 .get("/getParticularCourse", {
376   - params: payload
  376 + params: payload,
377 377 })
378   - .then(response => {
  378 + .then((response) => {
379 379 for (let i = 0; i < response.data.data.enrollStudents.length; i++) {
380 380 var studentId = {};
381 381 studentId = response.data.data.enrollStudents[i];
... ... @@ -391,7 +391,7 @@ export default {
391 391 this.snackbar = true;
392 392 this.text = response.data.message;
393 393 })
394   - .catch(error => {
  394 + .catch((error) => {
395 395 this.snackbar = true;
396 396 this.text = error.response.data.message;
397 397 });
... ... @@ -412,13 +412,13 @@ export default {
412 412 this.showSearch = false;
413 413 this.show = true;
414 414 this.search = "";
415   - }
  415 + },
416 416 },
417 417 mounted() {
418 418 // this.getStudentList();
419 419 this.token = this.$store.state.token;
420 420 this.role = this.$store.state.role;
421 421 this.getAllClass();
422   - }
  422 + },
423 423 };
424 424 </script>
425 425 \ No newline at end of file
... ...
src/pages/Library/member.vue
... ... @@ -13,7 +13,7 @@
13 13  
14 14 <v-dialog v-model="dialogStudents" max-width="1100px" scrollable>
15 15 <v-card>
16   - <v-toolbar color="grey lighten-2" flat>
  16 + <v-toolbar dark class="card-styles" flat>
17 17 <v-spacer></v-spacer>
18 18 <v-toolbar-title>Student Profile</v-toolbar-title>
19 19 <v-spacer></v-spacer>
... ... @@ -336,7 +336,7 @@
336 336  
337 337 <v-dialog v-model="editStudentdialog" max-width="600px" scrollable>
338 338 <v-card flat>
339   - <v-toolbar color="grey lighten-2" flat>
  339 + <v-toolbar dark class="card-styles" flat>
340 340 <v-spacer></v-spacer>
341 341 <v-toolbar-title>
342 342 <h3>Edit Student Profile</h3>
... ... @@ -416,7 +416,7 @@
416 416 <!-- Add Student Library Member Dialog -->
417 417  
418 418 <v-dialog v-model="addLibrary" max-width="600px">
419   - <v-toolbar color="grey lighten-2">
  419 + <v-toolbar dark class="card-styles" flat>
420 420 <v-spacer></v-spacer>
421 421 <v-toolbar-title>
422 422 <h3>Library Member</h3>
... ... @@ -469,7 +469,7 @@
469 469 <v-card flat>
470 470 <!-- <h4
471 471 class="text-xs-center pt-4 ml-2 hidden-lg-only hidden-xl-only hidden-md-only"
472   - >Library Member</h4> -->
  472 + >Library Member</h4>-->
473 473 <v-card-actions>
474 474 <!-- <h3 class="right mt-2 ml-2 hidden-sm-only hidden-xs-only">Library Member</h3> -->
475 475 <v-spacer></v-spacer>
... ... @@ -588,13 +588,13 @@ export default {
588 588 dialogStudents: false,
589 589 editStudentdialog: false,
590 590 valid: true,
591   - libraryIdRules: [v => !!v || "Library Id Fee is required"],
592   - libraryFeeRules: [v => !!v || "Library Fee is required"],
  591 + libraryIdRules: [(v) => !!v || "Library Id Fee is required"],
  592 + libraryFeeRules: [(v) => !!v || "Library Fee is required"],
593 593 date: null,
594 594 search: "",
595 595 addclass: [],
596 596 pagination: {
597   - rowsPerPage: 15
  597 + rowsPerPage: 15,
598 598 },
599 599 addBook: {},
600 600 imageName: "",
... ... @@ -605,25 +605,25 @@ export default {
605 605 text: "No",
606 606 align: "center",
607 607 sortable: false,
608   - value: "index"
  608 + value: "index",
609 609 },
610 610 {
611 611 text: "Photo",
612 612 value: "uploadCover",
613 613 sortable: false,
614   - align: "center"
  614 + align: "center",
615 615 },
616 616 { text: "Name", value: "name", sortable: false, align: "center" },
617 617 { text: "Roll No.", value: "rollNo", sortable: false, align: "center" },
618 618 { text: "Email", value: "email", sortable: false, align: "center" },
619   - { text: "Action", value: "", sortable: false, align: "center" }
  619 + { text: "Action", value: "", sortable: false, align: "center" },
620 620 ],
621 621 studentData: [],
622 622 editedItem: {},
623 623 parentId: "",
624 624 token: "",
625 625 selectStudents: {},
626   - editedIndex: -1
  626 + editedIndex: -1,
627 627 }),
628 628 methods: {
629 629 getAllStudents() {
... ... @@ -632,15 +632,15 @@ export default {
632 632 .get("/getStudentsList", {
633 633 params: {
634 634 classId: this.selectStudents,
635   - schoolId: this.$store.state.schoolId
  635 + schoolId: this.$store.state.schoolId,
636 636 },
637   - headers: { Authorization: "Bearer " + this.token }
  637 + headers: { Authorization: "Bearer " + this.token },
638 638 })
639   - .then(response => {
  639 + .then((response) => {
640 640 this.studentData = response.data.data;
641 641 this.showLoader = false;
642 642 })
643   - .catch(error => {
  643 + .catch((error) => {
644 644 // console.log("err====>", err);
645 645 if (error.response.status === 401) {
646 646 this.$router.replace({ path: "/" });
... ... @@ -659,7 +659,7 @@ export default {
659 659 this.editedItem = Object.assign({}, item);
660 660 this.editStudentdialog = true;
661 661 },
662   - dates: function(date) {
  662 + dates: function (date) {
663 663 return moment(date).format("MMMM DD, YYYY");
664 664 },
665 665 profile(item) {
... ... @@ -671,7 +671,7 @@ export default {
671 671 deleteItem(item) {
672 672 let deleteStudentLibraryData = {
673 673 studentId: item._id,
674   - libraryId: item.libraryId
  674 + libraryId: item.libraryId,
675 675 };
676 676 http()
677 677 .put(
... ... @@ -679,12 +679,12 @@ export default {
679 679 confirm("Are you sure you want to delete this?") &&
680 680 deleteStudentLibraryData
681 681 )
682   - .then(response => {
  682 + .then((response) => {
683 683 this.snackbar = true;
684 684 this.text = "Delete Successfully";
685 685 this.getAllStudents();
686 686 })
687   - .catch(error => {
  687 + .catch((error) => {
688 688 // console.log(error);
689 689 });
690 690 },
... ... @@ -703,7 +703,7 @@ export default {
703 703 this.addBook.schoolId = this.$store.state.schoolId;
704 704 http()
705 705 .put("/addLibrary", this.addBook)
706   - .then(response => {
  706 + .then((response) => {
707 707 this.snackbar = true;
708 708 this.text = "New Library Member added successfully";
709 709 this.getAllStudents();
... ... @@ -711,7 +711,7 @@ export default {
711 711 this.addLibrary = false;
712 712 this.loading = false;
713 713 })
714   - .catch(error => {
  714 + .catch((error) => {
715 715 // console.log(error);
716 716 this.snackbar = true;
717 717 this.text = error.response.data.message;
... ... @@ -726,13 +726,13 @@ export default {
726 726 this.editedItem.studentId = this.editedItem._id;
727 727 http()
728 728 .put("/updateLibrary", this.editedItem)
729   - .then(response => {
  729 + .then((response) => {
730 730 this.snackbar = true;
731 731 this.text = "Edit Library Member Successfully";
732 732 this.getAllStudents();
733 733 this.closeEditStudentDialog();
734 734 })
735   - .catch(error => {
  735 + .catch((error) => {
736 736 this.snackbar = true;
737 737 this.text = error.response.data.statusText;
738 738 });
... ... @@ -741,18 +741,18 @@ export default {
741 741 http()
742 742 .get("/getClassesList", {
743 743 params: {
744   - schoolId: this.$store.state.schoolId
  744 + schoolId: this.$store.state.schoolId,
745 745 },
746   - headers: { Authorization: "Bearer " + this.token }
  746 + headers: { Authorization: "Bearer " + this.token },
747 747 })
748   - .then(response => {
  748 + .then((response) => {
749 749 this.addclass = response.data.data;
750 750 })
751   - .catch(err => {
  751 + .catch((err) => {
752 752 // console.log("err====>", err);
753 753 this.$router.replace({ path: "/" });
754 754 });
755   - }
  755 + },
756 756 },
757 757 mounted() {
758 758 // this.getStudentList();
... ... @@ -760,14 +760,14 @@ export default {
760 760 this.getAllClass();
761 761 },
762 762 created() {
763   - this.$root.$on("app:search", search => {
  763 + this.$root.$on("app:search", (search) => {
764 764 this.search = search;
765 765 });
766 766 },
767 767 beforeDestroy() {
768 768 // dont forget to remove the listener
769 769 this.$root.$off("app:search");
770   - }
  770 + },
771 771 };
772 772 </script>
773 773 <style scoped>
... ...
src/pages/Meet/meet.vue
... ... @@ -34,7 +34,7 @@
34 34 round
35 35 dark
36 36 :loading="loading"
37   - class="add-button mt-3"
  37 + class="open-dialog-button"
38 38 >Find</v-btn>
39 39 </v-flex>
40 40 </v-layout>
... ... @@ -52,14 +52,14 @@ export default {
52 52 return {
53 53 token: "",
54 54 selectStudents: {},
55   - classRules: [v => !!v || " Class Name is required"],
56   - sectionRules: [v => !!v || " Section Name is required"],
  55 + classRules: [(v) => !!v || " Class Name is required"],
  56 + sectionRules: [(v) => !!v || " Section Name is required"],
57 57 addclass: [],
58 58 addSection: [],
59 59 loading: false,
60 60 room: "",
61 61 username: "",
62   - roomPassword: ""
  62 + roomPassword: "",
63 63 };
64 64 },
65 65 methods: {
... ... @@ -100,14 +100,14 @@ export default {
100 100 "feedback",
101 101 "stats",
102 102 "shortcuts",
103   - "tileview"
104   - ]
  103 + "tileview",
  104 + ],
105 105 },
106 106 configOverwrite: {
107   - disableSimulcast: false
  107 + disableSimulcast: false,
108 108 },
109 109 teacherName: "",
110   - romm: ""
  110 + romm: "",
111 111 };
112 112  
113 113 this.api = new JitsiMeetExternalAPI(domain, options);
... ... @@ -136,12 +136,12 @@ export default {
136 136 getClassData() {
137 137 http()
138 138 .get("/getClassesList", {
139   - headers: { Authorization: "Bearer " + this.token }
  139 + headers: { Authorization: "Bearer " + this.token },
140 140 })
141   - .then(response => {
  141 + .then((response) => {
142 142 this.addclass = response.data.data;
143 143 })
144   - .catch(error => {
  144 + .catch((error) => {
145 145 this.showLoader = false;
146 146 if (error.response.status === 401) {
147 147 this.$router.replace({ path: "/" });
... ... @@ -154,11 +154,11 @@ export default {
154 154 createRoom(classId) {
155 155 this.showLoader = true;
156 156 var classId = {
157   - classId: classId
  157 + classId: classId,
158 158 };
159 159 http()
160 160 .post("/createRoom", classId)
161   - .then(response => {
  161 + .then((response) => {
162 162 // this.addSection = response.data.data;
163 163 console.log("CREATE___ROOOM", response.data);
164 164 this.room = response.data.data.roomName;
... ... @@ -180,17 +180,17 @@ export default {
180 180 }
181 181 this.showLoader = false;
182 182 })
183   - .catch(err => {
  183 + .catch((err) => {
184 184 this.showLoader = false;
185 185 });
186   - }
  186 + },
187 187 },
188 188  
189 189 mounted() {
190 190 this.token = this.$store.state.token;
191 191 this.getClassData();
192 192 // this.openRoom();
193   - }
  193 + },
194 194 };
195 195 </script>
196 196  
... ...
src/pages/Students/students.vue
... ... @@ -869,7 +869,7 @@
869 869 round
870 870 dark
871 871 :loading="loading"
872   - class="add-button hidden-xs-only hidden-sm-only"
  872 + class="open-dialog-button hidden-xs-only hidden-sm-only"
873 873 >Find</v-btn>
874 874 <v-card-title class="body-1" v-show="show">
875 875 <v-btn icon large flat @click="displaySearch">
... ... @@ -961,6 +961,7 @@
961 961 <td class="text-xs-center td td-row">
962 962 <v-switch
963 963 class="pl-3"
  964 + :disabled="role === 'TEACHER'"
964 965 v-model="props.item.status"
965 966 @change="suspendStudentStatus(props.item.status,props.item._id)"
966 967 ></v-switch>
... ... @@ -1927,7 +1928,7 @@ export default {
1927 1928 addSection: [],
1928 1929 gender: ["Male", "Female"],
1929 1930 pagination: {
1930   - rowsPerPage: 10
  1931 + rowsPerPage: 10,
1931 1932 },
1932 1933 imageData: {},
1933 1934 imageName: "",
... ... @@ -1935,28 +1936,28 @@ export default {
1935 1936 imageFile: "",
1936 1937 editImageName: "",
1937 1938 editImageUrl: "",
1938   - nameRules: [v => !!v || " Full Name is required"],
1939   - dateRules: [v => !!v || " DOB is required"],
1940   - cityRules: [v => !!v || " City Name is required"],
1941   - pincode: [v => !!v || " Pincode is required"],
1942   - country: [v => !!v || " Country Name is required"],
1943   - rollNo: [v => !!v || "Roll No is required"],
1944   - permanentAddress: [v => !!v || " Permanent Address is required"],
1945   - presentAddress: [v => !!v || " Present Address is required"],
1946   - stateRules: [v => !!v || "State Name is required"],
1947   - classRules: [v => !!v || " Class Name is required"],
1948   - sectionRules: [v => !!v || " Section Name is required"],
1949   - genderRules: [v => !!v || " Select Gender is required"],
  1939 + nameRules: [(v) => !!v || " Full Name is required"],
  1940 + dateRules: [(v) => !!v || " DOB is required"],
  1941 + cityRules: [(v) => !!v || " City Name is required"],
  1942 + pincode: [(v) => !!v || " Pincode is required"],
  1943 + country: [(v) => !!v || " Country Name is required"],
  1944 + rollNo: [(v) => !!v || "Roll No is required"],
  1945 + permanentAddress: [(v) => !!v || " Permanent Address is required"],
  1946 + presentAddress: [(v) => !!v || " Present Address is required"],
  1947 + stateRules: [(v) => !!v || "State Name is required"],
  1948 + classRules: [(v) => !!v || " Class Name is required"],
  1949 + sectionRules: [(v) => !!v || " Section Name is required"],
  1950 + genderRules: [(v) => !!v || " Select Gender is required"],
1950 1951 fatheCellNoRules: [
1951   - v => !!v || " father Cell Number is required",
1952   - v => v <= 10000000000 || "Max 10 characters is required"
  1952 + (v) => !!v || " father Cell Number is required",
  1953 + (v) => v <= 10000000000 || "Max 10 characters is required",
1953 1954 ],
1954 1955 password: [
1955   - v => !!v || "Password field is Required."
  1956 + (v) => !!v || "Password field is Required.",
1956 1957 // v => (/^(?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})/).test(v) && v.length >= 8
1957 1958 ],
1958   - mobileNoRule: [v => !!v || " Mobile Number is required"],
1959   - establishmentYearRules: [v => !!v || " Academic Year is required"],
  1959 + mobileNoRule: [(v) => !!v || " Mobile Number is required"],
  1960 + establishmentYearRules: [(v) => !!v || " Academic Year is required"],
1960 1961 errorMessages: "",
1961 1962 countries: [],
1962 1963 headers: [
... ... @@ -1964,13 +1965,13 @@ export default {
1964 1965 text: "Roll No.",
1965 1966 align: "center",
1966 1967 sortable: false,
1967   - value: "rollNo"
  1968 + value: "rollNo",
1968 1969 },
1969 1970 {
1970 1971 text: "Profile Pic",
1971 1972 value: "profilePicUrl",
1972 1973 sortable: false,
1973   - align: "center"
  1974 + align: "center",
1974 1975 },
1975 1976 { text: "Name", value: "name", sortable: false, align: "center" },
1976 1977 { text: "Gender", value: "gender", sortable: false, align: "center" },
... ... @@ -1978,28 +1979,28 @@ export default {
1978 1979 text: "Father Name",
1979 1980 value: "fatherName",
1980 1981 sortable: false,
1981   - align: "center"
  1982 + align: "center",
1982 1983 },
1983 1984 {
1984 1985 text: "Mother Name",
1985 1986 value: "motherName",
1986 1987 sortable: false,
1987   - align: "center"
  1988 + align: "center",
1988 1989 },
1989 1990 {
1990 1991 text: "Academic Year",
1991 1992 value: "establishmentYear",
1992 1993 sortable: false,
1993   - align: "center"
  1994 + align: "center",
1994 1995 },
1995 1996 // { text: "Mobile No", value: "mobile", sortable: false, align: "center" },
1996 1997 {
1997 1998 text: "Status",
1998 1999 value: "status",
1999 2000 sortable: false,
2000   - align: "center"
  2001 + align: "center",
2001 2002 },
2002   - { text: "Action", value: "", sortable: false, align: "center" }
  2003 + { text: "Action", value: "", sortable: false, align: "center" },
2003 2004 ],
2004 2005 studentsData: [],
2005 2006 parentId: "",
... ... @@ -2026,11 +2027,11 @@ export default {
2026 2027 height: "",
2027 2028 weight: "",
2028 2029 rollNo: "",
2029   - establishmentYear: new Date().getFullYear()
  2030 + establishmentYear: new Date().getFullYear(),
2030 2031 },
2031 2032 selectStudents: {
2032 2033 select: "",
2033   - selectSection: ""
  2034 + selectSection: "",
2034 2035 },
2035 2036 editedItem: {
2036 2037 role: "STUDENT",
... ... @@ -2053,9 +2054,9 @@ export default {
2053 2054 height: "",
2054 2055 weight: "",
2055 2056 rollNo: "",
2056   - establishmentYear: new Date().getFullYear()
  2057 + establishmentYear: new Date().getFullYear(),
2057 2058 },
2058   - isFatherCellExists: false
  2059 + isFatherCellExists: false,
2059 2060 }),
2060 2061 watch: {
2061 2062 menu(val) {
... ... @@ -2063,7 +2064,7 @@ export default {
2063 2064 },
2064 2065 menu1(val) {
2065 2066 val && this.$nextTick(() => (this.$refs.picker.activePicker = "YEAR"));
2066   - }
  2067 + },
2067 2068 },
2068 2069 methods: {
2069 2070 findStudents() {
... ... @@ -2072,14 +2073,14 @@ export default {
2072 2073 .get("/getStudentWithClass", {
2073 2074 params: {
2074 2075 classId: this.selectStudents.select,
2075   - sectionId: this.selectStudents.selectSection
2076   - }
  2076 + sectionId: this.selectStudents.selectSection,
  2077 + },
2077 2078 })
2078   - .then(response => {
  2079 + .then((response) => {
2079 2080 this.studentsData = response.data.data;
2080 2081 this.showLoader = false;
2081 2082 })
2082   - .catch(err => {
  2083 + .catch((err) => {
2083 2084 console.log("err====>", err);
2084 2085 this.showLoader = false;
2085 2086 });
... ... @@ -2092,14 +2093,14 @@ export default {
2092 2093 "/getSectionsList",
2093 2094 { params: { classId: _id } },
2094 2095 {
2095   - headers: { Authorization: "Bearer " + token }
  2096 + headers: { Authorization: "Bearer " + token },
2096 2097 }
2097 2098 )
2098   - .then(response => {
  2099 + .then((response) => {
2099 2100 this.addSection = response.data.data;
2100 2101 this.showLoader = false;
2101 2102 })
2102   - .catch(err => {
  2103 + .catch((err) => {
2103 2104 this.showLoader = false;
2104 2105 });
2105 2106 },
... ... @@ -2111,14 +2112,14 @@ export default {
2111 2112 "/getSectionsList",
2112 2113 { params: { classId: _id } },
2113 2114 {
2114   - headers: { Authorization: "Bearer " + token }
  2115 + headers: { Authorization: "Bearer " + token },
2115 2116 }
2116 2117 )
2117   - .then(response => {
  2118 + .then((response) => {
2118 2119 this.addSection = response.data.data;
2119 2120 this.showLoader = false;
2120 2121 })
2121   - .catch(err => {
  2122 + .catch((err) => {
2122 2123 this.showLoader = false;
2123 2124 });
2124 2125 },
... ... @@ -2128,7 +2129,7 @@ export default {
2128 2129 pickEditFile() {
2129 2130 this.$refs.editDataImage.click();
2130 2131 },
2131   - dates: function(date) {
  2132 + dates: function (date) {
2132 2133 return moment(date).format("MMMM DD, YYYY");
2133 2134 return date;
2134 2135 },
... ... @@ -2200,22 +2201,22 @@ export default {
2200 2201 },
2201 2202 deleteItem(item) {
2202 2203 let deleteStudent = {
2203   - studentId: item._id
  2204 + studentId: item._id,
2204 2205 };
2205 2206 http()
2206 2207 .delete(
2207 2208 "/deleteStudent",
2208 2209 confirm("Are you sure you want to delete this?") && {
2209   - params: deleteStudent
  2210 + params: deleteStudent,
2210 2211 }
2211 2212 )
2212   - .then(response => {
  2213 + .then((response) => {
2213 2214 this.snackbar = true;
2214 2215 this.text = response.data.message;
2215 2216 this.color = "green";
2216 2217 this.findStudents();
2217 2218 })
2218   - .catch(error => {
  2219 + .catch((error) => {
2219 2220 this.snackbar = true;
2220 2221 this.text = error.response.data.message;
2221 2222 this.color = "error";
... ... @@ -2253,7 +2254,7 @@ export default {
2253 2254 medicalNotes: this.addStudents.medicalNotes,
2254 2255 height: this.addStudents.height,
2255 2256 weight: this.addStudents.weight,
2256   - rollNo: this.addStudents.rollNo
  2257 + rollNo: this.addStudents.rollNo,
2257 2258 };
2258 2259 if (this.imageUrl) {
2259 2260 var str = this.imageUrl;
... ... @@ -2263,7 +2264,7 @@ export default {
2263 2264 this.loading = true;
2264 2265 http()
2265 2266 .post("/createStudent", addStudent)
2266   - .then(response => {
  2267 + .then((response) => {
2267 2268 this.snackbar = true;
2268 2269 this.text = "New Student added successfully";
2269 2270 this.color = "green";
... ... @@ -2272,7 +2273,7 @@ export default {
2272 2273 this.clearParents();
2273 2274 this.loading = false;
2274 2275 })
2275   - .catch(error => {
  2276 + .catch((error) => {
2276 2277 this.snackbar = true;
2277 2278 this.text = error.response.data.message;
2278 2279 this.color = "error";
... ... @@ -2309,7 +2310,7 @@ export default {
2309 2310 medicalNotes: this.editedItem.medicalNotes,
2310 2311 height: this.editedItem.height,
2311 2312 weight: this.editedItem.weight,
2312   - rollNo: this.editedItem.rollNo
  2313 + rollNo: this.editedItem.rollNo,
2313 2314 };
2314 2315 if (this.editImageUrl) {
2315 2316 var str = this.editImageUrl;
... ... @@ -2319,7 +2320,7 @@ export default {
2319 2320 this.editLoading = true;
2320 2321 http()
2321 2322 .put("/updateStudent", editStudent)
2322   - .then(response => {
  2323 + .then((response) => {
2323 2324 this.snackbar = true;
2324 2325 this.text = response.data.message;
2325 2326 this.color = "green";
... ... @@ -2328,7 +2329,7 @@ export default {
2328 2329 this.close();
2329 2330 this.editLoading = false;
2330 2331 })
2331   - .catch(error => {
  2332 + .catch((error) => {
2332 2333 this.snackbar = true;
2333 2334 this.text = error.response.data.statusText;
2334 2335 this.color = "error";
... ... @@ -2348,12 +2349,12 @@ export default {
2348 2349 fatherProfession: this.parentData.fatherProfession,
2349 2350 motherProfession: this.parentData.motherProfession,
2350 2351 password: this.parentData.password,
2351   - role: "PARENT"
  2352 + role: "PARENT",
2352 2353 };
2353 2354 this.loading = true;
2354 2355 http()
2355 2356 .post("/createParent", addparentDetails)
2356   - .then(response => {
  2357 + .then((response) => {
2357 2358 this.parentId = response.data.data.id;
2358 2359 this.e2 = 2;
2359 2360 this.snackbar = true;
... ... @@ -2363,7 +2364,7 @@ export default {
2363 2364 this.clear();
2364 2365 this.loading = false;
2365 2366 })
2366   - .catch(error => {
  2367 + .catch((error) => {
2367 2368 this.snackbar = true;
2368 2369 this.text = error.response.data.message;
2369 2370 this.color = "error";
... ... @@ -2382,10 +2383,10 @@ export default {
2382 2383 .get("getParticularParent", {
2383 2384 params: { fatherCellNo: this.parentData.fatherCellNo },
2384 2385 headers: {
2385   - Authorization: "Bearer " + this.$store.state.token
2386   - }
  2386 + Authorization: "Bearer " + this.$store.state.token,
  2387 + },
2387 2388 })
2388   - .then(response => {
  2389 + .then((response) => {
2389 2390 this.showNext = true;
2390 2391 this.showParent = false;
2391 2392 this.parentData = response.data.data;
... ... @@ -2393,7 +2394,7 @@ export default {
2393 2394 this.showLoader = false;
2394 2395 this.isFatherCellExists = true;
2395 2396 })
2396   - .catch(error => {
  2397 + .catch((error) => {
2397 2398 console.log("err====>", error.response.data.message);
2398 2399 this.text = error.response.data.message;
2399 2400 this.snackbar = true;
... ... @@ -2415,17 +2416,17 @@ export default {
2415 2416 suspendStudentStatus(status, id) {
2416 2417 let suspendStudentData = {
2417 2418 studentId: id,
2418   - status: status
  2419 + status: status,
2419 2420 };
2420 2421 http()
2421 2422 .put("/suspendStudentAccount", suspendStudentData)
2422   - .then(response => {
  2423 + .then((response) => {
2423 2424 this.findStudents();
2424 2425 this.text = response.data.message;
2425 2426 this.color = "green";
2426 2427 this.snackbar = true;
2427 2428 })
2428   - .catch(error => {
  2429 + .catch((error) => {
2429 2430 this.snackbar = true;
2430 2431 this.color = "error";
2431 2432 this.text = error.response.data.message;
... ... @@ -2438,7 +2439,7 @@ export default {
2438 2439 this.showSearch = false;
2439 2440 this.show = true;
2440 2441 this.search = "";
2441   - }
  2442 + },
2442 2443 },
2443 2444 mounted() {
2444 2445 const getCountryList = countryList();
... ... @@ -2447,12 +2448,12 @@ export default {
2447 2448 var token = this.$store.state.token;
2448 2449 http()
2449 2450 .get("/getClassesList", {
2450   - headers: { Authorization: "Bearer " + token }
  2451 + headers: { Authorization: "Bearer " + token },
2451 2452 })
2452   - .then(response => {
  2453 + .then((response) => {
2453 2454 this.addclass = response.data.data;
2454 2455 })
2455   - .catch(error => {
  2456 + .catch((error) => {
2456 2457 this.showLoader = false;
2457 2458 if (error.response.status === 401) {
2458 2459 this.$router.replace({ path: "/" });
... ... @@ -2461,7 +2462,7 @@ export default {
2461 2462 this.$store.dispatch("Role", null);
2462 2463 }
2463 2464 });
2464   - }
  2465 + },
2465 2466 };
2466 2467 </script>
2467 2468 <style scoped>
... ...