style: restyle the questionnaire views
This commit is contained in:
1 parent
6b16c88a5b
commit
3c19401d8b
15 files changed
+93
-99
No files matched your search
@@ -4,22 +4,26 @@
|
||||
|
||||
{% block content %}
|
||||
{% 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 %}
|
||||
</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
|
||||
</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">
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
|
||||
</div>
|
||||
<div>
|
||||
<aside class="card p-5">
|
||||
{# 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' }}
|
||||
</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 ? {
|
||||
'Destination': context.destinationProduct|default(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,
|
||||
'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="font-bold text-gray-900">{{ label }}</dt>
|
||||
<dd class="col-span-2 text-gray-700">{{ (value ?? '-') }}</dd>
|
||||
</div>
|
||||
<dt class="text-muted">{{ label }}</dt>
|
||||
<dd class="break-words">{{ (value ?? '-') }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% 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
|
||||
</h2>
|
||||
<ul>
|
||||
<ul class="flex flex-col gap-y-1">
|
||||
{% for sibling in siblings %}
|
||||
<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 %}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<div class="pt-8">
|
||||
<a href="{{ returnUrl }}" class="underline">
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -4,19 +4,9 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start justify-between pb-4">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold pb-2">
|
||||
Fragebögen: {{ definition.title }}
|
||||
</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>
|
||||
<h1 class="text-2xl font-bold">
|
||||
Fragebögen
|
||||
</h1>
|
||||
<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"
|
||||
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
||||
@@ -38,6 +28,15 @@
|
||||
{% endif %}
|
||||
</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__inner">
|
||||
@@ -112,7 +111,7 @@
|
||||
{{ response.submittedAt|date('d.m.Y') }}
|
||||
</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') }}
|
||||
</a>
|
||||
</td>
|
||||
@@ -120,7 +119,7 @@
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="{{ definition.perBusLeg ? 7 : (aboutTravel ? 5 : 6) }}">
|
||||
Keine Daten...
|
||||
<span class="text-muted">Keine Fragebögen gefunden.</span>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
{% block content %}
|
||||
<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">
|
||||
Vorschau Reiseleitungsfeedback
|
||||
</h1>
|
||||
@@ -23,7 +27,7 @@
|
||||
{% if busEscort != assignment.hasBusEscort %}
|
||||
Dieser Einsatz hat {{ assignment.hasBusEscort ? 'eine' : 'keine' }} Busbegleitung.
|
||||
{% 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 %}
|
||||
{% endembed %}
|
||||
|
||||
@@ -35,7 +39,7 @@
|
||||
<div class="flex flex-col gap-y-12">
|
||||
{% for item in submitted %}
|
||||
<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 %}
|
||||
</h2>
|
||||
{% include 'questionnaire/_answers.html.twig' with { 'definition': item.definition, 'answers': item.answers } %}
|
||||
@@ -57,10 +61,5 @@
|
||||
{% include 'questionnaire/_form.html.twig' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="pt-8">
|
||||
<a href="{{ returnUrl }}" class="underline">
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
{% block content %}
|
||||
<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">
|
||||
Vorschau Hausleitungsfeedback
|
||||
</h1>
|
||||
@@ -32,16 +36,16 @@
|
||||
} %}
|
||||
{% endif %}
|
||||
{% include 'questionnaire/_form.html.twig' %}
|
||||
<section class="pt-8">
|
||||
<h2 class="text-xl font-bold pb-2">
|
||||
<section class="card mt-6 p-5">
|
||||
<h2 class="section-title pb-2">
|
||||
Bewerte dein Wochenteam
|
||||
</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:
|
||||
</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>
|
||||
<li>{{ disposition.teamer.fullName }} <span class="text-muted">{{ disposition.assignment.jobProfile.name }}</span></li>
|
||||
{% else %}
|
||||
<li>-</li>
|
||||
{% endfor %}
|
||||
@@ -49,10 +53,5 @@
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<div class="pt-8">
|
||||
<a href="{{ returnUrl }}" class="underline">
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user