wip: functionality for new role 'management'
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<div class="relative inline-block text-left group">
|
||||
<button type="button" class="flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 focus:ring-offset-gray-100" id="menu-button" aria-expanded="true" aria-haspopup="true">
|
||||
<button type="button" class="flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-0" aria-expanded="true" aria-haspopup="true">
|
||||
<span class="sr-only">Funktionen</span>
|
||||
{{ icon('menu', 'w-6 h-6') }}
|
||||
{{ icon('dots', 'w-6 h-6') }}
|
||||
</button>
|
||||
<div class="hidden group-hover:block absolute right-0 z-10 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1">
|
||||
<div class="py-1" role="none">
|
||||
{% for item in links %}
|
||||
<a href="{{ item.url }}" class="text-gray-700 hover:bg-gray-100 hover:text-gray-900 block px-4 py-2 text-sm" role="menuitem" tabindex="-1"{% if item.target is defined %} target="{{ item.target }}"{% endif %}>
|
||||
{{ item.label }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
<div class="hidden group-hover:block absolute right-0 top-0 z-10 w-56 origin-top-right pt-4" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1">
|
||||
<div class="rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
|
||||
<div class="py-1 menu menu--pulldown" role="none">
|
||||
{% block items %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
role="button"
|
||||
title="Bewerber:innen-Info anzeigen"
|
||||
aria-label="Bewerber:innen-Info anzeigen"
|
||||
hx-get="{{ path('app_admin_teamer_info', { 'uuid': application.teamer.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_teamer_info', { 'uuid': application.teamer.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{% set requirementsMet = true %}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
{% if document.disposition %}
|
||||
{% set url = path('app_administrative_assignment_detail', { 'uuid': document.disposition.assignment.uuid, 'r': return_url() }) %}
|
||||
{% else %}
|
||||
{% set url = path('app_admin_teamer_profile', { 'uuid': document.owner.teamer.uuid, 'r': return_url() }) %}
|
||||
{% set url = path('app_administrative_teamer_profile', { 'uuid': document.owner.teamer.uuid, 'r': return_url() }) %}
|
||||
{% endif %}
|
||||
<a href="{{ url }}" class="flex items-center space-x-1 truncate">
|
||||
{{ icon('download', 'w-4 h-4 shrink-0') }}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<button type="button"
|
||||
class="flex items-center space-x-1"
|
||||
title="Teamer:inneninfo {{ disposition.teamer }}"
|
||||
hx-get="{{ path('app_admin_teamer_info', { 'uuid': disposition.teamer.uuid }) }}"
|
||||
hx-get="{{ path('app_administrative_teamer_info', { 'uuid': disposition.teamer.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<span>{{ disposition.teamer }}</span>
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Einsatz­zeitraum', 'destination.dateFrom') }}
|
||||
</th>
|
||||
@@ -47,7 +50,10 @@
|
||||
{{ knp_pagination_sortable(pagination, 'Bus', 'assignment.pickup') }}
|
||||
</th>
|
||||
<th>
|
||||
Bewerbungen<br>Status
|
||||
Bewerbungen
|
||||
</th>
|
||||
<th>
|
||||
Einteilungen
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -55,6 +61,15 @@
|
||||
<tbody>
|
||||
{% for assignment in pagination %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if assignment.status == 'closed' %}
|
||||
{{ icon('locked', 'w-4 h-4 text-red-500') }}
|
||||
{% elseif assignment.status == 'draft' %}
|
||||
{{ icon('hourglass', 'w-4 h-4 text-yellow-500') }}
|
||||
{% else %}
|
||||
{{ icon('unlocked', 'w-4 h-4') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -
|
||||
@@ -67,8 +82,6 @@
|
||||
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>
|
||||
@@ -84,7 +97,7 @@
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
||||
<br>
|
||||
{{ pickup.time }} Uhr
|
||||
{{ pickup.time }}
|
||||
</a>
|
||||
{% else %}
|
||||
-
|
||||
@@ -92,39 +105,60 @@
|
||||
</td>
|
||||
<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 }}/{{ assignment.availableDispositions - assignment.dispositions|length }}</span>
|
||||
{% if assignment.status == 'closed' %}
|
||||
{{ icon('locked', 'w-4 h-4 text-red-500') }}
|
||||
{% elseif assignment.status == 'draft' %}
|
||||
{{ icon('hourglass', 'w-4 h-4 text-yellow-500') }}
|
||||
{% else %}
|
||||
{{ icon('unlocked', 'w-4 h-4') }}
|
||||
{% endif %}
|
||||
<span>{{ assignment.validApplications|length }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-1 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('copy', 'w-5 h-5') }}
|
||||
</a>
|
||||
{% if is_granted('EDIT', assignment) %}
|
||||
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('edit', 'w-5 h-5') }}
|
||||
<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>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
{% embed '_partials/_dropdown.html.twig' %}
|
||||
{% block items %}
|
||||
<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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% 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 %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<td colspan="8">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user