@extends('layouts.admin') @section('title', 'Edit Event') @section('page-title', 'Edit Event') @section('content') @php // Check if event has participants (lock critical fields if yes) $hasParticipants = \App\Models\EventParticipant::where('event_id', $event->id)->exists(); $participantCount = \App\Models\EventParticipant::where('event_id', $event->id)->count(); @endphp
Edit Event ( Kindly fill all required fields.) @if($has_participants) {{ $participants_count }} registered - Categories & Fees locked @endif
@csrf
1
Event Details & Config
2
Categories
3
Participant Fees
@if($event->coverImage) Event Image @else No image @endif
*
Max file size: 300KB (JPG, PNG)
@php $allowedStateIds = $event->states()->pluck('state_id')->toArray(); // $lockedStateIds is now passed from controller @endphp {{-- DEBUG: Allowed State IDs from backend: {{ json_encode($allowedStateIds) }} --}} {{-- DEBUG: Locked State IDs from backend: {{ json_encode($lockedStateIds) }} --}}
{{-- Store pre-selected state IDs in a data attribute BEFORE Choices.js initialization --}} Type to search and select multiple states. @if(count($lockedStateIds) > 0) States with participants (๐Ÿ”’) cannot be removed. @endif Legend: โœ… Active Admin ๐Ÿ“ง Invitation Sent โฐ Link Expired โš ๏ธ Profile Incomplete ๐Ÿšซ No Admin
participant_slot_limit) style="display: none;" @endif> @if(!$hasParticipants) Official: 1 (standard) or 4 (Fed Cup style)
Open: Unlimited (leave empty)
@endif
@php // Check if any officials are registered for this event // Note: This will be implemented in Phase 4, for now defaulting to 0 $registeredOfficialsCount = 0; // TODO: EventOfficial::where('event_id', $event->id)->whereIn('status', ['pending', 'confirmed'])->count(); @endphp
@if($registeredOfficialsCount > 0) Cannot reduce below {{ $registeredOfficialsCount }} (currently registered officials) @else Minimum 1 official required. Can be adjusted anytime. @endif
Batch Code Generation
For Poomsae categories
requires_batch_codes ?? 0) ? 'checked' : '' }} style="width: 3em; height: 1.5em;">

Automatically generates unique batch codes (e.g., IND-1, PAIR-1, TEAM-1) for Poomsae registrations.

{{-- STEP 4 REMOVED: Officials register for free (no payment required) --}} @if(false) {{-- Step 4 disabled: official fees removed --}} @endif {{-- end disabled step 4 --}}
Cancel
Event Prefix (Permanent)
{{ $event->event_prefix ?? 'Not Generated' }}
@include('admin.events.partials.modals') @endsection @push('styles') @endpush @push('scripts') @endpush