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
+345 -518

No files matched your search

-50
View File
@@ -1,50 +0,0 @@
import { Controller } from '@hotwired/stimulus'
/*
* Pins the hover menu of templates/components/dropdown.html.twig to the viewport while it is open.
*
* The menu sits in the last cell of data tables, whose wrapper scrolls horizontally when a table is
* wider than its column (components/datatable.css). A scrolling box clips everything absolutely
* positioned inside it, so on the last rows the menu would vanish into a scrollbar. Fixed
* positioning takes it out of that box; it stays a descendant of the hover group, so the CSS
* group-hover that shows and hides it keeps working unchanged.
*
* Right-aligned to the button like before, and flipped above it when there is no room below.
*/
export default class extends Controller {
static targets = [ 'button', 'menu' ]
connect () {
this.boundPosition = this.position.bind(this)
}
open () {
this.position()
window.addEventListener('scroll', this.boundPosition, true)
window.addEventListener('resize', this.boundPosition)
}
close () {
window.removeEventListener('scroll', this.boundPosition, true)
window.removeEventListener('resize', this.boundPosition)
}
position () {
const button = this.buttonTarget.getBoundingClientRect()
const menu = this.menuTarget
menu.style.position = 'fixed'
menu.style.left = `${Math.max(0, button.right - menu.offsetWidth)}px`
// the menu's own top padding bridges the gap to the button, so the hover is not lost
// on the way down; when flipped, it covers the button from below instead
const fitsBelow = button.top + menu.offsetHeight <= window.innerHeight
menu.style.top = `${fitsBelow ? button.top : Math.max(0, button.bottom - menu.offsetHeight)}px`
menu.style.right = 'auto'
}
disconnect () {
this.close()
}
}
+89
View File
@@ -0,0 +1,89 @@
import { Controller } from '@hotwired/stimulus'
/*
* A small menu behind a "⋯" button: the button (menu#toggle) opens the panel (target "panel") below
* itself. The panel is positioned fixed, so a scrolling container can't cut it off. Escape, a click
* outside or a click on one of its items closes it; arrow keys move between the items. Scrolling or
* resizing closes it too: a fixed panel would stay put while its row moves away (a table swiped
* sideways on a phone).
*/
export default class extends Controller {
static targets = ['button', 'panel']
connect () {
this.onOutside = (event) => {
if (!this.element.contains(event.target)) {
this.close()
}
}
this.onKey = (event) => this.key(event)
this.onScroll = (event) => {
if (!this.panelTarget.contains(event.target)) {
this.close()
}
}
this.onResize = () => this.close()
}
disconnect () {
this.close()
}
toggle (event) {
event.stopPropagation()
this.panelTarget.hidden ? this.open() : this.close()
}
open () {
const box = this.buttonTarget.getBoundingClientRect()
const panel = this.panelTarget
panel.hidden = false
// below the button, aligned to its right edge, and inside the window
const left = Math.max(8, Math.min(box.right - panel.offsetWidth, window.innerWidth - panel.offsetWidth - 8))
const below = box.bottom + 4 + panel.offsetHeight <= window.innerHeight
panel.style.left = `${left}px`
panel.style.top = `${below ? box.bottom + 4 : box.top - panel.offsetHeight - 4}px`
this.buttonTarget.setAttribute('aria-expanded', 'true')
document.addEventListener('click', this.onOutside, true)
document.addEventListener('keydown', this.onKey)
// capture: scroll events don't bubble, and the scrolling box may be any ancestor
document.addEventListener('scroll', this.onScroll, true)
window.addEventListener('resize', this.onResize)
this.items()[0]?.focus({ preventScroll: true })
}
close () {
if (this.panelTarget.hidden) {
return
}
this.panelTarget.hidden = true
this.buttonTarget.setAttribute('aria-expanded', 'false')
document.removeEventListener('click', this.onOutside, true)
document.removeEventListener('keydown', this.onKey)
document.removeEventListener('scroll', this.onScroll, true)
window.removeEventListener('resize', this.onResize)
}
// an item was chosen: it does its own work (htmx, link), the menu only closes
choose () {
this.close()
}
key (event) {
const items = this.items()
const index = items.indexOf(document.activeElement)
if (event.key === 'Escape') {
event.stopPropagation()
this.close()
this.buttonTarget.focus()
} else if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
event.preventDefault()
const next = (index + (event.key === 'ArrowDown' ? 1 : -1) + items.length) % items.length
items[next]?.focus()
}
}
items () {
return [...this.panelTarget.querySelectorAll('a, button:not([disabled])')]
}
}
+41 -4
View File
@@ -144,9 +144,9 @@
@apply inline-flex items-center gap-1 rounded border border-line bg-white px-2 py-1 text-sm text-ink hover:border-brand hover:text-brand disabled:cursor-default disabled:border-line disabled:text-gray-400; @apply inline-flex items-center gap-1 rounded border border-line bg-white px-2 py-1 text-sm text-ink hover:border-brand hover:text-brand disabled:cursor-default disabled:border-line disabled:text-gray-400;
} }
/* the "⋯" behind which the actions of a card or row wait (menu_controller.js) */ /* the "⋯" behind which the actions of a card or row wait (menu_controller.js); finger-sized on touch screens */
.btn-more { .btn-more {
@apply inline-flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted hover:bg-page hover:text-brand aria-expanded:bg-page aria-expanded:text-brand; @apply inline-flex h-6 w-6 pointer-coarse:h-10 pointer-coarse:w-10 shrink-0 items-center justify-center rounded text-muted hover:bg-page hover:text-brand aria-expanded:bg-page aria-expanded:text-brand;
} }
.menu-panel { .menu-panel {
@@ -154,11 +154,11 @@
} }
.menu-item { .menu-item {
@apply block w-full px-3 py-1.5 text-left text-ink no-underline hover:bg-page hover:text-brand focus:bg-page; @apply block w-full px-3 py-1.5 pointer-coarse:py-3 text-left text-ink no-underline hover:bg-page hover:text-brand focus:bg-page;
} }
.menu-item-danger { .menu-item-danger {
@apply block w-full px-3 py-1.5 text-left text-red-800 hover:bg-page hover:text-red-900 focus:bg-page; @apply block w-full px-3 py-1.5 pointer-coarse:py-3 text-left text-red-800 hover:bg-page hover:text-red-900 focus:bg-page;
} }
.input { .input {
@@ -273,6 +273,43 @@
@apply border-b last:border-b-0; @apply border-b last:border-b-0;
} }
/*
* Lists of entries in a card, as on a dashboard (components/dashboard/): one line per entry, the
* whole line is the link or button, its parts separated by a dot, the last part cut off with "…".
*/
.entry-list {
@apply divide-y divide-line;
}
.entry-list > li {
@apply py-2 first:pt-0 last:pb-0;
}
/* a work queue that would otherwise grow the card without limit; keep it rare, it scrolls awkwardly on phones */
.entry-list--scroll {
@apply max-h-64 overflow-y-auto pr-3;
}
.entry-link {
@apply flex w-full min-w-0 items-center gap-1.5 text-left text-ink no-underline;
}
:is(a, button).entry-link {
@apply hover:text-brand;
}
.entry-link > * {
@apply shrink-0 whitespace-nowrap;
}
.entry-link > :last-child {
@apply min-w-0 shrink truncate;
}
.entry-link > .entry-dot {
@apply text-muted;
}
/* notices (_partials/_alert.html.twig): light, with a coloured bar on the left */ /* notices (_partials/_alert.html.twig): light, with a coloured bar on the left */
.notice { .notice {
@apply border-l-4 px-4 py-2; @apply border-l-4 px-4 py-2;
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace App\Twig\Components;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent(template: 'components/dropdown.html.twig')]
class DropDown
{
}
@@ -105,23 +105,21 @@
{{ submission.teamerCreatedAt ? submission.teamerCreatedAt|date('d.m.Y, H:i') : '-' }} {{ submission.teamerCreatedAt ? submission.teamerCreatedAt|date('d.m.Y, H:i') : '-' }}
</td> </td>
<td> <td>
<twig:DropDown> <twig:menu>
<a href="{{ path('app_admin_application_form_submission_detail', { 'uuid': submission.uuid, 'r': return_url() }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
Details Details
</a> </a>
<button type="button" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_admin_application_form_submission_delete', { 'uuid': submission.uuid, 'r': return_url() }) }}" hx-get="{{ path('app_admin_application_form_submission_delete', { 'uuid': submission.uuid, 'r': return_url() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
löschen löschen
</button> </button>
</twig:DropDown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
+70 -262
View File
@@ -3,304 +3,112 @@
{% block content %} {% block content %}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="card p-4"> <twig:dashboard:widget title="Neue Bewerbungen"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ newApplicationsCount > 0 or pendingApplicationsCount > 0 ? newApplicationsCount ~ ' neu, ' ~ pendingApplicationsCount ~ ' in Bearbeitung' }}"
<span class="section-title">Neue Bewerbungen</span> emptyText="Keine neuen Bewerbungen.">
{% 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 %} {% for application in applications %}
{% set assignment = application.assignment %} {% set assignment = application.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="hand"
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-1"> url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
{{ icon('hand', 'w-4 h-4 shrink-0') }} :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]"/>
<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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Einteilungen" emptyText="Keine neuen Einteilungen.">
<h2 class="section-title pb-3">
Neue Einteilungen
</h2>
<ul class="divide-y divide-line">
{% for disposition in newDispositions %} {% for disposition in newDispositions %}
{% set assignment = disposition.assignment %} <twig:dashboard:entry icon="hand"
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> url="{{ path('app_administrative_assignment_detail', {uuid: disposition.assignment.uuid, r: return_url()}) }}">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" class="flex items-center space-x-1"> {% include '_partials/_disposition_data.html.twig' with {disposition: disposition} %}
{{ icon('hand', 'w-4 h-4 shrink-0') }} </twig:dashboard:entry>
{% include '_partials/_disposition_data.html.twig' with { 'disposition': disposition } %}
</a>
</li>
{% else %}
<li class="py-2 first:pt-0 last:pb-0">
-
</li>
{% endfor %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Honorarverträge"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ newContractsCount > 0 or pendingContractsCount > 0 ? newContractsCount ~ ' neu, ' ~ pendingContractsCount ~ ' in Bearbeitung' }}"
<span class="section-title">Neue Honorarverträge</span> emptyText="Keine neuen Honorarverträge."
{% if newContractsCount > 0 or pendingContractsCount > 0 %} :scroll="true">
<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 %} {% for document in newContracts %}
{% set assignment = document.disposition.assignment %} {% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0"> <twig:dashboard:entry icon="download"
<button type="button" hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
class="flex items-center space-x-1 truncate" :parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Honorarnoten"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ newInvoicesCount > 0 or pendingInvoicesCount > 0 ? newInvoicesCount ~ ' neu, ' ~ pendingInvoicesCount ~ ' in Bearbeitung' }}"
<span class="section-title">Neue Honorarnoten</span> emptyText="Keine neuen Honorarnoten."
{% if newInvoicesCount > 0 or pendingInvoicesCount > 0 %} :scroll="true">
<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 %} {% for document in newInvoices %}
{% set assignment = document.disposition.assignment %} {% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0"> <twig:dashboard:entry icon="download"
<button type="button" hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
class="flex items-center space-x-1 truncate" :parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Führerscheine"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ newDriverLicensesCount > 0 ? newDriverLicensesCount ~ ' neu' }}"
<span class="section-title">Neue Führerscheine</span> emptyText="Keine neuen Führerscheine."
{% if newDriverLicensesCount > 0 %} :scroll="true">
<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 %} {% for document in newDriverLicenses %}
<li class="py-2 first:pt-0 last:pb-0"> <twig:dashboard:entry icon="download"
<button type="button" hx-get="{{ path('app_administrative_teamer_driver_license_check', {uuid: document.uuid}) }}"
class="flex items-center space-x-1 truncate" :parts="[document.owner.teamer.fullName(true), document.createdAt|date('d.m.y')]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Einsätze" emptyText="Keine neuen Einsätze.">
<h2 class="section-title pb-3">
Neue Einsätze
</h2>
<ul class="divide-y divide-line">
{% for assignment in assignments %} {% for assignment in assignments %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="calendar"
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
class="flex items-center space-x-1"> :parts="[assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.jobProfile.name, assignment.owner.fullName(true)]"/>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Verfügbarkeiten" emptyText="Keine neuen Verfügbarkeiten.">
<h2 class="section-title pb-3">
Neue Verfügbarkeiten
</h2>
<ul class="divide-y divide-line">
{% for availability in availabilities %} {% for availability in availabilities %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="calendar"
<a href="{{ path('app_admin_teamer_availability', { 'uuid': availability.owner.uuid, 'r': return_url() }) }}" url="{{ path('app_admin_teamer_availability', {uuid: availability.owner.uuid, r: return_url()}) }}"
class="flex items-center space-x-1"> :parts="[availability.owner.fullName(true), availability.dateFrom|date('d.m.y') ~ ' - ' ~ availability.dateTo|date('d.m.y')]"/>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
<div class="card p-4"> <twig:dashboard:widget title="Neue Feedbacks"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ pendingFeedbacksCount > 0 ? pendingFeedbacksCount ~ ' freizugeben' }}"
<span class="section-title">Neue Feedbacks</span> emptyText="Keine Feedbacks freizugeben.">
{% if pendingFeedbacksCount > 0 %}
<span class="text-muted">{{ pendingFeedbacksCount }} freizugeben</span>
{% endif %}
</h2>
<ul class="divide-y divide-line">
{% for feedback in feedbacks %} {% for feedback in feedbacks %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="feedback"
<button type="button" hx-get="{{ path('app_admin_feedback_approve', {uuid: feedback.uuid}) }}"
hx-get="{{ path('app_admin_feedback_approve', { 'uuid': feedback.uuid }) }}" :parts="[feedback.teamer, feedback.destinationName, feedback.jobProfileName]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
{% set overdueFeedbacksCount = overdueFeedbacks|length %} {% set overdueFeedbacksCount = overdueFeedbacks|length %}
<div class="card p-4"> <twig:dashboard:widget title="Überfällige Feedbacks"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ overdueFeedbacksCount > 0 ? overdueFeedbacksCount ~ ' überfällig' }}"
<span class="section-title">Überfällige Feedbacks</span> emptyText="Keine überfälligen Feedbacks."
{% if overdueFeedbacksCount > 0 %} :scroll="true">
<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 %} {% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %} {% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="feedback"
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}" url="{{ path('app_administrative_feedback_provide', {uuid: disposition.uuid, r: return_url()}) }}"
class="flex items-center space-x-1"> :parts="[disposition.teamer, assignment.destination, assignment.jobProfile ? assignment.jobProfile.name]"/>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
{% set overdueContractsCount = overdueContracts|length %} {% set overdueContractsCount = overdueContracts|length %}
<div class="card p-4"> <twig:dashboard:widget title="Überfällige Honorarverträge"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ overdueContractsCount > 0 ? overdueContractsCount ~ ' überfällig' }}"
<span class="section-title">Überfällige Honorarverträge</span> emptyText="Keine überfälligen Honorarverträge."
{% if overdueContractsCount > 0 %} :scroll="true">
<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 %} {% for disposition in overdueContracts %}
{% set assignment = disposition.assignment %} {% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="calendar"
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" url="{{ path('app_administrative_assignment_detail', {uuid: assignment.uuid, r: return_url()}) }}"
class="flex items-center space-x-1"> :parts="[assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.jobProfile.name, disposition.teamer.fullName(true)]"/>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}
+7 -11
View File
@@ -89,19 +89,17 @@
{% endif %} {% endif %}
</td> </td>
<td> <td>
<twig:DropDown> <twig:menu>
<a href="{{ path('app_admin_work_month_pdf', { 'uuid': workMonth.uuid }) }}" <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" role="menuitem"
tabindex="-1"
target="_blank"> target="_blank">
Nachweis ansehen Nachweis ansehen
</a> </a>
{% if workMonth.status.value == 'submitted' %} {% if workMonth.status.value == 'submitted' %}
<a href="{{ path('app_admin_work_month_review', { 'uuid': workMonth.uuid, 'r': return_url() }) }}" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_admin_work_month_review', { 'uuid': workMonth.uuid, 'r': return_url() }) }}" hx-get="{{ path('app_admin_work_month_review', { 'uuid': workMonth.uuid, 'r': return_url() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -110,24 +108,22 @@
{% endif %} {% endif %}
<form method="post" action="{{ path('app_admin_work_month_sync', { 'uuid': workMonth.uuid, 'r': return_url() }) }}"> <form method="post" action="{{ path('app_admin_work_month_sync', { 'uuid': workMonth.uuid, 'r': return_url() }) }}">
<button type="submit" <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" role="menuitem">
tabindex="-1">
Erneut abrufen Erneut abrufen
</button> </button>
</form> </form>
{% if workMonth.status.value in ['submitted', 'approved'] %} {% if workMonth.status.value in ['submitted', 'approved'] %}
<form method="post" action="{{ path('app_admin_work_month_unlock', { 'uuid': workMonth.uuid, 'r': return_url() }) }}"> <form method="post" action="{{ path('app_admin_work_month_unlock', { 'uuid': workMonth.uuid, 'r': return_url() }) }}">
<button type="submit" <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" role="menuitem"
tabindex="-1"
onclick="return confirm('Der Monat wird wieder geöffnet und muss neu unterschrieben werden. Fortfahren?')"> onclick="return confirm('Der Monat wird wieder geöffnet und muss neu unterschrieben werden. Fortfahren?')">
Wieder öffnen Wieder öffnen
</button> </button>
</form> </form>
{% endif %} {% endif %}
</twig:DropDown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -223,11 +223,10 @@
hx-swap="none"> hx-swap="none">
{{ icon('chair', html_classes('w-5 h-5', { 'text-emerald-700': disposition.syncedWithBusProNet, 'text-gray-400': not disposition.syncedWithBusProNet })) }} {{ icon('chair', html_classes('w-5 h-5', { 'text-emerald-700': disposition.syncedWithBusProNet, 'text-gray-400': not disposition.syncedWithBusProNet })) }}
</button> </button>
<twig:DropDown> <twig:menu>
<button type="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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}" hx-get="{{ path('app_administrative_disposition_special_agreements', { 'uuid': disposition.uuid, 'r': forwarded_return_url() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -235,18 +234,16 @@
</button> </button>
{% if is_granted('ADMIN_DOCUMENT_UPLOAD', disposition) %} {% if is_granted('ADMIN_DOCUMENT_UPLOAD', disposition) %}
<button type="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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'contract', 'r': forwarded_return_url() }) }}" hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'contract', 'r': forwarded_return_url() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
Honorarvertrag hochladen Honorarvertrag hochladen
</button> </button>
<button type="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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'invoice', 'r': forwarded_return_url() }) }}" hx-get="{{ path('app_administrative_disposition_document_upload', { 'uuid': disposition.uuid, 'type': 'invoice', 'r': forwarded_return_url() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -255,9 +252,8 @@
{% endif %} {% endif %}
{% if is_granted('CALL_OFF', disposition) %} {% if is_granted('CALL_OFF', disposition) %}
<button type="button" <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" role="menuitem"
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() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -266,16 +262,15 @@
{% endif %} {% endif %}
{% if is_granted('DELETE', disposition) %} {% if is_granted('DELETE', disposition) %}
<button type="button" <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" role="menuitem"
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() }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
löschen löschen
</button> </button>
{% endif %} {% endif %}
</twig:DropDown> </twig:menu>
</div> </div>
</td> </td>
</tr> </tr>
@@ -188,11 +188,10 @@
</ul> </ul>
</td> </td>
<td> <td>
<twig:DropDown> <twig:menu>
<button type="button" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}" hx-get="{{ path('app_administrative_assignment_delete', { 'uuid': assignment.uuid }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -200,9 +199,8 @@
</button> </button>
{% if is_granted('CALL_OFF', assignment) %} {% if is_granted('CALL_OFF', assignment) %}
<button type="button" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_assignment_call_off', { 'uuid': assignment.uuid }) }}" hx-get="{{ path('app_administrative_assignment_call_off', { 'uuid': assignment.uuid }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
@@ -210,43 +208,38 @@
</button> </button>
{% endif %} {% endif %}
<a href="{{ path('app_administrative_assignment_duplicate', { 'uuid': assignment.uuid, 'r': return_url() }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
duplizieren duplizieren
</a> </a>
{% if is_granted('EDIT', assignment) %} {% if is_granted('EDIT', assignment) %}
<a href="{{ path('app_administrative_assignment_edit', { 'uuid': assignment.uuid, 'r': return_url() }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
bearbeiten bearbeiten
</a> </a>
{% endif %} {% endif %}
{% if is_granted('PUBLISH', assignment) %} {% if is_granted('PUBLISH', assignment) %}
<button type="button" <button type="button"
class="block px-4 py-2 text-sm w-full text-left" class="menu-item"
role="menuitem" role="menuitem"
tabindex="-1"
hx-post="{{ path('app_administrative_assignment_publish', { 'uuid': assignment.uuid, 'r': return_url() }) }}"> hx-post="{{ path('app_administrative_assignment_publish', { 'uuid': assignment.uuid, 'r': return_url() }) }}">
veröffentlichen veröffentlichen
</button> </button>
{% endif %} {% endif %}
<a href="{{ path('app_administrative_questionnaire_test', { 'uuid': assignment.uuid, 'r': return_url() }) }}" <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" role="menuitem"
tabindex="-1"
title="Das Reiseleitungsfeedback ansehen und ausprobieren, wie es Teamer:innen dieses Einsatzes bekommen. Es wird nichts gespeichert."> title="Das Reiseleitungsfeedback ansehen und ausprobieren, wie es Teamer:innen dieses Einsatzes bekommen. Es wird nichts gespeichert.">
Vorschau Reiseleitungsfeedback Vorschau Reiseleitungsfeedback
</a> </a>
<a href="{{ path('app_administrative_questionnaire_test_house_manager', { 'uuid': assignment.uuid, 'r': return_url() }) }}" <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" role="menuitem"
tabindex="-1"
title="Das Hausleitungsfeedback zur Reise dieses Einsatzes ansehen und ausprobieren. Es wird nichts gespeichert."> title="Das Hausleitungsfeedback zur Reise dieses Einsatzes ansehen und ausprobieren. Es wird nichts gespeichert.">
Vorschau Hausleitungsfeedback Vorschau Hausleitungsfeedback
</a> </a>
</twig:DropDown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% else %}
@@ -87,29 +87,26 @@
{{ seasonAssignment.jobProfile.name }} {{ seasonAssignment.jobProfile.name }}
</td> </td>
<td> <td>
<twig:DropDown> <twig:menu>
<a href="{{ path('app_administrative_season_assignment_detail', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
Details Details
</a> </a>
<a href="{{ path('app_administrative_season_assignment_edit', { 'uuid': seasonAssignment.uuid, 'r': return_url() }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
bearbeiten bearbeiten
</a> </a>
<button type="button" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_season_assignment_delete', { 'uuid': seasonAssignment.uuid }) }}" hx-get="{{ path('app_administrative_season_assignment_delete', { 'uuid': seasonAssignment.uuid }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
löschen löschen
</button> </button>
</twig:DropDown> </twig:menu>
{% if seasonAssignment.deleted %} {% if seasonAssignment.deleted %}
<div class="py-1 px-2 mt-2 text-xs bg-gray-500 text-white"> <div class="py-1 px-2 mt-2 text-xs bg-gray-500 text-white">
gel. am {{ seasonAssignment.deletedAt | date('d.m.Y') }} gel. am {{ seasonAssignment.deletedAt | date('d.m.Y') }}
@@ -65,29 +65,26 @@
{{ destination.dateTo | date('d.m.Y') }} {{ destination.dateTo | date('d.m.Y') }}
</td> </td>
<td> <td>
<twig:DropDown> <twig:menu>
<button type="button" <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" role="menuitem"
tabindex="-1"
hx-get="{{ path('app_administrative_system_destination_delete', { 'id': destination.id }) }}" hx-get="{{ path('app_administrative_system_destination_delete', { 'id': destination.id }) }}"
hx-target="body" hx-target="body"
hx-swap="beforeend"> hx-swap="beforeend">
löschen löschen
</button> </button>
<a href="{{ path('app_administrative_system_destination_duplicate', { 'id': destination.id }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
duplizieren duplizieren
</a> </a>
<a href="{{ path('app_administrative_system_destination_edit', { 'id': destination.id }) }}" <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" class="menu-item"
role="menuitem" role="menuitem">
tabindex="-1">
bearbeiten bearbeiten
</a> </a>
</twig:DropDown> </twig:menu>
</td> </td>
</tr> </tr>
{% else %} {% 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>
+33 -109
View File
@@ -2,126 +2,50 @@
{% block content %} {% block content %}
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="card p-4"> <twig:dashboard:widget title="Neue Honorarverträge"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ newContractsCount > 0 or pendingContractsCount > 0 ? newContractsCount ~ ' neu, ' ~ pendingContractsCount ~ ' in Bearbeitung' }}"
<span class="section-title">Neue Honorarverträge</span> emptyText="Keine neuen Honorarverträge."
{% if newContractsCount > 0 or pendingContractsCount > 0 %} :scroll="true">
<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 %} {% for document in newContracts %}
{% set assignment = document.disposition.assignment %} {% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0"> <twig:dashboard:entry icon="download"
<button type="button" hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
class="flex items-center space-x-1 truncate" :parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div> <twig:dashboard:widget title="Neue Honorarnoten"
<div class="card p-4"> meta="{{ newInvoicesCount > 0 or pendingInvoicesCount > 0 ? newInvoicesCount ~ ' neu, ' ~ pendingInvoicesCount ~ ' in Bearbeitung' }}"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> emptyText="Keine neuen Honorarnoten."
<span class="section-title">Neue Honorarnoten</span> :scroll="true">
{% 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 %} {% for document in newInvoices %}
{% set assignment = document.disposition.assignment %} {% set assignment = document.disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0"> <twig:dashboard:entry icon="download"
<button type="button" hx-get="{{ path('app_administrative_document_check', {uuid: document.uuid, r: return_url()}) }}"
class="flex items-center space-x-1 truncate" :parts="[document.owner.teamer.fullName(true), assignment.destination.dateFrom|date('d.m.y') ~ ' - ' ~ assignment.destination.dateTo|date('d.m.y'), assignment.destination.hotel]"/>
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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div> <twig:dashboard:widget title="Neue Einteilungen" emptyText="Keine neuen Einteilungen.">
<div class="card p-4">
<h2 class="section-title pb-3">
Neue Einteilungen
</h2>
<ul class="divide-y divide-line">
{% for disposition in dispositions %} {% for disposition in dispositions %}
{% set assignment = disposition.assignment %} <twig:dashboard:entry icon="hand"
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> url="{{ path('app_administrative_assignment_detail', {uuid: disposition.assignment.uuid, r: return_url()}) }}">
<a href="{{ path('app_administrative_assignment_detail', { 'uuid': assignment.uuid, 'r': return_url() }) }}" {% include '_partials/_disposition_data.html.twig' with {disposition: disposition} %}
class="flex items-center space-x-1"> </twig:dashboard:entry>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
{% set overdueFeedbacksCount = overdueFeedbacks|length %} {% set overdueFeedbacksCount = overdueFeedbacks|length %}
<div class="card p-4"> <twig:dashboard:widget title="Überfällige Feedbacks"
<h2 class="flex justify-between items-baseline gap-x-4 pb-3"> meta="{{ overdueFeedbacksCount > 0 ? overdueFeedbacksCount ~ ' überfällig' }}"
<span class="section-title">Überfällige Feedbacks</span> emptyText="Keine überfälligen Feedbacks."
{% if overdueFeedbacksCount > 0 %} :scroll="true">
<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 %} {% for disposition in overdueFeedbacks %}
{% set assignment = disposition.assignment %} {% set assignment = disposition.assignment %}
<li class="py-2 first:pt-0 last:pb-0 overflow-x-hidden"> <twig:dashboard:entry icon="feedback"
<a href="{{ path('app_administrative_feedback_provide', { 'uuid': disposition.uuid, 'r': return_url() }) }}" url="{{ path('app_administrative_feedback_provide', {uuid: disposition.uuid, r: return_url()}) }}"
class="flex items-center space-x-1"> :parts="[disposition.teamer, assignment.destination, assignment.jobProfile ? assignment.jobProfile.name]"/>
{{ 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 %} {% endfor %}
</ul> </twig:dashboard:widget>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}