From 00f9b5f4c48b631404389d3f8016682a0b057ba1 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Thu, 18 Sep 2025 10:25:05 +0700 Subject: [PATCH] fix: customer filter and export --- src/pages/03_customer-management/MainPage.vue | 12 ++++++------ src/pages/03_customer-management/TabCustomer.vue | 8 ++++---- src/stores/customer/index.ts | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 5c1bef7e..df06fbb7 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -213,10 +213,10 @@ async function triggerExport() { status: currentStatus.value === 'All' ? undefined : currentStatus.value, startDate: searchDate.value[0], endDate: searchDate.value[1], - businessType: filterBusinessType.value, - province: filterAddress.provinceId || undefined, - district: filterAddress.districtId || undefined, - subDistrict: filterAddress.subDistrictId || undefined, + businessTypeId: filterBusinessType.value, + provinceId: filterAddress.provinceId || undefined, + districtId: filterAddress.districtId || undefined, + subDistrictId: filterAddress.subDistrictId || undefined, customerType: customerTypeSelected.value.value === 'customerLegalEntity' ? CustomerType.Corporate @@ -489,8 +489,8 @@ onMounted(async () => await init()); v-model="searchDate" :active=" ($q.screen.lt.md && currentStatus !== 'All') || - !!filterBusinessType || - !!filterAddress.provinceId + (currentTab === 'employer' && !!filterBusinessType) || + (currentTab === 'employer' && !!filterAddress.provinceId) " >
{ customerType?: CustomerType; startDate?: string; endDate?: string; - businessType?: string; - province?: string; - district?: string; - subDistrict?: string; + businessTypeId?: string; + provinceId?: string; + districtId?: string; + subDistrictId?: string; }, Data extends Pagination< (Customer & @@ -488,10 +488,10 @@ const useCustomerStore = defineStore('api-customer', () => { activeBranchOnly?: boolean; startDate?: string | Date; endDate?: string | Date; - businessType?: string; - province?: string; - district?: string; - subDistrict?: string; + businessTypeId?: string; + provinceId?: string; + districtId?: string; + subDistrictId?: string; }) { let url = baseUrl + '/' + 'customer-export';