feat(contrats): Améliore la gestion des contrats et des paiements.

- Rend le champ details non obligatoire dans add.twig
- Ajoute une valeur par défaut pour isSigned et type dans les entités.
- Corrige l'ajout des lignes et options au contrat.
- Ajoute la création automatique du client Stripe.
```
This commit is contained in:
Serreau Jovann
2026-02-06 11:06:38 +01:00
parent a6e5d5f4a8
commit 7ff3538bcd
8 changed files with 114 additions and 34 deletions

View File

@@ -237,7 +237,7 @@
</div>
<div class="lg:col-span-2">
<label class="text-[9px] font-black text-slate-300 uppercase tracking-widest ml-1 mb-2 block">Détails</label>
<input type="text" name="options[{{ key }}][details]" value="{{ line.details }}" required class="w-full bg-slate-950/50 border-white/5 rounded-2xl text-white focus:ring-purple-500/20 focus:border-purple-500 transition-all py-3 px-5 text-sm font-mono">
<input type="text" name="options[{{ key }}][details]" value="{{ line.details }}" class="w-full bg-slate-950/50 border-white/5 rounded-2xl text-white focus:ring-purple-500/20 focus:border-purple-500 transition-all py-3 px-5 text-sm font-mono">
</div>
{# 2. PRIX 1J #}
<div class="lg:col-span-3">

View File

@@ -89,16 +89,6 @@
{% endif %}
</div>
{# CAUTION #}
<div class="flex items-center gap-2 px-3 py-2 bg-gray-50 rounded-xl border border-gray-100">
<span class="text-[10px] font-bold text-gray-400 uppercase">Caution</span>
{% if contratPaymentPay(contrat, 'caution') %}
<span class="text-[10px] font-black text-green-600 bg-green-100 px-2 py-0.5 rounded-lg uppercase tracking-tight">Réceptionnée</span>
{% else %}
<span class="text-[10px] font-black text-red-500 bg-red-100 px-2 py-0.5 rounded-lg uppercase tracking-tight">Manquante</span>
{% endif %}
</div>
{# SOLDE #}
<div class="flex items-center gap-2 px-3 py-2 bg-gray-50 rounded-xl border border-gray-100">
<span class="text-[10px] font-bold text-gray-400 uppercase">Solde</span>