fix: update status handling in debit note list retrieval and remove unused issued stats calculation
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
84591ae719
commit
34f5b6474b
1 changed files with 5 additions and 7 deletions
|
|
@ -66,9 +66,7 @@ async function getList(opts?: { page?: number; pageSize?: number }) {
|
||||||
page: opts?.page || page.value,
|
page: opts?.page || page.value,
|
||||||
pageSize: opts?.pageSize || pageSize.value,
|
pageSize: opts?.pageSize || pageSize.value,
|
||||||
query: pageState.inputSearch === '' ? undefined : pageState.inputSearch,
|
query: pageState.inputSearch === '' ? undefined : pageState.inputSearch,
|
||||||
status: (pageState.currentTab === DebitNoteStatus.Issued
|
status: pageState.currentTab,
|
||||||
? undefined
|
|
||||||
: pageState.currentTab) as DebitNoteStatus,
|
|
||||||
includeRegisteredBranch: true,
|
includeRegisteredBranch: true,
|
||||||
startDate: pageState.searchDate[0],
|
startDate: pageState.searchDate[0],
|
||||||
endDate: pageState.searchDate[1],
|
endDate: pageState.searchDate[1],
|
||||||
|
|
@ -137,10 +135,10 @@ onMounted(async () => {
|
||||||
if (res) {
|
if (res) {
|
||||||
stats.value = res;
|
stats.value = res;
|
||||||
|
|
||||||
stats.value['issued'] = Object.values(res).reduce(
|
// stats.value['issued'] = Object.values(res).reduce(
|
||||||
(sum, value) => sum + value,
|
// (sum, value) => sum + value,
|
||||||
0,
|
// 0,
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue