style: restyle the questionnaire views

This commit is contained in:
fromme committed 2026-11-12 11:36:18 +01:00
1 parent 6b16c88a5b
commit 3c19401d8b
15 files changed
+92 -98

No files matched your search

+1 -1
View File
@@ -302,7 +302,7 @@ class QuestionnaireType extends AbstractType
'value' => $question->showIf->value, 'value' => $question->showIf->value,
], JSON_THROW_ON_ERROR), ], JSON_THROW_ON_ERROR),
// a follow-up is indented under the question that opened it // a follow-up is indented under the question that opened it
'class' => '-mt-2 border-l-2 border-gray-200 pl-4', 'class' => '-mt-2 border-l-2 border-line pl-4',
]), ]),
]; ];
@@ -4,22 +4,26 @@
{% block content %} {% block content %}
{% set context = response.context %} {% set context = response.context %}
<h1 class="text-2xl font-bold pb-4"> <a href="{{ returnUrl }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
<span>zurück</span>
</a>
<h1 class="text-2xl font-bold pb-1">
{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %} {{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}
</h1> </h1>
<p class="pb-8 text-gray-700"> <p class="pb-6 text-muted">
{{ response.destination ? context.destinationProduct|default('-') : 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> </p>
<div class="grid lg:grid-cols-3 gap-8 items-start"> <div class="grid lg:grid-cols-3 gap-6 items-start">
<div class="lg:col-span-2"> <div class="lg:col-span-2">
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %} {% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
</div> </div>
<div> <aside class="card p-5">
{# the snapshot taken on submit, so it shows the placement or travel as it was answered for #} {# 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"> <h2 class="section-title pb-3">
{{ response.destination ? 'Reise' : 'Einsatz' }} {{ response.destination ? 'Reise' : 'Einsatz' }}
</h2> </h2>
<dl class="divide-y divide-gray-100 text-sm leading-6"> <dl class="grid grid-cols-[minmax(0,8rem)_minmax(0,1fr)] gap-x-4 gap-y-2">
{% for label, value in response.destination ? { {% for label, value in response.destination ? {
'Destination': context.destinationProduct|default(null), 'Destination': context.destinationProduct|default(null),
'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null, 'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null,
@@ -35,31 +39,24 @@
'Busbegleitung ab': context.escortPickup|default(null) ? context.escortPickup.city ~ ', ' ~ context.escortPickup.street ~ (context.escortPickup.time ? ', ' ~ context.escortPickup.time ~ ' Uhr' : '') : null, 'Busbegleitung ab': context.escortPickup|default(null) ? context.escortPickup.city ~ ', ' ~ context.escortPickup.street ~ (context.escortPickup.time ? ', ' ~ context.escortPickup.time ~ ' Uhr' : '') : null,
'Abfahrt Hinfahrt': context.escortPickupDate|default(null) ? context.escortPickupDate|date('d.m.Y') : null, 'Abfahrt Hinfahrt': context.escortPickupDate|default(null) ? context.escortPickupDate|date('d.m.Y') : null,
} %} } %}
<div class="py-3 first:pt-0 grid grid-cols-3 gap-4"> <dt class="text-muted">{{ label }}</dt>
<dt class="font-bold text-gray-900">{{ label }}</dt> <dd class="break-words">{{ (value ?? '-') }}</dd>
<dd class="col-span-2 text-gray-700">{{ (value ?? '-') }}</dd>
</div>
{% endfor %} {% endfor %}
</dl> </dl>
{% if siblings is not empty %} {% if siblings is not empty %}
<h2 class="text-lg font-bold pt-8 pb-2"> <h2 class="section-title mt-5 border-t border-line pt-4 pb-2">
Zum selben Einsatz Zum selben Einsatz
</h2> </h2>
<ul> <ul class="flex flex-col gap-y-1">
{% for sibling in siblings %} {% for sibling in siblings %}
<li> <li>
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="underline"> <a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': sibling.response.uuid, 'r': app.request.query.get('r') }) }}" class="font-bold text-brand underline underline-offset-2 hover:text-brand-dark">
{{ sibling.title }}{% if sibling.response.leg %}: {{ sibling.response.leg.label }}{% endif %} {{ sibling.title }}{% if sibling.response.leg %}: {{ sibling.response.leg.label }}{% endif %}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
<div class="pt-8"> </aside>
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
@@ -4,19 +4,9 @@
{% block content %} {% block content %}
<div class="flex items-start justify-between pb-4"> <div class="flex items-start justify-between pb-4">
<div> <h1 class="text-2xl font-bold">
<h1 class="text-2xl font-bold pb-2"> Fragebögen
Fragebögen: {{ definition.title }}
</h1> </h1>
<div class="flex flex-wrap gap-2">
{% for other in definitions %}
<a href="{{ path('app_administrative_questionnaire_index', { 'questionnaire': other.key }) }}"
class="{{ html_classes('btn btn--small', { 'btn--secondary': other.key != definition.key }) }}">
{{ other.title }}
</a>
{% endfor %}
</div>
</div>
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0"> <div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
<button type="button" <button type="button"
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}" class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
@@ -38,6 +28,15 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{# one tab per questionnaire, as the record tabs (_partials/_tabs.html.twig) #}
<nav aria-label="Fragebögen" class="flex overflow-x-auto border-b border-line mb-6">
{% for other in definitions %}
{% set current = other.key == definition.key %}
<a href="{{ path('app_administrative_questionnaire_index', { 'questionnaire': other.key }) }}"
class="{{ html_classes('-mb-px shrink-0 whitespace-nowrap border-b-4 px-3 py-2 text-sm', { 'border-brand-bright font-bold text-brand': current, 'border-transparent text-ink hover:text-brand': not current }) }}"
{% if current %}aria-current="page"{% endif %}>{{ other.title }}</a>
{% endfor %}
</nav>
<div class="data-table-wrapper"> <div class="data-table-wrapper">
<div class="data-table-wrapper__inner"> <div class="data-table-wrapper__inner">
@@ -112,7 +111,7 @@
{{ response.submittedAt|date('d.m.Y') }} {{ response.submittedAt|date('d.m.Y') }}
</td> </td>
<td> <td>
<a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': response.uuid, 'r': return_url() }) }}" title="Fragebogen anzeigen"> <a href="{{ path('app_administrative_questionnaire_detail', { 'uuid': response.uuid, 'r': return_url() }) }}" class="text-brand hover:text-brand-dark" title="Fragebogen anzeigen">
{{ icon('info', 'w-4 h-4') }} {{ icon('info', 'w-4 h-4') }}
</a> </a>
</td> </td>
@@ -120,7 +119,7 @@
{% else %} {% else %}
<tr> <tr>
<td colspan="{{ definition.perBusLeg ? 7 : (aboutTravel ? 5 : 6) }}"> <td colspan="{{ definition.perBusLeg ? 7 : (aboutTravel ? 5 : 6) }}">
Keine Daten... <span class="text-muted">Keine Fragebögen gefunden.</span>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
@@ -4,6 +4,10 @@
{% block content %} {% block content %}
<div class="max-w-3xl"> <div class="max-w-3xl">
<a href="{{ returnUrl }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
<span>zurück</span>
</a>
<h1 class="text-2xl font-bold pb-2"> <h1 class="text-2xl font-bold pb-2">
Vorschau Reiseleitungsfeedback Vorschau Reiseleitungsfeedback
</h1> </h1>
@@ -23,7 +27,7 @@
{% if busEscort != assignment.hasBusEscort %} {% if busEscort != assignment.hasBusEscort %}
Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung. Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung.
{% endif %} {% endif %}
<a href="{{ otherVariant }}" class="underline">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback ansehen</a> <a href="{{ otherVariant }}" class="font-bold text-brand underline underline-offset-2 hover:text-brand-dark">{{ busEscort ? 'Ohne' : 'Mit' }} Bus-Feedback ansehen</a>
{% endblock %} {% endblock %}
{% endembed %} {% endembed %}
@@ -35,7 +39,7 @@
<div class="flex flex-col gap-y-12"> <div class="flex flex-col gap-y-12">
{% for item in submitted %} {% for item in submitted %}
<section> <section>
<h2 class="text-2xl font-bold pb-4"> <h2 class="text-xl font-bold text-brand pb-4">
{{ item.definition.title }}{% if item.leg %}: {{ item.leg.label }}{% endif %} {{ item.definition.title }}{% if item.leg %}: {{ item.leg.label }}{% endif %}
</h2> </h2>
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %} {% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %}
@@ -57,10 +61,5 @@
{% include 'questionnaire/_form.html.twig' %} {% include 'questionnaire/_form.html.twig' %}
{% endif %} {% endif %}
<div class="pt-8">
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div> </div>
{% endblock %} {% endblock %}
@@ -4,6 +4,10 @@
{% block content %} {% block content %}
<div class="max-w-3xl"> <div class="max-w-3xl">
<a href="{{ returnUrl }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
<span>zurück</span>
</a>
<h1 class="text-2xl font-bold pb-2"> <h1 class="text-2xl font-bold pb-2">
Vorschau Hausleitungsfeedback Vorschau Hausleitungsfeedback
</h1> </h1>
@@ -32,16 +36,16 @@
} %} } %}
{% endif %} {% endif %}
{% include 'questionnaire/_form.html.twig' %} {% include 'questionnaire/_form.html.twig' %}
<section class="pt-8"> <section class="card mt-6 p-5">
<h2 class="text-xl font-bold pb-2"> <h2 class="section-title pb-2">
Bewerte dein Wochenteam Bewerte dein Wochenteam
</h2> </h2>
<p class="pb-2 text-sm text-gray-500"> <p class="pb-2 text-sm text-muted">
Hier verlinkt die Hausleitung jede:n Teamer:in in die Bewertung: Hier verlinkt die Hausleitung jede:n Teamer:in in die Bewertung:
</p> </p>
<ul class="list-disc pl-5"> <ul class="list-disc pl-5">
{% for disposition in dispositions %} {% for disposition in dispositions %}
<li>{{ disposition.teamer.fullName }} <span class="text-gray-500">{{ disposition.assignment.jobProfile.name }}</span></li> <li>{{ disposition.teamer.fullName }} <span class="text-muted">{{ disposition.assignment.jobProfile.name }}</span></li>
{% else %} {% else %}
<li>-</li> <li>-</li>
{% endfor %} {% endfor %}
@@ -49,10 +53,5 @@
</section> </section>
{% endif %} {% endif %}
<div class="pt-8">
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div> </div>
{% endblock %} {% endblock %}
+17 -17
View File
@@ -178,10 +178,10 @@
# several: its title, its description and its sections. # several: its title, its description and its sections.
#} #}
{%- block questionnaire_part_row -%} {%- block questionnaire_part_row -%}
<section class="pb-4"> <section class="card mb-6 p-5 sm:p-6">
<h2 class="text-2xl font-bold pb-2">{{ label }}</h2> <h2 class="text-xl font-bold text-brand pb-2">{{ label }}</h2>
{%- if help is not empty -%} {%- if help is not empty -%}
<p class="pb-6 text-gray-700">{{ help|nl2br }}</p> <p class="pb-6 text-muted">{{ help|nl2br }}</p>
{%- endif -%} {%- endif -%}
{%- for child in form -%} {%- for child in form -%}
{{- form_row(child) -}} {{- form_row(child) -}}
@@ -196,7 +196,7 @@
#} #}
{%- block questionnaire_leg_row -%} {%- block questionnaire_leg_row -%}
<div class="pt-4"{% with { attr: row_attr } %}{{ block('attributes') }}{% endwith %}> <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> <h3 class="text-lg font-bold text-brand border-b-2 border-brand pb-2 mb-6">{{ label }}</h3>
{%- for child in form -%} {%- for child in form -%}
{{- form_row(child) -}} {{- form_row(child) -}}
{%- endfor -%} {%- endfor -%}
@@ -211,7 +211,7 @@
{%- block questionnaire_section_row -%} {%- block questionnaire_section_row -%}
<fieldset class="pb-8"> <fieldset class="pb-8">
{%- if label is not same as(false) -%} {%- if label is not same as(false) -%}
<legend class="text-xl font-bold pb-4">{{ label }}</legend> <legend class="section-title pb-4">{{ label }}</legend>
{%- endif -%} {%- endif -%}
<div class="flex flex-col gap-y-6"> <div class="flex flex-col gap-y-6">
{%- for child in form -%} {%- for child in form -%}
@@ -230,9 +230,9 @@
<div class="flex flex-col gap-y-1" {{ block('widget_container_attributes') }}> <div class="flex flex-col gap-y-1" {{ block('widget_container_attributes') }}>
{%- for child in form -%} {%- for child in form -%}
<label for="{{ child.vars.id }}" <label for="{{ child.vars.id }}"
class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-2 text-sm ring-1 ring-inset transition-colors hover:bg-gray-100 has-[:checked]:bg-primary/10 has-[:checked]:ring-primary', { 'ring-red-700': errors|length, 'ring-gray-200': not errors|length }) }}"> class="{{ html_classes('flex cursor-pointer select-none items-center gap-x-3 rounded-md px-3 py-2 text-sm ring-1 ring-inset transition-colors hover:bg-page has-[:checked]:bg-brand-light has-[:checked]:ring-brand', { 'ring-red-700': errors|length, 'ring-line': not errors|length }) }}">
{{- form_widget(child, { attr: { class: 'h-4 w-4 shrink-0 border-gray-300 text-primary focus:ring-primary' } }) -}} {{- form_widget(child, { attr: { class: 'h-4 w-4 shrink-0 border-slate-500 text-brand focus:ring-brand-bright' } }) -}}
<span class="text-gray-900">{{ child.vars.label }}</span> <span class="text-ink">{{ child.vars.label }}</span>
</label> </label>
{%- endfor -%} {%- endfor -%}
</div> </div>
@@ -244,7 +244,7 @@
{%- for child in form -%} {%- for child in form -%}
<label class="cursor-pointer"> <label class="cursor-pointer">
{{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}} {{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}}
<span class="{{ html_classes('flex h-10 w-10 items-center justify-center rounded-md text-sm font-bold ring-1 ring-inset peer-checked:bg-primary peer-checked:text-white peer-checked:ring-primary peer-focus-visible:ring-2', { 'ring-red-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}"> <span class="{{ html_classes('flex h-10 w-10 items-center justify-center rounded-md text-sm font-bold ring-1 ring-inset peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
{{- child.vars.label -}} {{- child.vars.label -}}
</span> </span>
</label> </label>
@@ -273,7 +273,7 @@
{%- for child in form -%} {%- for child in form -%}
<label class="cursor-pointer"> <label class="cursor-pointer">
{{- form_widget(child, { attr: { class: 'peer sr-only' } }) -}} {{- 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-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}"> <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-page peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
{{- child.vars.label -}} {{- child.vars.label -}}
</span> </span>
</label> </label>
@@ -292,7 +292,7 @@
{%- block questionnaire_pick_row -%} {%- block questionnaire_pick_row -%}
<div class="questionnaire-pick"> <div class="questionnaire-pick">
{{- block('questionnaire_pick_toggle') -}} {{- 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="questionnaire-pick__body ml-2 border-l-2 border-line pt-2 pb-1 pl-4">
<div class="flex flex-col gap-y-2"> <div class="flex flex-col gap-y-2">
{%- for child in form|filter(child => child.vars.name != 'picked') -%} {%- for child in form|filter(child => child.vars.name != 'picked') -%}
{{- form_row(child) -}} {{- form_row(child) -}}
@@ -331,7 +331,7 @@
{%- with { child: form.hours_per_day } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%} {%- with { child: form.hours_per_day } -%}{{- block('questionnaire_pick_number') -}}{%- endwith -%}
</div> </div>
<div> <div>
<p class="pb-1 text-sm text-gray-700">{{ form.dates.vars.label }}</p> <p class="pb-1 text-sm text-muted">{{ form.dates.vars.label }}</p>
{{- form_widget(form.dates) -}} {{- form_widget(form.dates) -}}
</div> </div>
</div> </div>
@@ -347,9 +347,9 @@
{%- block questionnaire_pick_toggle -%} {%- block questionnaire_pick_toggle -%}
<div class="questionnaire-pick__head {{ head_class|default('') }}"> <div class="questionnaire-pick__head {{ head_class|default('') }}">
<label for="{{ form.picked.vars.id }}" <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-700': errors|length, 'ring-gray-200': not errors|length }) }}"> 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-page has-[:checked]:bg-brand-light has-[:checked]:ring-brand', { 'ring-red-700': errors|length, 'ring-line': not errors|length }) }}">
{{- form_widget(form.picked) -}} {{- form_widget(form.picked) -}}
<span class="text-gray-900">{{ form.picked.vars.label }}</span> <span class="text-ink">{{ form.picked.vars.label }}</span>
</label> </label>
{{- form_errors(form) -}} {{- form_errors(form) -}}
</div> </div>
@@ -359,7 +359,7 @@
{%- block questionnaire_pick_number -%} {%- block questionnaire_pick_number -%}
<label class="flex items-center gap-x-2"> <label class="flex items-center gap-x-2">
<span class="w-20">{{- form_widget(child) -}}</span> <span class="w-20">{{- form_widget(child) -}}</span>
<span class="{{ html_classes({ 'text-red-700': child.vars.errors|length, 'text-gray-700': not child.vars.errors|length }) }}">{{ child.vars.label }}</span> <span class="{{ html_classes({ 'text-red-700': child.vars.errors|length, 'text-muted': not child.vars.errors|length }) }}">{{ child.vars.label }}</span>
</label> </label>
{%- endblock questionnaire_pick_number -%} {%- endblock questionnaire_pick_number -%}
@@ -376,7 +376,7 @@
{%- for child in form -%} {%- for child in form -%}
<label class="cursor-pointer"> <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 %}> <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-700 text-red-700': errors|length, 'ring-gray-300 text-gray-900': not errors|length }) }}"> <span class="{{ html_classes('flex items-center rounded-md px-2 py-1 text-xs ring-1 ring-inset peer-checked:bg-brand peer-checked:text-white peer-checked:ring-brand peer-focus-visible:outline-3 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-bright', { 'ring-red-700 text-red-700': errors|length, 'ring-slate-500 text-ink': not errors|length }) }}">
{{- child.vars.label -}} {{- child.vars.label -}}
</span> </span>
</label> </label>
@@ -391,7 +391,7 @@
{{- form_row(child) -}} {{- form_row(child) -}}
{%- endfor -%} {%- endfor -%}
{%- if form is empty -%} {%- if form is empty -%}
<p class="text-sm text-gray-500">Für diese Reise sind keine Teamer:innen eingeteilt.</p> <p class="text-sm text-muted">Für diese Reise sind keine Teamer:innen eingeteilt.</p>
{%- endif -%} {%- endif -%}
</div> </div>
{%- endblock teamer_guidings_widget -%} {%- endblock teamer_guidings_widget -%}
@@ -3,28 +3,28 @@
# rated. Not part of the questionnaire's answers; a rating is filed against the placement as # rated. Not part of the questionnaire's answers; a rating is filed against the placement as
# always. Expects `dispositions` (DispositionRepository::findForHouseManagerQuestionnaire()). # always. Expects `dispositions` (DispositionRepository::findForHouseManagerQuestionnaire()).
#} #}
<section class="pt-8"> <section class="card mt-6 p-5">
<h2 class="text-xl font-bold pb-2"> <h2 class="section-title pb-2">
Bewerte dein Wochenteam Bewerte dein Wochenteam
</h2> </h2>
{% if hint|default(false) %} {% if hint|default(false) %}
<p class="pb-4 text-sm text-gray-500"> <p class="pb-2 text-sm text-muted">
Speichere deinen Fragebogen vorher als Entwurf, sonst gehen deine Eingaben verloren. Speichere deinen Fragebogen vorher als Entwurf, sonst gehen deine Eingaben verloren.
</p> </p>
{% endif %} {% endif %}
<ul class="divide-y divide-gray-100"> <ul class="divide-y divide-line">
{% for disposition in dispositions %} {% for disposition in dispositions %}
<li class="flex flex-wrap items-center justify-between gap-2 py-3"> <li class="flex flex-wrap items-center justify-between gap-2 py-3">
<span> <span>
<span class="font-bold">{{ disposition.teamer.fullName }}</span> <span class="font-bold">{{ disposition.teamer.fullName }}</span>
<span class="text-sm text-gray-500">{{ disposition.assignment.jobProfile.name }}</span> <span class="text-sm text-muted">{{ disposition.assignment.jobProfile.name }}</span>
</span> </span>
{% if disposition.feedback %} {% if disposition.feedback %}
<span class="inline-flex items-center gap-x-1 text-sm text-gray-500"> <span class="inline-flex items-center gap-x-1 text-sm text-emerald-700">
{{ icon('check', 'w-4 h-4') }} bewertet {{ icon('check', 'w-4 h-4') }} bewertet
</span> </span>
{% elseif disposition.feedbackWaived %} {% elseif disposition.feedbackWaived %}
<span class="text-sm text-gray-500">nicht nötig</span> <span class="text-sm text-muted">nicht nötig</span>
{% else %} {% else %}
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}" <a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
class="btn btn--small btn--secondary"> class="btn btn--small btn--secondary">
@@ -34,7 +34,7 @@
{% endif %} {% endif %}
</li> </li>
{% else %} {% else %}
<li class="py-3 text-gray-500">-</li> <li class="py-3 text-muted">-</li>
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
@@ -1,8 +1,8 @@
{# {#
# The travel a house manager questionnaire is about, in one line above it. Expects `destination`. # 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"> <p class="flex flex-wrap items-center gap-x-2 gap-y-1 pb-6 text-muted">
<span class="font-bold text-gray-900">{{ destination.product }}</span> <span class="font-bold text-ink">{{ destination.product }}</span>
{% include '_partials/_dot.html.twig' %} {% include '_partials/_dot.html.twig' %}
<span>{{ destination.hotel }}</span> <span>{{ destination.hotel }}</span>
{% include '_partials/_dot.html.twig' %} {% include '_partials/_dot.html.twig' %}
@@ -8,7 +8,7 @@
Fragebogen zur Reise Fragebogen zur Reise
</h1> </h1>
{% include 'house_manager/questionnaire/_travel_summary.html.twig' %} {% include 'house_manager/questionnaire/_travel_summary.html.twig' %}
<p class="-mt-6 pb-8 text-sm text-gray-500"> <p class="-mt-4 pb-6 text-sm text-muted">
Abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr Abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr
</p> </p>
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': response.context } %} {% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': response.context } %}
@@ -9,7 +9,7 @@
</h1> </h1>
{% include 'house_manager/questionnaire/_travel_summary.html.twig' %} {% include 'house_manager/questionnaire/_travel_summary.html.twig' %}
{% if lastSaved %} {% if lastSaved %}
<p class="-mt-6 pb-8 text-sm text-gray-500"> <p class="-mt-4 pb-6 text-sm text-muted">
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 %}
+8 -8
View File
@@ -6,29 +6,29 @@
# than dropped. # than dropped.
#} #}
{% set context = context|default({}) %} {% set context = context|default({}) %}
<div class="flex flex-col gap-y-8"> <div class="flex flex-col gap-y-6">
{% for section in definition.sections %} {% for section in definition.sections %}
{% set shown = section.questions|filter(question => answers[question.key] is defined and definition.isVisible(question, answers)) %} {% set shown = section.questions|filter(question => answers[question.key] is defined and definition.isVisible(question, answers)) %}
{% if shown is not empty %} {% if shown is not empty %}
<section> <section class="card p-5">
{% if section.title %} {% if section.title %}
<h2 class="text-lg font-bold pb-2"> <h2 class="section-title pb-2">
{{ section.title }} {{ section.title }}
</h2> </h2>
{% endif %} {% endif %}
<dl class="divide-y divide-gray-100"> <dl class="divide-y divide-line">
{% for question in shown %} {% for question in shown %}
{% set answer = answers[question.key] %} {% set answer = answers[question.key] %}
<div class="py-4 sm:grid sm:grid-cols-2 sm:gap-4"> <div class="py-3 first:pt-1 last:pb-0 sm:grid sm:grid-cols-2 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900"> <dt class="text-muted">
{{ question.label|nl2br }} {{ question.label|nl2br }}
</dt> </dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:mt-0"> <dd class="mt-1 sm:mt-0">
{% if question.type.value == 'rating' %} {% if question.type.value == 'rating' %}
<span class="inline-flex items-center gap-x-2"> <span class="inline-flex items-center gap-x-2">
<span class="inline-flex items-center"> <span class="inline-flex items-center">
{% for grade in range(1, 5) %} {% for grade in range(1, 5) %}
{{ icon('star', html_classes('w-4 h-4', { 'text-gray-200': answer < grade, 'text-primary': answer >= grade })) }} {{ icon('star', html_classes('w-4 h-4', { 'text-gray-300': answer < grade, 'text-brand': answer >= grade })) }}
{% endfor %} {% endfor %}
</span> </span>
{{ answer }} von 5 {{ answer }} von 5
@@ -4,8 +4,8 @@
#} #}
{% set destination = assignment.destination %} {% set destination = assignment.destination %}
{% set pickup = assignment.hasBusEscort ? destination.pickup(assignment.pickup) : null %} {% 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"> <p class="flex flex-wrap items-center gap-x-2 gap-y-1 pb-6 text-muted">
<span class="font-bold text-gray-900">{{ assignment.jobProfile.name }}</span> <span class="font-bold text-ink">{{ assignment.jobProfile.name }}</span>
{% include '_partials/_dot.html.twig' %} {% include '_partials/_dot.html.twig' %}
<span>{{ destination.product }}</span> <span>{{ destination.product }}</span>
{% include '_partials/_dot.html.twig' %} {% include '_partials/_dot.html.twig' %}
+3 -3
View File
@@ -6,11 +6,11 @@
{% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %} {% for child in form|filter(child => child.vars.name not in ['draft', 'submit']) %}
{{ form_row(child) }} {{ form_row(child) }}
{% endfor %} {% endfor %}
<div class="flex flex-wrap items-center gap-4 pt-4"> <div class="flex flex-wrap items-center gap-4 pt-2">
{{ form_widget(form.submit, { attr: { class: 'btn' } }) }} {{ form_widget(form.submit, { attr: { class: 'btn btn--cta' } }) }}
{{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }} {{ form_widget(form.draft, { attr: { class: 'btn btn--secondary' } }) }}
</div> </div>
<p class="pt-2 text-sm text-gray-500"> <p class="pt-3 text-sm text-muted">
Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen. Als Entwurf kannst du den Fragebogen jederzeit speichern und später weiter ausfüllen.
Abgeschickt ist er endgültig. Abgeschickt ist er endgültig.
</p> </p>
@@ -8,23 +8,23 @@
Fragebogen zu deinem Einsatz Fragebogen zu deinem Einsatz
</h1> </h1>
{% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %} {% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %}
<p class="pb-8 text-gray-700"> <p class="pb-6">
Danke für dein Feedback! Danke für dein Feedback!
</p> </p>
<div class="flex flex-col gap-y-12"> <div class="flex flex-col gap-y-10">
{% for item in submitted %} {% for item in submitted %}
<section> <section>
<h2 class="text-2xl font-bold pb-1"> <h2 class="text-xl font-bold text-brand pb-1">
{{ item.definition.title }}{% if item.response.leg %}: {{ item.response.leg.label }}{% endif %} {{ item.definition.title }}{% if item.response.leg %}: {{ item.response.leg.label }}{% endif %}
</h2> </h2>
<p class="pb-6 text-sm text-gray-500"> <p class="pb-4 text-sm text-muted">
Abgeschickt am {{ item.response.submittedAt|date('d.m.Y, H:i') }} Uhr Abgeschickt am {{ item.response.submittedAt|date('d.m.Y, H:i') }} Uhr
</p> </p>
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.response.answers } %} {% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.response.answers } %}
</section> </section>
{% endfor %} {% endfor %}
{% if open %} {% if open %}
<a href="{{ path('app_teamer_questionnaire_edit', { 'uuid': disposition.uuid }) }}" class="btn inline-block self-start"> <a href="{{ path('app_teamer_questionnaire_edit', { 'uuid': disposition.uuid }) }}" class="btn btn--cta self-start">
Offenen Fragebogen ausfüllen Offenen Fragebogen ausfüllen
</a> </a>
{% endif %} {% endif %}
@@ -9,7 +9,7 @@
</h1> </h1>
{% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %} {% include 'questionnaire/_assignment_summary.html.twig' with { 'assignment': disposition.assignment } %}
{% if lastSaved %} {% if lastSaved %}
<p class="-mt-6 pb-8 text-sm text-gray-500"> <p class="-mt-4 pb-6 text-sm text-muted">
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 %}