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

69 lines
3.9 KiB
Twig

{% extends 'teamer/layout.html.twig' %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
{{ include('_partials/_back_link.html.twig', { 'url': returnUrl }) }}
<div class="pb-6">
<h1 class="text-2xl font-bold">{{ assignment.jobProfile.name }}</h1>
<p class="text-muted">
{{ assignment.destination.product }} · {{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }}
</p>
</div>
<div class="grid lg:grid-cols-2 gap-6 items-start">
<section class="card p-5">
<h2 class="section-title pb-4">Einsatz</h2>
{% include '_partials/_assignment_info.html.twig' %}
</section>
<section class="card p-5">
<h2 class="section-title 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 %}
<p><strong>Begründung:</strong> {{ application.comment|nl2br}}</p>
{% 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 %}
<p><strong>Begründung:</strong> {{ application.comment|nl2br}}</p>
{% 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-secondary"
title="Bewerbung zurückziehen"
hx-get="{{ path('app_teamer_application_withdraw', { 'uuid': application.uuid, 'r': forwarded_return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
Bewerbung zurückziehen
</button>
{% endif %}
{% else %}
<p>
Erfüllst du mehrere oder alle Voraussetzungen für diesen Einsatz?
</p>
<div class="flex flex-wrap items-center gap-x-6 gap-y-3">
<a href="{{ path('app_teamer_application_create', { 'uuid': assignment.uuid }) }}" class="btn-primary">
Hier bewerben!
</a>
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="inline-flex items-center gap-x-1 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('star', 'w-4 h-4 shrink-0') }}
<span>{% if not isBookmarked %}auf die Merkliste setzen{% else %}von der Merkliste löschen{% endif %}</span>
</a>
</div>
{% endif %}
</div>
</section>
</div>
{% endblock %}