mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add entity 'user' to pills badge-entity
This commit is contained in:
parent
57c4f2ee61
commit
c7ee2cc600
@ -1,13 +1,12 @@
|
||||
<template>
|
||||
|
||||
<span v-if="entity.type === 'person'" class="badge rounded-pill bg-person">
|
||||
{{ $t('renderbox.person') }}
|
||||
{{ $t('person') }}
|
||||
</span>
|
||||
|
||||
<span v-if="entity.type === 'thirdparty'" class="badge rounded-pill bg-thirdparty">
|
||||
|
||||
<template v-if="options.displayLong !== true">
|
||||
{{ $t('renderbox.type.thirdparty')}}
|
||||
{{ $t('thirdparty.thirdparty')}}
|
||||
</template>
|
||||
|
||||
<i class="fa fa-fw fa-user" v-if="entity.kind === 'child'"></i>
|
||||
@ -15,12 +14,16 @@
|
||||
<i class="fa fa-fw fa-user-md" v-else></i>
|
||||
|
||||
<template v-if="options.displayLong === true">
|
||||
<span v-if="entity.kind === 'child'">{{ $t('tparty.child')}}</span>
|
||||
<span v-else-if="entity.kind === 'company'">{{ $t('tparty.company')}}</span>
|
||||
<span v-else>{{ $t('tparty.contact')}}</span>
|
||||
<span v-if="entity.kind === 'child'">{{ $t('thirdparty.child')}}</span>
|
||||
<span v-else-if="entity.kind === 'company'">{{ $t('thirdparty.company')}}</span>
|
||||
<span v-else>{{ $t('thirdparty.contact')}}</span>
|
||||
</template>
|
||||
</span>
|
||||
|
||||
<span v-if="entity.type === 'user'" class="badge rounded-pill bg-user">
|
||||
{{ $t('user')}}
|
||||
</span>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -30,11 +33,14 @@ export default {
|
||||
i18n: {
|
||||
messages: {
|
||||
fr: {
|
||||
tparty: {
|
||||
person: "Usager",
|
||||
thirdparty: {
|
||||
thirdparty: "Tiers",
|
||||
child: "Personne de contact",
|
||||
company: "Personne morale",
|
||||
contact: "Personne physique",
|
||||
}
|
||||
},
|
||||
user: 'TMS'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* BADGES PERSON AND THIRDPARTY
|
||||
* BADGES USER, PERSON AND THIRDPARTY
|
||||
*/
|
||||
|
||||
span.badge-user,
|
||||
@ -167,7 +167,7 @@ div[class*='activity-'] {
|
||||
}
|
||||
|
||||
/*
|
||||
* Specific badge rounded-pill
|
||||
* Pill badge by entity
|
||||
*/
|
||||
.badge {
|
||||
&.bg-person {
|
||||
@ -175,5 +175,10 @@ div[class*='activity-'] {
|
||||
background-color: $chill-ll-gray;
|
||||
color: $chill-green;
|
||||
}
|
||||
&.bg-user {
|
||||
//@extend .$chill-ll-gray;
|
||||
background-color: $chill-ll-gray;
|
||||
color: $chill-blue;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,26 +7,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<span class="badge rounded-pill bg-secondary">
|
||||
{{ $t('user')}}
|
||||
</span>
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
const i18n = {
|
||||
messages: {
|
||||
fr: {
|
||||
user: 'Utilisateur' // TODO how to define other translations?
|
||||
}
|
||||
}
|
||||
};
|
||||
import BadgeEntity from 'ChillMainAssets/vuejs/_components/BadgeEntity.vue';
|
||||
|
||||
export default {
|
||||
name: 'SuggestionUser',
|
||||
components: {
|
||||
BadgeEntity
|
||||
},
|
||||
props: ['item'],
|
||||
i18n,
|
||||
computed: {
|
||||
hasParent() {
|
||||
return this.$props.item.result.parent !== null;
|
||||
|
@ -1,6 +1,6 @@
|
||||
@import 'ChillMainAssets/module/bootstrap/shared';
|
||||
|
||||
/// Specific badge rounded-pill
|
||||
/// Pill badge by entity
|
||||
.badge.rounded-pill {
|
||||
&.bg-thirdparty {
|
||||
//@extend .$chill-ll-gray;
|
||||
|
Loading…
x
Reference in New Issue
Block a user