Add qualité in personsuggestion

This commit is contained in:
Julie Lenaerts 2022-02-22 15:06:31 +01:00
parent 262bb13b6c
commit ab5bb3963b

View File

@ -1,13 +1,14 @@
<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 class="name"> <span class="name">
{{ item.result.text }}&nbsp; {{ item.result.text }}&nbsp;
</span> </span>
<span class="location"> <span class="location">
<template v-if="hasAddress"> <template v-if="hasAddress">
{{ getAddress.text }} - {{ getAddress.text }} -
{{ getAddress.postcode.name }} {{ getAddress.postcode.name }}
</template> </template>
</span> </span>
</div> </div>
@ -19,15 +20,15 @@
</div> </div>
<div class="right_actions"> <div class="right_actions">
<badge-entity <badge-entity
:entity="item.result" :entity="item.result"
:options="{ displayLong: true }"> :options="{ displayLong: true }">
</badge-entity> </badge-entity>
<on-the-fly <on-the-fly
type="thirdparty" type="thirdparty"
v-bind:id="item.result.id" v-bind:id="item.result.id"
action="show"> action="show">
</on-the-fly> </on-the-fly>
</div> </div>
</template> </template>
@ -48,54 +49,59 @@ const i18n = {
}; };
export default { export default {
name: 'SuggestionThirdParty', name: 'SuggestionThirdParty',
components: { components: {
OnTheFly, OnTheFly,
BadgeEntity BadgeEntity
}, },
props: ['item'], props: ['item'],
i18n, i18n,
computed: { computed: {
hasAddress() { hasAddress() {
if (this.$props.item.result.address !== null) { if (this.$props.item.result.address !== null) {
return true; return true;
} }
if (this.$props.item.result.parent !== null) { if (this.$props.item.result.parent !== null) {
this.$props.item.result.parent.address !== null; this.$props.item.result.parent.address !== null;
} }
}, },
hasParent() { hasParent() {
return this.$props.item.result.parent !== null; return this.$props.item.result.parent !== null;
}, },
getAddress() { getAddress() {
if (this.$props.item.result.address !== null) { if (this.$props.item.result.address !== null) {
return this.$props.item.result.address; return this.$props.item.result.address;
} }
if (this.$props.item.result.parent.address !== null) { if (this.$props.item.result.parent.address !== null) {
return this.$props.item.result.parent.address; return this.$props.item.result.parent.address;
} }
return null; return null;
} },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tpartycontainer { .tpartycontainer {
.tpartyparent { .tpartyparent {
.name { .name {
font-weight: bold; font-weight: bold;
font-variant: all-small-caps; font-variant: all-small-caps;
}
}
.tparty-identification {
span:not(.name) {
margin-left: 0.5em;
opacity: 0.5;
font-size: 90%;
font-style: italic;
} }
} .profession {
.tparty-identification { font-weight: 800;
span:not(.name) { color: black;
margin-left: 0.5em; font-style: normal;
opacity: 0.5; }
font-size: 90%; }
font-style: italic;
}
}
} }
</style> </style>