@extends('layouts.admin') @section('title', 'Port Dataset — DaisyRisk Admin') @section('page-title', 'Port Dataset') @push('styles') @endpush @section('content') {{-- ── Flash Messages ────────────────────────────────────────── --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- ── Page Header ─────────────────────────────────────────────── --}}

Port Dataset

Kelola dataset pelabuhan global dan sinkronisasi data.

@csrf
{{-- ── Statistic Cards ───────────────────────────────────────────── --}}
Total Ports
{{ number_format($stats['total']) }}
Semua pelabuhan
Open Ports
{{ number_format($stats['open']) }}
Pelabuhan aktif
Closed Ports
{{ number_format($stats['closed']) }}
Pelabuhan tutup
Congested Ports
{{ number_format($stats['congested']) }}
Pelabuhan padat
{{-- ── Filter Area ──────────────────────────────────────────────── --}}
Reset
{{-- ── Data Table ────────────────────────────────────────────────── --}}
@forelse($ports as $port) @php $statusKey = strtolower($port->status ?? 'default'); $badgeClass = match($statusKey) { 'open' => 'pd-badge-open', 'closed' => 'pd-badge-closed', 'congested' => 'pd-badge-congested', 'limited' => 'pd-badge-limited', default => 'pd-badge-default', }; @endphp @empty @endforelse
No Port Name Country City UN/LOCODE Latitude Longitude Status Last Updated Action
{{ $ports->firstItem() + $loop->index }} {{ $port->port_name }}
{{ $port->country?->name ?? '—' }}
{{ $port->city ?: '—' }} @if($port->port_code) {{ $port->port_code }} @else — @endif @if($port->latitude !== null) {{ number_format($port->latitude, 4) }} @else — @endif @if($port->longitude !== null) {{ number_format($port->longitude, 4) }} @else — @endif {{ $port->status ?? 'Unknown' }} {{ $port->updated_at?->format('d M Y') ?? '—' }}
No Port Data Found
@if($search || $status || $countryId) Tidak ada pelabuhan yang sesuai filter. Coba reset filter. @else Belum ada data pelabuhan. Klik Sync API untuk mengambil data. @endif
@if(!$search && !$status && !$countryId)
@csrf
@else Reset Filter @endif
{{-- Table Footer / Pagination --}} @if($ports->total() > 0) @endif
@endsection @push('scripts') @endpush