From dcbc1b708007c12654068d4062c36bbc546c6107 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:49:43 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B9=80=E0=B9=80=E0=B8=A5=E0=B9=89=E0=B8=A7?= =?UTF-8?q?=E0=B9=80=E0=B8=9B=E0=B8=A5=E0=B8=B5=E0=B9=88=E0=B8=A2=E0=B8=99?= =?UTF-8?q?=E0=B8=AA=E0=B8=96=E0=B8=B2=E0=B8=99=E0=B8=B0=E0=B9=80=E0=B8=9B?= =?UTF-8?q?=E0=B9=87=E0=B8=99=20=20ACTIVE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/03_customer-management/MainPage.vue | 4 +++- src/stores/customer/types.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 3ba54350..2746124e 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -743,7 +743,7 @@ async function onSubmitEdit(id: string) { if (!formData.value) return; const tempValue: CustomerUpdate = { - status: 'ACTIVE', + status: formData.value.status, customerType: formData.value.customerType, customerName: formData.value.customerName, customerNameEN: formData.value.customerNameEN, @@ -752,6 +752,8 @@ async function onSubmitEdit(id: string) { personName: formData.value.personName, }; + if(tempValue.status === 'CREATED') delete tempValue['status'] + await editById(id, tempValue); infoDrawer.value = false; fetchListCustomer(); diff --git a/src/stores/customer/types.ts b/src/stores/customer/types.ts index ad2f3043..144219af 100644 --- a/src/stores/customer/types.ts +++ b/src/stores/customer/types.ts @@ -103,7 +103,7 @@ export type CustomerCreate = { }; export type CustomerUpdate = { - status?: 'ACTIVE' | 'INACTIVE'; + status?: Status; customerType?: CustomerType; customerName?: string; customerNameEN?: string;