{% extends "base.html" %} {% block title %}{{ contract.name }} - Contrat GMAO{% endblock %} {% block content %}
| Tâche / lot | Périodicité | Équipements / périmètre | Échéances |
|---|---|---|---|
| {{ task.tache or 'Tâche sans nom' }} {{ task.lot.name if task.lot else 'Lot non défini' }} | {{ task.periodicite or (task.jours_entre_interventions|string + ' jours' if task.jours_entre_interventions else 'À définir') }} | {% if task.scope_mode == 'manual' %}Sélection manuelle ({{ task.equipment_scope|length }}){% else %}Équipements actifs du lot{% endif %} | {% set occurrences = covered_occurrences|selectattr('lot_task_id','equalto',task.id)|list %}{{ occurrences|length }} occurrence(s){% if occurrences %} Dernière : {{ occurrences[0].scheduled_date.strftime('%d/%m/%Y') if occurrences[0].scheduled_date else '—' }} {% endif %} |
Aucune tâche préventive n'est encore rattachée à ce contrat.
{% endif %}| Date / fenêtre | Mode | Statut | Compte rendu | |
|---|---|---|---|---|
| {{ visit.scheduled_date.strftime('%d/%m/%Y') }}{% if visit.window_end %} → {{ visit.window_end.strftime('%d/%m/%Y') }}{% endif %}{% if visit.start_time %} {{ visit.start_time.strftime('%H:%M') }}{% if visit.end_time %}–{{ visit.end_time.strftime('%H:%M') }}{% endif %} {% endif %} | {{ visit.display_mode }}{% if visit.accompaniment_mode != 'none' %} Accompagnement : {{ visit.accompaniment_minutes or ('toute la durée' if visit.accompaniment_mode == 'full' else 'à définir') }} {% endif %} | {{ visit.status|replace('_',' ') }} | {{ visit.report or '—' }} | {% if visit.status == 'passage_libre' %}{% elif visit.status not in ('realisee','non_venue') %}{% endif %} |
| Aucune visite générée | ||||
| Signe le | {{ contract.signed_date.strftime('%d/%m/%Y') if contract.signed_date else '—' }} |
| Date de debut | {{ contract.start_date.strftime('%d/%m/%Y') if contract.start_date else '—' }} |
| Date de fin | {% if contract.end_date %} {{ contract.end_date.strftime('%d/%m/%Y') }} {% if contract.days_until_expiry is not none %} {% if contract.days_until_expiry < 0 %}Expire {% elif contract.days_until_expiry <= 90 %}{{ contract.days_until_expiry }}j restants {% else %}({{ contract.days_until_expiry }}j){% endif %} {% endif %} {% else %}Duree indeterminee{% endif %} |
| Visites extérieures | {% if contract.visit_interval_days %}Tous les {{ contract.visit_interval_days }} jours · prochaine visite {{ contract.next_visit_date.strftime('%d/%m/%Y') if contract.next_visit_date else 'à planifier' }}{% else %}—{% endif %} |
| Tacite reconduction | {% if contract.tacit_renewal %}Oui (tous les {{ contract.renewal_period_days }} jours) {% else %}Non{% endif %} |
| Delai de preavis | {{ contract.notice_period_days }} jours avant la fin{% if not contract.notice_period_days %}—{% endif %} |
| Date limite preavis | {% if contract.notice_deadline_calculated %} {{ contract.notice_deadline_calculated.strftime('%d/%m/%Y') }} {% if contract.must_send_notice_now %}URGENT{% endif %} {% else %}—{% endif %} |
{{ contract.notes }}
{% endif %}