From fe96dba906a710a18810952c532b9c913948a7ae Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:01:04 +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=E0=B8=A3=E0=B8=B9=E0=B8=9B=E0=B8=99=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B9=84=E0=B8=A1=E0=B9=88?= =?UTF-8?q?=E0=B9=84=E0=B8=94=E0=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/03_customer-management/MainPage.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 0b48bda9..05dd2467 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -666,6 +666,9 @@ function onCloseBranch() { } function clearForm() { + +profileFile.value = undefined; + dialogInputForm.value = false; formData.value = { status: 'CREATED', @@ -958,7 +961,9 @@ async function toggleStatusCustomer(id: string, status: boolean) { } async function onSubmitEdit(id: string) { + if (selectorLabel.value === 'EMPLOYER') { + if (!formData.value) return; const tempValue: CustomerUpdate = { @@ -970,10 +975,15 @@ async function onSubmitEdit(id: string) { customerBranch: formData.value.customerBranch, taxNo: formData.value.taxNo, personName: formData.value.personName, + image: profileFile.value , }; + + if (tempValue.status === 'CREATED') delete tempValue['status']; + + await editById(id, tempValue); infoDrawer.value = false; fetchListCustomer();