{{-- Header --}} {{-- Filters Bar --}}
{{-- Mobile Toggle --}} {{-- Filters --}}
{{-- Status Chips --}}
@foreach($this->statusOptions as $key => $opt) @endforeach
{{-- Customer Dropdown --}}
@foreach($this->customers as $c) @endforeach
{{-- Season Dropdown --}}
@foreach($this->seasons as $s) @endforeach
{{-- Match Status Dropdown --}}
{{-- Date Range Dropdown --}}
@if($dateFrom || $dateTo) @endif
{{-- Active Filters Summary & Clear --}} @if($this->activeFiltersCount > 0)
{{ $this->activeFiltersCount }} active
@endif
{{-- Content --}}
{{-- Loading overlay --}}
Loading...
@if($this->orders->isEmpty()) {{-- Empty State --}}

No orders found

Try adjusting your search or filters

@if($this->activeFiltersCount > 0) @endif
@else {{-- Table --}}
@foreach($this->orders as $order) @php $matchPercent = $order->total_lines > 0 ? (int) round(($order->matched_lines / $order->total_lines) * 100) : 0; $statusOpt = $this->statusOptions[$order->status] ?? null; @endphp {{-- Order ID --}} {{-- Customer PO --}} {{-- Customer --}} {{-- Season --}} {{-- Status Badge --}} {{-- Match Status --}} {{-- Lines --}} {{-- Qty --}} {{-- Imported Date --}} {{-- Actions --}} @endforeach
Order @if($sortBy === 'id') @else @endif Customer PO @if($sortBy === 'customer_po') @else @endif Customer Season Status @if($sortBy === 'status') @else @endif Match Lines Qty Imported @if($sortBy === 'imported_at') @else @endif Actions
#{{ $order->id }} {{ $order->customer_po ?? '—' }} {{ $order->customer?->name ?? '—' }} {{ $order->season?->description ?? '—' }} @if($statusOpt) {{ $statusOpt['label'] }} @endif
{{ $matchPercent }}%
@if($order->unmatched_lines > 0) {{ $order->unmatched_lines }} unmatched @endif
{{ $order->total_lines }} @if($order->imported_at)
{{ $order->imported_at->format('d M') }}
{{ $order->imported_at->diffForHumans() }}
@else @endif
{{-- View/Edit --}} {{-- Status-specific actions --}} @if($order->status === 'skeleton') @elseif($order->status === 'pending_pd') @elseif($order->status === 'pending_merch') @endif {{-- Delete (except confirmed) --}} @if($order->status !== 'confirmed') @endif
{{-- Pagination --}} @if($this->orders->hasPages())
{{ $this->orders->links() }}
@endif @endif
{{-- Order Edit Panel --}} @livewire('commission.order-edit') {{-- Forward to PD Modal --}} @if($showForwardModal)

Forward to PD

Select a PD user to review this order.

@error('forwardToUserId')
{{ $message }}
@enderror
@endif {{-- Approval Modal --}} @if($showApprovalModal)
@if($approvalType === 'pd')

PD Approval

@else

Confirm Order

@endif
@if($approvalError)
{{ $approvalError }}
@endif @if($approvalType === 'pd')

Approve this order to send it to Merch for final confirmation.

@else

Confirm this order? It will become visible in the shipment schedule.

@endif
@endif {{-- Send Back to PD Modal --}} @if($showSendBackModal)

Send Back to PD

This order will be sent back to PD for further review.

@error('sendBackToUserId')
{{ $message }}
@enderror
@endif {{-- Single Order Filter Toast --}} @if($this->order)
Viewing Order #{{ $this->order }} Filtered view
@endif {{-- Toast Notifications --}}