mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #622 from gradido/fix-infinite-loop
fix: Fix Infinite Loop in Transaction List
This commit is contained in:
commit
9ddc23122e
@ -39,8 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="width: 60%">
|
<div style="width: 60%">
|
||||||
<div v-if="decay.decay_start_block > 0">{{ $t('decay.since_introduction') }}</div>
|
<div v-if="decay.decay_start_block > 0">{{ $t('decay.since_introduction') }}</div>
|
||||||
<i>{{ getDuration(decay.decay_end, decay.decay_start) }}</i>
|
<span v-if="duration">
|
||||||
<span v-if="this.duration != {}">
|
|
||||||
<b v-if="duration.years > 0">{{ duration.years }} {{ $t('decay.year') }},</b>
|
<b v-if="duration.years > 0">{{ duration.years }} {{ $t('decay.year') }},</b>
|
||||||
<b v-if="duration.months > 0">{{ duration.months }} {{ $t('decay.months') }},</b>
|
<b v-if="duration.months > 0">{{ duration.months }} {{ $t('decay.months') }},</b>
|
||||||
<b v-if="duration.days > 0">{{ duration.days }} {{ $t('decay.days') }},</b>
|
<b v-if="duration.days > 0">{{ duration.days }} {{ $t('decay.days') }},</b>
|
||||||
@ -68,29 +67,18 @@ export default {
|
|||||||
},
|
},
|
||||||
decaytyp: { type: String, default: '' },
|
decaytyp: { type: String, default: '' },
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
a: 0,
|
|
||||||
b: 0,
|
|
||||||
duration: {},
|
|
||||||
diff: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
decayStartBlockTextShort() {
|
decayStartBlockTextShort() {
|
||||||
return this.decay.decay_start_block
|
return this.decay.decay_start_block
|
||||||
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
||||||
: ''
|
: ''
|
||||||
},
|
},
|
||||||
},
|
duration() {
|
||||||
methods: {
|
return this.$moment.duration(
|
||||||
getDuration(start, end) {
|
this.$moment
|
||||||
this.a = new Date(start)
|
.unix(new Date(this.decay.decay_end))
|
||||||
this.b = new Date(end)
|
.diff(this.$moment.unix(new Date(this.decay.decay_start))),
|
||||||
this.a = this.$moment.unix(this.a)
|
)._data
|
||||||
this.b = this.$moment.unix(this.b)
|
|
||||||
this.diff = this.$moment.duration(this.a.diff(this.b))
|
|
||||||
this.duration = this.diff._data
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user