61 lines
2.4 KiB
HTML
61 lines
2.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="back-row top">
|
|
<a class="big-btn small neutral" href="{{ url_for('leitstand_home') }}">← Zurück</a>
|
|
</div>
|
|
|
|
<form method="get" action="{{ url_for('leitstand_uebersicht') }}" class="filter-row">
|
|
<span>Maschine:</span>
|
|
<select name="maschine_id" onchange="this.form.submit()">
|
|
<option value="">Alle Maschinen</option>
|
|
{% for m in maschinen %}
|
|
<option value="{{ m.id }}" {% if filter_maschine_id|string == m.id|string %}selected{% endif %}>{{ m.name or ('Maschine ' ~ m.id) }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<span>Status:</span>
|
|
<select name="status" onchange="this.form.submit()">
|
|
<option value="offen_pause" {% if filter_status == "offen_pause" %}selected{% endif %}>Offen/Pausiert</option>
|
|
<option value="alle" {% if filter_status == "alle" %}selected{% endif %}>Alle</option>
|
|
</select>
|
|
<button type="submit">Filtern</button>
|
|
</form>
|
|
|
|
{% if not auftraege %}
|
|
<div class="empty-state">Keine Aufträge gefunden.</div>
|
|
{% else %}
|
|
<div class="list-meta">{{ auftraege|length }} Aufträge</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr><th>ID</th><th>Auftragsnr.</th><th>Artikel</th><th>Maschine</th><th>Menge</th><th>Stk/h</th><th>Status</th><th>Aktiv</th><th>SID</th><th class="col-actions"></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for a in auftraege %}
|
|
<tr>
|
|
<td>{{ a.id }}</td>
|
|
<td>{{ a.auftragsnummer }}</td>
|
|
<td>{{ a.artikel or "-" }}</td>
|
|
<td>{{ a.maschine_name }}</td>
|
|
<td>{{ a.einheiten_fmt }}</td>
|
|
<td>{{ a.soll_h_fmt }}</td>
|
|
<td>{{ a.status_label }}</td>
|
|
<td>{{ "Ja" if a.aktiv else "Nein" }}</td>
|
|
<td>{{ a.sid_fmt }}</td>
|
|
<td class="col-actions">
|
|
<div class="row-actions">
|
|
<a class="icon-btn" href="{{ url_for('leitstand_uebersicht_bearbeiten', auftrag_id=a.id, maschine_id=filter_maschine_id, status=filter_status) }}">Bearbeiten</a>
|
|
<form method="post" action="{{ url_for('leitstand_uebersicht_loeschen', auftrag_id=a.id) }}" class="order-form">
|
|
<input type="hidden" name="maschine_id" value="{{ filter_maschine_id or '' }}">
|
|
<input type="hidden" name="status" value="{{ filter_status }}">
|
|
<button type="submit" class="icon-btn danger">Löschen</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|