diff --git a/src/pages/03_customer-management/form.ts b/src/pages/03_customer-management/form.ts index 24344d1c..54eceb2a 100644 --- a/src/pages/03_customer-management/form.ts +++ b/src/pages/03_customer-management/form.ts @@ -72,6 +72,16 @@ export const useCustomerForm = defineStore('form-customer', () => { (v) => (defaultFormData.customerType = v.customerType), ); + async function deleteAttachment( + id: { branchId: string; customerId: string }, + filename: string, + ) { + const res = await customerStore.deleteAttachment(id.branchId, filename); + if (res) { + assignFormData(id.customerId); + } + } + function isFormDataDifferent() { return ( JSON.stringify(resetFormData) !== JSON.stringify(currentFormData.value)