feat: add email notifications, order references, stock badges, and sale flags

- Add customer email field and PayPal payment reminder emails with order reference (HEL-YEAR-ID format)
- Display stock availability with color-coded badges (available/low/unavailable)
- Add sale/clearance flag with animated red badge overlay
- Implement automatic fallback placeholder for missing/broken product images
- Add email column to order management view

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 13:56:16 +01:00
parent 99ecea1de9
commit 832aaf2b05
7 changed files with 417 additions and 55 deletions

View File

@@ -16,6 +16,7 @@
<th>Datum</th>
<th>Name</th>
<th>Handy</th>
<th>E-Mail</th>
<th>Mannschaft</th>
<th>Artikel</th>
<th>Größe</th>
@@ -33,6 +34,7 @@
<td>{{ o.created_at }}</td>
<td>{{ o.name }}</td>
<td>{{ o.handy }}</td>
<td>{{ o.email or "" }}</td>
<td>{{ o.mannschaft }}</td>
<td>{{ o.artikel }}</td>
<td>{{ o.groesse }}</td>
@@ -43,7 +45,8 @@
{% endif %}
</td>
<td>
{% if o.payment_status == "paid" %}<span class="badge success">Bezahlt</span>
{% if o.canceled %}
{% elif o.payment_status == "paid" %}<span class="badge success">Bezahlt</span>
{% else %}<span class="badge warning">Unbezahlt</span>
{% endif %}
</td>
@@ -68,7 +71,7 @@
{% endif %}
<form method="post" action="{{ url_for('bp.cancel_order', order_id=o.id) }}" onsubmit="return confirm('Bestellung wirklich stornieren?');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
<button class="btn small danger" type="submit">Stornieren</button>
<button class="btn small danger" type="submit">Storno</button>
</form>
{% else %}
@@ -76,7 +79,7 @@
</td>
</tr>
<tr class="order-history">
<td colspan="12">
<td colspan="13">
<details class="inline-details">
<summary>Historie</summary>
<div class="history-grid">
@@ -92,7 +95,7 @@
</tr>
{% else %}
<tr>
<td colspan="12" class="empty">Keine Bestellungen.</td>
<td colspan="13" class="empty">Keine Bestellungen.</td>
</tr>
{% endfor %}
</tbody>