From 7469fa17d1d525aae1ccf98d9c3801892ba19794 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:46:37 +0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=E0=B9=80=E0=B8=9B=E0=B8=A5?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=E0=B8=A2=E0=B8=99=E0=B8=A3=E0=B8=B9=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B9=E0=B8=9B=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=A5?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/03_customer-management/MainPage.vue | 128 +++++------------- 1 file changed, 31 insertions(+), 97 deletions(-) diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 57387cc1..6e0ea200 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -341,7 +341,8 @@ const formDataEmployeeOwner = ref<{ subDistrictId: string; zipCode: string; }>(); -const formDataEmployee = ref({ +const formDataEmployee = ref({ + code:'', image: null, customerBranchId: '', nrcNo: '', @@ -723,6 +724,7 @@ function clearFormEmployee() { formDataEmployeeOwner.value = undefined; formDataEmployee.value = { + code:'', image: null, customerBranchId: '', nrcNo: '', @@ -1221,7 +1223,10 @@ async function assignFormDataEmployee(id: string) { zipCode: foundBranch.zipCode, }; + + formDataEmployee.value = { + code: foundEmployee.code, image: null, customerBranchId: foundEmployee.customerBranchId, nrcNo: foundEmployee.nrcNo, @@ -2169,86 +2174,6 @@ watch([inputSearch, currentStatus], async () => { - - @@ -2618,9 +2543,9 @@ watch([inputSearch, currentStatus], async () => { code: props.row.code, name: $i18n.locale === 'en-US' - ? `${props.row.firstName} ${props.row.lastName} `.trim() - : `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim(), - img: props.row.imageUrl, + ? `${props.row.firstNameEN} ${props.row.lastNameEN} `.trim() + : `${props.row.firstName} ${props.row.lastName} `.trim() , + img: props.row.profileImageUrl, male: props.row.gender === 'male', female: props.row.gender === 'female', detail: [ @@ -3879,20 +3804,29 @@ watch([inputSearch, currentStatus], async () => {