{{-- Seguimiento de arribo en destino y descargue del contenedor (shipsgo/ifame), con los datos de ShipsGo cruzados con shipsgo_seguimiento_maestro. Kit ui-ctc (MigracionLayout.MD L3, pantallas de L2a). El mapa es el visor embebido de ShipsGo (el dibujo propio con Leaflet no se usaba y se quitó). Abrir el detalle actualiza la fecha de descargue en la tabla local (actualizarFechaDescargue), como antes. --}} @php $estadoDe = function ($status) { $status = strtoupper((string) $status); if (in_array($status, ['SAILING', 'IN_TRANSIT', 'INPROGRESS'])) { return ['info', 'En tránsito']; } if (in_array($status, ['ARRIVED', 'WAITING_POD'])) { return ['aviso', 'En puerto']; } if ($status === 'DISCHARGED') { return ['exito', 'Entregado']; } if ($status === 'DELAYED') { return ['peligro', 'Con retraso']; } return ['neutro', $status ?: '—']; }; $filtros = ['TODOS' => 'Todos', 'EN_TRANSITO' => 'En tránsito', 'EN_PUERTO' => 'En puerto', 'ENTREGADO' => 'Entregado', 'CON_RETRASO' => 'Con retraso']; $eventos = ['EMSH' => 'Vacío al remitente', 'GTIN' => 'Entrada', 'LOAD' => 'Cargado', 'DEPA' => 'Salida', 'ARRV' => 'Llegada', 'DISC' => 'Descargado']; $fechaCorta = fn ($f) => $f ? \Carbon\Carbon::parse($f)->format('d M') : null; @endphp
| Pedido cliente | Naviera | Ruta y avance | ETA | Estado | Acciones |
|---|---|---|---|---|---|
| {{ $item['numero_pedido'] ?? 'DO: ' . $item['numero_do'] }} @if (!empty($item['numero_pedido']))DO {{ $item['numero_do'] }} · @endif{{ $item['container_number'] ?? 'Sin contenedor' }} @if (!empty($item['razon_social_destinatario'])) {{ $item['razon_social_destinatario'] }} @endif | {{ $item['carrier']['name'] ?? 'N/A' }} {{ $item['carrier']['scac'] ?? '' }} |
{{ $item['route']['port_of_loading']['location']['name'] ?? 'POL' }}
{{ $item['route']['port_of_discharge']['location']['name'] ?? 'POD' }}
{{ $item['route']['transit_percentage'] ?? 0 }}% · {{ $item['route']['transit_time'] ?? 0 }} días de tránsito
|
{{ $fechaCorta($item['route']['port_of_discharge']['date_of_discharge'] ?? null) ?? 'Pendiente' }} |
|
|
|
No se encontraron embarques para el filtro seleccionado. |
|||||
Detalle del embarque
DO {{ $e['numero_do'] ?? $e['reference'] ?? 'N/A' }} · Contenedor {{ $e['container_number'] ?? 'sin contenedor' }} · {{ $e['carrier']['name'] ?? 'N/A' }}
@if (!empty($e['razon_social_destinatario'])){{ $e['razon_social_destinatario'] }}@if (!empty($e['numero_identificacion_destin'])) ({{ $e['numero_identificacion_destin'] }})@endif
@endif{{ $titulo }}
{{ $valor }}
| Evento | Localización | Buque | Viaje | Fecha |
|---|---|---|---|---|
| {{ $mov['location']['name'] ?? (is_string($mov['location'] ?? null) ? $mov['location'] : 'N/A') }}@if (isset($mov['location']['country']['code'])) ({{ $mov['location']['country']['code'] }})@endif | {{ $mov['vessel']['name'] ?? (is_string($mov['vessel'] ?? null) ? $mov['vessel'] : '—') }} | {{ $mov['voyage'] ?? '—' }} | {{ isset($mov['timestamp']) ? \Carbon\Carbon::parse($mov['timestamp'])->format('d/m/Y') : '—' }} | |
No hay movimientos registrados para este embarque. | ||||
DO {{ $m['numero_do'] ?? $m['reference'] ?? 'N/A' }} · Contenedor {{ $m['container_number'] ?? 'sin contenedor' }} · {{ $m['carrier']['name'] ?? 'N/A' }}@if (!empty($m['razon_social_destinatario'])) · {{ $m['razon_social_destinatario'] }}@endif