fix: cross_event section shifts use festival-level time slots in seeder
EHBO and Accreditatiebalie shifts referenced sub-event time slots (Vrijdag Early, Zaterdag Dag, etc.) but these cross_event sections belong to the parent festival. The dropdown fetches time slots for the festival event, so the sub-event time slot IDs had no matching items — causing raw ULIDs in the dropdown and validation failures. Added festival-level VOLUNTEER time slots mirroring the sub-event schedule, and pointed cross_event section shifts at those instead. Verified: all 81 shifts now reference time slots from the same event as their section (zero mismatches). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -307,7 +307,9 @@ class DevSeeder extends Seeder
|
||||
}
|
||||
}
|
||||
|
||||
// ── Festival-level time slots (5) ──
|
||||
// ── Festival-level time slots ──
|
||||
// CREW slots for operational planning (opbouw, nachtbewaking, afbraak)
|
||||
// VOLUNTEER slots for cross_event sections (EHBO, Accreditatie) that span all days
|
||||
|
||||
$fSlots = [];
|
||||
$fSlots['opbouw1'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Opbouw Dag 1', 'person_type' => 'CREW', 'date' => '2026-07-09', 'start_time' => '08:00', 'end_time' => '18:00', 'duration_hours' => 10.00]);
|
||||
@@ -315,6 +317,13 @@ class DevSeeder extends Seeder
|
||||
$fSlots['nacht_vr'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Nachtbewaking Vr→Za', 'person_type' => 'CREW', 'date' => '2026-07-10', 'start_time' => '02:00', 'end_time' => '08:00', 'duration_hours' => 6.00]);
|
||||
$fSlots['nacht_za'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Nachtbewaking Za→Zo', 'person_type' => 'CREW', 'date' => '2026-07-11', 'start_time' => '02:00', 'end_time' => '08:00', 'duration_hours' => 6.00]);
|
||||
$fSlots['afbraak'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Afbraak', 'person_type' => 'CREW', 'date' => '2026-07-13', 'start_time' => '08:00', 'end_time' => '18:00', 'duration_hours' => 10.00]);
|
||||
// Festival-level VOLUNTEER slots for cross_event sections (EHBO, Accreditatie)
|
||||
$fSlots['vr_early'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Vrijdag Early (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-10', 'start_time' => '14:00', 'end_time' => '18:00', 'duration_hours' => 4.00]);
|
||||
$fSlots['vr_avond'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Vrijdag Avond (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-10', 'start_time' => '18:00', 'end_time' => '02:00', 'duration_hours' => 8.00]);
|
||||
$fSlots['za_dag'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Zaterdag Dag (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-11', 'start_time' => '10:00', 'end_time' => '18:00', 'duration_hours' => 8.00]);
|
||||
$fSlots['za_avond'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Zaterdag Avond (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-11', 'start_time' => '18:00', 'end_time' => '02:00', 'duration_hours' => 8.00]);
|
||||
$fSlots['zo_dag'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Zondag Dag (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-12', 'start_time' => '10:00', 'end_time' => '18:00', 'duration_hours' => 8.00]);
|
||||
$fSlots['zo_avond'] = TimeSlot::create(['event_id' => $festival->id, 'name' => 'Zondag Avond (Festival)', 'person_type' => 'VOLUNTEER', 'date' => '2026-07-12', 'start_time' => '18:00', 'end_time' => '22:00', 'duration_hours' => 4.00]);
|
||||
|
||||
// ── Sub-event time slots ──
|
||||
|
||||
@@ -333,11 +342,11 @@ class DevSeeder extends Seeder
|
||||
$allShifts = [];
|
||||
$s = []; // named shifts for explicit assignments
|
||||
|
||||
// EHBO: 6 shifts across volunteer time slots
|
||||
// EHBO: 6 shifts using festival-level volunteer time slots
|
||||
foreach (['vr_early', 'vr_avond', 'za_dag', 'za_avond', 'zo_dag', 'zo_avond'] as $key) {
|
||||
$shift = Shift::create([
|
||||
'festival_section_id' => $ehbo->id,
|
||||
'time_slot_id' => $ts[$key]->id,
|
||||
'time_slot_id' => $fSlots[$key]->id,
|
||||
'title' => 'EHBO Post',
|
||||
'slots_total' => $key === 'za_dag' ? 4 : 3,
|
||||
'slots_open_for_claiming' => $key === 'za_dag' ? 0 : 2,
|
||||
@@ -375,11 +384,11 @@ class DevSeeder extends Seeder
|
||||
$s["terrein_{$key}"] = $shift;
|
||||
}
|
||||
|
||||
// Accreditatiebalie: 4 shifts
|
||||
// Accreditatiebalie: 4 shifts using festival-level volunteer time slots
|
||||
foreach (['vr_early', 'za_dag', 'zo_dag', 'za_avond'] as $key) {
|
||||
$shift = Shift::create([
|
||||
'festival_section_id' => $accreditatiebalie->id,
|
||||
'time_slot_id' => $ts[$key]->id,
|
||||
'time_slot_id' => $fSlots[$key]->id,
|
||||
'title' => 'Accreditatiemedewerker',
|
||||
'slots_total' => 3,
|
||||
'slots_open_for_claiming' => 2,
|
||||
|
||||
Reference in New Issue
Block a user