E7: Quota Management - Tasks
Epic: E7: Quota Management
E7-F1: Quota Creation API
Feature: E7-F1: Quota Creation API
| Status |
Task |
Verification |
|
Create Quota database migration (id, email, match_id, sectors, quantity, discount_code, algorithm, expires_at, can_create_subquotas, delayed_payment, transfer_permission) |
Run migrations |
|
Create QuotaSeat database migration (quota_id, seat_id, status) |
Run migrations |
|
Implement POST /admin/quotas endpoint |
Creates quota |
|
Allocate seats immediately using NM or REDOM algorithm |
QuotaSeat records created |
|
Reserve allocated seats from public sale |
Seat status = Allocated |
|
Send email invitation with deeplink |
Email sent |
E7-F2: Quota CSV Bulk Import
Feature: E7-F2: Quota CSV Bulk Import
| Status |
Task |
Verification |
|
Implement POST /admin/quotas/import endpoint accepting CSV file |
File uploaded |
|
Validate CSV format (email, sectors, quantity) |
Invalid format returns error |
|
Validate each row (email format, sector exists, quantity available) |
Row errors reported |
|
Create quotas in batch for valid rows |
Quotas created |
|
Return error report with line numbers for invalid rows |
Line numbers in response |
E7-F3: Multi-Match Quota Import
Feature: E7-F3: Multi-Match Quota Import
| Status |
Task |
Verification |
|
Accept multiple match_ids in import request |
Param accepted |
|
Create quota for each match per CSV row |
Quotas created for all matches |
|
Link quotas by batch_id |
batch_id set |
E7-F4: Quota Web Portal Dashboard
Feature: E7-F4: Quota Web Portal Dashboard
| Status |
Task |
Verification |
|
Create quota holder login endpoint (same credentials as mobile) |
Login works |
|
Implement GET /quota-portal/dashboard endpoint |
Returns quota summary |
|
Display breakdown: ALLOCATED, RESERVED, SOLD, Delegated |
Counts accurate |
|
Display seat numbers for numbered matches |
Seats listed |
E7-F5: Quota Claiming Process
Feature: E7-F5: Quota Claiming Process
Backend API
| Status |
Task |
Verification |
|
Implement Step 1: POST /quota-portal/quotas/{id}/select-seats |
Seats selected |
|
Implement Step 2: POST /quota-portal/quotas/{id}/ticket-holders |
Info saved, status=RESERVED |
|
Implement Step 3: POST /quota-portal/quotas/{id}/payment |
Payment processed, status=SOLD |
|
Skip Step 3 if discount_code=GR (free) |
Free quota completes without payment |
Mobile App (Step 1 UI)
| Status |
Task |
Verification |
|
Display allocated tickets as cards in grid layout (not seat map) |
Cards displayed |
|
Each card shows sector, row, seat number |
Info visible on cards |
|
Implement tap-to-select/deselect for ticket cards |
Selection works |
|
Show selection summary at bottom of screen |
Summary updates |
|
For non-numbered matches, show quantity selector instead of cards |
Quantity input works |
Web Portal (Step 1 UI)
| Status |
Task |
Verification |
|
Display allocated tickets as cards in grid layout (not seat map) |
Cards displayed |
|
Each card shows sector, row, seat number |
Info visible on cards |
|
Implement click-to-select/deselect for ticket cards |
Selection works |
|
Show selection summary |
Summary updates |
|
For non-numbered matches, show quantity selector instead of cards |
Quantity input works |
E7-F6: Subquota Creation
Feature: E7-F6: Subquota Creation
Backend API
| Status |
Task |
Verification |
|
Check can_create_subquotas flag before allowing |
False returns 403 |
|
Implement POST /quota-portal/quotas/{id}/subquotas endpoint |
Creates subquota |
|
Select specific seats from parent quota |
Seats assigned to subquota |
|
Send email to sub-recipient with deeplink |
Email sent |
|
Send push notification to sub-recipient (if registered) |
Push received |
|
Implement GET /quota-portal/quotas/{id}/subquotas endpoint |
Returns subquota list |
|
Implement DELETE /quota-portal/subquotas/{id} endpoint (retract) |
ALLOCATED subquota cancelled |
|
Validate subquota status = ALLOCATED before allowing retract |
Non-ALLOCATED returns 400 |
|
Return retracted seats to parent quota available balance |
Seats available again |
Web Portal
| Status |
Task |
Verification |
|
Show "Send tickets to someone else" button (if can_create_subquotas=TRUE) |
Button visible |
|
Implement seat selection UI for subquota creation |
Seats selectable |
|
Implement recipient email input with validation |
Email validated |
|
Display subquota list with status badges |
List visible |
|
Implement "Retract" action for ALLOCATED subquotas |
Retract works |
|
Real-time sync with mobile app changes |
Changes reflected |
Mobile App
| Status |
Task |
Verification |
|
Show "Send tickets to someone else" button in Quota Dashboard (if can_create_subquotas=TRUE) |
Button visible |
|
Display available tickets as cards in grid layout |
Cards displayed |
|
Each card shows sector, row, seat number |
Info visible |
|
Implement tap-to-select/deselect for ticket cards |
Selection works |
|
Show selection summary at bottom |
Summary updates |
|
Implement recipient email input screen |
Email input works |
|
For non-numbered matches, show quantity selector |
Quantity input works |
|
Display subquota list in Quota Dashboard |
List visible |
|
Show subquota status (ALLOCATED → RESERVED → SOLD) |
Status accurate |
|
Implement "Retract" action for ALLOCATED subquotas |
Retract works |
|
Real-time sync with web portal changes |
Changes reflected |
E7-F7: Quota Cancellation
Feature: E7-F7: Quota Cancellation
| Status |
Task |
Verification |
|
Implement DELETE /admin/quotas/{id}?option=all_unused |
ALLOCATED + RESERVED cancelled |
|
Implement DELETE /admin/quotas/{id}?option=unfulfilled_only |
Only ALLOCATED cancelled |
|
Return cancelled seats to inventory |
Seat status = Available |
|
Send cancellation notification to quota holder |
Notification sent |
Last Updated: January 2026