{% if has_office_session %} Office {% endif %}

👷 {{ t('sf_choose_machine') if t else 'Shopfloor — Maschine wählen' }}

{# === Wer ist gerade da? === #}

{{ t('sf_logged_in_users') if t else 'Angemeldete Mitarbeiter' }} {{ t('sf_live_update') if t else 'aktualisiert sich live' }}

{% if active_operators %} {% for op in active_operators %}
{{ (op.first_name[0] if op.first_name else '?') ~ (op.last_name[0] if op.last_name else '') }}

{{ op.first_name }} {{ op.last_name }} {% if op.break_open %}Pause{% endif %}

{{ op.role_name or 'Mitarbeiter' }}

seit {{ op.shift_started_at[11:16] if op.shift_started_at else '—' }} {% if op.machine_name %} ⚙️ {{ op.machine_name }} {% endif %} {% if op.active_job %} ▶ {{ op.active_job.ident }} · {{ op.active_job.item_ident or '' }} {% endif %}
{% endfor %} {% else %}
Noch niemand eingeloggt — der erste, der sich am Tablet anmeldet, erscheint hier.
{% endif %}
{{ t('sf_machines') if t else 'Maschinen' }}
{% for m in machines %} {% set occupant = none %} {% for op in active_operators %}{% if op.machine_id == m.id %}{% set occupant = op %}{% endif %}{% endfor %} {% if occupant %} {{ occupant.first_name[0] if occupant.first_name else '' }}{{ occupant.last_name[0] if occupant.last_name else '' }} {% endif %}
⚙️
{{ m.name }}
{{ m.controller_type or '—' }}{% if m.controller_model %} · {{ m.controller_model }}{% endif %}
{% else %}
Keine Maschinen angelegt — bitte zuerst unter Maschinen-Verwaltung Maschinen hinzufügen.
{% endfor %}