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>
|
<template>
|
||||||
<div class="container tpartycontainer">
|
<div class="container tpartycontainer">
|
||||||
<div class="tparty-identification">
|
<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">
|
<span class="name">
|
||||||
{{ item.result.text }}
|
{{ item.result.text }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<ul class="list-content fa-ul">
|
<ul class="list-content fa-ul">
|
||||||
<li v-if="getProfession.length > 0">
|
<li v-if="getProfession.length > 0">
|
||||||
<i class="fa fa-li fa-id-card"></i>
|
<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>
|
||||||
<li v-if="hasParent">
|
<li v-if="hasParent">
|
||||||
<i class="fa fa-li fa-hand-o-right"></i>
|
<i class="fa fa-li fa-hand-o-right"></i>
|
||||||
@ -136,13 +136,14 @@ export default {
|
|||||||
getProfession() {
|
getProfession() {
|
||||||
let profession = []
|
let profession = []
|
||||||
if (this.hasParent && this.thirdparty.profession) {
|
if (this.hasParent && this.thirdparty.profession) {
|
||||||
profession.push(this.thirdparty.profession.name.fr)
|
profession.push(this.thirdparty.profession)
|
||||||
return profession;
|
return profession;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.hasParent && this.thirdparty.category) {
|
if (!this.hasParent && this.thirdparty.category) {
|
||||||
profession = this.thirdparty.category.map((category) => category.text);
|
profession = this.thirdparty.category.map((category) => category.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
return profession;
|
return profession;
|
||||||
}
|
}
|
||||||
/* TODO need backend normalizer to serve children without circular reference
|
/* TODO need backend normalizer to serve children without circular reference
|
||||||
|
Loading…
x
Reference in New Issue
Block a user