diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index 988dbb40..7871a34a 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -85,6 +85,9 @@ export const useCustomerForm = defineStore('form-customer', () => { if (state.value.dialogType === 'create') { state.value.editCustomerId = ''; } + if (state.value.dialogType === 'edit') { + state.value.dialogType = 'info'; + } currentFormData.value = structuredClone(resetFormData); } @@ -99,6 +102,7 @@ export const useCustomerForm = defineStore('form-customer', () => { if (!data) return; + state.value.dialogType = 'edit'; state.value.editCustomerId = id; state.value.editCustomerCode = data.code; state.value.customerImageUrl = `${apiBaseUrl}/customer/${id}/image`;