Commit 65d5475b667d37ef597e1f2d200a6acd86a776bf
1 parent
c34b2bc04c
Exists in
master
and in
3 other branches
changes in api and ui
Showing
2 changed files
with
32 additions
and
13 deletions
Show diff stats
src/pages/Dashboard/dashboard.vue
... | ... | @@ -138,7 +138,7 @@ |
138 | 138 | <v-list-tile-title class="mt-2"> |
139 | 139 | <p class="subheading font-color">Expences</p> |
140 | 140 | </v-list-tile-title> |
141 | - <v-list-tile-title>Rs 3000</v-list-tile-title> | |
141 | + <v-list-tile-title>Rs. {{ expenseData.sum }}</v-list-tile-title> | |
142 | 142 | </v-list-tile-content> |
143 | 143 | </v-list-tile> |
144 | 144 | </template> |
... | ... | @@ -338,6 +338,7 @@ export default { |
338 | 338 | teachers: "", |
339 | 339 | classes: "", |
340 | 340 | noticeData: [], |
341 | + expenseData: [], | |
341 | 342 | attrs: [ |
342 | 343 | { |
343 | 344 | key: "today", |
... | ... | @@ -447,6 +448,7 @@ export default { |
447 | 448 | this.getClasses(); |
448 | 449 | this.getNoticeData(); |
449 | 450 | this.getUserData(); |
451 | + this.getExpensesData(); | |
450 | 452 | // this.getUsersList(); |
451 | 453 | }, |
452 | 454 | methods: { |
... | ... | @@ -604,6 +606,21 @@ export default { |
604 | 606 | // this.$store.dispatch("Id", null); |
605 | 607 | // } |
606 | 608 | }); |
609 | + }, | |
610 | + getExpensesData() { | |
611 | + http() | |
612 | + .get("/getTotalExpenses", { | |
613 | + headers: { | |
614 | + Authorization: "Bearer " + this.token | |
615 | + } | |
616 | + }) | |
617 | + .then(response => { | |
618 | + this.expenseData = response.data.data; | |
619 | + this.showLoader = false; | |
620 | + }) | |
621 | + .catch(error => { | |
622 | + this.showLoader = false; | |
623 | + }) | |
607 | 624 | } |
608 | 625 | } |
609 | 626 | }; | ... | ... |
src/pages/Exam/examSchedule.vue
... | ... | @@ -20,12 +20,12 @@ |
20 | 20 | </v-flex> |
21 | 21 | <v-flex xs7 class="ml-3"> |
22 | 22 | <v-select |
23 | - :rules="examNameRules" | |
23 | + :rules="examRules" | |
24 | 24 | :items="examList" |
25 | - v-model="editedItem.examName" | |
25 | + v-model="editedItem.examId" | |
26 | 26 | label="Select your Exam Name" |
27 | 27 | item-text="examName" |
28 | - item-value="examName" | |
28 | + item-value="_id" | |
29 | 29 | ></v-select> |
30 | 30 | </v-flex> |
31 | 31 | </v-layout> |
... | ... | @@ -233,7 +233,7 @@ |
233 | 233 | </h5> |
234 | 234 | </v-flex> |
235 | 235 | <v-flex sm6 xs8> |
236 | - <h5 class="my-1">{{ editedItem.examName }}</h5> | |
236 | + <h5 class="my-1">{{ editedItem.examId}}</h5> | |
237 | 237 | </v-flex> |
238 | 238 | </v-layout> |
239 | 239 | <v-layout> |
... | ... | @@ -367,7 +367,7 @@ |
367 | 367 | <template slot="items" slot-scope="props"> |
368 | 368 | <tr class="tr"> |
369 | 369 | <td class="td td-row">{{ props.index + 1}}</td> |
370 | - <td class="td td-row text-xs-center">{{ props.item.examName}}</td> | |
370 | + <td class="td td-row text-xs-center">{{ props.item.examId.examName}}</td> | |
371 | 371 | <td class="td td-row text-xs-center">{{ props.item.classId.classNum}}</td> |
372 | 372 | <td class="td td-row text-xs-center">{{ props.item.sectionId.name }}</td> |
373 | 373 | <td class="td td-row text-xs-center">{{ props.item.subjectName }}</td> |
... | ... | @@ -400,7 +400,7 @@ |
400 | 400 | <img |
401 | 401 | slot="activator" |
402 | 402 | style="cursor:pointer; width:20px; height:20px; " |
403 | - @click="deleteItem(props.item)" | |
403 | + @click="deleteSchedule(props.item)" | |
404 | 404 | src="/static/icon/delete.png" |
405 | 405 | /> |
406 | 406 | <span>Delete</span> |
... | ... | @@ -422,7 +422,7 @@ |
422 | 422 | <v-card flat class="card-style pa-2" dark> |
423 | 423 | <v-layout> |
424 | 424 | <v-flex xs12> |
425 | - <label class="title text-xs-center">Add Class</label> | |
425 | + <label class="title text-xs-center">Add Exam</label> | |
426 | 426 | <v-icon size="24" class="right" @click="addExamScheduleDialog = false">cancel</v-icon> |
427 | 427 | </v-flex> |
428 | 428 | </v-layout> |
... | ... | @@ -436,11 +436,11 @@ |
436 | 436 | <v-flex xs7 sm7 md6 class="ml-3"> |
437 | 437 | <v-select |
438 | 438 | label="Select your Exam Name" |
439 | - :rules="examNameRules" | |
439 | + :rules="examRules" | |
440 | 440 | :items="examList" |
441 | - v-model="addSchedule.examName" | |
441 | + v-model="addSchedule.examId" | |
442 | 442 | item-text="examName" |
443 | - item-value="examName" | |
443 | + item-value="_id" | |
444 | 444 | ></v-select> |
445 | 445 | </v-flex> |
446 | 446 | </v-layout> |
... | ... | @@ -683,7 +683,7 @@ export default { |
683 | 683 | pagination: { |
684 | 684 | rowsPerPage: 10 |
685 | 685 | }, |
686 | - examNameRules: [v => !!v || "Exam Name is required"], | |
686 | + examRules: [v => !!v || "Exam Name is required"], | |
687 | 687 | classRules: [v => !!v || "Class Name is required"], |
688 | 688 | sectionRules: [v => !!v || "section is required"], |
689 | 689 | subjectRules: [v => !!v || "Subject is required"], |
... | ... | @@ -700,7 +700,7 @@ export default { |
700 | 700 | }, |
701 | 701 | { |
702 | 702 | text: "Exam Name", |
703 | - vaue: "examName", | |
703 | + vaue: "examId.examName", | |
704 | 704 | sortable: false, |
705 | 705 | align: "center" |
706 | 706 | }, |
... | ... | @@ -787,6 +787,7 @@ export default { |
787 | 787 | // console.log("item", item); |
788 | 788 | this.editedIndex = this.ScheduleData.indexOf(item); |
789 | 789 | this.editedItem = Object.assign({}, item); |
790 | + this.editedItem.examId = this.editedItem.examId._id; | |
790 | 791 | this.editedItem.classId = this.editedItem.classId._id; |
791 | 792 | this.editedItem.sectionId = this.editedItem.sectionId._id; |
792 | 793 | this.editedItem.date = |
... | ... | @@ -798,6 +799,7 @@ export default { |
798 | 799 | profile(item) { |
799 | 800 | this.editedIndex = this.ScheduleData.indexOf(item); |
800 | 801 | this.editedItem = Object.assign({}, item); |
802 | + this.editedItem.examId = this.editedItem.examId.examName; | |
801 | 803 | this.editedItem.classId = this.editedItem.classId.classNum; |
802 | 804 | this.editedItem.sectionId = this.editedItem.sectionId.name; |
803 | 805 | this.profileExamScheduleDialog = true; | ... | ... |