Feature: Adapt UI to show new steps

This commit is contained in:
Julien Fastré 2023-04-24 15:38:53 +02:00
parent fcbc00d0f1
commit c5989de120
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
4 changed files with 23 additions and 9 deletions

View File

@ -14,7 +14,7 @@
<scopes></scopes>
<referrer></referrer>
<resources></resources>
<start-date v-if="accompanyingCourse.step === 'CONFIRMED'"></start-date>
<start-date v-if="accompanyingCourse.step.startsWith('CONFIRMED')"></start-date>
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>

View File

@ -11,12 +11,22 @@
{{ $t('course.step.draft') }}
</span>
</span>
<span v-else-if="accompanyingCourse.step === 'CONFIRMED'" class="text-md-end">
<span class="d-md-block mb-md-3">
<span v-else-if="accompanyingCourse.step === 'CONFIRMED' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" class="text-md-end">
<span v-if="accompanyingCourse.step === 'CONFIRMED'" class="d-md-block mb-md-3">
<span class="badge bg-primary">
{{ $t('course.step.active') }}
</span>
</span>
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'" class="d-md-block mb-md-3">
<span class="badge bg-chill-yellow text-primary">
{{ $t('course.step.inactive_short') }}
</span>
</span>
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" class="d-md-block mb-md-3">
<span class="badge bg-chill-pink">
{{ $t('course.step.inactive_long') }}
</span>
</span>
<span class="d-md-block">
<span class="d-md-block ms-3 ms-md-0">
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>

View File

@ -21,7 +21,9 @@ const appMessages = {
step: {
draft: "Brouillon",
active: "En file active",
closed: "Cloturé"
closed: "Cloturé",
inactive_short: "Hors file active",
inactive_long: "Pré-archivé",
},
open_at: "ouvert le ",
by: "par ",

View File

@ -52,11 +52,13 @@
{% endif %}
{% if acp.step == 'DRAFT' %}
<span class="badge bg-secondary" style="font-size: 85%;" title="{{ 'course.draft'|trans }}">{{ 'course.draft'|trans }}</span>
{% endif %}
{% if acp.step == 'CLOSED' %}
<span class="badge bg-danger" style="font-size: 85%;" title="{{ 'course.closed'|trans }}">{{ 'course.closed'|trans }}</span>
<span class="badge bg-secondary" style="font-size: 85%;" title="{{ 'course.draft'|trans|e('html_attr') }}">{{ 'course.draft'|trans }}</span>
{% elseif acp.step == 'CLOSED' %}
<span class="badge bg-danger" style="font-size: 85%;" title="{{ 'course.closed'|trans|e('html_attr') }}">{{ 'course.closed'|trans }}</span>
{% elseif acp.step == 'CONFIRMED_INACTIVE_SHORT' %}
<span class="badge bg-chill-yellow text-primary" style="font-size: 85%;" title="{{ 'course.inactive_short'|trans|e('html_attr') }}">{{ 'course.inactive_short'|trans }}</span>
{% elseif acp.step == 'CONFIRMED_INACTIVE_LONG' %}
<span class="badge bg-danger" style="font-size: 85%;" title="{{ 'course.inactive_long'|trans|e('html_attr') }}">{{ 'course.inactive_long'|trans }}</span>
{% endif %}
</div>
</div>