Preskoči na sadržaj

E3-F2: Individual Seat Status Change

Epic: E3: Seat Inventory Management

Size: S (Small)

Problem / Outcome

Admin changes status of a single seat with validation.

Scope

In-Scope:

  • PUT /admin/seats/{id}/status endpoint
  • Transition validation against rules
  • Reason required for change
  • Audit log entry creation

Out-of-Scope:

  • Bulk operations (separate feature)

Acceptance Criteria

  • AC1: Given valid transition, when admin changes status, then seat updated and logged
  • AC2: Given invalid transition, when admin attempts change, then error with valid options shown
  • AC3: Given locked seat (in cart), when admin attempts change, then warning displayed

Data Model Impact

Seat table:
- status (ENUM)
- last_modified_by (UUID, FK)
- last_modified_at (TIMESTAMP)

SeatAudit table:
- id (UUID, PK)
- seat_id (UUID, FK)
- from_status (ENUM)
- to_status (ENUM)
- reason (VARCHAR)
- changed_by (UUID, FK)
- created_at (TIMESTAMP)

Permissions/Roles

  • Admin (Inventory Manager)

How to Verify

npm test -- --grep "seat status change"

Expected: Valid changes work, invalid blocked, audit recorded.

Dependencies

Implementation Tasks

See E3: Seat Inventory Tasks

Doc References


Last Updated: January 2026