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