{{ device.status.label }}{% if device.employee %} · {{ device.employee.code }}{% endif %}{% if device.shelf %} · Regal {{ device.shelf }}{% endif %}
{% if device.stage == 'INSPECTION' %} {% with latest=device.inspection_history.0 %}{% if latest %}Letzter Befund: {{ latest.defects|truncatechars:180 }}{{ latest.created_at|date:'d.m.Y H:i' }}{% if latest.recorded_by %} · {{ latest.recorded_by.username }}{% endif %}
{% endif %}{% endwith %} {% if can_edit_devices %}{% endif %} {% elif device.stage == 'REPAIR' %} {% with latest=device.repair_history.0 %}{% if latest %}Letzte Reparatur: {{ latest.work_done|truncatechars:180 }}{{ latest.created_at|date:'d.m.Y H:i' }}{% if latest.recorded_by %} · {{ latest.recorded_by.username }}{% endif %}
{% endif %}{% endwith %} {% if can_edit_devices %}{% endif %} {% elif device.stage == 'STORAGE' %} {% if can_edit_devices %}{% elif device.recipient %}Empfänger: {{ device.recipient.label }}
{% endif %} {% endif %}