fix: customer filter and export
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s

This commit is contained in:
puriphatt 2025-09-18 10:25:05 +07:00
parent 7846950802
commit 00f9b5f4c4
3 changed files with 18 additions and 18 deletions

View file

@ -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)
"
>
<div

View file

@ -186,10 +186,10 @@ async function fetchListCustomer(fetchStats = false, mobileFetch?: boolean) {
? 'ACTIVE'
: 'INACTIVE',
query: props.inputSearch,
businessType: props.filterBusinessType,
province: props.filterAddress.provinceId || undefined,
district: props.filterAddress.districtId || undefined,
subDistrict: props.filterAddress.subDistrictId || undefined,
businessTypeId: props.filterBusinessType,
provinceId: props.filterAddress.provinceId || undefined,
districtId: props.filterAddress.districtId || undefined,
subDistrictId: props.filterAddress.subDistrictId || undefined,
startDate: props.searchDate[0],
endDate: props.searchDate[1],
customerType: (

View file

@ -115,10 +115,10 @@ const useCustomerStore = defineStore('api-customer', () => {
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';