feat: redesign dark futuriste (Luca) — thème cyan/volt, sidebar dark, JetBrains Mono + README

This commit is contained in:
Luca
2026-03-15 21:24:59 +01:00
parent 97ae64caf0
commit c8b704216d
12 changed files with 1552 additions and 691 deletions
+45 -28
View File
@@ -1,51 +1,68 @@
{% extends "base.html" %}
{% block title %}{% if intervention %}Modifier{% else %}Nouvelle{% endif %} intervention - GarageManager{% endblock %}
{% block title %}{% if intervention %}Modifier{% else %}Nouvelle{% endif %} intervention GarageManager{% endblock %}
{% block content %}
<div class="mb-8">
<a href="/interventions" class="text-slate-500 hover:text-slate-700 text-sm flex items-center gap-1 mb-4"><i class="fas fa-arrow-left"></i> Retour</a>
<h2 class="text-2xl font-bold text-slate-800">{% if intervention %}Modifier l'intervention{% else %}Nouvelle intervention{% endif %}</h2>
<a href="/interventions" class="back-link"><i class="fas fa-arrow-left"></i> Retour aux interventions</a>
<div class="page-header">
<h1 class="page-title">
<i class="fas fa-{% if intervention %}edit{% else %}plus-circle{% endif %} text-electric" style="margin-right:0.5rem"></i>
{% if intervention %}Modifier l'intervention{% else %}Nouvelle intervention{% endif %}
</h1>
</div>
<div class="bg-white rounded-xl shadow p-8 max-w-2xl">
<form method="post" class="space-y-4">
<div class="card" style="max-width:680px">
<form method="post" style="display:flex;flex-direction:column;gap:1.25rem">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Véhicule *</label>
<select name="vehicule_id" required class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">
<option value="">-- Sélectionner un véhicule --</option>
<label>Véhicule *</label>
<select name="vehicule_id" required>
<option value=""> Sélectionner un véhicule </option>
{% for v in vehicules %}
<option value="{{ v.id }}" {% if (intervention and intervention.vehicule_id == v.id) or preselect_vehicule == v.id %}selected{% endif %}>{{ v.label }}</option>
{% endfor %}
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Description *</label>
<textarea name="description" rows="2" required placeholder="Ex: Vidange + filtre à huile, Changement courroie de distribution..." class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">{{ intervention.description if intervention else '' }}</textarea>
<label>Description *</label>
<textarea name="description" rows="2" required placeholder="Ex: Vidange + filtre à huile, Changement courroie de distribution">{{ intervention.description if intervention else '' }}</textarea>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="grid grid-2">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Statut</label>
<select name="statut" class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">
<option value="en_attente" {% if not intervention or intervention.statut == 'en_attente' %}selected{% endif %}>⏳ En attente</option>
<option value="en_cours" {% if intervention and intervention.statut == 'en_cours' %}selected{% endif %}>🔧 En cours</option>
<option value="termine" {% if intervention and intervention.statut == 'termine' %}selected{% endif %}>✅ Terminé</option>
</select>
<label>Date de l'intervention</label>
<input name="date_intervention" type="date" value="{{ intervention.date_intervention if intervention and intervention.date_intervention else '' }}">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Main d'œuvre ()</label>
<input name="cout_main_oeuvre" type="number" step="0.01" min="0" value="{{ intervention.cout_main_oeuvre if intervention else '0' }}" class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">
<label>Kilométrage (km)</label>
<input name="kilometrage_intervention" type="number" value="{{ intervention.kilometrage_intervention if intervention and intervention.kilometrage_intervention else '' }}" placeholder="85000" class="mono">
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Technicien</label>
<input name="technicien" value="{{ intervention.technicien if intervention else '' }}" placeholder="Nom du technicien / garage" class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">
<div class="grid grid-2">
<div>
<label>Main d'œuvre (€)</label>
<input name="cout_main_oeuvre" type="number" step="0.01" min="0" value="{{ intervention.cout_main_oeuvre if intervention else '0' }}" class="mono">
</div>
<div>
<label>Technicien / Garage</label>
<input name="technicien" value="{{ intervention.technicien if intervention else '' }}" placeholder="Nom du garage, soi-même…">
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Notes</label>
<textarea name="notes" rows="3" placeholder="Observations, prochaine révision prévue, problèmes restants..." class="w-full border border-gray-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-orange-300">{{ intervention.notes if intervention else '' }}</textarea>
<label>Notes</label>
<textarea name="notes" rows="3" placeholder="Observations, prochaine révision, problèmes restants">{{ intervention.notes if intervention else '' }}</textarea>
</div>
<div class="flex gap-3 pt-4">
<button type="submit" class="bg-orange-500 text-white px-6 py-2 rounded-lg hover:bg-orange-600 transition text-sm font-medium">Enregistrer</button>
<a href="/interventions" class="text-slate-500 px-6 py-2 rounded-lg border border-gray-200 hover:bg-gray-50 text-sm">Annuler</a>
<div style="display:flex;gap:0.75rem;padding-top:0.5rem;border-top:1px solid var(--border)">
<button type="submit" class="btn-primary">
<i class="fas fa-save"></i> Enregistrer
</button>
<a href="/interventions" class="btn-secondary">Annuler</a>
</div>
</form>
</div>
{% endblock %}