@php if (!function_exists('krx_avatar_initial')) { function krx_avatar_initial($value) { $value = trim((string) $value); if ($value === '') { return 'K'; } if (function_exists('mb_substr') && function_exists('mb_strtoupper')) { return mb_strtoupper(mb_substr($value, 0, 1)); } return strtoupper(substr($value, 0, 1)); } } if (!function_exists('krx_has_real_avatar')) { function krx_has_real_avatar($value) { $value = trim((string) $value); if ($value === '') { return false; } return stripos($value, 'default-avatar') === false; } } @endphp @extends('layouts.app') @section('title', ($team->name ?? 'Time') . ' - Time - GIGAX ARENA') @section('page_title', 'Time') @section('content') @php $adminIds = [1,2,3,4,5,18,17]; $isAdmin = in_array(session('user_id'), $adminIds); @endphp
@if(!empty($team->logo_url)) @else @endif @if($isCaptain) @endif
Perfil do time

{{ $team->name }}

@if($team->tag)
{{ $team->tag }}
@endif @if($team->description)

{{ $team->description }}

@endif
@if(!$isMember && $team->status == 'active') @elseif($isMember && !$isCaptain) @endif @if($isCaptain) @endif Voltar para times
Visão rápida Roster
Pontos {{ number_format($team->rank_points ?? 0) }}
V/D {{ $team->wins ?? 0 }}/{{ $team->losses ?? 0 }}
Partidas {{ $team->total_matches ?? 0 }}
Membros {{ count($members) }}
Status do elenco
Informações do time
{{ $team->status ?? 'active' }}
Capitão {{ $team->captain_name ?? '—' }}
Membros {{ count($members) }}
Wins {{ $team->wins ?? 0 }}
Losses {{ $team->losses ?? 0 }}
@if($isCaptain)
Painel do capitão Gestão
@if(count($members) > 1)
Atenção capitão
Para excluir o time, primeiro remova os demais membros ou transfira a liderança. Times com membros ativos não podem ser excluídos.
@endif
@endif
{{ $isCaptain ? 'Gerenciar membros' : 'Membros' }}
{{ count($members) }} no elenco
@foreach($members as $member)
@if(krx_has_real_avatar($member->avatar_url ?? null)) {{ $member->nickname }} @else {{ krx_avatar_initial($member->nickname) }} @endif
{{ $member->nickname }}
@php $memberUserId = (int) ($member->user_id ?? $member->id ?? 0); $memberGigaxId = $memberUserId ? (\Illuminate\Support\Facades\DB::table('users')->where('id', $memberUserId)->value('gigax_id') ?? $memberUserId) : null; @endphp @if($memberGigaxId)
GIGAX ID #{{ $memberGigaxId }}
@endif
@if($member->role == 'captain') 👑 Capitão @elseif($member->role == 'co-captain') ⭐ Vice-Capitão @else 🎮 Membro @endif
K/D: {{ number_format($member->kd_ratio ?? 0, 2) }}
Rating: {{ number_format($member->avg_rating ?? 0, 2) }}
@if($isCaptain && $member->role != 'captain')
@endif
@endforeach
@if(count($recentMatches) > 0)
Últimas partidas
{{ count($recentMatches) }} recentes
@foreach($recentMatches as $match) @endforeach
Partida Mapa Data Resultado
#{{ $match->match_id }} {{ $match->map_played }} {{ \Carbon\Carbon::parse($match->completed_at)->format('d/m/Y H:i') }} @if($match->winning_team == $match->team_side) ✅ Vitória @else ❌ Derrota @endif
← Voltar para Times
@else
← Voltar para Times
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush