From 34f5b6474b353ee847d83f389cfc756be6414e64 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 7 Jul 2025 16:22:21 +0700 Subject: [PATCH] fix: update status handling in debit note list retrieval and remove unused issued stats calculation --- src/pages/12_debit-note/MainPage.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pages/12_debit-note/MainPage.vue b/src/pages/12_debit-note/MainPage.vue index 15093e4d..8820a891 100644 --- a/src/pages/12_debit-note/MainPage.vue +++ b/src/pages/12_debit-note/MainPage.vue @@ -66,9 +66,7 @@ async function getList(opts?: { page?: number; pageSize?: number }) { page: opts?.page || page.value, pageSize: opts?.pageSize || pageSize.value, query: pageState.inputSearch === '' ? undefined : pageState.inputSearch, - status: (pageState.currentTab === DebitNoteStatus.Issued - ? undefined - : pageState.currentTab) as DebitNoteStatus, + status: pageState.currentTab, includeRegisteredBranch: true, startDate: pageState.searchDate[0], endDate: pageState.searchDate[1], @@ -137,10 +135,10 @@ onMounted(async () => { if (res) { stats.value = res; - stats.value['issued'] = Object.values(res).reduce( - (sum, value) => sum + value, - 0, - ); + // stats.value['issued'] = Object.values(res).reduce( + // (sum, value) => sum + value, + // 0, + // ); } });