mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
person_renderbox fix if there is no birthdate
This commit is contained in:
parent
820def6294
commit
903d57ea9d
@ -117,15 +117,19 @@ export default {
|
|||||||
return this.person.gender == 'woman' ? 'fa-venus' : this.person.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
return this.person.gender == 'woman' ? 'fa-venus' : this.person.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||||
},
|
},
|
||||||
birthdate: function(){
|
birthdate: function(){
|
||||||
if(this.person.birthdate){
|
if(this.person.birthdate !== null){
|
||||||
const date = new Date(this.person.birthdate.datetime);
|
const date = new Date(this.person.birthdate.datetime);
|
||||||
return dateToISO(date)
|
return dateToISO(date)
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deathdate: function(){
|
deathdate: function(){
|
||||||
if(this.person.deathdate){
|
if(this.person.deathdate !== null){
|
||||||
const date = new Date(this.person.deathdate.datetime);
|
const date = new Date(this.person.deathdate.datetime);
|
||||||
return date.toLocaleDateString("fr-FR");
|
return date.toLocaleDateString("fr-FR");
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
altNameLabel: function(){
|
altNameLabel: function(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user