feat: festival/series model with sub-events, cross-event sections, tab navigation, SectionsShiftsPanel extraction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 11:15:19 +02:00
parent 11b9f1d399
commit 10bd55b8ae
40 changed files with 3087 additions and 1080 deletions

View File

@@ -125,6 +125,50 @@ class ShiftTest extends TestCase
$this->assertSoftDeleted('shifts', ['id' => $shift->id]);
}
public function test_store_missing_time_slot_id_returns_422(): void
{
Sanctum::actingAs($this->orgAdmin);
$response = $this->postJson("/api/v1/events/{$this->event->id}/sections/{$this->section->id}/shifts", [
'title' => 'Tapper',
'slots_total' => 4,
'slots_open_for_claiming' => 0,
]);
$response->assertUnprocessable()
->assertJsonValidationErrors('time_slot_id');
}
public function test_update_cross_org_returns_403(): void
{
$shift = Shift::factory()->create([
'festival_section_id' => $this->section->id,
'time_slot_id' => $this->timeSlot->id,
]);
Sanctum::actingAs($this->outsider);
$response = $this->putJson("/api/v1/events/{$this->event->id}/sections/{$this->section->id}/shifts/{$shift->id}", [
'title' => 'Hacked',
]);
$response->assertForbidden();
}
public function test_destroy_cross_org_returns_403(): void
{
$shift = Shift::factory()->create([
'festival_section_id' => $this->section->id,
'time_slot_id' => $this->timeSlot->id,
]);
Sanctum::actingAs($this->outsider);
$response = $this->deleteJson("/api/v1/events/{$this->event->id}/sections/{$this->section->id}/shifts/{$shift->id}");
$response->assertForbidden();
}
public function test_assign_creates_shift_assignment(): void
{
$shift = Shift::factory()->create([