Files
myep-team/templates/teamer/assignment/detail.html.twig
T

60 lines
3.2 KiB
Twig

{% extends 'teamer/layout.html.twig' %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht
</h1>
<div class="grid lg:grid-cols-2 gap-8 items-start">
{% include '_partials/_assignment_info.html.twig' %}
<div>
<h2 class="text-xl font-bold pb-2">
Voraussetzungen für diesen Einsatz
</h2>
{% include '_partials/_assignment_requirements_info.html.twig' %}
<div class="flex flex-col items-start space-y-4">
{% if disposition is not null %}
<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') %}
<twig:MessageBox message="Deine Bewerbung wurde leider abgelehnt." type="error"/>
{% if application.comment and application.commentVisible %}
<strong>Begründung:</strong> {{ application.comment|nl2br}}
{% endif %}
{% endif %}
{% if application.status == constant('App\\Entity\\Application::STATUS_PENDING') %}
<twig:MessageBox message="Deine Bewerbung befindet sich in Bearbeitung."/>
{% if application.comment and application.commentVisible %}
<strong>Begründung:</strong> {{ application.comment|nl2br}}
{% endif %}
{% endif %}
{% if is_granted('WITHDRAW', application) %}
<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"
hx-get="{{ path('app_teamer_application_withdraw', { 'uuid': application.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
Bewerbung zurückziehen
</button>
{% endif %}
{% else %}
<div>
Erfüllst du mehrere oder alle Voraussetzungen für diesen Einsatz?
</div>
<a href="{{ path('app_teamer_application_create', { 'uuid': assignment.uuid }) }}" class="btn">
Hier bewerben!
</a>
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="underline">
{% if not isBookmarked %}auf die Merkliste setzen{% else %}von der Merkliste löschen{% endif %}
</a>
{% endif %}
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div>
</div>
{% endblock %}