{% extends "base.html" %}
{% block title %}Contrats photocopieurs — GMAO{% endblock %}
{% block content %}
<div class="container-fluid">
  <div class="d-flex justify-content-between align-items-center mb-3"><h1 class="h4">Contrats photocopieurs</h1><a class="btn btn-primary" href="{{ url_for('c4.new_contract') }}">Nouveau contrat</a></div>
  <div class="table-responsive table-responsive-stack"><table class="table table-sm table-striped"><thead><tr><th>Contrat</th><th>Fournisseur</th><th>Durée</th><th>Anniversaire</th><th>État</th><th></th></tr></thead><tbody>
  {% for contract in contracts %}<tr><td data-label="Contrat"><a href="{{ url_for('c4.contract_detail', contract_id=contract.id) }}">{{ contract.name }}</a>{% if contract.reference %}<small class="text-muted d-block">{{ contract.reference }}</small>{% endif %}</td><td data-label="Fournisseur">{{ contract.supplier.name }}</td><td data-label="Durée">{{ contract.start_date }} → {{ contract.end_date }}</td><td data-label="Anniversaire">{{ '%02d/%02d'|format(contract.anniversary_day, contract.anniversary_month) }}</td><td data-label="État">{{ contract.status }}</td><td></td></tr>{% else %}<tr><td colspan="6">Aucun contrat.</td></tr>{% endfor %}
  </tbody></table></div>
</div>
{% endblock %}
