34ca1be9b7
Moved all images to public/assets/images. Added darkened photography across heroes, specials, menu cards, authentication, story, checkout, and footer. Replaced placeholder branding with the supplied logo. Preserved configurable menu item images. Updated desktop and mobile styling for readable cream/gold text.
40 lines
2.4 KiB
PHP
40 lines
2.4 KiB
PHP
<section class="admin-panel">
|
|
<div class="admin-panel-heading admin-toolbar">
|
|
<form class="admin-filters" action="<?= e(url('/admin/orders')) ?>" method="get">
|
|
<input type="search" name="q" value="<?= e($query) ?>" placeholder="Order, customer, or email">
|
|
<select name="status">
|
|
<option value="">All statuses</option>
|
|
<?php foreach (['paid', 'preparing', 'ready', 'completed', 'cancelled'] as $status): ?>
|
|
<option value="<?= $status ?>" <?= selected($statusFilter, $status) ?>><?= e(ucfirst($status)) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<button class="button button-small" type="submit">Filter</button>
|
|
</form>
|
|
<a class="button button-small button-ghost" href="<?= e(url('/admin/export/orders.csv')) ?>">Export CSV</a>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead>
|
|
<tr><th>Order</th><th>Customer</th><th>Placed</th><th>Fulfillment</th><th>Payment</th><th>Total</th><th></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if (!$orders): ?><tr><td colspan="7" class="empty-cell">No orders match those filters.</td></tr><?php endif; ?>
|
|
<?php foreach ($orders as $order): ?>
|
|
<tr>
|
|
<td><strong><?= e($order['order_number']) ?></strong></td>
|
|
<td><?= e($order['customer_name']) ?><small><?= e($order['customer_email']) ?></small></td>
|
|
<td><?= e(store_datetime((string) $order['placed_at'], 'M j, g:i A')) ?></td>
|
|
<td><span class="status-pill status-<?= e($order['status']) ?>"><?= e(ucfirst((string) $order['status'])) ?></span></td>
|
|
<td>
|
|
<span class="status-pill status-<?= e($order['payment_status']) ?>"><?= e(ucwords(str_replace('_', ' ', (string) $order['payment_status']))) ?></span>
|
|
<?php if ((int) $order['refunded_cents'] > 0): ?><small><?= money($order['refunded_cents']) ?> returned</small><?php endif; ?>
|
|
</td>
|
|
<td><?= money($order['total_cents']) ?></td>
|
|
<td><a class="button button-small button-ghost" href="<?= e(url('/admin/order')) ?>?id=<?= (int) $order['id'] ?>">Open</a></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|