E12-F2: Petrol Quota Portal¶
Epic: E12: Physical Sales (Petrol)
Size: M (Medium)
Problem / Outcome¶
Web interface for Petrol staff to process PIN-based sales. Petrol quota is configured like other quotas but requires a special identifier to enable PIN-based functionality.
Scope¶
In-Scope:
- PIN lookup interface
- Seat reservation (20 minute TTL)
- Identity verification confirmation
- Sale confirmation and ticket delivery
- Special quota type identifier for Petrol (enables PIN functionality)
Out-of-Scope:
- Direct ticket sales (PIN required)
- Staff training (out of scope)
Acceptance Criteria¶
- AC1: Staff enters PIN, system reserves seats for 20 minutes
- AC2: Staff confirms identity, system displays customer and ticket details
- AC3: Staff confirms sale, tickets delivered to customer app
Data Model Impact¶
PetrolReservation table:
- id (UUID, PK)
- pin_id (UUID, FK)
- staff_id (UUID, FK)
- seats (UUID[])
- status (ENUM: reserved, identity_verified, completed, cancelled, expired)
- reserved_at (TIMESTAMP)
- expires_at (TIMESTAMP)
- identity_verified_at (TIMESTAMP)
- completed_at (TIMESTAMP)
PetrolSale table:
- id (UUID, PK)
- reservation_id (UUID, FK)
- order_id (UUID, FK)
- payment_method (ENUM: cash, card)
- payment_reference (VARCHAR)
- total_amount (DECIMAL)
- processed_by (UUID, FK)
- processed_at (TIMESTAMP)
Permissions/Roles¶
- Petrol Staff (special role)
How to Verify¶
npm test -- --grep "petrol portal"
Expected: PIN flow works, reservation enforced.
Dependencies¶
Implementation Tasks¶
See E12: Physical Sales (Petrol) Tasks
Doc References¶
Last Updated: January 2026