wip: functionality for new role 'management'

This commit is contained in:
Björn Fromme
2024-02-14 14:59:47 +01:00
parent 7f05cf30b6
commit 7c7addf531
17 changed files with 312 additions and 68 deletions
@@ -0,0 +1,78 @@
{% extends 'administrative/layout.html.twig' %}
{% block title %}Vergangene Einsätze & Feeback {{ teamer }}{% endblock %}
{% block content %}
<div class="grid lg:grid-cols-3 gap-y-8 lg:gap-y-0 lg:gap-x-8">
<div>
{% if is_granted('ROLE_MANAGER') %}
{{ knp_menu_render(knp_menu_get('manager_teamer')) }}
{% elseif is_granted('ROLE_ADMIN') %}
{{ knp_menu_render(knp_menu_get('admin_teamer')) }}
{% endif %}
</div>
<div class="lg:col-span-2">
<h1 class="text-2xl font-bold pb-8">
Vergangene Einsätze &amp; Feeback {{ teamer }}
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
Einsatz
</th>
<th>
Gesamtnote
</th>
<th>
Kommentar öffentlich/intern
</th>
</tr>
</thead>
<tbody>
{% for disposition in pagination %}
<tr>
<td>
{{ disposition.assignment.destination.dateFrom|date('d.m.Y') }}
<br>
{{ disposition.assignment.destination.product }}
<br>
{{ disposition.assignment.destination.hotel }}
</td>
<td>
{% if disposition.feedback %}
{{ disposition.feedback.averageRating|format_rating }}
{% else %}
-
{% endif %}
</td>
<td>
{% if disposition.feedback %}
<div class="divide-y">
<div class="pb-2">
{{ disposition.feedback.comment|default('-') }}
</div>
<div class="pt-2">
{{ disposition.feedback.commentInternal|default('-') }}
</div>
</div>
{% else %}
-
{% endif %}
</td>
</tr>
{% else %}
<td colspan="7">
Keine Daten...
</td>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
</div>
{% endblock %}