change decay Object to String

This commit is contained in:
ogerly 2022-03-17 16:44:06 +01:00
parent 36ea3bf170
commit 06705366ad
9 changed files with 16 additions and 14 deletions

View File

@ -13,8 +13,8 @@
</b-col>
<b-col cols="6">
<div>
{{ (Number(balance) - Number(decay.decay)) | GDD }}
{{ decay.decay | GDD }} {{ $t('math.equal') }}
{{ (Number(balance) - Number(decay)) | GDD }}
{{ decay | GDD }} {{ $t('math.equal') }}
<b>{{ balance | GDD }}</b>
</div>
</b-col>
@ -27,9 +27,11 @@ export default {
props: {
balance: {
type: String,
required: true,
},
decay: {
type: Object,
type: String,
required: true,
},
},
}

View File

@ -1,6 +1,6 @@
<template>
<div class="decayinformation-short">
<span v-if="decay.decay">{{ decay.decay | GDD }}</span>
<span v-if="decay">{{ decay | GDD }}</span>
</div>
</template>
<script>
@ -8,7 +8,7 @@ export default {
name: 'DecayInformation-Short',
props: {
decay: {
type: Object,
type: String,
required: true,
},
},

View File

@ -8,7 +8,7 @@
<amount-and-name-row :amount="amount" :text="$t('form.amount')" />
<memo-row :memo="memo" />
<date-row :date="validUntil" :diffNow="true" />
<decay-row :decay="decayObject" />
<decay-row :decay="decay" />
</b-col>
<b-col cols="1" class="text-right">
@ -93,8 +93,8 @@ export default {
},
},
computed: {
decayObject() {
return { decay: this.amount - this.holdAvailableAmount }
decay() {
return `${this.amount - this.holdAvailableAmount}`
},
},
}

View File

@ -23,7 +23,7 @@ export default {
},
props: {
decay: {
type: Object,
type: String,
required: false,
},
},

View File

@ -21,7 +21,7 @@
<date-row :date="balanceDate" />
<!-- Decay -->
<decay-row :decay="decay" />
<decay-row :decay="decay.decay" />
</b-col>
</b-row>
</div>

View File

@ -21,7 +21,7 @@
</div>
<b-collapse class="pb-4 pt-5" v-model="visible">
<decay-information-decay :balance="balance" :decay="decay" />
<decay-information-decay :balance="balance" :decay="decay.decay" />
</b-collapse>
</div>
</div>

View File

@ -19,7 +19,7 @@
<link-count-row :count="transactionLinkCount" />
<!-- Decay -->
<decay-row :decay="decay" />
<decay-row :decay="decay.decay" />
</b-col>
</b-row>
</div>

View File

@ -22,7 +22,7 @@
<date-row :date="balanceDate" />
<!-- Decay -->
<decay-row :decay="decay" />
<decay-row :decay="decay.decay" />
</b-col>
</b-row>
</div>

View File

@ -22,7 +22,7 @@
<date-row :date="balanceDate" />
<!-- Decay -->
<decay-row :decay="decay" />
<decay-row :decay="decay.decay" />
</b-col>
</b-row>
</div>