@php use App\Enums\ProofStatus; use App\Models\SubscriptionPayment; /* * A shop that has paid and is waiting is a shop that cannot trade. The * oldest item in the queue is therefore shown on every screen, not just on * the queue itself — an unnoticed backlog is the one failure mode this * panel exists to prevent. */ $oldest = auth()->user()?->canVerifyPayments() ? SubscriptionPayment::where('status', ProofStatus::Pending)->oldest('created_at')->first() : null; $waitingHours = $oldest ? (int) $oldest->created_at->diffInHours(now()) : 0; @endphp @if ($oldest && ! request()->routeIs('payments.queue')) @php $urgent = $waitingHours >= 12; @endphp