mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
response problem render error from arrays
This commit is contained in:
parent
4a3113a10d
commit
0e3bb34a4a
@ -2,7 +2,7 @@
|
||||
<div class="gdd-transaction-list">
|
||||
<b-list-group>
|
||||
<b-list-group-item
|
||||
v-for="item in transactions"
|
||||
v-for="(item) in transactions"
|
||||
v-bind:key="item.id"
|
||||
style="background-color: #ebebeba3 !important"
|
||||
>
|
||||
@ -17,6 +17,9 @@
|
||||
<div class="font1_2em text-left pl-2" style="width: 55%">
|
||||
{{ item.name ? item.name : $t('decay') }}
|
||||
<div v-if="item.date" class="text-sm">{{ $d($moment(item.date), 'long') }}</div>
|
||||
<!-- <p>{{ item.decay }}</p> -->
|
||||
<p>{{ getDuration(item.id)}} GDD</p>
|
||||
<p>{{ getDuration(item.decay)}} GDD</p>
|
||||
</div>
|
||||
<div class="text-right" style="width: 5%">
|
||||
<b-button class="btn-sm">
|
||||
@ -41,8 +44,8 @@
|
||||
|
||||
<div>Seit deiner letzten Transaction sind </div>
|
||||
|
||||
<p> item.id: {{ item.decay }}</p>
|
||||
<p> decay_start: {{ getDuration(item.id) }}</p>
|
||||
|
||||
|
||||
|
||||
<!--<p> {{ $moment.unix(getDecay(item.decay)).format('D.MM.YYYY - HH:mm:ss') }}</p>
|
||||
<p> {{ $moment.unix(getDecay(item.decay)).format('D.MM.YYYY - HH:mm:ss') }}</p> -->
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user