@extends('layouts.app') @push('styles') @endpush @section('title','Torneios - GIGAX ARENA') @section('page_title','Torneios') @section('content') @if(session('success'))
{{session('success')}}
@endif @if(session('error'))
{{session('error')}}
@endif
Em andamento{{$stats->ongoing}}
Inscrições abertas{{$stats->registration}}
Próximos{{$stats->upcoming}}
Finalizados{{$stats->finished}}
Agenda competitiva
Todos os campeonatos
@forelse($tournaments as $t) @php $isRegistered=$registeredTournamentIds->contains((int)$t->id); $deadlinePassed=false; if(!empty($t->registration_end)){try{$deadlinePassed=\Carbon\Carbon::parse($t->registration_end)->isPast();}catch(\Throwable $e){}} $full=(int)$t->registered_count>=(int)$t->max_teams; @endphp @empty@endforelse
TorneioStatusInícioTimesPremiaçãoParticipar / Ação
{{$t->name}}
{{$t->game_mode}}
@php $statusLabel = match((string)$t->status){ 'registration' => 'INSCRIÇÕES ABERTAS', 'ongoing' => 'EM ANDAMENTO', 'finished' => 'FINALIZADO', default => strtoupper((string)$t->status), }; @endphp {{$statusLabel}} {{\Carbon\Carbon::parse($t->start_date)->format('d/m/Y H:i')}} {{$t->registered_count}}/{{$t->max_teams}} TIMES @php $gxPct = (int)$t->max_teams > 0 ? min(100, round(((int)$t->registered_count/(int)$t->max_teams)*100)) : 0; @endphp
🏆 R$ {{number_format($t->prize_pool,2,',','.')}}
@if($t->status==='registration') @if($isRegistered)✓ MEU TIME JÁ ESTÁ INSCRITO @elseif($deadlinePassed)INSCRIÇÕES ENCERRADAS @elseif($full)SEM VAGAS @elseif($captainTeam) @elseif($memberTeam)PEDIR AO CAPITÃO @elseCRIAR / ENTRAR EM TIME @endif @elseif($t->status==='ongoing')● EM ANDAMENTO @elseif($t->status==='finished')FINALIZADO @endif VER DETALHES
Nenhum torneio cadastrado.
@if($isTournamentAdmin) @endif @push('scripts')@endpush @endsection