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:
@@ -207,6 +207,7 @@ class ShiftTest extends TestCase
|
||||
'time_slot_id' => $this->timeSlot->id,
|
||||
'slots_total' => 4,
|
||||
'allow_overlap' => false,
|
||||
'status' => 'open',
|
||||
]);
|
||||
|
||||
$person = Person::factory()->create([
|
||||
@@ -229,6 +230,7 @@ class ShiftTest extends TestCase
|
||||
'time_slot_id' => $this->timeSlot->id,
|
||||
'slots_total' => 4,
|
||||
'allow_overlap' => false,
|
||||
'status' => 'open',
|
||||
]);
|
||||
|
||||
Sanctum::actingAs($this->orgAdmin);
|
||||
@@ -247,6 +249,7 @@ class ShiftTest extends TestCase
|
||||
'time_slot_id' => $this->timeSlot->id,
|
||||
'slots_total' => 4,
|
||||
'allow_overlap' => true,
|
||||
'status' => 'open',
|
||||
]);
|
||||
|
||||
$person = Person::factory()->create([
|
||||
@@ -269,6 +272,7 @@ class ShiftTest extends TestCase
|
||||
'time_slot_id' => $this->timeSlot->id,
|
||||
'slots_total' => 4,
|
||||
'allow_overlap' => true,
|
||||
'status' => 'open',
|
||||
]);
|
||||
|
||||
Sanctum::actingAs($this->orgAdmin);
|
||||
@@ -286,6 +290,7 @@ class ShiftTest extends TestCase
|
||||
'festival_section_id' => $this->section->id,
|
||||
'time_slot_id' => $this->timeSlot->id,
|
||||
'slots_total' => 1,
|
||||
'status' => 'open',
|
||||
]);
|
||||
|
||||
$person1 = Person::factory()->create([
|
||||
|
||||
Reference in New Issue
Block a user