Commit b039d39fb840c9c5ef7bb7bcf248f64ff4d51ccc

Authored by Shikha Mishra
1 parent d9cb34e695

Hide Edit functionality in subject screen, Improve add and show functionality i…

…n syllabus screen, Hide Delete functionality in class screen, Improve add and show functionality in exam Attendence screen, Improve get exam schedule functionality in exam schedule screen, Fix issue while viewing marks in view mark screen, Hide Delete functionality in sectioin screen, Improve updateMeetingEvent api in meeting event screen, Improve add and show functionality in assignment screen
src/pages/Academic/assignment.vue
... ... @@ -10,7 +10,7 @@
10 10 </v-flex>
11 11 </v-layout>
12 12 <v-container fluid>
13   - <ref="formEditAssignment" v-model="validEditAssignment" lazy-validation>
  13 + <v-form ref="formEditAssignment" v-model="validEditAssignment" lazy-validation>
14 14 <v-layout>
15 15 <v-flex xs4 class="pt-4 subheading">
16 16 <label class="right">Title:</label>
... ... @@ -36,7 +36,7 @@
36 36 <v-flex xs4 class="pt-4 subheading">
37 37 <label class="right">Deadline:</label>
38 38 </v-flex>
39   - <v-flex xs8 class="pt-4 subheading">
  39 + <v-flex xs8 class="ml-3">
40 40 <v-menu
41 41 ref="menu1"
42 42 :close-on-content-click="false"
... ... @@ -72,7 +72,7 @@
72 72 item-value="_id"
73 73 :rules="classRules"
74 74 v-model="editedItem.classId"
75   - @change="getSections(addAssignment.classId)"
  75 + @change="getSections(editedItem.classId)"
76 76 required
77 77 ></v-select>
78 78 </v-flex>
... ... @@ -88,7 +88,7 @@
88 88 item-value="_id"
89 89 v-model="editedItem.sectionId"
90 90 :rules="sectionRules"
91   - @change="getClassSubject(addAssignment.classId)"
  91 + @change="getClassSubject(editedItem.classId)"
92 92 required
93 93 ></v-select>
94 94 </v-flex>
... ... @@ -204,7 +204,7 @@
204 204 <v-select
205 205 :items="classList"
206 206 placeholder="Select Your Class"
207   - v-model="addAssignment.classId"
  207 + v-model="showAssignment.classId"
208 208 item-text="classNum"
209 209 item-value="_id"
210 210 name="Select Class"
... ... @@ -593,6 +593,7 @@ export default {
593 593 fileType: ""
594 594 },
595 595 addAssignment: {},
  596 + showAssignment: {},
596 597  
597 598 imageData: {},
598 599 imageName: "",
... ... @@ -720,7 +721,7 @@ export default {
720 721 .get(
721 722 "/getAssignmentList",
722 723 {
723   - params: { classId: this.addAssignment.classId }
  724 + params: { classId: this.showAssignment.classId }
724 725 },
725 726 {
726 727 headers: { Authorization: "Bearer " + this.token }
... ...
src/pages/Academic/subject.vue
... ... @@ -306,9 +306,9 @@
306 306 <td class="text-xs-center td td-row">{{ props.item.finalMarks }}</td>
307 307 <td class="text-xs-center td td-row">{{ props.item.type }}</td>
308 308  
309   - <td class="text-xs-center td td-row">
  309 + <!-- <td class="text-xs-center td td-row">
310 310 <span>
311   - <!-- <v-tooltip top>
  311 + <v-tooltip top>
312 312 <img
313 313 slot="activator"
314 314 style="cursor:pointer; width:25px; height:25px; "
... ... @@ -317,7 +317,7 @@
317 317 src="/static/icon/view.png"
318 318 />
319 319 <span>View</span>
320   - </v-tooltip>-->
  320 + </v-tooltip>
321 321 <v-tooltip top>
322 322 <img
323 323 slot="activator"
... ... @@ -339,7 +339,7 @@
339 339 <span>Delete</span>
340 340 </v-tooltip>
341 341 </span>
342   - </td>
  342 + </td> -->
343 343 </tr>
344 344 </template>
345 345 <v-alert
... ... @@ -604,7 +604,7 @@ export default {
604 604 sortable: false,
605 605 align: "center"
606 606 },
607   - { text: "Action", value: "", sortable: false, align: "center" }
  607 + // { text: "Action", value: "", sortable: false, align: "center" }
608 608 ],
609 609 subjectList: [],
610 610 classList: [],
... ...
src/pages/Academic/syllabus.vue
... ... @@ -145,7 +145,7 @@
145 145 <v-select
146 146 :items="classList"
147 147 label="Select Class"
148   - v-model="addSyllabus.classId"
  148 + v-model="showSyllabus.classId"
149 149 item-text="classNum"
150 150 item-value="_id"
151 151 name="Select Class"
... ... @@ -449,6 +449,7 @@ export default {
449 449 addSection: [],
450 450 editedIndex: -1,
451 451 addSyllabus: {},
  452 + showSyllabus: {},
452 453  
453 454 editedItem: {
454 455 subjectName: ""
... ... @@ -651,7 +652,7 @@ export default {
651 652 http()
652 653 .get(
653 654 "/getSyallabusList",
654   - { params: { classId: this.addSyllabus.classId } },
  655 + { params: { classId: this.showSyllabus.classId } },
655 656 {
656 657 headers: { Authorization: "Bearer " + this.token }
657 658 }
... ...
src/pages/Class/addclass.vue
... ... @@ -119,7 +119,7 @@
119 119 />
120 120 <span>Edit</span>
121 121 </v-tooltip>
122   - <v-tooltip top>
  122 + <!-- <v-tooltip top>
123 123 <img
124 124 slot="activator"
125 125 style="cursor:pointer; width:20px; height:20px; "
... ... @@ -127,7 +127,7 @@
127 127 src="/static/icon/delete.png"
128 128 />
129 129 <span>Delete</span>
130   - </v-tooltip>
  130 + </v-tooltip> -->
131 131 </span>
132 132 </td>
133 133 </tr>
... ...
src/pages/Exam/examAttendence.vue
... ... @@ -22,7 +22,7 @@
22 22 <v-spacer></v-spacer>
23 23 <v-flex xs8 sm3 md2 class="mr-3">
24 24 <v-select
25   - v-model="addAttendence.examId"
  25 + v-model="getAttendence.examId"
26 26 label="Select Exam"
27 27 :rules="examRules"
28 28 :items="examList"
... ... @@ -33,31 +33,31 @@
33 33 </v-flex>
34 34 <v-flex xs8 sm3 md2 class="mr-3">
35 35 <v-select
36   - v-model="addAttendence.classId"
  36 + v-model="getAttendence.classId"
37 37 label="Select your class"
38 38 type="text"
39 39 :items="classList"
40 40 item-text="classNum"
41 41 item-value="_id"
42   - @change="getSections(addAttendence.classId)"
  42 + @change="getSections(getAttendence.classId)"
43 43 required
44 44 ></v-select>
45 45 </v-flex>
46 46 <v-flex xs8 sm3 md2 class="mr-3">
47 47 <v-select
48   - v-model="addAttendence.sectionId"
  48 + v-model="getAttendence.sectionId"
49 49 label="Select your section"
50 50 type="text"
51 51 :items="addSection"
52 52 item-text="name"
53 53 item-value="_id"
54   - @change="getClassSubject(addAttendence.classId)"
  54 + @change="getClassSubject(getAttendence.classId)"
55 55 required
56 56 ></v-select>
57 57 </v-flex>
58 58 <v-flex xs8 sm3 md2 class="mr-3">
59 59 <v-select
60   - v-model="addAttendence.subjectId"
  60 + v-model="getAttendence.subjectId"
61 61 label="Select Subject"
62 62 :rules="subjectRules"
63 63 :items="subjectList.subjects"
... ... @@ -378,6 +378,7 @@ export default {
378 378 subjectList: [],
379 379 subjects: [],
380 380 addAttendence: {},
  381 + getAttendence: {},
381 382 editedItem: {
382 383 sectionId: {
383 384 name: ""
... ... @@ -562,10 +563,10 @@ export default {
562 563 http()
563 564 .get("/getExamAttendenceList", {
564 565 params: {
565   - examId: this.addAttendence.examId,
566   - classId: this.addAttendence.classId,
567   - sectionId: this.addAttendence.sectionId,
568   - subjectId: this.addAttendence.subjectId
  566 + examId: this.getAttendence.examId,
  567 + classId: this.getAttendence.classId,
  568 + sectionId: this.getAttendence.sectionId,
  569 + subjectId: this.getAttendence.subjectId
569 570 }
570 571 })
571 572 .then(response => {
... ...
src/pages/Exam/examSchedule.vue
... ... @@ -323,7 +323,19 @@
323 323 :items="classList"
324 324 item-text="classNum"
325 325 item-value="_id"
326   - @change="getSchedulesList()"
  326 + @change="getSections(getScheduleData.classId)"
  327 + required
  328 + ></v-select>
  329 + </v-flex>
  330 + <v-flex xs8 sm3 md2 class="mr-3">
  331 + <v-select
  332 + v-model="getScheduleData.sectionId"
  333 + label="Select your section"
  334 + type="text"
  335 + :items="addSection"
  336 + item-text="name"
  337 + item-value="_id"
  338 + @change="getSchedulesList(getScheduleData.classId,getScheduleData.sectionId)"
327 339 required
328 340 ></v-select>
329 341 </v-flex>
... ... @@ -752,7 +764,10 @@ export default {
752 764 this.showLoader = true;
753 765 http()
754 766 .get("/getSchedulesList", {
755   - params: { classId: this.getScheduleData.classId },
  767 + params: {
  768 + classId: this.getScheduleData.classId,
  769 + sectionId: this.getScheduleData.sectionId
  770 + },
756 771 headers: { Authorization: "Bearer " + this.token }
757 772 })
758 773 .then(response => {
... ... @@ -765,6 +780,7 @@ export default {
765 780 this.showLoader = false;
766 781 this.loadingSearch = false;
767 782 this.snackbar = true;
  783 + this.color = "error";
768 784 this.text = error.response.data.message;
769 785 if (error.response.status === 401) {
770 786 this.$router.replace({ path: "/" });
... ... @@ -779,7 +795,10 @@ export default {
779 795 this.editedItem = Object.assign({}, item);
780 796 this.editedItem.examId = this.editedItem.examId._id;
781 797 this.editedItem.classId = this.editedItem.classId._id;
782   - this.editedItem.sectionId = this.editedItem.sectionId._id;
  798 + this.editedItem.sectionId =
  799 + this.editedItem.sectionId === null
  800 + ? (this.editedItem.sectionId = this.editedItem.sectionId = "")
  801 + : this.editedItem.sectionId._id;
783 802 this.editedItem.date =
784 803 this.editedItem.date != undefined
785 804 ? (this.editedItem.date = this.editedItem.date.substring(0, 10))
... ... @@ -791,7 +810,10 @@ export default {
791 810 this.editedItem = Object.assign({}, item);
792 811 this.editedItem.examId = this.editedItem.examId.examName;
793 812 this.editedItem.classId = this.editedItem.classId.classNum;
794   - this.editedItem.sectionId = this.editedItem.sectionId.name;
  813 + this.editedItem.sectionId =
  814 + this.editedItem.sectionId === null
  815 + ? (this.editedItem.sectionId = this.editedItem.sectionId = "")
  816 + : this.editedItem.sectionId.name;
795 817 this.profileExamScheduleDialog = true;
796 818 },
797 819 deleteSchedule(item) {
... ... @@ -861,8 +883,9 @@ export default {
861 883 })
862 884 .catch(error => {
863 885 this.snackbar = true;
864   - this.text = error.response.data.message;
865   - this.color = "red";
  886 + this.text = error.response.data.messages;
  887 + this.color = "error";
  888 + this.loading = false;
866 889 });
867 890 },
868 891 getClass() {
... ...
src/pages/Mark/viewMark.vue
... ... @@ -19,7 +19,7 @@
19 19 ></v-select>
20 20 </v-flex>
21 21 </v-layout>
22   - <v-flex xs12 sm12>
  22 + <v-flex xs12 sm12 v-if="showData">
23 23 <!-- <v-layout wrap> -->
24 24 <!-- ****** TABLE DATA MARK ****** -->
25 25 <v-flex xs12 sm12 md12>
... ... @@ -268,7 +268,7 @@
268 268 </v-flex>
269 269 </v-flex>
270 270 <!-- print Me -->
271   - <v-flex xs12 sm12 id="printMe" v-show="hideViewMark">
  271 + <v-flex xs12 sm12 id="printMe" v-show="hideViewMark" v-if="showData">
272 272 <!-- <v-layout wrap> -->
273 273 <!-- ****** TABLE DATA MARK ****** -->
274 274 <v-flex xs12 sm12 md12>
... ... @@ -518,6 +518,14 @@
518 518 <div class="loader" v-if="showLoader">
519 519 <v-progress-circular indeterminate color="white"></v-progress-circular>
520 520 </div>
  521 + <v-snackbar
  522 + :timeout="timeout"
  523 + :top="y === 'top'"
  524 + :right="x === 'right'"
  525 + :vertical="mode === 'vertical'"
  526 + v-model="snackbar"
  527 + :color="color"
  528 + >{{ text }}</v-snackbar>
521 529 </v-app>
522 530 </template>
523 531  
... ... @@ -548,7 +556,17 @@ export default {
548 556 selectMarkList: "Mark",
549 557 selectMark: ["Mark", "Grade"],
550 558 MarkData: "",
551   - userData: {}
  559 + userData: {},
  560 + showData: false,
  561 +
  562 + //SNACKBAR
  563 + snackbar: false,
  564 + color: "",
  565 + y: "top",
  566 + x: "right",
  567 + mode: "",
  568 + timeout: 10000,
  569 + text: ""
552 570 }),
553 571 mounted() {
554 572 this.token = this.$store.state.token;
... ... @@ -565,6 +583,15 @@ export default {
565 583 })
566 584 .then(response => {
567 585 this.markData = response.data.data;
  586 + // console.log("====this.markData===", this.markData);
  587 + if (this.markData.length === 0) {
  588 + this.showLoader = false;
  589 + this.snackbar = true;
  590 + this.text = "Data not found!";
  591 + this.color = "error";
  592 + return;
  593 + }
  594 + this.showData = true;
568 595 let newData = response.data.data;
569 596 // console.log("newData", newData);
570 597 for (var i = 0; i < newData.length; i++) {
... ...
src/pages/Section/section.vue
... ... @@ -211,7 +211,7 @@
211 211 />
212 212 <span>Edit</span>
213 213 </v-tooltip>
214   - <v-tooltip top>
  214 + <!-- <v-tooltip top>
215 215 <img
216 216 slot="activator"
217 217 style="cursor:pointer; width:20px; height:20px; "
... ... @@ -220,7 +220,7 @@
220 220 class="mr-3"
221 221 />
222 222 <span>Delete</span>
223   - </v-tooltip>
  223 + </v-tooltip> -->
224 224 </span>
225 225 </td>
226 226 </tr>
... ...
src/pages/meetingEvent/meetingEvent.vue
... ... @@ -681,8 +681,12 @@ export default {
681 681 this.$refs.form.reset();
682 682 },
683 683 save() {
  684 + console.log('=======this.editedItem=====', this.editedItem);
  685 + if (this.editedItem.courseId) {
  686 + this.editedItem.courseId = this.editedItem.courseId._id;
  687 + }
684 688 delete this.editedItem.classId;
685   - this.editedItem.courseId = this.editedItem.courseId._id;
  689 +
686 690 this.editedItem.startTime = moment(this.editedItem.startTime, "hh:mm").format("LT");
687 691 http()
688 692 .put("/updateMeetingEvent", this.editedItem)
... ...