Commit ba110dd21080645516ea85f1ada2cbf140d9d1df
1 parent
b001726a12
Exists in
master
and in
2 other branches
show students whom status is true while adding invoice
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/pages/Account/invoice.vue
... | ... | @@ -933,11 +933,12 @@ export default { |
933 | 933 | headers: { Authorization: "Bearer " + this.token }, |
934 | 934 | }) |
935 | 935 | .then((response) => { |
936 | - response.data.data.unshift({ | |
936 | + this.studentList = response.data.data.filter((item) => item.status); | |
937 | + this.studentList.unshift({ | |
937 | 938 | name: "Select All", |
938 | 939 | _id: "Select All", |
939 | 940 | }); |
940 | - this.studentList = response.data.data; | |
941 | + console.log("=======studentist====", this.studentList); | |
941 | 942 | this.showLoader = false; |
942 | 943 | }) |
943 | 944 | .catch((err) => { |
... | ... | @@ -1074,7 +1075,7 @@ export default { |
1074 | 1075 | if (this.invoiceData.studentId === "Select All") { |
1075 | 1076 | for (let i = 1; i < this.studentList.length; i++) { |
1076 | 1077 | this.invoiceData.students.push(this.studentList[i]._id); |
1077 | - console.log("data", this.invoiceData.students); | |
1078 | + // console.log("data", this.invoiceData.students); | |
1078 | 1079 | // data.push(this.studentList[i]._id); |
1079 | 1080 | // console.log("data", data); |
1080 | 1081 | } | ... | ... |