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
@@ -43,6 +43,16 @@
</div>
{% endif %}
{% endif %}
{% if application is defined and application.pickup is not null %}
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Gwählter Zustieg
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
{{ application.pickup|bpn_pickup_label }}
</dd>
</div>
{% endif %}
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Du bekommst
@@ -1,5 +1,5 @@
<ul class="pb-8 divide-y divide-gray-200">
{% if assignment.pickup and assignment.effectivePickupDate %}
{% if assignment.pickup %}
<li class="py-2">
<div class="flex items-center justify-between">
<span class="flex-1">Busbegleitung {{ assignment.pickup|bpn_pickup_label }} am {{ assignment.effectivePickupDate|date('d.m.Y') }}</span>
@@ -22,5 +22,12 @@
{% endif %}
</div>
</li>
{% else %}
<li class="py-2">
<div class="flex items-center justify-between">
<span class="flex-1">Keine</span>
{{ icon('check', 'w-5 h-5 text-green-500 shrink-0') }}
</div>
</li>
{% endfor %}
</ul>
+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>
@@ -17,6 +17,9 @@
{% include '_partials/_assignment_requirements_info.html.twig' %}
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{% if form.pickup is defined %}
{{ form_row(form.pickup) }}
{% endif %}
{% if form.confirmPickup is defined %}
{{ form_row(form.confirmPickup) }}
{% endif %}
+2 -2
View File
@@ -16,7 +16,7 @@
<div class="flex flex-col items-start space-y-4">
{% if disposition is not null %}
{% include '_partials/_infobox.html.twig' with {
'message': 'Du wurdest am ' ~ disposition.createdAt|date('d.m.Y') ~ 'für diesen Einsatz eingeteilt.'
'message': 'Du wurdest am ' ~ disposition.createdAt|date('d.m.Y') ~ ' für diesen Einsatz eingeteilt.'
} %}
{% elseif application is not null %}
{% if application.status == constant('App\\Entity\\Application::STATUS_REJECTED') %}
@@ -35,7 +35,7 @@
{% endif %}
{% else %}
{% include '_partials/_infobox.html.twig' with {
'message': 'Du hast dich am ' ~ application.createdAt|date('d.m.Y') ~ 'auf diesen Einsatz beworben.'
'message': 'Du hast dich am ' ~ application.createdAt|date('d.m.Y') ~ ' auf diesen Einsatz beworben.'
} %}
<button type="button"
class="btn btn--secondary"
+19 -20
View File
@@ -66,24 +66,25 @@
{# New upload #}
{% if workflow_can(disposition, 'upload_contract') %}
<div class="pb-4">
{{ form_start(form) }}
<div class="flex flex-col space-y-4">
<a href="{{ path('app_teamer_disposition_contractpdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
<img src="{{ asset('build/images/contract_thumb.jpg') }}" alt="Honorarvertrag" class="block w-32 h-auto shadow-md">
</a>
</div>
<p class="pb-4">
Bitte lade ihn unterschrieben hier wieder hoch:
</p>
{{ form_start(form) }}
<div class="pb-4">
<div>
Bitte lade ihn unterschrieben hier wieder hoch:
</div>
{% include '_partials/_upload_collection_form.html.twig' with {
'endpoint_upload': path('_uploader_upload_contract'),
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
} %}
{% if form.pickup is defined %}
{{ form_row(form.pickup) }}
{% endif %}
<button type="submit" class="btn">
Aktualisieren
</button>
</div>
<button type="submit" class="btn">
Aktualisieren
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
{% else %}
@@ -99,24 +100,22 @@
Honorarnote
</h2>
{% if workflow_can(disposition, 'upload_invoice') %}
<div class="pb-4">
{{ form_start(form) }}
<div class="flex flex-col space-y-4">
<a href="{{ path('app_teamer_disposition_invoicepdf', { 'uuid': disposition.uuid }) }}" target="_blank" class="inline-block">
<img src="{{ asset('build/images/invoice_thumb.jpg') }}" alt="Honorarnote" class="block w-32 h-auto shadow-md">
</a>
</div>
<p class="pb-4">
Bitte lade sie ausgefüllt und unterschrieben hier wieder hoch:
</p>
{{ form_start(form) }}
<div class="pb-4">
<div>
Bitte lade sie ausgefüllt und unterschrieben hier wieder hoch:
</div>
{% include '_partials/_upload_collection_form.html.twig' with {
'endpoint_upload': path('_uploader_upload_invoice'),
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
} %}
<button type="submit" class="btn">
Aktualisieren
</button>
</div>
<button type="submit" class="btn">
Aktualisieren
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
{% else %}