@php use App\Support\Attributes; $tier = fn (float $o) => $o >= 8 ? 'text-gold' : ($o >= 6.5 ? 'text-[#7DE39A]' : ($o >= 5 ? 'text-pitch-ink' : 'text-pitch-muted')); @endphp
{{-- Başlık + davet linki + ayarlar --}}

{{ $group->name }}

@if ($group->description)

{{ $group->description }}

@endif
{{ $players->count() }} oyuncu @if ($isAdmin) ⚙️ Ayarlar @endif @if (auth()->id() === $group->owner_id) Grubu Sil @else Gruptan Ayrıl @endif
Davet linki: {{ route('groups.join', $group->invite_code) }}
@if ($showSettings && $isAdmin)

Haftalık Maç Ayarları

Bir kere ayarla, sistem her hafta maçı kendisi açsın — her hafta elle oluşturma derdi bitsin.

@php $fieldClasses = 'block w-full bg-pitch-bg border-pitch-line text-pitch-ink placeholder-pitch-muted/60 focus:border-bibB focus:ring-bibB/40 rounded-md shadow-sm'; @endphp
Kaydet @endif
{{-- Yaklaşan maçlar --}}

Yaklaşan Maçlar

@if ($isAdmin) {{ $showMatchForm ? 'Vazgeç' : '+ Maç Aç' }} @endif
@if ($showMatchForm && $isAdmin)
Maçı Aç
@endif @forelse ($upcoming as $match)
{{ $match->title }}
{{ $match->starts_at->translatedFormat('d F Y, l H:i') }} @if ($match->location) · {{ $match->location }} @endif
{{ $match->going_count }}/{{ $match->capacity }}
@empty

Yaklaşan maç yok. @if ($isAdmin && ! $group->auto_schedule) Ayarlar'dan haftalık otomatik maçı aç ya da Maç Aç ile elle oluştur. @endif

@endforelse
{{-- Oyuncu havuzu --}}

Oyuncu Havuzu

⭐ Oyuncuları Puanla 📊 İstatistikler @if ($isAdmin) {{ $showGuestForm ? 'Vazgeç' : '+ Misafir Oyuncu' }} @endif

Puanlar anonimdir — kimin kime kaç verdiği görünmez. Bir oyuncunun ortalaması, en az {{ \App\Models\Player::minRatingsForVisibility() }} kişi puanlayınca herkese açılır. Kadrolar bu ortalamalara göre dengelenir.

@if ($showGuestForm && $isAdmin)
+ Ekle

Misafir: henüz hesabı olmayan oyuncu. Kayıt olunca listeden hesabıyla eşleştirebilirsin, puanları korunur.

@endif
@foreach ($players as $player) @php $ovr = $player->overall(); $ovrPublic = $player->overallIsPublic(); $minRatings = \App\Models\Player::minRatingsForVisibility(); @endphp
@if ($ovrPublic) {{ number_format($ovr, 1) }} @else ? @endif
{{ $player->name }} @if ($player->shirt_number) #{{ $player->shirt_number }} @endif @if ($player->isGuest()) Misafir @elseif ($player->user_id === $group->owner_id) Başkan @endif
@foreach ($player->positions ?? [] as $i => $pos) {{ count($player->positions) > 1 ? ($i + 1).'·' : '' }}{{ $pos }} @endforeach 🦶 {{ $player->footBadge() }}
{{ $ovrPublic ? $player->ratingCount().' oylama' : $player->ratingCount().'/'.$minRatings.' oylama' }}
@if ($player->user_id !== auth()->id()) ⭐ Puanla @endif @if ($isAdmin) @endif @if ($player->isGuest() && $isAdmin) @if ($unlinkedMembers->isNotEmpty()) @endif @elseif ($isAdmin && ! $player->isGuest() && $player->user_id !== $group->owner_id && $player->user_id !== auth()->id()) @endif
@if ($editingPlayerId === $player->id)
Pozisyonlar — tıklama sırası önceliği belirler (1. → 2. → 3.). Kaleci başka pozisyonlarla birleşebilir.
@foreach (Attributes::POSITIONS as $code => $label) @php $rank = array_search($code, $posOrder, true); @endphp @endforeach
Kaydet Vazgeç
@endif
@endforeach
{{-- Eşleşme kuralları --}} @if ($isAdmin && $players->count() >= 2)

Eşleşme Kuralları DENGELEME BU KURALLARA UYAR

+ Kural Ekle
@forelse ($rules as $rule) {{ $rule->type === 'apart' ? '↔' : '🔗' }} {{ $rule->playerA->name }} + {{ $rule->playerB->name }} {{ $rule->type === 'apart' ? 'ayrı takımlarda' : 'aynı takımda' }} @empty Kural yok — örn. "kardeşler ayrı takımlarda olsun" gibi şartlar ekleyebilirsin. @endforelse
@endif {{-- Geçmiş maçlar --}} @if ($past->isNotEmpty()) @endif