{{-- Header - matches orders page style --}}
{{-- Stats --}}
{{ $this->monthStats['total'] }} Drops {{ $this->monthStats['unshipped'] }} Unshipped {{ $this->monthStats['shipped'] }} Shipped {{ number_format($this->monthStats['totalQty']) }} Units
{{-- Month Navigation --}}
{{ $this->currentMonth->format('F Y') }}
{{-- Actions --}}
{{-- Filters Bar - matches orders page style --}}
{{-- Mobile Toggle --}} {{-- Filters --}}
{{-- Status Chips --}}
{{-- Customer Multi-Select Dropdown --}}
@if(count($customers) > 0) @endif @foreach($this->customerList as $c) @endforeach
{{-- Season Multi-Select Dropdown --}}
@if(count($seasons) > 0) @endif @foreach($this->seasonList as $s) @endforeach
{{-- Active Filters Count & Clear --}} @if($this->activeFiltersCount > 0)
{{ $this->activeFiltersCount }} active
@endif
{{-- Calendar Grid --}}
{{-- Weekday Headers --}}
@foreach(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] as $day)
{{ $day }}
@endforeach
{{-- Calendar Days --}}
@foreach($this->calendarDays as $day) @php $dayDrops = $this->dropsByDate->get($day['date'], collect()); $hasDrops = $dayDrops->count() > 0; $shippedCount = $dayDrops->where('shipped', true)->count(); $unshippedCount = $dayDrops->where('shipped', false)->count(); $overdueCount = $dayDrops->filter(fn($d) => !$d->shipped && $d->exfty < now()->startOfDay())->count(); @endphp
{{ $day['day'] }} @if($hasDrops) {{ $dayDrops->count() }} @endif
@if($hasDrops)
@foreach($dayDrops->take(3) as $drop) @php $statusClass = $this->getDropStatusClass($drop); $styleRef = $drop->line?->colourway?->style_versions?->styles?->customer_ref ?? $drop->line?->imported_style_ref ?? 'Unknown'; $customer = $drop->line?->order?->customer?->name ?? 'Unknown'; @endphp
{{ Str::limit($styleRef, 12) }} {{ Str::limit($customer, 10) }}
@endforeach @if($dayDrops->count() > 3)
+{{ $dayDrops->count() - 3 }} more
@endif
{{-- Status indicators --}}
@if($overdueCount > 0) @endif @if($unshippedCount > 0 && $overdueCount !== $unshippedCount) @endif @if($shippedCount > 0) @endif
@endif
@endforeach
{{-- Quick Month/Year Jump --}}
{{ $year }}
@for($m = 1; $m <= 12; $m++) @endfor
{{-- Day Detail Modal --}} @if($showDayModal && $selectedDate)

{{ Carbon\Carbon::parse($selectedDate)->format('l, F j, Y') }}

@if($this->selectedDateDrops->count() > 0)
@foreach($this->selectedDateDrops as $drop) @php $statusClass = $this->getDropStatusClass($drop); $styleRef = $drop->line?->colourway?->style_versions?->styles?->customer_ref ?? $drop->line?->imported_style_ref ?? 'Unknown'; $styleName = $drop->line?->colourway?->style_versions?->styles?->designs?->description ?? $drop->line?->imported_style_description ?? ''; $colourway = $drop->line?->colourway?->name ?? $drop->line?->imported_colour ?? ''; $customer = $drop->line?->order?->customer?->name ?? 'Unknown'; $customerPo = $drop->line?->order?->customer_po ?? ''; $season = $drop->line?->order?->season?->description ?? ''; $totalQty = $drop->sizes->sum('qty'); $shippedQty = $drop->sizes->sum('shipped_qty') ?: 0; $thumbUrl = $drop->line?->colourway?->img_thumb ? asset('storage/' . $drop->line->colourway->img_thumb) : null; @endphp
@if($thumbUrl) {{ $styleRef }} @else
@endif
{{ $styleRef }} @if($colourway) {{ $colourway }} @endif
@if($styleName)
{{ $styleName }}
@endif
{{ $customer }} @if($customerPo) {{ $customerPo }} @endif @if($season) {{ $season }} @endif
{{ number_format($totalQty) }}
units
@if($drop->shipped) Shipped @elseif($drop->exfty < now()->startOfDay()) Overdue @else Pending @endif
@endforeach
@else

No drops scheduled for this day

@endif
@endif {{-- Loading Overlay --}}