@extends('layouts.app') @section('title', 'Gestión Cajas NAP') @section('content')
Gestión Cajas NAP
{{ $cajas->count() }} cajas registradas
Ver Mapa Agregar Caja NAP
{{-- Leyenda --}}
Libre Ocupado — clic para ver conexión
@if($cajas->isEmpty())
Sin cajas NAP. Agrega la primera.
@else @foreach($cajas as $c) @php $total = $c->ports->count(); $usados = $c->ports->where('estado','ocupado')->count(); $pct = $total > 0 ? round(($usados/$total)*100) : 0; @endphp
NAP-{{ $c->nombre }} {{ $total }} puertos {{ $total - $usados }} libres @if($usados) {{ $usados }} ocupados @endif @if($c->zona) {{ $c->zona }} @endif
@if($c->splitterPort) {{ $c->splitterPort->splitter->nombre }} S{{ $c->splitterPort->numero }} @else Sin splitter @endif
@if($c->lat && $c->lng) GPS @endif
@csrf @method('DELETE')
@if($c->direccion)
{{ $c->direccion }}
@endif
Ocupación: {{ $usados }}/{{ $total }} {{ $pct }}%
@foreach($c->ports as $p) @endforeach
@endforeach @endif @include('partials.port-tooltip') @endsection