diff --git a/src/components/Charts/DonutChart.vue b/src/components/Charts/DonutChart.vue index 76a570df..9220492d 100644 --- a/src/components/Charts/DonutChart.vue +++ b/src/components/Charts/DonutChart.vue @@ -57,12 +57,18 @@

- {{ active !== null ? sectors[active].label : totalLabel }} + {{ + active !== null && sectors.length !== 0 + ? sectors[active].label + : totalLabel + }}

{{ valueFormatter( - active !== null ? sectors[active].value : totalValue, + active !== null && sectors.length !== 0 + ? sectors[active].value + : totalValue, 'Currency' ) }} diff --git a/src/pages/Dashboard/Expenses.vue b/src/pages/Dashboard/Expenses.vue index 49ba8495..159e1634 100644 --- a/src/pages/Dashboard/Expenses.vue +++ b/src/pages/Dashboard/Expenses.vue @@ -37,7 +37,7 @@

- {{ _('No transactions yet') }} + {{ _('No expenses in this period') }}
@@ -63,11 +63,13 @@ export default { active: null, expenses: [], }), - mounted() { - this.setData(); - }, watch: { - period: 'render', + period(new_, old) { + this.setData(); + }, + }, + activated() { + this.setData(); }, computed: { totalExpense() {