feat: allow organizer overbooking with confirmation dialog
Remove capacity and status validation from organizer assign flow so organizers can intentionally overbook shifts. Log overbooked assignments for audit trail. Volunteer claims still enforce hard limits. Frontend shows a warning banner when a shift is full and requires confirmation before overbooking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -289,7 +289,7 @@ class ShiftAssignmentWorkflowTest extends TestCase
|
||||
$response->assertCreated();
|
||||
}
|
||||
|
||||
public function test_assign_rejected_when_capacity_full(): void
|
||||
public function test_assign_allows_overbooking_when_capacity_full(): void
|
||||
{
|
||||
$shift = $this->createOpenShift(['slots_total' => 1]);
|
||||
|
||||
@@ -310,7 +310,13 @@ class ShiftAssignmentWorkflowTest extends TestCase
|
||||
['person_id' => $this->person->id],
|
||||
);
|
||||
|
||||
$response->assertUnprocessable();
|
||||
$response->assertCreated();
|
||||
|
||||
$this->assertDatabaseHas('shift_assignments', [
|
||||
'shift_id' => $shift->id,
|
||||
'person_id' => $this->person->id,
|
||||
'status' => 'approved',
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_assign_rejected_with_conflict(): void
|
||||
|
||||
@@ -284,7 +284,7 @@ class ShiftTest extends TestCase
|
||||
$response->assertCreated();
|
||||
}
|
||||
|
||||
public function test_assign_full_shift_returns_422(): void
|
||||
public function test_assign_full_shift_allows_overbooking(): void
|
||||
{
|
||||
$shift = Shift::factory()->create([
|
||||
'festival_section_id' => $this->section->id,
|
||||
@@ -317,7 +317,13 @@ class ShiftTest extends TestCase
|
||||
'person_id' => $person2->id,
|
||||
]);
|
||||
|
||||
$response->assertUnprocessable();
|
||||
$response->assertCreated();
|
||||
|
||||
$this->assertDatabaseHas('shift_assignments', [
|
||||
'shift_id' => $shift->id,
|
||||
'person_id' => $person2->id,
|
||||
'status' => 'approved',
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_claim_no_claimable_slots_returns_422(): void
|
||||
|
||||
Reference in New Issue
Block a user