feat(Product.php): Ajoute la liaison ManyToMany avec l'entité Options
 feat(Devis.php): Ajoute la propriété isNotAddCaution pour masquer la caution
♻️ refactor(.env): Met à jour les URLs de SIGN, STRIPE et CONTRAT
 feat(workflow.twig): Adapte le workflow et supprime l'étape de caution
 feat(NewDevisType.php): Ajoute un champ pour gérer
This commit is contained in:
Serreau Jovann
2026-02-04 09:10:41 +01:00
parent d993a545d9
commit d23e75034c
16 changed files with 488 additions and 35 deletions

View File

@@ -259,11 +259,85 @@
{{ form_end(form) }}
{# 04. DOCUMENTS TECHNIQUES (PDF) #}
{# 04. LISTE DES OPTIONS #}
{% if is_edit is defined and is_edit %}
<div class="backdrop-blur-xl bg-[#1e293b]/40 border border-white/5 rounded-[2.5rem] p-8 shadow-2xl mt-8">
<h3 class="text-lg font-bold text-white mb-6 flex items-center">
<span class="w-8 h-8 bg-indigo-600/20 text-indigo-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">04</span>
Options du produit
</h3>
{# LISTE DES OPTIONS #}
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-10">
{% for option in product.options %}
<div class="flex items-center justify-between p-4 bg-white/5 border border-white/5 rounded-2xl group hover:bg-white/10 transition-all">
<div class="flex items-center gap-4">
<div class="w-10 h-10 bg-indigo-500/20 text-indigo-500 rounded-xl flex items-center justify-center overflow-hidden">
{% if option.imageName %}
<img src="{{ vich_uploader_asset(option, 'imageFile') }}" class="w-full h-full object-cover">
{% else %}
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7" /></svg>
{% endif %}
</div>
<div>
<div class="text-xs font-black text-white uppercase tracking-wider">{{ option.name }}</div>
<div class="text-[9px] font-bold text-slate-500 uppercase tracking-tighter">
{{ option.priceHt }} € HT
</div>
</div>
</div>
<div class="flex gap-2">
<a data-turbo="false" href="{{ path('app_crm_product_edit', {'id': product.id, act:'deleteOption', idOption: option.id}) }}"
onclick="return confirm('Retirer cette option ?');"
class="p-2 text-slate-400 hover:text-rose-500 transition-colors" title="Retirer">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
</svg>
</a>
</div>
</div>
{% else %}
<div class="md:col-span-2 py-8 text-center border-2 border-dashed border-white/5 rounded-3xl">
<p class="text-[10px] font-black text-slate-600 uppercase tracking-[0.2em]">Aucune option liée</p>
</div>
{% endfor %}
</div>
<div class="h-px bg-white/5 w-full mb-10"></div>
{# FORMULAIRE D'AJOUT OPTION #}
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-end">
<div class="md:col-span-2 bg-slate-950/40 p-6 rounded-[2rem] border border-dashed border-white/10 group hover:border-indigo-500/30 transition-all">
<label class="text-[10px] font-black text-slate-300 uppercase tracking-widest mb-4 block text-center">Ajouter une option existante</label>
<div class="flex gap-4">
<div class="relative w-full flex items-center w-fulla">
<input type="hidden" id="selected-option-id">
<input type="text" id="selected-option-name"
class="w-full bg-slate-900/50 border-white/5 rounded-2xl text-white focus:ring-indigo-500/20 focus:border-indigo-500 transition-all py-4 pl-5 pr-12 font-bold text-sm"
placeholder="Rechercher une option...">
<button is="search-optionsproduct" type="button"
class="absolute right-2 p-2 bg-indigo-500/10 hover:bg-indigo-500 text-indigo-400 hover:text-white rounded-xl transition-all duration-300 group/search"
title="Rechercher">
Rechercher une option
</button>
</div>
<button is="product-add-option" type="button" data-turbo="false"
data-input-id="selected-option-id"
data-url="{{ path('app_crm_product_edit', {id: product.id, act: 'addOption'}) }}"
class="px-8 bg-indigo-600 hover:bg-indigo-500 text-white text-[10px] font-black uppercase tracking-widest rounded-2xl transition-all shadow-lg shadow-indigo-600/30 whitespace-nowrap">
Ajouter
</button>
</div>
</div>
</div>
</div>
{% endif %}
{# 05. DOCUMENTS TECHNIQUES (PDF) #}
{% if formDoc is defined %}
<div class="backdrop-blur-xl bg-[#1e293b]/40 border border-white/5 rounded-[2.5rem] p-8 shadow-2xl mt-8">
<h3 class="text-lg font-bold text-white mb-6 flex items-center">
<span class="w-8 h-8 bg-amber-600/20 text-amber-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">04</span>
<span class="w-8 h-8 bg-amber-600/20 text-amber-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">05</span>
Documents & Notices
</h3>
@@ -340,11 +414,11 @@
</div>
{% endif %}
{# 05. VIDEOS #}
{# 06. VIDEOS #}
{% if formVideo is defined %}
<div class="backdrop-blur-xl bg-[#1e293b]/40 border border-white/5 rounded-[2.5rem] p-8 shadow-2xl mt-8">
<h3 class="text-lg font-bold text-white mb-6 flex items-center">
<span class="w-8 h-8 bg-rose-600/20 text-rose-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">05</span>
<span class="w-8 h-8 bg-rose-600/20 text-rose-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">06</span>
Vidéos
</h3>
@@ -399,11 +473,11 @@
</div>
{% endif %}
{# 06. PHOTOS #}
{# 07. PHOTOS #}
{% if formPhoto is defined %}
<div class="backdrop-blur-xl bg-[#1e293b]/40 border border-white/5 rounded-[2.5rem] p-8 shadow-2xl mt-8">
<h3 class="text-lg font-bold text-white mb-6 flex items-center">
<span class="w-8 h-8 bg-cyan-600/20 text-cyan-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">06</span>
<span class="w-8 h-8 bg-cyan-600/20 text-cyan-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">07</span>
Photos Supplémentaires
</h3>
@@ -455,11 +529,11 @@
</div>
{% endif %}
{# 07. PÉRIODES BLOQUÉES #}
{# 08. PÉRIODES BLOQUÉES #}
{% if formBlocked is defined %}
<div class="backdrop-blur-xl bg-[#1e293b]/40 border border-white/5 rounded-[2.5rem] p-8 shadow-2xl mt-8">
<h3 class="text-lg font-bold text-white mb-6 flex items-center">
<span class="w-8 h-8 bg-rose-600/20 text-rose-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">07</span>
<span class="w-8 h-8 bg-rose-600/20 text-rose-500 rounded-lg flex items-center justify-center mr-3 text-[10px] font-black">08</span>
Indisponibilités & Blocages
</h3>