137 lines
6.6 KiB
Twig
137 lines
6.6 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Saisoneinsätze{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-start justify-between pb-4">
|
|
<h1 class="text-2xl font-bold">
|
|
Saisoneinsätze
|
|
</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="Saisoneinsätze filtern"
|
|
hx-get="{{ path('app_common_season_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_season_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>
|
|
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
|
</th>
|
|
<th>
|
|
Vorname
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Haus', 'season_assignment.hotelCode') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Zeitraum', 'season_assignment.dateFrom') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'job_profile.name') }}
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for seasonAssignment in pagination %}
|
|
<tr>
|
|
{# an assignment that has not been staffed yet still belongs in the list #}
|
|
{% if seasonAssignment.teamer is not null %}
|
|
<td>
|
|
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}">
|
|
<span class="whitespace-nowrap">{{ seasonAssignment.teamer.lastName }}</span>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}" class="whitespace-nowrap">
|
|
{{ seasonAssignment.teamer.firstName }}
|
|
</a>
|
|
</td>
|
|
{% else %}
|
|
<td colspan="2">
|
|
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}"
|
|
class="whitespace-nowrap text-gray-500">
|
|
noch nicht zugewiesen
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
<td>
|
|
{{ seasonAssignment.hotelCode | house_label }}
|
|
</td>
|
|
<td>
|
|
<span class="whitespace-nowrap">
|
|
{{ seasonAssignment.dateFrom | date('d.m.Y') }} - {{ seasonAssignment.dateTo | date('d.m.Y') }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
{{ seasonAssignment.jobProfile.name }}
|
|
</td>
|
|
<td>
|
|
<twig:DropDown>
|
|
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
|
role="menuitem"
|
|
tabindex="-1">
|
|
Details
|
|
</a>
|
|
<a href="{{ path('app_administrative_season_assignment_edit', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
|
role="menuitem"
|
|
tabindex="-1">
|
|
bearbeiten
|
|
</a>
|
|
<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_season_assignment_delete', { 'uuid': seasonAssignment.uuid }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
löschen
|
|
</button>
|
|
</twig:DropDown>
|
|
{% if seasonAssignment.deleted %}
|
|
<div class="py-1 px-2 mt-2 text-xs bg-gray-500 text-white">
|
|
gel. am {{ seasonAssignment.deletedAt | date('d.m.Y') }}
|
|
</div>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="6">
|
|
Keine Daten...
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ knp_pagination_render(pagination) }}
|
|
</div>
|
|
</div>
|
|
|
|
<a href="{{ path('app_administrative_season_assignment_create', { 'r': return_url() }) }}" class="btn">
|
|
Neu
|
|
</a>
|
|
{% endblock %}
|