Preskoči na sadržaj

E9-F6: Away Match PDF Ticket Handling

Epic: E9: Ticket Management & Delivery

Size: M (Medium)

Problem / Outcome

Handle external PDF tickets for away matches.

Scope

In-Scope:

  • Admin uploads PDFs from away venue
  • Match PDFs to orders
  • Mass email distribution
  • App display with "External Ticket Required" badge

Out-of-Scope:

  • PDF generation

Acceptance Criteria

  • AC1: Admin uploads PDFs and matches to orders
  • AC2: Mass email sends PDF to each ticket holder
  • AC3: App shows "External Ticket Required" badge, QR disabled

Data Model Impact

Ticket table:
- external_pdf_url (VARCHAR, nullable)
- external_ticket_required (BOOLEAN)
- pdf_delivered_at (TIMESTAMP)

AwayTicketPDF table:
- id (UUID, PK)
- match_id (UUID, FK)
- file_name (VARCHAR)
- storage_url (VARCHAR)
- ticket_id (UUID, FK, nullable) - linked when matched
- uploaded_by (UUID, FK)
- uploaded_at (TIMESTAMP)

PDFDistributionBatch table:
- id (UUID, PK)
- match_id (UUID, FK)
- total_pdfs (INTEGER)
- distributed_count (INTEGER)
- status (ENUM: pending, processing, completed)
- created_at (TIMESTAMP)

Permissions/Roles

  • Admin (for upload)
  • Ticket holder (for view)

How to Verify

npm test -- --grep "away PDF tickets"

Expected: PDFs distributed, app shows correct state.

Dependencies

Implementation Tasks

See E9: Ticket Management Tasks

Doc References


Last Updated: January 2026