Commit eadd79e624b48343e4d59ed0b115589a5a203657

Authored by Shikha Mishra
1 parent 8233c5dd68

show school name in progress card report

Showing 1 changed file with 32 additions and 30 deletions   Show diff stats
src/pages/Report/progressCardReport.vue
... ... @@ -136,7 +136,7 @@
136 136 />
137 137 </div>
138 138 <div class="school-name">
139   - <h3>{{ userData.name }}</h3>
  139 + <h3>{{ schoolData.name }}</h3>
140 140 </div>
141 141 </v-layout>
142 142 <!-- </v-flex> -->
... ... @@ -157,16 +157,16 @@
157 157 >
158 158 <p
159 159 style="font-size:20px;margin-bottom: 0px;"
160   - >{{ userData.name }}</p>
  160 + >{{ schoolData.name }}</p>
161 161 <p
162 162 style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
163   - >{{ userData.address }}</p>
  163 + >{{ schoolData.address }}</p>
164 164 <p
165 165 style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
166   - >Phone : {{ userData.mobile }}</p>
  166 + >Phone : {{ schoolData.mobile }}</p>
167 167 <p
168 168 style="font-size: 15px;color: #707478;margin:0px;margin-bottom:8px;"
169   - >Email : {{ userData.email }}</p>
  169 + >Email : {{ schoolData.email }}</p>
170 170 </div>
171 171 </div>
172 172 <!-- Profile Student Report Card-->
... ... @@ -424,9 +424,9 @@ export default {
424 424 addSection: [],
425 425 filterData: [],
426 426 getStudentsList: [],
427   - classRules: [v => !!v || "Class is required"],
428   - sectionRules: [v => !!v || "Class is required"],
429   - studentRules: [v => !!v || "Student is required"],
  427 + classRules: [(v) => !!v || "Class is required"],
  428 + sectionRules: [(v) => !!v || "Class is required"],
  429 + studentRules: [(v) => !!v || "Student is required"],
430 430 getReport: {},
431 431 classList: [],
432 432 output: null,
... ... @@ -438,7 +438,7 @@ export default {
438 438 gradeB: "B",
439 439 gradeCPlus: "C+",
440 440 gradeC: "C",
441   - totalMarks: ""
  441 + totalMarks: "",
442 442 }),
443 443 mounted() {
444 444 this.token = this.$store.state.token;
... ... @@ -453,13 +453,13 @@ export default {
453 453 this.showLoader = true;
454 454 http()
455 455 .get("/getClassesList", {
456   - headers: { Authorization: "Bearer " + this.token }
  456 + headers: { Authorization: "Bearer " + this.token },
457 457 })
458   - .then(response => {
  458 + .then((response) => {
459 459 this.classList = response.data.data;
460 460 this.showLoader = false;
461 461 })
462   - .catch(error => {
  462 + .catch((error) => {
463 463 this.showLoader = false;
464 464 // console.log("err====>", err);
465 465 });
... ... @@ -471,14 +471,14 @@ export default {
471 471 "/getSectionsList",
472 472 { params: { classId: _id } },
473 473 {
474   - headers: { Authorization: "Bearer " + this.token }
  474 + headers: { Authorization: "Bearer " + this.token },
475 475 }
476 476 )
477   - .then(response => {
  477 + .then((response) => {
478 478 this.addSection = response.data.data;
479 479 this.showLoader = false;
480 480 })
481   - .catch(err => {
  481 + .catch((err) => {
482 482 this.showLoader = false;
483 483 // console.log("err====>", err);
484 484 });
... ... @@ -489,18 +489,18 @@ export default {
489 489 .get("/getStudentWithClass", {
490 490 params: {
491 491 classId: this.getReport.classId,
492   - sectionId: this.getReport.sectionId
493   - }
  492 + sectionId: this.getReport.sectionId,
  493 + },
494 494 })
495   - .then(response => {
  495 + .then((response) => {
496 496 response.data.data.unshift({
497 497 name: "Select All",
498   - _id: "Select All"
  498 + _id: "Select All",
499 499 });
500 500 this.getStudentsList = response.data.data;
501 501 this.showLoader = false;
502 502 })
503   - .catch(error => {
  503 + .catch((error) => {
504 504 console.log("err====>", error);
505 505 this.showLoader = false;
506 506 });
... ... @@ -512,22 +512,24 @@ export default {
512 512 if (this.getReport.studentId == "Select All") {
513 513 getSelectMarks = {
514 514 classId: this.getReport.classId,
515   - sectionId: this.getReport.sectionId
  515 + sectionId: this.getReport.sectionId,
516 516 };
517 517 } else if (this.getReport.studentId != "Select All") {
518 518 getSelectMarks = {
519 519 classId: this.getReport.classId,
520 520 sectionId: this.getReport.sectionId,
521   - studentId: this.getReport.studentId
  521 + studentId: this.getReport.studentId,
522 522 };
523 523 }
524 524 http()
525 525 .get("/getParticularMark", {
526 526 params: getSelectMarks,
527   - headers: { Authorization: "Bearer " + this.token }
  527 + headers: { Authorization: "Bearer " + this.token },
528 528 })
529   - .then(response => {
  529 + .then((response) => {
  530 + console.log("===response===", response.data.data[0].schoolId);
530 531 this.cardData = response.data.data;
  532 + this.schoolData = response.data.data[0].schoolId;
531 533 let newData = response.data.data;
532 534 for (var i = 0; i < newData.length; i++) {
533 535 newData[i].examination = newData[i].examId._id;
... ... @@ -537,7 +539,7 @@ export default {
537 539 studentMarkArray = _.groupBy(newData, ["studentsId"]);
538 540 for (let data in studentMarkArray) {
539 541 studentMarkArray[data] = _.groupBy(studentMarkArray[data], [
540   - "examination"
  542 + "examination",
541 543 ]);
542 544 }
543 545 this.filterData = studentMarkArray;
... ... @@ -584,7 +586,7 @@ export default {
584 586  
585 587 this.showLoader = false;
586 588 })
587   - .catch(error => {
  589 + .catch((error) => {
588 590 // console.log("err====>", err);
589 591 this.showLoader = false;
590 592 this.snackbar = true;
... ... @@ -607,18 +609,18 @@ export default {
607 609 getUserData() {
608 610 http()
609 611 .get("/getParticularUserDetail")
610   - .then(response => {
  612 + .then((response) => {
611 613 this.userData = response.data.data;
612 614 })
613   - .catch(error => {
  615 + .catch((error) => {
614 616 if (error.response.status === 401) {
615 617 this.$router.replace({ path: "/" });
616 618 this.$store.dispatch("setToken", null);
617 619 this.$store.dispatch("Id", null);
618 620 }
619 621 });
620   - }
621   - }
  622 + },
  623 + },
622 624 };
623 625 </script>
624 626  
... ...