Initial Kaffeekasse SaaS restart
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
<?php require __DIR__ . '/../partials/layout-top.php'; ?>
|
||||
|
||||
<section class="page-head">
|
||||
<span class="eyebrow">Selbstbedienung</span>
|
||||
<h1>Digitale Buchungen</h1>
|
||||
<p>Dies ist der produktive Kern fuer Browser, Tablet und spaetere Kiosk-Workflows.</p>
|
||||
</section>
|
||||
|
||||
<div class="two-column">
|
||||
<form class="card form-card" method="post" action="<?= e(tenant_url($tenant['slug'], 'bookings')) ?>">
|
||||
<?= csrf_field($csrf) ?>
|
||||
<label>
|
||||
<span>Mitglied</span>
|
||||
<select name="member_id" required>
|
||||
<?php foreach ($members as $member): ?>
|
||||
<option value="<?= e((string) $member['id']) ?>"><?= e($member['display_name']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>Produkt</span>
|
||||
<select name="product_id" required>
|
||||
<?php foreach ($products as $product): ?>
|
||||
<option value="<?= e((string) $product['id']) ?>"><?= e($product['name']) ?> (<?= e(money_from_cents((int) $product['price_cents'])) ?>)</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>Quelle</span>
|
||||
<select name="source_code">
|
||||
<option value="digital_self">Digitale Selbstbuchung</option>
|
||||
<option value="admin_backoffice">Backoffice-Buchung</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
<span>Menge</span>
|
||||
<input type="number" name="quantity" min="0.25" step="0.25" value="<?= e((string) old('quantity', '1')) ?>" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Verbrauchszeitpunkt</span>
|
||||
<input type="datetime-local" name="effective_at" value="<?= e((string) old('effective_at', gmdate('Y-m-d\TH:i'))) ?>" required>
|
||||
</label>
|
||||
<label>
|
||||
<span>Notiz</span>
|
||||
<input type="text" name="notes" value="<?= e((string) old('notes')) ?>">
|
||||
</label>
|
||||
<button class="button button-primary" type="submit">Buchung speichern</button>
|
||||
</form>
|
||||
|
||||
<section class="table-card">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zeit</th>
|
||||
<th>Mitglied</th>
|
||||
<th>Produkt</th>
|
||||
<th>Quelle</th>
|
||||
<th>Betrag</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($bookings as $booking): ?>
|
||||
<tr>
|
||||
<td><?= e($booking['recorded_at']) ?></td>
|
||||
<td><?= e($booking['member_name']) ?></td>
|
||||
<td><?= e($booking['product_name']) ?></td>
|
||||
<td><?= e($booking['source_name']) ?></td>
|
||||
<td><?= e(money_from_cents((int) $booking['total_cents'])) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<?php require __DIR__ . '/../partials/layout-bottom.php'; ?>
|
||||
Reference in New Issue
Block a user