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
@@ -0,0 +1,52 @@
<div class="grid grid-cols-2 gap-x-4 gap-y-3">
<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>
{% if assignment.fees|length %}
<div>
{% for fee in assignment.fees %}
{{ fee.name }} {{ fee.value|format_money }}
{% endfor %}
</div>
{% endif %}
</div>
@@ -0,0 +1,26 @@
<ul class="list-disc pl-4 pb-4">
{% if assignment.pickup and assignment.pickupDate %}
<li>
<div class="flex items-center space-x-2">
<span>Busbegleitung ab {{ assignment.pickup|bpn_pickup_label }} am {{ assignment.pickupDate|date('d.m.Y') }}</span>
{% if teamer.hasPickup(assignment.pickup) %}
{{ icon('check', 'w-5 h-5 text-emerald-500') }}
{% else %}
{{ icon('close', 'w-5 h-5 text-red-500') }}
{% endif %}
</div>
</li>
{% endif %}
{% for training in assignment.jobProfile.requiredTrainings %}
<li>
<div class="flex items-center space-x-2">
<span>{{ training.name }} absolviert</span>
{% if teamer.trainingAttendance(training) %}
{{ icon('check', 'w-5 h-5 text-emerald-500') }}
{% else %}
{{ icon('close', 'w-5 h-5 text-red-500') }}
{% endif %}
</div>
</li>
{% endfor %}
</ul>
-4
View File
@@ -1,4 +0,0 @@
{% extends 'manager/layout.html.twig' %}
{% block content %}
{% endblock %}
-9
View File
@@ -1,9 +0,0 @@
{% extends 'layout.html.twig' %}
{% block main_menu %}
{{ knp_menu_render(knp_menu_get('manager_main')) }}
{% endblock %}
{% block mobile_menu %}
{{ knp_menu_render(knp_menu_get('manager_main')) }}
{% endblock %}
-101
View File
@@ -1,101 +0,0 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}Bewerbung{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Bewerbung
</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>
<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>
<div class="flex items-center space-x-2">
<span>Busbegleitung ab {{ assignment.pickup|bpn_pickup_label }} am {{ assignment.pickupDate|date('d.m.Y') }}</span>
{% if teamer.hasPickup(assignment.pickup) %}
{{ icon('check', 'w-5 h-5 text-emerald-500') }}
{% else %}
{{ icon('close', 'w-5 h-5 text-red-500') }}
{% endif %}
</div>
</li>
{% endif %}
{% for training in assignment.jobProfile.requiredTrainings %}
<li>
<div class="flex items-center space-x-2">
<span>{{ training.name }} absolviert</span>
{% if teamer.trainingAttendance(training) %}
{{ icon('check', 'w-5 h-5 text-emerald-500') }}
{% else %}
{{ icon('close', 'w-5 h-5 text-red-500') }}
{% endif %}
</div>
</li>
{% endfor %}
</ul>
{{ form_start(form) }}
{% if form.confirmPickup is defined %}
{{ form_row(form.confirmPickup) }}
{% endif %}
<button type="submit" class="btn">
Bewerbung einreichen
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
</div>
{% endblock %}
@@ -0,0 +1,32 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}Bewerbung{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Bewerbung
</h1>
<div class="grid grid-cols-2 gap-8 items-start">
<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>
{% include '_partials/_assignment_requirements_info.html.twig' %}
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
{% if form.confirmPickup is defined %}
{{ form_row(form.confirmPickup) }}
{% endif %}
{{ form_row(form.requests) }}
</div>
<button type="submit" class="btn">
Bewerbung abschicken!
</button>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
</div>
{% endblock %}
+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 %}