54 lines
2.0 KiB
HTML
54 lines
2.0 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_korrektur') }}" class="filter-row">
|
|
<span>Maschine filtern:</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>
|
|
<button type="submit">Filtern</button>
|
|
</form>
|
|
|
|
{% if not eintraege %}
|
|
<div class="empty-state">Keine Einträge gefunden.</div>
|
|
{% else %}
|
|
<div class="list-meta">{{ eintraege|length }} Buchungen (neueste zuerst)</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr><th>ID</th><th>Maschine</th><th>Zeit</th><th>Auftrag</th><th>Produziert</th><th>Status</th><th>Ø/h</th><th>Grund</th><th class="col-actions"></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for m in eintraege %}
|
|
<tr>
|
|
<td>{{ m.id }}</td>
|
|
<td>{{ m.maschine_id|int }}</td>
|
|
<td>{{ m.zeit_fmt }}</td>
|
|
<td>{{ m.order }}</td>
|
|
<td>{{ m.produziert_fmt }}</td>
|
|
<td>{{ m.status }}</td>
|
|
<td>{{ m.h_avg_fmt }}</td>
|
|
<td>{{ m.p_grund or '' }}</td>
|
|
<td class="col-actions">
|
|
<div class="row-actions">
|
|
<a class="icon-btn" href="{{ url_for('leitstand_korrektur_bearbeiten', mde_id=m.id, maschine_id=filter_maschine_id) }}">Bearbeiten</a>
|
|
<form method="post" action="{{ url_for('leitstand_korrektur_loeschen', mde_id=m.id) }}" class="order-form">
|
|
<input type="hidden" name="maschine_id" value="{{ filter_maschine_id or '' }}">
|
|
<button type="submit" class="icon-btn danger">Löschen</button>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|