From 34751b300e174b2c392b22d5a8e8c59eb2ddfff6 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Wed, 2 Oct 2024 14:04:46 +0700 Subject: [PATCH] fix:edit value null --- src/pages/03_customer-management/form.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index 1f0e4aa6..cd889f40 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -63,7 +63,7 @@ export const useCustomerForm = defineStore('form-customer', () => { readonly: true, imageEdit: false, customerImageUrl: '', - editCustomerId: '', + editCustomerId: undefined, editCustomerBranchId: '', defaultCustomerImageUrl: '', treeFile: [], @@ -987,9 +987,9 @@ export const useEmployeeForm = defineStore('form-employee', () => { resetEmployeeData = { ...payload, - provinceId: province?.id, - districtId: district?.id, - subDistrictId: subDistrict?.id, + provinceId: province?.id || '', + districtId: district?.id || '', + subDistrictId: subDistrict?.id || '', employeeCheckup: structuredClone( payload.employeeCheckup?.length === 0 ? defaultFormData.employeeCheckup