translation decay, yarn lint fix, yarn test

This commit is contained in:
ogerly 2021-05-20 15:06:22 +02:00
parent 34e573a1e0
commit 4c6414fd81

View File

@ -6,24 +6,24 @@
:key="item.id"
style="background-color: #ebebeba3 !important"
>
<div class="d-flex" v-b-toggle="'a' + item.date + ''" >
<div class="d-flex" v-b-toggle="'a' + item.date + ''">
<div style="width: 10%">
<b-icon :icon="getIcon(item)" :class="getClass(item)" />
</div>
<div class="font1_2em pr-2 text-right" style="width: 20%">
<span>{{getOperator(item)}}</span>
<span>{{ getOperator(item) }}</span>
{{ $n(item.balance) }}
</div>
<div class="font1_2em text-left pl-2" style="width: 65%">
{{ item.name }} <small>{{ item.name ? '' : $t('decay') }}</small>
{{ item.name }}
<small>{{ item.name ? '' : $t('decay') }}</small>
<div class="text-sm">{{ $moment(item.date).format('DD.MM.YYYY - HH:mm:ss') }}</div>
</div>
<div class="font1_2em text-right" style="width: 5%">
<div class="font1_2em text-right" style="width: 5%">
<b-button class="btn-sm">
<b>i</b>
</b-button>
</div>
</div>
<b-collapse :id="'a' + item.date + ''" class="mt-2">
<b-card>
@ -76,7 +76,7 @@
<script>
const iconsByType = {
send: { icon: 'arrow-left-circle', classes: 'text-danger', 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: '-' },
@ -118,7 +118,7 @@ export default {
if (icon) return icon.classes + ' m-mb-1 font2em'
const thing = new Error('no item to given type')
thing()
},
},
getOperator(item) {
const icon = iconsByType[item.type]
if (icon) return icon.operator