Skip to content

Commit

Permalink
prevent empty or undefined gfi fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi-of-the-sea committed Oct 18, 2024
1 parent 9343ce0 commit 0553854
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/clients/dish/src/plugins/internGfi/InternContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<v-icon small>fa-xmark</v-icon>
</v-btn>
</v-card-actions>
<v-card-title class="dish-gfi-title">
<v-card-title v-if="objektIdentifier" class="dish-gfi-title">
{{ `${$t('common:dish.gfiHeader')} ${objektIdentifier}` }}
</v-card-title>
<img
Expand Down Expand Up @@ -102,14 +102,18 @@ export default Vue.extend({
.filter(([key]) => Object.keys(this.infoFields).includes(key))
.map(([key, value]) => [this.infoFields[key], value])
const adressData = [
const address = this.infoFieldsAdress
.map((field) => object[field])
.filter((value) => value)
.join(' ')
const addressData = [
'Strasse',
this.infoFieldsAdress
.map((field) => object[field])
.filter((value) => value)
.join(' '),
]
tableData.push(adressData)
if (address && address.trim() !== '') tableData.push(addressData)
return tableData
},
Expand Down

0 comments on commit 0553854

Please sign in to comment.