@extends('admin.layout') @section('title', 'Orders Management') @section('styles') @endsection @section('content')
Orders Management
View and manage all exchange orders on the platform.
@if(session('success'))
{{ session('success') }}
@endif
All Orders ({{ $orders->total() }})
@forelse($orders as $order) @empty @endforelse
Order ID User Phone Amount Status Date Actions
{{ $order->order_number }} @if($order->order_type === 'exchange') EXCHANGE @else TOPUP @endif
{{ $order->user->name }}
{{ $order->user->email }}
{{ $order->user->phone ?? 'N/A' }}
₵{{ number_format($order->ghs_amount, 2) }}
¥{{ number_format($order->cny_amount, 2) }}
@if($order->status === 'completed') Completed @elseif($order->status === 'processing') Processing @elseif($order->status === 'cancelled') Cancelled @else Pending @endif {{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('g:i A') }}

No orders found

@forelse($orders as $order)
{{ $order->order_number }} @if($order->order_type === 'exchange') EXCHANGE @else TOPUP @endif
@if($order->payment_status === 'paid') Paid @else {{ ucfirst($order->payment_status) }} @endif @if($order->status === 'completed') Completed @elseif($order->status === 'processing') Processing @elseif($order->status === 'cancelled') Cancelled @else Pending @endif
{{ $order->user->name }}
{{ $order->user->email }}
Amount
₵{{ number_format($order->ghs_amount, 2) }}
¥{{ number_format($order->cny_amount, 2) }}
@if($order->order_type === 'exchange')
Recipient {{ ucfirst(str_replace('_', ' ', $order->recipient_type)) }}
@if($order->whatsapp)
WhatsApp {{ $order->whatsapp }}
@endif @endif
@empty

No orders found

@endforelse
@if($orders->hasPages())
Showing {{ $orders->firstItem() }} to {{ $orders->lastItem() }} of {{ $orders->total() }} orders
@if ($orders->onFirstPage()) Previous @else Previous @endif @foreach ($orders->getUrlRange(1, $orders->lastPage()) as $page => $url) @if ($page == $orders->currentPage()) {{ $page }} @else {{ $page }} @endif @endforeach @if ($orders->hasMorePages()) Next @else Next @endif
@endif
@endsection @section('scripts') @endsection