{{-- Lists ── --}}
@forelse($lists as $list) @php $total = $list->items->count(); $verified = $list->items->where('scanned',true)->count(); $pct = $total > 0 ? round($verified/$total*100) : 0; @endphp
#{{ $list->id }} — {{ $list->customer_name }} {{ $list->status }}
{{ $list->packing_date?->format('d/m/Y') ?? '—' }} · {{ $total }} rollos
{{ $verified }}/{{ $total }} verificados ({{ $pct }}%)
@empty
Sin listas de empaque.
@endforelse
{{ $lists->links() }}
{{-- Detail ── --}} @if($selected)
{{-- Header --}}
Lista #{{ $selected->id }} — {{ $selected->customer_name }}
{{ $selected->packing_date?->format('d/m/Y') ?? '—' }} @php $vCount = $selected->items->where('scanned',true)->count(); $tCount = $selected->items->count(); @endphp · {{ $vCount }}/{{ $tCount }} verificados
@if($selected->status === 'verified' && !$selected->shipment) @endif @if($selected->shipment) Enviado — {{ $selected->shipment->tracking_number ?: 'Sin tracking' }} @endif
{{-- Scan input (spec §6, F3) ── Alpine manages focus restoration ──────────────────────────── --}} @if($selected->status === 'open' || $selected->status === 'verified')
Escanear Código de Rollo
@if($scanMessage)
{{ $scanMessage }}
@endif
Posiciónese en el campo y escanee el código de barras del rollo. El campo se limpiará automáticamente.
@endif {{-- Items list ── --}}
Rollos en lista{{ $tCount }}
@forelse($selected->items->sortBy('id') as $item)
{{ $item->scanned ? '✅' : '⬜' }}
{{ $item->roll?->display_code ?? '—' }}
{{ $item->roll?->article_id ?? '' }} @if($item->roll?->current_length_m) · {{ number_format($item->roll->current_length_m,1) }}m @endif @if($item->roll?->current_weight_kg) · {{ number_format($item->roll->current_weight_kg,2) }}kg @endif
@if($item->scanned)
{{ $item->verified_by_name }}
{{ $item->verified_at?->format('d/m H:i') }}
@endif @if($item->exception_note) ⚠ {{ $item->exception_note }} @endif
@empty
Sin rollos en esta lista.
@endforelse
@endif
{{-- Create modal ── --}} @if($showCreateModal) @endif {{-- Ship modal ── --}} @if($showShipModal) @endif