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