From 64fac372c029cc2f715fb7a45aad288ad65ecd76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Thu, 12 Nov 2026 11:25:30 +0100 Subject: [PATCH] style: restyle the assignment detail page --- .../_assignment_info_compact.html.twig | 138 ++++++------------ .../assignment/detail.html.twig | 90 ++++++++---- 2 files changed, 106 insertions(+), 122 deletions(-) diff --git a/templates/_partials/_assignment_info_compact.html.twig b/templates/_partials/_assignment_info_compact.html.twig index b9d988b..ea5e87c 100644 --- a/templates/_partials/_assignment_info_compact.html.twig +++ b/templates/_partials/_assignment_info_compact.html.twig @@ -1,104 +1,54 @@ -
-
-
-
- Jobprofil -
-
- {{ assignment.jobProfile.name }} +{% macro field(label) %} +
{{ label }}
+{% endmacro %} + +
+
+

Einsatz

+
+ {{ _self.field('Jobprofil') }} +
+ {{ assignment.jobProfile.name }} {% if assignment.jobProfileInfo %}
{{ assignment.jobProfileInfo|nl2br }}
{% endif %}
-
-
-
- Destination -
-
- {{ assignment.destination.product }} -
-
-
-
- Einsatztermin -
-
- {{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }} -
-
-
-
- Anmerkungen intern -
-
- {{ assignment.remarks|default('-')|nl2br }} -
-
-
-
- {% if assignment.pickup %} - {% set pickup = assignment.destination.pickup(assignment.pickup) %} -
-
- Busbegleitung -
-
- {{ pickup.city }} -
-
-
-
- Busabfahrt -
-
- {{ pickup.time }} Uhr -
-
- {% endif %} -
-
- Benefits -
-
- {{ assignment.benefits|nl2list }} -
-
-
-
- Honorar -
-
- {% if assignment.fees|length %} - {% for fee in assignment.fees %} - {{ fee.name }} {{ fee.value|format_money }} - {% endfor %} + {{ _self.field('Destination') }} +
{{ assignment.destination.product }}
+ {{ _self.field('Einsatztermin') }} +
{{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }}
+ {{ _self.field('Anmerkungen intern') }} +
{{ assignment.remarks|default('-')|nl2br }}
+
+ +
+

Konditionen

+
+ {% if assignment.pickup %} + {% set pickup = assignment.destination.pickup(assignment.pickup) %} + {{ _self.field('Busbegleitung') }} +
{{ pickup.city }}
+ {{ _self.field('Busabfahrt') }} +
{{ pickup.time }} Uhr
+ {% endif %} + {{ _self.field('Benefits') }} +
{{ assignment.benefits|nl2list }}
+ {{ _self.field('Honorar') }} +
+ {% for fee in assignment.fees %} +
{{ fee.name }} {{ fee.value|format_money }}
{% else %} - - {% endif %} + {% endfor %}
-
-
-
- erstellt -
-
- {{ assignment.createdAt|date('d.m.Y, H:i') }} Uhr -
-
-
-
- aktualisiert -
-
- {% if assignment.updatedAt %} - {{ assignment.updatedAt|date('d.m.Y, H:i') }} Uhr - {% else %} - - - {% endif %} -
-
- + +

+ erstellt {{ assignment.createdAt|date('d.m.Y, H:i') }} Uhr + {% if assignment.updatedAt %} + · aktualisiert {{ assignment.updatedAt|date('d.m.Y, H:i') }} Uhr + {% endif %} +

+ diff --git a/templates/administrative/assignment/detail.html.twig b/templates/administrative/assignment/detail.html.twig index 0e2f3a5..4e672ef 100644 --- a/templates/administrative/assignment/detail.html.twig +++ b/templates/administrative/assignment/detail.html.twig @@ -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 %} -

- Einsatzübersicht ID {{ assignment.id}} -

-
+ {% set status = status_labels[assignment.status] ?? status_labels[assignment.staffingStatus] ?? null %} + + {{ icon('arrow-left', 'w-4 h-4 shrink-0') }} + zurück + +
+
+

Einsatz ID {{ assignment.id }}

+

{{ assignment.jobProfile.name }}

+

+ {{ assignment.destination.product }} · {{ assignment.destination.dateFrom|date('d.m.Y') }} - {{ assignment.destination.dateTo|date('d.m.Y') }} +

+
+
+ {% if status %} + {{ status[0] }} + {% endif %} + {% if is_granted('EDIT', assignment) %} + + {{ icon('edit', 'w-4 h-4 shrink-0') }} + bearbeiten + + {% endif %} +
+
+
{% include '_partials/_assignment_info_compact.html.twig' %}
{% if is_granted('ROLE_TEAM_ADMIN') %} -
-

- Bewerbungen +
+

+ Bewerbungen {{ applications|length }}

@@ -31,7 +62,7 @@ Wünsche - + Aktionen @@ -70,7 +101,7 @@
{% if is_granted('DISPOSE', application) %}
- {% endif %} -

- Einteilungen +

+ {% endif %} +
+

+ Einteilungen {{ dispositions|length }}

@@ -145,7 +178,7 @@ Absprachen - + Aktionen @@ -181,13 +214,17 @@ {{ disposition.remarks|default('-')|nl2br }} {% endif %} - + {{ disposition.specialAgreements|default('-')|nl2br }}
-
- - zurück - -
+
{% endblock %}