style: adopt ep-design 1.2.0 dashboard cards and replace the hover dropdown with a click menu

This commit is contained in:
fromme committed 2026-11-13 12:25:24 +01:00
1 parent 99e6119311
commit 6dbc6efa78
16 files changed
+381 -554

No files matched your search

@@ -105,23 +105,21 @@
{{ submission.teamerCreatedAt ? submission.teamerCreatedAt|date('d.m.Y, H:i') : '-' }}
</td>
<td>
<twig:DropDown>
<twig:menu>
<a href="{{ path('app_admin_application_form_submission_detail', { 'uuid': submission.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
Details
</a>
<button type="button"
class="text-red-500 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item-danger"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_admin_application_form_submission_delete', { 'uuid': submission.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
löschen
</button>
</twig:DropDown>
</twig:menu>
</td>
</tr>
{% else %}
+95 -287
View File
@@ -3,304 +3,112 @@
{% block content %}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Bewerbungen</span>
{% if newApplicationsCount > 0 or pendingApplicationsCount > 0 %}
<span class="text-muted">{{ newApplicationsCount }} neu, {{ pendingApplicationsCount }} in Bearbeitung</span>
{% endif %}
</h2>
<ul class="divide-y divide-line">
{% for application in applications %}
{% set assignment = application.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-1">
{{ icon('hand', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ application.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Bewerbungen"
meta="{{ newApplicationsCount > 0 or pendingApplicationsCount > 0 ? newApplicationsCount ~ ' neu, ' ~ pendingApplicationsCount ~ ' in Bearbeitung' }}"
emptyText="Keine neuen Bewerbungen.">
{% for application in applications %}
{% set assignment = application.assignment %}
<twig:dashboard:entry icon="hand"
url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
:parts="[application.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel, assignment.jobProfile.name]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="section-title pb-3">
Neue Einteilungen
</h2>
<ul class="divide-y divide-line">
{% for disposition in newDispositions %}
{% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-1">
{{ icon('hand', 'w-4 h-4 shrink-0') }}
{% include '_partials/_disposition_data.html.twig' with { 'disposition': disposition } %}
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Einteilungen" emptyText="Keine neuen Einteilungen.">
{% for disposition in newDispositions %}
<twig:dashboard:entry icon="hand"
url="{{ path('app_administrative_assignment_detail', {uuid: disposition.assignment.uuid, r: return_url()}) }}">
{% include '_partials/_disposition_data.html.twig' with {disposition: disposition} %}
</twig:dashboard:entry>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Honorarverträge</span>
{% if newContractsCount > 0 or pendingContractsCount > 0 %}
<span class="text-muted">{{ newContractsCount }} neu, {{ pendingContractsCount }} in Bearbeitung</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for document in newContracts %}
{% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_document_check', { 'uuid': document.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Neue Honorarverträge"
meta="{{ newContractsCount > 0 or pendingContractsCount > 0 ? newContractsCount ~ ' neu, ' ~ pendingContractsCount ~ ' in Bearbeitung' }}"
emptyText="Keine neuen Honorarverträge."
:scroll="true">
{% for document in newContracts %}
{% set assignment = document.disposition.assignment %}
<twig:dashboard:entry icon="download"
hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
:parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Honorarnoten</span>
{% if newInvoicesCount > 0 or pendingInvoicesCount > 0 %}
<span class="text-muted">{{ newInvoicesCount }} neu, {{ pendingInvoicesCount }} in Bearbeitung</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for document in newInvoices %}
{% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_document_check', { 'uuid': document.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Neue Honorarnoten"
meta="{{ newInvoicesCount > 0 or pendingInvoicesCount > 0 ? newInvoicesCount ~ ' neu, ' ~ pendingInvoicesCount ~ ' in Bearbeitung' }}"
emptyText="Keine neuen Honorarnoten."
:scroll="true">
{% for document in newInvoices %}
{% set assignment = document.disposition.assignment %}
<twig:dashboard:entry icon="download"
hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
:parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Führerscheine</span>
{% if newDriverLicensesCount > 0 %}
<span class="text-muted">{{ newDriverLicensesCount }} neu</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for document in newDriverLicenses %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_teamer_driver_license_check', { 'uuid': document.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ document.createdAt|date('d.m.y') }}</span>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Neue Führerscheine"
meta="{{ newDriverLicensesCount > 0 ? newDriverLicensesCount ~ ' neu' }}"
emptyText="Keine neuen Führerscheine."
:scroll="true">
{% for document in newDriverLicenses %}
<twig:dashboard:entry icon="download"
hx-get="{{ path('app_administrative_teamer_driver_license_check', {uuid: document.uuid}) }}"
:parts="[document.owner.teamer.fullName(true), document.createdAt|date('d.m.y')]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="section-title pb-3">
Neue Einsätze
</h2>
<ul class="divide-y divide-line">
{% for assignment in assignments %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('calendar', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.owner.fullName(true) }}</span>
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Einsätze" emptyText="Keine neuen Einsätze.">
{% for assignment in assignments %}
<twig:dashboard:entry icon="calendar"
url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
:parts="[assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.jobProfile.name, assignment.owner.fullName(true)]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="section-title pb-3">
Neue Verfügbarkeiten
</h2>
<ul class="divide-y divide-line">
{% for availability in availabilities %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_admin_teamer_availability', { 'uuid': availability.owner.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('calendar', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ availability.owner.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ availability.dateFrom|date('d.m.y') }} - {{ availability.dateTo|date('d.m.y') }}</span>
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Verfügbarkeiten" emptyText="Keine neuen Verfügbarkeiten.">
{% for availability in availabilities %}
<twig:dashboard:entry icon="calendar"
url="{{ path('app_admin_teamer_availability', {uuid: availability.owner.uuid, r: return_url()}) }}"
:parts="[availability.owner.fullName(true), availability.dateFrom|date('d.m.y') ~ ' - ' ~ availability.dateTo|date('d.m.y')]"/>
{% endfor %}
</twig:dashboard:widget>
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Feedbacks</span>
{% if pendingFeedbacksCount > 0 %}
<span class="text-muted">{{ pendingFeedbacksCount }} freizugeben</span>
{% endif %}
</h2>
<ul class="divide-y divide-line">
{% for feedback in feedbacks %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<button type="button"
hx-get="{{ path('app_admin_feedback_approve', { 'uuid': feedback.uuid }) }}"
hx-target="body"
hx-swap="beforeend" class="flex items-center space-x-1">
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ feedback.teamer }}</span>
{% if feedback.destinationName %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ feedback.destinationName }}</span>
{% endif %}
{% if feedback.jobProfileName %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ feedback.jobProfileName }}</span>
{% endif %}
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Feedbacks"
meta="{{ pendingFeedbacksCount > 0 ? pendingFeedbacksCount ~ ' freizugeben' }}"
emptyText="Keine Feedbacks freizugeben.">
{% for feedback in feedbacks %}
<twig:dashboard:entry icon="feedback"
hx-get="{{ path('app_admin_feedback_approve', {uuid: feedback.uuid}) }}"
:parts="[feedback.teamer, feedback.destinationName, feedback.jobProfileName]"/>
{% endfor %}
</twig:dashboard:widget>
{% set overdueFeedbacksCount = overdueFeedbacks|length %}
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Überfällige Feedbacks</span>
{% if overdueFeedbacksCount > 0 %}
<span class="text-muted">{{ overdueFeedbacksCount }} überfällig</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ disposition.teamer }}</span>
{% if assignment.destination %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination }}</span>
{% endif %}
{% if assignment.jobProfile %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
{% endif %}
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Überfällige Feedbacks"
meta="{{ overdueFeedbacksCount > 0 ? overdueFeedbacksCount ~ ' überfällig' }}"
emptyText="Keine überfälligen Feedbacks."
:scroll="true">
{% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %}
<twig:dashboard:entry icon="feedback"
url="{{ path('app_administrative_feedback_provide', {uuid: disposition.uuid, r: return_url()}) }}"
:parts="[disposition.teamer, assignment.destination, assignment.jobProfile ? assignment.jobProfile.name]"/>
{% endfor %}
</twig:dashboard:widget>
{% set overdueContractsCount = overdueContracts|length %}
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Überfällige Honorarverträge</span>
{% if overdueContractsCount > 0 %}
<span class="text-muted">{{ overdueContractsCount }} überfällig</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for disposition in overdueContracts %}
{% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('calendar', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ disposition.teamer.fullName(true) }}</span>
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Überfällige Honorarverträge"
meta="{{ overdueContractsCount > 0 ? overdueContractsCount ~ ' überfällig' }}"
emptyText="Keine überfälligen Honorarverträge."
:scroll="true">
{% for disposition in overdueContracts %}
{% set assignment = disposition.assignment %}
<twig:dashboard:entry icon="calendar"
url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
:parts="[assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.jobProfile.name, disposition.teamer.fullName(true)]"/>
{% endfor %}
</twig:dashboard:widget>
</div>
{% endblock %}
+7 -11
View File
@@ -89,19 +89,17 @@
{% endif %}
</td>
<td>
<twig:DropDown>
<twig:menu>
<a href="{{ path('app_admin_work_month_pdf', { 'uuid': workMonth.uuid }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
class="menu-item"
role="menuitem"
tabindex="-1"
target="_blank">
Nachweis ansehen
</a>
{% if workMonth.status.value == 'submitted' %}
<a href="{{ path('app_admin_work_month_review', { 'uuid': workMonth.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
class="menu-item"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_admin_work_month_review', { 'uuid': workMonth.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
@@ -110,24 +108,22 @@
{% endif %}
<form method="post" action="{{ path('app_admin_work_month_sync', { 'uuid': workMonth.uuid, 'r': return_url() }) }}">
<button type="submit"
class="w-full text-left text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
Erneut abrufen
</button>
</form>
{% if workMonth.status.value in ['submitted', 'approved'] %}
<form method="post" action="{{ path('app_admin_work_month_unlock', { 'uuid': workMonth.uuid, 'r': return_url() }) }}">
<button type="submit"
class="w-full text-left text-gray-700 hover:text-brand block px-4 py-2 text-sm"
class="menu-item"
role="menuitem"
tabindex="-1"
onclick="return confirm('Der Monat wird wieder geöffnet und muss neu unterschrieben werden. Fortfahren?')">
Wieder öffnen
</button>
</form>
{% endif %}
</twig:DropDown>
</twig:menu>
</td>
</tr>
{% else %}
@@ -223,11 +223,10 @@
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>
<twig:menu>
<button type="button"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item"
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">
@@ -235,18 +234,16 @@
</button>
{% if is_granted('ADMIN_DOCUMENT_UPLOAD', disposition) %}
<button type="button"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item"
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-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item"
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">
@@ -255,9 +252,8 @@
{% 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"
class="menu-item-danger"
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">
@@ -266,16 +262,15 @@
{% 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"
class="menu-item-danger"
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>
</twig:menu>
</div>
</td>
</tr>
@@ -188,11 +188,10 @@
</ul>
</td>
<td>
<twig:DropDown>
<twig:menu>
<button type="button"
class="text-red-500 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item-danger"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
@@ -200,9 +199,8 @@
</button>
{% if is_granted('CALL_OFF', assignment) %}
<button type="button"
class="text-red-500 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item-danger"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_assignment_call_off', { 'uuid': assignment.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
@@ -210,43 +208,38 @@
</button>
{% endif %}
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
duplizieren
</a>
{% if is_granted('EDIT', assignment) %}
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
bearbeiten
</a>
{% endif %}
{% if is_granted('PUBLISH', assignment) %}
<button type="button"
class="block px-4 py-2 text-sm w-full text-left"
class="menu-item"
role="menuitem"
tabindex="-1"
hx-post="{{ path('app_administrative_assignment_publish', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
veröffentlichen
</button>
{% endif %}
<a href="{{ path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
class="menu-item"
role="menuitem"
tabindex="-1"
title="Das Reiseleitungsfeedback ansehen und ausprobieren, wie es Teamer:innen dieses Einsatzes bekommen. Es wird nichts gespeichert.">
Vorschau Reiseleitungsfeedback
</a>
<a href="{{ path('app_administrative_questionnaire_test_house_manager', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
class="menu-item"
role="menuitem"
tabindex="-1"
title="Das Hausleitungsfeedback zur Reise dieses Einsatzes ansehen und ausprobieren. Es wird nichts gespeichert.">
Vorschau Hausleitungsfeedback
</a>
</twig:DropDown>
</twig:menu>
</td>
</tr>
{% else %}
@@ -87,29 +87,26 @@
{{ seasonAssignment.jobProfile.name }}
</td>
<td>
<twig:DropDown>
<twig:menu>
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
Details
</a>
<a href="{{ path('app_administrative_season_assignment_edit', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
bearbeiten
</a>
<button type="button"
class="text-red-500 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item-danger"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_season_assignment_delete', { 'uuid': seasonAssignment.uuid }) }}"
hx-target="body"
hx-swap="beforeend">
löschen
</button>
</twig:DropDown>
</twig:menu>
{% if seasonAssignment.deleted %}
<div class="py-1 px-2 mt-2 text-xs bg-gray-500 text-white">
gel. am {{ seasonAssignment.deletedAt | date('d.m.Y') }}
@@ -65,29 +65,26 @@
{{ destination.dateTo | date('d.m.Y') }}
</td>
<td>
<twig:DropDown>
<twig:menu>
<button type="button"
class="text-red-500 hover:text-brand block px-4 py-2 text-sm w-full text-left"
class="menu-item-danger"
role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_system_destination_delete', { 'id': destination.id }) }}"
hx-target="body"
hx-swap="beforeend">
löschen
</button>
<a href="{{ path('app_administrative_system_destination_duplicate', { 'id': destination.id }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
duplizieren
</a>
<a href="{{ path('app_administrative_system_destination_edit', { 'id': destination.id }) }}"
class="text-gray-700 hover:text-brand block px-4 py-2 text-sm"
role="menuitem"
tabindex="-1">
class="menu-item"
role="menuitem">
bearbeiten
</a>
</twig:DropDown>
</twig:menu>
</td>
</tr>
{% else %}
@@ -0,0 +1,30 @@
{#-
One line of a dashboard:widget. Its text is `parts` (shown with dots between them) or the content
block; `icon` in front. With `url` the line is a link, without one but with hx-* attributes a
button (opening a modal, say), otherwise plain text.
-#}
{% set url = url ?? null %}
{% set icon = icon ?? null %}
{% set parts = parts ?? null %}
{% set is_button = not url and attributes.all|keys|filter(k => k starts with 'hx-')|length > 0 %}
{% set body %}
{% if icon %}{{ include('_partials/_icon.html.twig', {icon: icon, class: 'size-4 text-muted'}) }}{% endif %}
{% if parts is not null %}
{% for part in parts|filter(p => p is not empty) %}
{% if not loop.first %}<span class="entry-dot" aria-hidden="true">·</span>{% endif %}
<span>{{ part }}</span>
{% endfor %}
{% else %}
<span>{{ block('content') }}</span>
{% endif %}
{% endset %}
{% set attrs = attributes.defaults({class: 'entry-link'}).without('url', 'icon', 'parts') %}
<li>
{% if url %}
<a href="{{ url }}" {{ attrs }}>{{ body }}</a>
{% elseif is_button %}
<button type="button" {{ attributes.defaults({class: 'entry-link', 'hx-target': 'body', 'hx-swap': 'beforeend'}).without('url', 'icon', 'parts') }}>{{ body }}</button>
{% else %}
<div {{ attrs }}>{{ body }}</div>
{% endif %}
</li>
@@ -0,0 +1,25 @@
{#-
A card of entries, as on a dashboard. `title`; optional `meta` (a short count beside the title,
such as "3 neu, 2 in Bearbeitung"), `emptyText` and `scroll` (for work queues that would grow the
card without limit); the `actions` block goes to the right of the header, typically "alle anzeigen".
-#}
{% set emptyText = emptyText ?? 'Keine Einträge vorhanden.' %}
{% set meta = meta ?? null %}
{% set scroll = scroll ?? false %}
{% set entries %}{% block content %}{% endblock %}{% endset %}
<section {{ attributes.defaults({class: 'card p-5'}).without('title', 'meta', 'emptyText', 'scroll') }}>
<div class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 pb-3">
<h2 class="section-title">{{ title }}</h2>
<div class="flex items-baseline gap-x-4">
{% if meta %}<span class="text-sm text-muted">{{ meta }}</span>{% endif %}
{% block actions %}{% endblock %}
</div>
</div>
{% if entries|trim is empty %}
{% block empty %}
<p class="text-sm text-muted">{{ emptyText }}</p>
{% endblock %}
{% else %}
<ul class="entry-list {{ scroll ? 'entry-list--scroll' }}">{{ entries }}</ul>
{% endif %}
</section>
-15
View File
@@ -1,15 +0,0 @@
<div class="relative inline-block text-left group"
{{ stimulus_controller('dropdown') }}
{{ stimulus_action('dropdown', 'open', 'mouseenter')|stimulus_action('dropdown', 'close', 'mouseleave') }}>
<button type="button" class="flex items-center text-gray-400 hover:text-gray-600 focus:outline-hidden focus:ring-0" aria-expanded="true" aria-haspopup="true" {{ stimulus_target('dropdown', 'button') }}>
<span class="sr-only">Funktionen</span>
{{ icon('dots', 'w-6 h-6') }}
</button>
<div class="hidden group-hover:block absolute right-0 top-0 z-10 w-56 origin-top-right pt-4" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1" {{ stimulus_target('dropdown', 'menu') }}>
<div class="rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-hidden">
<div class="py-1 menu menu--pulldown" role="none">
{% block content %}{% endblock %}
</div>
</div>
</div>
</div>
+13
View File
@@ -0,0 +1,13 @@
{#-
A "⋯" menu (menu_controller.js), opened by click or tap, never by hover. The items go in the
content block: links or buttons with the class `menu-item` (or `menu-item-danger`) and
role="menuitem". Choosing one closes the menu.
-#}
{% set label = label ?? 'Aktionen' %}
<div class="relative inline-block" {{ stimulus_controller('menu') }}>
<button type="button" class="btn-more" aria-haspopup="menu" aria-expanded="false" aria-label="{{ label }}"
{{ stimulus_target('menu', 'button') }} {{ stimulus_action('menu', 'toggle') }}>⋯</button>
<div class="menu-panel" role="menu" hidden {{ stimulus_target('menu', 'panel') }} {{ stimulus_action('menu', 'choose') }}>
{% block content %}{% endblock %}
</div>
</div>
+44 -120
View File
@@ -2,126 +2,50 @@
{% block content %}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Honorarverträge</span>
{% if newContractsCount > 0 or pendingContractsCount > 0 %}
<span class="text-muted">{{ newContractsCount }} neu, {{ pendingContractsCount }} in Bearbeitung</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for document in newContracts %}
{% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_document_check', { 'uuid': document.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Neue Honorarnoten</span>
{% if newInvoicesCount > 0 or pendingInvoicesCount > 0 %}
<span class="text-muted">{{ newInvoicesCount }} neu, {{ pendingInvoicesCount }} in Bearbeitung</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for document in newInvoices %}
{% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0">
<button type="button"
class="flex items-center space-x-1 truncate"
hx-get="{{ path('app_administrative_document_check', { 'uuid': document.uuid, 'r': return_url() }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('download', 'w-4 h-4 shrink-0') }}
<span>{{ document.owner.teamer.fullName(true) }}</span>
<span class="whitespace-nowrap">{{ assignment.destination.dateFrom|date('d.m.y') }} - {{ assignment.destination.dateTo|date('d.m.y') }}</span>
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination.hotel }}</span>
</button>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="card p-4">
<h2 class="section-title pb-3">
Neue Einteilungen
</h2>
<ul class="divide-y divide-line">
{% for disposition in dispositions %}
{% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('hand', 'w-4 h-4 shrink-0') }}
{% include '_partials/_disposition_data.html.twig' with { 'disposition': disposition } %}
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
<twig:dashboard:widget title="Neue Honorarverträge"
meta="{{ newContractsCount > 0 or pendingContractsCount > 0 ? newContractsCount ~ ' neu, ' ~ pendingContractsCount ~ ' in Bearbeitung' }}"
emptyText="Keine neuen Honorarverträge."
:scroll="true">
{% for document in newContracts %}
{% set assignment = document.disposition.assignment %}
<twig:dashboard:entry icon="download"
hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
:parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
{% endfor %}
</twig:dashboard:widget>
<twig:dashboard:widget title="Neue Honorarnoten"
meta="{{ newInvoicesCount > 0 or pendingInvoicesCount > 0 ? newInvoicesCount ~ ' neu, ' ~ pendingInvoicesCount ~ ' in Bearbeitung' }}"
emptyText="Keine neuen Honorarnoten."
:scroll="true">
{% for document in newInvoices %}
{% set assignment = document.disposition.assignment %}
<twig:dashboard:entry icon="download"
hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
:parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
{% endfor %}
</twig:dashboard:widget>
<twig:dashboard:widget title="Neue Einteilungen" emptyText="Keine neuen Einteilungen.">
{% for disposition in dispositions %}
<twig:dashboard:entry icon="hand"
url="{{ path('app_administrative_assignment_detail', {uuid: disposition.assignment.uuid, r: return_url()}) }}">
{% include '_partials/_disposition_data.html.twig' with {disposition: disposition} %}
</twig:dashboard:entry>
{% endfor %}
</twig:dashboard:widget>
{% set overdueFeedbacksCount = overdueFeedbacks|length %}
<div class="card p-4">
<h2 class="flex justify-between items-baseline gap-x-4 pb-3">
<span class="section-title">Überfällige Feedbacks</span>
{% if overdueFeedbacksCount > 0 %}
<span class="text-muted">{{ overdueFeedbacksCount }} überfällig</span>
{% endif %}
</h2>
<div class="max-h-64 overflow-y-auto overflow-x-hidden pr-3">
<ul class="divide-y divide-line">
{% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden">
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}"
class="flex items-center space-x-1">
{{ icon('feedback', 'w-4 h-4 shrink-0') }}
<span class="whitespace-nowrap">{{ disposition.teamer }}</span>
{% if assignment.destination %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.destination }}</span>
{% endif %}
{% if assignment.jobProfile %}
{% include '_partials/_dot.html.twig' %}
<span class="whitespace-nowrap">{{ assignment.jobProfile.name }}</span>
{% endif %}
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %}
</ul>
</div>
</div>
<twig:dashboard:widget title="Überfällige Feedbacks"
meta="{{ overdueFeedbacksCount > 0 ? overdueFeedbacksCount ~ ' überfällig' }}"
emptyText="Keine überfälligen Feedbacks."
:scroll="true">
{% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %}
<twig:dashboard:entry icon="feedback"
url="{{ path('app_administrative_feedback_provide', {uuid: disposition.uuid, r: return_url()}) }}"
:parts="[disposition.teamer, assignment.destination, assignment.jobProfile ? assignment.jobProfile.name]"/>
{% endfor %}
</twig:dashboard:widget>
</div>
{% endblock %}