{% extends 'swimmonitor/base.html.twig' %} {% set months = ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'] %} {% set month_label = months[month|date('n') - 1] ~ ' ' ~ month|date('Y') %} {% block title %}Betriebstagebuch {{ container.name }} · {{ month_label }}{% endblock %} {% block breadcrumb %}
  • Übersicht
  • {{ container.name }}
  • Betriebstagebuch
  • {% endblock %} {% block page_head %}

    Betriebstagebuch Wasser

    {{ container.name }} · {{ month_label }} · erstellt {{ 'now'|date('d.m.Y H:i', 'Europe/Berlin') }} Uhr

    {{ months[previous|date('n') - 1] }} {% if next %}{{ months[next|date('n') - 1] }} {% endif %} CSV
    {% endblock %} {% macro num(value, digits) %}{{ value is null ? '–' : value|number_format(digits, ',', '.') }}{% endmacro %} {% block content %} {% import _self as m %} {% if logbook.error %}
    {{ logbook.error }}
    {% endif %}

    Monatsübersicht

    {{ logbook.from|date('d.m.Y') }} – {{ logbook.to|date_modify('-1 second')|date('d.m.Y') }}
    {% for role, meta in logbook.values %} {% set s = logbook.summary[role] %}
    {{ meta.name }}{% if meta.unit %} {{ meta.unit }}{% endif %} {{ m.num(s.mean, meta.digits) }} min {{ m.num(s.min, meta.digits) }} · max {{ m.num(s.max, meta.digits) }}
    {% endfor %} {% set alarm_days = logbook.days|filter(d => d.alarms is not empty)|length %} {% set manual_count = logbook.days|reduce((carry, d) => carry + d.manual|length, 0) %}
    Tage mit Alarm {{ alarm_days }} von {{ logbook.days|length }} Tagen
    Handmessungen {{ manual_count }} im Monat

    Tageswerte

    Messgerät: Minimum · Mittel · Maximum je Tag
    {% for meta in logbook.values %}{% endfor %} {% for meta in logbook.values %}{% endfor %} {% for day in logbook.days %} {% for role, meta in logbook.values %} {% set v = day.values[role] ?? null %} {% endfor %} {% endfor %}
    Tag{{ meta.name }}{% if meta.unit %} ({{ meta.unit }}){% endif %}Abdeckung Alarme Handmessung
    minØmax
    {{ day.date|date('d.m.') }} {{ ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'][day.date|date('N') - 1] }}{{ m.num(v.min ?? null, meta.digits) }} {{ m.num(v.mean ?? null, meta.digits) }} {{ m.num(v.max ?? null, meta.digits) }}{{ day.coverage is null ? '–' : day.coverage ~ ' h' }} {% if day.alarms is empty %}–{% else %} {% for a in day.alarms|slice(0, 4) %}{{ a.sensorName }} {% endfor %} {% if day.alarms|length > 4 %}+{{ day.alarms|length - 4 }}{% endif %} {{ (day.alarmMinutes / 60)|round(1)|number_format(1, ',', '.') }} h {% endif %} {% for w in day.manual %}
    {{ w.measuredAt|date('H:i', 'Europe/Berlin') }}: pH {{ w.ph ?? '–' }} · Cl frei {{ w.chlorineFree ?? '–' }} · geb. {{ w.chlorineCombined ?? '–' }} · ges. {{ w.chlorineTotal ?? '–' }}
    {% else %}–{% endfor %}

    Geprüft: ______________________   Datum: ____________   Unterschrift: ______________________

    {% endblock %} {% block stylesheets %} {% endblock %}