mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fixed error when gdtEntryType is empty
This commit is contained in:
parent
9503c2a49a
commit
8225d7975a
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="list-group">
|
||||
<div class="list-group-item gdt-transaction-list-item" v-b-toggle="'a' + date + ''">
|
||||
<!-- Icon -->
|
||||
<div class="text-right" style="position: absolute">
|
||||
<b-icon
|
||||
v-if="gdtEntryType"
|
||||
:icon="getLinesByType(gdtEntryType).icon"
|
||||
:class="getLinesByType(gdtEntryType).iconclasses"
|
||||
></b-icon>
|
||||
@ -80,20 +80,18 @@ export default {
|
||||
TransactionCollaps,
|
||||
},
|
||||
props: {
|
||||
amount: { type: Number, default: 0 },
|
||||
amount: { type: Number },
|
||||
date: {
|
||||
type: Date,
|
||||
default: function () {
|
||||
return new Date()
|
||||
type: Date
|
||||
},
|
||||
},
|
||||
comment: { type: String, default: '' },
|
||||
gdtEntryType: { type: Number, default: 0 },
|
||||
factor: { type: Number, default: 0 },
|
||||
gdt: { type: Number, default: 0 },
|
||||
comment: { type: String },
|
||||
gdtEntryType: { type: Number, default: 1},
|
||||
factor: { type: Number},
|
||||
gdt: { type: Number},
|
||||
},
|
||||
methods: {
|
||||
getLinesByType(givenType) {
|
||||
|
||||
const linesByType = {
|
||||
1: {
|
||||
icon: 'heart',
|
||||
@ -118,6 +116,7 @@ export default {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
const type = linesByType[givenType]
|
||||
|
||||
if (type)
|
||||
@ -128,6 +127,7 @@ export default {
|
||||
descriptiontext: type.descriptiontext,
|
||||
credittext: type.credittext,
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
export default {
|
||||
name: 'TransactionCollaps',
|
||||
props: {
|
||||
amount: { type: Number, default: 0 },
|
||||
gdtEntryType: { type: Number, default: 0 },
|
||||
factor: { type: Number, default: 0 },
|
||||
gdt: { type: Number, default: 0 },
|
||||
amount: { type: Number },
|
||||
gdtEntryType: { type: Number },
|
||||
factor: { type: Number },
|
||||
gdt: { type: Number },
|
||||
},
|
||||
methods: {
|
||||
getLinesByType(givenType) {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
} in transactionsGdt"
|
||||
:key="transactionId"
|
||||
>
|
||||
|
||||
<transaction
|
||||
:amount="amount"
|
||||
:date="date"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user