201 lines
10 KiB
Twig
201 lines
10 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Einsatzübersicht{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-start justify-between pb-4">
|
|
<h1 class="text-2xl font-bold">
|
|
Einsatzübersicht
|
|
</h1>
|
|
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
|
|
<button type="button"
|
|
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
|
title="Filter"
|
|
hx-get="{{ path('app_common_assignment_filter', { 'r': return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('filter', 'w-4 h-4 shrink-0') }}
|
|
{% if filterDto.active %}
|
|
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
|
|
{% else %}
|
|
<span>Filter</span>
|
|
{% endif %}
|
|
</button>
|
|
{% if filterDto.active %}
|
|
<a href="{{ path('app_common_assignment_filter_reset', { 'r': return_url() }) }}" class="btn btn--small btn--secondary">
|
|
Reset
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="data-table-wrapper">
|
|
<div class="data-table-wrapper__inner">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Status
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Einsatz­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', 'assignment.pickup') }}
|
|
</th>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<th>
|
|
Bewerbungen
|
|
</th>
|
|
{% endif %}
|
|
<th>
|
|
Einteilungen
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for assignment in pagination %}
|
|
<tr>
|
|
<td>
|
|
<div class="flex flex-col items-center space-y-2">
|
|
{% if assignment.status == 'draft' %}
|
|
{{ icon('hourglass', 'w-4 h-4') }}
|
|
{% else %}
|
|
{% if assignment.staffed %}
|
|
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-green-500">
|
|
<circle cx="3" cy="3" r="2" />
|
|
</svg>
|
|
{% elseif assignment.partlyStaffed %}
|
|
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-yellow-500">
|
|
<circle cx="3" cy="3" r="2" />
|
|
</svg>
|
|
{% elseif assignment.inProgress %}
|
|
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-blue-500">
|
|
<circle cx="3" cy="3" r="2" />
|
|
</svg>
|
|
{% else %}
|
|
<svg viewBox="0 0 5 5" class="h-4 w-4 fill-current text-gray-100">
|
|
<circle cx="3" cy="3" r="2" />
|
|
</svg>
|
|
{% endif %}
|
|
{% if assignment.status == 'closed' %}
|
|
{{ icon('locked', 'w-4 h-4 text-red-500') }}
|
|
{% else %}
|
|
{{ icon('unlocked', 'w-4 h-4') }}
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
|
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -
|
|
<br>
|
|
{{ assignment.effectivePeriod.end|date('d.m.Y') }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_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.hotel }}
|
|
</div>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
|
{{ assignment.jobProfile.name }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{% if assignment.pickup %}
|
|
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
|
{% if pickup %}
|
|
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
|
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
|
<br>
|
|
{{ pickup.time }}
|
|
</a>
|
|
{% else %}
|
|
<span class="text-red-500">ungültiger Zustieg</span>
|
|
{% endif %}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
{% if is_granted('ROLE_ADMIN') %}
|
|
<td>
|
|
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
|
|
<span>{{ assignment.validApplications|length }}</span>
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
<span>{{ assignment.dispositions|length }}/{{ assignment.availableDispositions }}</span>
|
|
<ul>
|
|
{% for disposition in assignment.dispositions %}
|
|
<li>
|
|
<div role="button"
|
|
title="Teamer:innen-Info anzeigen"
|
|
aria-label="Teamer:innen-Info anzeigen"
|
|
hx-get="{{ path('app_administrative_teamer_info', { 'uuid': disposition.teamer.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<span class="whitespace-nowrap">{{ disposition.teamer }}</span>
|
|
<twig:RatingStars averageRating="{{ disposition.teamer.averageRating }}" />
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<twig:DropDown>
|
|
<button type="button"
|
|
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
löschen
|
|
</button>
|
|
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
|
role="menuitem"
|
|
tabindex="-1">
|
|
duplizieren
|
|
</a>
|
|
{% if is_granted('EDIT', assignment) %}
|
|
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
|
role="menuitem"
|
|
tabindex="-1">
|
|
bearbeiten
|
|
</a>
|
|
{% endif %}
|
|
</twig:DropDown>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="8">
|
|
Keine Daten...
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ knp_pagination_render(pagination) }}
|
|
</div>
|
|
</div>
|
|
<a href="{{ path('app_administrative_assignment_create') }}" class="btn">
|
|
Neu
|
|
</a>
|
|
{% endblock %} |