try badgeEntity with displayLong option

This commit is contained in:
2021-12-08 16:34:57 +01:00
parent 56ab304af1
commit 6100176c9f
9 changed files with 146 additions and 107 deletions

View File

@@ -1,38 +1,11 @@
@import 'ChillMainAssets/module/bootstrap/shared';
/// Specific badge rounded-pill
/// bg-thirdparty-child -> Personne de contact
/// bg-thirdparty-company -> Personne morale
/// bg-thirdparty-contact -> Personne physique
.tp-type {
.badge.rounded-pill {
&[class*='bg-thirdparty-'] {
//@extend .$chill-ll-gray;
background-color: $chill-ll-gray;
color: $chill-pink;
}
&.bg-thirdparty-default {
display: inline-block;
}
&.bg-thirdparty-child,
&.bg-thirdparty-company,
&.bg-thirdparty-contact {
display: none;
}
}
&:hover {
.badge.rounded-pill {
&.bg-thirdparty-default {
display: none;
}
&.bg-thirdparty-child,
&.bg-thirdparty-company,
&.bg-thirdparty-contact {
display: inline-block;
}
}
.badge.rounded-pill {
&.bg-thirdparty {
//@extend .$chill-ll-gray;
background-color: $chill-ll-gray;
color: $chill-pink;
}
}

View File

@@ -12,24 +12,14 @@
</a>
<span class="name" v-else>{{ thirdparty.text }}</span>
<span v-if="options.addId == true" class="id-number" :title="'n° ' + thirdparty.id">
<span v-if="options.addId === true" class="id-number" :title="'n° ' + thirdparty.id">
{{ thirdparty.id }}
</span>
<span class="tp-type" v-if="options.addEntity === true">
<span class="badge rounded-pill bg-thirdparty-default">
{{ $t('renderbox.type.thirdparty')}}
</span>
<span class="badge rounded-pill bg-thirdparty-child" v-if="thirdparty.kind === 'child'">
{{ $t('tparty.child')}}
</span>
<span class="badge rounded-pill bg-thirdparty-company" v-else-if="thirdparty.kind === 'company'">
{{ $t('tparty.company')}}
</span>
<span class="badge rounded-pill bg-thirdparty-contact" v-else>
{{ $t('tparty.contact')}}
</span>
</span>
<badge-entity v-if="options.addEntity === true"
:entity="thirdparty"
:options="{ displayLong: options.entityDisplayLong }">
</badge-entity>
</div>
<div v-if="hasParent">
@@ -95,26 +85,15 @@
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';
const i18n = {
messages: {
fr: {
tparty: {
child: "Personne de contact",
company: "Personne morale",
contact: "Personne physique",
}
}
}
};
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
export default {
name: "ThirdPartyRenderBox",
components: {
AddressRenderBox,
Confidential
Confidential,
BadgeEntity
},
i18n,
props: ['thirdparty', 'options'],
computed: {
isMultiline: function() {

View File

@@ -5,7 +5,8 @@
:thirdparty="thirdparty"
:options="{
addInfo: true,
addEntity: false,
addEntity: true,
entityDisplayLong: true,
addAltNames: true,
addId: true,
addLink: false,