feat: add the house manager questionnaire per travel and compact the questionnaire layout
This commit is contained in:
1 parent
d760ed3cdf
commit
bfef08b519
50 files changed
+2763
-180
No files matched your search
@@ -13,92 +13,80 @@
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
||||
</th>
|
||||
<th>
|
||||
Vorname
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Einsatz­zeitraum', 'destination.dateFrom') }}
|
||||
{{ knp_pagination_sortable(pagination, 'Reise­zeitraum', 'destination.dateTo') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.product') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'job_profile.name') }}
|
||||
Fragebogen
|
||||
</th>
|
||||
<th>
|
||||
Wochenteam bewerten
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for disposition in pagination %}
|
||||
{% set teamer = disposition.teamer %}
|
||||
{% set assignment = disposition.assignment %}
|
||||
{% 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>
|
||||
{% if teamer.photo %}
|
||||
<img src="{{ asset(teamer.photo | upload_filename_full | imagine_filter('profile')) }}"
|
||||
class="w-12 h-auto rounded-full"
|
||||
alt="{{ teamer.firstName }}">
|
||||
{% else %}
|
||||
<div class="flex flex-col items-center justify-center w-12 h-12 border-2 border-gray-200 rounded-full">
|
||||
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
||||
{{ 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>
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben">
|
||||
<span class="whitespace-nowrap">{{ teamer.lastName }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben">
|
||||
<span class="whitespace-nowrap">{{ teamer.firstName }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben">
|
||||
{{ assignment.destination.dateFrom|date('d.m.Y') }} -
|
||||
<br>
|
||||
{{ assignment.destination.dateTo|date('d.m.Y') }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben"
|
||||
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>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben">
|
||||
{{ assignment.jobProfile.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-1 justify-end">
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid }) }}"
|
||||
title="Feedback abgeben">
|
||||
{{ icon('feedback') }}
|
||||
</a>
|
||||
</div>
|
||||
<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 %}
|
||||
<td colspan="7">
|
||||
Keine Daten...
|
||||
</td>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -46,13 +46,24 @@
|
||||
Ausstehende Feedbacks
|
||||
</h2>
|
||||
<ul class="divide-y divide-gray-200">
|
||||
{% for disposition in pendingFeedbacks %}
|
||||
{% set assignment = disposition.assignment %}
|
||||
{% for row in pendingTravels %}
|
||||
{% set destination = row[0] %}
|
||||
{% set questionnaireOpen = destination.dateTo >= goLive and row.questionnaireStatus != 'submitted' %}
|
||||
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
|
||||
class="flex items-center space-x-1">
|
||||
<a href="{{ questionnaireOpen ? path('app_house_manager_questionnaire_edit', { 'id': destination.id }) : path('app_house_manager_feedback_index') }}"
|
||||
class="flex flex-wrap items-center gap-x-1">
|
||||
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
|
||||
{{ _self.dispositionData(disposition) }}
|
||||
<span class="whitespace-nowrap">{{ destination.dateFrom|date('d.m.y') }} - {{ destination.dateTo|date('d.m.y') }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span>{{ destination.product }}</span>
|
||||
{% if questionnaireOpen %}
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">Fragebogen {{ row.questionnaireStatus == 'draft' ? 'im Entwurf' : 'offen' }}</span>
|
||||
{% endif %}
|
||||
{% if row.openFeedbacks > 0 %}
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ row.openFeedbacks }} {{ row.openFeedbacks == 1 ? 'Bewertung' : 'Bewertungen' }} offen</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{#
|
||||
# "Bewerte dein Wochenteam": the travel's teamers, each linking to the existing rating form until
|
||||
# rated. Not part of the questionnaire's answers; a rating is filed against the placement as
|
||||
# always. Expects `dispositions` (DispositionRepository::findForHouseManagerQuestionnaire()).
|
||||
#}
|
||||
<section class="pt-8">
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Bewerte dein Wochenteam
|
||||
</h2>
|
||||
{% if hint|default(false) %}
|
||||
<p class="pb-4 text-sm text-gray-500">
|
||||
Speichere deinen Fragebogen vorher als Entwurf, sonst gehen deine Eingaben verloren.
|
||||
</p>
|
||||
{% endif %}
|
||||
<ul class="divide-y divide-gray-100">
|
||||
{% for disposition in dispositions %}
|
||||
<li class="flex flex-wrap items-center justify-between gap-2 py-3">
|
||||
<span>
|
||||
<span class="font-bold">{{ disposition.teamer.fullName }}</span>
|
||||
<span class="text-sm text-gray-500">{{ disposition.assignment.jobProfile.name }}</span>
|
||||
</span>
|
||||
{% if disposition.feedback %}
|
||||
<span class="inline-flex items-center gap-x-1 text-sm text-gray-500">
|
||||
{{ icon('check', 'w-4 h-4') }} bewertet
|
||||
</span>
|
||||
{% elseif disposition.feedbackWaived %}
|
||||
<span class="text-sm text-gray-500">nicht nötig</span>
|
||||
{% else %}
|
||||
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
|
||||
class="btn btn--small btn--secondary">
|
||||
{{ icon('feedback', 'w-4 h-4') }}
|
||||
Bewerten
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="py-3 text-gray-500">-</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
@@ -0,0 +1,10 @@
|
||||
{#
|
||||
# The travel a house manager questionnaire is about, in one line above it. Expects `destination`.
|
||||
#}
|
||||
<p class="flex flex-wrap items-center gap-x-2 gap-y-1 pb-8 text-sm text-gray-700">
|
||||
<span class="font-bold text-gray-900">{{ destination.product }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span>{{ destination.hotel }}</span>
|
||||
{% include '_partials/_dot.html.twig' %}
|
||||
<span class="whitespace-nowrap">{{ destination.dateFrom|date('d.m.') }}–{{ destination.dateTo|date('d.m.Y') }}</span>
|
||||
</p>
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Fragebogen zur Reise{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-3xl">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Fragebogen zur Reise
|
||||
</h1>
|
||||
{% include 'house_manager/questionnaire/_travel_summary.html.twig' %}
|
||||
<p class="-mt-6 pb-8 text-sm text-gray-500">
|
||||
Abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr
|
||||
</p>
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': response.context } %}
|
||||
{% include 'house_manager/questionnaire/_team.html.twig' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Fragebogen zur Reise{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-3xl">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Fragebogen zur Reise
|
||||
</h1>
|
||||
{% include 'house_manager/questionnaire/_travel_summary.html.twig' %}
|
||||
{% if lastSaved %}
|
||||
<p class="-mt-6 pb-8 text-sm text-gray-500">
|
||||
Entwurf zuletzt gespeichert am {{ lastSaved|date('d.m.Y, H:i') }} Uhr
|
||||
</p>
|
||||
{% endif %}
|
||||
{% include 'questionnaire/_form.html.twig' %}
|
||||
{% include 'house_manager/questionnaire/_team.html.twig' with { 'hint': true } %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user