feat: put the placement in one line above the questionnaire

This commit is contained in:
fromme committed 2026-10-27 17:27:40 +01:00
1 parent a0170f5952
commit af97468b2d
6 files changed
+36 -33

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@
key: teamer_feedback key: teamer_feedback
version: 1 version: 1
title: "Reiseleiter/-in Feedback" title: "Wochenteamer:innen-Feedback"
description: |- description: |-
Nur durch euer Feedback können wir besser werden! 🙂 Nur durch euer Feedback können wir besser werden! 🙂
@@ -3,9 +3,11 @@
{% block title %}Fragebogen testen{% endblock %} {% block title %}Fragebogen testen{% endblock %}
{% block content %} {% block content %}
<h1 class="text-2xl font-bold pb-4"> <div class="max-w-3xl">
<h1 class="text-2xl font-bold pb-2">
Fragebogen testen Fragebogen testen
</h1> </h1>
{% include 'questionnaire/_assignment_summary.html.twig' %}
{% include '_partials/_alert.html.twig' with { {% include '_partials/_alert.html.twig' with {
'type': 'warning', 'type': 'warning',
'message': 'Testmodus: Der Fragebogen verhält sich wie für Teamer:innen, es wird aber nichts gespeichert.' 'message': 'Testmodus: Der Fragebogen verhält sich wie für Teamer:innen, es wird aber nichts gespeichert.'
@@ -24,8 +26,7 @@
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback testen</a> <a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback testen</a>
{% endblock %} {% endblock %}
{% endembed %} {% endembed %}
<div class="grid lg:grid-cols-3 gap-8 items-start">
<div class="lg:col-span-2">
{% if submitted is not null %} {% if submitted is not null %}
{% include '_partials/_alert.html.twig' with { {% include '_partials/_alert.html.twig' with {
'type': 'success', 'type': 'success',
@@ -55,17 +56,11 @@
{% endif %} {% endif %}
{% include 'questionnaire/_form.html.twig' %} {% include 'questionnaire/_form.html.twig' %}
{% endif %} {% endif %}
</div>
<div>
<h2 class="text-lg font-bold pb-4">
Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' %}
<div class="pt-8"> <div class="pt-8">
<a href="{{ returnUrl }}" class="underline"> <a href="{{ returnUrl }}" class="underline">
zurück zurück
</a> </a>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
@@ -0,0 +1,17 @@
{#
# The placement a questionnaire is about, in one line above the form: just enough to know which
# one it is. Expects `assignment`.
#}
{% set destination = assignment.destination %}
{% set pickup = assignment.hasBusEscort ? destination.pickup(assignment.pickup) : null %}
<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">{{ assignment.jobProfile.name }}</span>
{% include '_partials/_dot.html.twig' %}
<span>{{ destination.product }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ destination.dateFrom|date('d.m.') }}–{{ destination.dateTo|date('d.m.Y') }}</span>
{% if pickup %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">Busbegleitung ab {{ pickup.city }}</span>
{% endif %}
</p>
@@ -3,14 +3,15 @@
{% block title %}Fragebogen zu deinem Einsatz{% endblock %} {% block title %}Fragebogen zu deinem Einsatz{% endblock %}
{% block content %} {% block content %}
<h1 class="text-2xl font-bold pb-4"> <div class="max-w-3xl">
<h1 class="text-2xl font-bold pb-2">
Fragebogen zu deinem Einsatz Fragebogen zu deinem Einsatz
</h1> </h1>
{% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %}
<p class="pb-8 text-gray-700"> <p class="pb-8 text-gray-700">
Danke für dein Feedback! Danke für dein Feedback!
</p> </p>
<div class="grid lg:grid-cols-3 gap-8 items-start"> <div class="flex flex-col gap-y-12">
<div class="lg:col-span-2 flex flex-col gap-y-12">
{% for item in submitted %} {% for item in submitted %}
<section> <section>
<h2 class="text-2xl font-bold pb-1"> <h2 class="text-2xl font-bold pb-1">
@@ -28,11 +29,5 @@
</a> </a>
{% endif %} {% endif %}
</div> </div>
<div>
<h2 class="text-lg font-bold pb-4">
Dein Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' with { 'assignment': disposition.assignment } %}
</div>
</div> </div>
{% endblock %} {% endblock %}
+5 -12
View File
@@ -3,23 +3,16 @@
{% block title %}Fragebogen zu deinem Einsatz{% endblock %} {% block title %}Fragebogen zu deinem Einsatz{% endblock %}
{% block content %} {% block content %}
<h1 class="text-2xl font-bold pb-8"> <div class="max-w-3xl">
<h1 class="text-2xl font-bold pb-2">
Fragebogen zu deinem Einsatz Fragebogen zu deinem Einsatz
</h1> </h1>
<div class="grid lg:grid-cols-3 gap-8 items-start"> {% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %}
<div class="lg:col-span-2">
{% include 'questionnaire/_form.html.twig' %}
</div>
<div>
<h2 class="text-lg font-bold pb-4">
Dein Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' with { 'assignment': disposition.assignment } %}
{% if lastSaved %} {% if lastSaved %}
<p class="pt-6 text-sm text-gray-500"> <p class="-mt-6 pb-8 text-sm text-gray-500">
Entwurf zuletzt gespeichert am {{ lastSaved|date('d.m.Y, H:i') }} Uhr Entwurf zuletzt gespeichert am {{ lastSaved|date('d.m.Y, H:i') }} Uhr
</p> </p>
{% endif %} {% endif %}
</div> {% include 'questionnaire/_form.html.twig' %}
</div> </div>
{% endblock %} {% endblock %}
@@ -75,6 +75,9 @@ class EditControllerTest extends WebTestCase
$crawler = $this->open($this->placement(busEscort: true)); $crawler = $this->open($this->placement(busEscort: true));
$this->assertResponseIsSuccessful(); $this->assertResponseIsSuccessful();
// the placement in one line above the form
$this->assertStringContainsString('Reiseleitung', $crawler->filter('h1 + p')->text());
$this->assertStringContainsString('Busbegleitung ab Stuttgart', $crawler->filter('h1 + p')->text());
$this->assertCount(1, $crawler->filter('[data-question-key="teamer_feedback.office_briefing_rating"]')); $this->assertCount(1, $crawler->filter('[data-question-key="teamer_feedback.office_briefing_rating"]'));
$this->assertCount(1, $crawler->filter('[data-question-key="bus_feedback.bus_company"]')); $this->assertCount(1, $crawler->filter('[data-question-key="bus_feedback.bus_company"]'));
} }
@@ -121,7 +124,7 @@ class EditControllerTest extends WebTestCase
// the read-only view shows both, and the form is closed // the read-only view shows both, and the form is closed
$crawler = $this->client->followRedirect(); $crawler = $this->client->followRedirect();
$this->assertStringContainsString('Reiseleiter/-in Feedback', $crawler->text()); $this->assertStringContainsString('Wochenteamer:innen-Feedback', $crawler->text());
$this->assertStringContainsString('Bus-Feedback', $crawler->text()); $this->assertStringContainsString('Bus-Feedback', $crawler->text());
$this->open($disposition); $this->open($disposition);
$this->assertResponseRedirects(sprintf('/teamer/questionnaire/%s/detail', $disposition->getUuid())); $this->assertResponseRedirects(sprintf('/teamer/questionnaire/%s/detail', $disposition->getUuid()));