Feat: Add assignment filter for admins

This commit is contained in:
Björn Fromme
2023-10-23 15:03:17 +02:00
parent d688a05203
commit 6f7db829b5
9 changed files with 424 additions and 32 deletions
+23 -1
View File
@@ -3,9 +3,25 @@
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
<h1 class="text-2xl font-bold pb-4">
Einsatzübersicht
</h1>
{{ form_start(filterForm) }}
<div class="border border-gray-200 rounded-md p-2 mb-4">
<div class="grid grid-cols-2 md:grid-cols-5 gap-1 pb-2">
{{ form_widget(filterForm.dateFrom) }}
{{ form_widget(filterForm.dateTo) }}
{{ form_widget(filterForm.jobProfile) }}
{{ form_widget(filterForm.destination) }}
{{ form_widget(filterForm.duration) }}
</div>
<div class="flex items-center space-x-2">
{{ form_widget(filterForm.apply, { 'attr': { 'class': 'btn btn--small' } }) }}
{{ form_widget(filterForm.reset, { 'attr': { 'class': 'btn btn--small btn--secondary' } }) }}
</div>
</div>
{{ form_rest(filterForm) }}
{{ form_end(filterForm) }}
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
@@ -88,6 +104,12 @@
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="6">
Keine Daten...
</td>
</tr>
{% endfor %}
</tbody>
</table>
+1 -1
View File
@@ -164,7 +164,7 @@
{%- set maxDate = form.vars.max_date ? form.vars.max_date | date('Y-m-d') : null -%}
{%- set attr = attr|merge({'class': (attr.class|default('') ~ ' block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset sm:text-sm sm:leading-6')|trim }) -%}
{%- if errors|length -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder-red-500 focus:ring-red-500' }) -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' ring-red-500 placeholder:red-500 focus:ring-red-500' }) -%}
{% else %}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' placeholder:text-gray-400 focus:ring-primary' }) -%}
{%- endif -%}