@extends('admin::layouts.admin') @section('title', 'Detail Game - ' . $game->name) @section('content')
{{-- Page Header --}}
{{-- Left Column - Game Info --}}
{{-- Game Detail Card --}}
Informasi Game
{{-- Game Image --}}
@if($game->thumbnail) {{ $game->name }} @else
@endif
{{ strtoupper($game->name) }}
{{-- Game Info Grid --}}

{{ $game->name }}

{{ $game->slug }}

{{ $game->description ?: 'Tidak ada deskripsi' }}

{{ $game->created_at->format('d M Y, H:i') }}

{{ $game->updated_at->format('d M Y, H:i') }}

{{-- Score Configuration Card --}}
Konfigurasi Score
Min Score {{ number_format($game->min_score) }}
Max Score {{ number_format($game->max_score) }}
Point Reward {{ number_format($game->point_reward) }} Poin
Daily Limit {{ $game->daily_limit }}x per hari
Cooldown @if($game->cooldown_minutes > 0) {{ $game->cooldown_minutes }} menit @else Tidak ada @endif
File Game @if($game->hasGameFiles()) Terupload @else Belum ada @endif
{{-- Right Column - Stats & Actions --}}
{{-- Statistics Card --}}
Statistik
{{ number_format($game->sessions()->count()) }} Total Sesi
{{ number_format($game->sessions()->where('status', 'completed')->count()) }} Selesai
{{ number_format($game->sessions()->distinct('user_id')->count('user_id')) }} Pemain Unik
{{ number_format($game->sessions()->where('status', 'completed')->sum('points_earned')) }} Total Poin Diberikan
{{-- Score Stats --}} @php $completedSessions = $game->sessions()->where('status', 'completed'); $avgScore = $completedSessions->avg('score') ?? 0; $highScore = $completedSessions->max('score') ?? 0; @endphp
Rata-rata Score {{ number_format($avgScore, 1) }}
High Score {{ number_format($highScore) }}
{{-- Quick Actions Card --}}
Aksi
@if($game->hasGameFiles()) Preview Game @endif Edit Game
@csrf @method('PATCH')
{{-- Delete Confirmation Modal --}}

Hapus Game?

Apakah Anda yakin ingin menghapus game ? Tindakan ini tidak dapat dibatalkan.

@csrf @method('DELETE')
{{-- Delete Confirmation Modal --}}

Hapus Game?

Apakah Anda yakin ingin menghapus game ? Tindakan ini tidak dapat dibatalkan.

@csrf @method('DELETE')
@endsection