wip: functionality for new role 'management'
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{% macro collectionRow(form) %}
|
||||
<div {{ stimulus_target('form-collection', 'field') }}>
|
||||
<div class="flex items-center space-x-4">
|
||||
{{ form_widget(form) }}
|
||||
<button type="button" {{ stimulus_action('form-collection', 'removeItem') }}>
|
||||
{{ icon('delete', 'w-4 h-4 mt-2 pointer-events-none') }}
|
||||
</button>
|
||||
</div>
|
||||
{{ form_errors(form) }}
|
||||
</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.status) }}
|
||||
{{ 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.jobProfile) }}
|
||||
{{ form_row(form.jobProfileInfo) }}
|
||||
{{ form_row(form.benefits) }}
|
||||
{{ form_row(form.contact) }}
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4" id="pickup-form">
|
||||
{% block partial_form %}
|
||||
{{ form_row(form.pickup) }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||
{{ form_row(form.fees) }}
|
||||
{{ form_row(form.remarks) }}
|
||||
</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) }}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz anlegen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz anlegen
|
||||
</h1>
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,177 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatzübersicht{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatzübersicht
|
||||
</h1>
|
||||
<div class="pb-8">
|
||||
{% include '_partials/_assignment_info_compact.html.twig' %}
|
||||
</div>
|
||||
<div class="col-span-2">
|
||||
<h2 class="font-bold text-lg pb-4">
|
||||
Bewerbungen
|
||||
</h2>
|
||||
<div class="data-table-wrapper w-full">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-1/4">
|
||||
Name
|
||||
</th>
|
||||
<th class="w-1/4">
|
||||
Zustieg
|
||||
</th>
|
||||
<th>
|
||||
Wünsche
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for application in applications %}
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button"
|
||||
class="flex items-center space-x-1"
|
||||
title="Teamer:inneninfo {{ application.teamer }}"
|
||||
hx-get="{{ path('app_admin_application_info', { 'uuid': application.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<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('-') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ('label.application.status.' ~ application.status)|trans }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center justify-end space-x-2">
|
||||
{% if is_granted('DISPOSE', application) %}
|
||||
<button type="button"
|
||||
class="text-green-500"
|
||||
title="einteilen"
|
||||
hx-get="{{ path('app_admin_application_dispose', { 'uuid': application.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('check') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('STATUS', application) %}
|
||||
<button type="button"
|
||||
class="text-primary"
|
||||
title="Bewerbungsstatus bearbeiten"
|
||||
hx-get="{{ path('app_admin_application_status', { 'uuid': application.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('power') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if is_granted('DELETE', application) %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="Bewerbung löschen"
|
||||
hx-get="{{ path('app_admin_application_delete', { 'uuid': application.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
Es liegen keine Bewerbungen vor...
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="font-bold text-lg pb-4">
|
||||
Einteilungen
|
||||
</h2>
|
||||
<div class="data-table-wrapper w-full">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-1/4">
|
||||
Name
|
||||
</th>
|
||||
<th class="w-1/4">
|
||||
Anmerkungen
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for disposition in dispositions %}
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button"
|
||||
class="flex items-center space-x-1"
|
||||
title="Teamer:inneninfo {{ disposition.teamer }}"
|
||||
hx-get="{{ path('app_admin_teamer_info', { 'uuid': disposition.teamer.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
<span>{{ disposition.teamer }}</span>
|
||||
{{ icon('info', 'w-4 h-4') }}
|
||||
</button>
|
||||
{% include '_partials/_rating_stars.html.twig' with { 'teamer': disposition.teamer } %}
|
||||
</td>
|
||||
<td>
|
||||
{{ disposition.remarks|nl2br|default('-') }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ('label.disposition.status.' ~ disposition.status)|trans }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center justify-end space-x-2">
|
||||
{% if is_granted('DELETE', disposition) %}
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="Einteilung löschen"
|
||||
hx-get="{{ path('app_admin_disposition_delete', { 'uuid': disposition.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
Es gibt noch keine Einteilungen...
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ returnUrl }}" class="btn">
|
||||
zurück
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz duplizieren{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz duplizieren
|
||||
</h1>
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatz bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="text-2xl font-bold pb-8">
|
||||
Einsatz bearbeiten
|
||||
</h1>
|
||||
{% include 'administrative/assignment/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,140 @@
|
||||
{% extends 'administrative/layout.html.twig' %}
|
||||
|
||||
{% block title %}Einsatzübersicht{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-start justify-between pb-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
Einsatzübersicht
|
||||
</h1>
|
||||
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
|
||||
<button type="button"
|
||||
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
||||
title="Filter"
|
||||
hx-get="{{ path('app_common_assignment_filter', { 'r': return_url() }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('filter', 'w-4 h-4 shrink-0') }}
|
||||
{% if filterDto.active %}
|
||||
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
|
||||
{% else %}
|
||||
<span>Filter</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
{% if filterDto.active %}
|
||||
<a href="{{ path('app_common_assignment_filter_reset', { 'r': return_url() }) }}" class="btn btn--small btn--secondary">
|
||||
Reset
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="data-table-wrapper">
|
||||
<div class="data-table-wrapper__inner">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Einsatz­zeitraum', 'destination.dateFrom') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Destination', 'destination.product') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Jobprofil', 'job_profile.name') }}
|
||||
</th>
|
||||
<th>
|
||||
{{ knp_pagination_sortable(pagination, 'Bus', 'assignment.pickup') }}
|
||||
</th>
|
||||
<th>
|
||||
Bewerbungen<br>Status
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for assignment in pagination %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ assignment.effectivePeriod.start|date('d.m.Y') }} -
|
||||
<br>
|
||||
{{ assignment.effectivePeriod.end|date('d.m.Y') }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
|
||||
class="flex items-start space-x-2">
|
||||
{{ icon('flag-' ~ assignment.destination.country, 'w-5 h-5 shrink-0') }}
|
||||
<div class="flex-1">
|
||||
{{ assignment.destination.product }}
|
||||
<br>
|
||||
{{ assignment.destination.hotel }}
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ assignment.jobProfile.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if assignment.pickup %}
|
||||
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
|
||||
<a href="{{ path('app_administrative_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_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-2">
|
||||
<span>{{ assignment.validApplications|length }}/{{ assignment.availableDispositions - assignment.dispositions|length }}</span>
|
||||
{% if assignment.status == 'closed' %}
|
||||
{{ icon('locked', 'w-4 h-4 text-red-500') }}
|
||||
{% elseif assignment.status == 'draft' %}
|
||||
{{ icon('hourglass', 'w-4 h-4 text-yellow-500') }}
|
||||
{% else %}
|
||||
{{ icon('unlocked', 'w-4 h-4') }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="flex items-center space-x-1 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('copy', 'w-5 h-5') }}
|
||||
</a>
|
||||
{% if is_granted('EDIT', assignment) %}
|
||||
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
|
||||
{{ icon('edit', 'w-5 h-5') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
Keine Daten...
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ knp_pagination_render(pagination) }}
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ path('app_administrative_assignment_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du den Einsatz <em>{{ assignment.destination.product }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user