@extends('layouts.restaurant') @php $currencySymbol = App\Models\AppSetting::sanitizedCurrencySymbol(); $currencyDecimals = App\Models\AppSetting::currencyDecimals(); $salesLabels = $salesData->pluck('date')->map(fn($date) => \Carbon\Carbon::parse($date)->format('d M')); $statusColors = ['pending'=>'#f59e0b','confirmed'=>'#3b82f6','preparing'=>'#8b5cf6','ready'=>'#06b6d4','out_for_delivery'=>'#f97316','delivered'=>'#10b981','cancelled'=>'#ef4444']; @endphp @section('title', 'Analytics & Reports') @section('styles') @endsection @section('content')
Business intelligence

Analytics & Reports

Clear revenue, order and product insights for better daily decisions.

Reset
@foreach([ ['Revenue', $currencySymbol.number_format($summary['total_revenue'] ?? 0,$currencyDecimals),'fa-indian-rupee-sign','#10b981','rgba(16,185,129,.12)'], ['Orders', number_format($summary['total_orders'] ?? 0),'fa-bag-shopping','#3b82f6','rgba(59,130,246,.12)'], ['Average order', $currencySymbol.number_format($summary['avg_order_value'] ?? 0,$currencyDecimals),'fa-receipt','#8b5cf6','rgba(139,92,246,.12)'], ['Customers', number_format($summary['total_customers'] ?? 0),'fa-users','#f97316','rgba(249,115,22,.12)'], ['Cancellation', number_format($summary['cancellation_rate'] ?? 0,1).'%','fa-arrow-trend-down','#ef4444','rgba(239,68,68,.11)'], ] as [$label,$value,$icon,$tone,$wash])
{{ $label }}
{{ $value }}
@endforeach
Revenue and order trend
Daily performance across the selected period
Live data
Order health
Status mix for selected dates
Peak order hours
Use demand patterns to plan staffing and stock
Popular items
Ranked by total orders
@forelse($topItems->take(7) as $index => $item) @php($itemImage = $item->image ? App\Services\MediaStorage::url($item->image) : null)
{{ $index+1 }}
@if($itemImage)@else
@endif
{{ $item->name }}
{{ number_format($item->total_orders ?? 0) }} orders
{{ $currencySymbol }}{{ number_format($item->final_price,$currencyDecimals) }}
@empty
No item sales yet.
@endforelse
@endsection @section('scripts') @endsection