@php $meta = is_array($r->meta) ? $r->meta : (json_decode($r->meta ?? '{}', true) ?: []); $statusKey = strtolower(trim((string) ($r->status ?? ''))); $statusLabels = [ 'approved' => 'Approved', 'pending' => 'Pending', 'completed' => 'Completed', 'rejected' => 'Rejected', ]; $statusLabel = $statusLabels[$statusKey] ?? ucfirst($statusKey); $canPay = !empty($r->can_pay); $sessionReady = !empty($r->payment_session_ready); $paymentDone = isset($meta['payment_status']) && $meta['payment_status'] === 'success'; $approvedAmount = isset($meta['approved_amount']) ? (float) $meta['approved_amount'] : null; @endphp
{{ $r->title }}
@if($r->store)

{{ $r->store }}

@endif

{{ $r->created_at->format('M d, Y') }}

@if($statusKey === 'rejected' && !empty($meta['rejection_reason']))

{{ $meta['rejection_reason'] }}

@endif
{{ $statusLabel }} @if($approvedAmount !== null) ₹{{ number_format($approvedAmount, 2) }} @if($paymentDone) (paid) @endif @elseif($r->price_range) {{ $r->price_range }} @endif @if($statusKey === 'approved' && !$paymentDone && ($canPay || $sessionReady)) Pay Now @elseif($statusKey === 'approved' && !$paymentDone) Awaiting link @endif