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

{{ $greeting }}, {{ auth()->user()->company_name ?: auth()->user()->name }} 👋

Here's your shipment overview for today.

{{-- ========== QUOTES AWAITING ACTION ========== --}} @if(($stats['pending_orders'] ?? 0) > 0)
{{ $stats['pending_orders'] }} {{ \Illuminate\Support\Str::plural('order', $stats['pending_orders']) }} waiting for cargo company quote
Review Now
@endif {{-- ========== ORDERS SNAPSHOT ========== --}}
My Orders
View All
@php $orderCards = [ ['Total Orders', 'total_orders', 'ri-shopping-bag-3-line', 'blue'], ['Drafts', 'draft_orders', 'ri-draft-line', 'gray'], ['Pending', 'pending_orders', 'ri-time-line', 'amber'], ['Active', 'active_orders', 'ri-loader-4-line', 'cyan'], ['Completed', 'completed_orders', 'ri-checkbox-circle-line', 'green'], ['Cancelled', 'cancelled_orders', 'ri-close-circle-line', 'red'], ]; @endphp @foreach($orderCards as [$label, $key, $icon, $color])
{{ $label }}
{{ number_format($stats[$key]) }}
@endforeach
{{-- ========== STATUS + RECENT ORDERS ========== --}}
{{-- Order status list --}}
Order Status
@php $colorMap = [ 'warning' => '#f59e0b', 'info' => '#06b6d4', 'primary' => '#3b82f6', 'success' => '#10b981', 'danger' => '#ef4444', 'secondary' => '#64748b', ]; @endphp @foreach($statusBreakdown as $info)
{{ $info['text'] }} {{ $info['total'] }}
@endforeach
{{-- Recent orders --}}
Recent Orders
View All
@forelse($recentOrders as $o) @empty @endforelse
Reference Cargo Company Status Date
{{ $o->order_reference }}
{{ $o->cargoCompany->company_name ?? $o->cargoCompany->name ?? '—' }}
{!! order_status_badge($o->status) !!} {{ web_date_in_timezone($o->created_at, 'M d, Y') }}
No orders yet
{{-- ========== QUOTES AWAITING ACTION ========== --}} @if($recentQuotes->count())
Quotes Awaiting Your Action
View All
@foreach($recentQuotes as $q) @endforeach
Reference Cargo Company Quote Amount Action
{{ $q->order_reference }} {{ $q->cargoCompany->company_name ?? $q->cargoCompany->name ?? '—' }} {{ number_format((float) ($q->activeQuote->total_amount ?? 0), 2) }} AED Review
@endif @endsection