Files
myep-team/templates/house_manager/feedback/index.html.twig
T

97 lines
4.6 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}Ausstehendes Feedback{% endblock %}
{% block content %}
<div class="flex items-start justify-between pb-4">
<h1 class="text-2xl font-bold">
Ausstehendes Feedback
</h1>
</div>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Reise&shy;zeitraum', 'destination.dateTo') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.product') }}
</th>
<th>
Fragebogen
</th>
<th>
Wochenteam bewerten
</th>
</tr>
</thead>
<tbody>
{% for row in pagination %}
{% set destination = row[0] %}
{% set offered = destination.dateTo >= goLive %}
{% set unrated = (placements[destination.id] ?? [])|filter(disposition => disposition.feedback is null and not disposition.feedbackWaived and disposition.teamer != app.user.teamer) %}
<tr>
<td>
{{ destination.dateFrom|date('d.m.Y') }} -
<br>
{{ destination.dateTo|date('d.m.Y') }}
</td>
<td>
<div class="flex items-start space-x-2">
{{ icon('flag-' ~ destination.country, 'w-5 h-5 shrink-0') }}
<div class="flex-1">
{{ destination.product }}
<br>
{{ destination.hotel }}
</div>
</div>
</td>
<td>
{% if not offered %}
-
{% elseif row.questionnaireStatus == 'submitted' %}
<a href="{{ path('app_house_manager_questionnaire_detail', { 'id': destination.id }) }}" class="inline-flex items-center gap-x-1">
{{ icon('check', 'w-4 h-4') }} abgeschickt
</a>
{% else %}
<a href="{{ path('app_house_manager_questionnaire_edit', { 'id': destination.id }) }}" class="btn btn--small whitespace-nowrap">
{{ row.questionnaireStatus == 'draft' ? 'Entwurf fortsetzen' : 'Ausfüllen' }}
</a>
{% endif %}
</td>
<td>
<ul class="flex flex-col gap-y-1">
{% for disposition in unrated %}
<li>
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
title="Feedback abgeben"
class="inline-flex items-center gap-x-1">
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ disposition.teamer.fullName }}</span>
<span class="text-gray-500">{{ disposition.assignment.jobProfile.name }}</span>
</a>
</li>
{% else %}
<li class="inline-flex items-center gap-x-1">
{{ icon('check', 'w-4 h-4') }} alle bewertet
</li>
{% endfor %}
</ul>
</td>
</tr>
{% else %}
<tr>
<td colspan="4">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}