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

@@ -45,6 +45,7 @@ final class Shift extends Model
return [
'is_lead_role' => 'boolean',
'allow_overlap' => 'boolean',
'end_date' => 'date',
'events_during_shift' => 'array',
'slots_total' => 'integer',
'slots_open_for_claiming' => 'integer',
@@ -93,7 +94,13 @@ final class Shift extends Model
protected function filledSlots(): Attribute
{
return Attribute::get(fn () => $this->shiftAssignments()->where('status', 'approved')->count());
return Attribute::get(function () {
if (array_key_exists('filled_slots', $this->attributes)) {
return (int) $this->attributes['filled_slots'];
}
return $this->shiftAssignments()->where('status', 'approved')->count();
});
}
protected function fillRate(): Attribute