mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
fix "Save Display Order" still displays bug when adjusting the order and then restoring the original order in the desktop version
This commit is contained in:
@@ -726,7 +726,7 @@ export const useAccountsStore = defineStore('accounts', () => {
|
|||||||
const accounts = Account.ofMany(data.result);
|
const accounts = Account.ofMany(data.result);
|
||||||
|
|
||||||
if (force && data.result && isEquals(allAccounts.value, accounts)) {
|
if (force && data.result && isEquals(allAccounts.value, accounts)) {
|
||||||
reject({ message: 'Account list is up to date' });
|
reject({ message: 'Account list is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export const useExchangeRatesStore = defineStore('exchangeRates', () => {
|
|||||||
const currentData = getExchangeRatesFromLocalStorage();
|
const currentData = getExchangeRatesFromLocalStorage();
|
||||||
|
|
||||||
if (force && currentData && currentData.data && isEquals(currentData.data, data.result)) {
|
if (force && currentData && currentData.data && isEquals(currentData.data, data.result)) {
|
||||||
reject({ message: 'Exchange rates data is up to date' });
|
reject({ message: 'Exchange rates data is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ export const useOverviewStore = defineStore('overview', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (force && data.result && isEquals(transactionOverviewData.value, data.result)) {
|
if (force && data.result && isEquals(transactionOverviewData.value, data.result)) {
|
||||||
reject({ message: 'Data is up to date' });
|
reject({ message: 'Data is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -938,7 +938,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (force && data.result && isEquals(self.transactionCategoryStatisticsData, data.result)) {
|
if (force && data.result && isEquals(self.transactionCategoryStatisticsData, data.result)) {
|
||||||
reject({ message: 'Data is up to date' });
|
reject({ message: 'Data is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -982,7 +982,7 @@ export const useStatisticsStore = defineStore('statistics', {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (force && data.result && isEquals(self.transactionCategoryTrendsData, data.result)) {
|
if (force && data.result && isEquals(self.transactionCategoryTrendsData, data.result)) {
|
||||||
reject({ message: 'Data is up to date' });
|
reject({ message: 'Data is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export const useTransactionCategoriesStore = defineStore('transactionCategories'
|
|||||||
const transactionCategories = TransactionCategory.ofMap(data.result);
|
const transactionCategories = TransactionCategory.ofMap(data.result);
|
||||||
|
|
||||||
if (force && data.result && isEquals(allTransactionCategories.value, transactionCategories)) {
|
if (force && data.result && isEquals(allTransactionCategories.value, transactionCategories)) {
|
||||||
reject({ message: 'Category list is up to date' });
|
reject({ message: 'Category list is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export const useTransactionTagsStore = defineStore('transactionTags', () => {
|
|||||||
const transactionTags = TransactionTag.ofMany(data.result);
|
const transactionTags = TransactionTag.ofMany(data.result);
|
||||||
|
|
||||||
if (force && data.result && isEquals(allTransactionTags.value, transactionTags)) {
|
if (force && data.result && isEquals(allTransactionTags.value, transactionTags)) {
|
||||||
reject({ message: 'Tag list is up to date' });
|
reject({ message: 'Tag list is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ export const useTransactionTemplatesStore = defineStore('transactionTemplates',
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (force && data.result && isEquals(self.allTransactionTemplates[templateType], data.result)) {
|
if (force && data.result && isEquals(self.allTransactionTemplates[templateType], data.result)) {
|
||||||
reject({ message: 'Template list is up to date' });
|
reject({ message: 'Template list is up to date', isUpToDate: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
|
|
||||||
if (error && error.message === 'Account list is up to date') {
|
if (error && error.isUpToDate) {
|
||||||
self.displayOrderModified = false;
|
self.displayOrderModified = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -348,6 +348,10 @@ function reload(force: boolean): void {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
||||||
|
if (error && error.isUpToDate) {
|
||||||
|
displayOrderModified.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!error.processed) {
|
if (!error.processed) {
|
||||||
snackbar.value?.showError(error);
|
snackbar.value?.showError(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,6 +317,10 @@ function reload(): void {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
||||||
|
if (error && error.isUpToDate) {
|
||||||
|
displayOrderModified.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!error.processed) {
|
if (!error.processed) {
|
||||||
snackbar.value?.showError(error);
|
snackbar.value?.showError(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,6 +254,10 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
|
|
||||||
|
if (error && error.isUpToDate) {
|
||||||
|
self.displayOrderModified = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!error.processed) {
|
if (!error.processed) {
|
||||||
self.$refs.snackbar.showError(error);
|
self.$refs.snackbar.showError(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user