Files
myep-team/templates/administrative/statistics/applications_by_destination.html.twig
T

69 lines
2.7 KiB
Twig

{% extends 'administrative/layout.html.twig' %}
{% block title %}Bewerbungen pro Destination{% endblock %}
{% block content %}
<div class="flex items-start justify-between pb-4">
<h1 class="text-2xl font-bold">
Bewerbungen pro Destination
</h1>
</div>
<div class="bg-white rounded-lg shadow p-4 mb-8">
{{ form_start(form, { attr: { class: 'flex flex-wrap items-end gap-4' } }) }}
<div class="flex-1 min-w-[150px]">
{{ form_row(form.dateFrom) }}
</div>
<div class="flex-1 min-w-[150px]">
{{ form_row(form.dateTo) }}
</div>
<div class="flex gap-2">
{{ form_widget(form.apply, { attr: { class: 'btn btn--small' } }) }}
{{ form_widget(form.reset, { attr: { class: 'btn btn--small btn--secondary' } }) }}
</div>
{{ form_end(form) }}
</div>
<p class="text-sm text-gray-600 mb-4">
Zeitraum: {{ filterDto.effectiveDateFrom|date('d.m.Y') }} &ndash; {{ filterDto.effectiveDateTo|date('d.m.Y') }}
<span class="text-gray-400">
{% if filterDto.usingDefaultRange %}(Standard: letzte 12 Monate){% else %}(Filter aktiv){% endif %}
</span>
</p>
{% if statistics is empty %}
<div class="bg-white rounded-lg shadow p-8 text-center text-gray-500">
Keine Daten im ausgewählten Zeitraum vorhanden.
</div>
{% else %}
<div class="bg-white rounded-lg shadow overflow-hidden">
<table class="w-full text-sm">
<thead>
<tr class="bg-gray-50 border-b">
<th class="px-4 py-3 text-left font-semibold">Destination</th>
<th class="px-4 py-3 text-right font-semibold">Bewerbungen</th>
</tr>
</thead>
<tbody>
{% for stat in statistics %}
<tr class="border-b hover:bg-gray-50">
<td class="px-4 py-3 font-medium">{{ stat.hotelCode }}</td>
<td class="px-4 py-3 text-right">{{ stat.total }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% set totalAll = 0 %}
{% for stat in statistics %}
{% set totalAll = totalAll + stat.total %}
{% endfor %}
<tr class="bg-gray-100 font-semibold">
<td class="px-4 py-3">Gesamt</td>
<td class="px-4 py-3 text-right">{{ totalAll }}</td>
</tr>
</tfoot>
</table>
</div>
{% endif %}
{% endblock %}