mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
requestor adapted to use PersonRenderBox or ThirdPartyRenderBox
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="item-bloc">
|
||||
<section class="chill-entity entity-person">
|
||||
|
||||
<div class="item-bloc col">
|
||||
<section class="chill-entity entity-thirdparty">
|
||||
<!-- ENTIRE RENDER_BOX -->
|
||||
<div class="item-row entity-bloc">
|
||||
|
||||
@@ -12,15 +13,15 @@
|
||||
<!-- todo: make h class dynamic -->
|
||||
<div class="denomination h3">
|
||||
|
||||
<span v-if="options.addEntity == true && thirdparty.resource.type == 'thirdparty'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.thirdparty') }}</span>
|
||||
<span v-if="options.addEntity == true && thirdparty.resource.type == 'person'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.person') }}</span>
|
||||
<span v-if="options.addEntity == true && thirdparty.type == 'thirdparty'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.thirdparty') }}</span>
|
||||
<span v-if="options.addEntity == true && thirdparty.type == 'person'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.person') }}</span>
|
||||
<!-- NAME IF ADD LINK AND PERMISSION GRANTED -->
|
||||
<!-- todo: change href -->
|
||||
<a v-if="this.options.addLink == true" href="#">
|
||||
<span class="name">{{ thirdparty.resource.text }}</span>
|
||||
<span class="name">{{ thirdparty.text }}</span>
|
||||
</a>
|
||||
<!-- WITHOUT LINK JUST NAME -->
|
||||
<span class="name">{{ thirdparty.resource.text }}</span>
|
||||
<span class="name">{{ thirdparty.text }}</span>
|
||||
|
||||
<!-- IF ADD ENTITY OPTION -->
|
||||
|
||||
@@ -32,11 +33,11 @@
|
||||
<!-- EXTRA INFO -->
|
||||
<p v-if="this.options.addInfo == true" class="moreinfo">
|
||||
<!-- todo: change icon if person is deceased? -->
|
||||
<i :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
||||
<time v-if="thirdparty.resource.birthdate" datetime="{{ thirdparty.birthdate.datetime }}" title="{{ birthdate }}">
|
||||
<i v-if="thirdparty.birthdate" :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
||||
<time v-if="thirdparty.birthdate" datetime="{{ thirdparty.birthdate.datetime }}" title="{{ birthdate }}">
|
||||
{{ $t(getGender) + ' ' + $d(birthdate, 'short') }}
|
||||
</time>
|
||||
<time v-else-if="thirdparty.resource.deathdate" datetime="{{ thirdparty.deathdate.datetime }}" title="{{ thirdparty.deathdate }}">
|
||||
<time v-else-if="thirdparty.deathdate" datetime="{{ thirdparty.deathdate.datetime }}" title="{{ thirdparty.deathdate }}">
|
||||
{{ birthdate }} - {{ deathdate }}
|
||||
</time>
|
||||
<span class="age">{{ thirdparty.age }}</span>
|
||||
@@ -49,20 +50,20 @@
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<!-- ADDRESS -->
|
||||
<li v-if="thirdparty.resource.address" class="chill-entity entity-address">
|
||||
<li v-if="thirdparty.address" class="chill-entity entity-address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<show-address :address="thirdparty.resource.address" :multiline="false"></show-address>
|
||||
<show-address :address="thirdparty.address" :multiline="false"></show-address>
|
||||
</li>
|
||||
<!-- PHONENUMBER -->
|
||||
<!-- todo: change href for phonenumbers -->
|
||||
<li>
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a v-if="thirdparty.resource.telephone" :href="'tel: ' + thirdparty.resource.telephone">{{ thirdparty.resource.telephone }}</a>
|
||||
<a v-if="thirdparty.telephone" :href="'tel: ' + thirdparty.telephone">{{ thirdparty.telephone }}</a>
|
||||
<span v-else class="chill-no-data-statement">{{ $t('renderbox.no_information') }}</span>
|
||||
</li>
|
||||
<li v-if="thirdparty.resource.type == 'thirdparty'">
|
||||
<li v-if="thirdparty.type == 'thirdparty'">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a v-if="thirdparty.resource.email" :href="'mailto: ' + thirdparty.resource.email">{{ thirdparty.resource.email }}</a>
|
||||
<a v-if="thirdparty.email" :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
<span v-else class="chill-no-data-statement">{{ $t('renderbox.no_information') }}</span>
|
||||
</li>
|
||||
|
||||
@@ -92,17 +93,17 @@ export default {
|
||||
props: ['thirdparty', 'options'],
|
||||
computed: {
|
||||
getGender: function() {
|
||||
return this.thirdparty.resource.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||
return this.thirdparty.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||
},
|
||||
getGenderIcon: function() {
|
||||
return this.thirdparty.resource.gender == 'woman' ? 'fa-venus' : this.thirdparty.resource.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||
return this.thirdparty.gender == 'woman' ? 'fa-venus' : this.thirdparty.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||
},
|
||||
birthdate: function(){
|
||||
var date = new Date(this.thirdparty.resource.birthdate.datetime);
|
||||
var date = new Date(this.thirdparty.birthdate.datetime);
|
||||
return dateToISO(date);
|
||||
},
|
||||
deathdate: function(){
|
||||
var date = new Date(this.thirdparty.resource.deathdate.datetime);
|
||||
var date = new Date(this.thirdparty.deathdate.datetime);
|
||||
return dateToISO(date);
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user