@extends('cargo_company.templates.layout') @section('head') @endsection @section('content') @php $hour = (int) now()->format('H'); $greeting = $hour < 12 ? 'Good morning' : ($hour < 18 ? 'Good afternoon' : 'Good evening'); $displayName = auth()->user()->company_name ?: auth()->user()->name; @endphp {{-- ========== GREETING ========== --}}

{{ $greeting }}, {{ $displayName }} 👋

Here's your cargo operations overview for today.

{{-- ========== PENDING QUOTES ALERT ========== --}} @if(($stats['pending'] ?? 0) > 0)
{{ $stats['pending'] }} {{ \Illuminate\Support\Str::plural('shipment', $stats['pending']) }} awaiting your quote submission
Review Now
@endif {{-- ========== SHIPMENTS SNAPSHOT ========== --}}
My Shipments
View All
@php $shipmentCards = [ ['Total Shipments', 'total_shipments', 'ri-ship-2-line', 'blue'], ['Pending Quotes', 'pending', 'ri-time-line', 'amber'], ['Accepted', 'accepted', 'ri-checkbox-circle-line', 'cyan'], ['In Transit', 'intransit', 'ri-roadster-line', 'gray'], ['Delivered', 'delivered', 'ri-check-double-line', 'green'], ['Cancelled', 'cancelled', 'ri-close-circle-line', 'red'], ]; @endphp @foreach($shipmentCards as [$label, $key, $icon, $color])
{{ $label }}
{{ number_format($stats[$key]) }}
@endforeach
{{-- ========== DELIVERY OPERATIONS ========== --}}
Delivery Operations
View All
@php $deliveryCards = [ ['Total Deliveries', 'total_deliveries', 'ri-route-line', 'blue'], ['Active Deliveries', 'active_deliveries', 'ri-truck-line', 'amber'], ['Completed Deliveries', 'completed_deliveries', 'ri-checkbox-circle-line', 'green'], ]; @endphp @foreach($deliveryCards as [$label, $key, $icon, $color])
{{ $label }}
{{ number_format($stats[$key] ?? 0) }}
@endforeach
{{-- ========== PIPELINE + RECENT SHIPMENTS ========== --}}
{{-- Pipeline (order.status breakdown) --}}
Shipment Pipeline
@php $pipeline = [ ['Pending', 'pending', '#f59e0b'], ['Accepted', 'accepted', '#06b6d4'], ['In Transit', 'intransit', '#3b82f6'], ['Delivered', 'delivered', '#10b981'], ['Cancelled', 'cancelled', '#ef4444'], ]; @endphp @foreach($pipeline as [$name, $key, $color])
{{ $name }} {{ number_format((int) ($stats[$key] ?? 0)) }}
@endforeach
{{-- Recent shipments --}}
Recent Shipments
View All
@forelse($recentShipments as $o) @empty @endforelse
Reference Merchant Items Status Date
{{ $o->order_reference }}
{{ $o->merchant?->company_name ?: ($o->merchant?->name ?: '—') }}
{{ number_format((int) ($o->total_items_quantity ?? 0)) }} {!! order_status_badge($o->status) !!} {{ web_date_in_timezone($o->created_at, 'M d, Y') }}
No shipments yet
{{-- ========== SHIPMENTS AWAITING QUOTE ========== --}} @if($pendingQuotes->count())
Shipments Awaiting Your Quote
View All
@foreach($pendingQuotes as $o) @endforeach
Reference Merchant Items Action
{{ $o->order_reference }} {{ $o->merchant?->company_name ?: ($o->merchant?->name ?: '—') }} {{ number_format((int) ($o->total_items_quantity ?? 0)) }} Submit Quote
@endif @endsection