Merge remote-tracking branch 'origin/master' into 106_tasks_to_parcours

This commit is contained in:
2021-10-27 13:45:02 +02:00
5 changed files with 15 additions and 22 deletions

View File

@@ -37,6 +37,9 @@ div.accompanying_course_work-list {
border-radius: 12px;
border: 2px solid $chill-green;
}
&.no-label:before {
display: none;
}
}
}
}

View File

@@ -35,7 +35,7 @@
</time>
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
{{ birthdate }} - {{ deathdate }}
{{ $d(birthdate) }} - {{ $d(deathdate) }}
</time>
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
@@ -163,22 +163,15 @@ export default {
return this.person.gender === 'woman' ? 'person.gender.woman' : this.person.gender === 'man' ? 'person.gender.man' : 'person.gender.neuter';
},
birthdate: function(){
if(this.person.birthdate !== null){
const date = new Date(this.person.birthdate.datetime);
return dateToISO(date)
if(this.person.birthdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.birthdate.datetime);
} else {
return "";
}
},
deathdate: function(){
// TODO FIX edition conflict: if null or undefined ?
// if (typeof this.person.deathdate !== 'undefined') {
// var date = new Date(this.person.deathdate.datetime);
// return dateToISO(date);
//}
if(this.person.deathdate !== null){
const date = new Date(this.person.deathdate.datetime);
return date.toLocaleDateString("fr-FR");
if(this.person.deathdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.deathdate.datetime);
} else {
return "";
}

View File

@@ -20,14 +20,6 @@
<div class="timeline">
<ul>
<li class="completed">
<div class="date">
<span>{{ w.createdAt|format_date('long') }}</span>
</div>
<div class="label">
<span>{{ 'accompanying_course_work.create_date'|trans }}</span>
</div>
</li>
<li class="completed">
<div class="date">
<span>{{ w.startDate|format_date('long') }}</span>
@@ -36,6 +28,11 @@
<span>{{ 'accompanying_course_work.start_date'|trans }}</span>
</div>
</li>
{% if w.endDate == null %}
<li>
<div class="label no-label"></div>
</li>
{% else %}
<li class="{%if date(w.endDate) < date('now') %}completed{% endif %}">
<div class="date">
<span>{{ w.endDate|format_date('long') }}</span>
@@ -44,6 +41,7 @@
<span>{{ 'accompanying_course_work.end_date'|trans }}</span>
</div>
</li>
{% endif %}
</ul>
</div>