{% extends "base.html" %}
{% block title %}Règles de relevé{% endblock %}
{% block content %}
<div class="container-fluid py-3"><div class="d-flex justify-content-between align-items-center mb-3"><h1 class="h3">Règles de relevé</h1><a class="btn btn-primary" href="{{ url_for('planning.new_meter_schedule') }}">Nouvelle règle</a></div>
<div class="table-responsive"><table class="table table-hover"><thead><tr><th>Compteur</th><th>Fréquence</th><th>Référence</th><th>Calendrier</th><th>Responsable</th><th>Durée</th><th>État</th></tr></thead><tbody>{% for schedule in schedules %}<tr><td>{{ schedule.meter.name }}</td><td>{{ schedule.frequency }}</td><td>{{ schedule.reference_date.strftime('%d/%m/%Y') }}</td><td>{{ 'Logement' if schedule.calendar_scope == 'housing' else 'Collège' }}</td><td>{{ schedule.assigned_to.full_name if schedule.assigned_to else 'Non attribué' }}</td><td>{{ schedule.duration_minutes }} min</td><td>{{ 'Active' if schedule.is_active else 'Inactive' }}</td></tr>{% else %}<tr><td colspan="7" class="text-muted">Aucune règle configurée.</td></tr>{% endfor %}</tbody></table></div></div>
{% endblock %}
