accompanying course work: handle case end date is null

This commit is contained in:
nobohan 2021-10-26 17:13:41 +02:00
parent d2eb7b471e
commit 0fa3ff4c16
2 changed files with 9 additions and 0 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

@ -28,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>
@ -36,6 +41,7 @@
<span>{{ 'accompanying_course_work.end_date'|trans }}</span>
</div>
</li>
{% endif %}
</ul>
</div>