From 0cf2af9754d46b78af76ee3f0cd99491136398dc Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:44:07 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=20personName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/03_customer-management/MainPage.vue | 9 +++++++++ src/stores/customer/types.ts | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index db9f5355..afa01594 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -74,6 +74,7 @@ const { const employeeStore = useEmployeeStore(); const formData = ref({ status: 'CREATED', + personName: '', customerType: 'CORP', customerName: '', customerNameEN: '', @@ -440,6 +441,7 @@ function clearForm() { customerType: 'CORP', customerName: '', customerNameEN: '', + personName: '', taxNo: '', customerBranch: [ { @@ -725,6 +727,7 @@ async function onSubmitEdit(id: string) { customerNameEN: formData.value.customerNameEN, customerBranch: formData.value.customerBranch, taxNo: formData.value.taxNo, + personName: formData.value.personName, }; await editById(id, tempValue); @@ -820,6 +823,7 @@ async function assignFormData(data: Customer & { branch: CustomerBranch[] }) { customerType: data.customerType, customerName: data.customerName, customerNameEN: data.customerNameEN, + personName: data.personName, taxNo: data.taxNo, customerBranch: [], image: null, @@ -1651,6 +1655,7 @@ watch(currentStatus, async () => { :type-customer="customerType" v-model:customer-name="formData.customerName" v-model:customer-name-en="formData.customerNameEN" + v-model:person-name="formData.personName" v-model:tax-no="formData.taxNo" /> @@ -1826,6 +1831,7 @@ watch(currentStatus, async () => { v-model:customer-branch="formDataEmployeeOwner" v-model:employee-id="currentEmployeeCode" v-model:nrc-no="formDataEmployee.nrcNo" + v-model:person-name="formData.personName" @filter-owner-branch="employeeFilterOwnerBranch" /> @@ -2235,6 +2241,7 @@ watch(currentStatus, async () => { :type-customer="customerType" v-model:customer-name="formData.customerName" v-model:customer-name-en="formData.customerNameEN" + v-model:person-name="formData.personName" v-model:tax-no="formData.taxNo" /> @@ -2426,6 +2433,7 @@ watch(currentStatus, async () => { :type-customer="customerType" v-model:customer-name="formData.customerName" v-model:customer-name-en="formData.customerNameEN" + v-model:person-name="formData.personName" v-model:tax-no="formData.taxNo" /> @@ -2634,6 +2642,7 @@ watch(currentStatus, async () => { v-model:customer-branch="formDataEmployeeOwner" v-model:employee-id="currentEmployeeCode" v-model:nrc-no="formDataEmployee.nrcNo" + v-model:person-name="formData.personName" @filter-owner-branch="employeeFilterOwnerBranch" /> diff --git a/src/stores/customer/types.ts b/src/stores/customer/types.ts index 0f73c0c9..99c32e13 100644 --- a/src/stores/customer/types.ts +++ b/src/stores/customer/types.ts @@ -16,10 +16,12 @@ export type Customer = { updateBy: string | null; updatedAt: string; taxNo: string; + personName: string; }; export type CustomerBranch = { id: string; + branchNo: number; legalPersonNo: string; name: string; @@ -97,6 +99,7 @@ export type CustomerCreate = { customerType: CustomerType; status?: Status; image: File | null; + personName: string; }; export type CustomerUpdate = { @@ -107,6 +110,7 @@ export type CustomerUpdate = { customerBranch?: (CustomerBranchCreate & { id?: string })[]; taxNo?: string | null; image?: File; + personName: string; }; export type BranchAttachmentCreate = {