@extends('super-admin.layout') @section('title', 'Performance Report') @section('subtitle', $summary['period']) @section('content')

Performance Summary

{{ number_format($summary['total_orders_processed']) }}
Orders Processed
{{ number_format($summary['avg_processing_time'], 1) }}m
Avg Processing Time
{{ number_format($summary['completion_rate'], 1) }}%
Completion Rate
{{ number_format($summary['cancellation_rate'], 1) }}%
Cancellation Rate
{{ $summary['peak_hour'] }}
Peak Hour
{{ $summary['busiest_day'] }}
Busiest Day

Export Options

Orders by Hour

Orders by Day of Week

Order Status Distribution

@foreach($statusDistribution as $status => $count)
{{ number_format($count) }}
{{ str_replace('_', ' ', $status) }}
@if($summary['total_orders_processed'] > 0)
{{ number_format(($count / $summary['total_orders_processed']) * 100, 1) }}%
@endif
@endforeach

Detailed Performance Metrics

{{ number_format($satisfactionMetrics['fastest_processing_time'], 1) }}m
Fastest Processing
{{ number_format($satisfactionMetrics['average_processing_time'], 1) }}m
Average Processing
{{ number_format($satisfactionMetrics['slowest_processing_time'], 1) }}m
Slowest Processing

Hourly Performance Analysis

@foreach($peakHours as $hour) @endforeach
Hour Orders Revenue Avg Order Value Performance
{{ $hour['hour'] }} {{ number_format($hour['order_count']) }} ₦{{ number_format($hour['revenue'], 0) }} ₦{{ number_format($hour['avg_order_value'], 0) }} @php $maxOrders = $peakHours->max('order_count'); $performance = $maxOrders > 0 ? ($hour['order_count'] / $maxOrders) * 100 : 0; @endphp
{{ number_format($performance, 0) }}%

Weekly Performance Breakdown

@foreach($dayOfWeekAnalysis as $day) @endforeach
Day Orders Revenue Avg Order Value
{{ $day->day_name }} {{ number_format($day->order_count) }} ₦{{ number_format($day->revenue, 0) }} ₦{{ number_format($day->order_count > 0 ? $day->revenue / $day->order_count : 0, 0) }}

Order Processing Times

@foreach($orderProcessingTimes->take(50) as $order) @endforeach
Order ID Status Processing Time Created Updated Performance
#{{ $order['order_id'] }} {{ ucfirst($order['status']) }} {{ number_format($order['processing_time_minutes']) }}m {{ $order['created_at']->format('M d, H:i') }} {{ $order['updated_at']->format('M d, H:i') }} @if($order['processing_time_minutes'] <= 15) Excellent @elseif($order['processing_time_minutes'] <= 30) Good @elseif($order['processing_time_minutes'] <= 60) Average @else Slow @endif
@if($orderProcessingTimes->count() > 50)
Showing first 50 orders of {{ $orderProcessingTimes->count() }} total orders
@endif
@endsection @push('scripts') @endpush