feat: replace some partials with twig components
This commit is contained in:
@@ -15,28 +15,20 @@
|
||||
{% include '_partials/_assignment_requirements_info.html.twig' %}
|
||||
<div class="flex flex-col items-start space-y-4">
|
||||
{% if disposition is not null %}
|
||||
{% include '_partials/_infobox.html.twig' with {
|
||||
'message': 'Du wurdest am ' ~ disposition.createdAt|date('d.m.Y') ~ ' für diesen Einsatz eingeteilt.'
|
||||
} %}
|
||||
<twig:MessageBox message="Du wurdest am {{ disposition.createdAt|date('d.m.Y') }} für diesen Einsatz eingeteilt."/>
|
||||
{% elseif application is not null %}
|
||||
{% if application.status == constant('App\\Entity\\Application::STATUS_REJECTED') %}
|
||||
{% include '_partials/_errorbox.html.twig' with {
|
||||
'message': 'Deine Bewerbung wurde leider abgelehnt.'
|
||||
} %}
|
||||
<twig:MessageBox message="Deine Bewerbung wurde leider abgelehnt." type="error"/>
|
||||
{% if application.comment and application.commentVisible %}
|
||||
<strong>Begründung:</strong> {{ application.comment|nl2br}}
|
||||
{% endif %}
|
||||
{% elseif application.status == constant('App\\Entity\\Application::STATUS_PENDING') %}
|
||||
{% include '_partials/_infobox.html.twig' with {
|
||||
'message': 'Deine Bewerbung befindet sich in Bearbeitung.'
|
||||
} %}
|
||||
<twig:MessageBox message="Deine Bewerbung befindet sich in Bearbeitung."/>
|
||||
{% if application.comment and application.commentVisible %}
|
||||
<strong>Begründung:</strong> {{ application.comment|nl2br}}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include '_partials/_infobox.html.twig' with {
|
||||
'message': 'Du hast dich am ' ~ application.createdAt|date('d.m.Y') ~ ' auf diesen Einsatz beworben.'
|
||||
} %}
|
||||
<twig:MessageBox message="Du hast dich am {{ application.createdAt|date('d.m.Y') }} auf diesen Einsatz beworben."/>
|
||||
<button type="button"
|
||||
class="btn btn--secondary"
|
||||
title="Bewerbung zurückziehen"
|
||||
|
||||
@@ -21,10 +21,12 @@
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% if pickup is not null %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="{{ path('app_teamer_disposition_detail', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
{# 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'
|
||||
} %}
|
||||
<twig:MessageBox message="Dein Honorarvertrag muss überarbeitet werden" type="error"/>
|
||||
{% if contract.comment %}
|
||||
<div class="py-2">
|
||||
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
|
||||
@@ -68,7 +66,7 @@
|
||||
{{ form_end(form) }}
|
||||
{% else %}
|
||||
{% for blocker in workflow_transition_blockers(disposition, 'upload_contract') %}
|
||||
{% include '_partials/_infobox.html.twig' with { 'message': blocker.message } %}
|
||||
<twig:MessageBox message="{{ blocker.message }}"/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -99,7 +97,7 @@
|
||||
{{ form_end(form) }}
|
||||
{% else %}
|
||||
{% for blocker in workflow_transition_blockers(disposition, 'upload_invoice') %}
|
||||
{% include '_partials/_infobox.html.twig' with { 'message': blocker.message } %}
|
||||
<twig:MessageBox message="{{ blocker.message }}"/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -116,9 +114,7 @@
|
||||
{# 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'
|
||||
} %}
|
||||
<twig:MessageBox message="Dein Honorarvertrag befindet sich in Bearbeitung"/>
|
||||
{% if contract.comment %}
|
||||
<div class="py-2">
|
||||
<strong>Begründung:</strong> {{ contract.comment|nl2br }}
|
||||
|
||||
Reference in New Issue
Block a user