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:
@@ -26,6 +26,7 @@ final class ShiftController extends Controller
|
||||
|
||||
$shifts = $section->shifts()
|
||||
->with(['timeSlot', 'location'])
|
||||
->withCount(['shiftAssignments as filled_slots' => fn ($q) => $q->where('status', 'approved')])
|
||||
->get();
|
||||
|
||||
return ShiftResource::collection($shifts);
|
||||
@@ -84,13 +85,11 @@ final class ShiftController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$autoApprove = $section->crew_auto_accepts;
|
||||
|
||||
$assignment = $shift->shiftAssignments()->create([
|
||||
'person_id' => $personId,
|
||||
'time_slot_id' => $shift->time_slot_id,
|
||||
'status' => $autoApprove ? 'approved' : 'approved',
|
||||
'auto_approved' => $autoApprove,
|
||||
'status' => 'approved',
|
||||
'auto_approved' => false,
|
||||
'assigned_by' => $request->user()->id,
|
||||
'assigned_at' => now(),
|
||||
'approved_at' => now(),
|
||||
|
||||
Reference in New Issue
Block a user