Preskoči na sadržaj

E7-F6: Subquota Creation

Epic: E7: Quota Management

Size: M (Medium)

Problem / Outcome

Quota holders with permission delegate seats to sub-recipients.

Scope

In-Scope:

  • Create subquota via mobile app ("Send tickets to someone else" CTA)
  • Create subquota via web portal ("Send tickets to someone else" CTA)
  • Select tickets to delegate (cards in grid for numbered, quantity for non-numbered)
  • Enter recipient email
  • Validation of delegation permission
  • Email notification to sub-recipient with deeplink
  • Push notification to sub-recipient (if registered user)
  • View subquota list with status (ALLOCATED, RESERVED, SOLD)
  • Retract unclaimed subquotas (status = ALLOCATED only)
  • Dual-channel sync (changes from mobile/web reflect in real-time)

Out-of-Scope:

  • Multi-level delegation

Acceptance Criteria

  • AC1: Given can_create_subquotas=TRUE, then "Send tickets to someone else" button visible (mobile and web)
  • AC2: Mobile app displays available tickets as cards in grid for selection
  • AC3: Web portal displays available seats for selection
  • AC4: For non-numbered matches, user enters quantity to delegate
  • AC5: Subquota created with selected seats and recipient email
  • AC6: Sub-recipient receives email with deeplink to claim
  • AC7: Sub-recipient receives push notification (if registered user)
  • AC8: Quota holder can view subquota list with status on both channels
  • AC9: Quota holder can retract subquota with ALLOCATED status only
  • AC10: Changes sync in real-time between mobile app and web portal

Data Model Impact

Subquota table:
- id (UUID, PK)
- parent_quota_id (UUID, FK)
- recipient_email (VARCHAR)
- recipient_name (VARCHAR)
- seats (UUID[])
- status (ENUM: pending, claimed, expired, cancelled)
- created_at (TIMESTAMP)
- expires_at (TIMESTAMP)

SubquotaSeat table:
- id (UUID, PK)
- subquota_id (UUID, FK)
- quota_seat_id (UUID, FK)

Permissions/Roles

  • Quota Holder with delegation permission (can_create_subquotas=TRUE)

How to Verify

npm test -- --grep "subquota creation"

Expected: Subquota created, seats delegated, email sent.

Dependencies

Implementation Tasks

See E7: Quota Management Tasks

Doc References


Last Updated: January 2026