gradido/frontend/src/components/Transactions/TransactionCreation.vue
2022-12-22 11:31:39 +01:00

88 lines
2.3 KiB
Vue

<template>
<div class="transaction-slot-creation">
<b-row @click="visible = !visible" class="align-items-center">
<b-col cols="2">
<b-avatar icon="gift" variant="success" size="42"></b-avatar>
</b-col>
<b-col>
<div class="font-weight-bold">{{ linkedUser.firstName }} {{ linkedUser.lastName }}</div>
<span class="small">{{ this.$d(new Date(balanceDate), 'short') }}</span>
<span class="ml-4 small">{{ this.$d(new Date(balanceDate), 'time') }}</span>
</b-col>
<b-col cols="3">
<div class="small">{{ $t('decay.types.receive') }}</div>
<div class="font-weight-bold">{{ amount | GDD }}</div>
</b-col>
<b-col cols="1"><collapse-icon class="text-right" :visible="visible" /></b-col>
</b-row>
<b-collapse class="pb-4 pt-5" v-model="visible">
<div class="word-break mb-4 text-center">
<div class="font-weight-bold pb-2">{{ $t('form.memo') }}</div>
{{ memo }}
</div>
<decay-information :typeId="typeId" :decay="decay" :amount="amount" />
</b-collapse>
</div>
</template>
<script>
import CollapseIcon from '../TransactionRows/CollapseIcon'
// import TypeIcon from '../TransactionRows/TypeIcon'
// import AmountAndNameRow from '../TransactionRows/AmountAndNameRow'
// import MemoRow from '../TransactionRows/MemoRow'
// import DateRow from '../TransactionRows/DateRow'
// import DecayRow from '../TransactionRows/DecayRow'
import DecayInformation from '../DecayInformations/DecayInformation'
export default {
name: 'TransactionCreation',
components: {
CollapseIcon,
// TypeIcon,
// AmountAndNameRow,
// MemoRow,
// DateRow,
// DecayRow,
DecayInformation,
},
props: {
amount: {
type: String,
required: true,
},
balanceDate: {
type: String,
required: true,
},
decay: {
type: Object,
required: true,
},
linkedUser: {
type: Object,
required: true,
},
memo: {
type: String,
required: true,
},
typeId: {
type: String,
required: true,
},
linkId: {
type: Number,
required: false,
},
previousBookedBalance: {
type: String,
required: true,
},
},
data() {
return {
visible: false,
}
},
}
</script>