refactor: restructure
This commit is contained in:
parent
7a81991c79
commit
11ff03ec50
8 changed files with 16 additions and 9 deletions
|
|
@ -58,7 +58,6 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
);
|
||||
|
||||
function isFormDataDifferent() {
|
||||
console.log(resetFormData, currentFormData.value);
|
||||
return (
|
||||
JSON.stringify(resetFormData) !== JSON.stringify(currentFormData.value)
|
||||
);
|
||||
|
|
@ -66,6 +65,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
|
||||
function resetForm(clean = false) {
|
||||
state.value.branchIndex = -1;
|
||||
state.value.readonly = true;
|
||||
if (clean) {
|
||||
defaultFormData.customerType = currentFormData.value.customerType;
|
||||
currentFormData.value = structuredClone(defaultFormData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue