Add on_hold label to vue components

This commit is contained in:
Julie Lenaerts 2024-08-08 12:19:33 +02:00 committed by Julien Fastré
parent c21de777fd
commit d119ba49f7
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
5 changed files with 11 additions and 3 deletions

View File

@ -498,6 +498,7 @@ div.workflow {
div.breadcrumb { div.breadcrumb {
display: initial; display: initial;
margin-bottom: 0; margin-bottom: 0;
margin-right: .5rem;
padding-right: 0.5em; padding-right: 0.5em;
background-color: tint-color($chill-yellow, 90%); background-color: tint-color($chill-yellow, 90%);
border: 1px solid $chill-yellow; border: 1px solid $chill-yellow;

View File

@ -9,13 +9,16 @@
</template> </template>
<template v-slot:tbody> <template v-slot:tbody>
<tr v-for="(w, i) in workflows.results" :key="`workflow-${i}`"> <tr v-for="(w, i) in workflows.results" :key="`workflow-${i}`">
<td>{{ w.title }}</td> <td>
{{ w.title }}
</td>
<td> <td>
<div class="workflow"> <div class="workflow">
<div class="breadcrumb"> <div class="breadcrumb">
<i class="fa fa-circle me-1 text-chill-yellow mx-2"></i> <i class="fa fa-circle me-1 text-chill-yellow mx-2"></i>
<span class="mx-2">{{ getStep(w) }}</span> <span class="mx-2">{{ getStep(w) }}</span>
</div> </div>
<span v-if="w.isOnHoldAtCurrentStep" class="badge bg-success rounded-pill">{{ $t('on_hold') }}</span>
</div> </div>
</td> </td>
<td v-if="w.datas.persons !== null"> <td v-if="w.datas.persons !== null">

View File

@ -41,6 +41,7 @@ const appMessages = {
Step: "Étape", Step: "Étape",
concerned_users: "Usagers concernés", concerned_users: "Usagers concernés",
Object_workflow: "Objet du workflow", Object_workflow: "Objet du workflow",
on_hold: "En attente",
show_entity: "Voir {entity}", show_entity: "Voir {entity}",
the_activity: "l'échange", the_activity: "l'échange",
the_course: "le parcours", the_course: "le parcours",

View File

@ -6,7 +6,7 @@
<div> <div>
<div class="item-row col"> <div class="item-row col">
<h2>{{ w.title }}</h2> <h2>{{ w.title }}</h2>
<div class="flex-grow-1 ms-3 h3"> <div class="flex-grow-1 ms-3 h3">
<div class="visually-hidden"> <div class="visually-hidden">
{{ w.relatedEntityClass }} {{ w.relatedEntityClass }}
{{ w.relatedEntityId }} {{ w.relatedEntityId }}
@ -38,6 +38,7 @@
</span> </span>
</template> </template>
</div> </div>
<span v-if="w.isOnHoldAtCurrentStep" class="badge bg-success rounded-pill">{{ $t('on_hold') }}</span>
</div> </div>
<div class="item-row"> <div class="item-row">
@ -73,7 +74,8 @@ const i18n = {
you_subscribed_to_all_steps: "Vous recevrez une notification à chaque étape", you_subscribed_to_all_steps: "Vous recevrez une notification à chaque étape",
you_subscribed_to_final_step: "Vous recevrez une notification à l'étape finale", you_subscribed_to_final_step: "Vous recevrez une notification à l'étape finale",
by: "Par", by: "Par",
at: "Le" at: "Le",
on_hold: "En attente"
} }
} }
} }

View File

@ -45,6 +45,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
'steps' => $this->normalizer->normalize($object->getStepsChained(), $format, $context), 'steps' => $this->normalizer->normalize($object->getStepsChained(), $format, $context),
'datas' => $this->normalizer->normalize($handler->getEntityData($object), $format, $context), 'datas' => $this->normalizer->normalize($handler->getEntityData($object), $format, $context),
'title' => $handler->getEntityTitle($object), 'title' => $handler->getEntityTitle($object),
'isOnHoldAtCurrentStep' => $object->isOnHoldAtCurrentStep(),
]; ];
} }