mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FIX [rendering] adjust vue components to correctly render profession string
This commit is contained in:
parent
bea839663f
commit
e50b02a8c7
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container tpartycontainer">
|
||||
<div class="tparty-identification">
|
||||
<span v-if="item.result.profession" class="profession">{{ item.result.profession.name.fr }}</span>
|
||||
<span v-if="item.result.profession" class="profession">{{ item.result.profession }}</span>
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
|
@ -36,7 +36,7 @@
|
||||
<ul class="list-content fa-ul">
|
||||
<li v-if="getProfession.length > 0">
|
||||
<i class="fa fa-li fa-id-card"></i>
|
||||
<p><span v-for="p in getProfession" :key="p" class="list-item list-professions">{{ p[0].toUpperCase() + p.slice(1).toLowerCase() }}</span></p>
|
||||
<p><span>{{ getProfession[0] }}</span></p>
|
||||
</li>
|
||||
<li v-if="hasParent">
|
||||
<i class="fa fa-li fa-hand-o-right"></i>
|
||||
@ -136,13 +136,14 @@ export default {
|
||||
getProfession() {
|
||||
let profession = []
|
||||
if (this.hasParent && this.thirdparty.profession) {
|
||||
profession.push(this.thirdparty.profession.name.fr)
|
||||
profession.push(this.thirdparty.profession)
|
||||
return profession;
|
||||
}
|
||||
|
||||
if (!this.hasParent && this.thirdparty.category) {
|
||||
profession = this.thirdparty.category.map((category) => category.text);
|
||||
}
|
||||
|
||||
return profession;
|
||||
}
|
||||
/* TODO need backend normalizer to serve children without circular reference
|
||||
|
Loading…
x
Reference in New Issue
Block a user