WIP: Implement application process

This commit is contained in:
Björn Fromme
2023-10-09 16:59:35 +02:00
parent abced8c924
commit 3a458df94f
17 changed files with 441 additions and 219 deletions
+35 -67
View File
@@ -7,78 +7,46 @@
Einsatzübersicht
</h1>
<div class="grid grid-cols-2 gap-8 items-start">
<div class="grid grid-cols-2 gap-x-4 gap-y-3 bg-gray-100 rounded-md p-4">
<div class="font-bold text-xl">
Jobprofil
</div>
<div class="font-bold text-xl">
{{ assignment.jobProfile.name }}
</div>
<div>
Destination
</div>
<div>
{{ assignment.destination.product }}
<br>
{{ assignment.destination.hotel }}
</div>
<div>
Einsatztermin
</div>
<div>
{{ assignment.totalPeriod.start|date('d.m.Y') }} - {{ assignment.totalPeriod.end|date('d.m.Y') }}
</div>
{% if assignment.pickup and assignment.pickupDate %}
<div>
Busabfahrt
</div>
<div>
{{ assignment.pickupDate|date('d.m.Y') }}
</div>
<div>
Busbegleitung
</div>
<div>
ab {{ assignment.pickup|bpn_pickup_label }}
</div>
{% endif %}
<div>
Du bekommst
</div>
<div>
{{ assignment.benefits|nl2list }}
</div>
<div>
Honorar
</div>
<div>
{% for fee in assignment.fees %}
{{ fee.name }} {{ fee.value|format_money }}
{% endfor %}
</div>
<div class="bg-gray-100 rounded-md p-4">
{% include '_partials/_assignment_info.html.twig' %}
</div>
<div>
<h2 class="text-xl font-bold pb-2">
Voraussetzungen für diesen Einsatz
</h2>
<ul class="list-disc pl-4 pb-4">
{% if assignment.pickup and assignment.pickupDate %}
<li>
Busbegleitung ab {{ assignment.pickup|bpn_pickup_label }} am {{ assignment.pickupDate|date('d.m.Y') }}
</li>
{% endif %}
{% for training in assignment.jobProfile.requiredTrainings %}
<li>
{{ training.name }} absolviert
</li>
{% endfor %}
</ul>
<p class="pb-4">
Erfüllst du mehrere oder alle Voraussetzungen für diesen Einsatz?
</p>
<a href="{{ path('app_teamer_application', { 'uuid': assignment.uuid }) }}" class="btn">
Hier bewerben!
</a>
{% include '_partials/_assignment_requirements_info.html.twig' %}
{% if application is null %}
<div class="pb-4">
Erfüllst du mehrere oder alle Voraussetzungen für diesen Einsatz?
</div>
<div class="pb-4">
<a href="{{ path('app_teamer_application_create', { 'uuid': assignment.uuid }) }}" class="btn">
Hier bewerben!
</a>
</div>
{% else %}
<div class="pb-4">
Du hast dich am {{ application.createdAt|date('d.m.Y') }} auf diesen Einsatz beworben.
</div>
<div class="pb-4">
<button type="button"
class="btn btn--secondary"
title="Bewerbung zurückziehen"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du die Bewerbing wirklich zurückziehen?',
'target-url': path('app_teamer_application_delete', { 'uuid': application.uuid })
}) }}>
Bewerbung zurückziehen
</button>
</div>
{% endif %}
{% if not isBookmarked %}
<a href="{{ path('app_teamer_bookmark_toggle', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="underline">
auf die Merkliste setzen
</a>
{% endif %}
</div>
</div>
{% endblock %}