WIP: Implement application process

This commit is contained in:
Björn Fromme
2023-10-09 14:42:37 +02:00
parent 8e3499581a
commit abced8c924
26 changed files with 802 additions and 138 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
{{ form_start(form) }}
<div class="flex flex-col space-y-4 pb-8">
<div class="grid lg:grid-cols-4 gap-x-8 gap-y-4">
<div class="grid lg:grid-cols-5 gap-x-8 gap-y-4">
<div class="lg:col-span-3">
{{ form_row(form.destination) }}
</div>
{{ form_row(form.available) }}
{{ form_row(form.availableDispositions) }}
{{ form_row(form.showAvailableDispositions) }}
</div>
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
{{ form_row(form.dateFrom) }}
@@ -11,6 +11,45 @@
<h1 class="text-2xl font-bold pb-8">
Verfügbarkeit {{ teamer }}
</h1>
<div class="grid md:grid-cols-2 gap-8 pb-8">
{% for year, months in groupedAvailabilities %}
<div>
<h3 class="text-lg font-bold">
{{ year }}
</h3>
<div class="flex flex-col space-y-3">
{% for month, availabilities in months %}
<div>
<h4 class="font-bold">
{{ month }}
</h4>
{% for availability in availabilities %}
<div class="flex items-center space-x-2">
<span>{{ availability }}</span>
{% if is_granted('DELETE', availability) %}
<button type="button"
title="Zeitraum entfernen/löschen"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du den Zeitraum wirklich löschen?',
'target-url': path('app_admin_teamer_availability_delete', { 'teamer_uuid': teamer.uuid, 'availability_id': availability.id, 'r': return_url() })
}) }}>
{{ icon('delete', 'w-5 h-5') }}
</button>
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% else %}
<div class="md:col-span-2 text-sm">
{{ teamer.firstName }} hat bisher keine Verfügbarkeiten hinterlegt.
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}
+7 -1
View File
@@ -75,7 +75,7 @@
{% endfor %}
</ul>
<div class="grid grid-cols-2 gap-4">
<div class="grid grid-cols-2 gap-8">
<div>
<h2 class="text-lg font-bold pb-2">
Mögliche Jobprofile
@@ -85,6 +85,12 @@
<li>
{{ profile.name }}
</li>
{% else %}
<li>
<div class="text-sm">
{{ teamer.firstName }} hat bisher keine Job-Profile ausgewählt.
</div>
</li>
{% endfor %}
</ul>
</div>
+41 -39
View File
@@ -1,42 +1,44 @@
<div class="bg-gray-100 border border-gray-300 border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
<div class="flex-1 flex items-center justify-between">
<div>
<p class="text-sm leading-5 text-gray-700">{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}</p>
</div>
<div>
<nav class="relative z-0 inline-flex">
{% if pageCount > 1 %}
{% if previous is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Previous">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"/>
</svg>
</a>
{% if pageCount > 0 %}
<div class="bg-gray-100 border border-gray-300 border-t-0 px-4 py-3 flex items-center justify-between sm:px-4">
<div class="flex-1 flex items-center justify-between">
<div>
<p class="text-sm leading-5 text-gray-700">{{ 'paginator.info'|trans({ '{from}': firstItemNumber, '{to}': lastItemNumber, '{total}': totalCount })|raw }}</p>
</div>
<div>
<nav class="relative z-0 inline-flex">
{% if pageCount > 1 %}
{% if previous is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Previous">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"/>
</svg>
</a>
{% endif %}
{% if current > 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
...
</span>
{% endif %}
{% for page in pagesInRange %}
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 hover:bg-secondary {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-gray-700 hover:text-white{% endif %}">
{{ page }}
</a>
{% endfor %}
{% if current < pageCount - 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
...
</span>
{% endif %}
{% if next is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Next">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"/>
</svg>
</a>
{% endif %}
{% endif %}
{% if current > 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
...
</span>
{% endif %}
{% for page in pagesInRange %}
<a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium focus:z-10 hover:bg-secondary {% if page == current %}bg-primary text-white hover:text-white{% else %}bg-white text-gray-700 hover:text-white{% endif %}">
{{ page }}
</a>
{% endfor %}
{% if current < pageCount - 3 %}
<span class="-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium text-gray-700">
...
</span>
{% endif %}
{% if next is defined %}
<a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="-ml-px relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm leading-5 font-medium hover:bg-secondary hover:text-white" aria-label="Next">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"/>
</svg>
</a>
{% endif %}
{% endif %}
</nav>
</nav>
</div>
</div>
</div>
</div>
{% endif %}
+101
View File
@@ -0,0 +1,101 @@
{% 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 %}
+84
View File
@@ -0,0 +1,84 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
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>
<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>
</div>
</div>
{% endblock %}
+76 -1
View File
@@ -1,8 +1,11 @@
{% extends 'teamer/layout.html.twig' %}
{% block title %}Mein Dashboard{% endblock %}
{% block title %}Einsatzübersicht{% endblock %}
{% block content %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht
</h1>
{% if errors|length %}
<div class="border border-red-500 rounded-md p-4 text-red-500 mb-8">
<ul>
@@ -14,4 +17,76 @@
</ul>
</div>
{% endif %}
<div class="data-table-wrapper">
<div class="data-table-wrapper__inner">
<table class="data-table">
<thead>
<tr>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;beginn', 'assignment.dateFrom') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Einsatz&shy;ende', 'assignment.dateTo') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'assignment.jobProfile') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.dateFrom') }}
</th>
<th>
{{ knp_pagination_sortable(pagination, 'Busbegleitung ab', 'assignment.pickup') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for assignment in pagination %}
<tr>
<td>
{% set dateFrom = assignment.dateFrom ? assignment.dateFrom : assignment.destination.dateFrom %}
{{ dateFrom|date('d.m.Y') }}
</td>
<td>
{% set dateTo = assignment.dateTo ? assignment.dateTo : assignment.destination.dateTo %}
{{ dateTo|date('d.m.Y') }}
</td>
<td>
{{ assignment.jobProfile.name }}
</td>
<td>
{{ assignment.destination.product }}
<br>
{{ assignment.destination.hotel }}
</td>
<td>
{{ assignment.pickup ? assignment.pickup|bpn_pickup_label|default('-') : '-' }}
<br>
{{ assignment.pickupDate ? assignment.pickupDate|date('d.m.Y') : '' }}
</td>
<td>
<div class="flex items-center space-x-1 justify-end">
<a href="{{ path('app_teamer_assignment', { 'uuid': assignment.uuid }) }}">
{{ icon('info', 'w-5 h-5') }}
</a>
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="6">
<div class="text-center">
Keine Daten
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{{ knp_pagination_render(pagination) }}
</div>
</div>
<a href="{{ path('app_admin_assignment_create') }}" class="btn">
Neu
</a>
{% endblock %}