@include('partials.head') @php $sidebarTablas = auth()->check() ? \App\Models\Producto::whereIn('id', \App\Models\Renovacion::where('idempresa', auth()->user()->id) ->where('activo', 1) ->distinct() ->pluck('idproducto') ) ->select('tabla') ->distinct() ->orderBy('tabla') ->pluck('tabla') ->filter() // elimina vacíos ->values() : collect(); $tablaLabels = [ 'certificados' => 'Certificados SSL', 'did' => 'Numeración DID', 'dominios' => 'Dominios', 'fax2mail' => 'Fax2Mail', 'fibra' => 'Fibra', 'hosting' => 'Hosting', 'movil' => 'Móvil', 'office' => 'Office 365', 'servidores' => 'Servidores', 'troncal' => 'Troncales', ]; @endphp {{ __('Dashboard') }} {{ __('Facturas') }} Todos @foreach($sidebarTablas->reject(fn($t) => $t === 'centralita') as $tabla) {{ $tablaLabels[$tabla] ?? Str::title($tabla) }} @endforeach Cuentas SIP @if(auth()->check()) @php $centralitas = \App\Models\Renovacion::with('producto') ->where('idempresa', auth()->user()->id) ->where('activo', 1) ->whereHas('producto', fn($q) => $q->where('tabla', 'centralita')) ->get(); @endphp @foreach($centralitas as $c) Centralita{{ $centralitas->count() > 1 ? ' ' . $c->descripcion : '' }} @endforeach @endif
{{ auth()->user()->name }} {{ auth()->user()->email }}
{{ __('Settings') }}
@csrf {{ __('Log out') }}
{{ $slot }} @fluxScripts