```
✨ feat(Product.php): Ajoute la relation avec ProductReserve. ✨ feat(DevisSubscriber.php): Crée un subscriber pour l'envoi de devis. ✨ feat(Devis.php): Ajoute la relation avec ProductReserve. ✨ feat: Crée le template de mail pour la notification de signature. ✨ feat(DevisSend.php): Crée l'événement DevisSend. ✨ feat(Customer.php): Ajoute la relation avec ProductReserve. 🐛 fix(SignatureController.php): Corrige la gestion de la signature complétée. ✨ feat(DevisController.php): Ajoute la relance de signature et pagination. ✨ feat: Crée le template de mail pour l'envoi du devis à signer. ✨ feat: Crée le template de mail pour la confirmation de signature. ✨ feat(Client.php): Gère la création et le suivi de la signature DocuSeal. ✨ feat(DevisPdfService.php): Intègre les champs Docuseal. ✨ feat(list.twig): Affiche la liste des devis avec actions et statuts. ✨ feat: Crée la page de succès de signature. ✨ feat(StripeExtension.php): Ajoute le filtre totalQuoto pour calculer le total HT. ```
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em]">Client</th>
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em]">Date</th>
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em]">Statut</th>
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em] text-center">Total TTC</th>
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em] text-center">Total HT</th>
|
||||
<th class="px-6 py-5 text-[10px] font-black text-slate-500 uppercase tracking-[0.2em] text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -66,57 +66,89 @@
|
||||
'draft': 'text-slate-400 bg-slate-500/10 border-slate-500/20',
|
||||
'created_waitsign': 'text-amber-400 bg-amber-500/10 border-amber-500/20',
|
||||
'refusée': 'text-rose-400 bg-rose-500/10 border-rose-500/20',
|
||||
'signed': 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20',
|
||||
'signée': 'text-emerald-400 bg-emerald-500/10 border-emerald-500/20'
|
||||
} %}
|
||||
|
||||
{% set statusLabels = {
|
||||
'draft': 'Brouillon',
|
||||
'crée': 'Créé',
|
||||
'envoyée': 'Envoyé',
|
||||
'created_waitsign': 'Attente Signature',
|
||||
'refusée': 'Refusé',
|
||||
'signed': 'Signé',
|
||||
'signée': 'Signé'
|
||||
} %}
|
||||
|
||||
{% set currentStatus = quote.state|lower %}
|
||||
|
||||
<span class="px-3 py-1.5 rounded-lg border text-[8px] font-black uppercase tracking-[0.15em] whitespace-nowrap {{ statusClasses[currentStatus] ?? 'text-slate-400 bg-slate-500/10 border-slate-500/20' }}">
|
||||
{% if currentStatus == 'en attends de signature' %}
|
||||
{% if currentStatus == 'created_waitsign' %}
|
||||
<span class="inline-block w-1.5 h-1.5 rounded-full bg-amber-500 mr-1.5 animate-pulse"></span>
|
||||
{% elseif currentStatus == 'signée' %}
|
||||
{% elseif currentStatus == 'signed' or currentStatus == 'signée' %}
|
||||
<span class="inline-block w-1.5 h-1.5 rounded-full bg-emerald-500 mr-1.5 shadow-[0_0_5px_#10b981]"></span>
|
||||
{% endif %}
|
||||
{{ statusLabels[currentStatus] ?? currentStatus }}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
{# MONTANT #}
|
||||
<td class="px-6 py-4 text-center">
|
||||
<span class="text-sm font-black text-white">
|
||||
{{ 0|number_format(2, ',', ' ') }}€
|
||||
{{ (quote|totalQuoto)|number_format(2, ',', ' ') }}€
|
||||
</span>
|
||||
</td>
|
||||
|
||||
{# ACTIONS #}
|
||||
<td class="px-6 py-4 text-right">
|
||||
<div class="flex items-center justify-end space-x-2">
|
||||
{# Modifier #}
|
||||
<a href="{{ path('app_crm_devis_add', {id: quote.id}) }}" class="p-2 bg-blue-600/10 hover:bg-blue-600 text-blue-500 hover:text-white rounded-xl transition-all border border-blue-500/20 shadow-lg shadow-blue-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
|
||||
</a>
|
||||
|
||||
{# PDF #}
|
||||
<a href="{{ path('app_crm_devis_add', {id: quote.id}) }}" target="_blank" class="p-2 bg-emerald-600/10 hover:bg-emerald-600 text-emerald-500 hover:text-white rounded-xl transition-all border border-emerald-500/20 shadow-lg shadow-emerald-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" /></svg>
|
||||
</a>
|
||||
{# Renvoyer lien de signature #}
|
||||
{% if quote.state == "created_waitsign" %}
|
||||
<a href="{{ path('app_crm_devis', {resend: quote.id}) }}"
|
||||
title="Renvoyer le lien de signature"
|
||||
class="p-2 bg-indigo-600/10 hover:bg-indigo-600 text-indigo-500 hover:text-white rounded-xl transition-all border border-indigo-500/20 shadow-lg shadow-indigo-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# Delete #}
|
||||
<a href="{{ path('app_crm_devis_add', {id: quote.id}) }}?_token={{ csrf_token('delete' ~ quote.id) }}"
|
||||
data-turbo-method="post"
|
||||
data-turbo-confirm="Confirmer la suppression du devis {{ quote.num }} ?"
|
||||
class="p-2 bg-rose-500/10 hover:bg-rose-600 text-rose-500 hover:text-white rounded-xl transition-all border border-rose-500/20">
|
||||
<svg class="w-4 h-4" 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>
|
||||
{# Modifier : Interdit si signé #}
|
||||
{% if quote.state != "signed" and quote.state != "signée" %}
|
||||
<a href="{{ path('app_crm_devis_add', {id: quote.id}) }}" class="p-2 bg-blue-600/10 hover:bg-blue-600 text-blue-500 hover:text-white rounded-xl transition-all border border-blue-500/20 shadow-lg shadow-blue-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" /></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# PDF Conditionnel #}
|
||||
{% if quote.state == "signed" or quote.state == "signée" %}
|
||||
{# PDF Signé #}
|
||||
<a download="SIGN_{{ quote.num }}.pdf" href="{{ vich_uploader_asset(quote, 'devisSignFile') }}" title="Télécharger le devis signé" target="_blank" class="p-2 bg-emerald-600/10 hover:bg-emerald-600 text-emerald-500 hover:text-white rounded-xl transition-all border border-emerald-500/20 shadow-lg shadow-emerald-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /></svg>
|
||||
</a>
|
||||
{# Certificat Audit #}
|
||||
<a download="AUDIT_{{ quote.num }}.pdf" href="{{ vich_uploader_asset(quote, 'devisAuditFile') }}" title="Télécharger le certificat d'audit" target="_blank" class="p-2 bg-purple-600/10 hover:bg-purple-600 text-purple-500 hover:text-white rounded-xl transition-all border border-purple-500/20 shadow-lg shadow-purple-600/5">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
</a>
|
||||
{% else %}
|
||||
{# PDF Brouillon #}
|
||||
<a download="{{ quote.num }}.pdf" href="{{ vich_uploader_asset(quote,'devisDocuSealFile') }}" target="_blank" class="p-2 bg-slate-600/10 hover:bg-slate-600 text-slate-500 hover:text-white rounded-xl transition-all border border-slate-500/20">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" /></svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{# Delete : Interdit si signé #}
|
||||
{% if quote.state != "signed" and quote.state != "signée" %}
|
||||
<a href="{{ path('app_crm_devis_add', {id: quote.id}) }}?_token={{ csrf_token('delete' ~ quote.id) }}"
|
||||
data-turbo-method="post"
|
||||
data-turbo-confirm="Confirmer la suppression du devis {{ quote.num }} ?"
|
||||
class="p-2 bg-rose-500/10 hover:bg-rose-600 text-rose-500 hover:text-white rounded-xl transition-all border border-rose-500/20">
|
||||
<svg class="w-4 h-4" 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>
|
||||
{% else %}
|
||||
<div title="Un devis signé ne peut être supprimé" class="p-2 bg-slate-800/30 text-slate-600 rounded-xl border border-white/5 cursor-not-allowed">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user