{% extends "base.html" %} {% block title %}Planning {{ room.name }} — GMAO{% endblock %} {% block content %}

Planning : {{ room.name }}

{% if room.room_type %}Type : {{ room.room_type.name }}{% endif %} {% if room.building %} | 📍 {{ room.building.name }}{% endif %}

{% if room.room_type and room.room_type.is_teaching %}
{% endif %} Retour aux plannings
Semaine du {{ week_start.strftime('%d/%m/%Y') }} au {{ week_end.strftime('%d/%m/%Y') }}
Planning interne résolu
{% if db_by_day %}
{% set days = ['Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche'] %} {% for day_num in [0, 1, 2, 3, 4, 5, 6] %} {% set day_date = week_start + timedelta(days=day_num) %} {% if day_num in db_by_day %} {% for s in db_by_day[day_num] %} {% endfor %} {% else %} {% endif %} {% endfor %}
{{ days[day_num] }} {{ day_date.strftime('%d/%m') }}
{{ s.start_time }} {{ s.subject or '-' }} {{ s.teacher or '-' }} {{ s.class_name or '-' }} {% if s.source == 'pronote' %}Mis à jour par Pronote{% elif s.source == 'import' %}Importé{% else %}Saisi manuellement{% endif %}{% if s.protected %}
Conservé lors des synchronisations{% endif %}{% if s.conflict_note %}
Conflit à résoudre
{{ s.conflict_note }}{% endif %}
Pas de cours
{% else %}

Aucun créneau interne pour cette semaine.
Vous pouvez saisir des créneaux manuellement sans Pronote.
{% endif %}
Source Pronote
{% if pronote_connected %} Connecté {% else %} Hors ligne {% endif %}
{% if pronote_connected %}
{% set days = ['Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche'] %} {% for day_num in [0, 1, 2, 3, 4, 5, 6] %} {% set day_date = week_start + timedelta(days=day_num) %} {% if day_num in pronote_by_day %} {% for p in pronote_by_day[day_num] %} {% endfor %} {% else %} {% endif %} {% endfor %}
{{ days[day_num] }} {{ day_date.strftime('%d/%m') }}
{{ p.heure }} {{ p.matiere }} {{ p.prof }} {{ p.classe }}
Pas de cours
{% else %}

Pronote n’est pas configuré ou momentanément indisponible.
Le planning interne reste utilisable et conserve les dernières données connues.
{% endif %}
{% if room.room_type and room.room_type.is_teaching %}
Synchronisation PRONote

Le planning en direct est mis à jour automatiquement depuis PRONote. Pour importer les données localement, cliquez sur "Importer 3 semaines depuis PRONote".

{% endif %}
{% endblock %}