@extends('layouts.admin') @section('title', $port->port_name . ' — Port Dataset') @section('page-title', 'Port Detail') @section('content') {{-- ── Action Buttons ────────────────────────────────────────────── --}}
Back to Ports
@if($port->latitude !== null && $port->longitude !== null) View on Google Maps @endif
{{-- ── Header Card ─────────────────────────────────────────── --}}

{{ $port->port_name }}

@if($port->country)
@if($port->country->flag_url) Flag of {{ $port->country->name }} @endif
{{ $port->country->name }}
@endif
UN/LOCODE: {{ $port->port_code ?? 'Not Available' }} Status: @if($port->status) @php $badgeClass = match($port->status) { 'Open' => 'success', 'Limited' => 'warning', 'Congested' => 'warning', 'Closed' => 'danger', default => 'secondary', }; @endphp {{ $port->status }} @else Not Available @endif Risk: @if($port->congestion_level !== null) @php $riskBadgeClass = match(true) { $port->congestion_level >= 80 => 'danger', $port->congestion_level >= 50 => 'warning', $port->congestion_level >= 20 => 'info', default => 'success', }; @endphp {{ $port->congestion_label }} Risk @else Not Available @endif Last Updated: {{ $port->updated_at ? $port->updated_at->format('d M Y, H:i') : 'Not Available' }}
{{-- ── Left Column: Port & Country Info ─────────────────────────────────────────── --}}
{{-- Port Information Card --}}
Port Information
Port Name {{ $port->port_name ?? 'Not Available' }}
UN/LOCODE {{ $port->port_code ?? 'Not Available' }}
Country @if($port->country) {{ $port->country->name }} @else Not Available @endif
City {{ $port->city ?? 'Not Available' }}
Latitude {{ $port->latitude !== null ? number_format($port->latitude, 6) : 'Not Available' }}
Longitude {{ $port->longitude !== null ? number_format($port->longitude, 6) : 'Not Available' }}
Capacity {{ $port->capacity ? number_format($port->capacity) . ' TEU' : 'Not Available' }}
Congestion Level @if($port->congestion_level !== null) {{ $port->congestion_level }}% ({{ $port->congestion_label }}) @else Not Available @endif
Data Source {{ $port->source ?? 'Not Available' }}
@if($port->description)
Description

{{ $port->description }}

@endif
{{-- Map Card --}}
Map Location
@if($port->latitude !== null && $port->longitude !== null)
@else

Coordinates Not Available

@endif
{{-- Country Information Card --}}
Country Information
@if($port->country)
Name {{ $port->country->name ?? 'Not Available' }}
ISO Codes {{ $port->country->iso2 ?? 'N/A' }} {{ $port->country->iso3 ?? 'N/A' }}
Capital {{ $port->country->capital ?? 'Not Available' }}
Region {{ $port->country->region ?? 'Not Available' }}
Subregion {{ $port->country->subregion ?? 'Not Available' }}
Area {{ $port->country->area ? number_format($port->country->area) . ' km²' : 'Not Available' }}
Population {{ $port->country->population ? number_format($port->country->population) : 'Not Available' }}
Currency @if($port->country->currency) {{ $port->country->currency->name }} ({{ $port->country->currency->code }}) @else Not Available @endif
Calling Code {{ $port->country->calling_code ? '+' . $port->country->calling_code : 'Not Available' }}
Internet Domain {{ $port->country->internet_domain ?? 'Not Available' }}
Timezone {{ $port->country->timezone ?? 'Not Available' }}
@else

Country information is not available for this port.

@endif
@endsection @push('styles') @if($port->latitude !== null && $port->longitude !== null) @endif @endpush @push('scripts') @if($port->latitude !== null && $port->longitude !== null) @endif @endpush