@extends('Common::admin.layout.page') @section('page') {{-- ===== User Info Grid ===== --}}

{{ __('show user') }} {{ __('View Reviews') }}

{{-- Profile Image Row --}}
{{ $user->name }}
{{ $user->name }}
#{{ $user->id }}
{{-- 4-column info grid --}}
@php $fields = [ ['icon' => 'fas fa-envelope', 'label' => __('Email'), 'value' => $user->email], ['icon' => 'fas fa-phone', 'label' => __('mobile'), 'value' => $user->phone], ['icon' => 'fas fa-signature', 'label' => __('NickName'), 'value' => $user->NickName], ['icon' => 'fas fa-flag', 'label' => __('Nationality'), 'value' => $user->Nationality], ['icon' => 'fas fa-venus-mars', 'label' => __('Gender'), 'value' => $user->gender], ['icon' => 'fas fa-birthday-cake', 'label' => __('Date Of Birth'), 'value' => $user->Date_Of_Birth], ['icon' => 'fas fa-star-half-alt', 'label' => __('Average Rating'), 'value' => number_format($user->reviews()->avg('rating') ?: 0, 1) . ' / 5.0'], ['icon' => 'fas fa-sort-numeric-up','label' => __('self_Ranking'), 'value' => ($user->self_Ranking ?? '-') . ' / 10'], ['icon' => 'fas fa-gamepad', 'label' => __('Games Played'), 'value' => $user->Games_Played], ['icon' => 'fas fa-tag', 'label' => __('Category'), 'value' => $user->category?->name], ['icon' => 'fas fa-map-marker-alt','label' => __('Playing Style'), 'value' => $user->location?->name], ['icon' => 'fas fa-calendar-alt', 'label' => __('Joined At'), 'value' => $user->created_at?->format('Y-m-d')], ]; @endphp @foreach($fields as $field)
{{ $field['label'] }} {{ $field['value'] ?: '—' }}
@endforeach {{-- Wallet Balance - highlighted --}}
{{ __('Balance') }} {{ number_format($user->wallet?->balance ?? 0, 2) }} {{ app_setting('currency', 'GBP') }}
{{-- Stripe Connect Status --}}
{{ __('Stripe Status') }} {{ ucfirst($user->stripeconnect_account_status ?? 'Not Connected') }}
{{-- Bio - full width --}} @if($user->Bio)
{{ __('Bio') }} {{ $user->Bio }}
@endif
{{-- ===== Match Tables ===== --}}

{{ __('Match History') }}

@forelse($historyMatches as $match) @empty @endforelse
{{ __('Match ID') }} {{ __('name') }} {{ __('date') }} {{ __('Status') }} {{ __('Action') }}
{{ $match->id }} {{ $match->name }} {{ $match->date }} {{ $match->Time }} {{ __($match->status) }} {{ __('Show') }}
{{ __('No history matches found') }}

{{ __('Upcoming Matches') }}

@forelse($upcomingMatches as $match) @empty @endforelse
{{ __('Match ID') }} {{ __('name') }} {{ __('date') }} {{ __('Status') }} {{ __('Action') }}
{{ $match->id }} {{ $match->name }} {{ $match->date }} {{ $match->Time }} {{ __($match->status) }} {{ __('Show') }}
{{ __('No upcoming matches found') }}
{{-- ===== Owned Playgrounds ===== --}}

{{ __('Owned Playgrounds') }}

@forelse($myPlaygrounds as $playground) @empty @endforelse
{{ __('ID') }} {{ __('Name') }} {{ __('Address') }} {{ __('Status') }} {{ __('Action') }}
{{ $playground->id }} {{ $playground->Name }} {{ $playground->Address }} {{ $playground->City }} @php $statusClass = [ 'active' => 'success', 'inactive' => 'danger', 'pending' => 'warning' ][$playground->status] ?? 'secondary'; @endphp {{ __($playground->status) }} {{ __('Show') }}
{{ __('No playgrounds found') }}
{{-- ===== Wallet Transactions ===== --}}

{{ __('Wallet Transactions') }}

@forelse($walletTransactions ?? [] as $transaction) @php $type = $transaction->type; $isPositive = in_array($type, ['deposit', 'match_refund', 'transfer', 'payout', 'match_payout']); $isDeduction = in_array($type, ['payment', 'wallet_refund']); $isFailed = in_array($type, ['failed_deposit']); if($isPositive) { $badgeClass = 'badge-success'; $amount = in_array($type, ['transfer', 'payout', 'match_payout']) ? $transaction->debit_system : $transaction->credit_palyer; $sign = '+'; $textClass = 'text-success'; } elseif($isDeduction) { $badgeClass = $type == 'wallet_refund' ? 'badge-secondary' : 'badge-danger'; $amount = $transaction->debit_player; $sign = '-'; $textClass = 'text-danger'; } elseif($isFailed) { $badgeClass = 'badge-danger'; $amount = 0; $sign = ''; $textClass = 'text-muted'; } else { $badgeClass = 'badge-info'; $amount = $transaction->credit_palyer > 0 ? $transaction->credit_palyer : $transaction->debit_player; $sign = $transaction->credit_palyer > 0 ? '+' : '-'; $textClass = $transaction->credit_palyer > 0 ? 'text-success' : 'text-danger'; } @endphp @empty @endforelse
{{ __('ID') }} {{ __('Type') }} {{ __('Amount') }} {{ __('Date') }} {{ __('Description') }}
{{ $transaction->id }} {{ __($type) }} {{ $sign }}{{ number_format($amount, 2) }} {{ app_setting('currency', 'GBP') }} {{ $transaction->created_at->format('Y-m-d H:i') }} {{ $transaction->description }}
{{ __('No wallet transactions found') }}
@stop