mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 00:34:28 +08:00
code refactor
This commit is contained in:
@@ -252,22 +252,9 @@ export default {
|
||||
self.submitting = true;
|
||||
self.$showLoading(() => self.submitting);
|
||||
|
||||
const submitCategory = {
|
||||
type: self.category.type,
|
||||
name: self.category.name,
|
||||
parentId: self.category.parentId,
|
||||
icon: self.category.icon,
|
||||
color: self.category.color,
|
||||
comment: self.category.comment
|
||||
};
|
||||
|
||||
if (self.editCategoryId) {
|
||||
submitCategory.id = self.category.id;
|
||||
submitCategory.hidden = !self.category.visible;
|
||||
}
|
||||
|
||||
self.transactionCategoriesStore.saveCategory({
|
||||
category: submitCategory
|
||||
category: self.category,
|
||||
isEdit: !!self.editCategoryId
|
||||
}).then(() => {
|
||||
self.submitting = false;
|
||||
self.$hideLoading();
|
||||
|
||||
Reference in New Issue
Block a user