mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
show no data in trend card when there are really no data in recent 6 months
This commit is contained in:
@@ -103,8 +103,8 @@
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="6">
|
||||
<monthly-income-and-expense-card :data="monthlyIncomeAndExpenseData"
|
||||
:disabled="loadingOverview" :is-dark-mode="isDarkMode" />
|
||||
<monthly-income-and-expense-card :data="monthlyIncomeAndExpenseData" :is-dark-mode="isDarkMode"
|
||||
:loading="loadingOverview" :disabled="loadingOverview" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -207,6 +207,10 @@ export default {
|
||||
const self = this;
|
||||
const data = [];
|
||||
|
||||
if (!self.transactionOverview || !self.transactionOverview.thisMonth || !self.transactionOverview.thisMonth.valid) {
|
||||
return data;
|
||||
}
|
||||
|
||||
[ 'monthBeforeLast4Months', 'monthBeforeLast3Months', 'monthBeforeLast2Months', 'monthBeforeLastMonth', 'lastMonth', 'thisMonth' ].forEach(fieldName => {
|
||||
if (!Object.prototype.hasOwnProperty.call(self.transactionOverview, fieldName)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user