@push('styles') @endpush

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

@csrf @method('PUT') @if ($event->isPartOfSeries())
{{ __('admin.series_hint', ['count' => $event->followingSeriesEvents()->count()]) }}
@endif
@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
{{-- Wiederholung (nur Training) --}}

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

{{ __('admin.recurrence_max_warning', ['max' => 52]) }}
{{-- Mindestanforderungen --}}

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

@if (\App\Models\Setting::isFeatureEnabled('catering'))
@endif @if (\App\Models\Setting::isFeatureEnabled('timekeepers'))
@endif
{{-- 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) --}} @if (\App\Models\Setting::isFeatureEnabled('catering') || \App\Models\Setting::isFeatureEnabled('timekeepers'))
@endif {{-- 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 --}}
@if ($event->isPartOfSeries() && $event->followingSeriesEvents()->count() > 0) {{-- Serien-Event: Modal-Dialog beim Speichern --}}

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

{{ __('admin.save_series_description', ['count' => $event->followingSeriesEvents()->count()]) }}

@else @endif {{ __('ui.cancel') }} {{-- Löschen-Button --}} @if ($event->isPartOfSeries() && $event->followingSeriesEvents()->count() > 0)

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

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

@csrf @method('DELETE')
@csrf @method('DELETE')
@else
@csrf @method('DELETE')
@endif
{{-- 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 {{-- Spielerstatistik (nur Spieltypen mit zugesagten Spielern) --}} @if (\App\Models\Setting::isFeatureEnabled('player_stats') && $event->type->isGameType()) @php $confirmedPlayers = $event->participants ->where('status', \App\Enums\ParticipantStatus::Yes) ->whereNotNull('player_id') ->sortBy(fn($p) => $p->player->last_name ?? ''); @endphp @if ($confirmedPlayers->isNotEmpty())

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

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

@csrf
@foreach ($confirmedPlayers as $participant) @php $pid = $participant->player_id; $stat = $playerStatsMap[$pid] ?? null; @endphp @endforeach
{{ __('admin.nav_players') }} {{ __('events.stats_position') }} {{ __('events.stats_goalkeeper') }} {{ __('events.stats_shots_on_goal') }} {{ __('events.stats_saves') }} {{ __('events.stats_shots') }} {{ __('events.stats_goals') }} 7m-W 7m-T {{ __('events.stats_yellow_cards') }} {{ __('events.stats_two_min') }} {{ __('events.stats_playing_time_short') }} {{ __('events.stats_note') }}
{{ $participant->player->full_name }}
@endif @endif {{-- Quill JS --}}