diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index fea23d66..0d00d035 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -334,6 +334,15 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => { ); } + watch( + () => state.value.dialogType, + () => { + if (state.value.dialogType === 'create') { + currentFormData.value = structuredClone(defaultFormData); + } + }, + ); + async function submitForm() { if (!state.value.currentCustomerId) { throw new Error(