Files
myep-team/templates/administrative/questionnaire/detail.html.twig
T

60 lines
2.9 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}{{ definition.title }}{% endblock %}
{% block content %}
{% set context = response.context %}
<h1 class="text-2xl font-bold pb-4">
{{ definition.title }}
</h1>
<p class="pb-8 text-gray-700">
{{ 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="lg:col-span-2">
{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers } %}
</div>
<div>
{# the snapshot taken on submit, so it shows the placement as the teamer answered for it #}
<h2 class="text-lg font-bold pb-4">
Einsatz
</h2>
<dl class="divide-y divide-gray-100 text-sm leading-6">
{% for label, value in {
'Teamer:in': context.teamerName|default(null),
'Jobprofil': context.jobProfileName|default(null),
'Destination': context.destinationProduct|default(null),
'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null,
'Einsatztermin': context.dateFrom|default(null) ? context.dateFrom|date('d.m.Y') ~ ' - ' ~ context.dateTo|date('d.m.Y') : 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,
} %}
<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>
{% endfor %}
</dl>
{% if siblings is not empty %}
<h2 class="text-lg font-bold pt-8 pb-2">
Zum selben Einsatz
</h2>
<ul>
{% 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 }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="pt-8">
<a href="{{ returnUrl }}" class="underline">
zurück
</a>
</div>
</div>
</div>
{% endblock %}