From 545e55659955c2de3371a7d352fe5a0fa8d5320e Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 3 Apr 2023 14:55:22 +0200 Subject: [PATCH] previuos balance from server, displayed in decay details --- .../DecayInformation-Decay.vue | 4 +-- .../DecayInformation-Long.vue | 22 +++++++++++---- .../DecayInformations/DecayInformation.vue | 18 ++++++++++++- .../src/components/GddTransactionList.vue | 27 +++---------------- .../Transactions/TransactionCreation.vue | 15 +++++++++-- .../Transactions/TransactionDecay.vue | 9 ++++--- .../Transactions/TransactionReceive.vue | 15 +++++++++-- .../Transactions/TransactionSend.vue | 15 +++++++++-- frontend/src/graphql/queries.js | 1 + 9 files changed, 85 insertions(+), 41 deletions(-) diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue index 7abdb0f2b..ce679fb30 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -12,7 +12,7 @@
- {{ previousBookedBalance | GDD }} + {{ previousBalance | GDD }} {{ decay === '0' ? $t('math.minus') : '' }} {{ decay | GDD }} {{ $t('math.equal') }} {{ balance | GDD }} @@ -35,7 +35,7 @@ export default { type: String, required: true, }, - previousBookedBalance: { + previousBalance: { type: String, required: true, }, diff --git a/frontend/src/components/DecayInformations/DecayInformation-Long.vue b/frontend/src/components/DecayInformations/DecayInformation-Long.vue index 0fd6b7f5c..d7e943225 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Long.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Long.vue @@ -24,8 +24,18 @@ - + + +
{{ $t('decay.old_balance') }}
+
+ + {{ previousBalance | GDD }} + +
+ + +
{{ $t('decay.decay') }}
@@ -38,7 +48,7 @@ - + {{ $t(`decay.types.${typeId.toLowerCase()}`) }} @@ -46,12 +56,12 @@ - + -
{{ $t('decay.total') }}
+
{{ $t('decay.new_balance') }}
- {{ (Number(amount) + Number(decay.decay)) | GDD }} + {{ balance | GDD }}
@@ -67,6 +77,8 @@ export default { DurationRow, }, props: { + balance: { type: String, default: '0' }, + previousBalance: { type: String, default: '0' }, amount: { type: String, default: '0' }, typeId: { type: String, default: '' }, memo: { type: String, default: '' }, diff --git a/frontend/src/components/DecayInformations/DecayInformation.vue b/frontend/src/components/DecayInformations/DecayInformation.vue index 3329fd021..0be12d0de 100644 --- a/frontend/src/components/DecayInformations/DecayInformation.vue +++ b/frontend/src/components/DecayInformations/DecayInformation.vue @@ -7,7 +7,15 @@ :decay="decay" :typeId="typeId" /> - +