code refactor
This commit is contained in:
@@ -60,6 +60,12 @@ export const useTransactionTagsStore = defineStore('transactionTags', {
|
||||
transactionTagListStateInvalid: true,
|
||||
}),
|
||||
actions: {
|
||||
generateNewTransactionTagModel() {
|
||||
return {
|
||||
id: '',
|
||||
name: ''
|
||||
};
|
||||
},
|
||||
updateTransactionTagListInvalidState(invalidState) {
|
||||
this.transactionTagListStateInvalid = invalidState;
|
||||
},
|
||||
|
||||
@@ -222,12 +222,12 @@ import {
|
||||
|
||||
export default {
|
||||
data() {
|
||||
const transactionTagsStore = useTransactionTagsStore();
|
||||
const newTransactionTag = transactionTagsStore.generateNewTransactionTagModel();
|
||||
|
||||
return {
|
||||
newTag: null,
|
||||
editingTag: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
editingTag: newTransactionTag,
|
||||
loading: true,
|
||||
updating: false,
|
||||
tagUpdating: {},
|
||||
|
||||
@@ -154,12 +154,12 @@ export default {
|
||||
'f7router'
|
||||
],
|
||||
data() {
|
||||
const transactionTagsStore = useTransactionTagsStore();
|
||||
const newTransactionTag = transactionTagsStore.generateNewTransactionTagModel();
|
||||
|
||||
return {
|
||||
newTag: null,
|
||||
editingTag: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
editingTag: newTransactionTag,
|
||||
loading: true,
|
||||
loadingError: null,
|
||||
showHidden: false,
|
||||
|
||||
Reference in New Issue
Block a user