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

@@ -64,4 +64,31 @@ final class EventPolicy
->wherePivot('role', 'event_manager')
->exists();
}
public function delete(User $user, Event $event, ?Organisation $organisation = null): bool
{
if ($organisation && $event->organisation_id !== $organisation->id) {
return false;
}
if ($user->hasRole('super_admin')) {
return true;
}
// org_admin at organisation level
$isOrgAdmin = $event->organisation->users()
->where('user_id', $user->id)
->wherePivot('role', 'org_admin')
->exists();
if ($isOrgAdmin) {
return true;
}
// event_manager at event level
return $event->users()
->where('user_id', $user->id)
->wherePivot('role', 'event_manager')
->exists();
}
}