From b415e14d3fbcda09f7c8ab36079739a6325066f7 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 28 Feb 2022 11:38:49 +0100 Subject: [PATCH] Revert "have some things working in frontend" This reverts commit 65861fded884e458b70851b7bc9a3db46eb28b71. --- frontend/src/components/DecayInformation.vue | 14 ++--- .../src/views/Layout/DashboardLayout_gdd.vue | 5 +- .../AccountOverview/GddTransactionList.vue | 52 +++++++++---------- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index f092d90dd..0daa45a18 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -22,8 +22,8 @@
{{ $t('decay.decay_introduced') }} :
- - {{ $d(new Date(decay.start), 'long') }} + + {{ $d(new Date(decay.decayStart * 1000), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}
@@ -109,18 +109,20 @@ export default { name: 'DecayInformation', props: { + balance: { type: Number }, type: { type: String, default: '' }, decay: { balance: '', - duration: '', - start: 0, - end: 0, + decayDuration: '', + decayStart: 0, + decayEnd: 0, + decayStartBlock: 0, }, decaytyp: { type: String, default: '' }, }, computed: { duration() { - return this.$moment.duration(new Date(this.decay.end) - new Date(this.decay.start))._data + return this.$moment.duration((this.decay.decayEnd - this.decay.decayStart) * 1000)._data }, }, } diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index a1771997e..a473469b6 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -92,10 +92,9 @@ export default { const { data: { transactionList }, } = result - this.GdtBalance = - transactionList.balanceGDT === null ? null : Number(transactionList.balanceGDT) + this.GdtBalance = transactionList.gdtSum === null ? null : Number(transactionList.gdtSum) this.transactions = transactionList.transactions - this.balance = Number(transactionList.balance) + this.balance = Number(transactionList.decay) this.bookedBalance = Number(transactionList.balance) this.transactionCount = transactionList.count this.pending = false diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index ad3480e96..4e2df58d1 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -12,22 +12,17 @@ {{ $t('error.empty-transactionlist') }}
-
+
@@ -41,7 +36,7 @@
- +
@@ -51,22 +46,22 @@
- {{ getProperties(typeId).operator }} + {{ getProperties(type).operator }} - {{ $n(Math.abs(Number(amount)), 'decimal') }} + {{ $n(balance, 'decimal') }}
- {{ typeId !== 'DECAY' ? `${linkedUser.firstName} ${linkedUser.lastName}` : $t('decay.decay_since_last_transaction') }} + {{ type !== 'decay' ? name : $t('decay.decay_since_last_transaction') }}
- +
{{ $t('form.memo') }}
@@ -76,13 +71,13 @@
- +
{{ $t('form.date') }}
- {{ $d(new Date(balanceDate), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }} + {{ $d(new Date(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}
@@ -91,7 +86,7 @@
- +
@@ -103,7 +98,7 @@
- +
@@ -118,13 +113,14 @@ - +
@@ -150,10 +146,10 @@ import PaginationButtons from '../../../components/PaginationButtons' import DecayInformation from '../../../components/DecayInformation' const iconsByType = { - SEND: { icon: 'arrow-left-circle', classes: 'text-danger', operator: '−' }, - RECEIVE: { icon: 'arrow-right-circle', classes: 'gradido-global-color-accent', operator: '+' }, - CREATION: { icon: 'gift', classes: 'gradido-global-color-accent', operator: '+' }, - DECAY: { icon: 'droplet-half', classes: 'gradido-global-color-gray', operator: '−' }, + send: { icon: 'arrow-left-circle', classes: 'text-danger', operator: '−' }, + receive: { icon: 'arrow-right-circle', classes: 'gradido-global-color-accent', operator: '+' }, + creation: { icon: 'gift', classes: 'gradido-global-color-accent', operator: '+' }, + decay: { icon: 'droplet-half', classes: 'gradido-global-color-gray', operator: '−' }, } export default {