{% extends "base.html" %} {% from "ui/day_row.html" import day_row with context %} {% from "ui/kpi_bar.html" import kpi_bar with context %} {% from "ui/week_header_bar.html" import week_header_bar with context %} {% from "ui/icon_button.html" import icon_link with context %} {% from "ui/warning_components.html" import workhours_target_warning_banner with context %} {% block title %}Wochenansicht{% endblock %} {% block body_class %}dashboard-theme{% endblock %} {% block page_class %}dashboard-page{% endblock %} {% block content %} {% set return_to = request.url.path ~ ('?' ~ request.url.query if request.url.query else '') %}
{% call week_header_bar('/dashboard?date=' ~ previous_week.isoformat(), '/dashboard?date=' ~ next_week.isoformat(), 'KW ' ~ week.week_start.isocalendar()[1] ~ ' (' ~ week.week_start.strftime('%d.%m.') ~ ' - ' ~ week.week_end.strftime('%d.%m.%Y') ~ ')') %}
{{ icon_link('/entry/new?date=' ~ selected_date.isoformat(), '/static/icons/add.svg', 'Tag hinzufügen') }} {{ icon_link('/bulk-entry?from=' ~ week.week_start.isoformat() ~ '&to=' ~ week.week_end.isoformat(), '/static/icons/batch.svg', 'Mehrere Tage bearbeiten') }} {{ icon_link('/export', '/static/icons/export.svg', 'Export') }} {% endcall %} {{ kpi_bar([ {'label': 'IST', 'value': ('%.2f'|format(week.weekly_ist / 60) )|replace('.00', '')}, {'label': 'SOLL', 'value': ('%.2f'|format(week.weekly_soll / 60))|replace('.00', '')}, {'label': 'DELTA', 'value': ('%.2f'|format(week.weekly_delta / 60))|replace('.00', ''), 'value_class': 'negative' if week.weekly_delta < 0 else 'positive'}, {'label': 'KUMULIERT', 'value': ('%.2f'|format(week.cumulative_delta / 60))|replace('.00', ''), 'value_class': 'negative' if week.cumulative_delta < 0 else 'positive'} ], 'kpi-bar--week') }} {{ workhours_target_warning_banner(workhours_target_warning) }}
{% for day in week.days %} {{ day_row(day, csrf_token, weekday_name_de(day.date) ~ ', ' ~ day.date.strftime('%d.%m.%Y'), return_to, 'week') }} {% endfor %}
{% endblock %}