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

246 lines
13 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht ID {{ assignment.id}}
</h1>
<div class="pb-8">
{% include '_partials/_assignment_info_compact.html.twig' %}
</div>
{% if is_granted('ROLE_ADMIN') %}
<div class="col-span-2">
<h2 class="font-bold text-lg pb-4">
Bewerbungen
</h2>
<div class="data-table-wrapper w-full">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th class="w-1/4">
Name
</th>
<th class="w-1/5">
Status
</th>
<th>
Zustieg
</th>
<th>
Wünsche
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for application in applications %}
<tr>
<td>
<button type="button"
class="flex items-center space-x-1"
title="Teamer:inneninfo {{ application.teamer }}"
hx-get="{{ path('app_administrative_teamer_info', {
'uuid': application.teamer.uuid,
'r': return_url()
}) }}"
hx-target="body"
hx-swap="beforeend">
<span>{{ application.teamer }}</span>
{{ icon('info', 'w-4 h-4') }}
</button>
<twig:RatingStars rating="{{ application.teamer.averageRating }}" />
</td>
<td>
{{ ('label.application.status.' ~ application.status)|trans }}
</td>
<td>
{% if application.pickup %}
{{ application.pickup|bpn_pickup_label }}
{% else %}
-
{% endif %}
</td>
<td>
{{ application.requests|default('-')|nl2br }}
</td>
<td>
<div class="flex items-center justify-end space-x-2">
{% if is_granted('DISPOSE', application) %}
<button type="button"
class="text-green-500"
title="einteilen"
hx-get="{{ path('app_admin_application_dispose', {
'uuid': application.uuid
}) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('check') }}
</button>
{% endif %}
{% if is_granted('STATUS', application) %}
<button type="button"
class="text-primary"
title="Bewerbungsstatus bearbeiten"
hx-get="{{ path('app_admin_application_status', {
'uuid': application.uuid
}) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
{% endif %}
{% if is_granted('DELETE', application) %}
<button type="button"
class="text-red-500"
title="Bewerbung löschen"
hx-get="{{ path('app_admin_application_delete', {
'uuid': application.uuid
}) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete') }}
</button>
{% endif %}
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">
Es liegen keine Bewerbungen vor...
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
<h2 class="font-bold text-lg pb-4">
Einteilungen
</h2>
<div class="data-table-wrapper w-full">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th class="w-1/4">
Name
</th>
<th class="w-1/5">
Status
</th>
<th>
Zustieg
</th>
<th>
Anmerkungen
</th>
<th>
Absprachen
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for disposition in dispositions %}
<tr>
<td>
<button type="button"
class="flex items-center space-x-1"
title="Teamer:inneninfo {{ disposition.teamer }}"
hx-get="{{ path('app_administrative_teamer_info', { 'uuid': disposition.teamer.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
<span>{{ disposition.teamer }}</span>
{{ icon('info', 'w-4 h-4') }}
</button>
<twig:RatingStars rating="{{ disposition.teamer.averageRating }}" />
</td>
<td>
{{ ('label.disposition.status.' ~ disposition.status)|trans }}
</td>
<td>
{% if disposition.pickup %}
{{ disposition.pickup|bpn_pickup_label }}
{% else %}
-
{% endif %}
</td>
<td>
{% if disposition.calledOffReason %}
{{ disposition.calledOffReason|default('-')|nl2br }}
{% else %}
{{ disposition.remarks|default('-')|nl2br }}
{% endif %}
</td>
<td>
<div class="flex items-start space-x-2">
<div class="flex-1">
{{ disposition.specialAgreements|default('-')|nl2br }}
</div>
<button type="button"
title="zusätzliche Absprachen {{ disposition.teamer }}"
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('edit') }}
</button>
</div>
</td>
<td>
<div class="flex items-center justify-end space-x-2">
<button type="button" hx-post="{{ path('app_administrative_disposition_bpn_sync_toggle', { 'uuid': disposition.uuid }) }}" hx-swap="none">
{{ icon('chair', html_classes('w-5 h-5', {'text-green-500': disposition.syncedWithBusProNet })) }}
</button>
{% if is_granted('CONTRACT_SUPPLEMENTARY', disposition) %}
<button type="button"
title="Dokumentenupload"
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('upload') }}
</button>
{% endif %}
{% if is_granted('CALL_OFF', disposition) %}
<button type="button"
title="Absage"
class="text-red-500"
hx-get="{{ path('app_administrative_disposition_call_off', { 'uuid': disposition.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('cancel') }}
</button>
{% endif %}
{% if is_granted('DELETE', disposition) %}
<button type="button"
class="text-red-500"
title="Einteilung löschen"
hx-get="{{ path('app_admin_disposition_delete', { 'uuid': disposition.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete') }}
</button>
{% endif %}
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">
Es gibt noch keine Einteilungen...
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<a href="{{ returnUrl }}" class="btn">
zurück
</a>
</div>
{% endblock %}