@php
$cards = [
[
'key' => 'regular',
'title' => 'Regular Main Catalog',
'icon' => '📘',
'catalog' => $regularCatalog,
'color' => 'indigo',
'replace' => route('import-center.create'),
],
[
'key' => 'clearance',
'title' => 'Clearance Catalog',
'icon' => '🔥',
'catalog' => $clearanceCatalog,
'color' => 'rose',
'replace' => route('import-center.create'),
],
];
@endphp
@foreach($cards as $card)
@php
$catalog = $card['catalog'];
$stats = $catalogStats[$card['key']];
@endphp
{{ $card['icon'] }}
{{ $card['title'] }}
@if($catalog)
Active catalog #{{ $catalog->id }} • {{ \Carbon\Carbon::parse($catalog->created_at)->format('Y-m-d H:i') }}
@else
No active catalog yet.
@endif
{{ $catalog ? 'Active' : 'Missing' }}
@if($catalog)
🔗 Permanent customer catalog URL
{{ route($card['key'] === 'regular' ? 'catalogs.permanent.main' : 'catalogs.permanent.clearance') }}
@endif
Products
{{ number_format($stats['products']) }}
Qty
{{ number_format($stats['qty']) }}
Images
{{ number_format($stats['images']) }}
Missing
{{ number_format($stats['missing']) }}
@endforeach