mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix vue errors
This commit is contained in:
parent
956686b7aa
commit
e70acd13d7
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="decay">
|
||||
<div>
|
||||
<span v-if="decaytyp === 'short'">
|
||||
<small>{{ decay ? ' ' + decay.balance + ' ' + decay_start_block_text_short : '' }}</small>
|
||||
<small>{{ decay ? ' ' + decay.balance + ' ' + decayStartBlockTextShort : '' }}</small>
|
||||
</span>
|
||||
|
||||
<div v-if="decaytyp === 'new'">
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
decay_end: 0,
|
||||
decay_start_block: 0,
|
||||
},
|
||||
decaytyp: '',
|
||||
decaytyp: { type: String, default: '' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -74,11 +74,15 @@ export default {
|
||||
b: 0,
|
||||
duration: {},
|
||||
diff: {},
|
||||
decay_start_block_text_short: this.decay.decay_start_block
|
||||
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
||||
: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
decayStartBlockTextShort() {
|
||||
return this.decay.decay_start_block
|
||||
? ' - Startblock Decay am: ' + this.$d(this.$moment.unix(this.decay.decay_start_block))
|
||||
: ''
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getDuration(start, end) {
|
||||
this.a = new Date(start)
|
||||
|
||||
@ -2,42 +2,39 @@
|
||||
<div class="gdd-transaction-list">
|
||||
<b-list-group>
|
||||
<b-list-group-item
|
||||
v-for="item in transactions"
|
||||
v-bind:key="item.transaction_id"
|
||||
:style="item.type === 'decay' ? 'background-color:#f1e0ae3d' : ''"
|
||||
v-for="{ decay, transaction_id, type, date, balance, name, memo } in transactions"
|
||||
:key="transaction_id"
|
||||
:style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''"
|
||||
>
|
||||
<!-- ROW Start -->
|
||||
<div class="d-flex gdd-transaction-list-item" v-b-toggle="'a' + item.date + ''">
|
||||
<div class="d-flex gdd-transaction-list-item" v-b-toggle="'a' + date + ''">
|
||||
<!-- ICON -->
|
||||
<div style="width: 8%">
|
||||
<b-icon :icon="getProperties(item).icon" :class="getProperties(item).class" />
|
||||
<b-icon :icon="getProperties(type).icon" :class="getProperties(type).class" />
|
||||
</div>
|
||||
<!-- Text Links -->
|
||||
<div class="font1_2em pr-2 text-right" style="width: 32%">
|
||||
<span>{{ getProperties(item).operator }}</span>
|
||||
<small v-if="item.type === 'decay'">{{ $n(item.balance, 'decimal') }}</small>
|
||||
<span>{{ getProperties(type).operator }}</span>
|
||||
<small v-if="type === 'decay'">{{ $n(balance, 'decimal') }}</small>
|
||||
|
||||
<span v-else>{{ $n(item.balance, 'decimal') }}</span>
|
||||
<span v-else>{{ $n(balance, 'decimal') }}</span>
|
||||
|
||||
<div v-if="getTransaction(item.transaction_id).decay">
|
||||
<div v-if="decay">
|
||||
<br />
|
||||
<b-icon v-if="item.type != 'decay'" icon="droplet-half" height="15" class="mb-3" />
|
||||
<b-icon v-if="type != 'decay'" icon="droplet-half" height="15" class="mb-3" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Text Rechts -->
|
||||
<div class="font1_2em text-left pl-2" style="width: 55%">
|
||||
{{ item.name ? item.name : '' }}
|
||||
<span v-if="item.type === 'decay'">
|
||||
{{ name ? name : '' }}
|
||||
<span v-if="type === 'decay'">
|
||||
<small>{{ $t('decay.decay_since_last_transaction') }}</small>
|
||||
</span>
|
||||
<div v-if="item.date" class="text-sm">{{ $d($moment(item.date), 'long') }}</div>
|
||||
<decay-information
|
||||
decaytyp="short"
|
||||
:decay="getTransaction(item.transaction_id).decay"
|
||||
/>
|
||||
<div v-if="date" class="text-sm">{{ $d($moment(date), 'long') }}</div>
|
||||
<decay-information v-if="decay" decaytyp="short" :decay="decay" />
|
||||
</div>
|
||||
<!-- Collaps Toggle Button -->
|
||||
<div v-if="item.type != 'decay'" class="text-right" style="width: 5%">
|
||||
<div v-if="type != 'decay'" class="text-right" style="width: 5%">
|
||||
<b-button class="btn-sm">
|
||||
<b>i</b>
|
||||
</b-button>
|
||||
@ -45,29 +42,29 @@
|
||||
</div>
|
||||
<!-- ROW End -->
|
||||
<!-- Collaps Start -->
|
||||
<b-collapse v-if="item.type != 'decay'" :id="'a' + item.date + ''">
|
||||
<b-list-group v-if="item.type === 'receive' || item.type === 'send'">
|
||||
<b-collapse v-if="type != 'decay'" :id="'a' + date + ''">
|
||||
<b-list-group v-if="type === 'receive' || type === 'send'">
|
||||
<b-list-group-item style="border: 0px; background-color: #f1f1f1">
|
||||
<div class="d-flex">
|
||||
<div style="width: 40%" class="text-right pr-3 mr-2">
|
||||
{{ item.type === 'receive' ? 'von:' : 'an:' }}
|
||||
{{ type === 'receive' ? 'von:' : 'an:' }}
|
||||
</div>
|
||||
<div style="width: 60%">
|
||||
{{ item.name }}
|
||||
{{ name }}
|
||||
<b-avatar class="mr-3"></b-avatar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div style="width: 40%" class="text-right pr-3 mr-2">
|
||||
{{ item.type === 'receive' ? 'Nachricht:' : 'Nachricht:' }}
|
||||
{{ type === 'receive' ? 'Nachricht:' : 'Nachricht:' }}
|
||||
</div>
|
||||
<div style="width: 60%">
|
||||
{{ item.memo }}
|
||||
{{ memo }}
|
||||
</div>
|
||||
</div>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
<b-list-group v-if="item.type === 'creation'">
|
||||
<b-list-group v-if="type === 'creation'">
|
||||
<b-list-group-item style="border: 0px">
|
||||
<div class="d-flex">
|
||||
<div style="width: 40%" class="text-right pr-3 mr-2">Schöpfung</div>
|
||||
@ -75,7 +72,7 @@
|
||||
</div>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
<decay-information decaytyp="new" :decay="getTransaction(item.transaction_id).decay" />
|
||||
<decay-information v-if="decay" decaytyp="new" :decay="decay" />
|
||||
</b-collapse>
|
||||
<!-- Collaps End -->
|
||||
</b-list-group-item>
|
||||
@ -143,17 +140,14 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getTransaction(id) {
|
||||
return this.transactions.find((t) => t.transaction_id === id)
|
||||
},
|
||||
updateTransactions() {
|
||||
this.$emit('update-transactions', {
|
||||
firstPage: this.currentPage,
|
||||
items: this.pageSize,
|
||||
})
|
||||
},
|
||||
getProperties(item) {
|
||||
const type = iconsByType[item.type]
|
||||
getProperties(givenType) {
|
||||
const type = iconsByType[givenType]
|
||||
if (type)
|
||||
return {
|
||||
icon: type.icon,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user