Commit c62132b757cbc007b14dbdc910d0553e2b496a5c
1 parent
8794512819
Exists in
master
and in
3 other branches
invoice,progress-card report improvement
Showing
2 changed files
with
282 additions
and
137 deletions
Show diff stats
src/pages/Account/invoice.vue
... | ... | @@ -98,7 +98,7 @@ |
98 | 98 | item-text="name" |
99 | 99 | item-value="value" |
100 | 100 | label="Select Payment Status" |
101 | - @change="getPayMethodList" | |
101 | + @change="getPaymentMethod" | |
102 | 102 | :rules="paymentStatusRules" |
103 | 103 | required |
104 | 104 | ></v-select> |
... | ... | @@ -276,7 +276,7 @@ |
276 | 276 | <h3>Profile</h3> |
277 | 277 | <v-spacer></v-spacer> |
278 | 278 | </v-toolbar> |
279 | - <v-card-text > | |
279 | + <v-card-text> | |
280 | 280 | <v-container> |
281 | 281 | <v-layout wrap> |
282 | 282 | <v-flex xs12> |
... | ... | @@ -379,7 +379,6 @@ |
379 | 379 | <th>#</th> |
380 | 380 | <th>Fee Type</th> |
381 | 381 | <th>Amount</th> |
382 | - <!-- <th>Due</th> --> | |
383 | 382 | <th>Discount(%)</th> |
384 | 383 | <th>Subtotal</th> |
385 | 384 | <th>Paid Amount</th> |
... | ... | @@ -390,18 +389,9 @@ |
390 | 389 | :key="index" |
391 | 390 | v-on:keyup="getAmmountDetails(feeType)" |
392 | 391 | > |
393 | - <td style="width:40px" class="tdFeeType"> {{index + 1}} </td> | |
392 | + <td style="width:40px" class="tdFeeType">{{index + 1}}</td> | |
394 | 393 | <td style="width:120px" class="tdFeeType" disabled>{{ feeType.feeTypeName }}</td> |
395 | - <td class="tdFeeType" | |
396 | - style="width:120px" | |
397 | - disabled | |
398 | - >{{feeType.amount}} | |
399 | - </td> | |
400 | - <!-- <td | |
401 | - style="width:120px" | |
402 | - class="tdFeeType" | |
403 | - disabled | |
404 | - >{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> --> | |
394 | + <td class="tdFeeType" style="width:120px" disabled>{{feeType.amount}}</td> | |
405 | 395 | <td class="tdFeeType"> |
406 | 396 | <v-text-field |
407 | 397 | placeholder="fill your Discount" |
... | ... | @@ -442,7 +432,6 @@ |
442 | 432 | <tr> |
443 | 433 | <td colspan="2" class="tdFeeType">Total:</td> |
444 | 434 | <td class="tdFeeType">{{ feeType.amount }}</td> |
445 | - <!-- <td class="tdFeeType">{{ feeType.subTotal }}</td> --> | |
446 | 435 | <td class="tdFeeType">{{ feeType.discount }}</td> |
447 | 436 | <td class="tdFeeType">{{ feeType.subTotal }}</td> |
448 | 437 | <td class="tdFeeType">{{ feeType.paidAmount }}</td> |
... | ... | @@ -469,8 +458,8 @@ |
469 | 458 | <v-icon size="24" class="right" color="white" @click="dialog1 = false">cancel</v-icon> |
470 | 459 | </v-flex> |
471 | 460 | </v-layout> |
472 | - <!-- <p>{{editedItem}}</p> --> | |
473 | - <table class="feeTypeTable tableRsponsive" > | |
461 | + <!-- <p>{{editedItem}}</p> --> | |
462 | + <table class="feeTypeTable tableRsponsive"> | |
474 | 463 | <tr style="color: black"> |
475 | 464 | <th>#</th> |
476 | 465 | <th>Date</th> |
... | ... | @@ -479,9 +468,7 @@ |
479 | 468 | <th>Weaver</th> |
480 | 469 | <th>Action</th> |
481 | 470 | </tr> |
482 | - <tr | |
483 | - v-if="editedItem.paymentStatus !== 'NOT_PAID'" | |
484 | - > | |
471 | + <tr v-if="editedItem.paymentStatus !== 'NOT_PAID'"> | |
485 | 472 | <td style="width:40px ; color:black" class="tdFeeType">1</td> |
486 | 473 | <td style="width:120px; color:black" class="tdFeeType">{{dates( editedItem.date) }}</td> |
487 | 474 | <td style="width:120px; color:black" class="tdFeeType">{{ editedItem.paymentMethod }}</td> |
... | ... | @@ -491,7 +478,7 @@ |
491 | 478 | <router-link |
492 | 479 | :to="{ name:'View Payment Invoice',params: { viewPaymentInvoiceId:editedItem._id } }" |
493 | 480 | > |
494 | - <v-tooltip top > | |
481 | + <v-tooltip top> | |
495 | 482 | <img |
496 | 483 | slot="activator" |
497 | 484 | style="cursor:pointer; width:25px; height:25px; " |
... | ... | @@ -563,9 +550,7 @@ |
563 | 550 | <td class="text-xs-center td td-row">{{ props.item.studentId.name }}</td> |
564 | 551 | <td class="text-xs-center td td-row">{{ props.item.classId.classNum }}</td> |
565 | 552 | <td class="text-xs-center td td-row">{{ props.item.totalAmount }}</td> |
566 | - <td | |
567 | - class="text-xs-center td td-row" | |
568 | - >{{ props.item.totalDiscount}}</td> | |
553 | + <td class="text-xs-center td td-row">{{ props.item.totalDiscount}}</td> | |
569 | 554 | <td |
570 | 555 | class="text-xs-center td td-row" |
571 | 556 | >{{ props.item.totalPaidAmount ? props.item.totalPaidAmount : 0}}</td> |
... | ... | @@ -601,6 +586,18 @@ |
601 | 586 | </v-tooltip> |
602 | 587 | </router-link> |
603 | 588 | <span v-if="props.item.paymentStatus === 'NOT_PAID'"> |
589 | + <!-- <router-link :to="{ name: 'Edit Invoice',params: { invoiceid: editData._id } }"> | |
590 | + <v-tooltip top> | |
591 | + <img | |
592 | + slot="activator" | |
593 | + style="cursor:pointer; width:20px; height:18px; " | |
594 | + class="mr-3" | |
595 | + @click="editItem(props.item)" | |
596 | + src="/static/icon/edit.png" | |
597 | + /> | |
598 | + <span>Edit</span> | |
599 | + </v-tooltip> | |
600 | + </router-link>--> | |
604 | 601 | <v-tooltip top> |
605 | 602 | <img |
606 | 603 | slot="activator" |
... | ... | @@ -886,8 +883,6 @@ |
886 | 883 | v-model="feeType.paidAmount" |
887 | 884 | type="number" |
888 | 885 | :disabled="disabled" |
889 | - :rules="paymentRules" | |
890 | - required | |
891 | 886 | ></v-text-field> |
892 | 887 | </td> |
893 | 888 | <td class="tdFeeType" v-if="invoiceData.paymentStatus == ''"> |
... | ... | @@ -896,8 +891,6 @@ |
896 | 891 | v-model="feeType.paidAmount" |
897 | 892 | type="number" |
898 | 893 | :disabled="disabled" |
899 | - :rules="paymentRules" | |
900 | - required | |
901 | 894 | ></v-text-field> |
902 | 895 | </td> |
903 | 896 | <td |
... | ... | @@ -908,8 +901,6 @@ |
908 | 901 | placeholder="fill your Paid Amount" |
909 | 902 | v-model="feeType.paidAmount" |
910 | 903 | type="number" |
911 | - :rules="paymentRules" | |
912 | - required | |
913 | 904 | ></v-text-field> |
914 | 905 | </td> |
915 | 906 | <td class="tdFeeType"> |
... | ... | @@ -980,11 +971,11 @@ export default { |
980 | 971 | invoiceList: [], |
981 | 972 | editPayment: { |
982 | 973 | studentId: { |
983 | - name: '', | |
984 | - rollNo: '' | |
974 | + name: "", | |
975 | + rollNo: "" | |
985 | 976 | }, |
986 | 977 | classId: { |
987 | - classNum: '' | |
978 | + classNum: "" | |
988 | 979 | } |
989 | 980 | }, |
990 | 981 | menu1: false, |
... | ... | @@ -996,7 +987,7 @@ export default { |
996 | 987 | paidAmount: "0.00", |
997 | 988 | feeTypeName: "" |
998 | 989 | }, |
999 | - | |
990 | + | |
1000 | 991 | feeTypeData: [], |
1001 | 992 | pagination: { |
1002 | 993 | rowsPerPage: 10 |
... | ... | @@ -1028,7 +1019,12 @@ export default { |
1028 | 1019 | }, |
1029 | 1020 | { text: "Class", value: "class", sortable: false, align: "center" }, |
1030 | 1021 | { text: "Total", value: "subtotal", sortable: false, align: "center" }, |
1031 | - { text: "Discount(%)", value: "discount", sortable: false, align: "center" }, | |
1022 | + { | |
1023 | + text: "Discount(%)", | |
1024 | + value: "discount", | |
1025 | + sortable: false, | |
1026 | + align: "center" | |
1027 | + }, | |
1032 | 1028 | { |
1033 | 1029 | text: "Paid Amount", |
1034 | 1030 | value: "paidAmount", |
... | ... | @@ -1137,11 +1133,15 @@ export default { |
1137 | 1133 | invoiceId: editedItem._id |
1138 | 1134 | }; |
1139 | 1135 | http() |
1140 | - .put("/removePayment", deleteInvoice, confirm("Are you sure you want to delete this?") && { | |
1141 | - headers: { | |
1142 | - Authorization: "Bearer " + this.token | |
1136 | + .put( | |
1137 | + "/removePayment", | |
1138 | + deleteInvoice, | |
1139 | + confirm("Are you sure you want to delete this?") && { | |
1140 | + headers: { | |
1141 | + Authorization: "Bearer " + this.token | |
1142 | + } | |
1143 | 1143 | } |
1144 | - }) | |
1144 | + ) | |
1145 | 1145 | .then(response => { |
1146 | 1146 | this.snackbar = true; |
1147 | 1147 | this.text = "Successfully delete Existing Invoice"; |
... | ... | @@ -1263,7 +1263,17 @@ export default { |
1263 | 1263 | add() { |
1264 | 1264 | var updatePayment = { |
1265 | 1265 | invoiceId: this.editPayment._id, |
1266 | - totalPaidAmount: this.editPayment.paidAmount | |
1266 | + // totalPaidAmount: this.editPayment.paidAmount | |
1267 | + classId: this.editPayment.classNum, | |
1268 | + students: this.editPayment.students, | |
1269 | + date: this.editPayment.date, | |
1270 | + paymentStatus: this.editPayment.paymentStatus, | |
1271 | + paymentMethod: this.editPayment.paymentMethod, | |
1272 | + feeType: this.feeTypeData, | |
1273 | + totalAmount: this.feeType.amount, | |
1274 | + totalDiscount: this.feeType.discount, | |
1275 | + totalSubTotal: this.feeType.subTotal, | |
1276 | + totalPaidAmount: this.feeType.paidAmount | |
1267 | 1277 | }; |
1268 | 1278 | http() |
1269 | 1279 | .put("/updateInvoice", updatePayment, { |
... | ... | @@ -1381,7 +1391,7 @@ export default { |
1381 | 1391 | // this.$router.replace({ path: "/" }); |
1382 | 1392 | }); |
1383 | 1393 | }, |
1384 | - | |
1394 | + | |
1385 | 1395 | getAmmountDetails(feeTyp) { |
1386 | 1396 | let feeType = { |
1387 | 1397 | amount: "", |
... | ... | @@ -1441,7 +1451,7 @@ export default { |
1441 | 1451 | this.showPayMethods = false; |
1442 | 1452 | } |
1443 | 1453 | }, |
1444 | - getPayMethodList() { | |
1454 | + getPaymentMethod() { | |
1445 | 1455 | if (this.editData.paymentStatus == "PARTIALLY_PAID") { |
1446 | 1456 | this.showPayMethods = true; |
1447 | 1457 | } else if (this.editData.paymentStatus == "FULLY_PAID") { | ... | ... |
src/pages/Report/progressCardReport.vue
... | ... | @@ -92,18 +92,26 @@ |
92 | 92 | <v-layout wrap> |
93 | 93 | <!-- ****** TABLE DATA MARK ****** --> |
94 | 94 | <v-flex xs12 sm12 md12> |
95 | - <v-card | |
95 | + <!-- <v-card | |
96 | 96 | v-for="(value, id, index) in filterData" |
97 | 97 | :key="index" |
98 | 98 | :items="newData" |
99 | 99 | flat |
100 | 100 | style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px" |
101 | - > | |
101 | + >--> | |
102 | + <v-card flat style="border: 1px solid lightgrey;margin-bottom:14px;padding:20px"> | |
102 | 103 | <v-layout> |
103 | 104 | <v-flex xs12 sm12 md12 class="text-xs-center"> |
104 | 105 | <div class="line"> |
105 | 106 | <div class="school-logo"> |
106 | - <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> | |
107 | + <!-- <img :src="userData.schoolLogoUrl" width="140" alt="logo" /> --> | |
108 | + <v-avatar> | |
109 | + <img :src="userData.schoolLogoUrl" v-if="userData.schoolLogoUrl" /> | |
110 | + <img | |
111 | + src="/static/schoolIcons/INTRACK_White.png" | |
112 | + v-else-if="!userData.schoolLogoUrl" | |
113 | + /> | |
114 | + </v-avatar> | |
107 | 115 | </div> |
108 | 116 | <div class="school-name"> |
109 | 117 | <h2>{{ userData.name }}</h2> |
... | ... | @@ -115,90 +123,192 @@ |
115 | 123 | <p>{{ userData.address }}</p> |
116 | 124 | </v-flex> |
117 | 125 | <v-flex xs12 sm12 md12 class="text-xs-center student-data"> |
118 | - <v-avatar size="100"> | |
126 | + <!-- <v-avatar style="padding-top: 8%"> | |
119 | 127 | <img |
120 | - :src="value[0].studentId.profilePicUrl" | |
121 | - v-if="value[0].studentId.profilePicUrl" | |
122 | - width="100px" | |
128 | + src="/static/icon/user.png" | |
129 | + v-if="!cardData[0].studentId.profilePicUrl" | |
123 | 130 | /> |
124 | 131 | <img |
125 | - src="/static/icon/user.png" | |
126 | - v-else-if="!value[0].studentId.profilePicUrl" | |
127 | - width="100px" | |
132 | + :src="cardData[0].studentId.profilePicUrl" | |
133 | + v-else-if="cardData[0].studentId.profilePicUrl" | |
128 | 134 | /> |
129 | 135 | </v-avatar> |
130 | 136 | <div class="student-info"> |
131 | 137 | <p |
132 | 138 | style="font-size:20px;margin:0px;margin-bottom:4px;" |
133 | - >{{ value[0].studentId.name }}</p> | |
139 | + >{{ cardData[0].studentId.name }}</p> | |
134 | 140 | <p |
135 | 141 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
136 | - >Class : {{ value[0].classId.classNum }}</p> | |
142 | + >Class : {{ cardData[0].classId.classNum }}</p> | |
137 | 143 | <p |
138 | 144 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
139 | - >Section : {{ value[0].sectionId.name }}</p> | |
145 | + >Section : {{ cardData[0].sectionId.name }}</p> | |
140 | 146 | <p |
141 | 147 | style="font-size: 15px;color: #707478;margin:0px;margin-bottom:4px;" |
142 | - >Roll NO : {{ value[0].studentId.rollNo }}</p> | |
143 | - </div> | |
148 | + >Roll NO : {{ cardData[0].studentId.rollNo }}</p> | |
149 | + </div>--> | |
144 | 150 | </v-flex> |
145 | 151 | </div> |
146 | 152 | </v-flex> |
147 | 153 | </v-layout> |
148 | - <!-- <v-card-title class="subheading">{{value[0].examId.examName}}</v-card-title> --> | |
149 | - <table | |
150 | - class="mb-5 tableRsponsive feeTypeTable" | |
151 | - style="border: 1px solid lightgrey; | |
154 | + <v-card class="student-table" xs6 sm6 md6> | |
155 | + <table | |
156 | + v-for="(value, id, index) in filterData" | |
157 | + :key="index" | |
158 | + class="mb-5 tableRsponsive feeTypeTable subheading" | |
159 | + style="border: 1px solid black; | |
152 | 160 | border-collapse: collapse;!important |
153 | 161 | table-layout: auto !important; |
154 | 162 | width: 100% !important; |
155 | 163 | overflow: hidden;" |
156 | - > | |
157 | - <thead style="border: 1px solid lightgrey !important;"> | |
158 | - <tr style="border: 1px solid lightgrey !important;padding:4px;"> | |
159 | - <td rowspan="2">Subject</td> | |
160 | - <!-- <td | |
161 | - v-for="(exam,i) in value[index].studentsMarks" | |
162 | - colspan="2" | |
163 | - style="border: 1px solid lightgrey !important;padding: 10px;" | |
164 | - >{{ exam.markDistributionId.distributionType }}</td>--> | |
165 | - <!-- <template v-for="studentData in value"> | |
164 | + > | |
165 | + <thead style="border: 1px solid lightgrey !important;"> | |
166 | + <tr style="border: 1px solid lightgrey !important;padding:4px;"> | |
166 | 167 | <td |
167 | - colspan="2" | |
168 | - v-for="studentMark in studentData.studentsMarks" | |
169 | - >{{ studentMark.markDistributionId.distributionType }}</td> | |
170 | - </template>--> | |
171 | - <!-- <td>{{value[0].studentsMarks[1].markDistributionId.distributionType}}</td> --> | |
172 | - | |
168 | + rowspan="2" | |
169 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
170 | + >Subject</td> | |
171 | + <template v-for="studentData in value"> | |
172 | + <td | |
173 | + colspan="4" | |
174 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
175 | + >{{value[0].examId.examName}}</td> | |
176 | + <!-- <td | |
177 | + colspan="2" | |
178 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
179 | + ></td>--> | |
180 | + <td | |
181 | + colspan="2" | |
182 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
183 | + >Total</td> | |
184 | + <!-- <td | |
185 | + colspan="2" | |
186 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
187 | + >Grade</td>--> | |
188 | + <!-- <td | |
189 | + colspan="2" | |
190 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
191 | + >Points</td>--> | |
192 | + <!-- <td | |
193 | + colspan="2" | |
194 | + v-for="studentMark in studentData.studentsMarks" | |
195 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
196 | + >{{studentMark.markDistributionId.distributionType}}</td>--> | |
197 | + <!-- <td | |
198 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
199 | + >Total Marks</td>--> | |
200 | + </template> | |
201 | + </tr> | |
202 | + <tr | |
203 | + v-for="(subject, ind) in value" | |
204 | + v-if="ind == 0" | |
205 | + style="border: 1px solid lightgrey !important;" | |
206 | + > | |
207 | + <!-- <template v-for="(exam, i) in subject.studentsMarks"> --> | |
208 | + <template v-for="studentData in value"> | |
209 | + <td | |
210 | + colspan="2" | |
211 | + v-for="studentMark in studentData.studentsMarks" | |
212 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
213 | + >{{studentMark.markDistributionId.distributionType}}</td> | |
214 | + <!-- <td | |
215 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
216 | + >Marks</td> | |
217 | + <td | |
218 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
219 | + >Highest Marks</td>--> | |
220 | + </template> | |
221 | + </tr> | |
222 | + </thead> | |
223 | + <tbody style="border: 1px solid lightgrey !important;"> | |
224 | + <tr | |
225 | + v-for="subject in value" | |
226 | + style="border: 1px solid lightgrey !important;" | |
227 | + > | |
228 | + <td | |
229 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
230 | + >{{subject.subjectName}}</td> | |
231 | + <template v-for="(exam, i) in subject.studentsMarks"> | |
232 | + <td | |
233 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
234 | + >{{exam.marksScored}}</td> | |
235 | + <td | |
236 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
237 | + >{{exam.markDistributionId.markValue}}</td> | |
238 | + </template> | |
239 | + <td | |
240 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
241 | + >{{subject.totalMarks}}</td> | |
242 | + </tr> | |
243 | + </tbody> | |
244 | + <!-- <tfoot> | |
245 | + <tr v-for="subject in value" | |
246 | + style="border: 1px solid lightgrey !important;"> | |
247 | + <td colspan="5"> | |
248 | + <span class="right subheding">Total Marks :</span> | |
249 | + </td> | |
250 | + <td | |
251 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
252 | + >{{subject.totalMarks}}</td> | |
253 | + </tr> | |
254 | + <tr> | |
255 | + <td colspan="5"> | |
256 | + <span class="right subheding">Average Mark :</span> | |
257 | + </td> | |
258 | + <td | |
259 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
260 | + >{{subject.averageMark}}</td> | |
261 | + </tr> | |
262 | + <tr> | |
263 | + <td colspan="5"> | |
264 | + <span class="right subheding">GPA :</span> | |
265 | + </td> | |
266 | + <td | |
267 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
268 | + >{{subject.gpa}}</td> | |
269 | + </tr> | |
270 | + </tfoot>--> | |
271 | + </table> | |
272 | + <v-card> | |
273 | + <tr | |
274 | + | |
275 | + style="border: 1px solid lightgrey !important;" | |
276 | + > | |
277 | + <td colspan="5"> | |
278 | + <span class="right subheding">Total Marks :</span> | |
279 | + </td> | |
173 | 280 | <td |
174 | 281 | style="border: 1px solid lightgrey !important;padding: 10px;" |
175 | - >Total Marks</td> | |
282 | + >{{cardData.totalMarks}}</td> | |
176 | 283 | </tr> |
177 | - <!-- <tr | |
178 | - v-for="(subject, ind) in value" | |
179 | - v-if="ind == 0" | |
180 | - style="border: 1px solid lightgrey !important;" | |
181 | - >--> | |
182 | - --> | |
183 | - <!-- <template v-for="(exam, i) in subject.studentsMarks"> | |
184 | - <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> | |
185 | - <td | |
186 | - style="border: 1px solid lightgrey !important;padding: 10px;" | |
187 | - >Highest Mark</td> | |
188 | - </template>--> | |
189 | - <!-- <td style="border: 1px solid lightgrey !important;padding: 10px;">Mark</td> --> | |
190 | - <!-- </tr> --> | |
191 | - </thead> | |
192 | - <tbody style="border: 1px solid lightgrey !important;"> | |
193 | - <!-- <tr | |
284 | + <tr> | |
285 | + <td colspan="5"> | |
286 | + <span class="right subheding">Average Mark :</span> | |
287 | + </td> | |
288 | + <!-- <td | |
289 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
290 | + >{{subject.averageMark}}</td>--> | |
291 | + </tr> | |
292 | + <tr> | |
293 | + <td colspan="5"> | |
294 | + <span class="right subheding">GPA :</span> | |
295 | + </td> | |
296 | + <!-- <td | |
297 | + style="border: 1px solid lightgrey !important;padding: 10px;" | |
298 | + >{{subject.gpa}}</td>--> | |
299 | + </tr> | |
300 | + </v-card> | |
301 | + </v-card> | |
302 | + <!-- <tbody style="border: 1px solid lightgrey !important;"> | |
303 | + <tr | |
194 | 304 | v-for="subject in value" |
195 | 305 | style="border: 1px solid lightgrey !important;" |
196 | - >--> | |
197 | - <td style="border: 1px solid lightgrey !important;padding: 10px;"></td> | |
198 | - <!-- <td | |
306 | + > | |
307 | + <td style="border: 1px solid lightgrey !important;padding: 10px;"></td>--> | |
308 | + <!-- <td | |
199 | 309 | style="border: 1px solid lightgrey !important;padding: 10px;" |
200 | - >{{subject.subjectName}}</td>--> | |
201 | - <!-- <template v-for="(exam, i) in subject.studentsMarks"> | |
310 | + >{{subject.subjectName}}</td>--> | |
311 | + <!-- <template v-for="(exam, i) in subject.studentsMarks"> | |
202 | 312 | <td |
203 | 313 | style="border: 1px solid lightgrey !important;padding: 10px;" |
204 | 314 | >{{exam.marksScored}}</td> |
... | ... | @@ -209,29 +319,9 @@ |
209 | 319 | <td |
210 | 320 | style="border: 1px solid lightgrey !important;padding: 10px;" |
211 | 321 | >{{subject.totalMarks}}</td> |
212 | - </tr>--> | |
213 | - </tbody> | |
214 | - <!-- <tfoot> | |
215 | - <tr> | |
216 | - <td colspan="4"> | |
217 | - <span class="right subheding">Total Amount (RS) :</span> | |
218 | - </td> | |
219 | - <td>{{ feeType.subTotal }}</td> | |
220 | - </tr> | |
221 | - <tr> | |
222 | - <td colspan="4"> | |
223 | - <span class="right subheding">Paid (RS) :</span> | |
224 | - </td> | |
225 | - <td>{{ feeType.totalPaidAmount ? feeType.totalPaidAmount : 0 }}</td> | |
226 | - </tr> | |
227 | - <tr> | |
228 | - <td colspan="4"> | |
229 | - <span class="right subheding">Balance (RS) :</span> | |
230 | - </td> | |
231 | - <td>{{ feeType.totalPaidAmount ? feeType.subTotal - feeType.totalPaidAmount : feeType.subTotal }}</td> | |
232 | - </tr> | |
233 | - </tfoot>--> | |
234 | - </table> | |
322 | + </tr> | |
323 | + </tbody>--> | |
324 | + <!-- </table> --> | |
235 | 325 | </v-card> |
236 | 326 | </v-flex> |
237 | 327 | </v-layout> |
... | ... | @@ -254,7 +344,7 @@ import _ from "underscore"; |
254 | 344 | export default { |
255 | 345 | data: () => ({ |
256 | 346 | showLoader: false, |
257 | - markData: [], | |
347 | + cardData: [], | |
258 | 348 | token: "", |
259 | 349 | markDistributions: [], |
260 | 350 | markParticularDistributionData: [], |
... | ... | @@ -273,6 +363,12 @@ export default { |
273 | 363 | output: null, |
274 | 364 | userData: {}, |
275 | 365 | newData: [], |
366 | + gradeAPlus: "A+", | |
367 | + gradeA: "A", | |
368 | + gradeBPlus: "B+", | |
369 | + gradeB: "B", | |
370 | + gradeCPlus: "C+", | |
371 | + gradeC: "C" | |
276 | 372 | }), |
277 | 373 | mounted() { |
278 | 374 | this.token = this.$store.state.token; |
... | ... | @@ -339,44 +435,83 @@ export default { |
339 | 435 | getMarkReportList() { |
340 | 436 | // this.showLoader = true; |
341 | 437 | this.showReport = true; |
438 | + // http() | |
439 | + // .get("/getParticularMark", { | |
440 | + // params: { studentId: this.getReport.studentId }, | |
441 | + // headers: { Authorization: "Bearer " + this.token } | |
442 | + // }) | |
443 | + // .then(response => { | |
444 | + // this.showLoader = false; | |
445 | + // this.cardData = response.data.data; | |
446 | + // let newData = response.data.data; | |
447 | + // for (var i = 0; i < newData.length; i++) { | |
448 | + // newData[i].examination = newData[i].examId._id; | |
449 | + // } | |
450 | + // this.filterData = _.groupBy(newData, ["examination"]); | |
451 | + // for (let data in this.filterData) { | |
452 | + | |
453 | + // for (let item in this.filterData[data]) { | |
454 | + // var totalMarks = 0; | |
455 | + // for ( | |
456 | + // let i = 0; | |
457 | + // i < this.filterData[data][item].studentsMarks.length; | |
458 | + // i++ | |
459 | + // ) { | |
460 | + // totalMarks += this.filterData[data][item].studentsMarks[i] | |
461 | + // .marksScored; | |
462 | + // } | |
463 | + // this.filterData[data][item].totalMarks = totalMarks; | |
464 | + // var total = 0; | |
465 | + // total += this.filterData[data][item].totalMarks ; | |
466 | + // console.log("total", total); | |
467 | + // } | |
468 | + // } | |
469 | + // }) | |
342 | 470 | http() |
343 | 471 | .get("/getParticularMark", { |
344 | 472 | params: { studentId: this.getReport.studentId }, |
345 | 473 | headers: { Authorization: "Bearer " + this.token } |
346 | 474 | }) |
347 | 475 | .then(response => { |
348 | - this.showLoader = false; | |
476 | + this.cardData = response.data.data; | |
349 | 477 | let newData = response.data.data; |
350 | - // console.log("response", newData); | |
478 | + // console.log("newData", newData); | |
351 | 479 | for (var i = 0; i < newData.length; i++) { |
352 | 480 | newData[i].examination = newData[i].examId._id; |
353 | - // console.log("newData[i].examination", newData[i].examination); | |
354 | 481 | } |
355 | 482 | this.filterData = _.groupBy(newData, ["examination"]); |
483 | + // console.log("this.filterData", this.filterData); | |
356 | 484 | for (let data in this.filterData) { |
357 | - // console.log("data+++++++++++++++++++++++++++++++++++", data); | |
358 | - | |
359 | 485 | for (let item in this.filterData[data]) { |
360 | - // console.log( | |
361 | - // "filterData[data]==========================>", | |
362 | - // this.filterData[data] | |
363 | - // ); | |
364 | - // console.log("filterData[item]==========================>", item); | |
365 | 486 | var totalMarks = 0; |
366 | 487 | for ( |
367 | 488 | let i = 0; |
368 | 489 | i < this.filterData[data][item].studentsMarks.length; |
369 | 490 | i++ |
370 | 491 | ) { |
492 | + // console.log("this.filterData[data][item].studentsMarks[i]",this.filterData[data][item].studentsMarks[i] | |
493 | + // .marksScored) | |
371 | 494 | totalMarks += this.filterData[data][item].studentsMarks[i] |
372 | 495 | .marksScored; |
373 | 496 | } |
374 | 497 | this.filterData[data][item].totalMarks = totalMarks; |
375 | - // var total = 0; | |
376 | - // total += this.filterData[data][item].totalMarks ; | |
377 | - // console.log("total", total); | |
498 | + // console.log("this.filterData[data][item].grade", this.filterData[data][item].grade); | |
499 | + if (totalMarks > 90) { | |
500 | + this.filterData[data][item].grade = this.gradeAPlus; | |
501 | + } else if (totalMarks > 80 && totalMarks < 90) { | |
502 | + this.filterData[data][item].grade = this.gradeA; | |
503 | + } else if (totalMarks > 70 && totalMarks < 80) { | |
504 | + this.filterData[data][item].grade = this.gradeBPlus; | |
505 | + } else if (totalMarks > 60 && totalMarks < 70) { | |
506 | + this.filterData[data][item].grade = this.gradeB; | |
507 | + } else if (totalMarks > 50 && totalMarks < 60) { | |
508 | + this.filterData[data][item].grade = this.gradeCPlus; | |
509 | + } else if (totalMarks > 40 && totalMarks < 50) { | |
510 | + this.filterData[data][item].grade = this.gradeC; | |
511 | + } | |
378 | 512 | } |
379 | 513 | } |
514 | + this.showLoader = false; | |
380 | 515 | }) |
381 | 516 | .catch(error => { |
382 | 517 | // console.log("err====>", err); | ... | ... |