@extends('layouts.dashboard') @section('content') @php $itemsCount = $catalog->items->count(); $withImages = $catalog->items->whereNotNull('image')->where('image', '!=', '')->count(); $withoutImages = $itemsCount - $withImages; $totalQty = $catalog->items->sum('qty'); $customerUrl = $catalog->status === 'active' && in_array($catalog->permanent_key, ['main', 'clearance'], true) ? route($catalog->permanent_key === 'main' ? 'catalogs.permanent.main' : 'catalogs.permanent.clearance') : route('catalogs.customer', $catalog); $permanentUrl = null; if (isset($catalog->user) && $catalog->user?->public_catalog_token) { $permanentUrl = url('/salesman/'.$catalog->user->public_catalog_token.'/catalog'); } @endphp
@if(session('success'))
{{ session('success') }}
@endif
@if($catalog->thumbnail_file) Catalog thumbnail @else
📄
No Preview
@endif

{{ $catalog->title }}

#{{ $catalog->id }} • {{ $catalog->created_at->format('d M Y h:i A') }}

{{ str_replace('_', ' ', $catalog->status) }} {{ $catalog->supplier }} @if(in_array($catalog->source_type, ['latest_regular', 'regular'])) Regular Price List @elseif(in_array($catalog->source_type, ['latest_clearance', 'clearance'])) Clearance List @elseif($catalog->source_type === 'van_stock') Van Stock @else {{ $catalog->source_type ?: 'Manual' }} @endif
@if($catalog->notes)
{{ $catalog->notes }}
@endif
Products
{{ number_format($itemsCount) }}
Total Qty
{{ number_format($totalQty) }}
With Images
{{ number_format($withImages) }}
Missing Images
{{ number_format($withoutImages) }}
Customer Links
👁 Open Customer Page @if($permanentUrl) @endif
@if($catalog->canBeModifiedBy(auth()->user()))
@csrf
@endif @if($catalog->pdf_file) 📄 Download PDF @endif @if($catalog->pdf_file && auth()->user()->isAdmin())
@csrf @method('DELETE')
@endif @if(auth()->user()->isAdmin())
@csrf @method('DELETE')
@endif ← Back to Catalogs

Product Preview

First products shown like the generated catalog.

{{ number_format($itemsCount) }} items
@foreach($catalog->items->take(12) as $item)
@if($item->product?->is_new_arrival)NEW ARRIVAL@endif
@if($item->image) @else
🖼
No Image
@endif
{{ ($item->price ?? 0) > 0 ? 'AED ' . number_format($item->price, 2) : 'Ask Price' }}
{{ $item->name }}
Part No: {{ $item->sku ?: '-' }}
Barcode: {{ $item->barcode ?: '-' }}
Qty: {{ number_format($item->qty ?? 0) }}
@endforeach
@if($itemsCount > 12)
Showing 12 of {{ number_format($itemsCount) }} products
@endif
@endsection