{% set active_page = 'dienstplan' %} {% extends 'base.html' %} {% block extra_css %} {% endblock %} {% block content %}

Dienstplan & Schichten

Wöchentliche Arbeitszeit- und Schichtplanung für das gesamte Personal

KW {{ current_kw }} • {{ week_dates[0].formatted }} – {{ week_dates[6].formatted }} {{ current_year }}
{% if not is_current_calendar_week %} Heute {% endif %}
{% for day in week_dates %} {% endfor %} {% set avatar_colors = [ 'linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)', 'linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%)', 'linear-gradient(135deg, #ec4899 0%, #be185d 100%)', 'linear-gradient(135deg, #10b981 0%, #047857 100%)', 'linear-gradient(135deg, #f59e0b 0%, #b45309 100%)', 'linear-gradient(135deg, #06b6d4 0%, #0e7490 100%)' ] %} {% for emp in employees_data %} {% set avatar_bg = avatar_colors[loop.index0 % 6] %} {% for day in emp.days %} {% endfor %} {% endfor %} {% if not employees_data %} {% endif %}
Personal
{{ day.day_de }} {{ day.formatted.split('.')[0]|int }}
Woche (Plan/Soll) Aktion
{% if emp.profilbild %} {{ emp.vorname }} {% else %}
{{ emp.vorname[:1] }}{{ emp.nachname[:1] }}
{% endif %}
{{ emp.nachname }}, {{ emp.vorname }}
Personal-Nr: #{{ emp.kart_id }}{% if emp.abteilung %} • {{ emp.abteilung }}{% endif %}
{% if day.absence %} {% set ap = day.absence.palette or pastel_palette.emerald %}
{{ day.absence.typ }}
{% elif day.is_frei and not day.shifts %}
Frei
{% endif %} {% for shift in day.shifts %} {% set sp = shift.palette or pastel_palette.sky %} {% if shift.schicht_name|lower == 'frei' or shift.schicht_name|lower == 'dienstfrei' %}
Dienstfrei
0h Frei
{% else %}
{{ shift.start_zeit }}-{{ shift.end_zeit }}
{{ shift.stunden }}h {{ shift.schicht_name if shift.schicht_name else "Dienst" }}
{% endif %} {% endfor %}
{{ emp.total_plan_hours }} h
Soll: {{ emp.soll_hours }} h
{% if emp.diff_hours > 0 %} +{{ emp.diff_hours }} h {% elif emp.diff_hours < 0 %} {{ emp.diff_hours }} h {% else %} ±0.0 h {% endif %}
{% if emp.email %} {% else %} — {% endif %}
Kein aktives Personal gefunden.
{% endblock %}