feat: keep questionnaires until submitted, remind teamers daily and take bus feedback per leg

This commit is contained in:
fromme committed 2026-11-10 16:38:51 +01:00
1 parent abf9c1be0b
commit e72616fdbf
37 files changed
+1119 -238

No files matched your search

@@ -1,11 +1,11 @@
{% extends 'administrative/layout.html.twig' %}
{% block title %}{{ definition.title }}{% endblock %}
{% block title %}{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}{% endblock %}
{% block content %}
{% set context = response.context %}
<h1 class="text-2xl font-bold pb-4">
{{ definition.title }}
{{ 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
@@ -43,7 +43,7 @@
{% for sibling in siblings %}
<li>
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="underline">
{{ sibling.title }}
{{ sibling.title }}{% if sibling.response.leg %}: {{ sibling.response.leg.label }}{% endif %}
</a>
</li>
{% endfor %}
@@ -56,6 +56,11 @@
<th>
{{ knp_pagination_sortable(pagination, 'Haus', 'destination.hotel') }}
</th>
{% if definition.perBusLeg %}
<th>
{{ knp_pagination_sortable(pagination, 'Fahrt', 'response.leg') }}
</th>
{% endif %}
<th>
{{ knp_pagination_sortable(pagination, 'Abgeschickt', 'response.submittedAt') }}
</th>
@@ -82,6 +87,11 @@
<td>
{{ destination.hotel }}
</td>
{% if definition.perBusLeg %}
<td>
{{ response.leg.label|default('-') }}
</td>
{% endif %}
<td>
{{ response.submittedAt|date('d.m.Y') }}
</td>
@@ -93,7 +103,7 @@
</tr>
{% else %}
<tr>
<td colspan="6">
<td colspan="{{ definition.perBusLeg ? 7 : 6 }}">
Keine Daten...
</td>
</tr>
@@ -36,7 +36,7 @@
{% for item in submitted %}
<section>
<h2 class="text-2xl font-bold pb-4">
{{ item.definition.title }}
{{ item.definition.title }}{% if item.leg %}: {{ item.leg.label }}{% endif %}
</h2>
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %}
</section>
+14
View File
@@ -189,6 +189,20 @@
</section>
{%- endblock questionnaire_part_row -%}
{#
# One bus ride of a per-bus-leg questionnaire (App\Form\QuestionnaireType): its title and its
# sections. Its row carries data-question-key and data-show-if like a conditional question, so the
# questionnaire Stimulus controller shows it only while the leg is chosen.
#}
{%- block questionnaire_leg_row -%}
<div class="pt-4"{% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}>
<h3 class="text-xl font-bold text-primary border-b border-gray-200 pb-2 mb-6">{{ label }}</h3>
{%- for child in form -%}
{{- form_row(child) -}}
{%- endfor -%}
</div>
{%- endblock questionnaire_leg_row -%}
{#
# A section of a questionnaire (App\Form\QuestionnaireType): its title and its questions. The
# questions' rows carry data-question-key and, when conditional, data-show-if, which
+2 -1
View File
@@ -18,7 +18,8 @@
{% if pendingQuestionnaires is not empty %}
{% embed '_partials/_alert.html.twig' with { 'type': 'info' } %}
{% block message %}
<p>Bitte fülle den Fragebogen zu deinem Einsatz aus:</p>
<p class="font-bold">Bitte den Feedbackbogen spätestens drei Tage nach Reiseende ausfüllen.</p>
<p class="pt-1">Offen ist noch:</p>
<ul class="pt-1">
{% for row in pendingQuestionnaires %}
{% set destination = row.disposition.assignment.destination %}
@@ -15,7 +15,7 @@
{% for item in submitted %}
<section>
<h2 class="text-2xl font-bold pb-1">
{{ item.definition.title }}
{{ item.definition.title }}{% if item.response.leg %}: {{ item.response.leg.label }}{% endif %}
</h2>
<p class="pb-6 text-sm text-gray-500">
Abgeschickt am {{ item.response.submittedAt|date('d.m.Y, H:i') }} Uhr