mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
show whether data is updated after pull down
This commit is contained in:
@@ -496,6 +496,7 @@ export default {
|
||||
},
|
||||
reload(done) {
|
||||
const self = this;
|
||||
const force = !!done;
|
||||
let dispatchPromise = null;
|
||||
|
||||
if (self.query.chartDataType === self.allChartDataTypes.ExpenseByAccount.type ||
|
||||
@@ -510,7 +511,7 @@ export default {
|
||||
} else if (self.query.chartDataType === self.allChartDataTypes.AccountTotalAssets.type ||
|
||||
self.query.chartDataType === self.allChartDataTypes.AccountTotalLiabilities.type) {
|
||||
dispatchPromise = self.accountsStore.loadAllAccounts({
|
||||
force: true
|
||||
force: force
|
||||
});
|
||||
}
|
||||
|
||||
@@ -519,6 +520,10 @@ export default {
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
|
||||
if (force) {
|
||||
self.$toast('Data has been updated');
|
||||
}
|
||||
}).catch(error => {
|
||||
if (done) {
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user