@extends('admin.layouts.base') @section('title', 'Admin Dashboard') @section('content')

Dashboard Overview

Platform Overview

{{ number_format($totalUsers) }}
Total Users
{{ number_format($totalQuotes) }}
Total Quotes
{{ $totalBookingRequests }}
Booking Requests
{{ number_format($successfulQuotes) }}
Completed Quotes

Booking Status Distribution

@php $bookingIcons = [ 'pending' => 'ki-clock', 'approved' => 'ki-check', 'confirmed' => 'ki-shield-tick', 'rejected' => 'ki-cross' ]; $bookingColors = [ 'pending' => ['icon-bg' => 'rgba(245, 158, 11, 0.1)', 'icon-color' => '#f59e0b', 'text-color' => '#b45309'], 'approved' => ['icon-bg' => 'rgba(59, 130, 246, 0.1)', 'icon-color' => '#3b82f6', 'text-color' => '#1e40af'], 'confirmed' => ['icon-bg' => 'rgba(16, 185, 129, 0.1)', 'icon-color' => '#10b981', 'text-color' => '#047857'], 'rejected' => ['icon-bg' => 'rgba(239, 68, 68, 0.1)', 'icon-color' => '#ef4444', 'text-color' => '#b91c1c'] ]; $bookingLabels = [ 'pending' => 'Pending Bookings', 'approved' => 'Approved Bookings', 'confirmed' => 'Confirmed Bookings', 'rejected' => 'Rejected Bookings' ]; @endphp @foreach(['pending', 'approved', 'confirmed', 'rejected'] as $status) @php $colors = $bookingColors[$status]; $icon = $bookingIcons[$status]; $label = $bookingLabels[$status]; $count = $bookingStatusDistribution[$status] ?? 0; @endphp
{{ $count }}
{{ $label }}
@endforeach

Warehouse Operations

{{ number_format($totalWarehouses) }}
Total Warehouses
{{ number_format($totalWarehouseBookings) }}
Warehouse Bookings
@php $warehouseIcons = [ 'pending' => 'ki-clock', 'confirmed' => 'ki-shield-tick', 'active' => 'ki-play', 'completed' => 'ki-check-square' ]; $warehouseColors = [ 'pending' => ['icon-bg' => 'rgba(245, 158, 11, 0.1)', 'icon-color' => '#f59e0b', 'text-color' => '#b45309'], 'confirmed' => ['icon-bg' => 'rgba(16, 185, 129, 0.1)', 'icon-color' => '#10b981', 'text-color' => '#047857'], 'active' => ['icon-bg' => 'rgba(59, 130, 246, 0.1)', 'icon-color' => '#3b82f6', 'text-color' => '#1e40af'], 'completed' => ['icon-bg' => 'rgba(100, 116, 139, 0.1)', 'icon-color' => '#64748b', 'text-color' => '#475569'] ]; $warehouseLabels = [ 'pending' => 'Pending Warehouse', 'confirmed' => 'Confirmed Warehouse', 'active' => 'Active Warehouse', 'completed' => 'Completed Warehouse' ]; @endphp @foreach(['pending', 'confirmed', 'active', 'completed'] as $status) @php $colors = $warehouseColors[$status]; $icon = $warehouseIcons[$status]; $label = $warehouseLabels[$status]; $count = $warehouseStatusDistribution[$status] ?? 0; @endphp
{{ $count }}
{{ $label }}
@endforeach

Extension Requests

{{ number_format($totalExtensionRequests) }}
Total Extensions
@php $extensionIcons = [ 'pending' => 'ki-clock', 'escalated' => 'ki-arrow-up', 'approved' => 'ki-check', 'rejected' => 'ki-cross' ]; $extensionColors = [ 'pending' => ['icon-bg' => 'rgba(245, 158, 11, 0.1)', 'icon-color' => '#f59e0b', 'text-color' => '#b45309'], 'escalated' => ['icon-bg' => 'rgba(59, 130, 246, 0.1)', 'icon-color' => '#3b82f6', 'text-color' => '#1e40af'], 'approved' => ['icon-bg' => 'rgba(16, 185, 129, 0.1)', 'icon-color' => '#10b981', 'text-color' => '#047857'], 'rejected' => ['icon-bg' => 'rgba(239, 68, 68, 0.1)', 'icon-color' => '#ef4444', 'text-color' => '#b91c1c'] ]; $extensionLabels = [ 'pending' => 'Pending Extensions', 'escalated' => 'Escalated Extensions', 'approved' => 'Approved Extensions', 'rejected' => 'Rejected Extensions' ]; @endphp @foreach(['pending', 'escalated', 'approved', 'rejected'] as $status) @php $colors = $extensionColors[$status]; $icon = $extensionIcons[$status]; $label = $extensionLabels[$status]; $count = $extensionStatusDistribution[$status] ?? 0; @endphp
{{ $count }}
{{ $label }}
@endforeach

Data Analytics

Quote Status Distribution

Warehouse Booking Status

Extension Request Status

Monthly Performance Trends

Recent Activities

Recent Quotes

{{ $recentQuotes->count() }} total
@forelse($recentQuotes as $quote) @empty @endforelse
User Route Status Date
{{ substr($quote->user->fullname ?? 'N/A', 0, 1) }}
{{ $quote->user->fullname ?? 'N/A' }}
{{ $quote->user->email ?? 'N/A' }}
{{ $quote->pickupDetail->city ?? 'N/A' }} → {{ $quote->deliveryDetail->city ?? 'N/A' }}
{{ $quote->pickupDetail->state ?? '' }} to {{ $quote->deliveryDetail->state ?? '' }}
@php $statusColors = [ 'completed' => 'success', 'failed' => 'danger', 'pending' => 'warning', 'in_progress' => 'info' ]; $color = $statusColors[$quote->status] ?? 'secondary'; @endphp {{ ucfirst($quote->status) }} {{ $quote->created_at->format('M d, Y') }}
No quotes found

Recent Warehouse Bookings

{{ $recentWarehouseBookings->count() }} total
@forelse($recentWarehouseBookings as $warehouseBooking) @empty @endforelse
User Warehouse Status Date
{{ substr($warehouseBooking->user->fullname ?? 'N/A', 0, 1) }}
{{ $warehouseBooking->user->fullname ?? 'N/A' }}
{{ $warehouseBooking->user->email ?? 'N/A' }}
{{ $warehouseBooking->warehouse->name ?? 'N/A' }} @php $bookingColors = [ 'completed' => 'success', 'pending' => 'warning', 'confirmed' => 'primary', 'active' => 'info' ]; $color = $bookingColors[$warehouseBooking->booking_status] ?? 'danger'; @endphp {{ ucfirst($warehouseBooking->booking_status) }} {{ $warehouseBooking->created_at->format('M d, Y') }}
No warehouse bookings found

Recent Extension Requests

{{ $recentExtensions->count() }} total
@forelse($recentExtensions as $ext) @empty @endforelse
User Warehouse Days Amount Status Date
{{ substr($ext->user->fullname ?? 'N/A', 0, 1) }}
{{ $ext->user->fullname ?? 'N/A' }}
{{ $ext->user->email ?? 'N/A' }}
{{ $ext->booking->warehouse->name ?? 'N/A' }} {{ $ext->additional_days }} ${{ number_format($ext->additional_amount, 2) }} @php $extStatusColors = [ 'pending' => 'warning', 'escalated' => 'info', 'approved' => 'success', 'rejected' => 'danger' ]; $color = $extStatusColors[$ext->status] ?? 'secondary'; @endphp {{ ucfirst($ext->status) }} {{ $ext->created_at->format('M d, Y') }}
No extension requests found
@endsection @push('scripts') @endpush