From 860c8784a47b1f364b94807201d77041067f3c25 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 11 Oct 2024 16:08:40 +0700 Subject: [PATCH] fix: typo --- src/components/05_quotation/FormAbout.vue | 2 +- src/pages/03_customer-management/BranchPage.vue | 4 ++-- src/pages/03_customer-management/form.ts | 4 ++-- src/stores/customer/index.ts | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/05_quotation/FormAbout.vue b/src/components/05_quotation/FormAbout.vue index db8071bc..5f2cc1fc 100644 --- a/src/components/05_quotation/FormAbout.vue +++ b/src/components/05_quotation/FormAbout.vue @@ -61,7 +61,7 @@ async function init(val: string, type: 'branch' | 'customer') { query: val, pageSize: 30, }) - : await customerStore.fetchListCustomeBranch({ + : await customerStore.fetchListCustomerBranch({ query: val, pageSize: 30, }); diff --git a/src/pages/03_customer-management/BranchPage.vue b/src/pages/03_customer-management/BranchPage.vue index ec44e11a..ce891bb9 100644 --- a/src/pages/03_customer-management/BranchPage.vue +++ b/src/pages/03_customer-management/BranchPage.vue @@ -45,7 +45,7 @@ const employeeFormStore = useEmployeeForm(); const customerBranchFormStore = useCustomerBranchForm(); const { t } = useI18n(); -const { fetchListCustomeBranch, fetchBranchEmployee } = customerStore; +const { fetchListCustomerBranch, fetchBranchEmployee } = customerStore; const { currentFormData: customerBranchFormData, state: customerBranchFormState, @@ -185,7 +185,7 @@ async function deleteBranchById(id: string) { async function fetchList() { if (!customerId.value) return; - const result = await fetchListCustomeBranch({ + const result = await fetchListCustomerBranch({ customerId: customerId.value, query: !!inputSearch.value ? inputSearch.value : undefined, page: currentPageBranch.value, diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index bb514c50..3addbb15 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -1136,7 +1136,7 @@ export const useEmployeeForm = defineStore('form-employee', () => { ) { state.value.currentIndexPassport = -1; } - const foundBranch = await customerStore.fetchListCustomeBranchById( + const foundBranch = await customerStore.fetchListCustomerBranchById( payload.customerBranchId, ); @@ -1173,7 +1173,7 @@ export const useEmployeeForm = defineStore('form-employee', () => { update: (...args: unknown[]) => void, ) { update(async () => { - const result = await customerStore.fetchListCustomeBranch({ + const result = await customerStore.fetchListCustomerBranch({ includeCustomer: true, query: val, pageSize: 30, diff --git a/src/stores/customer/index.ts b/src/stores/customer/index.ts index d5bd5708..8fc8d320 100644 --- a/src/stores/customer/index.ts +++ b/src/stores/customer/index.ts @@ -76,7 +76,7 @@ const useCustomerStore = defineStore('api-customer', () => { } } - async function fetchListCustomeBranch< + async function fetchListCustomerBranch< Options extends { zipCode?: string; customerId?: string; @@ -479,7 +479,7 @@ const useCustomerStore = defineStore('api-customer', () => { return false; } - async function fetchListCustomeBranchById(branchId: string) { + async function fetchListCustomerBranchById(branchId: string) { const res = await api.get(`/customer-branch/${branchId}`); if (res && res.status === 200) { @@ -495,7 +495,7 @@ const useCustomerStore = defineStore('api-customer', () => { getStatsCustomer, setImage, - fetchListCustomeBranch, + fetchListCustomerBranch, fetchById, fetchList, @@ -510,7 +510,7 @@ const useCustomerStore = defineStore('api-customer', () => { getBranchById, editBranchById, deleteBranchById, - fetchListCustomeBranchById, + fetchListCustomerBranchById, fetchBranchEmployee,