2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

fix: period selection error, sync issue, no transaction message

This commit is contained in:
18alantom 2022-01-18 12:33:00 +05:30
parent a51c4bac64
commit a708a14881
2 changed files with 15 additions and 7 deletions

View File

@ -57,12 +57,18 @@
<div class="relative" style="top: -50%">
<div class="text-base text-center font-semibold grid justify-center">
<p class="text-xs text-gray-600 w-32">
{{ active !== null ? sectors[active].label : totalLabel }}
{{
active !== null && sectors.length !== 0
? sectors[active].label
: totalLabel
}}
</p>
<p class="w-32">
{{
valueFormatter(
active !== null ? sectors[active].value : totalValue,
active !== null && sectors.length !== 0
? sectors[active].value
: totalValue,
'Currency'
)
}}

View File

@ -37,7 +37,7 @@
</div>
<div v-if="expenses.length === 0" class="flex-1 w-full h-full flex-center">
<span class="text-base text-gray-600">
{{ _('No transactions yet') }}
{{ _('No expenses in this period') }}
</span>
</div>
</div>
@ -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() {