@extends('nexus.layouts.app') @section('page-title', 'Pilots') @section('sys-mode', 'PILOT MODE') @section('head') @endsection @section('content') @php $ov = $overview ?? []; $rows = $pilotsTable ?? []; $wrDist = $rollingWrDist ?? []; $followsChart = $followsPerPilot ?? []; $capChart = $followerCapDist ?? []; $dailyChart = $dailyActivity ?? []; $followRows = $follows ?? []; $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 = $currentSort ?? request()->input('sort', 'wins'); $currentDir = $currentDir ?? request()->input('dir', 'desc'); $followStatusFilter = $followStatusFilter ?? request()->input('follow_status', 'all'); $followStatusLabels = [ 'all' => 'All', 'active' => 'Active', 'stopped' => 'Stopped', 'auto_stopped' => 'Auto-Stopped', ]; @endphp {{-- PAGE HEADER --}} {{-- STAT STRIP: Pilot roster --}}
Total Pilots
{{ $ov['total_pilots'] ?? 0 }}
Active roster
Circuit Normal
{{ $ov['normal_count'] ?? 0 }}
Paused {{ $ov['paused_count'] ?? 0 }} / Cool {{ $ov['cooldown_count'] ?? 0 }}
Active Follows
{{ number_format($ov['active_follows'] ?? 0) }}
{{ number_format($ov['unique_followers'] ?? 0) }} unique followers
Follower Capital
${{ number_format($ov['follower_capital'] ?? 0, 2) }}
${{ number_format($ov['total_invested'] ?? 0, 2) }} invested
{{-- STAT STRIP: Pilot activity (period) --}}
Pilot Bids {{ $periodSuffix }}
{{ number_format($ov['pilot_bids'] ?? 0) }}
Pilot Wins {{ $periodSuffix }}
{{ number_format($ov['pilot_wins'] ?? 0) }}
Pilot Losses {{ $periodSuffix }}
{{ number_format($ov['pilot_losses'] ?? 0) }}
Accepting Followers
{{ $ov['accepting_count'] ?? 0 }} / {{ $ov['total_pilots'] ?? 0 }}
{{ $ov['stop_loss_triggered'] ?? 0 }} stop-loss lifetime
{{-- STAT STRIP: Mirror activity (period) --}}
Mirror Trades {{ $periodSuffix }}
{{ number_format($ov['mirror_trades'] ?? 0) }}
{{ number_format($ov['mirror_skipped'] ?? 0) }} skipped
Mirror Win Rate
{{ $ov['mirror_win_rate'] ?? 0 }}%
{{ $ov['mirror_wins'] ?? 0 }}W / {{ $ov['mirror_losses'] ?? 0 }}L
Pilot Earnings {{ $periodSuffix }}
${{ number_format($ov['pilot_earnings'] ?? 0, 2) }}
From follower trades
Follower Gross {{ $periodSuffix }}
${{ number_format($ov['follower_gross'] ?? 0, 2) }}
Before pilot cut
{{-- CHARTS --}}
Pilot Rolling WR Distribution
Daily Pilot Activity • {{ $periodSuffix }}
Active Follows Per Pilot
Follower Capital Per Pilot
{{-- PILOTS TABLE --}}
Pilots Leaderboard {{ $periodSuffix }} • 25 pilots
@if (!empty($rows) && count($rows) > 0) @foreach ($rows as $idx => $p) @php $circuitClass = match ($p['circuit_state']) { 'normal' => 'chip-completed', 'paused' => 'chip-error', 'cooldown' => 'chip-warning', default => 'chip-pending', }; $wr = $p['circuit_rolling_wr']; @endphp @endforeach @else @endif
# Pilot Archetype Circuit Rolling WR Wins Losses WR Profit Bids Followers Follower Cap Mirror Mirror W/L Pilot Earned Last Activity
{{ str_pad($idx + 1, 2, '0', STR_PAD_LEFT) }} {{ $p['display_name'] }} @if ($p['is_in_warmup']) WARMUP @endif {{ $p['archetype'] ?? '-' }} {{ $p['circuit_state'] }} {{ $wr !== null ? number_format($wr, 1) . '%' : '-' }} {{ $p['wins'] }} {{ $p['losses'] }} {{ $p['win_rate'] }}% ${{ number_format($p['total_profit'], 2) }} {{ $p['total_bids'] }} {{ $p['active_follows'] }} ${{ number_format($p['follower_capital'], 2) }} {{ $p['mirror_trades'] }} {{ $p['mirror_wins'] }} / {{ $p['mirror_losses'] }} ${{ number_format($p['pilot_earned'], 2) }} {{ $p['last_activity_relative'] }}
No pilot data for this period
{{-- ACTIVE FOLLOWS --}}
Follow Records {{ count($followRows) }} record(s)
Status
@if (!empty($followRows) && count($followRows) > 0) @foreach ($followRows as $idx => $f) @php $statusClass = match ($f['status']) { 'active' => 'chip-completed', 'stopped' => 'chip-pending', 'auto_stopped' => 'chip-error', default => 'chip-pending', }; $netProfitClass = $f['net_profit'] >= 0 ? 'text-green' : 'text-red'; @endphp @endforeach @else @endif
# Follower Country Pilot Starting Balance Net Profit Pilot Earned Status Started
{{ str_pad($idx + 1, 2, '0', STR_PAD_LEFT) }} {{ $f['follower_username'] }} {{ $f['country_name'] }} {{ $f['pilot_name'] }} ${{ number_format($f['starting_amount'], 2) }} ${{ number_format($f['current_balance'], 2) }} ${{ number_format($f['net_profit'], 2) }} ${{ number_format($f['pilot_earned'], 2) }} {{ str_replace('_', '-', $f['status']) }} {{ $f['started_relative'] }}
No follow records{{ $followStatusFilter !== 'all' ? ' for status: ' . $followStatusLabels[$followStatusFilter] : '' }}
@endsection @section('scripts') @endsection