feat: add filtering of applications

This commit is contained in:
Björn Fromme
2025-02-10 17:08:42 +01:00
parent 2c189de0c7
commit 3e2c5976aa
8 changed files with 514 additions and 7 deletions
+31 -2
View File
@@ -3,14 +3,40 @@
{% block title %}Bewerbungsübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
<div class="flex items-start justify-between pb-4">
<h1 class="text-2xl font-bold">
Bewerbungsübersicht
</h1>
<div class="data-table-wrapper">
<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 }) }}"
title="Filter"
hx-get="{{ path('app_common_application_filter', { 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('filter', 'w-4 h-4 shrink-0') }}
{% if filterDto.active %}
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
{% else %}
<span>Filter</span>
{% endif %}
</button>
{% if filterDto.active %}
<a href="{{ path('app_common_application_filter_reset', { 'r': return_url() }) }}"
class="btn btn--small btn--secondary">
Reset
</a>
{% endif %}
</div>
</div>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'ID', ['assignment.id']) }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;zeitraum', 'destination.dateFrom') }}
</th>
@@ -33,6 +59,9 @@
{% for application in pagination %}
{% set assignment = application.assignment %}
<tr>
<td>
{{ assignment.id }}
</td>
<td>
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -