{% extends "base.html" %} {% block title %}{{ task.name }}{% endblock %} {% block heading %}{{ task.name }} · {{ task.machine_name }}{% endblock %} {% block breadcrumb %}

Wartung / {{ task.name }}

{% endblock %} {% block content %}

Stammdaten

Maschine

{{ task.machine_name }}

Intervall

{% if task.interval_kind == 'hours' %}{{ task.interval_value|round(1) }} Betriebsstunden{% endif %} {% if task.interval_kind == 'days' %}{{ task.interval_value|round|int }} Tage{% endif %} {% if task.interval_kind == 'months' %}{{ task.interval_value|round|int }} Monate{% endif %} {% if task.interval_kind == 'cycles' %}{{ task.interval_value|round|int }} Zyklen{% endif %}

Letzte Wartung

{{ task.last_done_at[:16] if task.last_done_at else '— noch nie —' }}

Verantwortlich

{% if task.resp_first %}{{ task.resp_first }} {{ task.resp_last }}{% else %}—{% endif %} {% if task.external_provider %}· extern: {{ task.external_provider }}{% endif %}

{% if task.estimated_duration_min %}

Erwartete Dauer

{{ task.estimated_duration_min }} Min

{% endif %} {% if task.estimated_cost_eur %}

Erwartete Kosten

{{ "%.2f"|format(task.estimated_cost_eur) }} €

{% endif %} {% if task.description %}

Beschreibung

{{ task.description }}

{% endif %}

Wartungs-Historie

{{ history|length }} Eintrag{% if history|length != 1 %}s{% endif %}

{% for h in history %} {% else %} {% endfor %}
Datum Stand bei Durchführung Dauer Kosten Durchgeführt von Notiz
{{ h.performed_at[:16] }} {% if h.value_at_done %} {% if task.interval_kind == 'hours' %}{{ h.value_at_done|round(1) }} h{% endif %} {% if task.interval_kind == 'cycles' %}{{ h.value_at_done|round|int }}{% endif %} {% if task.interval_kind in ('days', 'months') %}—{% endif %} {% else %}—{% endif %} {% if h.duration_min %}{{ h.duration_min }} Min{% else %}—{% endif %} {% if h.cost_eur %}{{ "%.2f"|format(h.cost_eur) }} €{% else %}—{% endif %} {% if h.first_name %}{{ h.first_name }} {{ h.last_name }}{% else %}—{% endif %} {{ h.notes or '—' }}
Noch keine Wartung durchgeführt.

Aktueller Status

{% set st = task.status_info %}

{% if st.status == 'ok' %}🟢 OK{% endif %} {% if st.status == 'warn' %}🟡 Bald fällig{% endif %} {% if st.status == 'overdue' %}🔴 Überfällig{% endif %} {% if st.status == 'unknown' %}— Unbekannt{% endif %}

{% if st.ratio_pct is not none %}
{% set color = '#10b981' %} {% if st.status == 'warn' %}{% set color = '#f59e0b' %}{% endif %} {% if st.status == 'overdue' %}{% set color = '#ef4444' %}{% endif %}

{{ st.ratio_pct|round|int }} % des Intervalls

{% endif %} {% if st.hours_since_done is defined %}

{{ st.hours_since_done|round|int }} Stunden seit letzter Wartung

{% endif %} {% if st.cycles_since_done is defined %}

{{ st.cycles_since_done }} Zyklen seit letzter Wartung

{% endif %} {% if st.days_to_due is defined %} {% if st.days_to_due > 0 %}

In {{ st.days_to_due|round|int }} Tagen fällig

{% else %}

{{ (st.days_to_due*-1)|round|int }} Tage überfällig

{% endif %} {% endif %}

Wartung als erledigt eintragen

{% endblock %}