fixed show balance of 0 if no balance exists

This commit is contained in:
Tim Gröger 2023-05-15 10:26:58 +02:00
parent b6275f7478
commit 9120bc9dba
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
<q-card-section class="fit row justify-left content-center items-center q-col-gutter-sm">
<div class="col-5">
<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>
</div>
<q-spinner v-else color="primary" size="3em" />

View File

@ -21,7 +21,7 @@ export default defineComponent({
void store.getBalance(mainStore.currentUser);
});
const balance = computed(() => store.balance?.balance || NaN);
const balance = computed(() => store.balance?.balance || 0);
return { balance };
},

View File

@ -112,7 +112,7 @@ export default defineComponent({
loading.value = false;
}
const balance = computed(() => store.balance?.balance || NaN);
const balance = computed(() => store.balance?.balance || 0);
const columns = [
{