@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'); // Phase 14-B: search + pagination defaults (backwards-safe) $followSearch = $followSearch ?? request()->input('follow_search', ''); $followsTotal = $followsTotal ?? count($followRows); $followsPages = $followsPages ?? 1; $followsPage = $followsPage ?? 1; $followsPerPageResolved = $followsPerPageResolved ?? 20; $followStatusLabels = [ 'all' => 'All', 'active' => 'Active', 'winding_down' => 'Winding Down', 'stopped' => 'Stopped', 'auto_stopped' => 'Auto-Stopped', ]; @endphp {{-- PAGE HEADER --}}
Platform-owned automated traders and follower mirror activity
| # | Pilot | Archetype | Circuit | Rolling WR | Wins | Losses | WR | Profit | Bids | Followers | Follower Cap | Mirror | Mirror W/L | Pilot Earned | Follower APY | Realized Cut | 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) }} | @php $apy = $p['follower_apy_30d'] ?? null; $conf = $p['apy_confidence'] ?? 'insufficient_trades'; @endphp @if($apy !== null) {{ $apy }}% @if($conf === 'medium') · {{ $p['apy_wins_30d'] }}W @endif @else @php $confLabel = match($conf) { 'warmup' => 'Warmup', 'insufficient_trades' => '<50 wins', 'no_capital' => 'No cap', default => '-', }; @endphp {!! $confLabel !!} @endif |
@if(($p['realized_cut_lifetime'] ?? 0) > 0)
${{ number_format($p['realized_cut_lifetime'], 2) }}
@if(($p['realized_cut_month'] ?? 0) > 0)
${{ number_format($p['realized_cut_month'], 2) }} this month
@endif
@else
Pending sweep
@endif
|
{{ $p['last_activity_relative'] }} |
No pilot data for this period | |||||||||||||||||
| # | Follower | Country | Pilot | Starting | Balance | Mark-to-Market | Net Profit | Pilot Earned | Status | Started | Actions |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ str_pad($absoluteIdx, 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) }} |
@if($isNonTerminal && $m2m !== null)
${{ number_format($m2m, 2) }}
@if(($f['open_positions'] ?? 0) > 0)
{{ $f['open_positions'] }} open
@endif
@else
-
@endif
|
${{ number_format($f['net_profit'], 2) }} | ${{ number_format($f['pilot_earned'], 2) }} | {{ str_replace('_', '-', $f['status']) }} | {{ $f['started_relative'] }} | @if($f['status'] === 'winding_down') @php $canForceSettle = ($f['open_positions'] ?? 0) === 0; @endphp @if($canForceSettle) @else {{ $f['open_positions'] }} open @endif @else - @endif |
No follow records{{ $followStatusFilter !== 'all' ? ' for status: ' . $followStatusLabels[$followStatusFilter] : '' }}{{ !empty($followSearch) ? ' matching "' . e($followSearch) . '"' : '' }} | |||||||||||