Add a little sort and active filter.

This commit is contained in:
James Cole
2023-01-03 08:44:54 +01:00
parent 93ae82691b
commit 6a629a7da3
4 changed files with 13 additions and 3 deletions

View File

@@ -98,9 +98,17 @@ export default {
];
for (const key in res.data) {
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
this.bills.push(res.data[key]);
let current = res.data[key];
if(current.active) {
this.bills.push(res.data[key]);
}
}
}
this.bills.sort(function(a, b) {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
});
});
}
}