From bccc5d1ddbeaf76f3bc4a761ebba2dae66f9ede0 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 6 Apr 2022 15:22:32 +0200 Subject: [PATCH 01/12] backend remove startblock from balance object --- backend/src/graphql/model/Balance.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/backend/src/graphql/model/Balance.ts b/backend/src/graphql/model/Balance.ts index 6a93a5b63..619d9b242 100644 --- a/backend/src/graphql/model/Balance.ts +++ b/backend/src/graphql/model/Balance.ts @@ -1,6 +1,5 @@ import { ObjectType, Field } from 'type-graphql' import Decimal from 'decimal.js-light' -import CONFIG from '@/config' @ObjectType() export class Balance { @@ -11,7 +10,6 @@ export class Balance { balanceGDT: number | null count: number linkCount: number - decayStartBlock?: Date lastBookedDate?: Date | null }) { this.balance = data.balance @@ -20,7 +18,6 @@ export class Balance { this.balanceGDT = data.balanceGDT || null this.count = data.count this.linkCount = data.linkCount - this.decayStartBlock = data.decayStartBlock || CONFIG.DECAY_START_TIME this.lastBookedDate = data.lastBookedDate || null } @@ -46,9 +43,6 @@ export class Balance { @Field(() => Number) linkCount: number - @Field(() => Date) - decayStartBlock: Date - // may be null as there may be no transaction @Field(() => Date, { nullable: true }) lastBookedDate: Date | null From ebb6c926d817c2fcb0bbe7057b978c9660bb6486 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 6 Apr 2022 15:22:57 +0200 Subject: [PATCH 02/12] define decay start block in config statically --- frontend/src/config/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index 3f62012ad..d29c4dc09 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -5,6 +5,7 @@ const pkg = require('../../package') const constants = { + DECAY_START_TIME: new Date('2021-05-13 17:46:31'), // GMT+0 CONFIG_VERSION: { DEFAULT: 'DEFAULT', EXPECTED: 'v1.2022-03-18', From 35828050984e7afdaf40680a66ae256a243f1930 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 6 Apr 2022 15:23:47 +0200 Subject: [PATCH 03/12] reference config decay start time when figuring out if its the decay start block --- .../src/components/DecayInformations/DecayInformation.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/DecayInformations/DecayInformation.vue b/frontend/src/components/DecayInformations/DecayInformation.vue index ae76a5bb4..690f6532b 100644 --- a/frontend/src/components/DecayInformations/DecayInformation.vue +++ b/frontend/src/components/DecayInformations/DecayInformation.vue @@ -14,6 +14,7 @@ import DecayInformationLong from '../DecayInformations/DecayInformation-Long' import DecayInformationBeforeStartblock from '../DecayInformations/DecayInformation-BeforeStartblock' import DecayInformationDecayStartblock from '../DecayInformations/DecayInformation-DecayStartblock' +import CONFIG from '@/config' export default { components: { @@ -34,14 +35,10 @@ export default { type: String, required: true, }, - decayStartBlock: { - type: Date, - required: true, - }, }, computed: { isStartBlock() { - return new Date(this.decay.start).getTime() === this.decayStartBlock.getTime() + return new Date(this.decay.start).getTime() === CONFIG.DECAY_START_TIME.getTime() }, }, } From d5d90c70509791b0c8c57372baee95a1824ba332 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 6 Apr 2022 15:24:17 +0200 Subject: [PATCH 04/12] remove decayStartBlock from all component interfaces --- .../DecayInformation-DecayStartblock.vue | 1 - frontend/src/components/GddTransactionList.vue | 4 ---- .../components/Transactions/TransactionCreation.vue | 11 +---------- .../components/Transactions/TransactionReceive.vue | 11 +---------- .../src/components/Transactions/TransactionSend.vue | 11 +---------- frontend/src/graphql/queries.js | 1 - frontend/src/layouts/DashboardLayout_gdd.vue | 3 --- frontend/src/pages/Overview.vue | 2 -- frontend/src/pages/Transactions.vue | 2 -- 9 files changed, 3 insertions(+), 43 deletions(-) diff --git a/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue index 5802bfb4b..3d42f11f8 100644 --- a/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue +++ b/frontend/src/components/DecayInformations/DecayInformation-DecayStartblock.vue @@ -50,7 +50,6 @@ export default { name: 'DecayInformation-StartBlock', props: { balanceDate: { type: String }, - decayStartBlock: { type: Date }, amount: { type: String, }, diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue index 4498034e9..34f7c24ab 100644 --- a/frontend/src/components/GddTransactionList.vue +++ b/frontend/src/components/GddTransactionList.vue @@ -26,7 +26,6 @@ @@ -36,7 +35,6 @@ @@ -46,7 +44,6 @@ @@ -105,7 +102,6 @@ export default { } }, props: { - decayStartBlock: { type: Date }, transactions: { default: () => [] }, pageSize: { type: Number, default: 25 }, timestamp: { type: Number, default: 0 }, diff --git a/frontend/src/components/Transactions/TransactionCreation.vue b/frontend/src/components/Transactions/TransactionCreation.vue index dce11307b..694d907ed 100644 --- a/frontend/src/components/Transactions/TransactionCreation.vue +++ b/frontend/src/components/Transactions/TransactionCreation.vue @@ -27,12 +27,7 @@ - + @@ -82,10 +77,6 @@ export default { type: String, required: true, }, - decayStartBlock: { - type: Date, - required: true, - }, previousBookedBalance: { type: String, required: true, diff --git a/frontend/src/components/Transactions/TransactionReceive.vue b/frontend/src/components/Transactions/TransactionReceive.vue index 32e40f71e..8899b3807 100644 --- a/frontend/src/components/Transactions/TransactionReceive.vue +++ b/frontend/src/components/Transactions/TransactionReceive.vue @@ -33,12 +33,7 @@ - + @@ -87,10 +82,6 @@ export default { typeId: { type: String, }, - decayStartBlock: { - type: Date, - required: true, - }, transactionLinkId: { type: Number, required: false, diff --git a/frontend/src/components/Transactions/TransactionSend.vue b/frontend/src/components/Transactions/TransactionSend.vue index a1ea3c88e..f9125b89c 100644 --- a/frontend/src/components/Transactions/TransactionSend.vue +++ b/frontend/src/components/Transactions/TransactionSend.vue @@ -33,12 +33,7 @@ - + @@ -88,10 +83,6 @@ export default { type: String, required: true, }, - decayStartBlock: { - type: Date, - required: true, - }, transactionLinkId: { type: Number, required: false, diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js index b8622ef2d..dce22fbd9 100644 --- a/frontend/src/graphql/queries.js +++ b/frontend/src/graphql/queries.js @@ -52,7 +52,6 @@ export const transactionsQuery = gql` balanceGDT count linkCount - decayStartBlock lastBookedDate } transactions { diff --git a/frontend/src/layouts/DashboardLayout_gdd.vue b/frontend/src/layouts/DashboardLayout_gdd.vue index de2c68bf0..8b84ac10d 100755 --- a/frontend/src/layouts/DashboardLayout_gdd.vue +++ b/frontend/src/layouts/DashboardLayout_gdd.vue @@ -26,7 +26,6 @@ :transactionCount="transactionCount" :transactionLinkCount="transactionLinkCount" :pending="pending" - :decayStartBlock="decayStartBlock" @update-transactions="updateTransactions" @set-tunneled-email="setTunneledEmail" > @@ -63,7 +62,6 @@ export default { transactionLinkCount: 0, pending: true, visible: false, - decayStartBlock: new Date(), tunneledEmail: null, } }, @@ -110,7 +108,6 @@ export default { this.balance = Number(transactionList.balance.balance) this.transactionCount = transactionList.balance.count this.transactionLinkCount = transactionList.balance.linkCount - this.decayStartBlock = new Date(transactionList.balance.decayStartBlock) this.pending = false }) .catch((error) => { diff --git a/frontend/src/pages/Overview.vue b/frontend/src/pages/Overview.vue index 9723f6ade..194de793a 100644 --- a/frontend/src/pages/Overview.vue +++ b/frontend/src/pages/Overview.vue @@ -18,7 +18,6 @@ :transactions="transactions" :pageSize="5" :timestamp="timestamp" - :decayStartBlock="decayStartBlock" :transaction-count="transactionCount" :transactionLinkCount="transactionLinkCount" :pending="pending" @@ -49,7 +48,6 @@ export default { props: { balance: { type: Number, default: 0 }, GdtBalance: { type: Number, default: 0 }, - decayStartBlock: { type: Date }, transactions: { default: () => [], }, diff --git a/frontend/src/pages/Transactions.vue b/frontend/src/pages/Transactions.vue index 9b2ad6fdf..8efc2026f 100644 --- a/frontend/src/pages/Transactions.vue +++ b/frontend/src/pages/Transactions.vue @@ -10,7 +10,6 @@ :transactionLinkCount="transactionLinkCount" :transactions="transactions" :show-pagination="true" - :decayStartBlock="decayStartBlock" @update-transactions="updateTransactions" v-on="$listeners" /> @@ -45,7 +44,6 @@ export default { }, transactionCount: { type: Number, default: 0 }, transactionLinkCount: { type: Number, default: 0 }, - decayStartBlock: { type: Date }, }, data() { return { From ab7b2a7028ccf75c39abe7b8029b0fd8799be080 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 7 Apr 2022 13:06:47 +0200 Subject: [PATCH 05/12] test for correct startblock date in frontend --- frontend/src/config/index.spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 frontend/src/config/index.spec.js diff --git a/frontend/src/config/index.spec.js b/frontend/src/config/index.spec.js new file mode 100644 index 000000000..3c4c7865e --- /dev/null +++ b/frontend/src/config/index.spec.js @@ -0,0 +1,9 @@ +import CONFIG from './index' + +describe('config/index', () => { + describe('decay start block', () => { + it('has the correct date set', () => { + expect(CONFIG.DECAY_START_TIME).toEqual(new Date('2021-05-13 17:46:31')) + }) + }) +}) From 8a621ec7ce215f3faa8bbfcc30cec23198a71bb5 Mon Sep 17 00:00:00 2001 From: ogerly Date: Sun, 10 Apr 2022 12:09:02 +0200 Subject: [PATCH 06/12] add insert shadow in summary links transaction type --- frontend/src/assets/scss/gradido.scss | 4 ++++ .../src/components/Transactions/TransactionLinkSummary.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/assets/scss/gradido.scss b/frontend/src/assets/scss/gradido.scss index 53a296713..23a1e17fa 100644 --- a/frontend/src/assets/scss/gradido.scss +++ b/frontend/src/assets/scss/gradido.scss @@ -168,6 +168,10 @@ a, background-color: #ebebeba3 !important; } +.gradido-shadow-inset { + box-shadow: inset 0 0 0.3em rgb(241, 187, 187); +} + .gradido-max-width { width: 100%; } diff --git a/frontend/src/components/Transactions/TransactionLinkSummary.vue b/frontend/src/components/Transactions/TransactionLinkSummary.vue index 3f80bfd18..7807a5bf7 100644 --- a/frontend/src/components/Transactions/TransactionLinkSummary.vue +++ b/frontend/src/components/Transactions/TransactionLinkSummary.vue @@ -1,5 +1,5 @@