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
+55
View File
@@ -0,0 +1,55 @@
<section class="admin-section">
<div class="section-header">
<div>
<p class="eyebrow">Buchungen</p>
<h1>Alle Aufträge im Überblick</h1>
</div>
<a class="button-primary" href="<?= h(url('admin/create')) ?>">Neuen Auftrag anlegen</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; ?>
<section class="table-card">
<div class="table-card-header">
<h2>Auftragsliste</h2>
<span><?= h((string) count($bookings)) ?> Einträge</span>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Referenz</th>
<th>Kunde</th>
<th>Zeitraum</th>
<th>Status</th>
<th>Zahlung</th>
<th>Preis</th>
</tr>
</thead>
<tbody>
<?php foreach ($bookings 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'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></td>
<td><span class="<?= h(statusPillClass((string) $booking['status'])) ?>"><?= h($booking['status_label']) ?></span></td>
<td><?= h($booking['payment_status_label']) ?></td>
<td><?= h(formatCurrency((int) $booking['subtotal_cents'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if ($bookings === []): ?>
<tr>
<td colspan="6">Noch keine Buchungen vorhanden.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</section>
+44
View File
@@ -0,0 +1,44 @@
<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>
+109 -98
View File
@@ -2,9 +2,9 @@
<div class="section-header">
<div>
<p class="eyebrow">Manuelle Buchung</p>
<h1>Bestellung fuer Kunden anlegen</h1>
<h1>Buchung oder Auftrag für Kunden anlegen</h1>
</div>
<a class="button-secondary" href="<?= h(url('admin')) ?>">Zurueck zum Dashboard</a>
<a class="button-secondary" href="<?= h(url('admin/buchungen')) ?>">Zurück zu den Buchungen</a>
</div>
<?php if (!empty($flashSuccess)): ?>
@@ -15,106 +15,117 @@
<?php endif; ?>
<form method="post" action="<?= h(url('admin/create')) ?>" class="booking-form admin-form" data-day-rate="<?= h((string) $defaults['price_per_day_cents']) ?>">
<div class="form-grid">
<label>
<span>Name</span>
<input type="text" name="customer_name" value="<?= h((string) ($old['customer_name'] ?? '')) ?>" required>
</label>
<label>
<span>Firma</span>
<input type="text" name="company" value="<?= h((string) ($old['company'] ?? '')) ?>">
</label>
<label>
<span>E-Mail</span>
<input type="email" name="email" value="<?= h((string) ($old['email'] ?? '')) ?>" required>
</label>
<label>
<span>Telefon</span>
<input type="text" name="phone" value="<?= h((string) ($old['phone'] ?? '')) ?>" required>
</label>
<label>
<span>Strasse</span>
<input type="text" name="street" value="<?= h((string) ($old['street'] ?? '')) ?>" required>
</label>
<label>
<span>PLZ</span>
<input type="text" name="postal_code" value="<?= h((string) ($old['postal_code'] ?? '')) ?>" required>
</label>
<label>
<span>Ort</span>
<input type="text" name="city" value="<?= h((string) ($old['city'] ?? '')) ?>" required>
</label>
<label>
<span>Anlass</span>
<input type="text" name="event_type" value="<?= h((string) ($old['event_type'] ?? '')) ?>">
</label>
<label>
<span>Veranstaltungsort</span>
<input type="text" name="event_location" value="<?= h((string) ($old['event_location'] ?? '')) ?>">
</label>
<label>
<span>Mietbeginn</span>
<input type="date" name="start_date" data-booking-start value="<?= h((string) ($old['start_date'] ?? '')) ?>" required>
</label>
<label>
<span>Mietende</span>
<input type="date" name="end_date" data-booking-end value="<?= h((string) ($old['end_date'] ?? '')) ?>" required>
</label>
<label>
<span>Tagespreis in Cent</span>
<input type="number" name="price_per_day_cents" min="0" value="<?= h((string) ($old['price_per_day_cents'] ?? $defaults['price_per_day_cents'])) ?>" required>
</label>
<label>
<span>Status</span>
<select name="status">
<option value="confirmed" <?= selected((string) ($old['status'] ?? $defaults['status']), 'confirmed') ?>>Bestaetigt</option>
<option value="reserved" <?= selected((string) ($old['status'] ?? ''), 'reserved') ?>>Reserviert</option>
<option value="requested" <?= selected((string) ($old['status'] ?? ''), 'requested') ?>>Neue Anfrage</option>
<option value="cancelled" <?= selected((string) ($old['status'] ?? ''), 'cancelled') ?>>Storniert</option>
</select>
</label>
<label>
<span>Zahlungsstatus</span>
<select name="payment_status">
<option value="unpaid" <?= selected((string) ($old['payment_status'] ?? $defaults['payment_status']), 'unpaid') ?>>Offen</option>
<option value="paid" <?= selected((string) ($old['payment_status'] ?? ''), 'paid') ?>>Bezahlt</option>
<option value="refunded" <?= selected((string) ($old['payment_status'] ?? ''), 'refunded') ?>>Erstattet</option>
</select>
</label>
<label>
<span>Lieferart</span>
<select name="delivery_mode">
<option value="self_pickup" <?= selected((string) ($old['delivery_mode'] ?? $defaults['delivery_mode']), 'self_pickup') ?>>Selbstabholung</option>
<option value="delivery_setup" <?= selected((string) ($old['delivery_mode'] ?? ''), 'delivery_setup') ?>>Lieferung und Aufbau</option>
<option value="on_site_support" <?= selected((string) ($old['delivery_mode'] ?? ''), 'on_site_support') ?>>Lieferung, Aufbau und Vor-Ort-Betreuung</option>
</select>
</label>
<label>
<span>Zahlungsart</span>
<select name="payment_method">
<option value="invoice_transfer" <?= selected((string) ($old['payment_method'] ?? $defaults['payment_method']), 'invoice_transfer') ?>>Rechnung / Ueberweisung</option>
<option value="paypal" <?= selected((string) ($old['payment_method'] ?? ''), 'paypal') ?>>PayPal</option>
</select>
</label>
</div>
<label>
<span>Hinweis fuer Kunden</span>
<textarea name="notes_customer" rows="4"><?= h((string) ($old['notes_customer'] ?? '')) ?></textarea>
</label>
<label>
<span>Interne Notiz</span>
<textarea name="internal_notes" rows="4"><?= h((string) ($old['internal_notes'] ?? '')) ?></textarea>
</label>
<div class="price-summary">
<div>
<span>Mietdauer</span>
<strong data-summary-days>Noch nicht gewaehlt</strong>
<?= csrfField() ?>
<div class="form-section">
<div class="form-section-header">
<span class="form-step">Verwaltung</span>
<h3>Kundendaten und Zeitraum</h3>
</div>
<div>
<p class="form-help">Auch intern gilt: Montag bis Dienstag zählt als 1 Miettag.</p>
<div class="form-grid">
<label>
<span>Name</span>
<input type="text" name="customer_name" value="<?= h((string) ($old['customer_name'] ?? '')) ?>" required>
</label>
<label>
<span>Firma</span>
<input type="text" name="company" value="<?= h((string) ($old['company'] ?? '')) ?>">
</label>
<label>
<span>E-Mail</span>
<input type="email" name="email" value="<?= h((string) ($old['email'] ?? '')) ?>" required>
</label>
<label>
<span>Telefon</span>
<input type="text" name="phone" value="<?= h((string) ($old['phone'] ?? '')) ?>" required>
</label>
<label>
<span>Straße</span>
<input type="text" name="street" value="<?= h((string) ($old['street'] ?? '')) ?>" required>
</label>
<label>
<span>PLZ</span>
<input type="text" name="postal_code" value="<?= h((string) ($old['postal_code'] ?? '')) ?>" required>
</label>
<label>
<span>Ort</span>
<input type="text" name="city" value="<?= h((string) ($old['city'] ?? '')) ?>" required>
</label>
<label>
<span>Anlass</span>
<input type="text" name="event_type" value="<?= h((string) ($old['event_type'] ?? '')) ?>">
</label>
<label class="form-grid-span">
<span>Veranstaltungsort</span>
<input type="text" name="event_location" value="<?= h((string) ($old['event_location'] ?? '')) ?>">
</label>
<label>
<span>Abholdatum</span>
<input type="date" name="start_date" data-booking-start value="<?= h((string) ($old['start_date'] ?? '')) ?>" required>
</label>
<label>
<span>Rückgabedatum</span>
<input type="date" name="end_date" data-booking-end value="<?= h((string) ($old['end_date'] ?? '')) ?>" required>
</label>
<label>
<span>Preis pro Miettag in Cent</span>
<input type="number" name="price_per_day_cents" min="0" value="<?= h((string) ($old['price_per_day_cents'] ?? $defaults['price_per_day_cents'])) ?>" required>
</label>
<label>
<span>Status</span>
<select name="status">
<option value="confirmed" <?= selected((string) ($old['status'] ?? $defaults['status']), 'confirmed') ?>>Bestätigt</option>
<option value="reserved" <?= selected((string) ($old['status'] ?? ''), 'reserved') ?>>Reserviert</option>
<option value="requested" <?= selected((string) ($old['status'] ?? ''), 'requested') ?>>Neue Anfrage</option>
<option value="cancelled" <?= selected((string) ($old['status'] ?? ''), 'cancelled') ?>>Storniert</option>
</select>
</label>
<label>
<span>Zahlungsstatus</span>
<select name="payment_status">
<option value="unpaid" <?= selected((string) ($old['payment_status'] ?? $defaults['payment_status']), 'unpaid') ?>>Offen</option>
<option value="paid" <?= selected((string) ($old['payment_status'] ?? ''), 'paid') ?>>Bezahlt</option>
<option value="refunded" <?= selected((string) ($old['payment_status'] ?? ''), 'refunded') ?>>Erstattet</option>
</select>
</label>
<label>
<span>Lieferart</span>
<select name="delivery_mode">
<option value="self_pickup" <?= selected((string) ($old['delivery_mode'] ?? $defaults['delivery_mode']), 'self_pickup') ?>>Selbstabholung</option>
<option value="delivery_setup" <?= selected((string) ($old['delivery_mode'] ?? ''), 'delivery_setup') ?>>Lieferung und Aufbau</option>
<option value="on_site_support" <?= selected((string) ($old['delivery_mode'] ?? ''), 'on_site_support') ?>>Lieferung, Aufbau und Vor-Ort-Betreuung</option>
</select>
</label>
<label>
<span>Zahlungsart</span>
<select name="payment_method">
<option value="invoice_transfer" <?= selected((string) ($old['payment_method'] ?? $defaults['payment_method']), 'invoice_transfer') ?>>Rechnung / Überweisung</option>
<option value="paypal" <?= selected((string) ($old['payment_method'] ?? ''), 'paypal') ?>>PayPal</option>
</select>
</label>
<label class="form-grid-span">
<span>Hinweis für Kunden</span>
<textarea name="notes_customer" rows="4"><?= h((string) ($old['notes_customer'] ?? '')) ?></textarea>
</label>
<label class="form-grid-span">
<span>Interne Notiz</span>
<textarea name="internal_notes" rows="4"><?= h((string) ($old['internal_notes'] ?? '')) ?></textarea>
</label>
</div>
</div>
<div class="booking-summary-card">
<div class="summary-line">
<span>Mietdauer</span>
<strong data-summary-days>Noch nicht gewählt</strong>
</div>
<div class="summary-line summary-line-total">
<span>Gesamtpreis</span>
<strong data-summary-total><?= h(formatCurrency((int) $defaults['price_per_day_cents'])) ?></strong>
</div>
</div>
<button type="submit" class="button-primary">Bestellung speichern</button>
<button type="submit" class="button-primary">Buchung speichern</button>
</form>
</section>
+58
View File
@@ -0,0 +1,58 @@
<section class="admin-section">
<div class="section-header">
<div>
<p class="eyebrow">Kunden</p>
<h1>Kundenhistorie aus allen Aufträgen</h1>
</div>
<a class="button-secondary" href="<?= h(url('admin/create')) ?>">Neuen Kundenauftrag anlegen</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; ?>
<section class="table-card">
<div class="table-card-header">
<h2>Kundenübersicht</h2>
<span><?= h((string) count($customers)) ?> Kunden</span>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Name</th>
<th>Kontakt</th>
<th>Ort</th>
<th>Aufträge</th>
<th>Umsatz</th>
<th>Letzter Auftrag</th>
</tr>
</thead>
<tbody>
<?php foreach ($customers as $customer): ?>
<tr>
<td>
<strong><?= h($customer['name']) ?></strong><br>
<span><?= h($customer['company'] ?: '-') ?></span>
</td>
<td><?= h($customer['email']) ?><br><?= h($customer['phone']) ?></td>
<td><?= h($customer['city']) ?></td>
<td><?= h((string) $customer['booking_count']) ?></td>
<td><?= h(formatCurrency((int) $customer['revenue_cents'])) ?></td>
<td><?= h($customer['last_reference']) ?> · <?= h(formatDate($customer['last_booking_date'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if ($customers === []): ?>
<tr>
<td colspan="6">Es wurden noch keine Kunden gespeichert.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</section>
+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>
+55
View File
@@ -0,0 +1,55 @@
<section class="admin-section">
<div class="section-header">
<div>
<p class="eyebrow">Rechnungen</p>
<h1>Erstellte Rechnungen und Zahlungsstand</h1>
</div>
<a class="button-secondary" href="<?= h(url('admin/buchungen')) ?>">Zu den Buchungen</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; ?>
<section class="table-card">
<div class="table-card-header">
<h2>Rechnungsliste</h2>
<span><?= h((string) count($invoices)) ?> Einträge</span>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Rechnung</th>
<th>Auftrag</th>
<th>Ausgestellt</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['issue_date'])) ?></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="6">Noch keine Rechnungen vorhanden.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</section>
+5 -3
View File
@@ -1,8 +1,8 @@
<section class="admin-login-section">
<div class="admin-login-card">
<p class="eyebrow">Verwaltung</p>
<h1>Admin-Login</h1>
<p>Hier verwaltest du Anfragen, Kundenbestellungen und Rechnungen.</p>
<h1>Interner Zugang</h1>
<p>Hier verwalten Sie Anfragen, Buchungen, Kunden und Rechnungen.</p>
<?php if (!empty($flashSuccess)): ?>
<div class="flash flash-success"><?= h((string) $flashSuccess) ?></div>
@@ -12,9 +12,10 @@
<?php endif; ?>
<form method="post" action="<?= h(url('admin/login')) ?>" class="stack-form">
<?= csrfField() ?>
<label>
<span>Benutzername</span>
<input type="text" name="username" value="admin" required>
<input type="text" name="username" value="<?= h((string) $defaultUsername) ?>" required>
</label>
<label>
<span>Passwort</span>
@@ -24,3 +25,4 @@
</form>
</div>
</section>
+14 -10
View File
@@ -4,7 +4,7 @@
<p class="eyebrow">Auftragsdetail</p>
<h1><?= h($booking['reference']) ?></h1>
</div>
<a class="button-secondary" href="<?= h(url('admin')) ?>">Zurueck zum Dashboard</a>
<a class="button-secondary" href="<?= h(url('admin/buchungen')) ?>">Zurück zur Übersicht</a>
</div>
<?php if (!empty($flashSuccess)): ?>
@@ -24,8 +24,9 @@
<div><dt>Telefon</dt><dd><?= h($booking['customer']['phone']) ?></dd></div>
<div><dt>Adresse</dt><dd><?= h($booking['customer']['street']) ?>, <?= h($booking['customer']['postal_code']) ?> <?= h($booking['customer']['city']) ?></dd></div>
<div><dt>Anlass</dt><dd><?= h($booking['customer']['event_type'] ?: '-') ?></dd></div>
<div><dt>Ort</dt><dd><?= h($booking['customer']['event_location'] ?: '-') ?></dd></div>
<div><dt>Veranstaltungsort</dt><dd><?= h($booking['customer']['event_location'] ?: '-') ?></dd></div>
<div><dt>Mietzeitraum</dt><dd><?= h(formatDate($booking['start_date'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></dd></div>
<div><dt>Miettage</dt><dd><?= h((string) $booking['total_days']) ?></dd></div>
<div><dt>Leistung</dt><dd><?= h($booking['delivery_mode_label']) ?></dd></div>
<div><dt>Zahlungsart</dt><dd><?= h($booking['payment_method_label']) ?></dd></div>
<div><dt>Gesamt</dt><dd><?= h(formatCurrency((int) $booking['subtotal_cents'])) ?></dd></div>
@@ -35,6 +36,7 @@
<article class="table-card">
<h2>Verwaltung</h2>
<form method="post" action="<?= h(url('admin/order/update')) ?>" class="stack-form">
<?= csrfField() ?>
<input type="hidden" name="booking_id" value="<?= h($booking['id']) ?>">
<label>
<span>Status</span>
@@ -60,7 +62,7 @@
<span>Interne Notiz</span>
<textarea name="internal_notes" rows="4"><?= h((string) $booking['internal_notes']) ?></textarea>
</label>
<button type="submit" class="button-primary">Aenderungen speichern</button>
<button type="submit" class="button-primary">Änderungen speichern</button>
</form>
</article>
</div>
@@ -69,31 +71,32 @@
<article class="table-card">
<h2>Rechnung</h2>
<?php if ($invoice !== null): ?>
<p>Rechnung <strong><?= h($invoice['invoice_number']) ?></strong> ist erstellt.</p>
<p>Rechnung <strong><?= h($invoice['invoice_number']) ?></strong> wurde bereits erzeugt.</p>
<ul class="check-list compact-list">
<li>Faellig am <?= h(formatDate($invoice['due_date'])) ?></li>
<li>Fällig am <?= h(formatDate($invoice['due_date'])) ?></li>
<li>Gesamtbetrag <?= h(formatCurrency((int) $invoice['total_cents'])) ?></li>
<li>Zahlungsart <?= h($invoice['payment_method_label']) ?></li>
</ul>
<a class="button-secondary" href="<?= h(url('admin/invoice/pdf?id=' . urlencode($invoice['id']))) ?>" target="_blank">PDF oeffnen</a>
<a class="button-secondary" href="<?= h(url('admin/invoice/pdf?id=' . urlencode($invoice['id']))) ?>" target="_blank">PDF öffnen</a>
<?php else: ?>
<p>Fuer diesen Auftrag wurde noch keine Rechnung erstellt.</p>
<p>Für diesen Auftrag wurde noch keine Rechnung erstellt.</p>
<form method="post" action="<?= h(url('admin/order/invoice')) ?>" class="stack-form">
<?= csrfField() ?>
<input type="hidden" name="booking_id" value="<?= h($booking['id']) ?>">
<label>
<span>Faelligkeitsdatum</span>
<span>Fälligkeitsdatum</span>
<input type="date" name="due_date">
</label>
<label>
<span>Rechnungsnotiz</span>
<textarea name="invoice_notes" rows="4">Vielen Dank fuer deinen Auftrag.</textarea>
<textarea name="invoice_notes" rows="4">Vielen Dank für Ihren Auftrag.</textarea>
</label>
<button type="submit" class="button-primary">Rechnung erstellen</button>
</form>
<?php endif; ?>
</article>
<article class="table-card">
<h2>Systeminfos</h2>
<h2>Systeminformationen</h2>
<dl class="detail-list">
<div><dt>ID</dt><dd><?= h($booking['id']) ?></dd></div>
<div><dt>Quelle</dt><dd><?= h($booking['source']) ?></dd></div>
@@ -103,3 +106,4 @@
</article>
</div>
</section>
+55
View File
@@ -0,0 +1,55 @@
<section class="admin-section">
<div class="section-header">
<div>
<p class="eyebrow">Anfragen</p>
<h1>Offene und reservierte Anfragen</h1>
</div>
<a class="button-primary" href="<?= h(url('admin/create')) ?>">Manuelle Buchung anlegen</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; ?>
<section class="table-card">
<div class="table-card-header">
<h2>Zu bearbeitende Einträge</h2>
<span><?= h((string) count($requests)) ?> Einträge</span>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>Referenz</th>
<th>Kunde</th>
<th>Zeitraum</th>
<th>Leistung</th>
<th>Status</th>
<th>Preis</th>
</tr>
</thead>
<tbody>
<?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'])) ?> bis <?= h(formatDate($booking['end_date'])) ?></td>
<td><?= h($booking['delivery_mode_label']) ?></td>
<td><span class="<?= h(statusPillClass((string) $booking['status'])) ?>"><?= h($booking['status_label']) ?></span></td>
<td><?= h(formatCurrency((int) $booking['subtotal_cents'])) ?></td>
</tr>
<?php endforeach; ?>
<?php if ($requests === []): ?>
<tr>
<td colspan="6">Keine offenen Anfragen vorhanden.</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</section>
</section>
+44
View File
@@ -0,0 +1,44 @@
<section class="admin-section narrow-section">
<div class="section-header">
<div>
<p class="eyebrow">Einstellungen</p>
<h1>Aktiver Systemstand</h1>
</div>
<a class="button-secondary" href="<?= h(url('admin')) ?>">Zurück zum Dashboard</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="detail-grid">
<article class="table-card">
<h2>Unternehmen & Preise</h2>
<dl class="detail-list">
<div><dt>Firma</dt><dd><?= h($company['name']) ?></dd></div>
<div><dt>Servicegebiet</dt><dd><?= h($company['service_area']) ?></dd></div>
<div><dt>Preis pro Miettag</dt><dd><?= h(formatCurrency((int) $pricing['default_day_rate_cents'])) ?></dd></div>
<div><dt>Kontakt</dt><dd><?= h($company['email']) ?> · <?= h($company['phone']) ?></dd></div>
<div><dt>Abholung</dt><dd><?= h($company['pickup_window']) ?></dd></div>
<div><dt>Rückgabe</dt><dd><?= h($company['return_window']) ?></dd></div>
</dl>
</article>
<article class="table-card">
<h2>Datenhaltung</h2>
<dl class="detail-list">
<div><dt>Aktiver Treiber</dt><dd><?= h($runtime['storage_driver']) ?></dd></div>
<div><dt>Tabellenpräfix</dt><dd><?= h((string) $runtime['table_prefix']) ?></dd></div>
<div><dt>Datenbank aktiviert</dt><dd><?= h(!empty($runtime['database_enabled']) ? 'Ja' : 'Nein') ?></dd></div>
<div><dt>Host</dt><dd><?= h((string) ($runtime['database_host'] ?: '-')) ?></dd></div>
<div><dt>Datenbank</dt><dd><?= h((string) ($runtime['database_name'] ?: '-')) ?></dd></div>
<?php if (!empty($runtime['fallback_reason'])): ?>
<div><dt>Hinweis</dt><dd><?= h($runtime['fallback_reason']) ?></dd></div>
<?php endif; ?>
</dl>
</article>
</div>
</section>