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
@@ -211,8 +211,15 @@
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
title="Den Fragebogen für diesen Einsatz ausprobieren, ohne etwas zu speichern">
|
||||
Fragebogen testen
|
||||
title="Das Reiseleitungsfeedback ansehen und ausprobieren, wie es Teamer:innen dieses Einsatzes bekommen. Es wird nichts gespeichert.">
|
||||
Vorschau Reiseleitungsfeedback
|
||||
</a>
|
||||
<a href="{{ path('app_administrative_questionnaire_test_house_manager', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm"
|
||||
role="menuitem"
|
||||
tabindex="-1"
|
||||
title="Das Hausleitungsfeedback zur Reise dieses Einsatzes ansehen und ausprobieren. Es wird nichts gespeichert.">
|
||||
Vorschau Hausleitungsfeedback
|
||||
</a>
|
||||
</twig:DropDown>
|
||||
</td>
|
||||
|
||||
@@ -8,19 +8,25 @@
|
||||
{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}
|
||||
</h1>
|
||||
<p class="pb-8 text-gray-700">
|
||||
{{ context.teamerName|default('-') }}, abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr
|
||||
{{ response.destination ? context.destinationProduct|default('-') : context.teamerName|default('-') }}, abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr
|
||||
</p>
|
||||
<div class="grid lg:grid-cols-3 gap-8 items-start">
|
||||
<div class="lg:col-span-2">
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers } %}
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
|
||||
</div>
|
||||
<div>
|
||||
{# the snapshot taken on submit, so it shows the placement as the teamer answered for it #}
|
||||
{# the snapshot taken on submit, so it shows the placement or travel as it was answered for #}
|
||||
<h2 class="text-lg font-bold pb-4">
|
||||
Einsatz
|
||||
{{ response.destination ? 'Reise' : 'Einsatz' }}
|
||||
</h2>
|
||||
<dl class="divide-y divide-gray-100 text-sm leading-6">
|
||||
{% for label, value in {
|
||||
{% for label, value in response.destination ? {
|
||||
'Destination': context.destinationProduct|default(null),
|
||||
'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null,
|
||||
'Reisetermin': context.dateFrom|default(null) ? context.dateFrom|date('d.m.Y') ~ ' - ' ~ context.dateTo|date('d.m.Y') : null,
|
||||
'Wochenteam': context.teamers|default([])|map(teamer => teamer.name ~ ' (' ~ teamer.jobProfileName ~ ')')|join(', ') ?: null,
|
||||
'Abgeschickt von': response.updatedBy ?? response.createdBy,
|
||||
} : {
|
||||
'Teamer:in': context.teamerName|default(null),
|
||||
'Jobprofil': context.jobProfileName|default(null),
|
||||
'Destination': context.destinationProduct|default(null),
|
||||
|
||||
@@ -43,16 +43,26 @@
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
{% set aboutTravel = definition.key == 'house_manager_feedback' %}
|
||||
<tr>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Vorname', 'teamer.firstName') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Einsatzzeitraum', 'destination.dateFrom') }}
|
||||
</th>
|
||||
{% if aboutTravel %}
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.product') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Reisezeitraum', 'destination.dateFrom') }}
|
||||
</th>
|
||||
{% else %}
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Vorname', 'teamer.firstName') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Einsatzzeitraum', 'destination.dateFrom') }}
|
||||
</th>
|
||||
{% endif %}
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Haus', 'destination.hotel') }}
|
||||
</th>
|
||||
@@ -70,15 +80,21 @@
|
||||
<tbody>
|
||||
{% for response in pagination %}
|
||||
{% set disposition = response.disposition %}
|
||||
{% set destination = disposition.assignment.destination %}
|
||||
{% set destination = aboutTravel ? response.destination : disposition.assignment.destination %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ disposition.teamer.lastName }}
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.teamer.firstName }}
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</td>
|
||||
{% if aboutTravel %}
|
||||
<td>
|
||||
{{ destination.product }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td>
|
||||
{{ disposition.teamer.lastName }}
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.teamer.firstName }}
|
||||
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ destination.dateFrom|date('d.m.Y') }}-
|
||||
<br>
|
||||
@@ -103,7 +119,7 @@
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="{{ definition.perBusLeg ? 7 : 6 }}">
|
||||
<td colspan="{{ definition.perBusLeg ? 7 : (aboutTravel ? 5 : 6) }}">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Fragebogen testen{% endblock %}
|
||||
{% block title %}Vorschau Reiseleitungsfeedback{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-3xl">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Fragebogen testen
|
||||
Vorschau Reiseleitungsfeedback
|
||||
</h1>
|
||||
{% include 'questionnaire/_assignment_summary.html.twig' %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'warning',
|
||||
'message': 'Testmodus: Der Fragebogen verhält sich wie für Teamer:innen, es wird aber nichts gespeichert.'
|
||||
'message': 'Vorschau: Der Fragebogen verhält sich wie für Teamer:innen, es wird aber nichts gespeichert.'
|
||||
} %}
|
||||
{% set otherVariant = path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'bus_escort': busEscort ? 0 : 1, 'r': app.request.query.get('r') }) %}
|
||||
{% embed '_partials/_alert.html.twig' with { 'type': 'info' } %}
|
||||
@@ -23,7 +23,7 @@
|
||||
{% if busEscort != assignment.hasBusEscort %}
|
||||
Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung.
|
||||
{% endif %}
|
||||
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback testen</a>
|
||||
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback ansehen</a>
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
</div>
|
||||
<div class="pt-8">
|
||||
<a href="{{ path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'r': app.request.query.get('r') }) }}" class="btn btn--secondary">
|
||||
Erneut testen
|
||||
Erneut ausprobieren
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if draft %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'success',
|
||||
'message': 'Der Entwurf wäre jetzt gespeichert. Im Testmodus bleiben die Angaben nur im Formular.'
|
||||
'message': 'Der Entwurf wäre jetzt gespeichert. In der Vorschau bleiben die Angaben nur im Formular.'
|
||||
} %}
|
||||
{% endif %}
|
||||
{% include 'questionnaire/_form.html.twig' %}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Vorschau Hausleitungsfeedback{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="max-w-3xl">
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Vorschau Hausleitungsfeedback
|
||||
</h1>
|
||||
{% include 'house_manager/questionnaire/_travel_summary.html.twig' %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'warning',
|
||||
'message': 'Vorschau: Der Fragebogen verhält sich wie für die Hausleitung, es wird aber nichts gespeichert.'
|
||||
} %}
|
||||
|
||||
{% if submitted is not null %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'success',
|
||||
'message': 'So würde der abgeschickte Fragebogen gespeichert. Ausgeblendete Fragen fallen dabei weg.'
|
||||
} %}
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': submitted } %}
|
||||
<div class="pt-8">
|
||||
<a href="{{ path('app_administrative_questionnaire_test_house_manager', { 'uuid': assignment.uuid, 'r': app.request.query.get('r') }) }}" class="btn btn--secondary">
|
||||
Erneut ausprobieren
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if draft %}
|
||||
{% include '_partials/_alert.html.twig' with {
|
||||
'type': 'success',
|
||||
'message': 'Der Entwurf wäre jetzt gespeichert. In der Vorschau bleiben die Angaben nur im Formular.'
|
||||
} %}
|
||||
{% endif %}
|
||||
{% include 'questionnaire/_form.html.twig' %}
|
||||
<section class="pt-8">
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
Bewerte dein Wochenteam
|
||||
</h2>
|
||||
<p class="pb-2 text-sm text-gray-500">
|
||||
Hier verlinkt die Hausleitung jede:n Teamer:in in die Bewertung:
|
||||
</p>
|
||||
<ul class="list-disc pl-5">
|
||||
{% for disposition in dispositions %}
|
||||
<li>{{ disposition.teamer.fullName }} <span class="text-gray-500">{{ disposition.assignment.jobProfile.name }}</span></li>
|
||||
{% else %}
|
||||
<li>-</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<div class="pt-8">
|
||||
<a href="{{ returnUrl }}" class="underline">
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
{% block body %}
|
||||
<h1>
|
||||
Reminder zu ausstehenden Feedbacks
|
||||
Reminder zu ausstehenden Feedbacks und Fragebögen
|
||||
</h1>
|
||||
{% endblock %}
|
||||
@@ -252,6 +252,158 @@
|
||||
</div>
|
||||
{%- endblock questionnaire_rating_widget -%}
|
||||
|
||||
{#
|
||||
# A questionnaire radio question with short options ("Ja"/"Nein"): the question and a row of
|
||||
# answer buttons on one line, the radios themselves hidden. Stacked on narrow screens.
|
||||
# App\Form\QuestionnaireType picks it by the length of the option labels.
|
||||
#}
|
||||
{%- block questionnaire_inline_choice_row -%}
|
||||
<div{% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}>
|
||||
<div class="sm:flex sm:items-start sm:justify-between sm:gap-x-6">
|
||||
{{- form_label(form, null, { label_attr: { class: 'sm:pb-0 sm:pt-1.5' } }) -}}
|
||||
{{- form_widget(form) -}}
|
||||
</div>
|
||||
{{- form_errors(form) -}}
|
||||
{{- form_help(form) -}}
|
||||
</div>
|
||||
{%- endblock questionnaire_inline_choice_row -%}
|
||||
|
||||
{%- block questionnaire_inline_choice_widget -%}
|
||||
<div class="flex shrink-0 flex-wrap gap-2" role="radiogroup">
|
||||
{%- for child in form -%}
|
||||
<label class="cursor-pointer">
|
||||
{{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}}
|
||||
<span class="{{ html_classes('flex min-w-16 items-center justify-center rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-500 text-red-500': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}">
|
||||
{{- child.vars.label -}}
|
||||
</span>
|
||||
</label>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endblock questionnaire_inline_choice_widget -%}
|
||||
|
||||
{#
|
||||
# A pick of the house manager questionnaire's widgets (App\Form\Questionnaire\AbstractPickType):
|
||||
# its checkbox, its errors, and the fields shown only while it is ticked. The element with
|
||||
# questionnaire-pick__body is hidden by assets/styles/components/questionnaire.css, so it must not
|
||||
# carry a display utility itself: utilities outrank that rule. Layout goes on an inner element.
|
||||
#
|
||||
# A teamer (or "Sonstiges") opens its fields indented below it...
|
||||
#}
|
||||
{%- block questionnaire_pick_row -%}
|
||||
<div class="questionnaire-pick">
|
||||
{{- block('questionnaire_pick_toggle') -}}
|
||||
<div class="questionnaire-pick__body ml-2 border-l-2 border-gray-200 pt-2 pb-1 pl-4">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
{%- for child in form|filter(child => child.vars.name != 'picked') -%}
|
||||
{{- form_row(child) -}}
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock questionnaire_pick_row -%}
|
||||
|
||||
{# ...a guiding type or programme item has its numbers on the same line... #}
|
||||
{%- block questionnaire_pick_inline_row -%}
|
||||
{%- set head_class = 'sm:w-72 sm:shrink-0' -%}
|
||||
<div class="questionnaire-pick sm:flex sm:items-start sm:gap-x-4">
|
||||
{{- block('questionnaire_pick_toggle') -}}
|
||||
<div class="questionnaire-pick__body pt-2 sm:pt-0">
|
||||
<div class="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm">
|
||||
{%- for child in form|filter(child => child.vars.name != 'picked') -%}
|
||||
{{- block('questionnaire_pick_number') -}}
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{{- block('questionnaire_pick_errors') -}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock questionnaire_pick_inline_row -%}
|
||||
|
||||
{# ...and a course type reads "[2] Tage × [3] Std. pro Tag", with the days it took place below. #}
|
||||
{%- block questionnaire_pick_course_row -%}
|
||||
{%- set head_class = 'sm:w-72 sm:shrink-0' -%}
|
||||
<div class="questionnaire-pick sm:flex sm:items-start sm:gap-x-4">
|
||||
{{- block('questionnaire_pick_toggle') -}}
|
||||
<div class="questionnaire-pick__body min-w-0 pt-2 sm:pt-0">
|
||||
<div class="flex flex-col gap-y-2">
|
||||
<div class="flex flex-wrap items-center gap-x-2 text-sm">
|
||||
{%- with { child: form.days } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%}
|
||||
<span class="font-bold" aria-hidden="true">×</span>
|
||||
{%- with { child: form.hours_per_day } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%}
|
||||
</div>
|
||||
<div>
|
||||
<p class="pb-1 text-sm text-gray-700">{{ form.dates.vars.label }}</p>
|
||||
{{- form_widget(form.dates) -}}
|
||||
</div>
|
||||
</div>
|
||||
{{- block('questionnaire_pick_errors') -}}
|
||||
</div>
|
||||
</div>
|
||||
{%- endblock questionnaire_pick_course_row -%}
|
||||
|
||||
{#
|
||||
# The pick's checkbox as a clickable row, and the pick's own errors ("mindestens ein ..."). The
|
||||
# head is what the CSS rule looks into; a row block with the fields beside it sets `head_class`.
|
||||
#}
|
||||
{%- block questionnaire_pick_toggle -%}
|
||||
<div class="questionnaire-pick__head {{ head_class|default('') }}">
|
||||
<label for="{{ form.picked.vars.id }}"
|
||||
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-1.5 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 has-[:checked]:bg-primary/10 has-[:checked]:ring-primary', { 'ring-red-500': errors|length, 'ring-gray-200': not errors|length }) }}">
|
||||
{{- form_widget(form.picked) -}}
|
||||
<span class="text-gray-900">{{ form.picked.vars.label }}</span>
|
||||
</label>
|
||||
{{- form_errors(form) -}}
|
||||
</div>
|
||||
{%- endblock questionnaire_pick_toggle -%}
|
||||
|
||||
{# One number of a pick, its input before its label: "[15] Teilnehmende je Guiding". Expects `child`. #}
|
||||
{%- block questionnaire_pick_number -%}
|
||||
<label class="flex items-center gap-x-2">
|
||||
<span class="w-20">{{- form_widget(child) -}}</span>
|
||||
<span class="{{ html_classes({ 'text-red-500': child.vars.errors|length, 'text-gray-700': not child.vars.errors|length }) }}">{{ child.vars.label }}</span>
|
||||
</label>
|
||||
{%- endblock questionnaire_pick_number -%}
|
||||
|
||||
{# The errors of a pick's fields, under them rather than between them. #}
|
||||
{%- block questionnaire_pick_errors -%}
|
||||
{%- for child in form|filter(child => child.vars.name != 'picked') -%}
|
||||
{{- form_errors(child) -}}
|
||||
{%- endfor -%}
|
||||
{%- endblock questionnaire_pick_errors -%}
|
||||
|
||||
{# The days of a travel to tick, as a row of small buttons, the checkboxes themselves hidden. #}
|
||||
{%- block questionnaire_days_widget -%}
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
{%- for child in form -%}
|
||||
<label class="cursor-pointer">
|
||||
<input type="checkbox" id="{{ child.vars.id }}" name="{{ child.vars.full_name }}" value="{{ child.vars.value }}" class="peer sr-only"{% if child.vars.checked %} checked="checked"{% endif %}>
|
||||
<span class="{{ html_classes('flex items-center rounded-md px-2 py-1 text-xs ring-1 ring-inset peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-500 text-red-500': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}">
|
||||
{{- child.vars.label -}}
|
||||
</span>
|
||||
</label>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- endblock questionnaire_days_widget -%}
|
||||
|
||||
{# A teamer or programme widget's picks, stacked. #}
|
||||
{%- block teamer_guidings_widget -%}
|
||||
<div class="flex flex-col gap-y-2" {{ block('widget_container_attributes') }}>
|
||||
{%- for child in form -%}
|
||||
{{- form_row(child) -}}
|
||||
{%- endfor -%}
|
||||
{%- if form is empty -%}
|
||||
<p class="text-sm text-gray-500">Für diese Reise sind keine Teamer:innen eingeteilt.</p>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endblock teamer_guidings_widget -%}
|
||||
|
||||
{%- block teamer_courses_widget -%}
|
||||
{{- block('teamer_guidings_widget') -}}
|
||||
{%- endblock teamer_courses_widget -%}
|
||||
|
||||
{%- block programme_widget -%}
|
||||
{{- block('teamer_guidings_widget') -}}
|
||||
{%- endblock programme_widget -%}
|
||||
|
||||
{%- block birthday_widget -%}
|
||||
<div class="grid grid-cols-3 gap-x-1">
|
||||
{{ form_widget(form.children['day']) }}
|
||||
|
||||
@@ -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 %}
|
||||
@@ -1,9 +1,11 @@
|
||||
{#
|
||||
# Questionnaire answers, read-only. Expects `definition` (the version they were given under) and
|
||||
# `answers`, keyed by question key. Questions that are hidden or were left open are skipped; an
|
||||
# `answers`, keyed by question key; optionally the response's `context`, whose `teamers` name the
|
||||
# placements the house manager's teamer questions are keyed by. Questions that are hidden or were left open are skipped; an
|
||||
# answer the definition does not know (an option key since renamed) is shown as stored rather
|
||||
# than dropped.
|
||||
#}
|
||||
{% set context = context|default({}) %}
|
||||
<div class="flex flex-col gap-y-8">
|
||||
{% for section in definition.sections %}
|
||||
{% set shown = section.questions|filter(question => answers[question.key] is defined and definition.isVisible(question, answers)) %}
|
||||
@@ -37,6 +39,33 @@
|
||||
{{ answer|map(key => (question.option(key).label ?? key))|join(', ') }}
|
||||
{% elseif question.type.value == 'date' %}
|
||||
{{ answer|date('d.m.Y') }}
|
||||
{% elseif question.type.value in ['teamer_guidings', 'teamer_courses'] %}
|
||||
{# one row per teamer and type; a draft's teamer without a type has nothing to show #}
|
||||
<ul>
|
||||
{% for row in answer|filter(row => row.type is defined) %}
|
||||
<li>
|
||||
<span class="font-bold">{{ context.teamers[row.disposition].name ?? row.disposition }}</span>
|
||||
{{ question.option(row.type).label ?? row.type }}:
|
||||
{% if question.type.value == 'teamer_guidings' %}
|
||||
{{ row.count ?? '-' }} × mit je {{ row.participants ?? '-' }} Teilnehmenden
|
||||
{% else %}
|
||||
{{ row.days ?? '-' }} × {{ (row.hours_per_day ?? '-')|replace({'.': ','}) }} Stunden
|
||||
{%- if row.dates ?? [] is not empty %},
|
||||
{{ row.dates|map(date => date|format_datetime(pattern='EEEEEE dd.MM.', locale='de'))|join(', ') }}
|
||||
{%- endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% elseif question.type.value == 'programme' %}
|
||||
<ul>
|
||||
{% for row in answer.items ?? [] %}
|
||||
<li>{{ question.option(row.item).label ?? row.item }}: {{ row.participants ?? '-' }} Teilnehmende</li>
|
||||
{% endfor %}
|
||||
{% if answer.other is defined %}
|
||||
<li>Sonstiges: {{ answer.other|nl2br }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{{ answer|nl2br }}
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user