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:
@@ -15,8 +15,13 @@ use App\Http\Controllers\Api\V1\MeController;
|
||||
use App\Http\Controllers\Api\V1\MemberController;
|
||||
use App\Http\Controllers\Api\V1\OrganisationController;
|
||||
use App\Http\Controllers\Api\V1\PersonController;
|
||||
use App\Http\Controllers\Api\V1\PersonTagController;
|
||||
use App\Http\Controllers\Api\V1\ShiftController;
|
||||
use App\Http\Controllers\Api\V1\TimeSlotController;
|
||||
use App\Http\Controllers\Api\V1\UserOrganisationTagController;
|
||||
use App\Models\FestivalSection;
|
||||
use App\Models\Organisation;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
@@ -54,15 +59,40 @@ Route::middleware('auth:sanctum')->group(function () {
|
||||
|
||||
// Events (nested under organisations)
|
||||
Route::apiResource('organisations.events', EventController::class)
|
||||
->only(['index', 'show', 'store', 'update']);
|
||||
->only(['index', 'show', 'store', 'update', 'destroy']);
|
||||
Route::get('organisations/{organisation}/events/{event}/children', [EventController::class, 'children']);
|
||||
Route::post('organisations/{organisation}/events/{event}/transition', [EventController::class, 'transition']);
|
||||
|
||||
// Organisation-scoped resources
|
||||
Route::prefix('organisations/{organisation}')->group(function () {
|
||||
Route::apiResource('crowd-types', CrowdTypeController::class)
|
||||
->except(['show']);
|
||||
Route::apiResource('companies', CompanyController::class)
|
||||
Route::apiResource('companies', CompanyController::class);
|
||||
|
||||
// Section categories (autocomplete)
|
||||
Route::get('section-categories', function (Organisation $organisation) {
|
||||
Gate::authorize('view', $organisation);
|
||||
|
||||
$categories = FestivalSection::query()
|
||||
->whereIn('event_id', $organisation->events()->select('id'))
|
||||
->whereNotNull('category')
|
||||
->distinct()
|
||||
->orderBy('category')
|
||||
->pluck('category');
|
||||
|
||||
return response()->json(['data' => $categories]);
|
||||
});
|
||||
|
||||
// Person tags (organisation settings)
|
||||
Route::apiResource('person-tags', PersonTagController::class)
|
||||
->except(['show']);
|
||||
Route::get('person-tag-categories', [PersonTagController::class, 'categories']);
|
||||
|
||||
// User tag assignments
|
||||
Route::get('users/{user}/tags', [UserOrganisationTagController::class, 'index']);
|
||||
Route::post('users/{user}/tags', [UserOrganisationTagController::class, 'store']);
|
||||
Route::put('users/{user}/tags/sync', [UserOrganisationTagController::class, 'sync']);
|
||||
Route::delete('users/{user}/tags/{userOrganisationTag}', [UserOrganisationTagController::class, 'destroy']);
|
||||
|
||||
// Invitations & Members
|
||||
Route::post('invite', [InvitationController::class, 'invite']);
|
||||
|
||||
Reference in New Issue
Block a user