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;
}
loadAllAccounts({ force: false }).finally(() => {
if (accountListStateInvalid.value) {
updateAccountListInvalidState(false);
}
resolve(data.result);
});
}).catch(error => {
logger.error('failed to save accounts display order', error);
+2
View File
@@ -1069,11 +1069,13 @@ export const useExplorersStore = defineStore('explorers', () => {
return;
}
loadAllInsightsExplorerBasicInfos({ force: false }).finally(() => {
if (insightsExplorerListStateInvalid.value) {
updateInsightsExplorerListInvalidState(false);
}
resolve(data.result);
});
}).catch(error => {
logger.error('failed to save explorers display order', error);
+2
View File
@@ -473,11 +473,13 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
return;
}
loadAllCategories({ force: false }).finally(() => {
if (transactionCategoryListStateInvalid.value) {
updateTransactionCategoryListInvalidState(false);
}
resolve(data.result);
});
}).catch(error => {
logger.error('failed to save categories display order', error);
+4
View File
@@ -509,11 +509,13 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
return;
}
loadAllTagGroups({ force: false }).finally(() => {
if (transactionTagGroupListStateInvalid.value) {
updateTransactionTagGroupListInvalidState(false);
}
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;
}
loadAllTags({ force: false }).finally(() => {
if (transactionTagListStateInvalid.value) {
updateTransactionTagListInvalidState(false);
}
resolve(data.result);
});
}).catch(error => {
logger.error('failed to save tags display order', error);
+2
View File
@@ -334,11 +334,13 @@ export const useTransactionTemplatesStore = defineStore('transactionTemplates',
return;
}
loadAllTemplates({ templateType: templateType, force: false }).finally(() => {
if (!isDefined(transactionTemplateListStatesInvalid.value[templateType]) || transactionTemplateListStatesInvalid.value[templateType]) {
updateTransactionTemplateListInvalidState(templateType, false);
}
resolve(data.result);
});
}).catch(error => {
logger.error('failed to save templates display order', error);