workflow history

This commit is contained in:
Julien Fastré 2022-01-28 23:54:01 +01:00
parent 86e7b0f007
commit dc184762d6

View File

@ -2,15 +2,18 @@
<div class="flex-table">
{% for step in entity_workflow.stepsChained %}
{% set place_labels = workflow_metadata(entity_workflow, 'label', step.currentStep) %}
{% set place_label = place_labels is null ? step.currentStep : place_labels|localize_translatable_string %}
<div class="item-bloc {{ 'bloc' ~ step.id }} {% if loop.first %}initial{% endif %}">
<div class="item-row">
{% if loop.first and step.next is null %}
<div class="item-col">
{{ 'workflow.No transitions'|trans }}
</div>
{% else %}
<div class="item-col">
{% if step.previous is not null and step.previous.freezeAfter == true %}
<i class="fa fa-snowflake-o fa-sm me-1" title="{{ 'workflow.Freezed'|trans }}"></i>
@ -18,10 +21,7 @@
</div>
<div class="item-col flex-column align-items-end">
<div class="decided">
{% if not loop.first %}
<i class="fa fa-check fa-fw text-success"></i>
{% endif %}
{{ step.currentStep }}
{{ place_label }}
</div>
{#
<div class="decided">
@ -31,9 +31,13 @@
#}
</div>
{% endif %}
</div>
{% if step.next is not null %}
{% set transition = chill_workflow_transition_by_string(step.entityWorkflow, step.transitionAfter) %}
{% set transition_labels = workflow_metadata(step.entityWorkflow, 'label', transition) %}
{% set transition_label = transition_labels is null ? step.transitionAfter : transition_labels|localize_translatable_string %}
{% set forward = workflow_metadata(step.entityWorkflow, 'isForward', transition) %}
<div class="item-row separator">
<div class="item-col" style="width: inherit;">
{% if step.transitionBy is not null %}
@ -48,7 +52,12 @@
<div class="item-col flex-column align-items-end">
<div class="to-decision">
<i class="fa fa-share fa-fw text-secondary" title="transféré"></i>
{{ step.next.currentStep }}
{% if forward %}
<i class="fa fa-check fa-fw text-success"></i>
{% else %}
<i class="fa fa-times fa-fw text-danger"></i>
{% endif %}
{{ transition_label }}
</div>
</div>
</div>