Files
crewli/api/app/Http/Requests/Api/V1/StoreFestivalSectionRequest.php
bert.hausmans c21bc085e9 feat: registration section preferences with show_in_registration filtering and deduplication
Add show_in_registration and registration_description columns to festival_sections.
Registration form now shows deduplicated sections by name (across sub-events),
filtered by show_in_registration=true, grouped by category with card-based UI.
Section preferences use section_name instead of section_id.
Add GET/PUT registration-settings endpoints for festival-level bulk management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 20:03:54 +02:00

47 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Api\V1;
use App\Models\Event;
use Illuminate\Foundation\Http\FormRequest;
final class StoreFestivalSectionRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/** @return array<string, mixed> */
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'category' => ['nullable', 'string', 'max:50'],
'icon' => ['nullable', 'string', 'max:50'],
'sort_order' => ['nullable', 'integer', 'min:0'],
'type' => ['nullable', 'in:standard,cross_event'],
'crew_need' => ['nullable', 'integer', 'min:0'],
'crew_auto_accepts' => ['nullable', 'boolean'],
'crew_invited_to_events' => ['nullable', 'boolean'],
'added_to_timeline' => ['nullable', 'boolean'],
'responder_self_checkin' => ['nullable', 'boolean'],
'crew_accreditation_level' => ['nullable', 'string', 'max:50'],
'public_form_accreditation_level' => ['nullable', 'string', 'max:50'],
'timed_accreditations' => ['nullable', 'boolean'],
'show_in_registration' => ['nullable', 'boolean'],
'registration_description' => ['nullable', 'string', 'max:500'],
];
}
/** @return array<string, string> */
public function messages(): array
{
return [
'type.in' => 'Type moet standard of cross_event zijn.',
];
}
}