{{-- resources/views/admin/competitors/national_records.blade.php --}} @extends('admin.layouts.app') @section('content')
@include('admin.competitors._header_stats')

Rekor Pesaing (International/Luar Records)

Daftar rekor yang dipegang oleh kompetitor/pesaing dari luar daerah atau internasional.

{{ date('d M Y') }}
@foreach($ageGroups as $index => $age) @php $tabSlug = Str::slug($age); @endphp
@php $hasData = false; @endphp @foreach($categories as $category) @foreach($category->disciplines as $discipline) @if(isset($records[$age][$discipline->id])) @php $hasData = true; $recGroup = $records[$age][$discipline->id]; $current = $recGroup->current ?? null; $histories = $recGroup->history ?? collect([]); $mainAthlete = $current ? $current->competitor : null; // [PERBAIKAN] menjadi competitor @endphp @if($current && $mainAthlete) @endif @endif @endforeach @endforeach @if(!$hasData) @endif
Current Record Holder Mark Discipline Record History (Previous)
@if($mainAthlete->photo) @else
@endif
{{ $mainAthlete->name }}
@php $countries = config('countries'); @endphp @if(isset($countries[$mainAthlete->country_code])) {{ $countries[$mainAthlete->country_code]['flag'] }} @endif {{ $mainAthlete->country_code }}
{{ $current->date ? $current->date->format('d M Y') : '-' }}
{{ $current->competition_name }}
{{ $current->result_mark }}
@foreach($current->performanceRemarks as $remark) @if(str_starts_with($remark->code, 'NR') || $remark->code == 'NU18R') {{ $remark->code }} @endif @endforeach
{{ $discipline->name }}
@if($discipline->gender == 'male') PUTRA (MALE) @elseif($discipline->gender == 'female') PUTRI (FEMALE) @else CAMPURAN (MIX) @endif
@if($histories && $histories->count() > 0) @foreach($histories as $h) @if($h && $h->competitor) {{-- [PERBAIKAN] menjadi competitor --}}
@if($h->competitor->photo) @else
@endif
{{ $h->result_mark }} oleh {{ $h->competitor->name }}
{{ $h->date ? $h->date->format('M Y') : '' }} • {{ Str::limit($h->competition_name, 35) }}
@endif @endforeach @else
Tidak ada riwayat rekor lama
@endif

Belum ada data Rekor Nasional untuk kategori {{ $age }}

@endforeach
@endsection