{% extends "base.html" %}{% block title %}Demande de travaux{% endblock %}{% block content %}<div class="container-fluid"><h1 class="h3">{{ item.title }}</h1><p>{{ item.description }}</p><form method="post" class="card card-body mb-3"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><label>Statut</label><select class="form-select mb-2" name="status">{% for status in statuses %}<option {% if item.status == status %}selected{% endif %}>{{ status }}</option>{% endfor %}</select><label>Entreprise</label><select class="form-select mb-2" name="company_id"><option value="">—</option>{% for x in companies %}<option value="{{ x.id }}" {% if item.company_id == x.id %}selected{% endif %}>{{ x.name }}</option>{% endfor %}</select><label>Service Département</label><select class="form-select mb-2" name="service_id"><option value="">—</option>{% for x in services %}<option value="{{ x.id }}" {% if item.service_id == x.id %}selected{% endif %}>{{ x.name }}</option>{% endfor %}</select><textarea class="form-control mb-2" name="comment" placeholder="Commentaire de suivi"></textarea><button class="btn btn-primary">Enregistrer</button></form><h2 class="h5">Historique</h2><ul>{% for event in item.events %}<li>{{ event.created_at|date_fmt }} — {{ event.new_status }}{% if event.comment %} : {{ event.comment }}{% endif %}</li>{% endfor %}</ul></div>{% endblock %}
