diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 08a34e96d..5dcc2b12e 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -2,7 +2,7 @@
{{ getDuration(item.id)}} GDD
+{{ getDuration(item.decay)}} GDD
item.id: {{ item.decay }}
-decay_start: {{ getDuration(item.id) }}
+ + @@ -122,54 +125,12 @@ export default { }, }, methods: { - getDuration(id) { - console.log("getDuration=>", id) - //console.log( id) + getDuration(decay) { + console.log(">>>>>>>>>>>>>>>>>>>>getDuration") //console.log("this.transactions.find(t => t.decay === decay)>", this.transactions.find(t => t.id === id)) - this.getDecay(this.transactions.find(t => t.id === id)) - }, - getDecay(id){ - //console.log("getDecay balance=>", id.balance) - //console.log("decay_duration=>", id.decay_duration) - let startDate = new Date(id.decay_start) - startDate = this.$moment(startDate) - let endDate = new Date(id.decay_end) - endDate = this.$moment(endDate) - let diff = this.$moment.duration(endDate.diff(startDate)) - - console.log( "diff", diff ) - console.log("day", this.$moment(endDate).diff(this.$moment(startDate), 'day')) - console.log("hour", this.$moment(endDate).diff(this.$moment(startDate), 'hour')) - console.log("minute", this.$moment(endDate).diff(this.$moment(startDate), 'minute')) - console.log("second", this.$moment(endDate).diff(startDate), 'second') - - // console.log(" decay_start=>", startDate) - // console.log("this.$moment(decay_start)", this.$moment.unix(startDate).format("DD-MM-YYYY HH:mm:ss")) - // console.log("decay_end=>", endDate) - // console.log("this.$moment(decay_start)", this.$moment.unix(endDate).format("DD-MM-YYYY HH:mm:ss")) - // - // console.log("memo=>", id.memo) - // console.log("type=>", id.type) - - - // console.log("this.transactions.find(t => t.decay === decay)>", this.transactions.find(t => t.id === id)) - // if (id) { - // console.log("this.transactions.find(t => t.decay === decay)>", this.transactions.find(t => t.decay === decay)) - // const decay = this.transactions.find(t => t.decay === decay) - // const now = this.decay.decay_start; - // const then = this.decay.decay_end; - // console.log( "decay",this.decay ) - // console.log( "now", this.now) - // console.log( "then", this.then) - // - // // console.log(this.$moment().duration(this.now.diff(this.then))) - // //return this.$moment.duration(now.diff(then)) - // // return this.transactions.find(t => t.decay === decay) - // } else { - // console.log("<<< KEIN DECAY >>>") - // } - + return this.transactions.find(t => t.decay === decay) }, + updateTransactions() { this.$emit('update-transactions', { firstPage: this.currentPage,