Kalender: Übergabe- und Rücknahme-Mitarbeiter in eigenen Zeilen (zweiter Name wird nicht mehr abgeschnitten)
This commit is contained in:
parent
08e9b9dd91
commit
a8dabcf326
4 changed files with 11 additions and 10 deletions
|
|
@ -522,7 +522,7 @@ function page_calendar(array $user): void
|
|||
'trailer' => $trailer,
|
||||
'lanes' => $lanes,
|
||||
'bars' => $bars,
|
||||
'height' => max($rowMin, $barBase * $lanes + 16 + ($extraMeta ? 14 : 0)),
|
||||
'height' => max($rowMin, $barBase * $lanes + 16 + ($extraMeta ? 24 : 0)),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function url(string $path = '/'): string
|
|||
}
|
||||
|
||||
/** Cache-Buster: bei Änderungen an app.css/app.js erhöhen. */
|
||||
const DIC_ASSET_VERSION = '26';
|
||||
const DIC_ASSET_VERSION = '27';
|
||||
|
||||
function asset(string $path): string
|
||||
{
|
||||
|
|
|
|||
|
|
@ -184,7 +184,6 @@ $minWidth = match ($view) {
|
|||
// Buchungen zeigen – die Zeile/Spalte wird dafür höher.
|
||||
$separateReturn = booking_has_separate_return($booking);
|
||||
$showMeta = $view === 'day' || $geo['span'] >= 2 || $separateReturn;
|
||||
$compactReturn = $separateReturn && $view !== 'day' && $geo['span'] < 2;
|
||||
$label = in_array($view, ['month', 'weeks'], true) ? truncate((string) $booking['customer_name'], 18) : (string) $booking['customer_name'];
|
||||
$barClass = 'cal-bar'
|
||||
. ($cancelled ? ' is-cancelled' : '')
|
||||
|
|
@ -211,11 +210,13 @@ $minWidth = match ($view) {
|
|||
aria-label="<?= e($aria) ?>"
|
||||
title="<?= e($booking['customer_name'] . ' · ' . fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' – ' . fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null) . ' · ' . booking_employee_summary($booking) . ($cancelled ? ' · storniert' : '')) ?>">
|
||||
<span class="cal-bar__name"><?= e($label) ?></span>
|
||||
<?php if ($showMeta): ?>
|
||||
<span class="cal-bar__meta"><?= e($view === 'day' ? fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' – ' . fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null) : booking_employee_summary($booking)) ?><?= $view === 'day' ? ' · ' . e(booking_employee_summary($booking)) : '' ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($compactReturn): // Kurze Buchung: Rücknahme-Mitarbeiter kompakt in eigener Zeile. ?>
|
||||
<span class="cal-bar__meta cal-bar__meta--return"><?= e(truncate('Rücknahme: ' . booking_return_employee_name($booking), 16)) ?></span>
|
||||
<?php if ($view === 'day'): ?>
|
||||
<span class="cal-bar__meta"><?= e(fmt_date_with_time($booking['start_date'], $booking['start_time'] ?? null) . ' – ' . fmt_date_with_time($booking['end_date'], $booking['end_time'] ?? null)) ?> · <?= e(booking_employee_summary($booking)) ?></span>
|
||||
<?php elseif ($separateReturn): // Übergabe und Rücknahme in eigenen Zeilen – der zweite Name bleibt so lesbar. ?>
|
||||
<span class="cal-bar__meta"><?= e((string) $booking['employee_name']) ?></span>
|
||||
<span class="cal-bar__meta cal-bar__meta--return" title="<?= e('Rücknahme: ' . booking_return_employee_name($booking)) ?>">↩ <?= e(booking_return_employee_name($booking)) ?></span>
|
||||
<?php elseif ($showMeta): ?>
|
||||
<span class="cal-bar__meta"><?= e(booking_employee_summary($booking)) ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($view === 'day'): ?>
|
||||
<span class="cal-bar__meta cal-bar__meta--soft"><?= e(booking_kind_label((string) $booking['kind'])) ?> · <?= e(fmt_money((int) $booking['total_cents'])) ?></span>
|
||||
|
|
|
|||
|
|
@ -609,8 +609,8 @@ a .ico, button .ico { pointer-events: none; }
|
|||
}
|
||||
.cal-bar.is-cancelled .cal-bar__name { text-decoration: line-through; }
|
||||
.cal-bar.is-dragging { z-index: 50; opacity: .88; filter: brightness(1.06); cursor: grabbing; box-shadow: 0 10px 20px rgba(10, 44, 78, .3); transition: none; }
|
||||
.cal-bar__name { font-size: .76rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
|
||||
.cal-bar__meta { font-size: .63rem; font-weight: 500; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
|
||||
.cal-bar__name { font-size: .76rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
|
||||
.cal-bar__meta { font-size: .63rem; font-weight: 500; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
|
||||
.cal-bar__meta--soft { opacity: .72; }
|
||||
.cal-bar__meta--return { font-weight: 700; opacity: .95; }
|
||||
.cal-bar__flag { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue