{{-- We place the pg div contents directly here seamlessly. The outer x-layouts::app is handled by the calling page. --}}
{{ $isVendor ? 'Vendor' : 'Admin' }} Products
Products
Manage all marketplace digital products
@php $createRoute = auth()->user()->role_prefix . '.products.create'; @endphp New Product
@if(session('success'))
✓ {{ session('success') }}
@endif {{-- Stats Row --}}
Total Products
{{ App\Modules\Product\Models\Product::when($isVendor, fn($q) => $q->where('vendor_id', auth()->id()))->count() }}
Published
{{ App\Modules\Product\Models\Product::when($isVendor, fn($q) => $q->where('vendor_id', auth()->id()))->where('status','published')->count() }}
Pending Review
{{ App\Modules\Product\Models\Product::when($isVendor, fn($q) => $q->where('vendor_id', auth()->id()))->where('status','pending')->count() }}
Rejected
{{ App\Modules\Product\Models\Product::when($isVendor, fn($q) => $q->where('vendor_id', auth()->id()))->where('status','rejected')->count() }}
{{-- Filters --}}
@if(!$isVendor) @endif
@if(count($selectedRows) > 0)
{{ count($selectedRows) }} products selected
@endif {{-- Table --}}
@if(!$isVendor)@endif @if(!$isVendor)@endif @forelse ($products as $p) @if(!$isVendor) @endif @empty @endforelse
ProductVendorCategory Price Sales Status Badges Actions
@if($p->thumbnail) @else
📦
@endif
{{ $p->title }}
/{{ $p->slug }}
{{ $p->vendor?->name ?? '—' }}{{ $p->category?->name ?? '—' }} ${{ number_format($p->discount_price ?? $p->price, 2) }} @if($p->discount_price) ${{ number_format($p->price, 2) }} @endif {{ number_format($p->sales_count) }} @if($p->status === 'published') Published @elseif($p->status === 'pending') Pending @elseif($p->status === 'rejected') Rejected @else Draft @endif
@if($p->status === 'pending' && !$isVendor) @php $approveRoute = auth()->user()->role_prefix . '.products.approve'; @endphp @if(Route::has($approveRoute))
@csrf
@else @endif @endif @if(!empty($p->slug)) @else @endif @php $editRoute = auth()->user()->role_prefix . '.products.edit'; @endphp @if(Route::has($editRoute)) @else @endif @if($p->primaryFile()) @endif
📦
No products found
@php $createRoute = auth()->user()->role_prefix . '.products.create'; @endphp
Try adjusting your filters or create a new product.
{{-- Reject Modal --}}