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>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<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="gdtEntryType"
|
|
||||||
:icon="getLinesByType(gdtEntryType).icon"
|
:icon="getLinesByType(gdtEntryType).icon"
|
||||||
:class="getLinesByType(gdtEntryType).iconclasses"
|
:class="getLinesByType(gdtEntryType).iconclasses"
|
||||||
></b-icon>
|
></b-icon>
|
||||||
@ -80,20 +80,18 @@ export default {
|
|||||||
TransactionCollaps,
|
TransactionCollaps,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
amount: { type: Number, default: 0 },
|
amount: { type: Number },
|
||||||
date: {
|
date: {
|
||||||
type: Date,
|
type: Date
|
||||||
default: function () {
|
|
||||||
return new Date()
|
|
||||||
},
|
},
|
||||||
},
|
comment: { type: String },
|
||||||
comment: { type: String, default: '' },
|
gdtEntryType: { type: Number, default: 1},
|
||||||
gdtEntryType: { type: Number, default: 0 },
|
factor: { type: Number},
|
||||||
factor: { type: Number, default: 0 },
|
gdt: { type: Number},
|
||||||
gdt: { type: Number, default: 0 },
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLinesByType(givenType) {
|
getLinesByType(givenType) {
|
||||||
|
|
||||||
const linesByType = {
|
const linesByType = {
|
||||||
1: {
|
1: {
|
||||||
icon: 'heart',
|
icon: 'heart',
|
||||||
@ -118,6 +116,7 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const type = linesByType[givenType]
|
const type = linesByType[givenType]
|
||||||
|
|
||||||
if (type)
|
if (type)
|
||||||
@ -128,6 +127,7 @@ export default {
|
|||||||
descriptiontext: type.descriptiontext,
|
descriptiontext: type.descriptiontext,
|
||||||
credittext: type.credittext,
|
credittext: type.credittext,
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,10 +23,10 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'TransactionCollaps',
|
name: 'TransactionCollaps',
|
||||||
props: {
|
props: {
|
||||||
amount: { type: Number, default: 0 },
|
amount: { type: Number },
|
||||||
gdtEntryType: { type: Number, default: 0 },
|
gdtEntryType: { type: Number },
|
||||||
factor: { type: Number, default: 0 },
|
factor: { type: Number },
|
||||||
gdt: { type: Number, default: 0 },
|
gdt: { type: Number },
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLinesByType(givenType) {
|
getLinesByType(givenType) {
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
} in transactionsGdt"
|
} in transactionsGdt"
|
||||||
:key="transactionId"
|
:key="transactionId"
|
||||||
>
|
>
|
||||||
|
|
||||||
<transaction
|
<transaction
|
||||||
:amount="amount"
|
:amount="amount"
|
||||||
:date="date"
|
:date="date"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user