feat(tickets): ticket QR codes, attendee naming and consent, door and venue check-in (add-event-tickets) #89

Merged
ngqile merged 13 commits from add-event-tickets into main 2026-12-04 10:31:31 +00:00
Owner

Implements OpenSpec change add-event-tickets, the second of two ticketing changes (design approved 2026-12-04).

What

  • Each ticket on a Paid order gets a code and the public page /t/<code>. The page shows a QR code, plus a staff view with a Valid, Already checked in or Not valid banner and a Check in button.
  • On the order page /o/<token>, the buyer names each attendee. Naming gives the ticket a new code, and it is refused once the ticket is checked in or cancelled.
  • An attendee can give consent on the ticket page or at the door, which makes them an event lead with source Ticket.
  • Ticket emails carry a QR PNG from mobile-api, using the new dependency com.google.zxing:core. Staff can resend a ticket from the order detail.
  • On ticketed events, venue self check-in accepts a paid ticket holder or a registered invited guest. Everyone else is asked to show their ticket, with no walk-in form.
  • The Guests card adds three counts: tickets awaiting payment, tickets paid and tickets checked in.
  • Release note: docs/deployment.md section 14. SQL is in the change folder: 01-ticket-attendees.sql before deploy, 02-ticket-labels.sql after, and 99-rollback.sql.

Fixed during the live check

  • The event leads list crashed for any event that has a ticket buyer lead, because source TICKET had no label. This bug was already on main since add-event-ticket-orders.
  • Order detail rows now show each ticket's attendee and check-in time. Resend is hidden once a ticket is checked in.

Existing tests modified (no assertion weakened)

  • design-tokens.test.ts: allowlists bg-white for the QR quiet zone on /t/[code].
  • event-leads/[eventUuid]/page.test.tsx: adds a test for the Ticket source label.
  • routeGuard.test.ts: adds /t public-path cases.
  • AdminTicketControllerTest: handler count goes from 12 to 13 for the new resend endpoint.
  • PublicInviteServiceTest: adds 2 tests (SHOW_TICKET, TICKETS_ONLY).
  • TicketOrderExpiryAndMailTest: the mailer constructor now takes TicketRepository (wiring only).
  • TicketOrderStaffServiceTest: adds an attendee and check-in test for the detail view.

Verification

  • Counter, mobile-api and gateway: mvn -T 1C verify exits 0.
  • Portal: vitest exits 0 (2119 passed), tsc 0, lint 0 errors.
  • Playwright on the local stack (sign-in form and clicks; the buyer, ticket and venue links opened as their emailed or QR entry points):
    • naming a ticket gives it a new link and the old one becomes not valid;
    • the QR PNG renders, and a signed-out visit stays on the public page;
    • consent creates a lead with source Ticket;
    • staff check-in works, and a rescan shows "Already checked in";
    • a cancelled ticket shows "Not valid: ticket cancelled";
    • an unnamed ticket at the door is refused without a name and contact, then checks in;
    • at the venue, a stranger gets "show your ticket" and the buyer self check-in works;
    • the counts are correct (1 awaiting, 2 paid, 2 checked in), and resend works.
  • Not reachable: an unpaid ticket at the door, because Awaiting orders have no codes. It is covered by the page tests.
  • Not checked: email delivery (no Mailjet keys locally), and a staff view for another company (only a super admin exists locally).

CI is expected to fail until the solvway artifacts are available.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs

Implements OpenSpec change `add-event-tickets`, the second of two ticketing changes (design approved 2026-12-04). ## What - Each ticket on a Paid order gets a code and the public page `/t/<code>`. The page shows a QR code, plus a staff view with a Valid, Already checked in or Not valid banner and a Check in button. - On the order page `/o/<token>`, the buyer names each attendee. Naming gives the ticket a new code, and it is refused once the ticket is checked in or cancelled. - An attendee can give consent on the ticket page or at the door, which makes them an event lead with source Ticket. - Ticket emails carry a QR PNG from mobile-api, using the new dependency `com.google.zxing:core`. Staff can resend a ticket from the order detail. - On ticketed events, venue self check-in accepts a paid ticket holder or a registered invited guest. Everyone else is asked to show their ticket, with no walk-in form. - The Guests card adds three counts: tickets awaiting payment, tickets paid and tickets checked in. - Release note: `docs/deployment.md` section 14. SQL is in the change folder: `01-ticket-attendees.sql` before deploy, `02-ticket-labels.sql` after, and `99-rollback.sql`. ## Fixed during the live check - The event leads list crashed for any event that has a ticket buyer lead, because source `TICKET` had no label. This bug was already on main since add-event-ticket-orders. - Order detail rows now show each ticket's attendee and check-in time. Resend is hidden once a ticket is checked in. ## Existing tests modified (no assertion weakened) - `design-tokens.test.ts`: allowlists `bg-white` for the QR quiet zone on `/t/[code]`. - `event-leads/[eventUuid]/page.test.tsx`: adds a test for the Ticket source label. - `routeGuard.test.ts`: adds `/t` public-path cases. - `AdminTicketControllerTest`: handler count goes from 12 to 13 for the new resend endpoint. - `PublicInviteServiceTest`: adds 2 tests (SHOW_TICKET, TICKETS_ONLY). - `TicketOrderExpiryAndMailTest`: the mailer constructor now takes TicketRepository (wiring only). - `TicketOrderStaffServiceTest`: adds an attendee and check-in test for the detail view. ## Verification - Counter, mobile-api and gateway: `mvn -T 1C verify` exits 0. - Portal: vitest exits 0 (2119 passed), tsc 0, lint 0 errors. - Playwright on the local stack (sign-in form and clicks; the buyer, ticket and venue links opened as their emailed or QR entry points): - naming a ticket gives it a new link and the old one becomes not valid; - the QR PNG renders, and a signed-out visit stays on the public page; - consent creates a lead with source Ticket; - staff check-in works, and a rescan shows "Already checked in"; - a cancelled ticket shows "Not valid: ticket cancelled"; - an unnamed ticket at the door is refused without a name and contact, then checks in; - at the venue, a stranger gets "show your ticket" and the buyer self check-in works; - the counts are correct (1 awaiting, 2 paid, 2 checked in), and resend works. - Not reachable: an unpaid ticket at the door, because Awaiting orders have no codes. It is covered by the page tests. - Not checked: email delivery (no Mailjet keys locally), and a staff view for another company (only a super admin exists locally). CI is expected to fail until the solvway artifacts are available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
ngqile added 13 commits 2026-12-04 10:31:28 +00:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
ngqile merged commit 96ab8e6f5b into main 2026-12-04 10:31:31 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ngqile/co-lite#89