@extends('layouts.admin') @section('title', 'Weather — Global Supply Chain') @section('page_title', 'Weather Monitoring') @section('content') {{-- ── Header ──────────────────────────────────────────────────── --}}

Weather Monitoring

Latest weather records, sorted by storm risk. @if($lastSynced) · Last synced {{ \Carbon\Carbon::parse($lastSynced)->diffForHumans() }} @endif

@csrf
{{-- ── Filters ──────────────────────────────────────────────────── --}}
@if(request()->hasAny(['search', 'status'])) Clear @endif
{{-- ── Table ────────────────────────────────────────────────────── --}}
@forelse($records as $w) @empty @endforelse
Country City Condition Temp °C Humidity % Wind km/h Rain mm Storm Risk Recorded
@if($w->country?->flag_url) @endif {{ $w->country?->name ?? '—' }}
{{ $w->city ?? '—' }} {{ $w->weather_status ?? '—' }} {{ $w->temperature !== null ? number_format($w->temperature, 1) : '—' }} {{ $w->humidity !== null ? number_format($w->humidity, 0) : '—' }} {{ $w->wind_speed !== null ? number_format($w->wind_speed, 1) : '—' }} {{ $w->rainfall !== null ? number_format($w->rainfall, 1) : '—' }} @php $risk = $w->storm_risk ?? 0; $color = $risk >= 75 ? 'text-red-400' : ($risk >= 50 ? 'text-amber-400' : ($risk >= 25 ? 'text-yellow-400' : 'text-emerald-400')); @endphp {{ $risk }}% {{ $w->recorded_at?->format('Y-m-d H:i') ?? '—' }}
No weather records yet. Run php artisan countries:sync --weather to import.
@if($records->hasPages())
{{ $records->links() }}
@endif
@endsection