✨ feat(Formules.php): Ajoute les propriétés de prix et la fonction slug. ✨ feat(ReserverController.php): Affiche les formules sur la page d'accueil. ♻️ refactor(Dashboard/FormulesController.php): Gère le statut et les prix. ✨ feat(templates/dashboard): Affiche les tarifs des formules. ```
72 lines
4.6 KiB
Twig
72 lines
4.6 KiB
Twig
{# SECTION 03 : FORMULAIRE TARIFICATION (AUTONOME) #}
|
|
<form action="{{ path('app_crm_formules_view', {id: formule.id}) }}" method="POST"
|
|
class="w-full backdrop-blur-2xl bg-white/5 border border-white/10 rounded-[2.5rem] p-8 shadow-2xl relative overflow-hidden mt-6">
|
|
|
|
{# Ligne décorative émeraude pour le "Money" #}
|
|
<div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-transparent via-emerald-500/40 to-transparent"></div>
|
|
|
|
<div class="flex items-center justify-between mb-8">
|
|
<h3 class="text-[10px] font-black text-emerald-400 uppercase tracking-[0.2em] flex items-center">
|
|
<span class="w-6 h-6 bg-emerald-500/10 rounded flex items-center justify-center mr-3 font-mono text-emerald-500">03</span>
|
|
Grille Tarifaire & Caution
|
|
</h3>
|
|
|
|
{# Badge de rappel du type #}
|
|
<span class="text-[9px] font-bold text-slate-500 uppercase px-3 py-1 bg-white/5 rounded-lg border border-white/10 italic">
|
|
Tarification dégressive
|
|
</span>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
|
|
{# Prix 1 Jour #}
|
|
<div class="space-y-2">
|
|
<label class="text-[10px] font-black text-slate-500 uppercase tracking-widest ml-1">Tarif 1 Jour</label>
|
|
<div class="relative">
|
|
<input type="number" step="0.01" name="price[1j]" value="{{ formule.price1j|default('0.00') }}"
|
|
class="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-5 pr-12 text-white font-bold focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all">
|
|
<span class="absolute right-5 top-1/2 -translate-y-1/2 text-[10px] font-black text-slate-600">€</span>
|
|
</div>
|
|
</div>
|
|
|
|
{# Prix 2 Jours #}
|
|
<div class="space-y-2">
|
|
<label class="text-[10px] font-black text-slate-500 uppercase tracking-widest ml-1">Tarif 2 Jours</label>
|
|
<div class="relative">
|
|
<input type="number" step="0.01" name="price[2j]" value="{{ formule.price2j|default('0.00') }}"
|
|
class="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-5 pr-12 text-white font-bold focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all">
|
|
<span class="absolute right-5 top-1/2 -translate-y-1/2 text-[10px] font-black text-slate-600">€</span>
|
|
</div>
|
|
</div>
|
|
|
|
{# Prix 5 Jours #}
|
|
<div class="space-y-2">
|
|
<label class="text-[10px] font-black text-slate-500 uppercase tracking-widest ml-1">Tarif 5 Jours</label>
|
|
<div class="relative">
|
|
<input type="number" step="0.01" name="price[5j]" value="{{ formule.price5j|default('0.00') }}"
|
|
class="w-full bg-white/5 border border-white/10 rounded-xl py-4 pl-5 pr-12 text-white font-bold focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all">
|
|
<span class="absolute right-5 top-1/2 -translate-y-1/2 text-[10px] font-black text-slate-600">€</span>
|
|
</div>
|
|
</div>
|
|
|
|
{# Caution #}
|
|
<div class="space-y-2">
|
|
<label class="text-[10px] font-black text-rose-400 uppercase tracking-widest ml-1 italic">Garantie (Caution)</label>
|
|
<div class="relative">
|
|
<input type="number" step="1" name="price[caution]" value="{{ formule.caution|default('0') }}"
|
|
class="w-full bg-rose-500/5 border border-rose-500/20 rounded-xl py-4 pl-5 pr-12 text-rose-500 font-black focus:ring-2 focus:ring-rose-500/50 outline-none transition-all">
|
|
<span class="absolute right-5 top-1/2 -translate-y-1/2 text-[10px] font-black text-rose-500/50">€</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{# Bouton de sauvegarde spécifique aux prix #}
|
|
<div class="flex justify-end">
|
|
<button type="submit" class="group flex items-center space-x-3 px-8 py-4 bg-emerald-600 hover:bg-emerald-500 text-white rounded-2xl transition-all shadow-lg shadow-emerald-900/20 active:scale-95">
|
|
<span class="text-[10px] font-black uppercase tracking-widest">Mettre à jour la tarification</span>
|
|
<svg class="w-4 h-4 transform group-hover:rotate-12 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</form>
|