Feat: Display comment for document status on disposition detail page

This commit is contained in:
Björn Fromme
2023-10-25 16:03:59 +02:00
parent 6d90c5c3d9
commit 4e8c8c2c74
@@ -43,11 +43,28 @@
{% endfor %}
</ul>
{% endif %}
{# Upload contract #}
{% if workflow_has_marked_place(disposition, 'new') %}
<h2 class="text-lg font-bold pb-4">
Honorarvertrag
</h2>
{# Existing upload has been rejected #}
{% set contract = disposition.documentByType('contract') %}
{% if contract and contract.status == constant('App\\Entity\\Upload::STATUS_REJECTED') %}
{% include '_partials/_errorbox.html.twig' with {
'message': 'Dein Honorarvertrag muss überarbeitet werden'
} %}
{% if contract.comment %}
<div class="py-2">
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
</div>
{% endif %}
{% endif %}
{# New upload #}
{% if workflow_can(disposition, 'upload_contract') %}
<div class="pb-4">
<a href="{{ path('app_teamer_disposition_contractpdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
@@ -117,6 +134,19 @@
<div class="pb-4">
Wir prüfen das Dokument schnellstmöglich.
</div>
{# Existing upload is being checked #}
{% set contract = disposition.documentByType('contract') %}
{% if contract and contract.status == constant('App\\Entity\\Upload::STATUS_PENDING') %}
{% include '_partials/_infobox.html.twig' with {
'message': 'Dein Honorarvertrag befindet sich in Bearbeitung'
} %}
{% if contract.comment %}
<div class="py-2">
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
</div>
{% endif %}
{% endif %}
{% endif %}
{# Invoice uploaded #}