@push('head') @endpush
{{-- ─── Top: Symbol selector + chart ─────────────────────────────────────── --}}
{{-- Stock list (sidebar) --}}
{{-- Search --}}
{{-- List --}}
{{-- Chart + Order Form --}}
{{-- Chart panel --}} {{-- Chart header --}}

{{-- TradingView widget --}}

Select a stock to view the chart

{{-- Order form --}}
@csrf {{-- Buy / Sell toggle --}}
{{-- Order type --}} {{-- Amount mode --}} {{-- Quantity --}} {{-- Price (limit only) --}} {{-- Balance --}}
Available balance ${{ number_format($user->bal ?? 0, 2) }}
{{-- Submit --}}
{{-- ─── Recent Stock Orders ────────────────────────────────────────────────── --}} @php $recentOrders = $user->stockOrders()->with('stock')->latest()->limit(10)->get(); @endphp @if($recentOrders->isEmpty()) @else
@foreach($recentOrders as $order) @endforeach
Symbol Type Shares Status
{{ $order->stock->symbol ?? $order->symbol ?? 'N/A' }} @php $orderType = $order->type instanceof \BackedEnum ? $order->type->value : (string) $order->type; @endphp {{ strtoupper($orderType) }} {{ $order->shares ?? $order->quantity ?? '—' }} @php $sc = ['filled'=>'emerald','pending'=>'amber','cancelled'=>'red']; $orderStatus = $order->status instanceof \BackedEnum ? $order->status->value : (string) $order->status; @endphp {{ $orderStatus }}
@endif
@push('scripts') @endpush