{{-- History row partial. Reused by home.blade (top 5 bids + top 5 sells) and history.index (paginated). --}} {{-- Expects: --}} {{-- $tx = Bid or Sell model (eager-loaded with product, market) --}} {{-- $kind = 'bid' or 'sell' --}} @php $time = $kind === 'bid' ? $tx->bid_time : $tx->sell_time; $evalTime = $kind === 'bid' ? \Carbon\Carbon::parse($tx->bid_time)->addHour()->toIso8601String() : \Carbon\Carbon::parse($tx->sell_time)->addHours(24)->toIso8601String(); @endphp
{{ strtoupper(substr($tx->market?->name ?? '?', 0, 1)) }}
{{ $tx->product?->name }}@if($tx->quantity > 1) ×{{ $tx->quantity }}@endif
{{ $tx->market?->name }} · {{ \Carbon\Carbon::parse($time)->diffForHumans(['parts' => 1, 'short' => true]) }}
${{ number_format($tx->amount * $tx->quantity, 2) }}
@if($tx->status == 0)
● In Progress
@elseif($tx->status == 1)
✓ Successful
@elseif($tx->status == 2)
✕ Unsuccessful
@endif