@extends('nexus.layouts.app') @section('page-title', 'Users') @section('sys-mode', 'USER ANALYTICS') @section('head') @endsection @section('content') @php $ratio = $winLossRatio ?? ['wins' => 0, 'losses' => 0, 'win_rate' => 0]; $part = $participation ?? []; $dateStart = $dates['start'] ?? now()->startOfMonth()->toDateString(); $dateEnd = $dates['end'] ?? now()->toDateString(); $isToday = $dateStart === now()->toDateString() && $dateEnd === now()->toDateString(); if ($isToday) { $periodLabel = 'TODAY'; $periodSuffix = 'Today'; } elseif ($dateStart === now()->subDay()->toDateString() && $dateEnd === now()->subDay()->toDateString()) { $periodLabel = 'YESTERDAY'; $periodSuffix = 'Yesterday'; } elseif ($dateStart === $dateEnd) { $periodLabel = strtoupper(\Carbon\Carbon::parse($dateStart)->format('M j')); $periodSuffix = \Carbon\Carbon::parse($dateStart)->format('M j'); } else { $periodLabel = strtoupper(\Carbon\Carbon::parse($dateStart)->format('M Y')); $periodSuffix = \Carbon\Carbon::parse($dateStart)->format('M Y'); } $currentMonth = request()->input('month', now()->format('Y-m')); $activeRange = request()->input('range', ''); $currentSort = request()->input('sort', 'wins'); $currentDir = request()->input('dir', 'desc'); $currentSearch = request()->input('search', ''); $currentLimit = (int) request()->input('limit', 20); $currentPage = (int) request()->input('page', 1); $currentFilter = $currentFilter ?? request()->input('filter', 'all_bidders'); $filterLabels = [ 'all_bidders' => 'All Bidders', 'active_traders' => 'Active Traders', 'unique_bidders' => 'Unique Bidders', 'new_traders' => 'New Traders', 'ictp_bidders' => 'ICTP Bidders', 'first_bid_wins' => 'First Bid Wins', 'first_sell_wins' => 'First Sell Wins', 'loss_streak' => 'In Loss Streak', 'approaching_cap' => 'Approaching Cap', 'logged_in' => 'Logged In', ]; @endphp {{-- PAGE HEADER --}}
Bidder performance and capital distribution
| # | User | Wins | Losses | Win Rate | Profit | Volume | Profit % | Bids | ICTP | Country | Last Login |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ str_pad($rowNum, 2, '0', STR_PAD_LEFT) }} | {{ $b['username'] ?? 'User #' . ($b['user_id'] ?? '?') }} | {{ $b['wins'] ?? 0 }} | {{ $b['losses'] ?? 0 }} | {{ $b['win_rate'] ?? 0 }}% | ${{ number_format($b['total_profit'] ?? 0, 2) }} | ${{ number_format($b['total_volume'] ?? 0, 2) }} | {{ number_format($pp, 1) }}% | {{ $b['total_bids'] ?? 0 }} | {{ $b['ictp_bids'] ?? 0 }} | {{ $b['last_login_country_name'] ?? '-' }} | {{ $b['last_login_relative'] ?? 'never' }} |
No bidder data for this period | |||||||||||
| User | Consecutive Losses | Total Wins | Total Losses |
|---|---|---|---|
| {{ $user['username'] ?? 'User #' . ($user['user_id'] ?? '?') }} | {{ $user['consecutive_losses'] ?? 0 }} | {{ $user['total_wins'] ?? 0 }} | {{ $user['total_losses'] ?? 0 }} |