mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix: Infinite Loop in Transaction List
This commit is contained in:
parent
91cdd1c31e
commit
019b030465
@ -39,14 +39,20 @@
|
||||
</div>
|
||||
<div style="width: 60%">
|
||||
<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="this.duration != {}">
|
||||
<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.days > 0">{{ duration.days }} {{ $t('decay.days') }},</b>
|
||||
<b v-if="duration.hours > 0">{{ duration.hours }} {{ $t('decay.hours') }},</b>
|
||||
<b v-if="duration.minutes > 0">{{ duration.minutes }} {{ $t('decay.minutes') }},</b>
|
||||
<b v-if="duration.seconds > 0">{{ duration.seconds }} {{ $t('decay.seconds') }}</b>
|
||||
<i>{{ getDuration }}</i>
|
||||
<span v-if="getDuration != {}">
|
||||
<b v-if="getDuration.years > 0">{{ getDuration.years }} {{ $t('decay.year') }},</b>
|
||||
<b v-if="getDuration.months > 0">
|
||||
{{ getDuration.months }} {{ $t('decay.months') }},
|
||||
</b>
|
||||
<b v-if="getDuration.days > 0">{{ getDuration.days }} {{ $t('decay.days') }},</b>
|
||||
<b v-if="getDuration.hours > 0">{{ getDuration.hours }} {{ $t('decay.hours') }},</b>
|
||||
<b v-if="getDuration.minutes > 0">
|
||||
{{ getDuration.minutes }} {{ $t('decay.minutes') }},
|
||||
</b>
|
||||
<b v-if="getDuration.seconds > 0">
|
||||
{{ getDuration.seconds }} {{ $t('decay.seconds') }}
|
||||
</b>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,30 +62,30 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'DecayInformation',
|
||||
props: {
|
||||
decay: {
|
||||
balance: '',
|
||||
decay_duration: '',
|
||||
decay_start: 0,
|
||||
decay_end: 0,
|
||||
decay_start_block: 0,
|
||||
},
|
||||
decaytyp: { type: String, default: '' },
|
||||
},
|
||||
computed: {
|
||||
decayStartBlockTextShort() {
|
||||
return this.decay.decay_start_block
|
||||
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
||||
: ''
|
||||
},
|
||||
getDuration() {
|
||||
const startDate = new Date(this.decay.decay_start)
|
||||
const endDate = new Date(this.decay.decay_end)
|
||||
const diff = this.$moment.duration(startDate.diff(endDate))
|
||||
return diff._data
|
||||
},
|
||||
},
|
||||
}
|
||||
export default {
|
||||
name: 'DecayInformation',
|
||||
props: {
|
||||
decay: {
|
||||
balance: '',
|
||||
decay_duration: '',
|
||||
decay_start: 0,
|
||||
decay_end: 0,
|
||||
decay_start_block: 0,
|
||||
},
|
||||
decaytyp: { type: String, default: '' },
|
||||
},
|
||||
computed: {
|
||||
decayStartBlockTextShort() {
|
||||
return this.decay.decay_start_block
|
||||
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
||||
: ''
|
||||
},
|
||||
getDuration() {
|
||||
const startDate = this.$moment.unix(new Date(this.decay.decay_start))
|
||||
const endDate = this.$moment.unix(new Date(this.decay.decay_end))
|
||||
const diff = this.$moment.duration(startDate.diff(endDate))
|
||||
return diff._data
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user