fixed show balance of 0 if no balance exists
This commit is contained in:
parent
b6275f7478
commit
9120bc9dba
|
@ -2,7 +2,7 @@
|
||||||
<q-card-section class="fit row justify-left content-center items-center q-col-gutter-sm">
|
<q-card-section class="fit row justify-left content-center items-center q-col-gutter-sm">
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<div v-if="balance" class="text-h6">
|
<div v-if="balance" class="text-h6">
|
||||||
Aktueller Stand: {{ balance.balance ? balance.balance.toFixed(2) : '' }} €
|
Aktueller Stand: {{ balance.balance ? balance.balance.toFixed(2) : parseInt('0').toFixed(2) }} €
|
||||||
<q-badge v-if="isLocked" color="negative" align="top"> gesperrt </q-badge>
|
<q-badge v-if="isLocked" color="negative" align="top"> gesperrt </q-badge>
|
||||||
</div>
|
</div>
|
||||||
<q-spinner v-else color="primary" size="3em" />
|
<q-spinner v-else color="primary" size="3em" />
|
||||||
|
|
|
@ -21,7 +21,7 @@ export default defineComponent({
|
||||||
void store.getBalance(mainStore.currentUser);
|
void store.getBalance(mainStore.currentUser);
|
||||||
});
|
});
|
||||||
|
|
||||||
const balance = computed(() => store.balance?.balance || NaN);
|
const balance = computed(() => store.balance?.balance || 0);
|
||||||
|
|
||||||
return { balance };
|
return { balance };
|
||||||
},
|
},
|
||||||
|
|
|
@ -112,7 +112,7 @@ export default defineComponent({
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const balance = computed(() => store.balance?.balance || NaN);
|
const balance = computed(() => store.balance?.balance || 0);
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue