{{-- Pilot Card — shared across: - Dashboard "Top Pilots this week" strip (partials.pilot.top-pilots) - Pilots listing browse grid (pilot.listing) Receives: $pilot : array from PilotPresenter::forBrowse() with keys: id, name, initials, avatar_color, min_entry, trades_today, win_rate, generated_30d, sparkline_path, followers, avg_bid_low, avg_bid_high, bio, trading_style, profile_url, is_live, is_accepting_followers Conversion focus: name + win rate + 30D profit + followers + min entry + follow. Avg bid is intentionally omitted — followers mirror the pilot, they don't bid themselves, so bid range is internal mechanic, not follower-facing info. --}} @php // Win rate visual split: 94.5 -> "94" + ".5%" // substr(_, 2) skips the leading "0." in number_format output $rateWhole = (int) floor($pilot['win_rate']); $rateDecimal = $pilot['win_rate'] - $rateWhole; $rateSuffix = $rateDecimal > 0 ? '.' . substr(number_format($rateDecimal, 1), 2) . '%' : '%'; // Money + integer formatters $generated = '+$' . number_format((float) $pilot['generated_30d'], 2); $minEntry = '$' . number_format((float) $pilot['min_entry'], 0); $followers = number_format((int) $pilot['followers']); $color = in_array($pilot['avatar_color'], ['orange','purple','red'], true) ? $pilot['avatar_color'] : 'orange'; $accepting = (bool) $pilot['is_accepting_followers']; // Hex map for SVG (CSS vars don't render reliably in SVG attributes) $colorHex = match($color) { 'orange' => '#f97316', 'purple' => '#660066', 'red' => '#ec595a', default => '#f97316', }; @endphp
{{ $pilot['initials'] }}
{{ $pilot['name'] }} @if ($pilot['is_live']) @endif
Min {{ $minEntry }}
{{ $rateWhole }}{{ $rateSuffix }}
30d Win
30D Profit
{{ $generated }}
Followers
{{ $followers }}
@php $following = (bool) ($isAlreadyFollowing ?? false); @endphp @if ($following) @elseif ($accepting) @else @endif