From f172a2c338eb502dc860f8352132cf4d5998af04 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 18 Jul 2022 12:18:07 +0200 Subject: [PATCH] feat(webapp): remove cents as this is impossbile with this currency --- src/components/services/currency.service.ts | 4 +-- src/components/views/BankView.vue | 28 ++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/services/currency.service.ts b/src/components/services/currency.service.ts index 8ff2709..1575643 100644 --- a/src/components/services/currency.service.ts +++ b/src/components/services/currency.service.ts @@ -1,12 +1,12 @@ export class CurrencyService { public static toString(value: number): string { - return `${(value / 100).toLocaleString('de-DE', { + return `${value.toLocaleString('de-DE', { minimumFractionDigits: 2, maximumFractionDigits: 2, })} Öro`; } public static toSignedString(value: number): string { - return `${value > 0 ? '+' : ''}${(value / 100).toLocaleString('de', { + return `${value > 0 ? '+' : ''}${value.toLocaleString('de', { minimumFractionDigits: 2, maximumFractionDigits: 2, })} Öro`; diff --git a/src/components/views/BankView.vue b/src/components/views/BankView.vue index 94a521f..9e7dfdc 100644 --- a/src/components/views/BankView.vue +++ b/src/components/views/BankView.vue @@ -66,72 +66,72 @@ import { onKeyStroke } from '@vueuse/core'; const depositModalId = 'deposit-modal'; const salaryModalId = 'salary-modal'; const withdrawModalId = 'withdraw-modal'; -const balance = 13500; +const balance = 135; const transactions: ITransaction[] = [ { type: 'Kontoeröffnung', date: new Date(2022, 7, 12, 17, 30, 0), - amount: 500, + amount: 5, }, { type: 'Bargeldeinzahlung', date: new Date(2022, 7, 12, 17, 30, 10), - amount: 10000, + amount: 100, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Gehalt', date: new Date(2022, 7, 12, 17, 34, 10), - amount: 5000, + amount: 50, }, { type: 'Bargeldauszahlung', date: new Date(2022, 7, 15, 18, 26, 0), - amount: -2000, + amount: -20, }, ].sort((a, b) => b.date.getTime() - a.date.getTime());