feat: profils par défaut par client + fix marge 0% + fix: suggest-slot ignore les créneaux déjà passés
Deploy via Portainer / deploy (push) Successful in 0s

This commit is contained in:
Jo
2026-07-06 20:02:44 +02:00
parent 907ee6116e
commit ab3f8a5afa
3 changed files with 137 additions and 23 deletions
+62 -5
View File
@@ -10,10 +10,11 @@
</div>
<div class="row">
<div class="col-md-6">
<div class="col-md-7">
<div class="card">
<div class="card-body">
<form method="POST">
<div class="mb-3">
<label class="form-label fw-semibold">Nom *</label>
<input type="text" name="name" class="form-control" required
@@ -26,9 +27,67 @@
</div>
<div class="mb-4">
<label class="form-label fw-semibold">Notes</label>
<textarea name="notes" class="form-control" rows="3">{{ client.notes if client else '' }}</textarea>
<textarea name="notes" class="form-control" rows="2">{{ client.notes if client else '' }}</textarea>
</div>
<div class="d-flex gap-2">
<hr>
<div class="mb-2">
<span class="fw-semibold"><i class="bi bi-bookmark-star me-1 text-secondary"></i>Profils par défaut</span>
<div class="form-text mb-3">Pré-sélectionnés automatiquement dans "Nouveau calcul" quand ce client est choisi.</div>
</div>
<div class="row g-3 mb-3">
<div class="col-md-6">
<label class="form-label">Profil machine</label>
<select name="default_machine_profile_id" class="form-select">
<option value="">— aucun —</option>
{% for p in machine_profiles %}
<option value="{{ p.id }}"
{% if client and client.default_machine_profile_id == p.id %}selected{% endif %}>
{{ p.name }}
</option>
{% endfor %}
</select>
</div>
<div class="col-md-6">
<label class="form-label">Profil manutention</label>
<select name="default_handling_profile_id" class="form-select">
<option value="">— aucun —</option>
{% for p in handling_profiles %}
<option value="{{ p.id }}"
{% if client and client.default_handling_profile_id == p.id %}selected{% endif %}>
{{ p.name }}
</option>
{% endfor %}
</select>
</div>
<div class="col-md-6">
<label class="form-label">Profil matière</label>
<select name="default_material_profile_id" class="form-select">
<option value="">— aucun —</option>
{% for p in material_profiles %}
<option value="{{ p.id }}"
{% if client and client.default_material_profile_id == p.id %}selected{% endif %}>
{{ p.name }}
</option>
{% endfor %}
</select>
</div>
<div class="col-md-6">
<label class="form-label">Profil tarif client</label>
<select name="default_pricing_profile_id" class="form-select">
<option value="">— aucun —</option>
{% for p in pricing_profiles %}
<option value="{{ p.id }}"
{% if client and client.default_pricing_profile_id == p.id %}selected{% endif %}>
{{ p.name }}
</option>
{% endfor %}
</select>
</div>
</div>
<div class="d-flex gap-2 mt-4">
<button type="submit" class="btn" style="background:#ff6b35;color:#fff">
<i class="bi bi-save me-1"></i>Enregistrer
</button>
@@ -40,5 +99,3 @@
</div>
</div>
{% endblock %}
{% block scripts %}{% endblock %}