mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Revert "have some things working in frontend"
This reverts commit 65861fded884e458b70851b7bc9a3db46eb28b71.
This commit is contained in:
parent
07c0c947ad
commit
b415e14d3f
@ -22,8 +22,8 @@
|
||||
<div>{{ $t('decay.decay_introduced') }} :</div>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="decay.start">
|
||||
{{ $d(new Date(decay.start), 'long') }}
|
||||
<span v-if="decay.decayStart">
|
||||
{{ $d(new Date(decay.decayStart * 1000), 'long') }}
|
||||
{{ $i18n.locale === 'de' ? 'Uhr' : '' }}
|
||||
</span>
|
||||
</div>
|
||||
@ -109,18 +109,20 @@
|
||||
export default {
|
||||
name: 'DecayInformation',
|
||||
props: {
|
||||
balance: { type: Number },
|
||||
type: { type: String, default: '' },
|
||||
decay: {
|
||||
balance: '',
|
||||
duration: '',
|
||||
start: 0,
|
||||
end: 0,
|
||||
decayDuration: '',
|
||||
decayStart: 0,
|
||||
decayEnd: 0,
|
||||
decayStartBlock: 0,
|
||||
},
|
||||
decaytyp: { type: String, default: '' },
|
||||
},
|
||||
computed: {
|
||||
duration() {
|
||||
return this.$moment.duration(new Date(this.decay.end) - new Date(this.decay.start))._data
|
||||
return this.$moment.duration((this.decay.decayEnd - this.decay.decayStart) * 1000)._data
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -92,10 +92,9 @@ export default {
|
||||
const {
|
||||
data: { transactionList },
|
||||
} = result
|
||||
this.GdtBalance =
|
||||
transactionList.balanceGDT === null ? null : Number(transactionList.balanceGDT)
|
||||
this.GdtBalance = transactionList.gdtSum === null ? null : Number(transactionList.gdtSum)
|
||||
this.transactions = transactionList.transactions
|
||||
this.balance = Number(transactionList.balance)
|
||||
this.balance = Number(transactionList.decay)
|
||||
this.bookedBalance = Number(transactionList.balance)
|
||||
this.transactionCount = transactionList.count
|
||||
this.pending = false
|
||||
|
||||
@ -12,22 +12,17 @@
|
||||
<small>{{ $t('error.empty-transactionlist') }}</small>
|
||||
</div>
|
||||
<div
|
||||
v-for="{
|
||||
decay,
|
||||
id,
|
||||
typeId,
|
||||
balanceDate,
|
||||
amount,
|
||||
linkedUser,
|
||||
memo,
|
||||
} in transactions"
|
||||
:key="id"
|
||||
:style="typeId === 'DECAY' ? 'background-color:#f1e0ae3d' : ''"
|
||||
v-for="{ decay, transactionId, type, date, balance, name, memo } in transactions"
|
||||
:key="transactionId"
|
||||
:style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''"
|
||||
>
|
||||
<div class="list-group-item gdd-transaction-list-item" v-b-toggle="'decay-' + id">
|
||||
<div
|
||||
class="list-group-item gdd-transaction-list-item"
|
||||
v-b-toggle="'decay-' + transactionId"
|
||||
>
|
||||
<!-- Collaps Button -->
|
||||
<div
|
||||
v-if="typeId != 'DECAY' && decay"
|
||||
v-if="type != 'decay' && decay"
|
||||
class="text-right"
|
||||
style="width: 95%; position: absolute"
|
||||
>
|
||||
@ -41,7 +36,7 @@
|
||||
<!-- ICON -->
|
||||
<b-col cols="1">
|
||||
<div class="gdd-transaction-list-item-icon">
|
||||
<b-icon :icon="getProperties(typeId).icon" :class="getProperties(typeId).class" />
|
||||
<b-icon :icon="getProperties(type).icon" :class="getProperties(type).class" />
|
||||
</div>
|
||||
</b-col>
|
||||
|
||||
@ -51,22 +46,22 @@
|
||||
<b-col cols="5">
|
||||
<div class="text-right">
|
||||
<span class="gdd-transaction-list-item-operator">
|
||||
{{ getProperties(typeId).operator }}
|
||||
{{ getProperties(type).operator }}
|
||||
</span>
|
||||
<span class="gdd-transaction-list-item-amount">
|
||||
{{ $n(Math.abs(Number(amount)), 'decimal') }}
|
||||
{{ $n(balance, 'decimal') }}
|
||||
</span>
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
<div class="gdd-transaction-list-item-name">
|
||||
{{ typeId !== 'DECAY' ? `${linkedUser.firstName} ${linkedUser.lastName}` : $t('decay.decay_since_last_transaction') }}
|
||||
{{ type !== 'decay' ? name : $t('decay.decay_since_last_transaction') }}
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
<!-- Nachricht -->
|
||||
<b-row v-if="typeId !== 'DECAY'">
|
||||
<b-row v-if="type !== 'decay'">
|
||||
<b-col cols="5">
|
||||
<div class="text-right">{{ $t('form.memo') }}</div>
|
||||
</b-col>
|
||||
@ -76,13 +71,13 @@
|
||||
</b-row>
|
||||
|
||||
<!-- Datum -->
|
||||
<b-row v-if="typeId !== 'DECAY'">
|
||||
<b-row v-if="type !== 'decay'">
|
||||
<b-col cols="5">
|
||||
<div class="text-right">{{ $t('form.date') }}</div>
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
<div class="gdd-transaction-list-item-date">
|
||||
{{ $d(new Date(balanceDate), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}
|
||||
{{ $d(new Date(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
@ -91,7 +86,7 @@
|
||||
<b-row v-if="decay && !decay.decayStartBlock">
|
||||
<b-col cols="5">
|
||||
<div class="text-right">
|
||||
<b-icon v-if="typeId != 'DECAY'" icon="droplet-half" height="15" class="mb-1" />
|
||||
<b-icon v-if="type != 'decay'" icon="droplet-half" height="15" class="mb-1" />
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
@ -103,7 +98,7 @@
|
||||
<b-row v-if="decay && decay.decayStartBlock">
|
||||
<b-col cols="5">
|
||||
<div class="text-right">
|
||||
<b-icon v-if="typeId != 'DECAY'" icon="droplet-half" height="15" class="mb-1" />
|
||||
<b-icon v-if="type != 'decay'" icon="droplet-half" height="15" class="mb-1" />
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col cols="7">
|
||||
@ -118,13 +113,14 @@
|
||||
|
||||
<!-- Collaps Start -->
|
||||
|
||||
<b-collapse v-if="typeId != 'DECAY' && decay" class="pb-4" :id="'decay-' + id">
|
||||
<b-collapse v-if="type != 'decay' && decay" class="pb-4" :id="'decay-' + transactionId">
|
||||
<div style="border: 0px; background-color: #f1f1f1" class="p-2 pb-4 mb-4">
|
||||
<decay-information
|
||||
v-if="decay"
|
||||
decaytyp="new"
|
||||
:balance="balance"
|
||||
:decay="decay"
|
||||
:type="typeId"
|
||||
:type="type"
|
||||
/>
|
||||
</div>
|
||||
</b-collapse>
|
||||
@ -150,10 +146,10 @@ import PaginationButtons from '../../../components/PaginationButtons'
|
||||
import DecayInformation from '../../../components/DecayInformation'
|
||||
|
||||
const iconsByType = {
|
||||
SEND: { icon: 'arrow-left-circle', classes: 'text-danger', operator: '−' },
|
||||
RECEIVE: { icon: 'arrow-right-circle', classes: 'gradido-global-color-accent', operator: '+' },
|
||||
CREATION: { icon: 'gift', classes: 'gradido-global-color-accent', operator: '+' },
|
||||
DECAY: { icon: 'droplet-half', classes: 'gradido-global-color-gray', operator: '−' },
|
||||
send: { icon: 'arrow-left-circle', classes: 'text-danger', operator: '−' },
|
||||
receive: { icon: 'arrow-right-circle', classes: 'gradido-global-color-accent', operator: '+' },
|
||||
creation: { icon: 'gift', classes: 'gradido-global-color-accent', operator: '+' },
|
||||
decay: { icon: 'droplet-half', classes: 'gradido-global-color-gray', operator: '−' },
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user