{% extends "base.html" %} {% block title %}Planning — GMAO Collège{% endblock %} {% block content %}

Planning {% if mode == 'school' %}{{ year }}–{{ year + 1 }}{% else %}{{ year }}{% endif %}

{{ year-1 }} {{ year+1 }}

{{ stats.preventive_tasks }}

Tâches préventives

{{ stats.curative_interventions }}

Interventions curatives

{{ stats.admin_tasks }}

Tâches administratives

{{ stats.pending_items }}

Éléments planifiés
Week-end Vacances Jour férié Permanence Intervention Échéance préventive
{% set days = ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'] %}
{% for month in months %}
{{ month.name }} {{ month.year }}
Prévu {{ month.planned_hours }}{% if month.overtime_hours != '0h00' %} · +{{ month.overtime_hours }} sup.{% endif %}{% if month.delay_hours != '0h00' %} · -{{ month.delay_hours }} dû{% endif %}
{% for day in days %} {% endfor %} {% for week in month.weeks %} {% for day_info in week %} {% if day_info is none %} {% else %} {% set td_class = '' %} {% if day_info.is_permanence %} {% set td_class = 'table-success' %} {% elif day_info.is_holiday %} {% set td_class = 'holiday-day' %} {% elif day_info.is_vacation %} {% set td_class = 'table-dark' %} {% elif day_info.is_leave %} {% set td_class = 'table-warning' %} {% elif day_info.is_weekend %} {% set td_class = 'table-secondary' %} {% endif %} {% endif %} {% endfor %} {% endfor %}
{{ day }}
{% set date_str = day_info.date.strftime('%Y-%m-%d') %} {{ day_info.day }} {% if day_info.planned_hours != '0h00' %}Prévu {{ day_info.planned_hours }}{% endif %} {% if day_info.deviation_hours %}{{ day_info.deviation_hours }}{% endif %} {% if day_info.events %}
{% for event in day_info.events[:3] %} {% if event.start_time %}{{ event.start_time.strftime('%H:%M') }} {% endif %}{{ event.title[:18] }} {% endfor %} {% if day_info.events|length > 3 %} +{{ day_info.events|length - 3 }} autre(s) {% endif %}
{% endif %}
{% endfor %}
{% endblock %}