Files
stundenfuchs/app/templates/pages/month.html
T
maddin 6fbd1bb3c2
CI / checks (push) Has been cancelled
chore: initialize public repository
2026-03-22 12:57:09 +00:00

47 lines
2.8 KiB
HTML

{% 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/month_header_bar.html" import month_header_bar with context %}
{% from "ui/week_group_header.html" import week_group_header with context %}
{% from "ui/week_group_card_mobile.html" import week_group_card_mobile 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 %}Monatsansicht{% endblock %}
{% block page_class %}month-page{% endblock %}
{% block content %}
{% set month_names = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"] %}
{% set return_to = request.url.path ~ ('?' ~ request.url.query if request.url.query else '') %}
{% set month_prev_url = '/month?month=' ~ previous_month.strftime('%Y-%m') ~ '&view=' ~ view_mode %}
{% set month_next_url = '/month?month=' ~ next_month.strftime('%Y-%m') ~ '&view=' ~ view_mode %}
<div class="month-view-shell">
{% call month_header_bar(month_prev_url, month_next_url, month_names[month_start.month - 1] ~ ' ' ~ month_start.year) %}
{{ icon_link('/entry/new?date=' ~ month_start.isoformat(), '/static/icons/add.svg', 'Tag hinzufügen') }}
{{ icon_link('/bulk-entry?from=' ~ month_start.isoformat() ~ '&to=' ~ month_end.isoformat(), '/static/icons/batch.svg', 'Mehrfacheingabe') }}
{{ icon_link('/export?from=' ~ month_start.isoformat() ~ '&to=' ~ month_end.isoformat(), '/static/icons/export.svg', 'Export') }}
{% endcall %}
{{ kpi_bar([
{'label': 'IST', 'value': ('%.2f'|format(month_ist / 60) )|replace('.00', '')},
{'label': 'SOLL', 'value': ('%.2f'|format(month_soll / 60))|replace('.00', '')},
{'label': 'DELTA', 'value': ('%.2f'|format(month_delta / 60))|replace('.00', ''), 'value_class': 'negative' if month_delta < 0 else 'positive'},
{'label': 'KUMULIERT', 'value': ('%.2f'|format(header_cumulative_minutes / 60))|replace('.00', ''), 'value_class': 'negative' if header_cumulative_minutes < 0 else 'positive'}
], 'kpi-bar--month') }}
{{ workhours_target_warning_banner(workhours_target_warning) }}
<section class="week-group-list">
{% for week in weeks %}
{% call week_group_card_mobile(week, csrf_token, return_to) %}
{{ week_group_header(week, csrf_token, return_to) }}
<div class="day-list day-list--month">
{% for day in week.days %}
{{ day_row(day, csrf_token, weekday_name_de(day.date) ~ ', ' ~ day.date.strftime('%d.%m.%Y'), return_to, 'month') }}
{% endfor %}
</div>
{% endcall %}
{% endfor %}
</section>
</div>
{% endblock %}