295 lines
17 KiB
Twig
295 lines
17 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Einsatzübersicht{% endblock %}
|
|
|
|
{% set status_labels = {
|
|
draft: ['Entwurf', 'border-muted text-muted'],
|
|
called_off: ['abgesagt', 'border-red-700 bg-red-50 text-red-900'],
|
|
staffed: ['voll besetzt', 'border-emerald-700 bg-emerald-50 text-emerald-900'],
|
|
partly_staffed: ['teilweise besetzt', 'border-amber-600 bg-amber-50 text-amber-950'],
|
|
staffing: ['mit Bewerbungen', 'border-brand bg-brand-light text-brand-dark'],
|
|
unstaffed: ['unbesetzt', 'border-muted text-muted'],
|
|
} %}
|
|
|
|
{% block content %}
|
|
{% set status = status_labels[assignment.status] ?? status_labels[assignment.staffingStatus] ?? null %}
|
|
{{ include('_partials/_back_link.html.twig', { 'url': returnUrl }) }}
|
|
<div class="flex flex-wrap items-start justify-between gap-4 pb-6">
|
|
<div>
|
|
<p class="text-xs font-bold uppercase tracking-wide text-muted">Einsatz ID {{ assignment.id }}</p>
|
|
<h1 class="text-2xl font-bold">{{ assignment.jobProfile.name }}</h1>
|
|
<p class="text-muted">
|
|
{{ assignment.destination.product }} · {{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }}
|
|
</p>
|
|
</div>
|
|
<div class="flex items-center gap-x-3">
|
|
{% if status %}
|
|
<span class="border px-2 py-1 text-xs font-bold uppercase tracking-wide {{ status[1] }}">{{ status[0] }}</span>
|
|
{% endif %}
|
|
{% if is_granted('EDIT', assignment) %}
|
|
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="btn btn--small btn--secondary">
|
|
{{ icon('edit', 'w-4 h-4 shrink-0') }}
|
|
<span>bearbeiten</span>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="pb-10">
|
|
{% include '_partials/_assignment_info_compact.html.twig' %}
|
|
</div>
|
|
{% if is_granted('ROLE_TEAM_ADMIN') %}
|
|
<section class="pb-2">
|
|
<h2 class="section-title pb-3">
|
|
Bewerbungen <span class="font-normal text-muted">{{ applications|length }}</span>
|
|
</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/5">
|
|
Status
|
|
</th>
|
|
<th>
|
|
Zustieg
|
|
</th>
|
|
<th>
|
|
Wünsche
|
|
</th>
|
|
<th><span class="sr-only">Aktionen</span></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_administrative_teamer_info', {
|
|
'uuid': application.teamer.uuid,
|
|
'r': return_url()
|
|
}) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<span>{{ application.teamer }}</span>
|
|
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': application.teamer } %}
|
|
{{ icon('info', 'w-4 h-4') }}
|
|
</button>
|
|
<twig:RatingStars rating="{{ application.teamer.averageRating }}" :teamer="application.teamer" />
|
|
</td>
|
|
<td>
|
|
{{ ('label.application.status.' ~ application.status)|trans }}
|
|
</td>
|
|
<td>
|
|
{% if application.pickup %}
|
|
{{ application.pickup|bpn_pickup_label }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ application.requests|default('-')|nl2br }}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center justify-end space-x-2">
|
|
{% if is_granted('DISPOSE', application) %}
|
|
<button type="button"
|
|
class="text-emerald-700 hover:text-emerald-900"
|
|
title="einteilen"
|
|
hx-get="{{ path('app_admin_application_dispose', {
|
|
'uuid': application.uuid,
|
|
'r': forwarded_return_url()
|
|
}) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('check') }}
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('STATUS', application) %}
|
|
<button type="button"
|
|
class="text-brand hover:text-brand-dark"
|
|
title="Bewerbungsstatus bearbeiten"
|
|
hx-get="{{ path('app_admin_application_status', {
|
|
'uuid': application.uuid,
|
|
'r': forwarded_return_url()
|
|
}) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('edit') }}
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('DELETE', application) %}
|
|
<button type="button"
|
|
class="text-red-700 hover:text-red-900"
|
|
title="Bewerbung löschen"
|
|
hx-get="{{ path('app_admin_application_delete', {
|
|
'uuid': application.uuid,
|
|
'r': forwarded_return_url()
|
|
}) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('delete') }}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="5" class="text-muted">
|
|
Es liegen keine Bewerbungen vor.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
<section>
|
|
<h2 class="section-title pb-3">
|
|
Einteilungen <span class="font-normal text-muted">{{ dispositions|length }}</span>
|
|
</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/5">
|
|
Status
|
|
</th>
|
|
<th>
|
|
Zustieg
|
|
</th>
|
|
<th>
|
|
Anmerkungen
|
|
</th>
|
|
<th>
|
|
Absprachen
|
|
</th>
|
|
<th><span class="sr-only">Aktionen</span></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_administrative_teamer_info', { 'uuid': disposition.teamer.uuid, 'r': return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
<span>{{ disposition.teamer }}</span>
|
|
{% include '_partials/_teamer_deleted_badge.html.twig' with { 'teamer': disposition.teamer } %}
|
|
{{ icon('info', 'w-4 h-4') }}
|
|
</button>
|
|
<twig:RatingStars rating="{{ disposition.teamer.averageRating }}" :teamer="disposition.teamer" />
|
|
</td>
|
|
<td>
|
|
{{ ('label.disposition.status.' ~ disposition.status)|trans }}
|
|
</td>
|
|
<td>
|
|
{% if disposition.pickup %}
|
|
{{ disposition.pickup|bpn_pickup_label }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if disposition.calledOffReason %}
|
|
{{ disposition.calledOffReason|default('-')|nl2br }}
|
|
{% else %}
|
|
{{ disposition.remarks|default('-')|nl2br }}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{{ disposition.specialAgreements|default('-')|nl2br }}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center justify-end space-x-2">
|
|
<button type="button"
|
|
title="{{ disposition.syncedWithBusProNet ? 'in BusProNet hinterlegt' : 'nicht in BusProNet hinterlegt' }} (umschalten)"
|
|
aria-pressed="{{ disposition.syncedWithBusProNet ? 'true' : 'false' }}"
|
|
hx-post="{{ path('app_administrative_disposition_bpn_sync_toggle', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}"
|
|
hx-swap="none">
|
|
{{ icon('chair', html_classes('w-5 h-5', { 'text-emerald-700': disposition.syncedWithBusProNet, 'text-gray-400': not disposition.syncedWithBusProNet })) }}
|
|
</button>
|
|
<twig:DropDown>
|
|
<button type="button"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
zusätzliche Absprachen
|
|
</button>
|
|
{% if is_granted('ADMIN_DOCUMENT_UPLOAD', disposition) %}
|
|
<button type="button"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'contract', 'r': forwarded_return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
Honorarvertrag hochladen
|
|
</button>
|
|
<button type="button"
|
|
class="text-gray-700 hover:text-primary block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'invoice', 'r': forwarded_return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
Honorarnote hochladen
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('CALL_OFF', disposition) %}
|
|
<button type="button"
|
|
class="text-red-700 hover:text-red-900 block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_administrative_disposition_call_off', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
absagen
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('DELETE', disposition) %}
|
|
<button type="button"
|
|
class="text-red-700 hover:text-red-900 block px-4 py-2 text-sm w-full text-left"
|
|
role="menuitem"
|
|
tabindex="-1"
|
|
hx-get="{{ path('app_admin_disposition_delete', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
löschen
|
|
</button>
|
|
{% endif %}
|
|
</twig:DropDown>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="6" class="text-muted">
|
|
Es gibt noch keine Einteilungen.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|