wip: functionality for new role 'management'
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Teamer:inneninfo {{ teamer }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start">
|
||||
<div class="flex-1 pr-8">
|
||||
{% include '_partials/_teamer_training_info.html.twig' %}
|
||||
{% include '_partials/_teamer_license_info.html.twig' %}
|
||||
<h2 class="text-lg font-bold">
|
||||
Zustiege
|
||||
</h2>
|
||||
<ul class="pb-8 divide-y divide-gray-200">
|
||||
{% for pickup in teamer.pickups %}
|
||||
<li class="py-2">
|
||||
{{ pickup|bpn_pickup_label }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h2 class="text-lg font-bold">
|
||||
Letzte Einsätze
|
||||
</h2>
|
||||
<ul class="pb-4 divide-y divide-gray-200">
|
||||
{% for disposition in recentDispositions %}
|
||||
{% set destination = disposition.assignment.destination %}
|
||||
<li class="py-1">
|
||||
{{ destination.product }}
|
||||
<br>
|
||||
{{ destination.dateFrom|date('d.m.y') }} - {{ destination.dateTo|date('d.m.y') }}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="py-2">
|
||||
-
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-4">
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
||||
class="w-32 h-auto border-2 border-primary"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="border-2 border-primary">
|
||||
{{ icon('user', 'w-32 h-32 text-gray-200') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
||||
<ul class="pb-8 divide-y divide-gray-200">
|
||||
{% if teamer.communication.phone %}
|
||||
<li class="py-2">
|
||||
<a href="tel:{{ teamer.communication.phone }}" class="flex items-center space-x-2 hover:text-primary">
|
||||
{{ icon('phone', 'w-4 h-4') }}
|
||||
<span class="flex-shrink-0">{{ teamer.communication.phone }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="py-2">
|
||||
<a href="tel:{{ teamer.communication.mobile }}" class="flex items-center space-x-2 hover:text-primary">
|
||||
{{ icon('mobile', 'w-4 h-4') }}
|
||||
<span class="flex-shrink-0">{{ teamer.communication.mobile }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="py-2">
|
||||
<a href="mailto:{{ teamer.communication.email }}" class="flex items-center space-x-2 hover:text-primary">
|
||||
{{ icon('at', 'w-4 h-4') }}
|
||||
<span class="flex-shrink-0">{{ teamer.communication.email }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user