{% extends "base.html" %} {% block title %}Anfragen{% endblock %} {% block heading %}Anfragen{% endblock %} {% block topbar_actions %}
Alle {% for code, label in STATUS_LABELS.items() %} {{ label }} {% endfor %}
📋 Liste ✉ Inbox
+ Neue Anfrage {% endblock %} {% block content %} {% if view == 'inbox' %}
{% for i in items %}
{{ i.customer_name or i.customer_name_text or '— Unbekannt —' }} {{ i.created_at[:16] }}
{{ i.subject }}
{{ (i.body or '')[:120] }}{% if i.body and i.body|length > 120 %}…{% endif %}
{% endfor %} {% if not items %}
Keine Anfragen
{% endif %}
Lädt …
{% else %}
{% if items %} {% endif %} {% if items %}
{% for i in items %} {% endfor %}
Nr. Eingang Quelle Betreff Kunde Bearbeiter Status Angebot
{{ i.inquiry_no or '—' }} {{ i.created_at[:10] }} {{ SOURCE_LABELS.get(i.source, i.source) }} {{ i.subject }} {% if i.customer_name %} {{ i.customer_name }} {% if i.customer_country_iso %}· {{ i.customer_country_iso }}{% endif %} {% elif i.customer_name_text %} {{ i.customer_name_text }} extern {% else %}—{% endif %} {% if i.assigned_first %}{{ i.assigned_first }} {{ i.assigned_last }}{% else %}—{% endif %} {{ STATUS_LABELS.get(i.status, i.status) }} {% if i.created_quote_id %}#{{ i.created_quote_id }}{% else %}—{% endif %} Öffnen
{% else %} {% from "_macros.html" import empty_state %} {% if status_filter %} {{ empty_state( icon='🔍', title='Keine Anfragen mit Status „' ~ STATUS_LABELS.get(status_filter, status_filter) ~ '"', description='Mit dem aktuellen Filter sind keine Anfragen sichtbar. Setze den Filter zurück, um alle Anfragen zu sehen.', ctas=[ {'label': 'Filter zurücksetzen', 'href': '/inquiries', 'primary': True}, {'label': '+ Neue Anfrage erfassen', 'href': '/inquiries/new'}, ], ) }} {% else %} {{ empty_state( icon='📥', title='Noch keine Anfragen', description='Hier landen alle Mail-Anfragen die per IMAP reinkommen, plus alles was du manuell erfasst. Die Anfrage ist der Startpunkt deines Vertriebs-Workflows.', workflow='📥 Anfrage → 💼 Angebot → 📋 Auftrag → 🏭 Werkstatt → 📦 Versand → 🧾 Rechnung', ctas=[ {'label': '+ Erste Anfrage erfassen', 'href': '/inquiries/new', 'primary': True}, {'label': '📥 IMAP einrichten', 'href': '/settings#imap'}, {'label': '📚 Handbuch (DE)', 'href': '/handbuch/de/pdf', 'external': True}, ], ) }} {% endif %} {% endif %} {% if items %} {% endif %} {% endif %} {% endblock %}