feat: pickup selection depending on bus chaperon

This commit is contained in:
Björn Fromme
2024-01-10 18:09:39 +01:00
parent 5b93ce421c
commit cf90ffcd19
13 changed files with 207 additions and 58 deletions
+23 -15
View File
@@ -18,16 +18,19 @@
<table class="data-table">
<thead>
<tr>
<th class="w-1/3">
<th class="w-1/4">
Name
</th>
<th class="w-1/3">
<th class="w-1/4">
Zustieg
</th>
<th>
Wünsche
</th>
<th class="w-1/6">
<th>
Status
</th>
<th class="w-1/6"></th>
<th></th>
</tr>
</thead>
<tbody>
@@ -44,6 +47,10 @@
<span>{{ application.teamer }}</span>
{{ icon('info', 'w-4 h-4') }}
</button>
{% include '_partials/_rating_stars.html.twig' with { 'teamer': application.teamer } %}
</td>
<td>
{{ application.pickup|bpn_pickup_label|default('-') }}
</td>
<td>
{{ application.requests|nl2br|default('-') }}
@@ -55,35 +62,36 @@
<div class="flex items-center justify-end space-x-2">
{% if is_granted('DISPOSE', application) %}
<button type="button"
class="btn btn--small"
class="text-green-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du ' ~ application.teamer ~ ' wirklich einteilen?',
'target-url': path('app_admin_application_dispose', { 'uuid': application.uuid })
}) }}>
einteilen
{{ icon('check') }}
</button>
{% endif %}
{% if is_granted('STATUS', application) %}
<button type="button" class="btn btn--secondary btn--small"
<button type="button"
class="text-primary"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Bewerbungsstatus bearbeiten',
'url': path('app_admin_application_status', { 'uuid': application.uuid })
}) }}>
Status
{{ icon('power') }}
</button>
{% endif %}
{% if is_granted('DELETE', application) %}
<button type="button" class="btn btn--secondary btn--small"
<button type="button" class="text-red-500"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du die Bewerbung von ' ~ application.teamer ~ ' wirklich löschen?',
'target-url': path('app_admin_application_delete', { 'uuid': application.uuid })
}) }}>
löschen
{{ icon('delete') }}
</button>
{% endif %}
</div>
@@ -108,16 +116,16 @@
<table class="data-table">
<thead>
<tr>
<th class="w-1/3">
<th class="w-1/4">
Name
</th>
<th class="w-1/3">
<th class="w-1/4">
Anmerkungen
</th>
<th class="w-1/6">
<th>
Status
</th>
<th class="w-1/6"></th>
<th></th>
</tr>
</thead>
<tbody>
@@ -169,7 +177,7 @@
</table>
</div>
</div>
<a href="{{ returnUrl }}" class="underline">
<a href="{{ returnUrl }}" class="btn">
zurück
</a>
</div>