Anpassung Design

This commit is contained in:
2026-05-05 12:30:45 +02:00
parent bec1c8725f
commit 4a4517c514
35 changed files with 2990 additions and 1339 deletions
+67 -46
View File
@@ -2,9 +2,12 @@
<div class="section-header">
<div>
<p class="eyebrow">Dashboard</p>
<h1>Anfragen, Buchungen und Rechnungen</h1>
<h1>Verwaltung für Anfragen, Buchungen und Rechnungen</h1>
</div>
<div class="section-actions">
<a class="button-secondary" href="<?= h(url('admin/anfragen')) ?>">Offene Anfragen</a>
<a class="button-primary" href="<?= h(url('admin/create')) ?>">Buchung für Kunden anlegen</a>
</div>
<a class="button-primary" href="<?= h(url('admin/create')) ?>">Bestellung fuer Kunden anlegen</a>
</div>
<?php if (!empty($flashSuccess)): ?>
@@ -16,7 +19,7 @@
<div class="stats-grid">
<article class="stat-card">
<span>Alle Auftraege</span>
<span>Alle Aufträge</span>
<strong><?= h((string) $stats['bookings_total']) ?></strong>
</article>
<article class="stat-card">
@@ -24,7 +27,7 @@
<strong><?= h((string) $stats['open_requests']) ?></strong>
</article>
<article class="stat-card">
<span>Bestaetigte Buchungen</span>
<span>Bestätigte Buchungen</span>
<strong><?= h((string) $stats['confirmed_bookings']) ?></strong>
</article>
<article class="stat-card">
@@ -44,8 +47,8 @@
<div class="admin-grid">
<section class="table-card">
<div class="table-card-header">
<h2>Auftraege</h2>
<span><?= h((string) count($bookings)) ?> Eintraege</span>
<h2>Offene oder reservierte Anfragen</h2>
<a href="<?= h(url('admin/anfragen')) ?>">Alle ansehen</a>
</div>
<div class="table-wrap">
<table>
@@ -53,26 +56,22 @@
<tr>
<th>Referenz</th>
<th>Kunde</th>
<th>Termin</th>
<th>Zeitraum</th>
<th>Status</th>
<th>Zahlung</th>
<th>Preis</th>
</tr>
</thead>
<tbody>
<?php foreach ($bookings as $booking): ?>
<?php foreach ($requests as $booking): ?>
<tr>
<td><a href="<?= h(url('admin/order?id=' . urlencode($booking['id']))) ?>"><?= h($booking['reference']) ?></a></td>
<td><?= h($booking['customer']['name']) ?></td>
<td><?= h(formatDate($booking['start_date'])) ?> - <?= h(formatDate($booking['end_date'])) ?></td>
<td><?= h($booking['status_label']) ?></td>
<td><?= h($booking['payment_status_label']) ?></td>
<td><?= h(formatCurrency((int) $booking['subtotal_cents'])) ?></td>
<td><?= h(formatDate($booking['start_date'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></td>
<td><span class="<?= h(statusPillClass((string) $booking['status'])) ?>"><?= h($booking['status_label']) ?></span></td>
</tr>
<?php endforeach; ?>
<?php if ($bookings === []): ?>
<?php if ($requests === []): ?>
<tr>
<td colspan="6">Noch keine Auftraege vorhanden.</td>
<td colspan="4">Aktuell gibt es keine offenen Anfragen.</td>
</tr>
<?php endif; ?>
</tbody>
@@ -82,38 +81,60 @@
<section class="table-card">
<div class="table-card-header">
<h2>Rechnungen</h2>
<span><?= h((string) count($invoices)) ?> Eintraege</span>
<h2>Nächste Einsätze</h2>
<a href="<?= h(url('admin/kalender')) ?>">Zum Kalender</a>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Nummer</th>
<th>Auftrag</th>
<th>Faellig</th>
<th>Zahlungsart</th>
<th>Gesamt</th>
</tr>
</thead>
<tbody>
<?php foreach ($invoices as $invoice): ?>
<tr>
<td><a href="<?= h(url('admin/invoice/pdf?id=' . urlencode($invoice['id']))) ?>" target="_blank"><?= h($invoice['invoice_number']) ?></a></td>
<td><?= h($invoice['booking_id']) ?></td>
<td><?= h(formatDate($invoice['due_date'])) ?></td>
<td><?= h($invoice['payment_method_label']) ?></td>
<td><?= h(formatCurrency((int) $invoice['total_cents'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if ($invoices === []): ?>
<tr>
<td colspan="5">Noch keine Rechnungen erstellt.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<div class="stack-list">
<?php foreach ($upcomingBookings 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; ?>
<?php if ($upcomingBookings === []): ?>
<p class="empty-state">Noch keine Termine geplant.</p>
<?php endif; ?>
</div>
</section>
</div>
<section class="table-card">
<div class="table-card-header">
<h2>Zuletzt erstellte Rechnungen</h2>
<a href="<?= h(url('admin/rechnungen')) ?>">Alle Rechnungen</a>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Nummer</th>
<th>Auftrag</th>
<th>Fällig</th>
<th>Zahlungsart</th>
<th>Gesamt</th>
</tr>
</thead>
<tbody>
<?php foreach ($invoices as $invoice): ?>
<tr>
<td><a href="<?= h(url('admin/invoice/pdf?id=' . urlencode($invoice['id']))) ?>" target="_blank"><?= h($invoice['invoice_number']) ?></a></td>
<td><?= h($invoice['booking_id']) ?></td>
<td><?= h(formatDate($invoice['due_date'])) ?></td>
<td><?= h($invoice['payment_method_label']) ?></td>
<td><?= h(formatCurrency((int) $invoice['total_cents'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if ($invoices === []): ?>
<tr>
<td colspan="5">Noch keine Rechnungen vorhanden.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</section>