WIP: Implementation of stuff goes on

This commit is contained in:
Björn Fromme
2023-10-05 12:53:17 +02:00
parent 96d6170907
commit 1097b84447
23 changed files with 443 additions and 118 deletions
@@ -0,0 +1,32 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.available) }}
{{ form_row(form.jobProfile) }}
{{ form_row(form.destinationBusProId) }}
<div class="grid lg:grid-cols-2 gap-4">
{{ form_row(form.dateFrom) }}
{{ form_row(form.dateTo) }}
</div>
<div class="grid lg:grid-cols-2 gap-4">
{{ form_row(form.pickupDate) }}
{{ form_row(form.pickup) }}
</div>
<div class="grid lg:grid-cols-2 gap-4">
{{ form_row(form.benefits) }}
{{ form_row(form.fees) }}
</div>
<div class="grid lg:grid-cols-2 gap-4">
{{ form_row(form.contact) }}
{{ form_row(form.remarks) }}
</div>
</div>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_assignment_index') }}" class="btn btn--secondary">
Abbrechen
</a>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
+1 -3
View File
@@ -6,7 +6,5 @@
<h1 class="text-2xl font-bold pb-8">
Einsatz anlegen
</h1>
{{ form_start(form) }}
{{ form_rest(form) }}
{{ form_end(form) }}
{% include 'admin/assignment/_form.html.twig' %}
{% endblock %}
+10
View File
@@ -0,0 +1,10 @@
{% extends 'admin/layout.html.twig' %}
{% block title %}Einsatz bearbeiten{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatz bearbeiten
</h1>
{% include 'admin/assignment/_form.html.twig' %}
{% endblock %}
+59 -12
View File
@@ -3,19 +3,66 @@
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht
</h1>
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;beginn', 'assignment.dateFrom') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;ende', 'assignment.dateTo') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'assignment.jobProfile') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Destination', 'assignment.destinationBusProId') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Busabfahrt', 'assignment.pickupDate') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Busbegleitung ab', 'assignment.pickup') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for assignment in pagination %}
<tr>
<td>
{{ assignment.dateFrom|date('d.m.Y') }}
</td>
<td>
{{ assignment.dateTo|date('d.m.Y') }}
</td>
<td>
{{ assignment.jobProfile.name }}
</td>
<td>
{{ assignment.destinationBusProId|bpn_destination_label }}
</td>
<td>
{{ assignment.pickupDate|date('d.m.Y') }}
</td>
<td>
{{ assignment.pickup|bpn_pickup_label|default('-') }}
</td>
<td>
<a href="{{ path('app_admin_assignment_edit', { 'uuid': assignment.uuid}) }}">
{{ icon('edit', 'w-5 h-5') }}
</a>
</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
{% endblock %}
+1 -1
View File
@@ -161,7 +161,7 @@
{%- if disabled is defined and disabled == true -%}
{%- set attr = attr|merge({'class': attr.class|default('') ~ ' cursor-not-allowed' }) -%}
{%- endif -%}
<div {{ stimulus_controller('datepicker', { 'minDate': minDate, 'maxDate': maxDate, 'disableWeekends': form.vars.disable_weekends, 'mode': form.vars.mode }) }}>
<div {{ stimulus_controller('datepicker', { 'minDate': minDate, 'maxDate': maxDate, 'disableWeekends': form.vars.disable_weekends }) }}>
<input type="text" name="{{ form.vars.full_name }}" value="{{ value }}" {{ block('widget_attributes') }}
{{ stimulus_target('datepicker', 'field') }} />
</div>
+1 -1
View File
@@ -1,5 +1,5 @@
<a href="{{ options.href }}" class="flex items-center space-x-2">
<span>{{ title }}</span>
<span>{{ title|raw }}</span>
{%- if sorted -%}
{%- if direction == 'desc' -%}
<svg class="w-4 h-4 shrink-0" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor">