style: restyle the assignment detail page

This commit is contained in:
fromme committed 2026-11-12 11:25:30 +01:00
1 parent eda7856e48
commit 64fac372c0
2 files changed
+106 -122

No files matched your search

@@ -1,104 +1,54 @@
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
<dl class="divide-y divide-gray-100">
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Jobprofil
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0 max-h-96 overflow-y-auto pr-3">
<strong>{{ assignment.jobProfile.name }}</strong>
{% macro field(label) %}
<dt class="text-muted">{{ label }}</dt>
{% endmacro %}
<div class="grid gap-6 lg:grid-cols-2">
<section class="card p-5">
<h2 class="section-title pb-4">Einsatz</h2>
<dl class="grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-x-4 gap-y-2">
{{ _self.field('Jobprofil') }}
<dd class="max-h-96 overflow-y-auto break-words pr-3">
<span class="font-bold">{{ assignment.jobProfile.name }}</span>
{% if assignment.jobProfileInfo %}
<div class="pt-2">
{{ assignment.jobProfileInfo|nl2br }}
</div>
{% endif %}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Destination
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ assignment.destination.product }}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Einsatztermin
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Anmerkungen intern
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ assignment.remarks|default('-')|nl2br }}
</dd>
</div>
</dl>
<dl class="divide-y divide-gray-100">
{% if assignment.pickup %}
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Busbegleitung
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ pickup.city }}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Busabfahrt
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ pickup.time }} Uhr
</dd>
</div>
{% endif %}
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Benefits
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ assignment.benefits|nl2list }}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
Honorar
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{% if assignment.fees|length %}
{% for fee in assignment.fees %}
{{ fee.name }} {{ fee.value|format_money }}
{% endfor %}
{{ _self.field('Destination') }}
<dd class="break-words">{{ assignment.destination.product }}</dd>
{{ _self.field('Einsatztermin') }}
<dd>{{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }}</dd>
{{ _self.field('Anmerkungen intern') }}
<dd class="break-words">{{ assignment.remarks|default('-')|nl2br }}</dd>
</dl>
</section>
<section class="card p-5">
<h2 class="section-title pb-4">Konditionen</h2>
<dl class="grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-x-4 gap-y-2">
{% if assignment.pickup %}
{% set pickup = assignment.destination.pickup(assignment.pickup) %}
{{ _self.field('Busbegleitung') }}
<dd>{{ pickup.city }}</dd>
{{ _self.field('Busabfahrt') }}
<dd>{{ pickup.time }} Uhr</dd>
{% endif %}
{{ _self.field('Benefits') }}
<dd>{{ assignment.benefits|nl2list }}</dd>
{{ _self.field('Honorar') }}
<dd>
{% for fee in assignment.fees %}
<div>{{ fee.name }} {{ fee.value|format_money }}</div>
{% else %}
-
{% endif %}
{% endfor %}
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
erstellt
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{{ assignment.createdAt|date('d.m.Y, H:i') }} Uhr
</dd>
</div>
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-4 sm:gap-4">
<dt class="text-sm font-bold leading-6 text-gray-900">
aktualisiert
</dt>
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-3 sm:mt-0">
{% if assignment.updatedAt %}
{{ assignment.updatedAt|date('d.m.Y, H:i') }} Uhr
{% else %}
-
{% endif %}
</dd>
</div>
</dl>
</dl>
<p class="mt-4 border-t border-line pt-3 text-xs text-muted">
erstellt {{ assignment.createdAt|date('d.m.Y, H:i') }} Uhr
{% if assignment.updatedAt %}
· aktualisiert {{ assignment.updatedAt|date('d.m.Y, H:i') }} Uhr
{% endif %}
</p>
</section>
</div>
@@ -2,17 +2,48 @@
{% 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 %}
<h1 class="text-2xl font-bold pb-8">
Einsatzübersicht ID {{ assignment.id}}
</h1>
<div class="pb-8">
{% set status = status_labels[assignment.status] ?? status_labels[assignment.staffingStatus] ?? null %}
<a href="{{ returnUrl }}" class="inline-flex items-center gap-x-1 pb-4 text-sm font-bold text-brand hover:text-brand-dark">
{{ icon('arrow-left', 'w-4 h-4 shrink-0') }}
<span>zurück</span>
</a>
<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') %}
<div class="col-span-2">
<h2 class="font-bold text-lg pb-4">
Bewerbungen
<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">
@@ -31,7 +62,7 @@
<th>
Wünsche
</th>
<th></th>
<th><span class="sr-only">Aktionen</span></th>
</tr>
</thead>
<tbody>
@@ -70,7 +101,7 @@
<div class="flex items-center justify-end space-x-2">
{% if is_granted('DISPOSE', application) %}
<button type="button"
class="text-green-500"
class="text-emerald-700 hover:text-emerald-900"
title="einteilen"
hx-get="{{ path('app_admin_application_dispose', {
'uuid': application.uuid,
@@ -83,7 +114,7 @@
{% endif %}
{% if is_granted('STATUS', application) %}
<button type="button"
class="text-primary"
class="text-brand hover:text-brand-dark"
title="Bewerbungsstatus bearbeiten"
hx-get="{{ path('app_admin_application_status', {
'uuid': application.uuid,
@@ -96,7 +127,7 @@
{% endif %}
{% if is_granted('DELETE', application) %}
<button type="button"
class="text-red-500"
class="text-red-700 hover:text-red-900"
title="Bewerbung löschen"
hx-get="{{ path('app_admin_application_delete', {
'uuid': application.uuid,
@@ -112,8 +143,8 @@
</tr>
{% else %}
<tr>
<td colspan="5">
Es liegen keine Bewerbungen vor...
<td colspan="5" class="text-muted">
Es liegen keine Bewerbungen vor.
</td>
</tr>
{% endfor %}
@@ -121,9 +152,11 @@
</table>
</div>
</div>
{% endif %}
<h2 class="font-bold text-lg pb-4">
Einteilungen
</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">
@@ -145,7 +178,7 @@
<th>
Absprachen
</th>
<th></th>
<th><span class="sr-only">Aktionen</span></th>
</tr>
</thead>
<tbody>
@@ -181,13 +214,17 @@
{{ disposition.remarks|default('-')|nl2br }}
{% endif %}
</td>
<td>
<td>
{{ disposition.specialAgreements|default('-')|nl2br }}
</td>
<td>
<div class="flex items-center justify-end space-x-2">
<button type="button" 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-green-500': disposition.syncedWithBusProNet })) }}
<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"
@@ -221,7 +258,7 @@
{% endif %}
{% if is_granted('CALL_OFF', disposition) %}
<button type="button"
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
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() }) }}"
@@ -232,7 +269,7 @@
{% endif %}
{% if is_granted('DELETE', disposition) %}
<button type="button"
class="text-red-500 hover:text-primary block px-4 py-2 text-sm w-full text-left"
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() }) }}"
@@ -247,8 +284,8 @@
</tr>
{% else %}
<tr>
<td colspan="5">
Es gibt noch keine Einteilungen...
<td colspan="6" class="text-muted">
Es gibt noch keine Einteilungen.
</td>
</tr>
{% endfor %}
@@ -256,8 +293,5 @@
</table>
</div>
</div>
<a href="{{ returnUrl }}" class="btn">
zurück
</a>
</div>
</section>
{% endblock %}