feat: let teamers fill in and read their questionnaire

This commit is contained in:
fromme committed 2026-10-27 16:56:49 +01:00
1 parent 2a041d25a0
commit 5e4e574076
11 files changed
+472 -2

No files matched your search

@@ -0,0 +1,42 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}{{ definition.title }}{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-4">
{{ definition.title }}
</h1>
{% if definition.description %}
<p class="pb-8 text-gray-700">
{{ definition.description|nl2br }}
</p>
{% endif %}
<div class="grid lg:grid-cols-3 gap-8 items-start">
<div class="lg:col-span-2">
{{ form_start(form, { attr: { 'data-controller': 'questionnaire', 'data-action': 'change->questionnaire#update' } }) }}
{% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %}
{{ form_row(child) }}
{% endfor %}
<div class="flex flex-wrap items-center gap-4 pt-4">
{{ form_widget(form.submit, { attr: { class: 'btn' } }) }}
{{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }}
</div>
<p class="pt-2 text-sm text-gray-500">
Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen.
Abgeschickt ist er endgültig.
</p>
{{ form_end(form) }}
</div>
<div>
<h2 class="text-lg font-bold pb-4">
Dein Einsatz
</h2>
{% include '_partials/_assignment_info.html.twig' with { 'assignment': disposition.assignment } %}
{% if response %}
<p class="pt-6 text-sm text-gray-500">
Entwurf zuletzt gespeichert am {{ (response.updatedAt ?? response.createdAt)|date('d.m.Y, H:i') }} Uhr
</p>
{% endif %}
</div>
</div>
{% endblock %}