Kalender: Verschieben erst nach Bestätigung mit Anzeige des neuen Zeitraums
This commit is contained in:
parent
c04a09ddf6
commit
75e274cc71
6 changed files with 93 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ $minWidth = match ($view) {
|
|||
<a class="cal-label__add" href="<?= e(url('/bookings/new?trailer=' . (int) $trailer['id'] . '&start=' . $date)) ?>" aria-label="Neue Buchung für <?= e($trailer['label']) ?>">+</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="cal-track" style="--row-h: <?= (int) $row['height'] ?>px; --lanes: <?= (int) $row['lanes'] ?>" data-trailer-id="<?= (int) $trailer['id'] ?>">
|
||||
<div class="cal-track" style="--row-h: <?= (int) $row['height'] ?>px; --lanes: <?= (int) $row['lanes'] ?>" data-trailer-id="<?= (int) $trailer['id'] ?>" data-trailer-label="<?= e($trailer['label']) ?>">
|
||||
<div class="cal-cells">
|
||||
<?php foreach ($days as $day): ?>
|
||||
<?php if ($canCreate): ?>
|
||||
|
|
@ -154,6 +154,7 @@ $minWidth = match ($view) {
|
|||
data-booking-id="<?= (int) $booking['id'] ?>"
|
||||
data-trailer-id="<?= (int) $booking['trailer_id'] ?>"
|
||||
data-start-date="<?= e($booking['start_date']) ?>"
|
||||
data-customer-name="<?= e($booking['customer_name']) ?>"
|
||||
data-days="<?= days_between($booking['start_date'], $booking['end_date']) + 1 ?>"
|
||||
style="--left: <?= number_format($geo['left'], 5, '.', '') ?>%; --width: <?= number_format($geo['width'], 5, '.', '') ?>%; --top: <?= number_format($geo['top'], 5, '.', '') ?>%; --height: <?= number_format($geo['height'], 5, '.', '') ?>%; --bar: <?= e($booking['trailer_color']) ?>; --bar-text: <?= e(contrast_color($booking['trailer_color'])) ?>;"
|
||||
aria-label="<?= e($aria) ?>"
|
||||
|
|
|
|||
|
|
@ -162,6 +162,23 @@ $navActive = static function (string $area) use ($path): string {
|
|||
<div class="booking-dialog__inner" id="booking-dialog-content"></div>
|
||||
</dialog>
|
||||
|
||||
<dialog class="confirm-dialog" id="move-dialog" aria-labelledby="move-dialog-title">
|
||||
<form method="dialog" class="confirm-dialog__inner">
|
||||
<h2 id="move-dialog-title">Buchung verschieben?</h2>
|
||||
<p class="confirm-dialog__lead" data-move-customer></p>
|
||||
<dl class="confirm-dialog__facts">
|
||||
<div><dt>Bisher</dt><dd data-move-from></dd></div>
|
||||
<div><dt>Neu</dt><dd data-move-to></dd></div>
|
||||
<div><dt>Kühlanhänger</dt><dd data-move-trailer></dd></div>
|
||||
</dl>
|
||||
<p class="muted small">Erinnerungen werden an den neuen Zeitraum angepasst.</p>
|
||||
<div class="confirm-dialog__actions">
|
||||
<button class="btn" type="submit" value="cancel">Abbrechen</button>
|
||||
<button class="btn primary" type="submit" value="ok">OK, verschieben</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="toast" id="toast" role="status" aria-live="polite" hidden></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue