{{-- resources/views/admin/athletes/_table.blade.php --}}
| No | Foto | Identitas Personal | Gender | Kategori & Spesialisasi Lomba | Aksi |
|---|---|---|---|---|---|
| {{ $loop->iteration }} |
|
{{ $athlete->name }}
[{{ $athlete->status == 'active' ? 'Aktif' : 'Nonaktif' }}]
{{ $athlete->date_of_birth ? $athlete->date_of_birth->format('d M Y') : '-' }}
@if($athlete->date_of_birth)
({{ $athlete->date_of_birth->age }} Thn)
@endif
{{ $athlete->province_name ?? '-' }}
|
{{ $athlete->training_origin ?? 'Non Pelatnas' }}
@php
$cats = is_string($athlete->age_category) ? json_decode($athlete->age_category, true) : $athlete->age_category;
@endphp
@if(is_array($cats))
Kategori Usia: {{ implode(', ', $cats) }}
@endif
|
@if($athlete->gender == 'male') Putra @elseif($athlete->gender == 'female') Putri @else Campuran @endif |
@php
$requestedCategory = request('specialty_category');
$performancesToDisplay = $athlete->performances;
if ($requestedCategory) {
$performancesToDisplay = $performancesToDisplay->filter(function($perf) use ($requestedCategory) {
return ($perf->discipline->competition_category_id ?? null) == $requestedCategory;
});
}
@endphp
@if($performancesToDisplay->isEmpty())
Belum ada spesialisasi.
@else
|
|
|
@if(request('search') || request('specialty_category'))
Pencarian tidak ditemukan
@else
{{ $emptyMessage ?? 'Belum ada data' }}
@endif
|
|||||