From 8dfb7d16dd255418c1a25f04bf14a384dcddf69d Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 29 Jun 2021 12:30:40 +0200 Subject: [PATCH 01/20] decay in transactionlist per transaction --- .../AccountOverview/GddTransactionList.vue | 66 ++++++++----------- 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 55f03f9e2..5e11fcce1 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -1,12 +1,12 @@ From 83e07be898635f88c8bf83f02f85b9c0d1b5b4fd Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 2 Jul 2021 17:27:04 +0200 Subject: [PATCH 07/20] decay information component --- frontend/src/components/DecayInformation.vue | 19 ++ .../src/views/Layout/DashboardLayout_gdd.vue | 2 +- .../AccountOverview/GddTransactionList.vue | 221 ++++++++++-------- 3 files changed, 139 insertions(+), 103 deletions(-) create mode 100644 frontend/src/components/DecayInformation.vue diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue new file mode 100644 index 000000000..5a5e8306d --- /dev/null +++ b/frontend/src/components/DecayInformation.vue @@ -0,0 +1,19 @@ + + diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 14456605b..517773892 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -128,7 +128,7 @@ export default { if (result.success) { this.GdtBalance = Number(result.result.data.gdtSum) this.transactions = result.result.data.transactions - console.log("this.transactions => ", this.transactions[1].decay.decay_start) + console.log('this.transactions => ', this.transactions[1].decay.decay_start) this.balance = Number(result.result.data.decay) this.bookedBalance = Number(result.result.data.balance) this.transactionCount = result.result.data.count diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index e3c2252bd..fdced417d 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -1,12 +1,12 @@ From b7b4b8116c9a56bcfdf1d2c110acacd23d2e6462 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 5 Jul 2021 20:53:04 +0200 Subject: [PATCH 08/20] decay show moments duration --- frontend/src/components/DecayInformation.vue | 59 ++++++++++++++++++- frontend/src/locales/de.json | 2 + .../src/views/Layout/DashboardLayout_gdd.vue | 1 - .../AccountOverview/GddTransactionList.vue | 33 ++--------- 4 files changed, 63 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 5a5e8306d..4bd5d31be 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -1,5 +1,42 @@ diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 4d85269c5..3c8098346 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -19,6 +19,8 @@ "en": "English" }, "decay": "Vergänglichkeit", + "resieve": "", + "form": { "cancel": "Abbrechen", "reset": "Zurücksetzen", diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 517773892..9990b91f2 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -128,7 +128,6 @@ export default { if (result.success) { this.GdtBalance = Number(result.result.data.gdtSum) this.transactions = result.result.data.transactions - console.log('this.transactions => ', this.transactions[1].decay.decay_start) this.balance = Number(result.result.data.decay) this.bookedBalance = Number(result.result.data.balance) this.transactionCount = result.result.data.count diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index fdced417d..be0ccf87d 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -18,16 +18,15 @@ {{ item.name ? item.name : $t('decay') }}
{{ $d($moment(item.date), 'long') }}
-

{{ getTransaction(item.transaction_id) }} GDD

-

{{ getTransaction(item.transaction_id).decay }} GDD

+ -
+
i
- +
@@ -42,7 +41,7 @@ {{ $d($moment(item.date), 'long') }}
-
an:
+
{{ item.type === 'receive' ? 'von:' : 'an:' }}
{{ item.name }}
@@ -51,31 +50,9 @@ }}
{{ item.memo }}
-
- Seit deiner letzten Transaction sind -
- -
- - {{ - getTransaction(item.transaction_id).decay - ? getTransaction(item.transaction_id).decay.balance - : 'missing' - }} - -
{{}} vergangen.
-
- + - - - {{ $t('transaction.more') }} - - - {{ item }} -
From 1cb01182ae1c1168c7c3f83b73d059278133f5d5 Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Tue, 6 Jul 2021 13:58:56 +0000 Subject: [PATCH 09/20] add api/getDecayStartBlock function --- .../src/Controller/AppRequestsController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/community_server/src/Controller/AppRequestsController.php b/community_server/src/Controller/AppRequestsController.php index 15c68cece..018e0af49 100644 --- a/community_server/src/Controller/AppRequestsController.php +++ b/community_server/src/Controller/AppRequestsController.php @@ -393,6 +393,16 @@ class AppRequestsController extends AppController $this->set('body', $body); } + public function getDecayStartBlock() + { + $transactionsTable = TableRegistry::getTableLocator()->get('Transactions'); + $decayStartBlock = $transactionsTable->find()->where(['transaction_type_id' => 9]); + if(!$decayStartBlock->count()) { + return $this->returnJson(['state' => 'error', 'msg' => 'not found']); + } + return $this->returnJson(['state' => 'success', 'decay_start' => $decayStartBlock->first()->received]); + } + private function acquireAccessToken($session_id) { From c2ca3927bcb0a3950c28185dbfc91c7559a154b3 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 6 Jul 2021 16:02:04 +0200 Subject: [PATCH 10/20] style decay fix --- frontend/src/components/DecayInformation.vue | 66 +++++------ .../AccountOverview/GddTransactionList.vue | 108 ++++++++++++++---- 2 files changed, 117 insertions(+), 57 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 4bd5d31be..4035bad3c 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -1,40 +1,34 @@ @@ -48,7 +42,7 @@ export default { decay_start: 0, decay_end: 0, }, - form: '', + decaytyp: '', }, data() { return { diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index be0ccf87d..3c93e449b 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -4,54 +4,120 @@
+
{{ getProperties(item).operator }} - {{ $n(item.balance, 'decimal') }} + {{ $n(item.balance, 'decimal') }} + + {{ $n(item.balance, 'decimal') }} + +
+
+ +
+
- {{ item.name ? item.name : $t('decay') }} + {{ item.name ? item.name : '' }} + + Vergänglichkeit seit der letzten Transaktion +
{{ $d($moment(item.date), 'long') }}
- - +
+
i
- + + -
+
+ + {{ item.type === 'receive' ? 'empfangen:' : 'gesendet:' }}
+
+ + + {{ item.type === 'creation' ? 'geschöpft:' : '' }} +

{{ $n(item.balance, 'decimal') }} GDD

-
+
am:
- {{ $d($moment(item.date), 'long') }} -
-
-
{{ item.type === 'receive' ? 'von:' : 'an:' }}
- {{ item.name }} -
-
- {{ - item.type === 'receive' ? 'Nachricht vom Absender:' : 'Nachricht an Empfänger:' - }} -
-
{{ item.memo }}
- + + + + {{ $d($moment(item.date), 'long') }} + +
{{ item.type === 'receive' ? 'von:' : 'an:' }}
+ + + {{ item.name }} + 5 + +
+
+ {{ + item.type === 'receive' ? 'Nachricht vom Absender:' : 'Nachricht an Empfänger:' + }} +
+ + + + {{ item.memo }} + + +
+
+
Dein Eintrag aus der Community wurde bestätigt.
+ +
+ + + 5 Stunden hilfe bei Gartenarbeit. Meine 80 jährige Nachbarin kann zur Zeit + nicht in Ihrem Garten arbeiten. + + + ansehen + +
+ +
+ Deinem Konto wurden am + {{ $d($moment(item.date), 'long') }} +
{{ $n(item.balance, 'decimal') }} GDD geschöpft
+
+ +
From 8413ca56f7e5b3125ab89cfd86f3f6d9d6382593 Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Wed, 7 Jul 2021 12:48:58 +0000 Subject: [PATCH 11/20] flag decay start blog with additional field in decay --- .../src/Model/Table/TransactionsTable.php | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/community_server/src/Model/Table/TransactionsTable.php b/community_server/src/Model/Table/TransactionsTable.php index 8fcd81489..3a7555ba8 100644 --- a/community_server/src/Model/Table/TransactionsTable.php +++ b/community_server/src/Model/Table/TransactionsTable.php @@ -138,6 +138,7 @@ class TransactionsTable extends Table $stateUsersTable = TableRegistry::getTableLocator()->get('StateUsers'); $stateBalancesTable = TableRegistry::getTableLocator()->get('StateBalances'); + $transactionsTable = TableRegistry::getTableLocator()->get('Transactions'); $transaction_ids = []; $involved_user_ids = []; @@ -162,11 +163,15 @@ class TransactionsTable extends Table $state_balance = $stateBalancesTable->newEntity(); $final_transactions = []; + $decay_start_transaction = $transactionsTable->find()->where(['transaction_type_id' => 9]); + $decay_start_transaction_id = 0; + if($decay_start_transaction->count()) { + $decay_start_transaction_id = $decay_start_transaction->first()->id; + } + $decay_start_time = $stateBalancesTable->getDecayStartDateCached()->getTimestamp(); foreach($stateUserTransactions as $i => $su_transaction) { - - // sender or receiver when user has sended money // group name if creation // type: gesendet / empfangen / geschöpft @@ -187,7 +192,8 @@ class TransactionsTable extends Table } if($prev) { - if($prev->balance > 0) { + if($prev->balance > 0) + { $current = $su_transaction; $calculated_decay = $stateBalancesTable->calculateDecay($prev->balance, $prev->balance_date, $current->balance_date, true); $balance = floatval($prev->balance - $calculated_decay['balance']); @@ -199,7 +205,19 @@ class TransactionsTable extends Table 'decay_duration' => $calculated_decay['interval']->format('%a days, %H hours, %I minutes, %S seconds'), 'decay_start' => $calculated_decay['start_date'], 'decay_end' => $calculated_decay['end_date'] - ]; + ]; + if($prev->transaction_id < $decay_start_transaction_id && + $current->transaction_id > $decay_start_transaction_id) { + $final_transaction['decay']['decay_start_block'] = $decay_start_time; + } + // hint: use transaction id + /*if($calculated_decay['start_date'] < $decay_start_time && $calculated_decay['end_date'] > $decay_start_time) { + $final_transaction['decay']['decay_start_block'] = $decay_start_time; + } else { + echo "start block: " . $decay_start_time . "
"; + echo "start date: " . $calculated_decay['start_date'] . "
"; + echo "end date: " . $calculated_decay['end_date']. "
"; + }*/ } } } From 1dadb58086fc2e70711361dc677c148be51ff05c Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Wed, 7 Jul 2021 13:06:12 +0000 Subject: [PATCH 12/20] fix bug with missing decay in last transaction --- .../src/Controller/AppRequestsController.php | 11 +++++++++-- .../src/Model/Table/TransactionsTable.php | 7 ++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/community_server/src/Controller/AppRequestsController.php b/community_server/src/Controller/AppRequestsController.php index 018e0af49..43242af84 100644 --- a/community_server/src/Controller/AppRequestsController.php +++ b/community_server/src/Controller/AppRequestsController.php @@ -25,7 +25,7 @@ class AppRequestsController extends AppController $this->loadComponent('GradidoNumber'); //$this->loadComponent('JsonRpcRequestClient'); //$this->Auth->allow(['add', 'edit']); - $this->Auth->allow(['index', 'sendCoins', 'createCoins', 'getBalance', 'listTransactions']); + $this->Auth->allow(['index', 'sendCoins', 'createCoins', 'getBalance', 'listTransactions', 'getDecayStartBlock']); } @@ -335,11 +335,18 @@ class AppRequestsController extends AppController $limit = $count; $offset = 0; + $skip_first_transaction = false; if($page == 1) { $limit--; } else { $offset = (( $page - 1 ) * $count) - 1; } + if($offset) { + // move cursor one step backwards to able to load one transaction previous last which will be shown for decay calculation + $offset--; + $limit++; + $skip_first_transaction = true; + } $stateUserTransactionsQuery = $stateUserTransactionsTable ->find() @@ -362,7 +369,7 @@ class AppRequestsController extends AppController $transactions_from_db = array_reverse($transactions_from_db); } - $transactions = $transactionsTable->listTransactionsHumanReadable($transactions_from_db, $user, $decay); + $transactions = $transactionsTable->listTransactionsHumanReadable($transactions_from_db, $user, $decay, $skip_first_transaction); if($orderDirection == 'DESC') { $transactions = array_reverse($transactions); diff --git a/community_server/src/Model/Table/TransactionsTable.php b/community_server/src/Model/Table/TransactionsTable.php index 3a7555ba8..925f6f31e 100644 --- a/community_server/src/Model/Table/TransactionsTable.php +++ b/community_server/src/Model/Table/TransactionsTable.php @@ -133,7 +133,7 @@ class TransactionsTable extends Table } - public function listTransactionsHumanReadable($stateUserTransactions, array $user, $decay = true) + public function listTransactionsHumanReadable($stateUserTransactions, array $user, $decay = true, $skip_first_transaction = false) { $stateUsersTable = TableRegistry::getTableLocator()->get('StateUsers'); @@ -267,8 +267,9 @@ class TransactionsTable extends Table $final_transaction['name'] = $otherUser->first_name . ' ' . $otherUser->last_name; $final_transaction['email'] = $otherUser->email; } - - $final_transactions[] = $final_transaction; + if($i > 0 || !$skip_first_transaction) { + $final_transactions[] = $final_transaction; + } if($i == $stateUserTransactionsCount-1 && $decay) { $now = new FrozenTime(); From f78194a7672cc38d4b960b215ed52aff6880fe52 Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Wed, 7 Jul 2021 16:03:27 +0000 Subject: [PATCH 13/20] fix again --- community_server/src/Controller/AppRequestsController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/community_server/src/Controller/AppRequestsController.php b/community_server/src/Controller/AppRequestsController.php index 43242af84..4b81b8ac9 100644 --- a/community_server/src/Controller/AppRequestsController.php +++ b/community_server/src/Controller/AppRequestsController.php @@ -341,11 +341,14 @@ class AppRequestsController extends AppController } else { $offset = (( $page - 1 ) * $count) - 1; } - if($offset) { + if($offset && $orderDirection == 'ASC') { // move cursor one step backwards to able to load one transaction previous last which will be shown for decay calculation $offset--; $limit++; $skip_first_transaction = true; + } else if($orderDirection == 'DESC') { + $limit++; + $skip_first_transaction = true; } $stateUserTransactionsQuery = $stateUserTransactionsTable From 7f65e131cc8a749a3254971985683a481a742783 Mon Sep 17 00:00:00 2001 From: Dario Rekowski on RockPI Date: Wed, 7 Jul 2021 16:06:48 +0000 Subject: [PATCH 14/20] update test --- .../Controller/AppRequestControllerTest.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/community_server/tests/TestCase/Controller/AppRequestControllerTest.php b/community_server/tests/TestCase/Controller/AppRequestControllerTest.php index 5aeb64d8b..5ee1f3c53 100644 --- a/community_server/tests/TestCase/Controller/AppRequestControllerTest.php +++ b/community_server/tests/TestCase/Controller/AppRequestControllerTest.php @@ -205,11 +205,12 @@ class AppRequestControllerTest extends TestCase "transaction_id": 7, "date": "2021-04-14T09:02:28+00:00", "memo": "test time 3", - "decay": { + "decay": { "balance": 6, "decay_duration": "0 days, 00 hours, 00 minutes, 28 seconds", "decay_start": 1618390920, - "decay_end": 1618390948 + "decay_end": 1618390948, + "decay_start_block": 1618390920 }, "balance": 100000, "type": "receive", @@ -237,7 +238,7 @@ class AppRequestControllerTest extends TestCase "transaction_id": 9, "date": "2021-04-14T09:31:28+00:00", "memo": "test login crash", - "decay": { + "decay": { "balance": 33, "decay_duration": "0 days, 00 hours, 02 minutes, 42 seconds", "decay_start": 1618392526, @@ -251,20 +252,20 @@ class AppRequestControllerTest extends TestCase }, { "type": "decay", - "balance": 1222493, + "balance": 1345726, "decay_duration": "on 14.04.21", "decay_start": 1618392688, - "decay_end": 1624956464, + "decay_end": 1625673853, "memo": "" } ], "transactionExecutingCount": 0, "count": 7, "gdtSum": 180000, - "timeUsed": 0.6441609859466553, - "decay_date": "2021-06-29T08:47:44+00:00", + "timeUsed": 0.44154810905456545, + "decay_date": "2021-07-07T16:04:13+00:00", "balance": 9099652, - "decay": 7877159 + "decay": 7753926 }'; $this->getAndParse('/api/list-transactions/', json_decode($expectedResult, true)); } From 9a368483aee0f983059e5b76055a1804ae122bcc Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 8 Jul 2021 09:27:51 +0200 Subject: [PATCH 15/20] style decay start date --- frontend/src/components/DecayInformation.vue | 20 ++++++++++++------- frontend/src/views/Pages/AccountOverview.vue | 2 +- .../AccountOverview/GddTransactionList.vue | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 4035bad3c..84b9a1310 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -52,14 +52,20 @@ export default { diff: {}, } }, + created() { + console.log("start", start) + }, methods: { - getDuration(start, end) { - this.a = new Date(start) - this.b = new Date(end) - this.a = this.$moment.unix(this.a) - this.b = this.$moment.unix(this.b) - this.diff = this.$moment.duration(this.a.diff(this.b)) - this.duration = this.diff._data + getDuration(start, end) { + console.log("start", start) + console.log("end", end) + this.a = new Date(start) + this.b = new Date(end) + this.a = this.$moment.unix(this.a) + this.b = this.$moment.unix(this.b) + this.diff = this.$moment.duration(this.a.diff(this.b)) + this.duration = this.diff._data + }, }, } diff --git a/frontend/src/views/Pages/AccountOverview.vue b/frontend/src/views/Pages/AccountOverview.vue index 35490e093..bbe16b539 100644 --- a/frontend/src/views/Pages/AccountOverview.vue +++ b/frontend/src/views/Pages/AccountOverview.vue @@ -30,7 +30,7 @@ + \ No newline at end of file From cc7778b55d1baaa7be2d9440480e0fb27bb9a930 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 8 Jul 2021 15:55:32 +0200 Subject: [PATCH 16/20] fix style decay startblick --- frontend/src/components/DecayInformation.vue | 116 +++++++++++++----- frontend/src/locales/de.json | 22 +++- frontend/src/locales/en.json | 20 ++- .../AccountOverview/GddTransactionList.vue | 64 +++++++--- 4 files changed, 174 insertions(+), 48 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 84b9a1310..c18bfdb3c 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -1,34 +1,90 @@ @@ -41,6 +97,7 @@ export default { decay_duration: '', decay_start: 0, decay_end: 0, + decay_start_block: 0, }, decaytyp: '', }, @@ -50,22 +107,21 @@ export default { b: 0, duration: {}, diff: {}, + decay_start_block_text_short: this.decay.decay_start_block + ? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block)) + : '', } }, - created() { - console.log("start", start) - }, methods: { - getDuration(start, end) { - console.log("start", start) - console.log("end", end) - this.a = new Date(start) - this.b = new Date(end) - this.a = this.$moment.unix(this.a) - this.b = this.$moment.unix(this.b) - this.diff = this.$moment.duration(this.a.diff(this.b)) - this.duration = this.diff._data - + getDuration(start, end) { + // console.log("start", start) + // console.log("end", end) + this.a = new Date(start) + this.b = new Date(end) + this.a = this.$moment.unix(this.a) + this.b = this.$moment.unix(this.b) + this.diff = this.$moment.duration(this.a.diff(this.b)) + this.duration = this.diff._data }, }, } diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 3c8098346..1781ea1cd 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -18,9 +18,25 @@ "de": "Deutsch", "en": "English" }, - "decay": "Vergänglichkeit", - "resieve": "", - + "decay": { + "decay": "Vergänglichkeit", + "decay_since_last_transaction":"Vergänglichkeit seit der letzten Transaktion", + "calculation_decay":"Berechnung der Vergänglichkeit", + "Starting_block_decay":"Startblock Vergänglichkeit", + "decay_introduced":"Die Vergänglichkeit wurde Eingeführt am", + "last_transaction":"Letzte Transaktion", + "past_time":"Vergangene Zeit", + "since_introduction":"seit Einführung der Vergänglichkeit", + "year":"Jahre", + "months":"Monate", + "days":"Tage", + "hours":"Stunden", + "minutes":"Minuten", + "seconds":"Sekunden", + "received":"empfangen", + "sent":"gesendet", + "created":"geschöpft" + }, "form": { "cancel": "Abbrechen", "reset": "Zurücksetzen", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 987605bd8..29a9b49c1 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -18,7 +18,25 @@ "de": "Deutsch", "en": "English" }, - "decay": "Decay", + "decay": { + "decay": "Decay", + "decay_since_last_transaction":"Decay since the last transaction", + "calculation_decay": "Calculation of Decay", + "Starting_block_decay": "Starting Block Decay", + "decay_introduced": "Decay was Introduced on", + "last_transaction": "Last transaction:", + "past_time": "Past time", + "since_introduction": "Since the introduction of Decay", + "year": "Years", + "months": "Months", + "days": "Days", + "hours": "Hours", + "minutes": "Minutes", + "seconds": "Seconds", + "received":"received", + "sent":"sent", + "created":"created" + }, "form": { "cancel":"Cancel", "reset": "Reset", diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 100385d9b..8524a87bb 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -6,11 +6,13 @@ v-bind:key="item.transaction_id" :style="item.type === 'decay' ? 'background-color:#f1e0ae3d' : ''" > +
+
- +
{{ getProperties(item).operator }} {{ $n(item.balance, 'decimal') }} @@ -22,43 +24,75 @@
- +
{{ item.name ? item.name : '' }} - Vergänglichkeit seit der letzten Transaktion + {{ $t('decay.decay_since_last_transaction') }}
{{ $d($moment(item.date), 'long') }}
- +
i
- + + + + +
+
+ {{ item.type === 'receive' ? 'von:' : 'an:' }} +
+
+ {{ item.name }} + +
+
+
+
+ {{ item.type === 'receive' ? 'Nachricht:' : 'Nachricht:' }} +
+
+ {{ item.memo }} +
+
+
+
+ + +
+
Schöpfung
+
Aus der Community
+
+
+
+ +
+
t.transaction_id === id) }, - updateTransactions() { this.$emit('update-transactions', { firstPage: this.currentPage, @@ -224,4 +260,4 @@ export default { padding-left: 0px; padding-right: 0px; } - \ No newline at end of file + From 9f3c1ea11e1ffd3a819af0d20cb8a1df710ce4b3 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 8 Jul 2021 15:58:52 +0200 Subject: [PATCH 17/20] fix style decay startblock delete old code --- .../AccountOverview/GddTransactionList.vue | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 8524a87bb..002607041 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -76,85 +76,6 @@ -
From 956686b7aa4a1f9fa952284a82ed1a921ba2d243 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 8 Jul 2021 16:22:04 +0200 Subject: [PATCH 18/20] fix delete old code --- frontend/src/components/DecayInformation.vue | 35 -------------------- 1 file changed, 35 deletions(-) diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index c18bfdb3c..760d3939d 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -53,39 +53,6 @@ - -
- - {{ $t('decay.calculation_decay') }} -
-
-
-
{{ $t('decay.Starting_block_decay') }} :
-
- {{ $t('decay.decay_introduced') }} : {{ $d($moment.unix(decay.decay_start), 'long') }} -
-
-
-
{{ $t('decay.last_transaction') }}:
- {{ $d($moment.unix(decay.decay_start), 'long') }} Uhr -
-
- {{ $t('decay.past_time') }} - {{ $t('decay.since_introduction') }} - : - {{ getDuration(decay.decay_end, decay.decay_start) }} - - {{ duration.years }} {{ $t('decay.year') }}, - {{ duration.months }} {{ $t('decay.months') }}, - {{ duration.days }} {{ $t('decay.days') }}, - {{ duration.hours }} {{ $t('decay.hours') }}, - {{ duration.minutes }} {{ $t('decay.minutes') }}, - {{ duration.seconds }} {{ $t('decay.seconds') }} - -
- {{ $t('decay.decay') }}: - {{ decay ? decay.balance + ' GDD' : '' }} -