@extends('transporter.templates.layout') @section('head') @endsection @section('content') @php $hour = (int) now()->format('H'); $greeting = $hour < 12 ? 'Good morning' : ($hour < 18 ? 'Good afternoon' : 'Good evening'); $userName = auth()->user()->company_name ?: auth()->user()->name; // Active = everything except completed / rejected (matches API getList 'now' tab) $activeCount = ($stats['assigned'] ?? 0) + ($stats['accepted'] ?? 0) + ($stats['collected'] ?? 0) + ($stats['intransit'] ?? 0) + ($stats['arrived'] ?? 0); @endphp {{-- ========== GREETING ========== --}}
Here's your delivery overview for today.
| Tracking | Cargo Company | Status | Action |
|---|---|---|---|
| {{ $d->tracking_number }} |
{{ $d->order?->cargoCompany?->company_name
?: ($d->order?->cargoCompany?->name ?: '—') }}
|
@php $ds = config('global.transporter_delivery_statuses')[$d->status] ?? ['text'=>'—','class'=>'secondary']; @endphp {{ $ds['text'] }} | Manage |
|
No active deliveries
|
|||
| Tracking | Cargo Company | Qty | Charges | Date |
|---|---|---|---|---|
| {{ $d->tracking_number }} |
{{ $d->order?->cargoCompany?->company_name
?: ($d->order?->cargoCompany?->name ?: '—') }}
|
{{ number_format((int) $d->quantity) }} | {{ number_format((float) $d->total_charges, 2) }} AED | {{ web_date_in_timezone($d->created_at, 'M d, Y') }} |