mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
further adaptations to display deathdate. deathdate added to what API returns
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
addEntity: false,
|
||||
addLink: false,
|
||||
addAltNames: true,
|
||||
addAge : false,
|
||||
addAge : true,
|
||||
hLevel : 3,
|
||||
}"
|
||||
:person="participation.person">
|
||||
|
@@ -28,7 +28,6 @@
|
||||
</div>
|
||||
|
||||
<p v-if="options.addInfo == true" class="moreinfo">
|
||||
{{ person.deathdate }}
|
||||
<i :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
||||
<time v-if="person.birthdate && !person.deathdate" datetime="{{ person.birthdate }}" title="{{ birthdate }}">
|
||||
{{ $t(getGenderTranslation) + ' ' + $d(birthdate, 'text') }}
|
||||
@@ -39,7 +38,7 @@
|
||||
<time v-else-if="person.deathdate" datetime="{{ person.deathdate }}" title="{{ person.deathdate }}">
|
||||
{{ $t('renderbox.deathdate') + ' ' + deathdate }}
|
||||
</time>
|
||||
<span v-if="options.addAge" class="age">{{ getAge }} {{ $t('renderbox.years_old')}}</span>
|
||||
<span v-if="options.addAge && person.birthdate" class="age">{{ getAge }} {{ $t('renderbox.years_old')}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,13 +117,15 @@ export default {
|
||||
return this.person.gender == 'woman' ? 'fa-venus' : this.person.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||
},
|
||||
birthdate: function(){
|
||||
if(this.person.birthdate){
|
||||
const date = new Date(this.person.birthdate.datetime);
|
||||
return dateToISO(date);
|
||||
return dateToISO(date)
|
||||
}
|
||||
},
|
||||
deathdate: function(){
|
||||
if(this.person.deathdate){
|
||||
const date = new Date(this.person.deathdate.datetime);
|
||||
return dateToISO(date);
|
||||
return date.toLocaleDateString("fr-FR");
|
||||
}
|
||||
},
|
||||
altNameLabel: function(){
|
||||
|
Reference in New Issue
Block a user