@extends('front.layouts.main') @section('contenido')

Portal

Bienvenido, {{ auth()->user()->name }} | @php $casilla = DB::table('casilla') ->where('usuario_id', '=', auth()->user()->usuario_id) ->first(); @endphp Casilla: {{ $casilla->casilla }}

Inicio / Portal

@php $direccionesHeader = DB::table('direcciones_empresa') ->where('activo', true) ->orderBy('orden', 'ASC') ->get(); @endphp @foreach($direccionesHeader as $dir)

{{ $dir->titulo }}

{{ $dir->direccion }}

@if($dir->telefono)

{{ $dir->telefono }}

@endif @if($dir->observacion)

{{ $dir->observacion }}

@endif
@endforeach
{{-- MIS PAQUETES --}} @include('front.panel.mis-paquetes') {{-- ENTREGADOS --}}

Paquetes entregados

@if(($paquetesEntregados ?? collect())->isEmpty())
No tenés paquetes entregados todavía.
@else
@foreach($paquetesEntregados as $p) @php $fecha = \Carbon\Carbon::parse($p->fecha_creacion)->format('d/m/Y'); $valorF = (int) preg_replace('/\D+/', '', (string)($p->valor ?? '0')); $valorFmt = number_format((float)($valorF), 0, ',', '.'); // ← 2 decimales $pesoFmt = number_format((float)($p->peso ?? 0), 3, ',', '.'); // ← 2 decimales @endphp

FECHA

{{ $fecha }}

TOTAL

Gs. {{ $valorFmt }}

ESTADO

Entregado

PAQUETE #

{{ $p->paquete_id }}

{{-- reservado por si querés poner un botón o link --}}
Entregado

{{ $p->descripcion }}

{{ $p->proveedor_nombre }}

Vendido por: {{ $p->proveedor_nombre ?? '-' }}

Peso: {{ $pesoFmt }} gr.

Costo: Gs. {{ $valorFmt }}

@endforeach
@endif
{{-- PERFIL --}}

Perfil

@php $tipoDoc = auth()->user()->persona->tipo_documento ?? null; @endphp
@php $telefono = ''; // Intentar obtener del medio de contacto (tipo 26 = teléfono) $medioContacto = auth()->user()->persona->mediosContacto->where('tipo_medio_contacto', 26)->first(); if ($medioContacto) { $telefono = $medioContacto->valor_medio_contacto; } elseif( auth()->user()->persona->telefono == null ) { $usuario = DB::table('solicitud_registro') ->where('email', '=', auth()->user()->codigo_usuario) ->first(); $telefono = $usuario->numero_telefono ?? ''; } else { $telefono = auth()->user()->persona->telefono; } @endphp
{{-- MIS DIRECCIONES --}}

Mis direcciones

Agregar
@include('front.panel.complementos.tablaDirecciones')
{{-- FACTURACIÓN --}}

Facturación

Agregar
@include('front.panel.complementos.tablaFactura')
{{-- AUTORIZACION A TERCEROS --}}

Persona a autorizar

@include('front.panel.complementos.tablaTerceros')

Tracking copia en portapapeles

@endsection