{% extends "base.html" %} {% block title %}Meine Aufgaben{% endblock %} {% block breadcrumb %}

Heute · {{ tasks.today }}

{% endblock %} {% block heading %}Meine Aufgaben — {{ user_label }}{% endblock %} {% block topbar_actions %} {{ tasks.total_count }} {% if tasks.total_count == 1 %}Eintrag{% else %}Einträge{% endif %} aktiv {% endblock %} {% block content %} {% if tasks.total_count == 0 and not tasks.open_rentals and not tasks.time_open and not tasks.vacation_today %}

Aktuell sind dir keine Aufgaben zugewiesen.

Sobald jemand dir einen Auftrag, eine Anfrage oder einen Fertigungs-Schritt zuweist, erscheint er hier.

{% endif %} {# ============= 1. AKTUELL LAUFENDE PROZESS-SCHRITTE (am wichtigsten) ============ #} {% if tasks.current_steps %}

🔥 Gerade laufend

Aktive Prozess-Schritte auf deinen Jobs

{% for s in tasks.current_steps %} {% endfor %}
JobStufeAuftragKunde
{{ s.job_ident }} {{ s.step_name }} {{ s.order_no or '—' }} {{ s.customer or '—' }}
{% endif %} {# ============= 2. PRODUCTION-JOBS ZUGEWIESEN ============ #} {% if tasks.production_jobs %}

🛠️ Deine Fertigungs-Aufträge

{{ tasks.production_jobs|length }} aktiv

{% for j in tasks.production_jobs %} {% endfor %}
Job-Nr Maschine Auftrag Kunde Liefertermin Fortschritt Status
{{ j.ident }} {{ j.machine_name or '—' }} {{ j.order_no or '—' }} {{ j.customer or '—' }} {{ j.due_date or '—' }} {{ j.qty_done }} / {{ j.qty_target }} {% if j.status == 'running' %}läuft {% elif j.status == 'paused' %}pausiert {% elif j.status == 'queued' %}geplant {% else %}{{ j.status }}{% endif %}
{% endif %} {# ============= 3. ANFRAGEN ZUGEWIESEN ============ #} {% if tasks.assigned_inquiries %}

📨 Dir zugewiesene Anfragen

Geplant — kalkulieren und Angebot erstellen

{% for i in tasks.assigned_inquiries %} {% endfor %}
Nr.BetreffKundeStkStunden/StkStatus
{{ i.inquiry_no }} {{ i.subject }} {{ i.customer_name or '—' }} {{ i.plan.qty or '—' }} {{ i.plan.hours_per_unit or '—' }} {% if i.status == 'quoted' %}Angeboten{% else %}Offen{% endif %}
{% endif %} {# ============= 4. ZEIT-ERFASSUNG LÄUFT ============ #} {% if tasks.time_open %}

⏱️ Aktive Zeit-Erfassung

{% for t in tasks.time_open %}

{{ 'Arbeit' if t.entry_type == 'work' else 'Pause' }} seit {{ t.started_at[:16] }} {% if t.production_job_id %}auf Job #{{ t.production_job_id }}{% endif %}

{% endfor %} → Zur Zeiterfassung
{% endif %} {# ============= 5. OFFENE VERLEIH-BUCHUNGEN ============ #} {% if tasks.open_rentals %}

🔧 Werkzeug auf deinem Namen

{{ tasks.open_rentals|length }} offen

{% for r in tasks.open_rentals %} {% endfor %}
ArtikelBeschreibungMengeMaschineAusgegeben
{{ r.item_ident or '—' }} {{ r.item_description or '—' }} {{ r.quantity }} {{ r.machine_name or '—' }} {{ r.rented_at[:16] }}
{% endif %} {# ============= 6. URLAUB HEUTE ============ #} {% if tasks.vacation_today %}

🌴 Du bist heute im Urlaub

{% for v in tasks.vacation_today %}

{{ v.start_date }}{{ v.end_date }} ({{ v.days }} Werktage)

{% endfor %}
{% endif %} {% endblock %}