{% extends 'administrative/layout.html.twig' %} {% block title %}{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}{% endblock %} {% block content %} {% set context = response.context %}

{{ definition.title }}{% if response.leg %}: {{ response.leg.label }}{% endif %}

{{ response.destination ? context.destinationProduct|default('-') : context.teamerName|default('-') }}, abgeschickt am {{ response.submittedAt|date('d.m.Y, H:i') }} Uhr

{% include 'questionnaire/_answers.html.twig' with { 'answers': response.answers, 'context': context } %}
{# the snapshot taken on submit, so it shows the placement or travel as it was answered for #}

{{ response.destination ? 'Reise' : 'Einsatz' }}

{% for label, value in response.destination ? { 'Destination': context.destinationProduct|default(null), 'Haus': context.hotel|default(null) ? context.hotel ~ ' (' ~ context.hotelCode ~ ')' : null, 'Reisetermin': context.dateFrom|default(null) ? context.dateFrom|date('d.m.Y') ~ ' - ' ~ context.dateTo|date('d.m.Y') : null, 'Wochenteam': context.teamers|default([])|map(teamer => teamer.name ~ ' (' ~ teamer.jobProfileName ~ ')')|join(', ') ?: null, 'Abgeschickt von': response.updatedBy ?? response.createdBy, } : { '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, } %}
{{ label }}
{{ (value ?? '-') }}
{% endfor %}
{% if siblings is not empty %}

Zum selben Einsatz

{% endif %}
{% endblock %}