{{-- SortableJS is bundled via app.js (window.Sortable) --}} @push('scripts') @endpush {{-- Company selector --}}
{{-- Tab bar --}}
{{-- Manage products modal (remove / move) --}} @if ($manageModalOpen)

Products in "{{ $managingCategoryName }}"

{{-- Toolbar: select-all + move/remove actions --}}
{{ count($manageSelectedIds) > 0 ? count($manageSelectedIds) . ' selected' : '' }}
@if (empty($manageResults))

{{ mb_strlen(trim($manageSearch)) >= 2 ? 'No products match "' . $manageSearch . '".' : 'No products in this category.' }}

@else @foreach ($manageResults as $product) @php $isSel = in_array($product['id'], $manageSelectedIds); @endphp
{{ $product['sku'] ?: '—' }} {{ $product['name'] }}
@endforeach @endif
@endif {{-- Assign products modal --}} @if ($assignModalOpen)

Assign products to "{{ $assigningCategoryName }}"

@if (mb_strlen(trim($productSearch)) < 2)

Type at least 2 characters to search…

@elseif (empty($productResults))

No products found for “{{ $productSearch }}”.

@else @foreach ($productResults as $product) @php $isSelected = in_array($product['id'], $selectedProductIds); $alreadyIn = $product['already_assigned'] ?? false; @endphp
{{ $product['sku'] ?: '—' }} {{ $product['name'] }} @if ($alreadyIn) ✓ Already here @elseif ($product['category_name']) {{ $product['category_name'] }} @endif
@endforeach @endif
@endif {{-- ── Tree tab ── --}} @if ($activeTab === 'tree')
@if (empty($tree))
No categories yet. Use New Category to get started.
@else {{-- Add root-level category row — sits above the tree nodes --}}
@include('filament.pages.category-tree-nodes', ['nodes' => $tree, 'level' => 0, 'parentId' => null, 'parentName' => '']) @endif {{-- Loading overlay shown while move is saving --}}
Saving…
{{-- Drag-to-move confirmation modal --}}

Save new position?

Moving position of .

All products in this category will follow automatically.

{{-- ── Bulk assign tab ── --}} @else
{{-- Filter bar --}}
{{ number_format($bulkTotal) }} product(s)
{{-- Assign / Remove bar --}} {{-- Toolbar --}}
@if (count($bulkSelectedIds) > 0) {{ count($bulkSelectedIds) }} selected @endif
{{-- Product table --}}
@forelse ($bulkResults as $product) @php $isSel = in_array($product['id'], $bulkSelectedIds); @endphp @empty @endforelse
SKU Name Vendor Current Category
@if ($product['image_url']) @else @endif {{ $product['sku'] ?: '—' }} {{ $product['name'] }} {{ $product['vendor'] ?: '' }} @if ($product['category_name']) {{ $product['category_name'] }} @endif
No products match the current filter.
{{-- Pagination --}} @php $perPage = 50; $totalPages = (int) ceil($bulkTotal / $perPage); @endphp
Showing {{ (($bulkPage - 1) * $perPage) + 1 }}–{{ min($bulkPage * $perPage, $bulkTotal) }} of {{ number_format($bulkTotal) }}
Page {{ $bulkPage }} of {{ $totalPages ?: 1 }}
@endif {{-- Notes drawer — fixed vertical tab on right edge --}}