{{-- resources/views/admin/coaches/index.blade.php --}} @extends('admin.layouts.app') @section('content')

{{ $totalCoaches }}

Total Pelatih

{{ $totalMale }} Putra
{{ $totalFemale }} Putri

Gender
@forelse($specializationStats as $stat)
{{ $stat->name }}: {{ $stat->total }}
@empty Belum ada data @endforelse

Top Spec

Daftar Pelatih Atletik

Tambah Pelatih
@if(session('success')) @endif
{{-- Lebar sedikit ditambah agar tombol muat --}} @forelse($coaches as $key => $coach) @empty @endforelse
No Foto Identitas (NIK & Nama) Spesialisasi & Nomor Domisili & Kontak Aksi
{{ $loop->iteration }}
@if($coach->photo) Foto @else Default @endif
{{ $coach->name }}
{{ $coach->nik }}
@if($coach->gender == 'male') Putra @else Putri @endif @php $levelColor = 'secondary'; if($coach->coach_level == 'Level 1') $levelColor = 'success'; if($coach->coach_level == 'Level 2') $levelColor = 'warning text-dark'; if($coach->coach_level == 'Level 3') $levelColor = 'dark'; @endphp {{ $coach->coach_level }}
@if($coach->disciplines->count() > 0)
@foreach($coach->disciplines->groupBy('category.name') as $categoryName => $disciplines)
{{ $categoryName }}
@foreach($disciplines as $disc) {{ $disc->name }} @endforeach
@endforeach
@else Belum ada spesialisasi. @endif
{{ $coach->city->nama ?? '-' }}
{{ $coach->province->nama ?? '-' }}
@csrf @method('DELETE')
Belum ada data pelatih yang terdaftar.
Tambah Pelatih Baru
@endsection