mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
automatically reload data after changed display order
This commit is contained in:
@@ -934,11 +934,13 @@ export const useAccountsStore = defineStore('accounts', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (accountListStateInvalid.value) {
|
||||
updateAccountListInvalidState(false);
|
||||
}
|
||||
loadAllAccounts({ force: false }).finally(() => {
|
||||
if (accountListStateInvalid.value) {
|
||||
updateAccountListInvalidState(false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save accounts display order', error);
|
||||
|
||||
|
||||
@@ -1069,11 +1069,13 @@ export const useExplorersStore = defineStore('explorers', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (insightsExplorerListStateInvalid.value) {
|
||||
updateInsightsExplorerListInvalidState(false);
|
||||
}
|
||||
loadAllInsightsExplorerBasicInfos({ force: false }).finally(() => {
|
||||
if (insightsExplorerListStateInvalid.value) {
|
||||
updateInsightsExplorerListInvalidState(false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save explorers display order', error);
|
||||
|
||||
|
||||
@@ -473,11 +473,13 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
||||
return;
|
||||
}
|
||||
|
||||
if (transactionCategoryListStateInvalid.value) {
|
||||
updateTransactionCategoryListInvalidState(false);
|
||||
}
|
||||
loadAllCategories({ force: false }).finally(() => {
|
||||
if (transactionCategoryListStateInvalid.value) {
|
||||
updateTransactionCategoryListInvalidState(false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save categories display order', error);
|
||||
|
||||
|
||||
@@ -509,11 +509,13 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (transactionTagGroupListStateInvalid.value) {
|
||||
updateTransactionTagGroupListInvalidState(false);
|
||||
}
|
||||
loadAllTagGroups({ force: false }).finally(() => {
|
||||
if (transactionTagGroupListStateInvalid.value) {
|
||||
updateTransactionTagGroupListInvalidState(false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save tag groups display order', error);
|
||||
|
||||
@@ -705,11 +707,13 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (transactionTagListStateInvalid.value) {
|
||||
updateTransactionTagListInvalidState(false);
|
||||
}
|
||||
loadAllTags({ force: false }).finally(() => {
|
||||
if (transactionTagListStateInvalid.value) {
|
||||
updateTransactionTagListInvalidState(false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save tags display order', error);
|
||||
|
||||
|
||||
@@ -334,11 +334,13 @@ export const useTransactionTemplatesStore = defineStore('transactionTemplates',
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isDefined(transactionTemplateListStatesInvalid.value[templateType]) || transactionTemplateListStatesInvalid.value[templateType]) {
|
||||
updateTransactionTemplateListInvalidState(templateType, false);
|
||||
}
|
||||
loadAllTemplates({ templateType: templateType, force: false }).finally(() => {
|
||||
if (!isDefined(transactionTemplateListStatesInvalid.value[templateType]) || transactionTemplateListStatesInvalid.value[templateType]) {
|
||||
updateTransactionTemplateListInvalidState(templateType, false);
|
||||
}
|
||||
|
||||
resolve(data.result);
|
||||
resolve(data.result);
|
||||
});
|
||||
}).catch(error => {
|
||||
logger.error('failed to save templates display order', error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user