mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
get balance of previous transaction to avoid decay calculation
This commit is contained in:
parent
9ce0229345
commit
dc09a0ccf6
@ -13,7 +13,7 @@
|
||||
</b-col>
|
||||
<b-col cols="6">
|
||||
<div>
|
||||
{{ (Number(balance) - Number(decay)) | GDD }}
|
||||
{{ previousBookedBalance | GDD }}
|
||||
{{ decay | GDD }} {{ $t('math.equal') }}
|
||||
<b>{{ balance | GDD }}</b>
|
||||
</div>
|
||||
@ -33,6 +33,10 @@ export default {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -15,7 +15,11 @@
|
||||
<div v-for="({ id, typeId }, index) in transactions" :key="id">
|
||||
<transaction-list-item :typeId="typeId" class="pointer">
|
||||
<template #DECAY>
|
||||
<transaction-decay class="list-group-item" v-bind="transactions[index]" />
|
||||
<transaction-decay
|
||||
class="list-group-item"
|
||||
v-bind="transactions[index]"
|
||||
:previousBookedBalance="previousBookedBalance(index)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #SEND>
|
||||
@ -110,6 +114,10 @@ export default {
|
||||
})
|
||||
window.scrollTo(0, 0)
|
||||
},
|
||||
previousBookedBalance(idx) {
|
||||
if (this.transactions[idx + 1]) return this.transactions[idx + 1].balance
|
||||
return 0
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentPage() {
|
||||
|
||||
@ -21,7 +21,11 @@
|
||||
</div>
|
||||
|
||||
<b-collapse class="pb-4 pt-5" v-model="visible">
|
||||
<decay-information-decay :balance="balance" :decay="decay.decay" />
|
||||
<decay-information-decay
|
||||
:balance="balance"
|
||||
:decay="decay.decay"
|
||||
:previousBookedBalance="previousBookedBalance"
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
</div>
|
||||
@ -53,6 +57,10 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
previousBookedBalance: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user