43 lines
1.2 KiB
Vue

<template>
<span v-if="entity.type === 'person'" class="badge rounded-pill bg-person">
{{ $t('renderbox.person') }}
</span>
<span v-if="entity.type === 'thirdparty'" class="badge rounded-pill bg-thirdparty">
<template v-if="options.displayLong !== true">
{{ $t('renderbox.type.thirdparty')}}
</template>
<i class="fa fa-fw fa-user" v-if="entity.kind === 'child'"></i>
<i class="fa fa-fw fa-hospital-o" v-else-if="entity.kind === 'company'"></i>
<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>
</template>
</span>
</template>
<script>
export default {
name: "BadgeEntity",
props: ['options', 'entity'],
i18n: {
messages: {
fr: {
tparty: {
child: "Personne de contact",
company: "Personne morale",
contact: "Personne physique",
}
}
}
}
}
</script>