@extends('admin.layouts.app') @section('title', 'Manage Orders') @section('content')
Manage and track all customer orders
| Order | Date | Customer | Total | Scope | Status | Agent | Actions |
|---|---|---|---|---|---|---|---|
| {{ $order->order_number }} | {{ $order->created_at->format('M d, H:i') }} |
@if($order->user)
{{ $order->user->name }}
{{ Str::limit($order->user->email, 20) }}
@else
{{ $order->name }} (Guest)
{{ Str::limit($order->email, 20) }}
@endif
|
₹{{ number_format($order->total, 2) }} | {{ $order->order_scope }} |
{{ ucfirst($order->status) }}
{{ $order->payment_method }}
({{ $order->payment_status }})
@if($order->agentRating || $order->productReviews->isNotEmpty())
@php
$avgRating = 0;
$totalRatings = 0;
if ($order->agentRating) {
$avgRating += $order->agentRating->rating;
$totalRatings++;
}
foreach ($order->productReviews as $pr) {
$avgRating += $pr->rating;
$totalRatings++;
}
$finalAvg = $totalRatings > 0 ? round($avgRating / $totalRatings, 1) : 0;
@endphp
@endif
|
@if($order->deliveryAgent)
{{ substr($order->deliveryAgent->user->name, 0, 1) }}
{{ Str::limit($order->deliveryAgent->user->name, 10) }}
|
|
No orders foundTry adjusting your search or filters |
|||||||