fix: hamburger menu vertical stack, lock paid orders, order cancellation with balance refund, deduplicate admin drawer

This commit is contained in:
2026-09-22 11:27:46 +02:00
parent 896f1d7d08
commit 970f294c9b
6 changed files with 247 additions and 66 deletions
+29 -23
View File
@@ -247,34 +247,40 @@
{% if event.sponsor_name %}<br><small class="text-muted">von Sponsor</small>{% endif %}
</td>
<td>
{% if event.sponsor_name %}
<span class="badge-btn paid" style="cursor: default;">✓ Gesponsert</span>
{% elif order.is_paid %}
<form action="/admin/toggle-paid/{{ order.id }}" method="POST" style="margin: 0; display: inline;">
<button type="submit" class="badge-btn paid" title="Klick um Bezahlung zurückzusetzen">
{% if order.payment_method == 'balance' %}
✓ Bezahlt (Guthaben)
{% else %}
✓ Bezahlt (Bar)
{% endif %}
</button>
</form>
{% else %}
<div style="display: flex; gap: 6px; flex-wrap: wrap;">
{% if order.user and order.user.balance >= order.total_price %}
<form action="/kasse/charge-order/{{ order.id }}?method=balance" method="POST" style="margin: 0;">
<button type="submit" class="badge-btn paid" style="background: rgba(34, 197, 94, 0.15); color: var(--success);" title="Vom Guthaben des Mitarbeiters abbuchen">
💰 Abbuchen
<div style="display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;">
{% if event.sponsor_name %}
<span class="badge-btn paid" style="cursor: default;">✓ Gesponsert</span>
{% elif order.is_paid %}
<form action="/admin/toggle-paid/{{ order.id }}" method="POST" style="margin: 0; display: inline;">
<button type="submit" class="badge-btn paid" title="Klick um Bezahlung zurückzusetzen (Guthaben wird automatisch erstattet)">
{% if order.payment_method == 'balance' %}
✓ Bezahlt (Guthaben)
{% else %}
✓ Bezahlt (Bar)
{% endif %}
</button>
</form>
{% else %}
<div style="display: flex; gap: 6px; flex-wrap: wrap;">
{% if order.user and order.user.balance >= order.total_price %}
<form action="/kasse/charge-order/{{ order.id }}?method=balance" method="POST" style="margin: 0;">
<button type="submit" class="badge-btn paid" style="background: rgba(34, 197, 94, 0.15); color: var(--success);" title="Vom Guthaben des Mitarbeiters abbuchen">
💰 Abbuchen
</button>
</form>
{% endif %}
<form action="/kasse/charge-order/{{ order.id }}?method=cash" method="POST" style="margin: 0;">
<button type="submit" class="badge-btn unpaid" title="Barzahlung annehmen">
💵 Bar bezahlt
</button>
</form>
</div>
{% endif %}
<form action="/kasse/charge-order/{{ order.id }}?method=cash" method="POST" style="margin: 0;">
<button type="submit" class="badge-btn unpaid" title="Barzahlung annehmen">
💵 Bar bezahlt
</button>
<form action="/admin/orders/{{ order.id }}/delete" method="POST" style="margin: 0; display: inline;" onsubmit="return confirm('Bestellung für {{ order.display_name|escape }} wirklich stornieren? Bereits bezahltes Guthaben wird sofort erstattet.');">
<button type="submit" class="btn-revoke-small" title="Bestellung stornieren / löschen" style="padding: 2px 6px; font-size: 0.8rem;">🗑️</button>
</form>
</div>
{% endif %}
</td>
</tr>
{% else %}