Commit Graph

27 Commits

Author SHA1 Message Date
Serreau Jovann
15616167d0 Add attestation system with digital signature, public verification, and detailed ticket listing
- Create Attestation entity with reference, signature hash (HMAC-SHA256), event, user, payload
- Add migration Version20260326180000 for attestation table
- Save each attestation in DB with unique signature for tamper-proof verification
- Add public route /attestation/ventes/r/{reference} for QR code verification (short URL)
- Keep fallback /attestation/ventes/{hash} route for base64-signed verification
- Public page shows "Attestation conforme" with signature proof, no detailed data
- QR code on PDF now uses short reference URL instead of full base64 hash (scannable)
- Increase QR code resolution to 300px for better readability
- Display verification URL on PDF next to QR code

Attestation PDF improvements:
- Rename "ATTESTATION DE VENTES" to "ATTESTATION"
- Add two modes: "Attestation detaillee" (with ticket list) and "Attestation simple" (certification only)
- Simple mode: certifies figures are valid, only paid billets/votes confirmed by Stripe count
- Detailed mode: adds full ticket listing with reference, order number, billet name, buyer name
- No amounts displayed in either mode
- Gold color scheme (#fabf04) for headers, borders, table headers, summary box
- Larger text in QR verification box for readability

Scanner: ROLE_ROOT buyer tickets always validate at scan

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:13:40 +01:00
Serreau Jovann
822bf8915f Scanner: SSO login, 2 scan modes (camera/security key), sound feedback, order details, force validation, staff/exposant badges
- Add SSO login button to scanner PWA with Keycloak redirect flow via session state
- Add manual scan mode via security key (16 chars) alongside QR camera scan
- Add audio feedback: good (accepted), warning (already scanned), refused sounds
- Add unique scan counter per reference (no double counting same ticket)
- Add order details display in scan results (order number, email, total, items)
- Add force validation button for refused tickets (organizer/ROLE_ROOT only), sends email notification
- Add already_scanned warning only for same-day scans, exit_definitive only same day
- Staff and exposant tickets always validate regardless of state

API: ROLE_ROOT access to all events, categories, billets, and scan endpoints

- ROLE_ROOT bypasses ownership checks on all /api/live/* endpoints
- ROLE_ROOT can login via API (email/password and SSO)
- Scan API accepts securityKey parameter in addition to reference
- Scan response includes billetType, buyerEmail, and full order details with items

Event management: tickets tab, staff/exposant accreditations, attestation PDF

- Add Tickets tab listing all sold tickets with search, download PDF, resend email, cancel actions
- Add Staff/Exposant accreditation form in Invitations tab, generates dedicated non-buyable billet
- Add Attestation tab to generate sales certificate PDF with category/billet selection
- PDF billet template shows STAFF/EXPOSANT badge with distinct colors (black/purple)
- Exclude invitations from all financial stats (event stats, admin dashboard, organizer finances)
- Fix sold counts to exclude invitations in categories recap
- Use actual Stripe fee parameters instead of hardcoded values in commission calculations
- Add commission detail breakdown (E-Ticket + Stripe) in categories and stats tabs

Admin: download tickets for orders

- Add download button on admin orders page (single PDF or ZIP for multiple tickets)

Scanner PWA fixes: CSP (unpkg -> jsdelivr), service worker scope (/scanner/)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:50:42 +01:00
Serreau Jovann
b43c6bcbab Add Stripe account status display on event edit page for ROLE_ROOT
Show charges/payouts acceptance status and Stripe connection state
when an admin views an organizer's event. Pass owner to template
and use it for Stripe checks instead of app.user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:51:44 +01:00
Serreau Jovann
830e3359d9 Fix billet preview iframe overflow on mobile, mark responsive check done
- Preview iframe: overflow-x-auto container instead of fixed overflow
- All public pages verified for 320px: flex-wrap, responsive breakpoints OK

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 20:29:40 +01:00
Serreau Jovann
06dcc95a32 Add per-billet sales stats in stats tab
- Calculate sold count and revenue per billet from paid orders
- Display 'Ventes par billet' card between KPIs and orders list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 20:06:31 +01:00
Serreau Jovann
b472399878 Add view order button in stats, resend invitation button
- Stats tab: "Voir" button on each order linking to public order page
- Invitations tab: "Renvoyer" button to resend invitation email
- New route app_account_event_resend_invitation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 19:11:15 +01:00
Serreau Jovann
66ddc297b1 Fix invitation list (use dedicated variable), invitation email subject and content
- Pass invitations from controller instead of Twig filter on paginator
- Email subject: "Votre invitation" for invitations, "Vos billets" for purchases
- Email content: different intro text for invitations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 19:09:49 +01:00
Serreau Jovann
6005c438c4 Fix PHPStan config (path vs paths), label accessibility, ignore table headers in PDF
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:41:11 +01:00
Serreau Jovann
7167cb5fe0 Allow multiple billets in invitation form, dynamic add/remove lines
- Form sends items[] array with billet_id and quantity per line
- JS button to add more billet lines with remove button
- Controller iterates over items to create multiple BilletBuyerItems
- Same flow: all tickets generated with isInvitation=true

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:30:18 +01:00
Serreau Jovann
58d325f60c Add invitations tab: create free invitation with ticket generation and email
- New tab "Invitations" on event edit page
- Form: name, email, billet type, quantity
- Creates BilletBuyer with totalHT=0 (no payment), generates BilletOrders
  with isInvitation=true, sends email with PDF tickets
- List of sent invitations below the form

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:27:18 +01:00
Serreau Jovann
3ac47d9a57 Remove settings tab, fix duplicated stats tab link
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:23:40 +01:00
Serreau Jovann
03d14a643b Add stats tab with orders list, search, cancel and refund actions
- OrderIndexService: Meilisearch index order_event_{id} for order search
- Stats tab: 4 KPI cards (orders, tickets sold, CA HT, total percu)
- Orders list with KnpPaginator, search bar via Meilisearch
- Each order shows: number, status, date, buyer, items, total, payment
- Cancel order: sets status cancelled, invalidates all tickets
- Refund order: Stripe refund on connected account, sets status refunded,
  invalidates all tickets
- Orders indexed in Meilisearch after payment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:19:58 +01:00
Serreau Jovann
b32cc77e31 Add title attribute to billet preview iframe
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:14:45 +01:00
Serreau Jovann
179a0703f8 Add Billet entity, BilletDesign, ticket designer, CRUD billets, commissions
- Create Billet entity: name, position, priceHT, quantity (nullable=unlimited),
  isGeneratedBillet, hasDefinedExit, notBuyable, type (billet/reservation_brocante/vote),
  stripeProductId, description, picture (VichUploader), category (ManyToOne CASCADE)
- Create BilletDesign entity (OneToOne Event): accentColor, invitationTitle, invitationColor
- Billet CRUD: add/edit/delete with access control, Stripe product sync on connected account
- Billet reorder: drag & drop with position field, refactored sortable.js for both categories and billets
- Ticket designer tab (custom offer only): accent color, invitation title/color, live iframe preview
- A4 ticket preview: 4 zones (HG infos+billet, HD affiche, BG association, BD sortie+invitation), fake QR code SVG
- Commission calculator JS: live breakdown of E-Ticket fee, Stripe fee (1.5%+0.25EUR), net amount
- Sales recap on categories tab: qty sold, total HT, total commissions, total net
- DisableProfilerSubscriber: disable web profiler toolbar on preview iframe
- CSP: allow self in frame-src and frame-ancestors for preview iframe
- Flysystem: dedicated billets.storage for billet images
- Upload accept restricted to png/jpeg/webp/gif (no HEIC)
- Makefile: add force_sql_dev command
- CLAUDE.md: add rule to never modify existing migrations
- Consolidate all migrations into single Version20260321111125
- Tests: BilletTest (20), BilletDesignTest (6), DisableProfilerSubscriberTest (5),
  billet-designer.test.js (7), commission-calculator.test.js (7),
  AccountControllerTest billet CRUD tests (11)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:19:46 +01:00
Serreau Jovann
9290411652 Add isHidden to Category, category CRUD tests, coverage improvements
- Add isHidden field to Category entity with migration (DEFAULT false for existing rows)
- Add isHidden checkbox to edit category template and "Masquee" badge on category list
- Save isHidden in editCategory controller method
- Fix Category.isActive() indentation
- Create CategoryTest with full coverage (14 tests): defaults, setters, setEvent logic, isActive, isHidden
- Add category CRUD tests to AccountControllerTest: add/edit/delete/reorder categories with access control
- Add cookie-consent tests for dev env early return and Cloudflare tunnel script
- Exclude PayoutPdfService from phpunit coverage and SonarQube analysis

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:35:42 +01:00
Serreau Jovann
0358025fe7 Add category edit page, edit button, and drag & drop sortable with native HTML5
- Add /mon-compte/evenement/{id}/categorie/{categoryId}/modifier route (GET/POST)
- Create edit_category.html.twig with name and date fields
- Add edit button (pencil icon) on category list items
- Add sortable.js module: native HTML5 drag & drop with fetch reorder API
- Auto-correct endAt < startAt on category edit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:16:52 +01:00
Serreau Jovann
ca0527b0db Fix category dates: use event.endAt as default, auto-correct if endAt < startAt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:13:53 +01:00
Serreau Jovann
ba55315977 Fix category dates: ensure endAt is after startAt, use event.startAt as default end
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 23:11:45 +01:00
Serreau Jovann
42ded8fbbe Add Category entity, edit event tabs (info/categories/stats/settings), CRUD categories
- Create Category entity: name, position (sortable), event, startAt, endAt, isActive()
- Default endAt: event.startAt - 1 day
- Add 4 tabs on edit event page: Informations, Categories/Billets, Statistiques, Parametres
- Add routes: add category, delete category, reorder categories (JSON API)
- Categories sorted by position, drag handle for future Sortable.js
- Active/Inactive badge based on date range
- Add migration for category table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 22:51:25 +01:00
Serreau Jovann
6fab96ab44 Full mobile responsive (320px) and tablet (768px) support across all templates
- All text-[20rem] background text → text-[8rem] md:text-[20rem]
- All text-8xl → text-5xl md:text-8xl
- All text-5xl emojis → text-3xl md:text-5xl
- edit_event: w-full md:w-[80%], poster column w-full lg:w-[350px]
- account/index: tab bar overflow-x-auto, events table overflow-x-auto
- admin/events: table overflow-x-auto
- register: tab buttons overflow-x-auto
- error 404/500: responsive padding p-6 md:p-12
- base footer: flex-col sm:flex-row for bottom bar
- Add PWA bundle (spomky-labs/pwa-bundle) with composer require files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:11:02 +01:00
Serreau Jovann
f70f0c2af9 Add public events page, event detail route, copy URL button, organizer events list
- Add /evenements public page with Meilisearch search, KnpPaginator (12/page), event cards grid
- Add /evenement/{orgaSlug}/{id}-{eventSlug} public route with slug redirect
- Add Event::getSlug() method
- Update homepage stats with real event count
- Update organizer detail page to list their public events
- Update navbar: link Evenements to /evenements with active state
- Add copy URL button on edit event page (visible only when online)
- Add initCopyUrl() in app.js with clipboard API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:54:02 +01:00
Serreau Jovann
cf32225c9a Show full poster image with object-contain and max-height 350px
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:47:56 +01:00
Serreau Jovann
e18f79b2e5 Require Stripe validation to put event online, disable button and block route
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:47:31 +01:00
Serreau Jovann
0438185cd4 Force event poster height to 250px with object-cover
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:46:46 +01:00
Serreau Jovann
96b15239c5 Set edit event container to 80% width
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:45:57 +01:00
Serreau Jovann
61362096d8 Redesign edit event page: two-column layout, action buttons, poster display
- Left column: edit form (title, description, dates, address, image upload)
- Right column: sticky poster preview card with image or placeholder
- Top action bar: toggle online/offline, toggle secret/public, status badges
- Add routes: /mon-compte/evenement/{id}/en-ligne and /mon-compte/evenement/{id}/secret
- Remove is_online checkbox from form (replaced by dedicated toggle buttons)
- Meilisearch re-indexed on toggle actions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:42:08 +01:00
Serreau Jovann
146a0d4da0 Add event list with pagination, edit and delete actions in account page
- Display events table sorted by startAt ASC with status (en ligne/hors ligne)
- Add KnpPaginator for events (10 per page)
- Add edit event page (/mon-compte/evenement/{id}/modifier) with all fields + isOnline toggle
- Add delete event route (/mon-compte/evenement/{id}/supprimer) with confirmation
- Add Modifier/Supprimer buttons in events table
- Move Stripe warning outside the card
- Fix test to use fresh EntityManager for event assertion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:02:56 +01:00