Adding fonction in personrenderbox

This commit is contained in:
2022-02-22 15:05:43 +01:00
parent 5d530aaae9
commit 262bb13b6c
3 changed files with 44 additions and 11 deletions

View File

@@ -22,8 +22,6 @@
</badge-entity>
</div>
<p v-if="thirdparty.profession">{{ thirdparty.profession }}</p>
<p v-if="this.options.addInfo === true" class="moreinfo">
</p>
</div>
@@ -96,10 +94,8 @@
<script>
import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue';
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
import Confidential from 'ChillMainAssets/vuejs/_components/Confidential.vue';
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
//import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue';
export default {
name: "ThirdPartyRenderBox",
@@ -107,7 +103,6 @@ export default {
AddressRenderBox,
Confidential,
BadgeEntity,
//OnTheFly
},
i18n: {
messages: {
@@ -119,7 +114,6 @@ export default {
props: ['thirdparty', 'options'],
computed: {
isMultiline: function() {
console.log('thirdparty', this.thirdparty)
if (this.options.isMultiline){
return this.options.isMultiline
} else {
@@ -129,6 +123,15 @@ export default {
hasParent() {
return !(this.thirdparty.parent === null || this.thirdparty.parent === undefined);
},
getProfession() {
let profession = []
if (this.thirdparty.category) {
profession = this.thirdparty.category.map((category) => category.text);
}
return profession
}
/* TODO need backend normalizer to serve children without circular reference
hasChildren() {
//console.log(this.thirdparty.activeChildren.length > 0)
@@ -148,6 +151,15 @@ export default {
font-variant: all-small-caps;
}
}
.list-item {
&::after {
content: "|";
}
&:last-child::after {
content: ""
}
}
</style>