Files
myep-team/templates/admin/application/index.html.twig
T

111 lines
6.2 KiB
Twig

{% extends 'admin/layout.html.twig' %}
{% block title %}Bewerbungsübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Bewerbungsübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;zeitraum', 'destination.dateFrom') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.product') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'job_profile.name') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Bus', 'destination.pickup') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Bewerber:in', 'teamer.lastName') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for application in pagination %}
{% set assignment = application.assignment %}
<tr>
<td>
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -
{{ assignment.effectivePeriod.end|date('d.m.Y') }}
</a>
</td>
<td>
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="flex items-start space-x-2">
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }}
<div class="flex-1">
{{ assignment.destination.product }}
<br>
{{ assignment.destination.hotel }}
</div>
</a>
</td>
<td>
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
{{ assignment.jobProfile.name }}
</a>
</td>
<td>
{% if assignment.pickup %}
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
<br>
{{ pickup.time }} Uhr
</a>
{% else %}
-
{% endif %}
</td>
<td>
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
{{ application.teamer }}
</a>
</td>
<td>
<div class="flex items-center justify-end space-x-1"
role="button"
title="Bewerber:innen-Info anzeigen"
aria-label="Bewerber:innen-Info anzeigen"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', 'click', {
'title': 'Teamer:innen-Info ' ~ application.teamer,
'url': path('app_admin_application_info', { 'uuid': application.uuid })
}) }}>
{% if assignment.pickup %}
{% if application.matchesPickup %}
{{ icon('bus', 'w-5 h-5 text-green-500 shrink-0') }}
{% else %}
{{ icon('bus', 'w-5 h-5 text-red-500 shrink-0') }}
{% endif %}
{% endif %}
{% set requiredTrainingsCount = assignment.jobProfile.requiredTrainings|length %}
{% if not application.matchesRequiredTrainings %}
{{ icon('alert', 'w-5 h-5 text-red-500 shrink-0') }}
{% endif %}
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="6">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}