refactor: set defaultFormData

This commit is contained in:
Net 2024-08-21 17:10:02 +07:00
parent 9796dfae53
commit ec60ad62dc

View file

@ -157,6 +157,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
legalPersonNo: v.legalPersonNo || '',
registerCompanyName: '',
statusSave: true,
contactName: v.contactName || '',
file: undefined,
}));
@ -213,6 +214,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
: currentFormData.value.customerBranch?.[0].legalPersonNo
: '',
registerCompanyName: '',
contactName: '',
file: undefined,
});
state.value.branchIndex =
@ -302,6 +304,7 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => {
legalPersonNo: '',
registerCompanyName: '',
statusSave: false,
contactName: '',
file: undefined,
};
@ -365,6 +368,7 @@ export const useCustomerBranchForm = defineStore('form-customer-branch', () => {
registerNameEN: _data.registerNameEN,
registerName: _data.registerName,
legalPersonNo: _data.legalPersonNo,
contactName: _data.contactName,
registerCompanyName: '',
statusSave: false,
file: undefined,