Compare commits

..

2 Commits

Author SHA1 Message Date
Tim Gröger 86a06e8094 update to v1.0.0-alpha.3 2023-05-16 00:00:27 +02:00
Tim Gröger 9120bc9dba fixed show balance of 0 if no balance exists 2023-05-15 10:26:58 +02:00
4 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "1.0.0-alpha.2",
"version": "1.0.0-alpha.3",
"name": "@flaschengeist/balance",
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
"homepage": "https://flaschengeist.dev/Flaschengeist",

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 = [
{