automatically reload data after changed display order

This commit is contained in:
MaysWind
2026-03-01 22:25:44 +08:00
parent f5a7e2e2d6
commit 4845fdedfd
5 changed files with 36 additions and 24 deletions
+2
View File
@@ -934,11 +934,13 @@ export const useAccountsStore = defineStore('accounts', () => {
return; return;
} }
loadAllAccounts({ force: false }).finally(() => {
if (accountListStateInvalid.value) { if (accountListStateInvalid.value) {
updateAccountListInvalidState(false); updateAccountListInvalidState(false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save accounts display order', error); logger.error('failed to save accounts display order', error);
+2
View File
@@ -1069,11 +1069,13 @@ export const useExplorersStore = defineStore('explorers', () => {
return; return;
} }
loadAllInsightsExplorerBasicInfos({ force: false }).finally(() => {
if (insightsExplorerListStateInvalid.value) { if (insightsExplorerListStateInvalid.value) {
updateInsightsExplorerListInvalidState(false); updateInsightsExplorerListInvalidState(false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save explorers display order', error); logger.error('failed to save explorers display order', error);
+2
View File
@@ -473,11 +473,13 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
return; return;
} }
loadAllCategories({ force: false }).finally(() => {
if (transactionCategoryListStateInvalid.value) { if (transactionCategoryListStateInvalid.value) {
updateTransactionCategoryListInvalidState(false); updateTransactionCategoryListInvalidState(false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save categories display order', error); logger.error('failed to save categories display order', error);
+4
View File
@@ -509,11 +509,13 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
return; return;
} }
loadAllTagGroups({ force: false }).finally(() => {
if (transactionTagGroupListStateInvalid.value) { if (transactionTagGroupListStateInvalid.value) {
updateTransactionTagGroupListInvalidState(false); updateTransactionTagGroupListInvalidState(false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save tag groups display order', error); logger.error('failed to save tag groups display order', error);
@@ -705,11 +707,13 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
return; return;
} }
loadAllTags({ force: false }).finally(() => {
if (transactionTagListStateInvalid.value) { if (transactionTagListStateInvalid.value) {
updateTransactionTagListInvalidState(false); updateTransactionTagListInvalidState(false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save tags display order', error); logger.error('failed to save tags display order', error);
+2
View File
@@ -334,11 +334,13 @@ export const useTransactionTemplatesStore = defineStore('transactionTemplates',
return; return;
} }
loadAllTemplates({ templateType: templateType, force: false }).finally(() => {
if (!isDefined(transactionTemplateListStatesInvalid.value[templateType]) || transactionTemplateListStatesInvalid.value[templateType]) { if (!isDefined(transactionTemplateListStatesInvalid.value[templateType]) || transactionTemplateListStatesInvalid.value[templateType]) {
updateTransactionTemplateListInvalidState(templateType, false); updateTransactionTemplateListInvalidState(templateType, false);
} }
resolve(data.result); resolve(data.result);
});
}).catch(error => { }).catch(error => {
logger.error('failed to save templates display order', error); logger.error('failed to save templates display order', error);