{% extends "base.html" %}
{% block title %}{{ equipment.name }} — C4{% endblock %}
{% block content %}<div class="container-fluid"><h1 class="h4">{{ equipment.name }}</h1><div class="card mb-3"><div class="card-body"><div class="row"><div class="col-md-3"><strong>Type</strong><br>{{ equipment.device_type or '—' }}</div><div class="col-md-3"><strong>Fabricant / modèle</strong><br>{{ equipment.manufacturer or '—' }} / {{ equipment.model_reference or '—' }}</div><div class="col-md-3"><strong>N° de série</strong><br>{{ equipment.serial_number or '—' }}</div><div class="col-md-3"><strong>Référence fournisseur</strong><br>{{ equipment.supplier_reference or '—' }}</div><div class="col-md-3 mt-3"><strong>IP / hostname</strong><br>{{ equipment.ip_address or '—' }} / {{ equipment.hostname or '—' }}</div><div class="col-md-3 mt-3"><strong>MAC</strong><br>{{ equipment.mac_address or '—' }}</div><div class="col-md-6 mt-3"><strong>Emplacement</strong><br>{{ equipment.full_path }}</div></div></div></div><h2 class="h5">Contrats</h2><ul>{% for assignment in assignments %}<li><a href="{{ url_for('c4.contract_detail', contract_id=assignment.contract_id) }}">{{ assignment.contract.name }}</a> — {{ assignment.entry_date }}{% if assignment.exit_date %} → {{ assignment.exit_date }}{% endif %}</li>{% else %}<li>Aucun contrat.</li>{% endfor %}</ul><h2 class="h5">Consommables compatibles</h2><ul>{% for link in links %}<li><a href="{{ url_for('c4.consumable_detail', consumable_id=link.consumable_id) }}">{{ link.consumable.name }}</a> — stock {{ link.consumable.quantity }}</li>{% else %}<li>Aucun consommable.</li>{% endfor %}</ul><h2 class="h5">Compteurs</h2><ul>{% for meter in equipment.meters %}<li>{{ meter.name }} — {{ meter.current_value }} {{ meter.unit }}</li>{% else %}<li>Aucun compteur.</li>{% endfor %}</ul></div>{% endblock %}
