Dashboard

{{-- PAGE HEAD --}}

Dashboard

Kemet Car Wash · Operations Overview

Live
{{-- FILTER --}}
Reset
{{-- PERIOD LABEL --}}
Showing: {{ $startCopy->format('d M Y') }} @if($startCopy->format('Y-m-d') !== $endCopy->format('Y-m-d')) – {{ $endCopy->format('d M Y') }} @endif @if(isset($compareLabel)) {{ $compareLabel }} @endif
{{-- ROW 1 - CORE KPIs --}}
Core metrics
Revenue
KSh {{ number_format($revenue ?? 0, 2) }}
@if(isset($revenueChange))
{{ ($revenueChange ?? 0) >= 0 ? '↑' : '↓' }} {{ number_format(abs($revenueChange ?? 0), 1) }}%
@endif
Total payments received
Cars Washed
{{ $carsWashed ?? 0 }}
Completed sales
Avg Ticket
KSh {{ number_format($avgTicket ?? 0, 2) }}
Per transaction
Commissions Paid
KSh {{ number_format($commissions ?? 0, 2) }}
Staff earnings
Pending Balances
KSh {{ number_format($pendingBalances ?? 0, 2) }}
Unpaid / partial sales
Unique Clients
{{ $clients ?? 0 }}
@php $newC = $newClients ?? 0; @endphp @if($newC > 0)
{{ $newC }} new
@endif
{{ number_format($repeatRate ?? 0, 1) }}% repeat rate
{{-- ROW 2 - CHARTS --}}
Revenue trend (last 7 days) KSh
Revenue by service Top 5
{{-- ROW 3 - TOP PERFORMERS + TOP SERVICES LIST --}}
Top performers by revenue
{{ $topCommissionName ?? 'N/A' }}
Top earner · commissions
KSh {{ number_format($topCommissionAmount ?? 0, 2) }}
@if(!empty($topSalesEmployeeData['name']) && $topSalesEmployeeData['name'] !== 'N/A')
@php $initials = collect(explode(' ', $topSalesEmployeeData['name'])) ->map(fn($w) => strtoupper($w[0])) ->take(2) ->implode(''); @endphp
{{ $initials }}
{{ $topSalesEmployeeData['name'] }}
Top cashier · {{ $topSalesEmployeeData['services'] ?? 0 }} services
KSh {{ number_format($topSalesEmployeeData['revenue'] ?? 0, 2) }}
@endif @if(!empty($popularService['name']) && $popularService['name'] !== 'N/A')
{{ $popularService['name'] }}
Most popular service · {{ $popularService['count'] ?? 0 }}× sold
KSh {{ number_format($popularService['revenue'] ?? 0, 2) }}
@endif
Services breakdown by revenue
@php $maxSvcRev = collect($topServicesData)->max('revenue') ?: 1; @endphp @forelse($topServicesData as $svc)
{{ $svc['name'] }}
{{ $svc['count'] }}×
KSh {{ number_format($svc['revenue'], 2) }}
@empty

No service data for this period.

@endforelse
{{-- ROW 4 - PAYMENT METHODS + SALE STATUS + QUICK METRICS --}}
Payment methods
@php $payColors = ['#1A4FA0','#1A8A50','#B07010','#A03030','#5A3AB7']; $payMethods = []; foreach (($sales ?? []) as $sale) { foreach ($sale->payments ?? [] as $p) { $m = ucfirst($p['method'] ?? 'Unknown'); $payMethods[$m]['amount'] = ($payMethods[$m]['amount'] ?? 0) + ($p['amount'] ?? 0); $payMethods[$m]['count'] = ($payMethods[$m]['count'] ?? 0) + 1; } } arsort($payMethods); $pi = 0; @endphp @forelse($payMethods as $method => $data)
{{ $method }}
{{ $data['count'] }} transactions
KSh {{ number_format($data['amount'], 2) }}
@php $pi++; @endphp @empty

No payment data.

@endforelse
Sales by status
@php $statusCounts = ['completed' => 0, 'partial' => 0, 'pending' => 0, 'cancelled' => 0]; foreach (($sales ?? []) as $sale) { $s = $sale->status ?? 'pending'; if (isset($statusCounts[$s])) $statusCounts[$s]++; else $statusCounts[$s] = 1; } $statusColors = [ 'completed' => '#1A8A50', 'partial' => '#B07010', 'pending' => '#A05020', 'cancelled' => '#901A1A', ]; $totalSales = array_sum($statusCounts); @endphp
@foreach($statusCounts as $status => $count)
{{ ucfirst($status) }}
@if($totalSales > 0)
{{ number_format($count / $totalSales * 100, 0) }}%
@endif
{{ $count }}
@endforeach
Quick insights
Avg Ticket
KSh {{ number_format($avgTicket ?? 0, 0) }}
Repeat Rate
{{ number_format($repeatRate ?? 0, 1) }}%
New Clients
{{ $newClients ?? 0 }}
Revenue Δ
{{ ($revenueChange ?? 0) >= 0 ? '+' : '' }}{{ number_format($revenueChange ?? 0, 1) }}%
Total Sales
{{ $totalSales ?? 0 }}
Completed
{{ $carsWashed ?? 0 }}
{{-- ROW 5 - PENDING SALES (Pay Now) --}} @if(isset($pendingSales) && $pendingSales->isNotEmpty())
Pending payments
@foreach($pendingSales as $ps) @php $bal = round($ps->total - $ps->total_paid, 2); @endphp @endforeach
Ref Client Plate Total Balance Action
{{ $ps->reference_no }} {{ $ps->client?->full_name ?? 'Walk-in' }} @php $plate = $ps->client?->vehicles?->first()?->plate_number; @endphp @if($plate) {{ strtoupper($plate) }} @else @endif KSh {{ number_format($ps->total, 2) }} KSh {{ number_format($bal, 2) }}
@endif
{{-- end db-container --}}
{{-- end db-wrap --}} {{-- Payment Modal --}} @push('scripts') @endpush