fix undiefined incons, though I do not know why it happened

This commit is contained in:
Moriz Wahl 2021-08-12 15:08:28 +02:00
parent f174f93879
commit 87c54592d3

View File

@ -5,25 +5,15 @@
{{ $t('gdt.no-transactions') }} {{ $t('gdt.no-transactions') }}
</div> </div>
<div <div
v-for="{ v-else
id, v-for="{ id, amount, date, comment, gdt_entry_type_id, factor, gdt } in transactionsGdt"
amount,
date,
/*email,*/
comment,
/*coupon_code,*/
gdt_entry_type_id,
factor,
/*amount2,*/
/*factor2,*/
gdt,
} in transactionsGdt"
:key="id" :key="id"
> >
<div class="list-group-item gdt-transaction-list-item" v-b-toggle="'a' + date + ''"> <div class="list-group-item gdt-transaction-list-item" v-b-toggle="'a' + date + ''">
<!-- Icon --> <!-- Icon -->
<div class="text-right" style="position: absolute"> <div class="text-right" style="position: absolute">
<b-icon <b-icon
v-if="gdt_entry_type_id"
:icon="getIcon(gdt_entry_type_id).icon" :icon="getIcon(gdt_entry_type_id).icon"
:class="getIcon(gdt_entry_type_id).class" :class="getIcon(gdt_entry_type_id).class"
></b-icon> ></b-icon>
@ -131,10 +121,16 @@
<!-- 1, 2, 3, 5, 6 spenden in euro --> <!-- 1, 2, 3, 5, 6 spenden in euro -->
<b-row class="gdt-list-clooaps-box--all" v-else> <b-row class="gdt-list-clooaps-box--all" v-else>
<div class="col-6 text-right clooaps-col-left">{{ $t('gdt.formula') }}:</div> <div class="col-6 text-right clooaps-col-left">
<div>{{ $t('gdt.factor') }}</div>
<div>{{ $t('gdt.formula') }}:</div>
</div>
<div class="col-6 clooaps-col-right"> <div class="col-6 clooaps-col-right">
<div>{{ factor }}</div>
<div>
{{ $n(amount, 'decimal') }} * {{ factor }} = {{ $n(gdt, 'decimal') }} GDT {{ $n(amount, 'decimal') }} * {{ factor }} = {{ $n(gdt, 'decimal') }} GDT
</div> </div>
</div>
</b-row> </b-row>
</div> </div>
</b-collapse> </b-collapse>
@ -203,13 +199,12 @@ export default {
}, },
getIcon(givenType) { getIcon(givenType) {
const type = iconsByType[givenType] const type = iconsByType[givenType]
if (type) if (type)
return { return {
icon: type.icon, icon: type.icon,
class: type.classes + ' m-mb-1 font2em', class: type.classes + ' m-mb-1 font2em',
} }
this.throwError('no icon to given type') this.throwError('no icon to given type: ' + givenType)
}, },
throwError(msg) { throwError(msg) {
throw new Error(msg) throw new Error(msg)