{{-- Profile Your Activity — follower-specific panel. Receives: $activity : array from PilotPresenter::forFollowerActivity() Keys: wallet, starting_amount, lifetime_profit, today_profit, trades_won, trades_lost, win_rate, since, recent_mirrors, contributions, total_contributed $profile : array — used for the pilot name reference Only included when isFollowing && activity is present (see profile.blade.php). Phase 14: tabs added inside the timeline section. "Recent Sales" (default) swaps with "Contributions" — same visual weight, no page-level tab pattern. --}} @php $wallet = (float) ($activity['wallet'] ?? 0); $lifetime = (float) ($activity['lifetime_profit'] ?? 0); $today = (float) ($activity['today_profit'] ?? 0); $won = (int) ($activity['trades_won'] ?? 0); $lost = (int) ($activity['trades_lost'] ?? 0); $winRate = (float) ($activity['win_rate'] ?? 0); $totalT = $won + $lost; $lifetimeStr = $lifetime > 0 ? '+$' . number_format($lifetime, 2) : ($lifetime < 0 ? '-$' . number_format(abs($lifetime), 2) : '$0.00'); $todayStr = $today > 0 ? '+$' . number_format($today, 2) : ($today < 0 ? '-$' . number_format(abs($today), 2) : '$0.00'); $lifetimeClass = $lifetime > 0 ? 'up' : ($lifetime < 0 ? 'down' : ''); $todayClass = $today > 0 ? 'up' : ($today < 0 ? 'down' : ''); $rateClass = $totalT === 0 ? 'is-empty' : ($totalT < 5 ? 'is-early' : ''); $rateStr = $totalT === 0 ? '—' : rtrim(rtrim(number_format($winRate, 1), '0'), '.') . '%'; $since = $activity['since'] ? \Carbon\Carbon::parse($activity['since'])->format('M j') : null; // Phase 14: contributions data $contributions = $activity['contributions'] ?? []; $totalContributed = (float) ($activity['total_contributed'] ?? 0); $contribCount = count($contributions); $topupCount = 0; foreach ($contributions as $c) { if (($c['event_type'] ?? '') === 'topup') $topupCount++; } $hasContribs = $contribCount > 0; $hasMirrors = !empty($activity['recent_mirrors']); @endphp

Your activity

Following {{ $profile['name'] }}

@if($since) since {{ $since }} @endif
Wallet
${{ number_format($wallet, 2) }}
follow capital
Lifetime
{{ $lifetimeStr }}
your net profit
Today
{{ $todayStr }}
net today
Your win rate
{{ $rateStr }}
{{ $won }}W · {{ $lost }}L
{{-- Phase 14: Timeline tabs (Recent Sales default / Contributions) --}} @if($hasMirrors || $hasContribs)
{{-- Recent Sales panel (default visible) --}}
@if($hasMirrors)

Refunds return to your wallet automatically.

@foreach($activity['recent_mirrors'] as $m) @php $status = $m['status']; $isWin = $status === 'sold_won'; $isLoss = $status === 'sold_lost'; $net = (float) ($m['net'] ?? 0); $netStr = $isWin ? '+$' . number_format(abs($net), 2) : ($isLoss ? '-$' . number_format(abs($net), 2) : ''); $netClass = $isWin ? 'up' : ($isLoss ? 'down' : ''); $statusCopy = match($status) { 'sold_won' => 'Trade won', 'sold_lost' => 'Trade lost', 'owned' => 'Holding', 'placed' => 'Bid placed', 'bid_lost' => 'Bid refunded', 'skipped' => 'Skipped', default => $status, }; $timeAgo = $m['at'] ? \Carbon\Carbon::parse($m['at'])->diffForHumans(null, true) . ' ago' : '—'; @endphp
{{ $statusCopy }} {{ $timeAgo }}
${{ number_format((float) ($m['bid'] ?? 0), 2) }} in @if($netStr) {{ $netStr }} net @endif
@endforeach
@else

No sales yet — this pilot's next session will start placing bids for you.

@endif
{{-- Contributions panel --}} @endif