{% extends "base.html" %} {% block title %}Werkzeuge{% endblock %} {% block heading %}Werkzeug-Verwaltung{% endblock %} {% block topbar_actions %} {% if tools_needing_reorder_count and tools_needing_reorder_count > 0 %} ⚠ {{ tools_needing_reorder_count }} Bestellvorschlag {%- if tools_needing_reorder_count != 1 %}e{% endif %} {% endif %} {% if low_life_filter %} Alle Werkzeuge {% else %} Standzeit > Schwelle {% endif %} 🔢 CNC T-Mapping {% endblock %} {% block content %}

Werkzeug-Bestand

{{ tools|length }} aktive Werkzeuge · CNC-spezifische Verwaltung mit Standzeit-Tracking

{% for t in tools %} {% set used_min = t.total_minutes_used or 0 %} {% set ratio = (used_min / t.standzeit_min) if t.standzeit_min and t.standzeit_min > 0 else 0 %} {% else %} {% endfor %}
Ident Bezeichnung Typ Ø Material Hersteller Lager Bestand Aktuell auf Einsatz (Min) Standzeit-Status
{{ t.ident }} {{ t.name }} {% if t.article_no %}
Art-Nr: {{ t.article_no }}
{% endif %}
{% if t.tool_type %} {{ t.tool_type }} {% endif %} {% if t.diameter_mm %}{{ "%.1f"|format(t.diameter_mm) }} mm{% endif %} {{ t.material or '—' }} {{ t.manufacturer or '—' }} {{ t.location or '—' }} {% if t.stock <= t.min_stock %} {{ t.stock }} ⚠ {% else %} {{ t.stock }} {% endif %} {% if t.current_machine %} {{ t.current_machine }} {% else %} — im Lager — {% endif %} {{ used_min }} min {% if t.standzeit_min %} {% set lc_status = (t.lifecycle.status if t.lifecycle else 'ok') %} {% set lc_pct = (t.lifecycle.ratio_pct if t.lifecycle else (ratio*100)) %} {% set bar_color = '#10b981' %} {% if lc_status == 'over' %}{% set bar_color = '#ef4444' %}{% endif %} {% if lc_status == 'warn' %}{% set bar_color = '#f59e0b' %}{% endif %}
{{ lc_pct|round|int }}% von {{ t.standzeit_min }} min {% if lc_status == 'warn' %}· Bestellvorschlag{% endif %} {% if lc_status == 'over' %}· überschritten{% endif %}
{% if t.lifecycle and t.lifecycle.lead_time_days %}
Lieferzeit: {{ t.lifecycle.lead_time_days }} T
{% endif %} {% else %} {% endif %}
{% if t.lifecycle and t.lifecycle.status in ('warn', 'over') %} {% endif %}
Keine Werkzeuge erfasst — links oben „+ Werkzeug" anklicken
{% endblock %}