Merge branch 'akaunting:master' into master

This commit is contained in:
Burak Civan
2022-07-27 09:19:32 +03:00
committed by GitHub
10 changed files with 117 additions and 54 deletions

View File

@ -228,6 +228,8 @@ export default {
'#efef32'
],
min_date: false,
categoriesBasedTypes: null,
isParentCategoryDisabled: true,
}
},
@ -288,6 +290,28 @@ export default {
.catch(error => {
});
},
updateParentCategories(event) {
if (event === '') {
return;
}
if (typeof JSON.parse(this.form.categories)[event] === 'undefined') {
this.categoriesBasedTypes = [];
this.isParentCategoryDisabled = true;
return;
}
if (this.form.parent_category_id) {
this.form.parent_category_id = null;
return;
}
this.categoriesBasedTypes = JSON.parse(this.form.categories)[event];
this.isParentCategoryDisabled = false;
},
}
})
});