From 289ca9115ab97997a2e4d2b4e12c0418df5938e9 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 28 Feb 2022 20:28:27 +0100 Subject: [PATCH 01/45] restoring the transaction list --- frontend/src/components/DecayInformation.vue | 64 +++++----- .../src/views/Layout/DashboardLayout_gdd.vue | 10 +- frontend/src/views/Pages/AccountOverview.vue | 3 +- .../AccountOverview/GddTransactionList.vue | 111 ++++++++---------- .../Pages/UserProfileTransactionList.vue | 1 - 5 files changed, 90 insertions(+), 99 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 9da5e4b2c..066eec5e1 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -1,11 +1,11 @@ @@ -112,6 +129,8 @@ export default { props: { amount: { type: String, default: '0' }, typeId: { type: String, default: '' }, + balanceDate: { type: String }, + decayStartBlock: { type: String }, decay: { decay: '', start: 0, diff --git a/frontend/src/components/transaction-slots/TransactionCreation.vue b/frontend/src/components/transaction-slots/TransactionCreation.vue new file mode 100644 index 000000000..8f11bb2a9 --- /dev/null +++ b/frontend/src/components/transaction-slots/TransactionCreation.vue @@ -0,0 +1,147 @@ + + diff --git a/frontend/src/components/transaction-slots/TransactionDecay.vue b/frontend/src/components/transaction-slots/TransactionDecay.vue new file mode 100644 index 000000000..9245a532e --- /dev/null +++ b/frontend/src/components/transaction-slots/TransactionDecay.vue @@ -0,0 +1,116 @@ + + diff --git a/frontend/src/components/transaction-slots/TransactionReceive.vue b/frontend/src/components/transaction-slots/TransactionReceive.vue new file mode 100644 index 000000000..db6b7e18a --- /dev/null +++ b/frontend/src/components/transaction-slots/TransactionReceive.vue @@ -0,0 +1,147 @@ + + diff --git a/frontend/src/components/transaction-slots/TransactionSend.vue b/frontend/src/components/transaction-slots/TransactionSend.vue new file mode 100644 index 000000000..3ee4b3bf0 --- /dev/null +++ b/frontend/src/components/transaction-slots/TransactionSend.vue @@ -0,0 +1,147 @@ + + diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js index c833fb845..94a5e59f3 100644 --- a/frontend/src/graphql/queries.js +++ b/frontend/src/graphql/queries.js @@ -63,6 +63,7 @@ export const transactionsQuery = gql` id typeId amount + balance balanceDate memo linkedUser { diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 56c246006..e3e7df505 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -13,172 +13,58 @@
-
- -
- -
- -
- - - -
- -
-
+ v-if="typeId === 'DECAY'" + v-bind="transactions[index]" + :properties="getProperties(typeId)" + /> - - - - -
- - {{ getProperties(typeId).operator }} - - - {{ $n(amount, 'decimal') }} - -
-
- -
- {{ - typeId !== 'DECAY' - ? linkedUser.firstName + ' ' + linkedUser.lastName - : $t('decay.decay_since_last_transaction') - }} -
-
-
- - - - -
{{ $t('form.memo') }}
-
- -
{{ memo }}
-
-
- - - - -
{{ $t('form.date') }}
-
- -
- {{ $d(new Date(balanceDate), 'long') }} - {{ $i18n.locale === 'de' ? 'Uhr' : '' }} -
-
-
- - - - -
- -
-
- -
- -
-
-
- -
-
-
- - - -
- - - -
- {{ $t('decay.first_transaction') }} -
- - -
- {{ $t('decay.befor_startblock_transaction') }} -
- -
- -
-
-
- - -
-
- -
- {{ $t('transaction.nullTransactions') }} + + +
+ +
+ {{ $t('transaction.nullTransactions') }} +
diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue new file mode 100644 index 000000000..e7e20c671 --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -0,0 +1,36 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue new file mode 100644 index 000000000..aca959534 --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue @@ -0,0 +1,92 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue b/frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue new file mode 100644 index 000000000..785a5e86f --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue @@ -0,0 +1,20 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Long.vue b/frontend/src/components/DecayInformations/DecayInformation-Long.vue new file mode 100644 index 000000000..d1f67485a --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Long.vue @@ -0,0 +1,109 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Short.vue b/frontend/src/components/DecayInformations/DecayInformation-Short.vue new file mode 100644 index 000000000..2b3356cdf --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Short.vue @@ -0,0 +1,17 @@ + + diff --git a/frontend/src/components/TransactionListItem.vue b/frontend/src/components/TransactionListItem.vue new file mode 100644 index 000000000..f2f7f3e90 --- /dev/null +++ b/frontend/src/components/TransactionListItem.vue @@ -0,0 +1,16 @@ + + diff --git a/frontend/src/components/transaction-slots/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue similarity index 82% rename from frontend/src/components/transaction-slots/TransactionCreation.vue rename to frontend/src/components/Transactions/TransactionCreation.vue index 8f11bb2a9..74b298ee9 100644 --- a/frontend/src/components/transaction-slots/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -1,5 +1,5 @@ diff --git a/frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue b/frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue similarity index 64% rename from frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue rename to frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue index 785a5e86f..c62f3791a 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-FirstTransaction.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue @@ -1,16 +1,16 @@ diff --git a/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue index 4248aeb80..c0f34e24d 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-BeforeStartblock.vue @@ -8,9 +8,5 @@ diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue deleted file mode 100644 index e7e20c671..000000000 --- a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue +++ /dev/null @@ -1,36 +0,0 @@ - - diff --git a/frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue b/frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue deleted file mode 100644 index c62f3791a..000000000 --- a/frontend/src/components/DecayInformations/DecayInformation-NoDecayTransaction.vue +++ /dev/null @@ -1,20 +0,0 @@ - - diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue index 6a64772b5..988115a78 100644 --- a/frontend/src/components/Transactions/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -31,11 +31,7 @@
- {{ - typeId !== 'DECAY' - ? linkedUser.firstName + ' ' + linkedUser.lastName - : $t('decay.decay_since_last_transaction') - }} + {{ $t('decay.decay_since_last_transaction') }}
@@ -51,7 +47,7 @@ - +
{{ $t('form.date') }}
@@ -67,12 +63,12 @@
- +
- +
diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue index bbba2d54f..7a7c59155 100644 --- a/frontend/src/components/Transactions/TransactionReceive.vue +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -34,11 +34,7 @@
- {{ - typeId !== 'DECAY' - ? linkedUser.firstName + ' ' + linkedUser.lastName - : $t('decay.decay_since_last_transaction') - }} + {{ linkedUser.firstName + ' ' + linkedUser.lastName }}
@@ -54,7 +50,7 @@
- +
{{ $t('form.date') }}
@@ -70,7 +66,7 @@
- +
diff --git a/frontend/src/components/Transactions/TransactionSend.vue b/frontend/src/components/Transactions/TransactionSend.vue index f9889ff97..6394c6905 100644 --- a/frontend/src/components/Transactions/TransactionSend.vue +++ b/frontend/src/components/Transactions/TransactionSend.vue @@ -31,11 +31,7 @@
- {{ - typeId !== 'DECAY' - ? linkedUser.firstName + ' ' + linkedUser.lastName - : $t('decay.decay_since_last_transaction') - }} + {{ linkedUser.firstName + ' ' + linkedUser.lastName }}
@@ -51,7 +47,7 @@
- +
{{ $t('form.date') }}
@@ -67,7 +63,7 @@
- +
diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 16d91686a..3ec3091de 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -98,7 +98,6 @@ export default { transactionList.balanceGDT === null ? null : Number(transactionList.balanceGDT) this.transactions = transactionList.transactions this.balance = Number(transactionList.balance) - // this.bookedBalance = Number(transactionList.balance) this.transactionCount = transactionList.count this.decayStartBlock = new Date(transactionList.decayStartBlock) this.pending = false diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 21f725bc1..af1e9775b 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -50,7 +50,7 @@ :per-page="pageSize" :total-rows="transactionCount" > -
+
{{ $t('transaction.nullTransactions') }}
From 552005e2a482e95e36cd37579b75fc5a1a13d8b2 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 5 Mar 2022 12:43:44 +0100 Subject: [PATCH 25/45] fixed database error --- database/entity/0028-decimal_types/Transaction.ts | 4 ++-- database/entity/0029-clean_transaction_table/Transaction.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/entity/0028-decimal_types/Transaction.ts b/database/entity/0028-decimal_types/Transaction.ts index e53508c61..9352e6335 100644 --- a/database/entity/0028-decimal_types/Transaction.ts +++ b/database/entity/0028-decimal_types/Transaction.ts @@ -10,8 +10,8 @@ export class Transaction extends BaseEntity { @Column({ name: 'user_id', unsigned: true, nullable: false }) userId: number - @Column({ unsigned: true, nullable: true, default: null }) - previous: number + @Column({ type: 'int', unsigned: true, nullable: true, default: null }) + previous: number | null @Column({ name: 'type_id', unsigned: true, nullable: false }) typeId: number diff --git a/database/entity/0029-clean_transaction_table/Transaction.ts b/database/entity/0029-clean_transaction_table/Transaction.ts index 1212d62ce..5931c153f 100644 --- a/database/entity/0029-clean_transaction_table/Transaction.ts +++ b/database/entity/0029-clean_transaction_table/Transaction.ts @@ -10,7 +10,7 @@ export class Transaction extends BaseEntity { @Column({ name: 'user_id', unsigned: true, nullable: false }) userId: number - @Column({ unsigned: true, nullable: true, default: null }) + @Column({ type: 'int', unsigned: true, nullable: true, default: null }) previous: number | null @Column({ name: 'type_id', unsigned: true, nullable: false }) From 0ec7caac42534e554f333da83e97316e18adc14d Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 5 Mar 2022 12:56:16 +0100 Subject: [PATCH 26/45] fix frontend --- .../src/components/Transactions/TransactionCreation.vue | 6 +++--- frontend/src/components/Transactions/TransactionDecay.vue | 6 ++++-- frontend/src/components/Transactions/TransactionReceive.vue | 6 +++--- frontend/src/components/Transactions/TransactionSend.vue | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue index 988115a78..6b8582a76 100644 --- a/frontend/src/components/Transactions/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -77,7 +77,7 @@ - + @@ -86,14 +86,14 @@ diff --git a/frontend/src/components/Transactions/TransactionDecay.vue b/frontend/src/components/Transactions/TransactionDecay.vue index 16afe37c6..f7eaae512 100644 --- a/frontend/src/components/Transactions/TransactionDecay.vue +++ b/frontend/src/components/Transactions/TransactionDecay.vue @@ -23,8 +23,9 @@
+ − - {{ $n(amount, 'decimal') }} + {{ $n(Number(amount) * -1, 'decimal') }}
diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue index 40c50f1d9..8a9671cad 100644 --- a/frontend/src/components/Transactions/TransactionReceive.vue +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -81,6 +81,12 @@ + @@ -90,6 +96,7 @@ import DecayInformationShort from '../DecayInformations/DecayInformation-Short' import DecayInformationLong from '../DecayInformations/DecayInformation-Long' import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock' +import DecayInformationNoDecayTransaction from '../DecayInformations/DecayInformation-NoDecayTransaction' export default { name: 'slot-receive', @@ -97,6 +104,7 @@ export default { DecayInformationShort, DecayInformationLong, DecayInformationBeforeStartblock, + DecayInformationNoDecayTransaction,) }, props: { amount: { @@ -130,5 +138,10 @@ export default { visible: false, } }, + computed: { + isStartBlock() { + return new Date(this.decay.start).getTime() === this.decayStartBlock.getTime() + }, + }, } diff --git a/frontend/src/components/Transactions/TransactionSend.vue b/frontend/src/components/Transactions/TransactionSend.vue index c031cb036..d7b91f76e 100644 --- a/frontend/src/components/Transactions/TransactionSend.vue +++ b/frontend/src/components/Transactions/TransactionSend.vue @@ -23,9 +23,9 @@
- + − - {{ $n(amount, 'decimal') }} + {{ $n(Number(amount) * -1, 'decimal') }}
@@ -78,6 +78,12 @@ + @@ -87,12 +93,14 @@ import DecayInformationShort from '../DecayInformations/DecayInformation-Short' import DecayInformationLong from '../DecayInformations/DecayInformation-Long' import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock' +import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock' export default { name: 'slot-send', components: { DecayInformationShort, DecayInformationLong, DecayInformationBeforeStartblock, + DecayInformationDecayStartblock, }, props: { amount: { @@ -126,5 +134,10 @@ export default { visible: false, } }, + computed: { + isStartBlock() { + return new Date(this.decay.start).getTime() === this.decayStartBlock.getTime() + }, + }, } From cf0710d324f6e2bdc3ec195c7f4992cb503139b3 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 5 Mar 2022 13:04:03 +0100 Subject: [PATCH 28/45] changes required to have things running --- frontend/src/components/Transactions/TransactionCreation.vue | 4 ++-- frontend/src/components/Transactions/TransactionReceive.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue index f87f25a80..69d1b8b13 100644 --- a/frontend/src/components/Transactions/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -93,7 +93,7 @@ import DecayInformationShort from '../DecayInformations/DecayInformation-Short' import DecayInformationLong from '../DecayInformations/DecayInformation-Long' import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock' -import DecayInformationNoDecayTransaction from '../DecayInformations/DecayInformation-NoDecayTransaction' +import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock' export default { name: 'slot-creation', @@ -101,7 +101,7 @@ export default { DecayInformationShort, DecayInformationLong, DecayInformationBeforeStartblock, - DecayInformationNoDecayTransaction, + DecayInformationDecayStartblock, }, props: { amount: { diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue index 8a9671cad..43159a059 100644 --- a/frontend/src/components/Transactions/TransactionReceive.vue +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -96,7 +96,7 @@ import DecayInformationShort from '../DecayInformations/DecayInformation-Short' import DecayInformationLong from '../DecayInformations/DecayInformation-Long' import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock' -import DecayInformationNoDecayTransaction from '../DecayInformations/DecayInformation-NoDecayTransaction' +import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock' export default { name: 'slot-receive', @@ -104,7 +104,7 @@ export default { DecayInformationShort, DecayInformationLong, DecayInformationBeforeStartblock, - DecayInformationNoDecayTransaction,) + DecayInformationDecayStartblock, }, props: { amount: { From 7061bdd3586d45b52c20eefc75dc3608d5d645b4 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 6 Mar 2022 10:17:06 +0100 Subject: [PATCH 29/45] add page DecayInformation-Decay.vue, minus sign inserted --- .../DecayInformation-Decay.vue | 36 +++++++++++++++++++ .../DecayInformation-Long.vue | 8 ++--- .../DecayInformation-Short.vue | 4 +-- .../Transactions/TransactionDecay.vue | 6 ++-- 4 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 frontend/src/components/DecayInformations/DecayInformation-Decay.vue diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue new file mode 100644 index 000000000..0dc00a79a --- /dev/null +++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue @@ -0,0 +1,36 @@ + + diff --git a/frontend/src/components/DecayInformations/DecayInformation-Long.vue b/frontend/src/components/DecayInformations/DecayInformation-Long.vue index f48a498e2..e0c3b7759 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Long.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Long.vue @@ -42,7 +42,7 @@
{{ $t('decay.decay') }}
-
{{ $n(decay.decay, 'decimal') }}
+
− {{ $n(decay.decay * -1, 'decimal') }}

@@ -58,7 +58,7 @@
{{ $t('decay.received') }}
-
{{ $n(amount, 'decimal') }}
+
− {{ $n(amount * -1, 'decimal') }}
{{ $n(amount, 'decimal') }}
@@ -68,7 +68,7 @@
{{ $t('decay.decay') }}
-
{{ $n(decay.decay, 'decimal') }}
+
− {{ $n(decay.decay * -1, 'decimal') }}
@@ -78,7 +78,7 @@
- {{ $n(Number(amount) + Number(decay.decay), 'decimal') }} + − {{ $n(Number(amount * -1) + Number(decay.decay * -1), 'decimal') }}
{{ $n(Number(amount) + Number(decay.decay), 'decimal') }} diff --git a/frontend/src/components/DecayInformations/DecayInformation-Short.vue b/frontend/src/components/DecayInformations/DecayInformation-Short.vue index 2b3356cdf..20593ee8a 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-Short.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-Short.vue @@ -1,8 +1,6 @@