feat: applications by destination statistics
addresses #869dv9fh6
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
{% 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>
|
||||
|
||||
{% if filterDto.active %}
|
||||
<p class="text-sm text-gray-600 mb-4">
|
||||
Filter aktiv:
|
||||
{% if filterDto.dateFrom %}von {{ filterDto.dateFrom|date('d.m.Y') }}{% endif %}
|
||||
{% if filterDto.dateTo %}bis {{ filterDto.dateTo|date('d.m.Y') }}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% 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">Neu</th>
|
||||
<th class="px-4 py-3 text-right font-semibold">In Prüfung</th>
|
||||
<th class="px-4 py-3 text-right font-semibold">Abgelehnt</th>
|
||||
<th class="px-4 py-3 text-right font-semibold">Gesamt</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.new }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ stat.pending }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ stat.rejected }}</td>
|
||||
<td class="px-4 py-3 text-right"><span class="font-medium">{{ stat.total }}</span></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{% set totalNew = 0 %}
|
||||
{% set totalPending = 0 %}
|
||||
{% set totalRejected = 0 %}
|
||||
{% set totalAll = 0 %}
|
||||
{% for stat in statistics %}
|
||||
{% set totalNew = totalNew + stat.new %}
|
||||
{% set totalPending = totalPending + stat.pending %}
|
||||
{% set totalRejected = totalRejected + stat.rejected %}
|
||||
{% 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">{{ totalNew }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ totalPending }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ totalRejected }}</td>
|
||||
<td class="px-4 py-3 text-right">{{ totalAll }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user