{{-- Profile Your Activity — follower-specific panel. Receives: $activity : array from PilotPresenter::forFollowerActivity() $profile : array — used for the pilot name reference Only included when isFollowing && activity is present (see profile.blade.php). --}} @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; @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
@if(!empty($activity['recent_mirrors']))

Your recent trades

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' : ''); // Status copy $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
@endif