Add product status tabs, persist user collection seeding, and enhance staging visibility

This commit is contained in:
2026-11-01 16:17:02 +01:00
parent 11f6efad09
commit c06701673a
8 changed files with 281 additions and 68 deletions
+62 -3
View File
@@ -28,6 +28,51 @@
</div>
</div>
<!-- Status Filter Tabs -->
<div class="flex items-center space-x-2 border-b border-slate-800 pb-2 overflow-x-auto text-xs font-bold">
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'all'])) }}" class="px-4 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'all' ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-400 hover:text-white hover:bg-slate-900' }}">
<span>Alle Producten</span>
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'all') === 'all' ? 'bg-slate-950 text-amber-400 font-black' : 'bg-slate-800 text-slate-400' }}">
{{ $totalAll ?? $products->total() }}
</span>
</a>
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'published'])) }}" class="px-4 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'published' ? 'bg-emerald-500 text-white font-black' : 'text-slate-400 hover:text-white hover:bg-slate-900' }}">
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400"></span>
<span>Live in Webshop</span>
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'all') === 'published' ? 'bg-slate-950 text-emerald-400 font-black' : 'bg-slate-800 text-slate-400' }}">
{{ $totalPublished ?? 0 }}
</span>
</a>
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'draft'])) }}" class="px-4 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'draft' ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-400 hover:text-white hover:bg-slate-900' }}">
<i data-lucide="layers" class="w-3.5 h-3.5"></i>
<span>Concepten / MakerWorld Staging</span>
@if(($totalDraft ?? 0) > 0)
<span class="px-1.5 py-0.5 rounded text-[10px] bg-amber-400 text-slate-950 font-black">
{{ $totalDraft }}
</span>
@endif
</a>
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'makerworld'])) }}" class="px-4 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'makerworld' ? 'bg-indigo-600 text-white font-black' : 'text-slate-400 hover:text-white hover:bg-slate-900' }}">
<i data-lucide="download-cloud" class="w-3.5 h-3.5"></i>
<span>MakerWorld Modellen</span>
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'all') === 'makerworld' ? 'bg-slate-950 text-indigo-300 font-black' : 'bg-slate-800 text-slate-400' }}">
{{ $totalMakerWorld ?? 0 }}
</span>
</a>
@if(($totalDraft ?? 0) > 0)
<div class="ml-auto">
<a href="{{ route('admin.makerworld.staging') }}" class="px-3 py-1.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition flex items-center space-x-1.5 shadow-sm">
<i data-lucide="layers" class="w-3.5 h-3.5"></i>
<span>Naar Artikel Beheer ({{ $totalDraft }} nieuw) &rarr;</span>
</a>
</div>
@endif
</div>
<!-- Search & Filters -->
<div class="p-4 rounded-2xl bg-slate-900 border border-slate-800 flex flex-col sm:flex-row items-center justify-between gap-3">
<form action="{{ route('admin.products.index') }}" method="GET" class="w-full sm:w-auto flex-1 flex items-center space-x-2">
@@ -109,11 +154,19 @@
</td>
<td class="py-3.5 px-4">
<div class="flex flex-col gap-1">
@if($product->is_active)
<div class="flex flex-col gap-1 items-start">
@if($product->status === 'draft')
<span class="inline-flex items-center space-x-1 px-2 py-0.5 rounded-md bg-amber-400/20 text-amber-300 border border-amber-400/40 text-[10px] font-black uppercase tracking-wider">
<i data-lucide="layers" class="w-3 h-3"></i>
<span>Concept Staging</span>
</span>
<a href="{{ route('admin.makerworld.staging') }}" class="text-[10px] text-amber-400 hover:underline font-bold">
Beoordeel in Artikel Beheer &rarr;
</a>
@elseif($product->is_active)
<span class="inline-flex items-center space-x-1 text-emerald-400 text-[11px] font-bold">
<span class="w-1.5 h-1.5 rounded-full bg-emerald-400"></span>
<span>Actief</span>
<span>Live in Webshop</span>
</span>
@else
<span class="inline-flex items-center space-x-1 text-slate-500 text-[11px] font-bold">
@@ -122,6 +175,12 @@
</span>
@endif
@if($product->makerworld_id)
<span class="text-[10px] text-indigo-400 font-mono">
MakerWorld #{{ $product->makerworld_id }}
</span>
@endif
@if($product->is_featured)
<span class="inline-flex items-center text-amber-400 text-[10px] font-bold">
★ Uitgelicht