@extends('layouts.panel') @section('title', 'Ordenes de Trabajo') @section('content') {{-- FILTRO INTERACTIVO DE CICLO OPERATIVO (STEPPER FILTRABLE) --}} @php $workflowSteps = [ 'pendiente' => ['label' => 'Pendiente', 'icon' => 'bi-hourglass-split', 'color' => 'danger'], 'received' => ['label' => 'Recibido', 'icon' => 'bi-box-seam', 'color' => 'secondary'], 'washing' => ['label' => 'Lavado', 'icon' => 'bi-water', 'color' => 'info'], 'drying' => ['label' => 'Secado', 'icon' => 'bi-wind', 'color' => 'info'], 'folding' => ['label' => 'Doblado', 'icon' => 'bi-layers', 'color' => 'warning'], 'bagging' => ['label' => 'Embolsado', 'icon' => 'bi-bag-check', 'color' => 'warning'], 'ready' => ['label' => 'Listo', 'icon' => 'bi-check-circle', 'color' => 'success'], 'dispatched' => ['label' => 'Entregado', 'icon' => 'bi-truck', 'color' => 'primary'], ]; $currentStatus = request('status'); @endphp
Filtrar por Ciclo de Trabajo @if($currentStatus) Limpiar filtro de ciclo @endif
{{-- Botón "Todos" --}}
Todos
{{-- Etapas del Ciclo --}} @foreach ($workflowSteps as $key => $step) @php $isSelected = $currentStatus === $key; @endphp
{{ $step['label'] }}
@endforeach
{{-- Formulario Secundario de Búsqueda --}}
{{-- Mantener el filtro de ciclo activo si existe --}} @if(request('status')) @endif
@if(request()->hasAny(['search', 'service_line', 'status'])) @endif
@forelse ($orders as $order) {{-- Neto --}} {{-- IVA --}} {{-- Total --}} {{-- Estado Operativo / Trabajo --}} {{-- Estado Financiero / Pago (0: Pendiente, 1: Pagado, 2: Rechazado) --}} @empty @endforelse
Código Cliente Peso Neto IVA Total Estado Trabajo Estado Pago Retiro Acciones
{{ $order->order_code }} {{ $order->client->business_name ?? $order->contact_name }} {{ $order->weight_kg ? number_format($order->weight_kg, 2) . ' kg' : '—' }} {{ $order->net_amount ? '$' . number_format($order->net_amount, 0, ',', '.') : '—' }} {{ $order->tax_amount ? '$' . number_format($order->tax_amount, 0, ',', '.') : '—' }} {{ $order->total_amount ? '$' . number_format($order->total_amount, 0, ',', '.') : '—' }} @php $statusColors = [ 'pendiente' => 'danger', 'received' => 'secondary', 'washing' => 'info', 'drying' => 'info', 'folding' => 'warning', 'bagging' => 'warning', 'ready' => 'success', 'dispatched' => 'primary', ]; $color = $statusColors[$order->status] ?? 'secondary'; @endphp {{ $order->statusLabel() }} @php $paymentConfig = [ 0 => ['color' => 'warning', 'label' => 'Pendiente', 'icon' => 'bi-hourglass-split'], 1 => ['color' => 'success', 'label' => 'Pagado', 'icon' => 'bi-check-circle-fill'], 2 => ['color' => 'danger', 'label' => 'Rechazado', 'icon' => 'bi-x-circle-fill'], ]; $pState = $paymentConfig[(int) $order->payment_status] ?? $paymentConfig[0]; @endphp {{ $pState['label'] }} {{ $order->pickup_date?->format('d-m-Y') ?? '—' }}
@csrf @method('DELETE')
No hay pedidos registrados para este filtro.
{{ $orders->links('pagination::bootstrap-5') }}
{{-- ESTILOS CSS DEL STEPPER FILTRABLE EN PANEL --}} @endsection