Add vizualisation of public views in the workflow history

This commit is contained in:
2024-10-08 16:17:11 +02:00
parent b99ea3b17a
commit 40b8fae8ba
6 changed files with 93 additions and 8 deletions

View File

@@ -134,6 +134,13 @@
{{ include('@ChillMain/Workflow/_signature_list.html.twig', {'signatures': step.signatures, is_small: true }) }}
{% endif %}
{% endif %}
{% if step.sends|length > 0 %}
<div>
<p><b>{{ 'workflow.sent_through_secured_link'|trans }}</b></p>
{{ include('@ChillMain/Workflow/_send_views_list.html.twig', {'sends': step.sends}) }}
</div>
{% endif %}
</div>
{% endfor %}

View File

@@ -0,0 +1,35 @@
<div class="container">
{% for send in sends %}
<div class="row row-hover align-items-center">
<div class="col-sm-12 col-md-5">
{% if send.destineeKind == 'thirdParty' %}
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'thirdParty', id: send.destineeThirdParty.id },
buttonText: send.destineeThirdParty|chill_entity_render_string,
} %}
{% else %}
<a href="mailto:{{ send.destineeEmail }}">{{ send.destineeEmail }}</a>
{% endif %}
{% if not send.expired %}
<p><small>{{ 'workflow.send_external_message.document_available_until'|trans({'expiration': send.expireAt}) }}</small></p>
{% endif %}
</div>
<div class="col-sm-12 col-md-7 text-end">
<p><small>{{ 'workflow.external_views.number_of_views'|trans({'numberOfViews': send.views|length}) }}</small></p>
{% if send.views|length > 0 %}
<p><small>{{ 'workflow.external_views.last_view_at'|trans({'at': send.lastView.viewAt }) }}</small></p>
<p>
<small>
<b>{{ 'workflow.public_views_by_ip'|trans }}&nbsp;:</b>
{%- for ip, vs in send.viewsByIp -%}
<span title="{% for v in vs %}{{ v.viewAt|format_datetime('short', 'short')|escape('html_attr') }}{% if not loop.last %}{{ ', '|escape('html_attr') }}{% endif %}{% endfor %}">{{ ip }} ({{ vs|length }}x)</span>
{%- endfor -%}
</small>
</p>
{% endif %}
</div>
</div>
{% endfor %}
</div>

View File

@@ -1,12 +1,11 @@
{% extends '@ChillMain/layout.html.twig' %}
{% block title %}
{% block title -%}
{{ 'Workflow'|trans }}
{% endblock %}
{%- endblock %}
{% block js %}
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
{{ encore_entry_script_tags('mod_pickentity_type') }}
{{ encore_entry_script_tags('mod_entity_workflow_subscribe') }}
{{ encore_entry_script_tags('page_workflow_show') }}