fix: only use destination's pickup values
This commit is contained in:
@@ -24,29 +24,28 @@
|
||||
</dd>
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<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">
|
||||
Busbegleitung
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ assignment.pickup|bpn_pickup_label }}
|
||||
ab {{ pickup.city }}, {{ pickup.street }}
|
||||
</dd>
|
||||
</div>
|
||||
{% if assignment.pickupDate %}
|
||||
<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">
|
||||
Busabfahrt
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ assignment.pickupDate|date('d.m.Y') }}
|
||||
</dd>
|
||||
</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
|
||||
Busabfahrt
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ pickup.time }} Uhr
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if application is defined and application is not null 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">
|
||||
Gewä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 }}
|
||||
|
||||
@@ -27,24 +27,23 @@
|
||||
</dl>
|
||||
<dl class="divide-y divide-gray-100">
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<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">
|
||||
Busbegleitung
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ assignment.pickup|bpn_pickup_label }}
|
||||
{{ pickup.city }}
|
||||
</dd>
|
||||
</div>
|
||||
<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">
|
||||
Busabfahrt
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ pickup.time }} Uhr
|
||||
</dd>
|
||||
</div>
|
||||
{% if assignment.pickupDate %}
|
||||
<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">
|
||||
Busabfahrt
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||
{{ assignment.pickupDate|date('d.m.Y') }}
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% 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">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% 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>
|
||||
<span class="flex-1">Busbegleitung ab {{ assignment.destination.pickup(assignment.pickup).city }}</span>
|
||||
{% if teamer.hasPickup(assignment.pickup) %}
|
||||
{{ icon('check', 'w-5 h-5 text-green-500 shrink-0') }}
|
||||
{% else %}
|
||||
|
||||
@@ -56,11 +56,16 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">{{ assignment.pickup ? assignment.pickup|bpn_pickup_label : '-' }}</span>
|
||||
<br>
|
||||
{{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}
|
||||
</a>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
||||
<br>
|
||||
{{ pickup.time }} Uhr
|
||||
</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
|
||||
@@ -10,63 +10,69 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
<div class="grid lg:grid-cols-6 gap-x-4 gap-y-4">
|
||||
<div class="lg:col-span-3">
|
||||
{{ form_row(form.destination) }}
|
||||
</div>
|
||||
{{ form_row(form.availableDispositions) }}
|
||||
<div>
|
||||
<h4 class="font-bold pb-2">
|
||||
{{ form_label(form.showAvailableDispositions) }}
|
||||
</h4>
|
||||
{{ form_widget(form.showAvailableDispositions) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.dateFrom) }}
|
||||
{{ form_row(form.dateTo) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.jobProfile) }}
|
||||
{{ form_row(form.contact) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.pickup) }}
|
||||
{{ form_row(form.pickupDate) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.benefits) }}
|
||||
{{ form_row(form.fees) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.remarks) }}
|
||||
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.documents.vars.prototype)|json_encode }) }}>
|
||||
<h4 class="font-bold pb-2">
|
||||
Dokumente
|
||||
</h4>
|
||||
<div {{ stimulus_target('form-collection', 'fields')}} class="flex flex-col space-y-4 mb-4">
|
||||
{% do form.documents.setRendered %}
|
||||
{%- for document in form.documents -%}{{- _self.collectionRow(document) -}}{%- endfor -%}
|
||||
<div {{ stimulus_controller('form-partial', { 'url': path('app_admin_assignment_pickup_form') }) }}>
|
||||
{{ form_start(form, { 'attr': { 'data-form-partial-target': 'form' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
<div class="grid lg:grid-cols-6 gap-x-4 gap-y-4">
|
||||
<div class="lg:col-span-3">
|
||||
{{ form_row(form.destination) }}
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="button"
|
||||
{{ stimulus_action('form-collection', 'addItem') }}
|
||||
title="Dokument hinzufügen">
|
||||
{{ icon('plus', 'w-4 h-4 pointer-events-none') }}
|
||||
</button>
|
||||
{{ form_row(form.availableDispositions) }}
|
||||
<div>
|
||||
<h4 class="font-bold pb-2">
|
||||
{{ form_label(form.showAvailableDispositions) }}
|
||||
</h4>
|
||||
{{ form_widget(form.showAvailableDispositions) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.dateFrom) }}
|
||||
{{ form_row(form.dateTo) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.jobProfile) }}
|
||||
{{ form_row(form.contact) }}
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4" {{ stimulus_target('form-partial', 'container') }}>
|
||||
{% include 'admin/assignment/_form_pickup.html.twig' %}
|
||||
</div>
|
||||
<div class="absolute top-0 left-0 inset-0 bg-white/90 flex items-center justify-center" {{ stimulus_target('form-partial', 'spinner') }}>
|
||||
{% include '_partials/_spinner.html.twig' with { 'class': 'w-8 h-8'} %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.benefits) }}
|
||||
{{ form_row(form.fees) }}
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.remarks) }}
|
||||
<div {{ stimulus_controller('form-collection', { 'prototype': _self.collectionRow(form.documents.vars.prototype)|json_encode }) }}>
|
||||
<h4 class="font-bold pb-2">
|
||||
Dokumente
|
||||
</h4>
|
||||
<div {{ stimulus_target('form-collection', 'fields')}} class="flex flex-col space-y-4 mb-4">
|
||||
{% do form.documents.setRendered %}
|
||||
{%- for document in form.documents -%}{{- _self.collectionRow(document) -}}{%- endfor -%}
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<button type="button"
|
||||
{{ stimulus_action('form-collection', 'addItem') }}
|
||||
title="Dokument hinzufügen">
|
||||
{{ icon('plus', 'w-4 h-4 pointer-events-none') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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) }}
|
||||
<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) }}
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
{{ form_row(form.pickup) }}
|
||||
{{ form_row(form.pickupDate) }}
|
||||
@@ -82,11 +82,16 @@
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">{{ assignment.pickup ? assignment.pickup|bpn_pickup_label : '-' }}</span>
|
||||
<br>
|
||||
{{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}
|
||||
</a>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
<span class="whitespace-nowrap">ab {{ pickup.city }}</span>
|
||||
<br>
|
||||
{{ pickup.time }} Uhr
|
||||
</a>
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_admin_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
<span class="flex-1">{{ assignment.destination.hotel }}</span>
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ assignment.pickup|bpn_pickup_label|default('-') }} {{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}</span>
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -54,9 +54,10 @@
|
||||
<span class="flex-1">{{ assignment.destination.hotel }}</span>
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ assignment.pickup|bpn_pickup_label|default('-') }} {{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}</span>
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
<span class="flex-1">{{ assignment.destination.hotel }}</span>
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ assignment.pickup|bpn_pickup_label|default('-') }} {{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}</span>
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
<span class="flex-1">{{ assignment.destination.hotel }}</span>
|
||||
</div>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<div class="flex items-start space-x-2">
|
||||
{{ icon('bus', 'w-5 h-5 shrink-0') }}
|
||||
<span>{{ assignment.pickup|bpn_pickup_label|default('-') }} {{ assignment.effectivePickupDate ? assignment.effectivePickupDate|date('d.m.Y') : '' }}</span>
|
||||
<span>{{ pickup.city }}, {{ pickup.time }} Uhr</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user