feat: shift assignment workflow with claim, approve, reject, cancel, and bulk approve

Implements the complete ShiftAssignment lifecycle:
- ShiftAssignmentStatus enum with allowed transitions
- ShiftAssignmentService with claim/assign/approve/reject/cancel/bulkApprove
- ShiftAssignmentController with event-scoped endpoints
- ShiftAssignmentPolicy (organizer + volunteer self-cancel)
- VolunteerAvailability model, controller, and sync endpoint
- Refactored ShiftController to delegate to service layer
- 31 workflow tests covering all paths and multi-tenancy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 17:00:56 +02:00
parent 303280286f
commit 0cdc192239
21 changed files with 1830 additions and 77 deletions

View File

@@ -541,7 +541,7 @@ class FestivalEventTest extends TestCase
]);
// Create a shift on the sub-event section using festival time slot
$shift = Shift::factory()->create([
$shift = Shift::factory()->open()->create([
'festival_section_id' => $section->id,
'time_slot_id' => $festivalTimeSlot->id,
'slots_total' => 5,
@@ -566,7 +566,7 @@ class FestivalEventTest extends TestCase
'event_id' => $this->subEvent->id,
]);
$shift2 = Shift::factory()->create([
$shift2 = Shift::factory()->open()->create([
'festival_section_id' => $section2->id,
'time_slot_id' => $festivalTimeSlot->id,
'slots_total' => 5,