Devis :
- Entity DevisLine (pos, title, description, priceHt) liee a Devis (OneToMany cascade/orphanRemoval)
- Champs ajoutes sur Devis : customer (ManyToOne), submissionId, state machine (created/send/accepted/refused/cancel), raisonMessage, totaux HT/TVA/TTC, updatedAt, setUpdatedAt public
- Relation Devis <-> Advert changee de ManyToOne a OneToOne nullable
- Vich Attribute (migration Annotation -> Attribute) pour unsignedPdf/signedPdf/auditPdf
- DevisController CRUD complet : create (form repeater lignes + boutons rapides TarificationService), edit, cancel (libere OrderNumber), generate-pdf, send, resend, create-advert, events
- DevisPdf (FPDF/FPDI) : header legacy (logo, num, date, client), body lignes, summary totaux, footer SITECONSEIL + pagination, champ signature DocuSeal sur page devis + derniere page CGV
- OrderNumberService : preview() et generate() reutilisent les OrderNumber non utilises (isUsed=false) en priorite
- OrderNumber::markAsUnused() ajoute
DocuSeal integration devis :
- DocuSealService : sendDevisForSignature (avec completed_redirect_url), resendDevisSignature (archive ancienne submission), getSubmitterSlug, downloadSignedDevis (sauvegarde via Vich UploadedFile test=true)
- WebhookDocuSealController : dispatch par doc_type devis/attestation, handleDevisEvent (form.completed -> STATE_ACCEPTED + download PDF signe/audit, form.declined -> STATE_REFUSED + raison)
- DocusealEvent entity pour tracer form.viewed/started/completed/declined en temps reel
- Page evenements admin /admin/devis/{id}/events avec badges et payload JSON
Signature client :
- DevisProcessController : page publique /devis/process/{id}/{hmac} securisee par HMAC, boutons Signer (redirect DocuSeal) / Refuser (motif optionnel)
- Pages confirmation : signed.html.twig (merci + recap) et refused.html.twig (confirmation refus + motif)
- Nelmio whitelist : signature.esy-web.dev + signature.siteconseil.fr
Avis de paiement :
- Entity AdvertLine (pos, title, description, priceHt) liee a Advert
- Advert refactorise : customer, state, totaux, raisonMessage, submissionId, advertFile (Vich mapping advert_pdf), lines collection, updatedAt
- AdvertController : generate-pdf, send (mail + PJ + lien paiement), resend (rappel), cancel (delie devis, libere OrderNumber), search Meilisearch
- AdvertPdf (FPDF/FPDI) : QR code Endroid pointant vers /order/{numOrder}, texte "Scannez pour payer"
- OrderPaymentController : page publique /order/{numOrder} avec detail prestations, totaux, options paiement (placeholder)
- Creation auto depuis devis signe : copie client, totaux, lignes, meme OrderNumber
Meilisearch :
- Index customer_devis et customer_advert avec searchable (numOrder, customerName, customerEmail, state) et filterable (customerId, state)
- CRUD indexation sur chaque action (create, edit, send, cancel, create-advert)
- Recherche AJAX dans tabs Devis et Avis avec debounce + dropdown glassmorphism
- Sync admin : boutons syncDevis / syncAdverts + compteurs dans /admin/sync
Emails :
- MailerService : VCF auto (fiche contact SARL SITECONSEIL) en PJ sur tous les mails, bloc HTML pieces jointes injecte automatiquement (exclut .asc/.p7z/smime) avec icone trombone + taille fichier
- Templates : devis_to_sign, devis_signed_client/admin (PJ signed+audit), devis_refused_client/admin, advert_send (PJ + bouton paiement), ndd_expiration
- TestMailCommand : option --force-dsn pour envoyer via un DSN SMTP specifique (test prod depuis dev)
Commande NDD :
- app:ndd:check : verifie expiration domaines <= 30j, envoie mail groupe a monitor@siteconseil.fr
- Cron quotidien 8h (docker + ansible)
Divers :
- Titles templates : CRM SITECONSEIL -> SARL SITECONSEIL (52 fichiers)
- VAULT_URL dev = https://kms.esy-web.dev (comme prod)
- app.js : initDevisLines (repeater + drag & drop), initTabSearch, toggle refus devis
- app.scss : styles drag & drop
- setasign/fpdi-fpdf installe pour fusion PDF
- 5 migrations Doctrine
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
66 lines
4.0 KiB
Twig
66 lines
4.0 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}SARL SITECONSEIL{% endblock %}
|
|
{% block description %}Connectez-vous au CRM SITECONSEIL pour acceder a votre espace client ou revendeur.{% endblock %}
|
|
|
|
{% block header %}
|
|
<header class="sticky top-0 z-50 glass-heavy" style="border-radius: 0;">
|
|
<div class="flex justify-center items-center h-16">
|
|
<a href="{{ path('app_home') }}" aria-label="CRM SITECONSEIL - Accueil">
|
|
<img class="h-10 md:h-12 w-auto" src="{{ 'logo_facture.png' | imagine_filter('logo') }}" alt="CRM SITECONSEIL" loading="eager">
|
|
</a>
|
|
</div>
|
|
</header>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
{% if app.user %}
|
|
<div class="page-container">
|
|
<h1 class="text-2xl font-bold heading-page mb-8">Tableau de bord</h1>
|
|
<p class="text-sm text-gray-600">Bienvenue, <strong>{{ app.user.fullName }}</strong>.</p>
|
|
</div>
|
|
{% else %}
|
|
<div class="flex items-center justify-center min-h-[calc(100vh-4rem)] px-4">
|
|
<div class="w-full max-w-md">
|
|
<div class="glass-heavy overflow-hidden">
|
|
<div class="glass-gold p-6 text-center" style="border-radius: 16px 16px 0 0; border-bottom: 1px solid rgba(250,191,4,0.3);">
|
|
<h1 class="text-2xl font-bold text-gray-900">CRM SITECONSEIL</h1>
|
|
<p class="text-sm text-gray-700/70 mt-1">Espace de gestion</p>
|
|
</div>
|
|
<div class="p-8">
|
|
<form method="post" action="{{ path('app_home') }}" class="flex flex-col gap-5">
|
|
<div>
|
|
<label for="email" class="block text-xs font-bold uppercase tracking-wider mb-2 text-gray-600">Email</label>
|
|
<input type="email" id="email" name="_username" required
|
|
class="input-glass w-full px-4 py-3 text-sm font-medium"
|
|
placeholder="votre@email.fr">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="password" class="block text-xs font-bold uppercase tracking-wider mb-2 text-gray-600">Mot de passe</label>
|
|
<input type="password" id="password" name="_password" required
|
|
class="input-glass w-full px-4 py-3 text-sm font-medium"
|
|
placeholder="••••••••">
|
|
</div>
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
|
|
<button type="submit" class="btn-gold w-full px-6 py-3 text-sm font-bold uppercase tracking-wider text-gray-900">
|
|
Connexion a mon espace
|
|
</button>
|
|
<a href="{{ path('app_forgot_password') }}" class="block text-center mt-1 text-xs text-gray-500 hover:text-indigo-600 transition-colors">Mot de passe oublie ?</a>
|
|
</form>
|
|
|
|
<div class="mt-6 pt-6 border-t border-gray-200/50">
|
|
<a href="{{ path('connect_keycloak') }}" class="btn-dark w-full flex items-center justify-center gap-2 px-6 py-3 text-sm font-bold uppercase tracking-wider">
|
|
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></svg>
|
|
Connexion SITECONSEIL
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|