@push('styles') @endpush

{{ __('admin.edit_event_title') }}

@csrf @method('PUT')
@error('team_id')

{{ $message }}

@enderror
@error('type')

{{ $message }}

@enderror
@error('title')

{{ $message }}

@enderror
{{-- Gegner (nur für Spiel-Typen) --}}
@error('opponent')

{{ $message }}

@enderror
{{-- Ergebnis (nur für Spiel-Typen) --}}
:
@error('score_home')

{{ $message }}

@enderror @error('score_away')

{{ $message }}

@enderror
@error('start_date')

{{ $message }}

@enderror
@error('start_time')

{{ $message }}

@enderror
@error('status')

{{ $message }}

@enderror
{{-- Mindestanforderungen --}}

{{ __('admin.min_requirements') }}

{{-- Ort & Adress-Suche --}}
{{-- Ortsname mit bekannten Orten --}}
{{ __('admin.known_locations') }}
{{-- Photon Adress-Suche --}}

@error('address_text')

{{ $message }}

@enderror
{{-- Beschreibung mit Quill --}}
{!! app(\App\Services\HtmlSanitizerService::class)->sanitize(old('description_html', $event->description_html ?? '')) !!}
@error('description_html')

{{ $message }}

@enderror
{{-- Catering/Zeitnehmer-Zuweisungen (nicht für away_game/meeting) --}}
{{-- Dateien --}}
{{-- Bereits angehängte Dateien --}} @if ($event->files->isNotEmpty())

{{ __('admin.attached_files') }}

@foreach ($event->files as $file) @endforeach
@endif {{-- Aus Bibliothek anhängen --}}
@php $attachedIds = $event->files->pluck('id')->toArray(); @endphp @foreach ($fileCategories as $cat) @if ($cat->files->isNotEmpty())

{{ $cat->name }}

@foreach ($cat->files as $file) @if (!in_array($file->id, $attachedIds)) @endif @endforeach @endif @endforeach
{{-- Neue Datei hochladen --}}
{{ __('ui.cancel') }}
{{-- Teilnehmer-Verwaltung --}} @if ($event->participants->isNotEmpty()) @php $isMeeting = $event->type === \App\Enums\EventType::Meeting; $yesCount = $event->participants->where('status', \App\Enums\ParticipantStatus::Yes)->count(); $noCount = $event->participants->where('status', \App\Enums\ParticipantStatus::No)->count(); $openCount = $event->participants->where('status', \App\Enums\ParticipantStatus::Unknown)->count(); @endphp

{{ __('events.participants') }}

{{ __('events.confirmations') }} {{ __('events.rejections') }} {{ __('events.open_responses') }}
@if ($isMeeting) @foreach ($event->participants->sortBy(fn($p) => $p->user->name ?? '') as $participant)
{{ $participant->user->name ?? '–' }}
...
@endforeach @else @foreach ($event->participants->sortBy('player.last_name') as $participant)
{{ $participant->player->full_name ?? '–' }}
...
@endforeach @endif
@endif {{-- Quill JS --}}