From 627da99cf0d2ef56aa1138292f75462cd57d699f Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Wed, 12 Jun 2024 09:53:19 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=20=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/03_customer-management/MainPage.vue | 1 + src/stores/customer/types.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index d767eb9e..81927594 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -671,6 +671,7 @@ async function assignFormData(data: Customer & { branch: CustomerBranch[] }) { data.branch.forEach((v) => { formData.value.customerBranch?.push({ + id: v.id, address: v.address, addressEN: v.addressEN, provinceId: v.province.id, diff --git a/src/stores/customer/types.ts b/src/stores/customer/types.ts index 2465016b..b605d20b 100644 --- a/src/stores/customer/types.ts +++ b/src/stores/customer/types.ts @@ -87,7 +87,7 @@ export type CustomerBranchCreate = { }; export type CustomerCreate = { - customerBranch?: CustomerBranchCreate[]; + customerBranch?: (CustomerBranchCreate & { id?: string })[]; taxNo?: string | null; customerNameEN: string; customerName: string; @@ -101,7 +101,7 @@ export type CustomerUpdate = { customerType?: CustomerType; customerName?: string; customerNameEN?: string; - customerBranch?: CustomerBranchCreate[]; + customerBranch?: (CustomerBranchCreate & { id?: string })[]; taxNo?: string | null; image?: File; };