45 lines
1.9 KiB
PHP
45 lines
1.9 KiB
PHP
<section class="admin-section">
|
|
<div class="section-header">
|
|
<div>
|
|
<p class="eyebrow">Kalender</p>
|
|
<h1>Zeiträume und Belegung nach Monaten</h1>
|
|
</div>
|
|
<a class="button-secondary" href="<?= h(url('admin/buchungen')) ?>">Zur Auftragsliste</a>
|
|
</div>
|
|
|
|
<?php if (!empty($flashSuccess)): ?>
|
|
<div class="flash flash-success"><?= h((string) $flashSuccess) ?></div>
|
|
<?php endif; ?>
|
|
<?php if (!empty($flashError)): ?>
|
|
<div class="flash flash-error"><?= h((string) $flashError) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="calendar-grid">
|
|
<?php foreach ($calendarGroups as $label => $entries): ?>
|
|
<article class="table-card">
|
|
<div class="table-card-header">
|
|
<h2><?= h((string) $label) ?></h2>
|
|
<span><?= h((string) count($entries)) ?> Termine</span>
|
|
</div>
|
|
<div class="stack-list">
|
|
<?php foreach ($entries as $booking): ?>
|
|
<article class="stack-item">
|
|
<div>
|
|
<strong><?= h($booking['reference']) ?></strong>
|
|
<span><?= h($booking['customer']['name']) ?> · <?= h(formatDate($booking['start_date'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></span>
|
|
</div>
|
|
<span class="<?= h(statusPillClass((string) $booking['status'])) ?>"><?= h($booking['status_label']) ?></span>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
<?php if ($calendarGroups === []): ?>
|
|
<article class="table-card">
|
|
<p>Aktuell sind keine Termine im Kalender hinterlegt.</p>
|
|
</article>
|
|
<?php endif; ?>
|
|
</div>
|
|
</section>
|
|
|