@extends('layouts.app') @section('title', 'Shipment Predictions') @section('breadcrumbs') @endsection @section('content')

Shipment Predictions

AI-powered ETA predictions and accuracy tracking

@php $stats = [['label'=>'Prediction Accuracy','count'=>($stats['accuracy']??92).'%','icon'=>'bi-bullseye','color'=>'success'],['label'=>'Total Predictions','count'=>$stats['total']??0,'icon'=>'bi-graph-up','color'=>'primary'],['label'=>'Early Arrivals','count'=>$stats['early']??0,'icon'=>'bi-arrow-up-circle','color'=>'info'],['label'=>'Delayed','count'=>$stats['delayed']??0,'icon'=>'bi-clock-history','color'=>'warning']]; @endphp @foreach($stats as $stat)
@endforeach
ETA Accuracy Over Time
Recent Predictions
@forelse($predictions ?? [] as $p) @empty @endforelse
ShipmentRoutePredicted ETAActual ETADeviationAccuracy
{{ $p->shipment_number ?? 'N/A' }} {{ $p->origin ?? '' }} → {{ $p->destination ?? '' }} {{ optional($p->predicted_eta)->format('d M Y') ?? 'N/A' }} {{ optional($p->actual_eta)->format('d M Y') ?? 'Pending' }} {{ ($p->deviation_days ?? 0) > 0 ? '+' : '' }}{{ $p->deviation_days ?? 0 }} days {{ number_format($p->accuracy ?? 0, 1) }}%
No predictions yet
Prediction Factors
@foreach(['Weather' => 85, 'Port Congestion' => 72, 'Route History' => 90, 'Carrier Performance' => 78, 'Customs Processing' => 65] as $factor => $weight)
{{ $factor }}{{ $weight }}%
@endforeach
@endsection @push('scripts') @endpush