refactor: assign file arry

This commit is contained in:
Net 2024-08-29 14:54:06 +07:00
parent 5ed0718573
commit 3727627717

View file

@ -253,7 +253,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
: '', : '',
registerCompanyName: '', registerCompanyName: '',
contactName: '', contactName: '',
file: undefined, file: [],
}); });
state.value.branchIndex = state.value.branchIndex =
(currentFormData.value.customerBranch?.length || 0) - 1; (currentFormData.value.customerBranch?.length || 0) - 1;
@ -345,7 +345,7 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => {
registerCompanyName: '', registerCompanyName: '',
statusSave: false, statusSave: false,
contactName: '', contactName: '',
file: undefined, file: [],
}; };
let resetFormData = structuredClone(defaultFormData); let resetFormData = structuredClone(defaultFormData);
@ -411,7 +411,7 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => {
contactName: _data.contactName, contactName: _data.contactName,
registerCompanyName: '', registerCompanyName: '',
statusSave: false, statusSave: false,
file: undefined, file: [],
}; };
currentFormData.value = structuredClone(resetFormData); currentFormData.value = structuredClone(resetFormData);