Complete redesign: modern, fresh, subtle Scandinavian tech studio look & feel for webshop and admin
This commit is contained in:
@@ -6,58 +6,57 @@
|
||||
<div class="space-y-6 max-w-xl mx-auto">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-200/80">
|
||||
<div>
|
||||
<a href="{{ route('admin.categories.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
|
||||
<a href="{{ route('admin.categories.index') }}" class="text-xs text-slate-500 hover:text-slate-900 font-medium inline-flex items-center space-x-1 mb-1 transition">
|
||||
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
|
||||
<span>Terug naar Categorieën</span>
|
||||
</a>
|
||||
<h1 class="font-heading text-2xl font-black text-white">Categorie Bewerken: {{ $category->name }}</h1>
|
||||
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Categorie Bewerken</h1>
|
||||
<p class="text-xs text-slate-500 mt-0.5">{{ $category->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Edit Form -->
|
||||
<form action="{{ route('admin.categories.update', $category) }}" method="POST" class="space-y-6">
|
||||
<form action="{{ route('admin.categories.update', $category) }}" method="POST" class="space-y-5">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4">
|
||||
<div class="p-6 rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-4">
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-300">Categorienaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name', $category->name) }}" required class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2.5 text-xs text-white font-bold focus:outline-none focus:ring-2 focus:ring-amber-400">
|
||||
<div class="space-y-1">
|
||||
<label class="block text-xs font-medium text-slate-700">Categorienaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name', $category->name) }}" required class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 font-semibold focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-300">Omschrijving</label>
|
||||
<textarea name="description" rows="3" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3.5 py-2 text-xs text-white leading-relaxed">{{ old('description', $category->description) }}</textarea>
|
||||
<div class="space-y-1">
|
||||
<label class="block text-xs font-medium text-slate-700">Omschrijving</label>
|
||||
<textarea name="description" rows="3" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 leading-relaxed focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">{{ old('description', $category->description) }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-300">Lucide Icoon</label>
|
||||
<input type="text" name="icon" value="{{ old('icon', $category->icon) }}" placeholder="sparkles, zap, film..." class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
|
||||
<div class="space-y-1">
|
||||
<label class="block text-xs font-medium text-slate-700">Lucide Icoon</label>
|
||||
<input type="text" name="icon" value="{{ old('icon', $category->icon) }}" placeholder="sparkles, zap, film..." class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-300">Volgorde</label>
|
||||
<input type="number" name="sort_order" value="{{ old('sort_order', $category->sort_order) }}" class="w-full bg-slate-950 border border-slate-700 rounded-xl px-3 py-2 text-xs text-white">
|
||||
<div class="space-y-1">
|
||||
<label class="block text-xs font-medium text-slate-700">Volgorde</label>
|
||||
<input type="number" name="sort_order" value="{{ old('sort_order', $category->sort_order) }}" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end space-x-3">
|
||||
<a href="{{ route('admin.categories.index') }}" class="px-4 py-2.5 rounded-xl bg-slate-800 text-slate-300 hover:text-white text-xs font-bold transition">
|
||||
<div class="flex items-center justify-end space-x-2.5">
|
||||
<a href="{{ route('admin.categories.index') }}" class="px-4 py-2 rounded-xl bg-white hover:bg-slate-50 border border-slate-200 text-slate-700 text-xs font-medium transition">
|
||||
Annuleren
|
||||
</a>
|
||||
<button type="submit" class="px-6 py-2.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">
|
||||
<i data-lucide="save" class="w-4 h-4"></i>
|
||||
<span>Opslaan</span>
|
||||
<button type="submit" class="px-4 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition shadow-xs cursor-pointer">
|
||||
Wijzigingen Opslaan
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -6,41 +6,48 @@
|
||||
<div class="space-y-6">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-200/80">
|
||||
<div>
|
||||
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
|
||||
<i data-lucide="folder-tree" class="w-4 h-4"></i>
|
||||
<div class="inline-flex items-center space-x-1.5 text-xs text-slate-500 font-medium mb-1">
|
||||
<i data-lucide="folder-tree" class="w-3.5 h-3.5"></i>
|
||||
<span>Winkelstructuur</span>
|
||||
</div>
|
||||
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Categorieën Beheer</h1>
|
||||
<p class="text-xs sm:text-sm text-slate-400 mt-1">Beheer categorie titels, omschrijvingen en sortering.</p>
|
||||
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Categorieën</h1>
|
||||
<p class="text-xs text-slate-500 mt-1">Beheer categorietitels, omschrijvingen en sortering van de webshop.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="p-3.5 rounded-xl bg-emerald-50 border border-emerald-200/60 text-emerald-800 text-xs flex items-center space-x-2.5">
|
||||
<i data-lucide="check-circle" class="w-4 h-4 text-emerald-600 shrink-0"></i>
|
||||
<span class="font-medium">{{ session('success') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Categories Grid -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-5">
|
||||
@foreach($categories as $category)
|
||||
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 flex flex-col justify-between space-y-4">
|
||||
<div class="space-y-3">
|
||||
<div class="p-5 rounded-2xl bg-white border border-slate-200/80 shadow-2xs hover:border-slate-300 transition flex flex-col justify-between space-y-4">
|
||||
<div class="space-y-2.5">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="px-2.5 py-1 rounded-lg bg-amber-400/20 text-amber-400 font-mono text-xs font-black">
|
||||
<span class="px-2 py-0.5 rounded-md bg-slate-100 text-slate-700 font-mono text-[11px]">
|
||||
/catalogus?category={{ $category->slug }}
|
||||
</span>
|
||||
<span class="text-xs text-slate-400 font-bold">
|
||||
<span class="text-xs text-slate-500 font-medium">
|
||||
{{ $category->products_count }} producten
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h3 class="font-heading text-lg font-black text-white">{{ $category->name }}</h3>
|
||||
<p class="text-xs text-slate-400 leading-relaxed font-normal">{{ $category->description }}</p>
|
||||
<h3 class="text-base font-bold text-slate-900">{{ $category->name }}</h3>
|
||||
<p class="text-xs text-slate-500 leading-relaxed font-normal">{{ $category->description }}</p>
|
||||
</div>
|
||||
|
||||
<div class="pt-4 border-t border-slate-800 flex items-center justify-between">
|
||||
<a href="{{ route('catalog', ['category' => $category->slug]) }}" target="_blank" class="text-xs text-slate-400 hover:text-white flex items-center space-x-1">
|
||||
<div class="pt-3.5 border-t border-slate-100 flex items-center justify-between">
|
||||
<a href="{{ route('catalog', ['category' => $category->slug]) }}" target="_blank" class="text-xs text-slate-500 hover:text-slate-900 flex items-center space-x-1 transition">
|
||||
<span>Bekijk in shop</span>
|
||||
<i data-lucide="external-link" class="w-3 h-3"></i>
|
||||
</a>
|
||||
<a href="{{ route('admin.categories.edit', $category) }}" class="px-3.5 py-1.5 rounded-xl bg-slate-800 hover:bg-amber-400 text-slate-200 hover:text-slate-950 text-xs font-bold transition flex items-center space-x-1">
|
||||
<a href="{{ route('admin.categories.edit', $category) }}" class="px-3 py-1.5 rounded-lg bg-slate-100 hover:bg-slate-900 text-slate-700 hover:text-white text-xs font-medium transition flex items-center space-x-1.5">
|
||||
<i data-lucide="pencil" class="w-3 h-3"></i>
|
||||
<span>Bewerken</span>
|
||||
</a>
|
||||
@@ -51,4 +58,3 @@
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,84 +6,66 @@
|
||||
<div class="space-y-6" x-data="artikelBeheerApp()">
|
||||
|
||||
<!-- Top Header & Breadcrumb -->
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4 pb-6 border-b border-slate-200/80">
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4 pb-6 border-b border-slate-200/60">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 text-xs text-amber-700 font-bold uppercase tracking-wider mb-1">
|
||||
<span class="inline-block w-2 h-2 rounded-full bg-amber-500 animate-pulse"></span>
|
||||
<span>Staging & Curation</span>
|
||||
<span>•</span>
|
||||
<span>Geïmporteerde Modellen</span>
|
||||
</div>
|
||||
<h1 class="text-2xl sm:text-3xl font-black text-slate-900 flex items-center space-x-3">
|
||||
<span class="p-2 bg-gradient-to-tr from-amber-400 to-amber-500 rounded-2xl text-slate-950 shadow-sm">
|
||||
<i data-lucide="layers" class="w-6 h-6"></i>
|
||||
</span>
|
||||
<span>Artikel Beheer</span>
|
||||
</h1>
|
||||
<span class="text-[11px] font-semibold uppercase tracking-wider text-slate-400 block mb-1">MakerWorld Modellen</span>
|
||||
<h1 class="font-heading text-2xl sm:text-3xl font-bold text-slate-900 tracking-tight">Artikel Beheer (Staging)</h1>
|
||||
<p class="mt-1 text-xs sm:text-sm text-slate-500">
|
||||
Beoordeel binnengehaalde MakerWorld modellen. Prijzen zijn automatisch berekend op basis van de 3D-printcalculator (gewicht, printtijd & kleuren). Pas naar wens aan en publiceer met 1 klik!
|
||||
Beoordeel binnengehaalde modellen. Prijzen zijn automatisch berekend op basis van gewicht, printduur en kleuren via de 3D-calculator.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Header Quick Actions -->
|
||||
<div class="flex items-center space-x-2.5 self-start md:self-auto">
|
||||
<a href="{{ route('admin.makerworld.index', ['tab' => 'collections']) }}" class="px-3.5 py-2 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-sm">
|
||||
<i data-lucide="refresh-cw" class="w-4 h-4 text-amber-600"></i>
|
||||
<a href="{{ route('admin.makerworld.index', ['tab' => 'collections']) }}" class="px-3.5 py-2 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs">
|
||||
<i data-lucide="refresh-cw" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span>Collecties & Sync</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.products.index') }}" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-bold transition flex items-center space-x-1.5 shadow-sm">
|
||||
<i data-lucide="box" class="w-4 h-4"></i>
|
||||
<a href="{{ route('admin.products.index') }}" class="px-3.5 py-2 rounded-lg bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition flex items-center space-x-1.5 shadow-2xs">
|
||||
<i data-lucide="box" class="w-3.5 h-3.5"></i>
|
||||
<span>Actieve Producten</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status Filter Tabs -->
|
||||
<div class="flex items-center space-x-2 border-b border-slate-200/80 pb-2 overflow-x-auto text-xs font-bold">
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'draft'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'draft' ? 'bg-amber-400 text-slate-950 font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<i data-lucide="layers" class="w-3.5 h-3.5"></i>
|
||||
<!-- Status Filter Tabs (Sleek Segmented Control) -->
|
||||
<div class="flex items-center space-x-1.5 p-1 bg-slate-100/80 rounded-xl w-fit overflow-x-auto text-xs">
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'draft'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'draft' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span>Wacht op Beoordeling</span>
|
||||
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'draft') === 'draft' ? 'bg-slate-950 text-amber-400 font-black' : 'bg-slate-100 text-slate-600' }}">
|
||||
<span class="px-1.5 py-0.2 rounded-full text-[10px] font-semibold {{ ($tab ?? 'draft') === 'draft' ? 'bg-amber-100 text-amber-800' : 'bg-slate-200 text-slate-600' }}">
|
||||
{{ $countDraft ?? 0 }}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'published'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'published' ? 'bg-emerald-600 text-white font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<span class="w-1.5 h-1.5 rounded-full {{ ($tab ?? 'draft') === 'published' ? 'bg-emerald-200' : 'bg-emerald-500' }}"></span>
|
||||
<span>Reeds Gepubliceerd in Webshop</span>
|
||||
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'draft') === 'published' ? 'bg-emerald-800 text-emerald-200 font-black' : 'bg-slate-100 text-slate-600' }}">
|
||||
{{ $countPublished ?? 0 }}
|
||||
</span>
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'published'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'published' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500"></span>
|
||||
<span>Gepubliceerd</span>
|
||||
<span class="text-[11px] text-slate-400">({{ $countPublished ?? 0 }})</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'all'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'all' ? 'bg-indigo-600 text-white font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<i data-lucide="download-cloud" class="w-3.5 h-3.5"></i>
|
||||
<span>Alle Binnengehaalde Modellen</span>
|
||||
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'draft') === 'all' ? 'bg-indigo-800 text-indigo-200 font-black' : 'bg-slate-100 text-slate-600' }}">
|
||||
{{ $countAll ?? 0 }}
|
||||
</span>
|
||||
<a href="{{ route('admin.makerworld.staging', array_merge(request()->except('tab', 'page'), ['tab' => 'all'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'draft') === 'all' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span>Alle Geïmporteerd</span>
|
||||
<span class="text-[11px] text-slate-400">({{ $countAll ?? 0 }})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Filter & Search Toolbar -->
|
||||
<div class="bg-white rounded-2xl p-3.5 border border-slate-200/80 shadow-sm flex flex-col md:flex-row md:items-center justify-between gap-3">
|
||||
<div class="bg-white rounded-xl p-3 border border-slate-200/60 shadow-2xs flex flex-col md:flex-row md:items-center justify-between gap-3">
|
||||
<form method="GET" action="{{ route('admin.makerworld.staging') }}" class="flex flex-wrap items-center gap-2.5 flex-1">
|
||||
<!-- Search input -->
|
||||
<div class="relative min-w-[220px] flex-1">
|
||||
<input
|
||||
type="text"
|
||||
name="q"
|
||||
value="{{ request('q') }}"
|
||||
placeholder="Zoek op titel, maker of model-ID..."
|
||||
class="w-full pl-9 pr-3 py-2 bg-slate-50 border border-slate-200 rounded-xl text-slate-800 text-xs placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-amber-400 focus:bg-white transition"
|
||||
placeholder="Zoek op titel of ID..."
|
||||
class="w-full pl-8 pr-3 py-1.5 bg-slate-50 border border-slate-200/80 rounded-lg text-slate-800 text-xs placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-400 focus:bg-white transition"
|
||||
>
|
||||
<i data-lucide="search" class="w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"></i>
|
||||
<i data-lucide="search" class="w-3.5 h-3.5 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2"></i>
|
||||
</div>
|
||||
|
||||
<!-- Collection dropdown filter -->
|
||||
<div class="w-52">
|
||||
<select name="collection_id" onchange="this.form.submit()" class="w-full px-3 py-2 bg-slate-50 border border-slate-200 rounded-xl text-slate-700 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-amber-400">
|
||||
<div class="w-48">
|
||||
<select name="collection_id" onchange="this.form.submit()" class="w-full px-2.5 py-1.5 bg-slate-50 border border-slate-200/80 rounded-lg text-slate-700 text-xs focus:outline-none focus:ring-1 focus:ring-slate-400">
|
||||
<option value="">Alle collecties</option>
|
||||
@foreach($collections as $col)
|
||||
<option value="{{ $col->id }}" {{ request('collection_id') == $col->id ? 'selected' : '' }}>
|
||||
@@ -93,54 +75,52 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-bold transition">
|
||||
Filteren
|
||||
<button type="submit" class="px-3 py-1.5 rounded-lg bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition">
|
||||
Filter
|
||||
</button>
|
||||
|
||||
@if(request()->hasAny(['q', 'collection_id']))
|
||||
<a href="{{ route('admin.makerworld.staging') }}" class="text-xs text-rose-600 hover:underline font-bold">
|
||||
<a href="{{ route('admin.makerworld.staging') }}" class="text-xs text-rose-600 hover:underline">
|
||||
Wissen
|
||||
</a>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
<div class="flex items-center space-x-2 text-xs">
|
||||
<span class="px-3 py-1 rounded-full bg-amber-50 text-amber-800 border border-amber-200/80 font-bold">
|
||||
{{ $totalStaged }} concepten wachten op beoordeling
|
||||
</span>
|
||||
<div class="text-xs text-slate-500 font-medium">
|
||||
<span>{{ $totalStaged }} concepten wachten op review</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bulk Selection Action Bar -->
|
||||
<div x-show="selectedIds.length > 0" x-cloak class="p-4 rounded-2xl bg-amber-400 text-slate-950 flex flex-col md:flex-row items-center justify-between gap-4 shadow-md">
|
||||
<div class="flex items-center space-x-2 font-black text-xs uppercase tracking-wider">
|
||||
<i data-lucide="check-square" class="w-5 h-5"></i>
|
||||
<span x-text="selectedIds.length + ' artikelen geselecteerd'"></span>
|
||||
<!-- Bulk Selection Bar -->
|
||||
<div x-show="selectedIds.length > 0" x-cloak class="p-3.5 rounded-xl bg-slate-900 text-white flex flex-col md:flex-row items-center justify-between gap-3 shadow-md">
|
||||
<div class="flex items-center space-x-2 text-xs font-medium">
|
||||
<i data-lucide="check-square" class="w-4 h-4 text-emerald-400"></i>
|
||||
<span x-text="selectedIds.length + ' geselecteerd'"></span>
|
||||
</div>
|
||||
|
||||
<form action="{{ route('admin.makerworld.staging.bulk-publish') }}" method="POST" class="flex flex-wrap items-center gap-3">
|
||||
<form action="{{ route('admin.makerworld.staging.bulk-publish') }}" method="POST" class="flex flex-wrap items-center gap-2.5">
|
||||
@csrf
|
||||
<template x-for="id in selectedIds" :key="id">
|
||||
<input type="hidden" name="product_ids[]" :value="id">
|
||||
</template>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<label class="text-xs font-bold uppercase">Categorie:</label>
|
||||
<select name="category_id" required class="px-3 py-1.5 bg-white text-slate-900 rounded-xl text-xs font-bold border border-amber-300">
|
||||
<div class="flex items-center space-x-1.5">
|
||||
<label class="text-[11px] text-slate-300">Categorie:</label>
|
||||
<select name="category_id" required class="px-2.5 py-1 bg-slate-800 text-white rounded-md text-xs border border-slate-700">
|
||||
@foreach($categories as $cat)
|
||||
<option value="{{ $cat->id }}">{{ $cat->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<label class="text-xs font-bold uppercase">Winstmarge %:</label>
|
||||
<input type="number" name="custom_markup" placeholder="40" class="w-16 px-2 py-1.5 bg-white text-slate-900 rounded-xl text-xs font-bold border border-amber-300">
|
||||
<div class="flex items-center space-x-1.5">
|
||||
<label class="text-[11px] text-slate-300">Marge %:</label>
|
||||
<input type="number" name="custom_markup" placeholder="40" class="w-14 px-2 py-1 bg-slate-800 text-white rounded-md text-xs border border-slate-700">
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-4 py-2 bg-slate-950 hover:bg-slate-900 text-amber-400 font-black text-xs rounded-xl shadow transition flex items-center space-x-1.5">
|
||||
<i data-lucide="check" class="w-4 h-4"></i>
|
||||
<span>Publiceer Selectie naar Webshop</span>
|
||||
<button type="submit" class="px-3 py-1 bg-white hover:bg-slate-100 text-slate-900 font-semibold text-xs rounded-md transition flex items-center space-x-1 cursor-pointer">
|
||||
<i data-lucide="check" class="w-3.5 h-3.5"></i>
|
||||
<span>Publiceer Selectie</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -149,7 +129,7 @@
|
||||
<template x-for="id in selectedIds" :key="id">
|
||||
<input type="hidden" name="product_ids[]" :value="id">
|
||||
</template>
|
||||
<button type="submit" class="px-3 py-2 bg-rose-600 hover:bg-rose-700 text-white font-bold text-xs rounded-xl transition flex items-center space-x-1">
|
||||
<button type="submit" class="px-2.5 py-1 bg-rose-600 hover:bg-rose-700 text-white font-medium text-xs rounded-md transition flex items-center space-x-1 cursor-pointer">
|
||||
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
|
||||
<span>Verwijderen</span>
|
||||
</button>
|
||||
@@ -158,10 +138,10 @@
|
||||
|
||||
<!-- Select All Trigger -->
|
||||
@if($stagedProducts->isNotEmpty())
|
||||
<div class="flex items-center justify-between text-xs text-slate-500 px-1">
|
||||
<button type="button" @click="toggleSelectAll()" class="hover:text-amber-700 font-bold transition flex items-center space-x-1.5">
|
||||
<i data-lucide="check" class="w-4 h-4"></i>
|
||||
<span x-text="selectedIds.length === {{ $stagedProducts->count() }} ? 'Deselecteer alles' : 'Selecteer alle {{ $stagedProducts->count() }} modellen op deze pagina'"></span>
|
||||
<div class="flex items-center justify-between text-xs text-slate-400 px-1">
|
||||
<button type="button" @click="toggleSelectAll()" class="hover:text-slate-800 font-medium transition flex items-center space-x-1.5 cursor-pointer">
|
||||
<i data-lucide="check" class="w-3.5 h-3.5"></i>
|
||||
<span x-text="selectedIds.length === {{ $stagedProducts->count() }} ? 'Deselecteer alles' : 'Selecteer alle {{ $stagedProducts->count() }} op deze pagina'"></span>
|
||||
</button>
|
||||
<span>Pagina {{ $stagedProducts->currentPage() }} van {{ $stagedProducts->lastPage() }}</span>
|
||||
</div>
|
||||
@@ -169,16 +149,16 @@
|
||||
|
||||
<!-- Staged Products Grid -->
|
||||
@if($stagedProducts->isEmpty())
|
||||
<div class="text-center py-16 bg-white rounded-3xl border border-slate-200/80 p-8 shadow-sm">
|
||||
<div class="w-16 h-16 rounded-2xl bg-amber-50 flex items-center justify-center text-amber-600 mx-auto mb-4 border border-amber-200/60">
|
||||
<i data-lucide="sparkles" class="w-8 h-8"></i>
|
||||
<div class="text-center py-16 bg-white rounded-2xl border border-slate-200/60 p-8 shadow-2xs">
|
||||
<div class="w-12 h-12 rounded-xl bg-slate-100 flex items-center justify-center text-slate-600 mx-auto mb-3">
|
||||
<i data-lucide="check-circle" class="w-6 h-6 text-emerald-500"></i>
|
||||
</div>
|
||||
<h3 class="text-lg font-black text-slate-900">Geen concepten in de wachtrij!</h3>
|
||||
<p class="text-xs text-slate-500 max-w-md mx-auto mt-1.5">
|
||||
Alle binnengehaalde modellen zijn al beoordeeld en gepubliceerd, of er zijn nog geen nieuwe modellen toegevoegd aan je gevolgde collecties.
|
||||
<h3 class="text-base font-semibold text-slate-900">Geen concepten in de wachtrij</h3>
|
||||
<p class="text-xs text-slate-500 max-w-sm mx-auto mt-1">
|
||||
Alle binnengehaalde modellen zijn beoordeeld en gepubliceerd, of er zijn nog geen nieuwe modellen gesynchroniseerd.
|
||||
</p>
|
||||
<div class="mt-5 flex items-center justify-center space-x-3">
|
||||
<a href="{{ route('admin.makerworld.index', ['tab' => 'collections']) }}" class="px-4 py-2.5 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-bold text-xs transition shadow-sm">
|
||||
<div class="mt-4">
|
||||
<a href="{{ route('admin.makerworld.index', ['tab' => 'collections']) }}" class="px-4 py-2 rounded-lg bg-slate-900 text-white font-medium text-xs transition">
|
||||
Bekijk Collecties & Auto-Sync
|
||||
</a>
|
||||
</div>
|
||||
@@ -189,76 +169,75 @@
|
||||
@php
|
||||
$printInfo = $product->print_info ?? [];
|
||||
@endphp
|
||||
<div class="bg-white rounded-2xl border border-slate-200/80 overflow-hidden flex flex-col justify-between shadow-xs hover:border-slate-300 hover:shadow-md transition relative">
|
||||
<div class="bg-white rounded-xl border border-slate-200/60 overflow-hidden flex flex-col justify-between shadow-2xs hover:border-slate-300 transition relative">
|
||||
|
||||
<!-- Top Image Preview & Gallery -->
|
||||
<div>
|
||||
<div class="relative aspect-4/3 bg-slate-100 overflow-hidden group">
|
||||
<!-- Top Image Preview & Gallery -->
|
||||
<div class="relative aspect-4/3 bg-slate-50 overflow-hidden group">
|
||||
<img src="{{ $product->image_url }}" alt="{{ $product->name }}" class="w-full h-full object-cover">
|
||||
|
||||
<!-- Selection Checkbox -->
|
||||
<div class="absolute top-2.5 left-2.5 z-10">
|
||||
<label class="flex items-center justify-center w-7 h-7 rounded-xl bg-white/90 backdrop-blur border border-slate-300 cursor-pointer shadow-sm hover:scale-105 transition">
|
||||
<input type="checkbox" value="{{ $product->id }}" x-model="selectedIds" class="w-4 h-4 text-amber-500 rounded focus:ring-0">
|
||||
<label class="flex items-center justify-center w-6 h-6 rounded-md bg-white/95 backdrop-blur border border-slate-300 cursor-pointer shadow-2xs hover:scale-105 transition">
|
||||
<input type="checkbox" value="{{ $product->id }}" x-model="selectedIds" class="w-3.5 h-3.5 text-slate-900 rounded focus:ring-0">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Draft Badge -->
|
||||
<div class="absolute top-2.5 right-2.5 flex flex-col items-end gap-1">
|
||||
<span class="px-2.5 py-0.5 rounded-full text-[10px] font-black uppercase tracking-wider bg-amber-400 text-slate-950 shadow-xs">
|
||||
<span class="px-2 py-0.5 rounded-md text-[10px] font-semibold bg-white/95 backdrop-blur text-slate-800 border border-slate-200 shadow-2xs">
|
||||
Concept
|
||||
</span>
|
||||
@if($product->makerworldCollection)
|
||||
<span class="px-2 py-0.5 rounded-md text-[9px] font-bold bg-white/95 text-slate-700 border border-slate-200 shadow-xs truncate max-w-[140px]">
|
||||
<span class="px-2 py-0.5 rounded-md text-[9px] font-medium bg-slate-900/80 text-white backdrop-blur truncate max-w-[140px]">
|
||||
{{ $product->makerworldCollection->name }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- MakerWorld Link -->
|
||||
<a href="https://makerworld.com/nl/models/{{ $product->makerworld_id }}" target="_blank" class="absolute bottom-2.5 right-2.5 p-1.5 rounded-xl bg-white/90 hover:bg-white text-slate-700 border border-slate-200 shadow-xs backdrop-blur transition" title="Bekijk origineel op MakerWorld">
|
||||
<a href="https://makerworld.com/nl/models/{{ $product->makerworld_id }}" target="_blank" class="absolute bottom-2.5 right-2.5 p-1.5 rounded-md bg-white/90 hover:bg-white text-slate-700 border border-slate-200 shadow-2xs backdrop-blur transition" title="Bekijk origineel op MakerWorld">
|
||||
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Photo Thumbnails Strip (All Pulled Pictures) -->
|
||||
<!-- Photo Thumbnails Strip -->
|
||||
@if(!empty($product->gallery_images) && count($product->gallery_images) > 0)
|
||||
<div class="px-3.5 py-2 bg-slate-50 border-b border-slate-100 flex items-center space-x-1.5 overflow-x-auto">
|
||||
<span class="text-[10px] font-bold text-slate-400 uppercase tracking-wider shrink-0">Foto's:</span>
|
||||
<img src="{{ $product->image_url }}" alt="" class="w-8 h-8 rounded-lg object-cover border-2 border-amber-400 shrink-0">
|
||||
<div class="px-3 py-1.5 bg-slate-50 border-b border-slate-100 flex items-center space-x-1.5 overflow-x-auto">
|
||||
<span class="text-[9px] uppercase font-semibold text-slate-400 shrink-0">Foto's:</span>
|
||||
<img src="{{ $product->image_url }}" alt="" class="w-7 h-7 rounded-md object-cover border border-slate-900 shrink-0">
|
||||
@foreach(array_slice($product->gallery_images, 0, 5) as $galleryPic)
|
||||
<img src="{{ $galleryPic }}" alt="" class="w-8 h-8 rounded-lg object-cover border border-slate-200 shrink-0 hover:border-slate-400 transition" loading="lazy">
|
||||
<img src="{{ $galleryPic }}" alt="" class="w-7 h-7 rounded-md object-cover border border-slate-200 shrink-0 hover:border-slate-400 transition" loading="lazy">
|
||||
@endforeach
|
||||
@if(count($product->gallery_images) > 5)
|
||||
<span class="text-[10px] text-slate-500 font-bold shrink-0">+{{ count($product->gallery_images) - 5 }} meer</span>
|
||||
<span class="text-[9px] text-slate-400 font-medium shrink-0">+{{ count($product->gallery_images) - 5 }}</span>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Print Specifications Strip -->
|
||||
<div class="grid grid-cols-3 gap-1 px-3.5 py-2 bg-slate-50/50 border-b border-slate-100 text-center text-xs">
|
||||
<!-- Specs Strip -->
|
||||
<div class="grid grid-cols-3 gap-1 px-3 py-2 bg-slate-50/50 border-b border-slate-100 text-center text-xs">
|
||||
<div>
|
||||
<span class="text-[10px] font-bold text-slate-400 block uppercase">Printtijd</span>
|
||||
<span class="font-bold text-slate-700">
|
||||
<span class="text-[9px] uppercase font-medium text-slate-400 block">Printtijd</span>
|
||||
<span class="font-semibold text-slate-700">
|
||||
{{ $product->print_time_hours ? $product->print_time_hours . ' u' : '-' }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-[10px] font-bold text-slate-400 block uppercase">Gewicht</span>
|
||||
<span class="font-bold text-slate-700">
|
||||
<span class="text-[9px] uppercase font-medium text-slate-400 block">Gewicht</span>
|
||||
<span class="font-semibold text-slate-700">
|
||||
{{ $product->weight_grams ? $product->weight_grams . ' g' : '-' }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-[10px] font-bold text-amber-700 block uppercase">Adviesprijs</span>
|
||||
<span class="font-black text-slate-900 font-heading">
|
||||
<span class="text-[9px] uppercase font-semibold text-slate-500 block">Adviesprijs</span>
|
||||
<span class="font-bold text-slate-900 font-heading">
|
||||
{{ $product->formatted_price }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Meta Details -->
|
||||
<div class="p-3.5 space-y-1.5">
|
||||
<div class="p-3">
|
||||
<div class="text-[11px] text-slate-500 flex items-center justify-between">
|
||||
<span class="truncate">Maker: <strong class="text-slate-700">{{ $product->makerworld_author ?? 'MakerWorld' }}</strong></span>
|
||||
<span class="font-mono text-slate-400 text-[10px]">#{{ $product->makerworld_id }}</span>
|
||||
@@ -267,47 +246,43 @@
|
||||
</div>
|
||||
|
||||
@if($product->status === 'published')
|
||||
<!-- Already Published Info Card -->
|
||||
<div class="p-3.5 bg-slate-50/80 border-t border-slate-100 space-y-2.5">
|
||||
<div class="p-2.5 rounded-xl bg-emerald-50 border border-emerald-200 text-emerald-800 text-xs flex items-center justify-between">
|
||||
<div class="flex items-center space-x-1.5 font-bold">
|
||||
<i data-lucide="check-circle" class="w-4 h-4 text-emerald-600"></i>
|
||||
<span>In Webshop</span>
|
||||
<div class="p-3 bg-slate-50/80 border-t border-slate-100 space-y-2">
|
||||
<div class="p-2 rounded-lg bg-emerald-50 border border-emerald-200/60 text-emerald-800 text-xs flex items-center justify-between">
|
||||
<div class="flex items-center space-x-1.5 font-medium">
|
||||
<i data-lucide="check-circle" class="w-3.5 h-3.5 text-emerald-600"></i>
|
||||
<span>Gepubliceerd</span>
|
||||
</div>
|
||||
<span class="font-black text-slate-900">{{ $product->formatted_price }}</span>
|
||||
<span class="font-bold text-slate-900">{{ $product->formatted_price }}</span>
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="flex-1 py-1.5 px-3 bg-white hover:bg-slate-100 text-slate-700 font-bold rounded-xl text-xs text-center transition flex items-center justify-center space-x-1 border border-slate-200 shadow-xs">
|
||||
<i data-lucide="pencil" class="w-3.5 h-3.5"></i>
|
||||
<span>Bewerken & Prijscalculator</span>
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="flex-1 py-1.5 px-3 bg-white hover:bg-slate-100 text-slate-700 font-medium rounded-lg text-xs text-center transition border border-slate-200/80 shadow-2xs">
|
||||
Bewerken
|
||||
</a>
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="p-1.5 rounded-xl bg-white hover:bg-slate-100 text-slate-600 border border-slate-200 transition shadow-xs" title="Bekijk in Webshop">
|
||||
<i data-lucide="external-link" class="w-4 h-4"></i>
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="p-1.5 rounded-lg bg-white hover:bg-slate-100 text-slate-600 border border-slate-200/80 transition" title="Bekijk in Shop">
|
||||
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<!-- Curation / Publish Form (Inline) -->
|
||||
<form action="{{ route('admin.makerworld.staging.publish', $product) }}" method="POST" class="p-3.5 bg-slate-50/50 border-t border-slate-100 space-y-2.5">
|
||||
<!-- Curation / Publish Form -->
|
||||
<form action="{{ route('admin.makerworld.staging.publish', $product) }}" method="POST" class="p-3 bg-slate-50/50 border-t border-slate-100 space-y-2.5">
|
||||
@csrf
|
||||
|
||||
<!-- Editable Product Name -->
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold uppercase tracking-wider text-slate-500 mb-1">Producttitel</label>
|
||||
<label class="block text-[10px] font-medium uppercase tracking-wider text-slate-500 mb-0.5">Titel</label>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
value="{{ old('name', $product->name) }}"
|
||||
required
|
||||
class="w-full px-2.5 py-1.5 bg-white border border-slate-200 rounded-xl text-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-amber-400"
|
||||
class="w-full px-2.5 py-1.5 bg-white border border-slate-200 rounded-lg text-slate-800 text-xs font-medium focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<!-- Category selector -->
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold uppercase tracking-wider text-slate-500 mb-1">Categorie</label>
|
||||
<select name="category_id" required class="w-full px-2 py-1.5 bg-white border border-slate-200 rounded-xl text-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-amber-400">
|
||||
<label class="block text-[10px] font-medium uppercase tracking-wider text-slate-500 mb-0.5">Categorie</label>
|
||||
<select name="category_id" required class="w-full px-2 py-1.5 bg-white border border-slate-200 rounded-lg text-slate-800 text-xs focus:outline-none focus:ring-1 focus:ring-slate-400">
|
||||
@foreach($categories as $cat)
|
||||
<option value="{{ $cat->id }}" {{ $product->category_id == $cat->id ? 'selected' : '' }}>
|
||||
{{ $cat->name }}
|
||||
@@ -316,44 +291,41 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Retail Price -->
|
||||
<div>
|
||||
<label class="block text-[10px] font-bold uppercase tracking-wider text-slate-500 mb-1">Verkoopprijs (€)</label>
|
||||
<label class="block text-[10px] font-medium uppercase tracking-wider text-slate-500 mb-0.5">Prijs (€)</label>
|
||||
<input
|
||||
type="number"
|
||||
step="0.01"
|
||||
name="base_price"
|
||||
value="{{ old('base_price', $product->base_price) }}"
|
||||
required
|
||||
class="w-full px-2 py-1.5 bg-white border border-slate-200 rounded-xl text-slate-900 text-xs font-black focus:outline-none focus:ring-2 focus:ring-amber-400"
|
||||
class="w-full px-2 py-1.5 bg-white border border-slate-200 rounded-lg text-slate-900 text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<div class="pt-1.5 flex items-center justify-between gap-2">
|
||||
<button type="submit" class="flex-1 py-2 px-3 bg-emerald-600 hover:bg-emerald-500 text-white font-bold rounded-xl text-xs uppercase tracking-wider shadow-xs transition flex items-center justify-center space-x-1">
|
||||
<i data-lucide="check" class="w-4 h-4"></i>
|
||||
<span>Publiceer naar Webshop</span>
|
||||
<div class="pt-1 flex items-center justify-between gap-2">
|
||||
<button type="submit" class="flex-1 py-1.5 px-3 bg-slate-900 hover:bg-slate-800 text-white font-medium rounded-lg text-xs transition flex items-center justify-center space-x-1 cursor-pointer">
|
||||
<i data-lucide="check" class="w-3.5 h-3.5"></i>
|
||||
<span>Publiceer</span>
|
||||
</button>
|
||||
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="p-2 rounded-xl text-slate-500 hover:text-amber-700 hover:bg-white border border-slate-200 transition" title="Foto's en calculator openen">
|
||||
<i data-lucide="sliders" class="w-4 h-4"></i>
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="p-1.5 rounded-lg text-slate-500 hover:text-slate-900 hover:bg-white border border-slate-200 transition" title="Foto's en calculator">
|
||||
<i data-lucide="sliders" class="w-3.5 h-3.5"></i>
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
form="reject-form-{{ $product->id }}"
|
||||
class="p-2 rounded-xl text-slate-400 hover:text-rose-600 hover:bg-rose-50 border border-slate-200 transition"
|
||||
title="Concept afwijzen & verwijderen"
|
||||
class="p-1.5 rounded-lg text-slate-400 hover:text-rose-600 hover:bg-rose-50 border border-slate-200 transition cursor-pointer"
|
||||
title="Verwijderen"
|
||||
>
|
||||
<i data-lucide="trash-2" class="w-4 h-4"></i>
|
||||
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<!-- Standalone Delete Form for this product -->
|
||||
<form id="reject-form-{{ $product->id }}" action="{{ route('admin.makerworld.staging.reject', $product) }}" method="POST" onsubmit="return confirm('Weet je zeker dat je dit concept wilt verwijderen?');" class="hidden">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
@@ -362,7 +334,6 @@
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<div class="mt-6">
|
||||
{{ $stagedProducts->links() }}
|
||||
</div>
|
||||
|
||||
@@ -6,65 +6,65 @@
|
||||
<div class="space-y-6">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-200/80">
|
||||
<div>
|
||||
<div class="inline-flex items-center space-x-2 text-xs text-amber-400 font-bold uppercase tracking-wider mb-1">
|
||||
<i data-lucide="shopping-cart" class="w-4 h-4"></i>
|
||||
<span>Verkopen & Facturatie</span>
|
||||
<div class="inline-flex items-center space-x-1.5 text-xs text-slate-500 font-medium mb-1">
|
||||
<i data-lucide="shopping-cart" class="w-3.5 h-3.5"></i>
|
||||
<span>Verkopen & Orders</span>
|
||||
</div>
|
||||
<h1 class="font-heading text-2xl sm:text-3xl font-black text-white">Bestellingen ({{ $orders->total() }})</h1>
|
||||
<p class="text-xs sm:text-sm text-slate-400 mt-1">Inzicht in binnengekomen bestellingen, status en klantgegevens.</p>
|
||||
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Bestellingen ({{ $orders->total() }})</h1>
|
||||
<p class="text-xs text-slate-500 mt-1">Overzicht van binnengekomen bestellingen, orderstatussen en verzending.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Orders Table -->
|
||||
<div class="rounded-3xl bg-slate-900 border border-slate-800 overflow-hidden shadow-xl">
|
||||
<div class="rounded-2xl bg-white border border-slate-200/80 overflow-hidden shadow-2xs">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left text-xs text-slate-300">
|
||||
<thead class="bg-slate-950/80 text-[11px] uppercase tracking-wider text-slate-400 font-bold border-b border-slate-800">
|
||||
<table class="w-full text-left text-xs text-slate-700">
|
||||
<thead class="bg-slate-50/80 text-[11px] uppercase tracking-wider text-slate-500 font-semibold border-b border-slate-200/70">
|
||||
<tr>
|
||||
<th class="py-3.5 px-4">Order #</th>
|
||||
<th class="py-3.5 px-4">Datum</th>
|
||||
<th class="py-3.5 px-4">Klant</th>
|
||||
<th class="py-3.5 px-4">Items</th>
|
||||
<th class="py-3.5 px-4">Totaal</th>
|
||||
<th class="py-3.5 px-4">Status</th>
|
||||
<th class="py-3.5 px-4 text-right">Details</th>
|
||||
<th class="py-3 px-4">Order #</th>
|
||||
<th class="py-3 px-4">Datum</th>
|
||||
<th class="py-3 px-4">Klant</th>
|
||||
<th class="py-3 px-4">Items</th>
|
||||
<th class="py-3 px-4">Totaal</th>
|
||||
<th class="py-3 px-4">Status</th>
|
||||
<th class="py-3 px-4 text-right">Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-800/80 font-medium">
|
||||
<tbody class="divide-y divide-slate-100 font-medium">
|
||||
@forelse($orders as $order)
|
||||
<tr class="hover:bg-slate-800/50 transition">
|
||||
<td class="py-3.5 px-4 font-mono font-bold text-white">
|
||||
<tr class="hover:bg-slate-50/60 transition">
|
||||
<td class="py-3.5 px-4 font-mono font-bold text-slate-900">
|
||||
{{ $order->order_number }}
|
||||
</td>
|
||||
<td class="py-3.5 px-4 text-slate-400">
|
||||
<td class="py-3.5 px-4 text-slate-500">
|
||||
{{ $order->created_at->format('d-m-Y H:i') }}
|
||||
</td>
|
||||
<td class="py-3.5 px-4">
|
||||
<div class="font-bold text-white">{{ $order->customer_name }}</div>
|
||||
<div class="text-[11px] text-slate-400">{{ $order->customer_email }}</div>
|
||||
<div class="font-semibold text-slate-900">{{ $order->customer_name }}</div>
|
||||
<div class="text-[11px] text-slate-400 font-normal">{{ $order->customer_email }}</div>
|
||||
</td>
|
||||
<td class="py-3.5 px-4">
|
||||
<span class="px-2 py-0.5 rounded-md bg-slate-800 text-slate-300 text-[11px] font-bold">
|
||||
<span class="px-2 py-0.5 rounded-md bg-slate-100 text-slate-700 text-[11px] font-medium">
|
||||
{{ $order->items->count() }} items
|
||||
</span>
|
||||
</td>
|
||||
<td class="py-3.5 px-4">
|
||||
<span class="font-heading font-black text-amber-400 text-sm">{{ $order->formatted_total }}</span>
|
||||
<span class="font-bold text-slate-900">{{ $order->formatted_total }}</span>
|
||||
</td>
|
||||
<td class="py-3.5 px-4">
|
||||
<span class="px-2.5 py-1 rounded-full text-[10px] font-black uppercase
|
||||
@if($order->status === 'completed' || $order->status === 'shipped') bg-emerald-500/20 text-emerald-400
|
||||
@elseif($order->status === 'printed' || $order->status === 'processing') bg-sky-500/20 text-sky-400
|
||||
@elseif($order->status === 'cancelled') bg-rose-500/20 text-rose-400
|
||||
@else bg-amber-500/20 text-amber-400 @endif
|
||||
">
|
||||
{{ $order->status }}
|
||||
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold
|
||||
@if($order->status === 'completed' || $order->status === 'shipped') bg-emerald-50 text-emerald-700 border border-emerald-200/60
|
||||
@elseif($order->status === 'printed' || $order->status === 'processing') bg-sky-50 text-sky-700 border border-sky-200/60
|
||||
@elseif($order->status === 'cancelled') bg-rose-50 text-rose-700 border border-rose-200/60
|
||||
@else bg-amber-50 text-amber-700 border border-amber-200/60
|
||||
@endif">
|
||||
{{ $order->status_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="py-3.5 px-4 text-right">
|
||||
<a href="{{ route('admin.orders.show', $order) }}" class="px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 text-xs font-bold transition inline-flex items-center space-x-1">
|
||||
<a href="{{ route('admin.orders.show', $order) }}" class="inline-flex items-center space-x-1 px-2.5 py-1 rounded-lg bg-slate-100 hover:bg-slate-900 text-slate-700 hover:text-white text-xs font-medium transition">
|
||||
<span>Bekijken</span>
|
||||
<i data-lucide="chevron-right" class="w-3 h-3"></i>
|
||||
</a>
|
||||
@@ -72,8 +72,8 @@
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="p-10 text-center text-slate-500">
|
||||
Nog geen bestellingen binnengekomen.
|
||||
<td colspan="7" class="py-12 text-center text-slate-400">
|
||||
Nog geen bestellingen geplaatst.
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
|
||||
@if($orders->hasPages())
|
||||
<div class="p-4 border-t border-slate-800 bg-slate-950/60">
|
||||
<div class="p-4 border-t border-slate-100">
|
||||
{{ $orders->links() }}
|
||||
</div>
|
||||
@endif
|
||||
@@ -90,4 +90,3 @@
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
<div class="space-y-6 max-w-5xl mx-auto">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-6 border-b border-slate-800">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pb-6 border-b border-slate-200/80">
|
||||
<div>
|
||||
<a href="{{ route('admin.orders.index') }}" class="text-xs text-amber-400 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
|
||||
<a href="{{ route('admin.orders.index') }}" class="text-xs text-slate-500 hover:text-slate-900 font-medium inline-flex items-center space-x-1 mb-1 transition">
|
||||
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
|
||||
<span>Terug naar Bestellingen</span>
|
||||
</a>
|
||||
<h1 class="font-heading text-2xl font-black text-white">Bestelling #{{ $order->order_number }}</h1>
|
||||
<p class="text-xs text-slate-400">Geplaatst op {{ $order->created_at->format('d-m-Y om H:i') }}</p>
|
||||
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Bestelling #{{ $order->order_number }}</h1>
|
||||
<p class="text-xs text-slate-500">Geplaatst op {{ $order->created_at->format('d-m-Y om H:i') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Status update form -->
|
||||
<form action="{{ route('admin.orders.status', $order) }}" method="POST" class="flex items-center space-x-2">
|
||||
@csrf
|
||||
<select name="status" class="bg-slate-900 border border-slate-700 rounded-xl px-3 py-2 text-xs font-bold text-white">
|
||||
<select name="status" class="bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs font-medium text-slate-900 focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">
|
||||
<option value="pending" {{ $order->status === 'pending' ? 'selected' : '' }}>In afwachting</option>
|
||||
<option value="processing" {{ $order->status === 'processing' ? 'selected' : '' }}>In verwerking</option>
|
||||
<option value="printed" {{ $order->status === 'printed' ? 'selected' : '' }}>Geprint (Print klaar)</option>
|
||||
@@ -27,35 +27,50 @@
|
||||
<option value="completed" {{ $order->status === 'completed' ? 'selected' : '' }}>Afgerond</option>
|
||||
<option value="cancelled" {{ $order->status === 'cancelled' ? 'selected' : '' }}>Geannuleerd</option>
|
||||
</select>
|
||||
<button type="submit" class="px-4 py-2 rounded-xl bg-amber-400 hover:bg-amber-300 text-slate-950 font-black text-xs transition">
|
||||
<button type="submit" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition shadow-xs cursor-pointer">
|
||||
Status Bijwerken
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="p-3.5 rounded-xl bg-emerald-50 border border-emerald-200/60 text-emerald-800 text-xs flex items-center space-x-2.5">
|
||||
<i data-lucide="check-circle" class="w-4 h-4 text-emerald-600 shrink-0"></i>
|
||||
<span class="font-medium">{{ session('success') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
|
||||
<!-- Order Items -->
|
||||
<div class="md:col-span-2 space-y-4">
|
||||
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4">
|
||||
<h3 class="font-heading font-black text-base text-white">Bestelde 3D Prints</h3>
|
||||
<div class="p-6 rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-4">
|
||||
<h3 class="font-bold text-sm text-slate-900">Bestelde 3D Prints</h3>
|
||||
|
||||
<div class="divide-y divide-slate-800">
|
||||
<div class="divide-y divide-slate-100">
|
||||
@foreach($order->items as $item)
|
||||
<div class="py-3.5 flex items-start justify-between gap-4">
|
||||
<div>
|
||||
<h4 class="font-bold text-white text-sm">{{ $item->product_name }}</h4>
|
||||
<div class="text-xs text-slate-400 space-y-0.5 mt-1">
|
||||
<div><strong>Materiaal:</strong> {{ strtoupper($item->material) }}</div>
|
||||
<div><strong>Kleur:</strong> {{ $item->color }}</div>
|
||||
<div><strong>Schaal:</strong> {{ $item->scale ?? '100%' }}</div>
|
||||
<h4 class="font-semibold text-slate-900 text-xs">{{ $item->product_name }}</h4>
|
||||
<div class="text-[11px] text-slate-500 space-y-0.5 mt-1">
|
||||
<div><span class="text-slate-400">Materiaal:</span> {{ strtoupper($item->material) }}</div>
|
||||
<div><span class="text-slate-400">Kleur:</span> {{ $item->color }}</div>
|
||||
<div><span class="text-slate-400">Schaal:</span> {{ $item->scale ?? '100%' }}</div>
|
||||
@if($item->custom_file_url)
|
||||
<div class="pt-1">
|
||||
<a href="{{ $item->custom_file_url }}" target="_blank" class="text-sky-600 hover:underline flex items-center space-x-1 font-mono">
|
||||
<i data-lucide="download" class="w-3 h-3"></i>
|
||||
<span>Download 3D bestand (STL/3MF)</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<span class="font-heading font-black text-white text-sm">
|
||||
<span class="font-semibold text-slate-900 text-xs">
|
||||
{{ $item->quantity }}x € {{ number_format($item->unit_price, 2, ',', '.') }}
|
||||
</span>
|
||||
<div class="text-xs font-black text-amber-400 mt-1">
|
||||
<div class="text-xs font-bold text-slate-900 mt-0.5">
|
||||
€ {{ number_format($item->total_price, 2, ',', '.') }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,50 +78,45 @@
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="pt-4 border-t border-slate-800 flex items-center justify-between font-heading font-black text-lg text-white">
|
||||
<span>Totaalbedrag</span>
|
||||
<span class="text-amber-400">{{ $order->formatted_total }}</span>
|
||||
<div class="pt-4 border-t border-slate-100 flex items-center justify-between text-xs">
|
||||
<span class="font-medium text-slate-500">Totaalbedrag (incl. BTW)</span>
|
||||
<span class="font-bold text-base text-slate-900">{{ $order->formatted_total }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Klantgegevens & Afleveradres -->
|
||||
<!-- Klant & Verzendinfo -->
|
||||
<div class="space-y-4">
|
||||
<div class="p-6 rounded-3xl bg-slate-900 border border-slate-800 space-y-4 text-xs">
|
||||
<h3 class="font-heading font-black text-base text-white">Klant & Verzendadres</h3>
|
||||
|
||||
<div class="space-y-2 text-slate-300">
|
||||
<div class="p-5 rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-3">
|
||||
<h3 class="font-bold text-xs text-slate-900 uppercase tracking-wider">Klantgegevens</h3>
|
||||
|
||||
<div class="text-xs space-y-1.5 text-slate-600">
|
||||
<div>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Naam</span>
|
||||
<strong class="text-white">{{ $order->customer_name }}</strong>
|
||||
<span class="text-slate-400 block text-[10px]">Naam</span>
|
||||
<span class="font-semibold text-slate-900">{{ $order->customer_name }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">E-mail</span>
|
||||
<span>{{ $order->customer_email }}</span>
|
||||
<span class="text-slate-400 block text-[10px]">E-mailadres</span>
|
||||
<a href="mailto:{{ $order->customer_email }}" class="text-slate-900 hover:underline font-mono">{{ $order->customer_email }}</a>
|
||||
</div>
|
||||
|
||||
@if($order->customer_phone)
|
||||
<div>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Telefoon</span>
|
||||
<span>{{ $order->customer_phone }}</span>
|
||||
<span class="text-slate-400 block text-[10px]">Telefoonnummer</span>
|
||||
<span class="text-slate-900">{{ $order->customer_phone }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="pt-2 border-t border-slate-800">
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Adres</span>
|
||||
<div>{{ $order->shipping_street }} {{ $order->shipping_number }}</div>
|
||||
<div>{{ $order->shipping_postal_code }} {{ $order->shipping_city }}</div>
|
||||
<div>{{ $order->shipping_country ?? 'Nederland' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($order->notes)
|
||||
<div class="pt-3 border-t border-slate-800">
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Klant Opmerking</span>
|
||||
<p class="text-slate-300 italic mt-1">{{ $order->notes }}</p>
|
||||
</div>
|
||||
@endif
|
||||
<div class="p-5 rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-3">
|
||||
<h3 class="font-bold text-xs text-slate-900 uppercase tracking-wider">Verzendadres</h3>
|
||||
|
||||
<div class="text-xs text-slate-700 leading-relaxed">
|
||||
<div class="font-semibold text-slate-900">{{ $order->customer_name }}</div>
|
||||
<div>{{ $order->shipping_street }} {{ $order->shipping_number }}</div>
|
||||
<div>{{ $order->shipping_postal_code }} {{ $order->shipping_city }}</div>
|
||||
<div class="text-slate-400">Nederland</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
}">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-5 border-b border-slate-200/80">
|
||||
<div class="flex items-center justify-between pb-5 border-b border-slate-200/60">
|
||||
<div>
|
||||
<a href="{{ route('admin.products.index') }}" class="text-xs text-amber-600 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
|
||||
<a href="{{ route('admin.products.index') }}" class="text-xs text-slate-500 hover:text-slate-900 font-medium inline-flex items-center space-x-1 mb-1">
|
||||
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
|
||||
<span>Terug naar Producten</span>
|
||||
</a>
|
||||
<h1 class="font-heading text-2xl font-black text-slate-900">Nieuw Product Toevoegen</h1>
|
||||
<h1 class="font-heading text-2xl font-bold text-slate-900 tracking-tight">Nieuw Product Toevoegen</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,18 +90,18 @@
|
||||
<form action="{{ route('admin.products.store') }}" method="POST" class="space-y-6">
|
||||
@csrf
|
||||
|
||||
<div class="p-6 sm:p-8 rounded-3xl bg-white border border-slate-200/80 shadow-2xs space-y-6">
|
||||
<div class="p-6 sm:p-7 rounded-2xl bg-white border border-slate-200/60 shadow-2xs space-y-6">
|
||||
|
||||
<!-- Basis Informatie -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="md:col-span-2 space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Productnaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name') }}" required placeholder="bijv. Articulated Mecha Robot" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900 font-bold focus:outline-none focus:ring-2 focus:ring-amber-400/20 focus:border-amber-400 transition">
|
||||
<label class="block text-xs font-medium text-slate-700">Productnaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name') }}" required placeholder="bijv. Articulated Mecha Robot" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 font-medium focus:outline-none focus:ring-1 focus:ring-slate-400 transition">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Categorie *</label>
|
||||
<select name="category_id" required class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2.5 text-xs text-slate-900 font-bold">
|
||||
<label class="block text-xs font-medium text-slate-700">Categorie *</label>
|
||||
<select name="category_id" required class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 font-medium">
|
||||
@foreach($categories as $cat)
|
||||
<option value="{{ $cat->id }}" {{ old('category_id') == $cat->id ? 'selected' : '' }}>
|
||||
{{ $cat->name }}
|
||||
@@ -112,52 +112,52 @@
|
||||
</div>
|
||||
|
||||
<!-- ==================================================== -->
|
||||
<!-- 3D PRINT KOSTPRIJSCALCULATOR WIDGET -->
|
||||
<!-- 3D PRINT KOSTPRIJSCALCULATOR WIDGET (Sleek & Subtle) -->
|
||||
<!-- ==================================================== -->
|
||||
<div class="p-5 rounded-2xl bg-amber-50/40 border border-amber-200/70 space-y-4">
|
||||
<div class="p-4 sm:p-5 rounded-xl bg-slate-50/70 border border-slate-200/70 space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="w-6 h-6 rounded-lg bg-amber-400 text-slate-950 flex items-center justify-center text-xs">🖨️</span>
|
||||
<h3 class="font-heading text-xs font-black text-slate-900 uppercase tracking-wider">3D Print Kostprijscalculator</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-amber-100 text-amber-900 font-mono text-[10px] font-bold">Automatisch Prijsvoorstel</span>
|
||||
<i data-lucide="calculator" class="w-4 h-4 text-slate-500"></i>
|
||||
<h3 class="text-xs font-semibold text-slate-900 uppercase tracking-wider">3D Print Kostprijscalculator</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-200/70 text-slate-700 font-mono text-[10px]">Formule</span>
|
||||
</div>
|
||||
|
||||
<button type="button" @click="showCalculator = !showCalculator" class="text-xs text-slate-500 hover:text-slate-800 font-semibold flex items-center space-x-1">
|
||||
<span x-text="showCalculator ? 'Inklappen' : 'Calculator Openen'"></span>
|
||||
<button type="button" @click="showCalculator = !showCalculator" class="text-xs text-slate-500 hover:text-slate-800 font-medium flex items-center space-x-1 cursor-pointer">
|
||||
<span x-text="showCalculator ? 'Inklappen' : 'Openen'"></span>
|
||||
<i data-lucide="chevron-down" class="w-3.5 h-3.5 transition-transform" :class="showCalculator ? 'rotate-180' : ''"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div x-show="showCalculator" x-transition class="space-y-4 pt-2">
|
||||
<div x-show="showCalculator" x-transition class="space-y-4 pt-1">
|
||||
<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 text-xs">
|
||||
<!-- Gewicht -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Gewicht (gram)</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Gewicht</label>
|
||||
<div class="relative">
|
||||
<input type="number" x-model.number="weightGrams" min="1" max="5000" class="w-full bg-white border border-slate-200 rounded-xl px-3 py-1.5 text-xs font-black text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400 font-bold">gram</span>
|
||||
<input type="number" x-model.number="weightGrams" min="1" max="5000" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-semibold text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400">gram</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Printtijd -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Printtijd (uren)</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Printduur</label>
|
||||
<div class="relative">
|
||||
<input type="number" step="0.1" x-model.number="printTimeHours" min="0.1" max="100" class="w-full bg-white border border-slate-200 rounded-xl px-3 py-1.5 text-xs font-black text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400 font-bold">uur</span>
|
||||
<input type="number" step="0.1" x-model.number="printTimeHours" min="0.1" max="100" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-semibold text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400">uur</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Aantal Kleuren (AMS Purge) -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Aantal Kleuren</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Kleuren (AMS)</label>
|
||||
<div class="grid grid-cols-4 gap-1">
|
||||
<template x-for="c in [1, 2, 3, 4]" :key="c">
|
||||
<button
|
||||
type="button"
|
||||
@click="colorCount = c"
|
||||
class="py-1.5 rounded-lg text-center font-bold text-xs transition border"
|
||||
:class="colorCount === c ? 'bg-amber-400 border-amber-500 text-slate-950 font-black shadow-2xs' : 'bg-white border-slate-200 text-slate-600 hover:bg-slate-50'"
|
||||
class="py-1 rounded-md text-center font-medium text-xs transition border cursor-pointer"
|
||||
:class="colorCount === c ? 'bg-slate-900 border-slate-900 text-white shadow-2xs' : 'bg-white border-slate-200 text-slate-600 hover:bg-slate-50'"
|
||||
x-text="c"
|
||||
></button>
|
||||
</template>
|
||||
@@ -166,8 +166,8 @@
|
||||
|
||||
<!-- Materiaalsoort -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Materiaalsoort</label>
|
||||
<select x-model="material" class="w-full bg-white border border-slate-200 rounded-xl px-2.5 py-1.5 text-xs font-bold text-slate-900">
|
||||
<label class="block text-[11px] font-medium text-slate-600">Materiaalsoort</label>
|
||||
<select x-model="material" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-medium text-slate-900">
|
||||
<option value="pla">Bio-PLA (1.0x)</option>
|
||||
<option value="petg">PETG Tough (1.2x)</option>
|
||||
<option value="silk">Silk Zijdeglans (1.3x)</option>
|
||||
@@ -176,48 +176,43 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Winstmarge selectie -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-amber-200/50 text-xs">
|
||||
<div class="flex items-center space-x-1.5">
|
||||
<span class="text-slate-600 font-bold text-[11px]">Winstmarge:</span>
|
||||
<div class="inline-flex rounded-lg border border-slate-200 bg-white p-0.5 text-[11px] font-bold">
|
||||
<button type="button" @click="markupPercent = 35" :class="markupPercent === 35 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">35%</button>
|
||||
<button type="button" @click="markupPercent = 50" :class="markupPercent === 50 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">50%</button>
|
||||
<button type="button" @click="markupPercent = 65" :class="markupPercent === 65 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">65%</button>
|
||||
<button type="button" @click="markupPercent = 100" :class="markupPercent === 100 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">100%</button>
|
||||
<!-- Marge Selector -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-slate-200/60 text-xs">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="text-slate-500 font-medium text-[11px]">Marge:</span>
|
||||
<div class="inline-flex rounded-lg border border-slate-200 bg-white p-0.5 text-[11px] font-medium">
|
||||
<button type="button" @click="markupPercent = 35" :class="markupPercent === 35 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">35%</button>
|
||||
<button type="button" @click="markupPercent = 50" :class="markupPercent === 50 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">50%</button>
|
||||
<button type="button" @click="markupPercent = 65" :class="markupPercent === 65 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">65%</button>
|
||||
<button type="button" @click="markupPercent = 100" :class="markupPercent === 100 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">100%</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Live Cost Breakdown Strip -->
|
||||
<div class="flex items-center space-x-3 text-[11px] text-slate-500 font-semibold">
|
||||
<span>🧵 Materiaal: €<span x-text="materialCost"></span></span>
|
||||
<span>⚡ Stroom: €<span x-text="electricityCost"></span></span>
|
||||
<span>⚙️ Slijtage: €<span x-text="machineCost"></span></span>
|
||||
<span class="font-bold text-slate-700">Kostprijs: €<span x-text="totalProductionCost"></span></span>
|
||||
<!-- Live Cost Breakdown -->
|
||||
<div class="flex items-center space-x-3 text-[11px] text-slate-400 font-normal">
|
||||
<span>Materiaal: €<span x-text="materialCost"></span></span>
|
||||
<span>Stroom: €<span x-text="electricityCost"></span></span>
|
||||
<span>Slijtage: €<span x-text="machineCost"></span></span>
|
||||
<span class="font-semibold text-slate-700">Kostprijs: €<span x-text="totalProductionCost"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Result Banner met 1-klik overneem knop -->
|
||||
<div class="p-3.5 rounded-xl bg-white border border-amber-300 shadow-2xs flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-10 h-10 rounded-xl bg-amber-100 text-amber-900 flex items-center justify-center font-heading font-black text-sm">
|
||||
€
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-[10px] text-slate-400 block font-bold uppercase tracking-wider">Berekend Prijsvoorstel (incl. 21% btw)</span>
|
||||
<div class="flex items-baseline space-x-1.5">
|
||||
<span class="font-heading text-xl font-black text-slate-900">€ <span x-text="suggestedPrice"></span></span>
|
||||
<span class="text-[11px] text-slate-500">op basis van <span x-text="weightGrams"></span>g • <span x-text="printTimeHours"></span>u • <span x-text="colorCount"></span> kleur(en)</span>
|
||||
</div>
|
||||
<!-- Callout Strip -->
|
||||
<div class="p-3 rounded-lg bg-white border border-slate-200/80 shadow-2xs flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<div>
|
||||
<span class="text-[10px] text-slate-400 uppercase font-medium block">Adviesprijs (incl. 21% btw)</span>
|
||||
<div class="flex items-baseline space-x-1.5">
|
||||
<span class="font-heading text-lg font-bold text-slate-900">€ <span x-text="suggestedPrice"></span></span>
|
||||
<span class="text-[11px] text-slate-400">(op basis van <span x-text="weightGrams"></span>g • <span x-text="printTimeHours"></span>u • <span x-text="colorCount"></span> kleur)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@click="applySuggestedPrice"
|
||||
class="px-4 py-2 bg-gradient-to-r from-amber-400 to-rose-400 hover:from-amber-300 hover:to-rose-300 text-slate-950 font-black text-xs rounded-xl shadow-xs transition flex items-center justify-center space-x-1.5 cursor-pointer"
|
||||
class="px-3.5 py-1.5 bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs rounded-lg transition flex items-center justify-center space-x-1.5 cursor-pointer shadow-2xs"
|
||||
>
|
||||
<i data-lucide="check" class="w-4 h-4"></i>
|
||||
<i data-lucide="check" class="w-3.5 h-3.5"></i>
|
||||
<span>Neem Adviesprijs Over (€ <span x-text="suggestedPrice"></span>)</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -227,30 +222,30 @@
|
||||
<!-- Prijs & Korte Omschrijving -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Basisprijs (€) *</label>
|
||||
<label class="block text-xs font-medium text-slate-700">Basisprijs (€) *</label>
|
||||
<div class="relative">
|
||||
<span class="absolute left-3.5 top-1/2 -translate-y-1/2 font-bold text-slate-400 text-xs">€</span>
|
||||
<span class="absolute left-3 top-1/2 -translate-y-1/2 font-medium text-slate-400 text-xs">€</span>
|
||||
<input
|
||||
type="number"
|
||||
step="0.01"
|
||||
name="base_price"
|
||||
x-model="basePrice"
|
||||
required
|
||||
class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl pl-7 pr-3.5 py-2.5 text-xs text-slate-900 font-bold focus:outline-none focus:ring-2 focus:ring-amber-400/20 focus:border-amber-400"
|
||||
class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg pl-7 pr-3 py-2 text-xs text-slate-900 font-semibold focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Korte Omschrijving (voor catalogus cards)</label>
|
||||
<input type="text" name="short_description" value="{{ old('short_description') }}" placeholder="Korte samenvatting in 1 zin..." class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Korte Omschrijving (voor catalogus cards)</label>
|
||||
<input type="text" name="short_description" value="{{ old('short_description') }}" placeholder="Korte samenvatting in 1 zin..." class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Visueel Afbeeldingen & Fotogalerij Beheer -->
|
||||
<div class="pt-5 border-t border-slate-200/80 space-y-4"
|
||||
<!-- Afbeeldingen & Galerij Beheer -->
|
||||
<div class="pt-5 border-t border-slate-200/60 space-y-4"
|
||||
x-data="{
|
||||
imageUrl: '{{ old('image_url', '/images/products/crystal-dragon.jpg') }}',
|
||||
imageUrl: '{{ old('image_url', '') }}',
|
||||
galleryImages: {{ json_encode(old('gallery_images', []), JSON_UNESCAPED_SLASHES) }},
|
||||
newImageUrl: '',
|
||||
addError: '',
|
||||
@@ -286,7 +281,7 @@
|
||||
let url = this.newImageUrl.trim();
|
||||
if (!url) return;
|
||||
if (url === this.imageUrl || this.galleryImages.includes(url)) {
|
||||
this.addError = 'Deze afbeelding is al toegevoegd!';
|
||||
this.addError = 'Deze afbeelding is al gekoppeld!';
|
||||
return;
|
||||
}
|
||||
if (!this.imageUrl) {
|
||||
@@ -327,14 +322,13 @@
|
||||
})
|
||||
.catch(err => {
|
||||
this.isUploading = false;
|
||||
this.uploadError = 'Fout bij uploaden van afbeelding';
|
||||
this.uploadError = 'Fout bij uploaden';
|
||||
});
|
||||
|
||||
event.target.value = '';
|
||||
}
|
||||
}">
|
||||
|
||||
<!-- Verborgen form fields -->
|
||||
<input type="hidden" name="image_url" :value="imageUrl">
|
||||
<template x-for="(img, idx) in galleryImages" :key="idx">
|
||||
<input type="hidden" name="gallery_images[]" :value="img">
|
||||
@@ -343,141 +337,111 @@
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<i data-lucide="image" class="w-4 h-4 text-amber-500"></i>
|
||||
<h3 class="font-heading text-sm font-black text-slate-900 uppercase tracking-wider">Productafbeeldingen & Fotogalerij</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-100 text-slate-700 font-mono text-[11px] font-bold" x-text="(imageUrl ? 1 : 0) + galleryImages.length + ' foto(\'s)'"></span>
|
||||
<i data-lucide="image" class="w-4 h-4 text-slate-500"></i>
|
||||
<h3 class="text-xs font-semibold text-slate-900 uppercase tracking-wider">Afbeeldingen</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-100 text-slate-600 font-mono text-[11px]" x-text="(imageUrl ? 1 : 0) + galleryImages.length + ' foto(\'s)'"></span>
|
||||
</div>
|
||||
<p class="text-xs text-slate-500 mt-0.5">
|
||||
Upload foto's vanaf je computer of telefoon, of plak een web-URL.
|
||||
Hoofdfoto en extra foto's voor de galerij.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<!-- Bestand uploaden button -->
|
||||
<label class="px-3 py-1.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-2xs cursor-pointer">
|
||||
<i data-lucide="upload" class="w-3.5 h-3.5 text-amber-500"></i>
|
||||
<label class="px-3 py-1.5 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs cursor-pointer">
|
||||
<i data-lucide="upload" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span x-text="isUploading ? 'Uploaden...' : 'Foto Uploaden'"></span>
|
||||
<input type="file" accept="image/*" class="hidden" @change="uploadFile" :disabled="isUploading">
|
||||
</label>
|
||||
|
||||
<!-- URL toevoegen toggle -->
|
||||
<button type="button" @click="showUrlInput = !showUrlInput" class="px-3 py-1.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-2xs">
|
||||
<i data-lucide="link" class="w-3.5 h-3.5 text-amber-500"></i>
|
||||
<button type="button" @click="showUrlInput = !showUrlInput" class="px-3 py-1.5 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs">
|
||||
<i data-lucide="link" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span>URL Plakken</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- URL Toevoegen Bar -->
|
||||
<div x-show="showUrlInput" x-transition class="p-3 bg-slate-50 rounded-2xl border border-slate-200 space-y-2">
|
||||
<div x-show="showUrlInput" x-transition class="p-3 bg-slate-50 rounded-xl border border-slate-200/60 space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<input
|
||||
type="text"
|
||||
x-model="newImageUrl"
|
||||
@keydown.enter.prevent="addImageUrl"
|
||||
placeholder="Plak hier een foto-URL (bijv. https://... of /images/products/...)"
|
||||
class="flex-1 bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-amber-400"
|
||||
placeholder="Plak hier een foto-URL..."
|
||||
class="flex-1 bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
<button type="button" @click="addImageUrl" class="px-4 py-2 bg-amber-400 hover:bg-amber-300 text-slate-950 rounded-xl text-xs font-black transition flex items-center space-x-1">
|
||||
<i data-lucide="plus" class="w-3.5 h-3.5"></i>
|
||||
<span>Toevoegen</span>
|
||||
<button type="button" @click="addImageUrl" class="px-3.5 py-1.5 bg-slate-900 hover:bg-slate-800 text-white rounded-lg text-xs font-medium transition">
|
||||
Toevoegen
|
||||
</button>
|
||||
</div>
|
||||
<p x-show="addError" x-text="addError" class="text-xs text-rose-600 font-bold"></p>
|
||||
<p x-show="addError" x-text="addError" class="text-xs text-rose-600 font-medium"></p>
|
||||
</div>
|
||||
|
||||
<div x-show="uploadError" x-text="uploadError" class="p-2.5 bg-rose-50 border border-rose-200 text-xs text-rose-700 rounded-xl font-bold"></div>
|
||||
<div x-show="uploadError" x-text="uploadError" class="p-2.5 bg-rose-50 border border-rose-200 text-xs text-rose-700 rounded-lg font-medium"></div>
|
||||
|
||||
<!-- Visuele Weergave: Hoofdafbeelding + Gallerij Grid -->
|
||||
<!-- Visuele Weergave -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-12 gap-4 items-start">
|
||||
|
||||
<!-- Hoofdafbeelding Box (Links) -->
|
||||
<div class="md:col-span-5 bg-slate-50/80 rounded-2xl border-2 border-amber-300 p-3.5 space-y-2 relative overflow-hidden">
|
||||
<!-- Cover Box -->
|
||||
<div class="md:col-span-5 bg-slate-50/70 rounded-xl border border-slate-200/80 p-3 space-y-2 relative overflow-hidden">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="px-2.5 py-1 rounded-full bg-amber-400 text-slate-950 font-black text-[10px] uppercase tracking-wider flex items-center space-x-1 shadow-2xs">
|
||||
<i data-lucide="star" class="w-3 h-3 fill-current"></i>
|
||||
<span>Hoofdafbeelding (Cover)</span>
|
||||
</span>
|
||||
|
||||
<span class="text-[10px] font-semibold text-slate-500 uppercase tracking-wider">Hoofdafbeelding</span>
|
||||
<template x-if="imageUrl">
|
||||
<button type="button" @click="removeCover" class="text-slate-400 hover:text-rose-600 text-xs font-bold transition flex items-center space-x-1" title="Verwijder hoofdafbeelding">
|
||||
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
|
||||
<span>Verwijderen</span>
|
||||
<button type="button" @click="removeCover" class="text-slate-400 hover:text-rose-600 text-[11px] transition">
|
||||
Verwijderen
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Grote Image Preview -->
|
||||
<div class="aspect-4/3 rounded-xl bg-white overflow-hidden flex items-center justify-center relative border border-slate-200 shadow-2xs">
|
||||
<div class="aspect-4/3 rounded-lg bg-white overflow-hidden flex items-center justify-center relative border border-slate-200/60 shadow-2xs">
|
||||
<template x-if="imageUrl">
|
||||
<img :src="imageUrl" alt="Hoofdafbeelding" class="w-full h-full object-cover">
|
||||
</template>
|
||||
<template x-if="!imageUrl">
|
||||
<div class="text-center p-4 text-slate-400 space-y-1">
|
||||
<i data-lucide="image" class="w-8 h-8 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs font-bold">Geen hoofdafbeelding</p>
|
||||
<p class="text-[10px]">Kies een foto of voeg er een toe.</p>
|
||||
<i data-lucide="image" class="w-6 h-6 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs">Nog geen foto geselecteerd</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Huidige Cover URL weergave -->
|
||||
<div class="pt-1">
|
||||
<span class="text-[10px] font-mono text-slate-400 truncate block" x-text="imageUrl || 'Geen URL ingesteld'"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gallerij Foto's (Rechts) -->
|
||||
<div class="md:col-span-7 bg-slate-50/60 rounded-2xl border border-slate-200 p-3.5 space-y-3">
|
||||
<!-- Gallerij Grid -->
|
||||
<div class="md:col-span-7 bg-slate-50/50 rounded-xl border border-slate-200/60 p-3 space-y-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="text-xs font-black text-slate-700 uppercase tracking-wider">Extra Gallerij Foto's</span>
|
||||
<span class="text-[10px] text-slate-400 font-bold" x-text="galleryImages.length + ' extra foto(\'s)'"></span>
|
||||
<span class="text-xs font-medium text-slate-700">Extra Galerijfoto's</span>
|
||||
<span class="text-[10px] text-slate-400" x-text="galleryImages.length + ' foto(\'s)'"></span>
|
||||
</div>
|
||||
|
||||
<!-- Grid van Extra Foto's -->
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-2.5 max-h-96 overflow-y-auto pr-1">
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-2 max-h-80 overflow-y-auto pr-1">
|
||||
<template x-for="(img, index) in galleryImages" :key="index">
|
||||
<div class="group relative rounded-xl bg-white border border-slate-200 hover:border-amber-400 transition overflow-hidden shadow-2xs">
|
||||
<div class="group relative rounded-lg bg-white border border-slate-200/80 overflow-hidden shadow-2xs">
|
||||
<div class="aspect-square w-full overflow-hidden bg-slate-100">
|
||||
<img :src="img" alt="Gallerij foto" class="w-full h-full object-cover group-hover:scale-105 transition duration-200" loading="lazy">
|
||||
<img :src="img" alt="Gallerij foto" class="w-full h-full object-cover" loading="lazy">
|
||||
</div>
|
||||
|
||||
<!-- Index Badge -->
|
||||
<div class="absolute top-1.5 left-1.5">
|
||||
<span class="px-1.5 py-0.5 rounded bg-slate-900/80 text-white font-mono text-[9px] font-bold backdrop-blur" x-text="'#' + (index + 1)"></span>
|
||||
</div>
|
||||
|
||||
<!-- Overlay Knoppen -->
|
||||
<div class="absolute inset-0 bg-slate-900/60 opacity-0 group-hover:opacity-100 transition flex flex-col items-center justify-center gap-1.5 p-2">
|
||||
<div class="absolute inset-0 bg-slate-900/60 opacity-0 group-hover:opacity-100 transition flex flex-col items-center justify-center gap-1 p-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="setAsCover(index)"
|
||||
class="w-full py-1.5 px-2 bg-amber-400 hover:bg-amber-300 text-slate-950 rounded-lg text-[10px] font-black uppercase tracking-wider transition flex items-center justify-center space-x-1 shadow"
|
||||
class="w-full py-1 px-2 bg-white text-slate-900 rounded text-[10px] font-semibold transition"
|
||||
>
|
||||
<i data-lucide="star" class="w-3 h-3 fill-current"></i>
|
||||
<span>Als Cover</span>
|
||||
Als Cover
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@click="removeGalleryImage(index)"
|
||||
class="w-full py-1 px-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-[10px] font-bold transition flex items-center justify-center space-x-1"
|
||||
class="w-full py-1 px-2 bg-rose-600 text-white rounded text-[10px] font-medium transition"
|
||||
>
|
||||
<i data-lucide="trash-2" class="w-3 h-3"></i>
|
||||
<span>Verwijder</span>
|
||||
Verwijder
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div x-show="galleryImages.length === 0" class="text-center py-8 px-4 rounded-xl border border-dashed border-slate-200 text-slate-400 space-y-1">
|
||||
<i data-lucide="images" class="w-6 h-6 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs font-bold text-slate-600">Nog geen extra galerijfoto's</p>
|
||||
<p class="text-[11px] text-slate-400 max-w-xs mx-auto">
|
||||
Voeg extra detailfoto's toe via "URL Plakken" of "Foto Uploaden".
|
||||
</p>
|
||||
<div x-show="galleryImages.length === 0" class="text-center py-6 px-3 rounded-lg border border-dashed border-slate-200 text-slate-400 text-xs">
|
||||
Geen extra foto's in de galerij.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -487,37 +451,37 @@
|
||||
|
||||
<!-- Beschrijving -->
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Volledige Productbeschrijving *</label>
|
||||
<textarea name="description" rows="5" required class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900 leading-relaxed">{{ old('description') }}</textarea>
|
||||
<label class="block text-xs font-medium text-slate-700">Productbeschrijving *</label>
|
||||
<textarea name="description" rows="5" required placeholder="Gedetailleerde informatie over dit 3D model..." class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 leading-relaxed focus:outline-none focus:ring-1 focus:ring-slate-400">{{ old('description') }}</textarea>
|
||||
</div>
|
||||
|
||||
<!-- Print Specs -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-4 border-t border-slate-200/80">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-4 border-t border-slate-200/60">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Afmetingen (LxBxH)</label>
|
||||
<input type="text" name="dimensions" value="{{ old('dimensions', '15 x 10 x 8 cm') }}" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Afmetingen</label>
|
||||
<input type="text" name="dimensions" value="{{ old('dimensions') }}" placeholder="bijv. 12 x 8 x 10 cm" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Gewicht (gram)</label>
|
||||
<input type="number" name="weight_grams" x-model.number="weightGrams" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Gewicht (gram)</label>
|
||||
<input type="number" name="weight_grams" x-model.number="weightGrams" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Printtijd (uren)</label>
|
||||
<input type="number" step="0.1" name="print_time_hours" x-model.number="printTimeHours" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Printduur (uren)</label>
|
||||
<input type="number" step="0.1" name="print_time_hours" x-model.number="printTimeHours" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toggles -->
|
||||
<div class="pt-4 border-t border-slate-200/80 flex items-center space-x-6">
|
||||
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-700">
|
||||
<input type="checkbox" name="is_active" value="1" checked class="w-4 h-4 rounded text-amber-500 bg-white border-slate-300">
|
||||
<div class="pt-4 border-t border-slate-200/60 flex items-center space-x-6 text-xs text-slate-700 font-medium">
|
||||
<label class="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="checkbox" name="is_active" value="1" {{ old('is_active', 1) ? 'checked' : '' }} class="w-4 h-4 rounded text-slate-900 border-slate-300">
|
||||
<span>Direct zichtbaar in webshop (Actief)</span>
|
||||
</label>
|
||||
|
||||
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-700">
|
||||
<input type="checkbox" name="is_featured" value="1" class="w-4 h-4 rounded text-amber-500 bg-white border-slate-300">
|
||||
<label class="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="checkbox" name="is_featured" value="1" {{ old('is_featured') ? 'checked' : '' }} class="w-4 h-4 rounded text-slate-900 border-slate-300">
|
||||
<span>Uitlichten op homepage</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -525,12 +489,12 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end space-x-3">
|
||||
<a href="{{ route('admin.products.index') }}" class="px-4 py-2.5 rounded-xl bg-white hover:bg-slate-50 text-slate-600 text-xs font-bold transition border border-slate-200">
|
||||
<a href="{{ route('admin.products.index') }}" class="px-4 py-2 rounded-lg bg-white hover:bg-slate-50 text-slate-600 text-xs font-medium transition border border-slate-200">
|
||||
Annuleren
|
||||
</a>
|
||||
<button type="submit" class="px-6 py-2.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-xs cursor-pointer">
|
||||
<button type="submit" class="px-5 py-2 rounded-lg bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition flex items-center space-x-1.5 shadow-xs cursor-pointer">
|
||||
<i data-lucide="plus" class="w-4 h-4"></i>
|
||||
<span>Product Publiceren</span>
|
||||
<span>Product Opslaan</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -76,17 +76,17 @@
|
||||
}">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex items-center justify-between pb-5 border-b border-slate-200/80">
|
||||
<div class="flex items-center justify-between pb-5 border-b border-slate-200/60">
|
||||
<div>
|
||||
<a href="{{ route('admin.products.index') }}" class="text-xs text-amber-600 font-bold hover:underline inline-flex items-center space-x-1 mb-1">
|
||||
<a href="{{ route('admin.products.index') }}" class="text-xs text-slate-500 hover:text-slate-900 font-medium inline-flex items-center space-x-1 mb-1">
|
||||
<i data-lucide="arrow-left" class="w-3.5 h-3.5"></i>
|
||||
<span>Terug naar Producten</span>
|
||||
</a>
|
||||
<h1 class="font-heading text-2xl font-black text-slate-900">Product Bewerken: {{ $product->name }}</h1>
|
||||
<h1 class="font-heading text-2xl font-bold text-slate-900 tracking-tight">Product Bewerken: {{ $product->name }}</h1>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="px-3.5 py-2 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-2xs">
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="px-3 py-1.5 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs">
|
||||
<span>Bekijk Live</span>
|
||||
<i data-lucide="external-link" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
</a>
|
||||
@@ -98,18 +98,18 @@
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="p-6 sm:p-8 rounded-3xl bg-white border border-slate-200/80 shadow-2xs space-y-6">
|
||||
<div class="p-6 sm:p-7 rounded-2xl bg-white border border-slate-200/60 shadow-2xs space-y-6">
|
||||
|
||||
<!-- Basis Informatie -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="md:col-span-2 space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Productnaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name', $product->name) }}" required class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900 font-bold focus:outline-none focus:ring-2 focus:ring-amber-400/20 focus:border-amber-400 transition">
|
||||
<label class="block text-xs font-medium text-slate-700">Productnaam *</label>
|
||||
<input type="text" name="name" value="{{ old('name', $product->name) }}" required class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 font-medium focus:outline-none focus:ring-1 focus:ring-slate-400 transition">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Categorie *</label>
|
||||
<select name="category_id" required class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2.5 text-xs text-slate-900 font-bold">
|
||||
<label class="block text-xs font-medium text-slate-700">Categorie *</label>
|
||||
<select name="category_id" required class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 font-medium">
|
||||
@foreach($categories as $cat)
|
||||
<option value="{{ $cat->id }}" {{ old('category_id', $product->category_id) == $cat->id ? 'selected' : '' }}>
|
||||
{{ $cat->name }}
|
||||
@@ -120,52 +120,52 @@
|
||||
</div>
|
||||
|
||||
<!-- ==================================================== -->
|
||||
<!-- 3D PRINT KOSTPRIJSCALCULATOR WIDGET (3dprintingcostcalculator) -->
|
||||
<!-- 3D PRINT KOSTPRIJSCALCULATOR WIDGET (Sleek & Subtle) -->
|
||||
<!-- ==================================================== -->
|
||||
<div class="p-5 rounded-2xl bg-amber-50/40 border border-amber-200/70 space-y-4">
|
||||
<div class="p-4 sm:p-5 rounded-xl bg-slate-50/70 border border-slate-200/70 space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="w-6 h-6 rounded-lg bg-amber-400 text-slate-950 flex items-center justify-center text-xs">🖨️</span>
|
||||
<h3 class="font-heading text-xs font-black text-slate-900 uppercase tracking-wider">3D Print Kostprijscalculator</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-amber-100 text-amber-900 font-mono text-[10px] font-bold">Live Calculator</span>
|
||||
<i data-lucide="calculator" class="w-4 h-4 text-slate-500"></i>
|
||||
<h3 class="text-xs font-semibold text-slate-900 uppercase tracking-wider">3D Print Kostprijscalculator</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-200/70 text-slate-700 font-mono text-[10px]">Formule</span>
|
||||
</div>
|
||||
|
||||
<button type="button" @click="showCalculator = !showCalculator" class="text-xs text-slate-500 hover:text-slate-800 font-semibold flex items-center space-x-1">
|
||||
<span x-text="showCalculator ? 'Inklappen' : 'Calculator Openen'"></span>
|
||||
<button type="button" @click="showCalculator = !showCalculator" class="text-xs text-slate-500 hover:text-slate-800 font-medium flex items-center space-x-1 cursor-pointer">
|
||||
<span x-text="showCalculator ? 'Inklappen' : 'Openen'"></span>
|
||||
<i data-lucide="chevron-down" class="w-3.5 h-3.5 transition-transform" :class="showCalculator ? 'rotate-180' : ''"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div x-show="showCalculator" x-transition class="space-y-4 pt-2">
|
||||
<div x-show="showCalculator" x-transition class="space-y-4 pt-1">
|
||||
<div class="grid grid-cols-2 sm:grid-cols-4 gap-3 text-xs">
|
||||
<!-- Gewicht -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Gewicht (gram)</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Gewicht</label>
|
||||
<div class="relative">
|
||||
<input type="number" x-model.number="weightGrams" min="1" max="5000" class="w-full bg-white border border-slate-200 rounded-xl px-3 py-1.5 text-xs font-black text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400 font-bold">gram</span>
|
||||
<input type="number" x-model.number="weightGrams" min="1" max="5000" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-semibold text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400">gram</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Printtijd -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Printtijd (uren)</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Printduur</label>
|
||||
<div class="relative">
|
||||
<input type="number" step="0.1" x-model.number="printTimeHours" min="0.1" max="100" class="w-full bg-white border border-slate-200 rounded-xl px-3 py-1.5 text-xs font-black text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400 font-bold">uur</span>
|
||||
<input type="number" step="0.1" x-model.number="printTimeHours" min="0.1" max="100" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-semibold text-slate-900">
|
||||
<span class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] text-slate-400">uur</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Aantal Kleuren (AMS Purge) -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Aantal Kleuren</label>
|
||||
<label class="block text-[11px] font-medium text-slate-600">Kleuren (AMS)</label>
|
||||
<div class="grid grid-cols-4 gap-1">
|
||||
<template x-for="c in [1, 2, 3, 4]" :key="c">
|
||||
<button
|
||||
type="button"
|
||||
@click="colorCount = c"
|
||||
class="py-1.5 rounded-lg text-center font-bold text-xs transition border"
|
||||
:class="colorCount === c ? 'bg-amber-400 border-amber-500 text-slate-950 font-black shadow-2xs' : 'bg-white border-slate-200 text-slate-600 hover:bg-slate-50'"
|
||||
class="py-1 rounded-md text-center font-medium text-xs transition border cursor-pointer"
|
||||
:class="colorCount === c ? 'bg-slate-900 border-slate-900 text-white shadow-2xs' : 'bg-white border-slate-200 text-slate-600 hover:bg-slate-50'"
|
||||
x-text="c"
|
||||
></button>
|
||||
</template>
|
||||
@@ -174,8 +174,8 @@
|
||||
|
||||
<!-- Materiaalsoort -->
|
||||
<div class="space-y-1">
|
||||
<label class="block text-[11px] font-bold text-slate-600">Materiaalsoort</label>
|
||||
<select x-model="material" class="w-full bg-white border border-slate-200 rounded-xl px-2.5 py-1.5 text-xs font-bold text-slate-900">
|
||||
<label class="block text-[11px] font-medium text-slate-600">Materiaalsoort</label>
|
||||
<select x-model="material" class="w-full bg-white border border-slate-200 rounded-lg px-2.5 py-1.5 text-xs font-medium text-slate-900">
|
||||
<option value="pla">Bio-PLA (1.0x)</option>
|
||||
<option value="petg">PETG Tough (1.2x)</option>
|
||||
<option value="silk">Silk Zijdeglans (1.3x)</option>
|
||||
@@ -184,48 +184,43 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Winstmarge selectie -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-amber-200/50 text-xs">
|
||||
<div class="flex items-center space-x-1.5">
|
||||
<span class="text-slate-600 font-bold text-[11px]">Winstmarge:</span>
|
||||
<div class="inline-flex rounded-lg border border-slate-200 bg-white p-0.5 text-[11px] font-bold">
|
||||
<button type="button" @click="markupPercent = 35" :class="markupPercent === 35 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">35%</button>
|
||||
<button type="button" @click="markupPercent = 50" :class="markupPercent === 50 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">50%</button>
|
||||
<button type="button" @click="markupPercent = 65" :class="markupPercent === 65 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">65%</button>
|
||||
<button type="button" @click="markupPercent = 100" :class="markupPercent === 100 ? 'bg-amber-400 text-slate-950 font-black' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded-md transition">100%</button>
|
||||
<!-- Marge Selector -->
|
||||
<div class="flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-slate-200/60 text-xs">
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="text-slate-500 font-medium text-[11px]">Marge:</span>
|
||||
<div class="inline-flex rounded-lg border border-slate-200 bg-white p-0.5 text-[11px] font-medium">
|
||||
<button type="button" @click="markupPercent = 35" :class="markupPercent === 35 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">35%</button>
|
||||
<button type="button" @click="markupPercent = 50" :class="markupPercent === 50 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">50%</button>
|
||||
<button type="button" @click="markupPercent = 65" :class="markupPercent === 65 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">65%</button>
|
||||
<button type="button" @click="markupPercent = 100" :class="markupPercent === 100 ? 'bg-slate-900 text-white' : 'text-slate-600 hover:text-slate-900'" class="px-2 py-0.5 rounded transition">100%</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Live Cost Breakdown Strip -->
|
||||
<div class="flex items-center space-x-3 text-[11px] text-slate-500 font-semibold">
|
||||
<span>🧵 Materiaal: €<span x-text="materialCost"></span></span>
|
||||
<span>⚡ Stroom: €<span x-text="electricityCost"></span></span>
|
||||
<span>⚙️ Slijtage: €<span x-text="machineCost"></span></span>
|
||||
<span class="font-bold text-slate-700">Kostprijs: €<span x-text="totalProductionCost"></span></span>
|
||||
<!-- Live Cost Breakdown -->
|
||||
<div class="flex items-center space-x-3 text-[11px] text-slate-400 font-normal">
|
||||
<span>Materiaal: €<span x-text="materialCost"></span></span>
|
||||
<span>Stroom: €<span x-text="electricityCost"></span></span>
|
||||
<span>Slijtage: €<span x-text="machineCost"></span></span>
|
||||
<span class="font-semibold text-slate-700">Kostprijs: €<span x-text="totalProductionCost"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Result Banner met 1-klik overneem knop -->
|
||||
<div class="p-3.5 rounded-xl bg-white border border-amber-300 shadow-2xs flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-10 h-10 rounded-xl bg-amber-100 text-amber-900 flex items-center justify-center font-heading font-black text-sm">
|
||||
€
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-[10px] text-slate-400 block font-bold uppercase tracking-wider">Berekend Prijsvoorstel (incl. 21% btw)</span>
|
||||
<div class="flex items-baseline space-x-1.5">
|
||||
<span class="font-heading text-xl font-black text-slate-900">€ <span x-text="suggestedPrice"></span></span>
|
||||
<span class="text-[11px] text-slate-500">op basis van <span x-text="weightGrams"></span>g • <span x-text="printTimeHours"></span>u • <span x-text="colorCount"></span> kleur(en)</span>
|
||||
</div>
|
||||
<!-- Callout Strip -->
|
||||
<div class="p-3 rounded-lg bg-white border border-slate-200/80 shadow-2xs flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<div>
|
||||
<span class="text-[10px] text-slate-400 uppercase font-medium block">Adviesprijs (incl. 21% btw)</span>
|
||||
<div class="flex items-baseline space-x-1.5">
|
||||
<span class="font-heading text-lg font-bold text-slate-900">€ <span x-text="suggestedPrice"></span></span>
|
||||
<span class="text-[11px] text-slate-400">(op basis van <span x-text="weightGrams"></span>g • <span x-text="printTimeHours"></span>u • <span x-text="colorCount"></span> kleur)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@click="applySuggestedPrice"
|
||||
class="px-4 py-2 bg-gradient-to-r from-amber-400 to-rose-400 hover:from-amber-300 hover:to-rose-300 text-slate-950 font-black text-xs rounded-xl shadow-xs transition flex items-center justify-center space-x-1.5 cursor-pointer"
|
||||
class="px-3.5 py-1.5 bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs rounded-lg transition flex items-center justify-center space-x-1.5 cursor-pointer shadow-2xs"
|
||||
>
|
||||
<i data-lucide="check" class="w-4 h-4"></i>
|
||||
<i data-lucide="check" class="w-3.5 h-3.5"></i>
|
||||
<span>Neem Adviesprijs Over (€ <span x-text="suggestedPrice"></span>)</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -235,28 +230,28 @@
|
||||
<!-- Prijs & Korte Omschrijving -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Basisprijs (€) *</label>
|
||||
<label class="block text-xs font-medium text-slate-700">Basisprijs (€) *</label>
|
||||
<div class="relative">
|
||||
<span class="absolute left-3.5 top-1/2 -translate-y-1/2 font-bold text-slate-400 text-xs">€</span>
|
||||
<span class="absolute left-3 top-1/2 -translate-y-1/2 font-medium text-slate-400 text-xs">€</span>
|
||||
<input
|
||||
type="number"
|
||||
step="0.01"
|
||||
name="base_price"
|
||||
x-model="basePrice"
|
||||
required
|
||||
class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl pl-7 pr-3.5 py-2.5 text-xs text-slate-900 font-bold focus:outline-none focus:ring-2 focus:ring-amber-400/20 focus:border-amber-400"
|
||||
class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg pl-7 pr-3 py-2 text-xs text-slate-900 font-semibold focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Korte Omschrijving (voor catalogus cards)</label>
|
||||
<input type="text" name="short_description" value="{{ old('short_description', $product->short_description) }}" placeholder="Korte samenvatting in 1 zin..." class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Korte Omschrijving (voor catalogus cards)</label>
|
||||
<input type="text" name="short_description" value="{{ old('short_description', $product->short_description) }}" placeholder="Korte samenvatting in 1 zin..." class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Visueel Afbeeldingen & Fotogalerij Beheer -->
|
||||
<div class="pt-5 border-t border-slate-200/80 space-y-4"
|
||||
<div class="pt-5 border-t border-slate-200/60 space-y-4"
|
||||
x-data="{
|
||||
imageUrl: '{{ old('image_url', $product->image_url ?? '') }}',
|
||||
galleryImages: {{ json_encode(old('gallery_images', $product->gallery_images ?? []), JSON_UNESCAPED_SLASHES) }},
|
||||
@@ -351,141 +346,111 @@
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-2">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<i data-lucide="image" class="w-4 h-4 text-amber-500"></i>
|
||||
<h3 class="font-heading text-sm font-black text-slate-900 uppercase tracking-wider">Productafbeeldingen & Fotogalerij</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-100 text-slate-700 font-mono text-[11px] font-bold" x-text="(imageUrl ? 1 : 0) + galleryImages.length + ' foto(\'s)'"></span>
|
||||
<i data-lucide="image" class="w-4 h-4 text-slate-500"></i>
|
||||
<h3 class="text-xs font-semibold text-slate-900 uppercase tracking-wider">Productafbeeldingen & Fotogalerij</h3>
|
||||
<span class="px-2 py-0.5 rounded-full bg-slate-100 text-slate-600 font-mono text-[11px]" x-text="(imageUrl ? 1 : 0) + galleryImages.length + ' foto(\'s)'"></span>
|
||||
</div>
|
||||
<p class="text-xs text-slate-500 mt-0.5">
|
||||
Alle foto's die vanuit MakerWorld zijn binnengehaald worden hier visueel getoond. Je kunt foto's toevoegen, wisselen van hoofdfoto of verwijderen.
|
||||
Hoofdfoto en extra detailfoto's van MakerWorld of uploads.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-2">
|
||||
<!-- Bestand uploaden button -->
|
||||
<label class="px-3 py-1.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-2xs cursor-pointer">
|
||||
<i data-lucide="upload" class="w-3.5 h-3.5 text-amber-500"></i>
|
||||
<label class="px-3 py-1.5 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs cursor-pointer">
|
||||
<i data-lucide="upload" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span x-text="isUploading ? 'Uploaden...' : 'Foto Uploaden'"></span>
|
||||
<input type="file" accept="image/*" class="hidden" @change="uploadFile" :disabled="isUploading">
|
||||
</label>
|
||||
|
||||
<!-- URL toevoegen toggle -->
|
||||
<button type="button" @click="showUrlInput = !showUrlInput" class="px-3 py-1.5 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-2xs">
|
||||
<i data-lucide="link" class="w-3.5 h-3.5 text-amber-500"></i>
|
||||
<button type="button" @click="showUrlInput = !showUrlInput" class="px-3 py-1.5 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs">
|
||||
<i data-lucide="link" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span>URL Plakken</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- URL Toevoegen Bar -->
|
||||
<div x-show="showUrlInput" x-transition class="p-3 bg-slate-50 rounded-2xl border border-slate-200 space-y-2">
|
||||
<div x-show="showUrlInput" x-transition class="p-3 bg-slate-50 rounded-xl border border-slate-200/60 space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<input
|
||||
type="text"
|
||||
x-model="newImageUrl"
|
||||
@keydown.enter.prevent="addImageUrl"
|
||||
placeholder="Plak hier een foto-URL (bijv. https://makerworld... of /images/products/...)"
|
||||
class="flex-1 bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-amber-400"
|
||||
placeholder="Plak hier een foto-URL..."
|
||||
class="flex-1 bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-400"
|
||||
>
|
||||
<button type="button" @click="addImageUrl" class="px-4 py-2 bg-amber-400 hover:bg-amber-300 text-slate-950 rounded-xl text-xs font-black transition flex items-center space-x-1">
|
||||
<i data-lucide="plus" class="w-3.5 h-3.5"></i>
|
||||
<span>Toevoegen</span>
|
||||
<button type="button" @click="addImageUrl" class="px-3.5 py-1.5 bg-slate-900 hover:bg-slate-800 text-white rounded-lg text-xs font-medium transition">
|
||||
Toevoegen
|
||||
</button>
|
||||
</div>
|
||||
<p x-show="addError" x-text="addError" class="text-xs text-rose-600 font-bold"></p>
|
||||
<p x-show="addError" x-text="addError" class="text-xs text-rose-600 font-medium"></p>
|
||||
</div>
|
||||
|
||||
<div x-show="uploadError" x-text="uploadError" class="p-2.5 bg-rose-50 border border-rose-200 text-xs text-rose-700 rounded-xl font-bold"></div>
|
||||
<div x-show="uploadError" x-text="uploadError" class="p-2.5 bg-rose-50 border border-rose-200 text-xs text-rose-700 rounded-lg font-medium"></div>
|
||||
|
||||
<!-- Visuele Weergave: Hoofdafbeelding + Gallerij Grid -->
|
||||
<!-- Visuele Weergave -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-12 gap-4 items-start">
|
||||
|
||||
<!-- Hoofdafbeelding Box (Links) -->
|
||||
<div class="md:col-span-5 bg-slate-50/80 rounded-2xl border-2 border-amber-300 p-3.5 space-y-2 relative overflow-hidden">
|
||||
<!-- Cover Box -->
|
||||
<div class="md:col-span-5 bg-slate-50/70 rounded-xl border border-slate-200/80 p-3 space-y-2 relative overflow-hidden">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="px-2.5 py-1 rounded-full bg-amber-400 text-slate-950 font-black text-[10px] uppercase tracking-wider flex items-center space-x-1 shadow-2xs">
|
||||
<i data-lucide="star" class="w-3 h-3 fill-current"></i>
|
||||
<span>Hoofdafbeelding (Cover)</span>
|
||||
</span>
|
||||
|
||||
<span class="text-[10px] font-semibold text-slate-500 uppercase tracking-wider">Hoofdafbeelding (Cover)</span>
|
||||
<template x-if="imageUrl">
|
||||
<button type="button" @click="removeCover" class="text-slate-400 hover:text-rose-600 text-xs font-bold transition flex items-center space-x-1" title="Verwijder hoofdafbeelding">
|
||||
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
|
||||
<span>Verwijderen</span>
|
||||
<button type="button" @click="removeCover" class="text-slate-400 hover:text-rose-600 text-[11px] transition">
|
||||
Verwijderen
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Grote Image Preview -->
|
||||
<div class="aspect-4/3 rounded-xl bg-white overflow-hidden flex items-center justify-center relative border border-slate-200 shadow-2xs">
|
||||
<div class="aspect-4/3 rounded-lg bg-white overflow-hidden flex items-center justify-center relative border border-slate-200/60 shadow-2xs">
|
||||
<template x-if="imageUrl">
|
||||
<img :src="imageUrl" alt="Hoofdafbeelding" class="w-full h-full object-cover">
|
||||
</template>
|
||||
<template x-if="!imageUrl">
|
||||
<div class="text-center p-4 text-slate-400 space-y-1">
|
||||
<i data-lucide="image" class="w-8 h-8 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs font-bold">Geen hoofdafbeelding</p>
|
||||
<p class="text-[10px]">Kies een foto uit de galerij of voeg er een toe.</p>
|
||||
<i data-lucide="image" class="w-6 h-6 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs">Geen cover</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Huidige Cover URL weergave -->
|
||||
<div class="pt-1">
|
||||
<span class="text-[10px] font-mono text-slate-400 truncate block" x-text="imageUrl || 'Geen URL ingesteld'"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gallerij Foto's (Rechts) -->
|
||||
<div class="md:col-span-7 bg-slate-50/60 rounded-2xl border border-slate-200 p-3.5 space-y-3">
|
||||
<!-- Gallerij Grid -->
|
||||
<div class="md:col-span-7 bg-slate-50/50 rounded-xl border border-slate-200/60 p-3 space-y-2">
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="text-xs font-black text-slate-700 uppercase tracking-wider">Extra Gallerij Foto's</span>
|
||||
<span class="text-[10px] text-slate-400 font-bold" x-text="galleryImages.length + ' extra foto(\'s)'"></span>
|
||||
<span class="text-xs font-medium text-slate-700">Extra Galerijfoto's</span>
|
||||
<span class="text-[10px] text-slate-400" x-text="galleryImages.length + ' foto(\'s)'"></span>
|
||||
</div>
|
||||
|
||||
<!-- Grid van Extra Foto's -->
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-2.5 max-h-96 overflow-y-auto pr-1">
|
||||
<div class="grid grid-cols-2 sm:grid-cols-3 gap-2 max-h-80 overflow-y-auto pr-1">
|
||||
<template x-for="(img, index) in galleryImages" :key="index">
|
||||
<div class="group relative rounded-xl bg-white border border-slate-200 hover:border-amber-400 transition overflow-hidden shadow-2xs">
|
||||
<div class="group relative rounded-lg bg-white border border-slate-200/80 overflow-hidden shadow-2xs">
|
||||
<div class="aspect-square w-full overflow-hidden bg-slate-100">
|
||||
<img :src="img" alt="Gallerij foto" class="w-full h-full object-cover group-hover:scale-105 transition duration-200" loading="lazy">
|
||||
<img :src="img" alt="Gallerij foto" class="w-full h-full object-cover" loading="lazy">
|
||||
</div>
|
||||
|
||||
<!-- Index Badge -->
|
||||
<div class="absolute top-1.5 left-1.5">
|
||||
<span class="px-1.5 py-0.5 rounded bg-slate-900/80 text-white font-mono text-[9px] font-bold backdrop-blur" x-text="'#' + (index + 1)"></span>
|
||||
</div>
|
||||
|
||||
<!-- Overlay Knoppen -->
|
||||
<div class="absolute inset-0 bg-slate-900/60 opacity-0 group-hover:opacity-100 transition flex flex-col items-center justify-center gap-1.5 p-2">
|
||||
<div class="absolute inset-0 bg-slate-900/60 opacity-0 group-hover:opacity-100 transition flex flex-col items-center justify-center gap-1 p-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="setAsCover(index)"
|
||||
class="w-full py-1.5 px-2 bg-amber-400 hover:bg-amber-300 text-slate-950 rounded-lg text-[10px] font-black uppercase tracking-wider transition flex items-center justify-center space-x-1 shadow"
|
||||
class="w-full py-1 px-2 bg-white text-slate-900 rounded text-[10px] font-semibold transition"
|
||||
>
|
||||
<i data-lucide="star" class="w-3 h-3 fill-current"></i>
|
||||
<span>Als Cover</span>
|
||||
Als Cover
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
@click="removeGalleryImage(index)"
|
||||
class="w-full py-1 px-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-[10px] font-bold transition flex items-center justify-center space-x-1"
|
||||
class="w-full py-1 px-2 bg-rose-600 text-white rounded text-[10px] font-medium transition"
|
||||
>
|
||||
<i data-lucide="trash-2" class="w-3 h-3"></i>
|
||||
<span>Verwijder</span>
|
||||
Verwijder
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<!-- Empty state -->
|
||||
<div x-show="galleryImages.length === 0" class="text-center py-8 px-4 rounded-xl border border-dashed border-slate-200 text-slate-400 space-y-1">
|
||||
<i data-lucide="images" class="w-6 h-6 mx-auto text-slate-300"></i>
|
||||
<p class="text-xs font-bold text-slate-600">Nog geen extra galerijfoto's</p>
|
||||
<p class="text-[11px] text-slate-400 max-w-xs mx-auto">
|
||||
Voeg extra detailfoto's of printbedfoto's toe via "URL Plakken" of "Foto Uploaden".
|
||||
</p>
|
||||
<div x-show="galleryImages.length === 0" class="text-center py-6 px-3 rounded-lg border border-dashed border-slate-200 text-slate-400 text-xs">
|
||||
Geen extra foto's in de galerij.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -495,37 +460,37 @@
|
||||
|
||||
<!-- Beschrijving -->
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Volledige Productbeschrijving *</label>
|
||||
<textarea name="description" rows="6" required class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3.5 py-2.5 text-xs text-slate-900 leading-relaxed">{{ old('description', $product->description) }}</textarea>
|
||||
<label class="block text-xs font-medium text-slate-700">Productbeschrijving *</label>
|
||||
<textarea name="description" rows="5" required class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-2 text-xs text-slate-900 leading-relaxed focus:outline-none focus:ring-1 focus:ring-slate-400">{{ old('description', $product->description) }}</textarea>
|
||||
</div>
|
||||
|
||||
<!-- Print Specs -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-4 border-t border-slate-200/80">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 pt-4 border-t border-slate-200/60">
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Afmetingen (LxBxH)</label>
|
||||
<input type="text" name="dimensions" value="{{ old('dimensions', $product->dimensions) }}" placeholder="bijv. 12 x 8 x 10 cm" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Afmetingen</label>
|
||||
<input type="text" name="dimensions" value="{{ old('dimensions', $product->dimensions) }}" placeholder="bijv. 12 x 8 x 10 cm" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Gewicht (gram)</label>
|
||||
<input type="number" name="weight_grams" x-model.number="weightGrams" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Gewicht (gram)</label>
|
||||
<input type="number" name="weight_grams" x-model.number="weightGrams" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
|
||||
<div class="space-y-1.5">
|
||||
<label class="block text-xs font-bold text-slate-700">Printtijd (uren)</label>
|
||||
<input type="number" step="0.1" name="print_time_hours" x-model.number="printTimeHours" class="w-full bg-slate-50/60 focus:bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-900">
|
||||
<label class="block text-xs font-medium text-slate-700">Printduur (uren)</label>
|
||||
<input type="number" step="0.1" name="print_time_hours" x-model.number="printTimeHours" class="w-full bg-slate-50/70 focus:bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-xs text-slate-900">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Toggles -->
|
||||
<div class="pt-4 border-t border-slate-200/80 flex items-center space-x-6">
|
||||
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-700">
|
||||
<input type="checkbox" name="is_active" value="1" {{ old('is_active', $product->is_active) ? 'checked' : '' }} class="w-4 h-4 rounded text-amber-500 bg-white border-slate-300">
|
||||
<div class="pt-4 border-t border-slate-200/60 flex items-center space-x-6 text-xs text-slate-700 font-medium">
|
||||
<label class="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="checkbox" name="is_active" value="1" {{ old('is_active', $product->is_active) ? 'checked' : '' }} class="w-4 h-4 rounded text-slate-900 border-slate-300">
|
||||
<span>Zichtbaar in webshop (Actief)</span>
|
||||
</label>
|
||||
|
||||
<label class="flex items-center space-x-2 cursor-pointer text-xs font-bold text-slate-700">
|
||||
<input type="checkbox" name="is_featured" value="1" {{ old('is_featured', $product->is_featured) ? 'checked' : '' }} class="w-4 h-4 rounded text-amber-500 bg-white border-slate-300">
|
||||
<label class="flex items-center space-x-2 cursor-pointer">
|
||||
<input type="checkbox" name="is_featured" value="1" {{ old('is_featured', $product->is_featured) ? 'checked' : '' }} class="w-4 h-4 rounded text-slate-900 border-slate-300">
|
||||
<span>Uitlichten op homepage</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -533,10 +498,10 @@
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end space-x-3">
|
||||
<a href="{{ route('admin.products.index') }}" class="px-4 py-2.5 rounded-xl bg-white hover:bg-slate-50 text-slate-600 text-xs font-bold transition border border-slate-200">
|
||||
<a href="{{ route('admin.products.index') }}" class="px-4 py-2 rounded-lg bg-white hover:bg-slate-50 text-slate-600 text-xs font-medium transition border border-slate-200">
|
||||
Annuleren
|
||||
</a>
|
||||
<button type="submit" class="px-6 py-2.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-xs cursor-pointer">
|
||||
<button type="submit" class="px-5 py-2 rounded-lg bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition flex items-center space-x-1.5 shadow-xs cursor-pointer">
|
||||
<i data-lucide="save" class="w-4 h-4"></i>
|
||||
<span>Wijzigingen Opslaan</span>
|
||||
</button>
|
||||
|
||||
@@ -6,108 +6,95 @@
|
||||
<div class="space-y-6">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/80 gap-4">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/60 gap-4">
|
||||
<div>
|
||||
<div class="inline-flex items-center space-x-1.5 text-xs text-amber-700 font-bold uppercase tracking-wider mb-1">
|
||||
<i data-lucide="box" class="w-4 h-4"></i>
|
||||
<span>Assortiment & Voorraad</span>
|
||||
</div>
|
||||
<h1 class="font-heading text-2xl sm:text-3xl font-black text-slate-900">Producten Overzicht ({{ $products->total() }})</h1>
|
||||
<span class="text-[11px] font-semibold uppercase tracking-wider text-slate-400 block mb-1">Catalogus & Assortiment</span>
|
||||
<h1 class="font-heading text-2xl sm:text-3xl font-bold text-slate-900 tracking-tight">Producten ({{ $products->total() }})</h1>
|
||||
<p class="text-xs sm:text-sm text-slate-500 mt-1">Beheer prijzen, teksten, kostprijscalculaties en afbeeldingen van alle 3D prints.</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center space-x-2.5 self-start sm:self-auto">
|
||||
<a href="{{ route('admin.makerworld.index') }}" class="px-3.5 py-2 rounded-xl bg-white hover:bg-slate-50 text-slate-700 text-xs font-bold transition flex items-center space-x-1.5 border border-slate-200 shadow-sm">
|
||||
<i data-lucide="download-cloud" class="w-4 h-4 text-slate-500"></i>
|
||||
<span>MakerWorld Importer</span>
|
||||
<a href="{{ route('admin.makerworld.index') }}" class="px-3.5 py-2 rounded-lg bg-white hover:bg-slate-50 text-slate-700 text-xs font-medium transition flex items-center space-x-1.5 border border-slate-200/80 shadow-2xs">
|
||||
<i data-lucide="download-cloud" class="w-3.5 h-3.5 text-slate-400"></i>
|
||||
<span>MakerWorld Sync</span>
|
||||
</a>
|
||||
<a href="{{ route('admin.products.create') }}" class="px-4 py-2 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="plus" class="w-4 h-4"></i>
|
||||
<a href="{{ route('admin.products.create') }}" class="px-3.5 py-2 rounded-lg bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition flex items-center space-x-1.5 shadow-2xs">
|
||||
<i data-lucide="plus" class="w-3.5 h-3.5"></i>
|
||||
<span>Nieuw Product</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status Filter Tabs -->
|
||||
<div class="flex items-center space-x-2 border-b border-slate-200/80 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-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'all' ? 'bg-amber-400 text-slate-950 font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<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-100 text-slate-600' }}">
|
||||
{{ $totalAll ?? $products->total() }}
|
||||
</span>
|
||||
<!-- Status Filter Tabs (Sleek Segmented Control) -->
|
||||
<div class="flex items-center space-x-1.5 p-1 bg-slate-100/80 rounded-xl w-fit overflow-x-auto text-xs">
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'all'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'all' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span>Alle</span>
|
||||
<span class="text-[11px] text-slate-400">({{ $totalAll ?? $products->total() }})</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'published'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'published' ? 'bg-emerald-600 text-white font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<span class="w-1.5 h-1.5 rounded-full {{ ($tab ?? 'all') === 'published' ? 'bg-emerald-200' : 'bg-emerald-500' }}"></span>
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'published'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'published' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500"></span>
|
||||
<span>Live in Webshop</span>
|
||||
<span class="px-1.5 py-0.5 rounded text-[10px] {{ ($tab ?? 'all') === 'published' ? 'bg-emerald-800 text-emerald-200 font-black' : 'bg-slate-100 text-slate-600' }}">
|
||||
{{ $totalPublished ?? 0 }}
|
||||
</span>
|
||||
<span class="text-[11px] text-slate-400">({{ $totalPublished ?? 0 }})</span>
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'draft'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'draft' ? 'bg-amber-400 text-slate-950 font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<i data-lucide="layers" class="w-3.5 h-3.5"></i>
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'draft'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'draft' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span>Concepten / Staging</span>
|
||||
@if(($totalDraft ?? 0) > 0)
|
||||
<span class="px-1.5 py-0.5 rounded text-[10px] bg-amber-500 text-slate-950 font-black">
|
||||
<span class="px-1.5 py-0.2 rounded-full text-[10px] font-semibold bg-amber-100 text-amber-800">
|
||||
{{ $totalDraft }}
|
||||
</span>
|
||||
@endif
|
||||
</a>
|
||||
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'makerworld'])) }}" class="px-3.5 py-2 rounded-xl transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'makerworld' ? 'bg-indigo-600 text-white font-black shadow-sm' : 'text-slate-600 hover:text-slate-900 hover:bg-white' }}">
|
||||
<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-indigo-800 text-indigo-200 font-black' : 'bg-slate-100 text-slate-600' }}">
|
||||
{{ $totalMakerWorld ?? 0 }}
|
||||
</span>
|
||||
<a href="{{ route('admin.products.index', array_merge(request()->except('tab', 'page'), ['tab' => 'makerworld'])) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ ($tab ?? 'all') === 'makerworld' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
|
||||
<span>MakerWorld</span>
|
||||
<span class="text-[11px] 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) →</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Search & Filters -->
|
||||
<div class="p-3.5 rounded-2xl bg-white border border-slate-200/80 shadow-sm flex flex-col sm:flex-row items-center justify-between gap-3">
|
||||
<div class="p-3 rounded-xl bg-white border border-slate-200/60 shadow-2xs 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">
|
||||
<div class="relative flex-1 max-w-md">
|
||||
<div class="relative flex-1 max-w-sm">
|
||||
<input
|
||||
type="text"
|
||||
name="q"
|
||||
value="{{ request('q') }}"
|
||||
placeholder="Zoek op naam of omschrijving..."
|
||||
class="w-full bg-slate-50 border border-slate-200 rounded-xl pl-9 pr-3.5 py-2 text-xs text-slate-800 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-amber-400 focus:bg-white transition"
|
||||
placeholder="Zoek op naam..."
|
||||
class="w-full bg-slate-50 border border-slate-200/80 rounded-lg pl-8 pr-3 py-1.5 text-xs text-slate-800 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-400 focus:bg-white transition"
|
||||
>
|
||||
<i data-lucide="search" class="w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"></i>
|
||||
<i data-lucide="search" class="w-3.5 h-3.5 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2"></i>
|
||||
</div>
|
||||
|
||||
<select name="category_id" onchange="this.form.submit()" class="bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs text-slate-700 focus:outline-none focus:ring-2 focus:ring-amber-400">
|
||||
<select name="category_id" onchange="this.form.submit()" class="bg-slate-50 border border-slate-200/80 rounded-lg px-2.5 py-1.5 text-xs text-slate-700 focus:outline-none focus:ring-1 focus:ring-slate-400">
|
||||
<option value="">Alle Categorieën</option>
|
||||
@foreach($categories as $cat)
|
||||
<option value="{{ $cat->id }}" {{ request('category_id') == $cat->id ? 'selected' : '' }}>{{ $cat->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<button type="submit" class="px-3.5 py-2 bg-slate-900 hover:bg-slate-800 text-white rounded-xl text-xs font-bold transition">
|
||||
<button type="submit" class="px-3 py-1.5 bg-slate-900 hover:bg-slate-800 text-white rounded-lg text-xs font-medium transition">
|
||||
Filter
|
||||
</button>
|
||||
@if(request()->hasAny(['q', 'category_id']))
|
||||
<a href="{{ route('admin.products.index') }}" class="text-xs text-rose-600 hover:underline">Wissen</a>
|
||||
@endif
|
||||
</form>
|
||||
|
||||
@if(($totalDraft ?? 0) > 0)
|
||||
<a href="{{ route('admin.makerworld.staging') }}" class="text-xs text-slate-600 hover:text-slate-900 font-medium flex items-center space-x-1">
|
||||
<span>Naar Artikel Beheer ({{ $totalDraft }} nieuw)</span>
|
||||
<i data-lucide="arrow-right" class="w-3 h-3"></i>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Products Table -->
|
||||
<div class="rounded-2xl bg-white border border-slate-200/80 overflow-hidden shadow-sm">
|
||||
<!-- Products Table (Clean & Airy) -->
|
||||
<div class="rounded-xl bg-white border border-slate-200/60 overflow-hidden shadow-2xs">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-left text-xs text-slate-600">
|
||||
<thead class="bg-slate-50/80 text-[11px] uppercase tracking-wider text-slate-500 font-bold border-b border-slate-200">
|
||||
<thead class="bg-slate-50/70 text-[11px] uppercase tracking-wider text-slate-400 font-semibold border-b border-slate-200/60">
|
||||
<tr>
|
||||
<th class="py-3 px-4">Product</th>
|
||||
<th class="py-3 px-4">Categorie</th>
|
||||
@@ -117,31 +104,31 @@
|
||||
<th class="py-3 px-4 text-right">Acties</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-100 font-medium">
|
||||
<tbody class="divide-y divide-slate-100 font-normal">
|
||||
@forelse($products as $product)
|
||||
<tr class="hover:bg-slate-50/70 transition">
|
||||
<tr class="hover:bg-slate-50/50 transition">
|
||||
<td class="py-3 px-4">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-12 h-12 rounded-xl bg-slate-100 overflow-hidden border border-slate-200 flex-shrink-0 relative group shadow-xs">
|
||||
<div class="w-10 h-10 rounded-lg bg-slate-100 overflow-hidden border border-slate-200/60 shrink-0 relative group">
|
||||
<img src="{{ $product->image_url }}" alt="{{ $product->name }}" class="w-full h-full object-cover">
|
||||
@if(!empty($product->gallery_images) && count($product->gallery_images) > 0)
|
||||
<span class="absolute bottom-0 right-0 px-1 py-0.5 rounded-tl-md bg-white/95 text-slate-700 font-mono text-[9px] font-bold border-t border-l border-slate-200 shadow-xs" title="{{ count($product->gallery_images) + 1 }} foto's in galerij">
|
||||
<span class="absolute bottom-0 right-0 px-1 py-0.2 rounded-tl-sm bg-slate-900/80 text-white font-mono text-[8px]" title="{{ count($product->gallery_images) + 1 }} foto's in galerij">
|
||||
+{{ count($product->gallery_images) }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="font-bold text-slate-900 hover:text-amber-600 transition block text-sm">
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="font-semibold text-slate-900 hover:text-sky-600 transition block text-xs">
|
||||
{{ $product->name }}
|
||||
</a>
|
||||
<span class="text-[10px] text-slate-400 font-mono">/product/{{ $product->slug }}</span>
|
||||
<span class="text-[10px] text-slate-400 font-mono">/{{ $product->slug }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="py-3 px-4">
|
||||
@if($product->category)
|
||||
<span class="px-2 py-0.5 rounded-md bg-slate-100 text-slate-700 text-[11px] font-bold border border-slate-200/80">
|
||||
<span class="px-2 py-0.5 rounded-md bg-slate-100 text-slate-600 text-[11px] font-medium">
|
||||
{{ $product->category->name }}
|
||||
</span>
|
||||
@else
|
||||
@@ -150,10 +137,10 @@
|
||||
</td>
|
||||
|
||||
<td class="py-3 px-4">
|
||||
<span class="font-black text-slate-900 font-heading text-sm">{{ $product->formatted_price }}</span>
|
||||
<span class="font-bold text-slate-900 font-heading text-xs">{{ $product->formatted_price }}</span>
|
||||
</td>
|
||||
|
||||
<td class="py-3 px-4 text-[11px] text-slate-500 space-y-0.5">
|
||||
<td class="py-3 px-4 text-[11px] text-slate-400 space-y-0.5">
|
||||
<div>{{ $product->dimensions ?? 'Standaard' }}</div>
|
||||
<div>~{{ $product->weight_grams ?? 0 }}g • {{ $product->print_time_hours ?? 0 }}u</div>
|
||||
</td>
|
||||
@@ -161,51 +148,41 @@
|
||||
<td class="py-3 px-4">
|
||||
<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-50 text-amber-800 border border-amber-200 text-[10px] font-bold uppercase tracking-wider">
|
||||
<i data-lucide="layers" class="w-3 h-3 text-amber-600"></i>
|
||||
<span>Concept Staging</span>
|
||||
<span class="inline-flex items-center space-x-1 px-2 py-0.5 rounded-md bg-amber-50 text-amber-800 text-[10px] font-semibold border border-amber-200/60">
|
||||
<span>Concept</span>
|
||||
</span>
|
||||
<a href="{{ route('admin.makerworld.staging') }}" class="text-[10px] text-amber-700 hover:underline font-bold">
|
||||
Beoordeel in Artikel Beheer →
|
||||
</a>
|
||||
@elseif($product->is_active)
|
||||
<span class="inline-flex items-center space-x-1 text-emerald-700 text-[11px] font-bold bg-emerald-50 px-2 py-0.5 rounded-md border border-emerald-200/60">
|
||||
<span class="inline-flex items-center space-x-1.5 text-emerald-700 text-[11px] font-medium">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-emerald-500"></span>
|
||||
<span>Live in Webshop</span>
|
||||
<span>Live</span>
|
||||
</span>
|
||||
@else
|
||||
<span class="inline-flex items-center space-x-1 text-slate-500 text-[11px] font-bold bg-slate-100 px-2 py-0.5 rounded-md border border-slate-200">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-slate-400"></span>
|
||||
<span class="inline-flex items-center space-x-1.5 text-slate-400 text-[11px]">
|
||||
<span class="w-1.5 h-1.5 rounded-full bg-slate-300"></span>
|
||||
<span>Verborgen</span>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if($product->makerworld_id)
|
||||
<span class="text-[10px] text-indigo-600 font-mono font-medium">
|
||||
MakerWorld #{{ $product->makerworld_id }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if($product->is_featured)
|
||||
<span class="inline-flex items-center text-amber-600 text-[10px] font-bold">
|
||||
★ Uitgelicht
|
||||
<span class="text-[10px] text-slate-400 font-mono">
|
||||
MW #{{ $product->makerworld_id }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="py-3 px-4 text-right">
|
||||
<div class="flex items-center justify-end space-x-1.5">
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="p-1.5 rounded-lg bg-slate-100 hover:bg-slate-200 text-slate-600 hover:text-slate-900 transition" title="Bekijk in Shop">
|
||||
<div class="flex items-center justify-end space-x-1">
|
||||
<a href="{{ route('product.show', $product->slug) }}" target="_blank" class="p-1.5 rounded-md text-slate-400 hover:text-slate-700 hover:bg-slate-100 transition" title="Bekijk in Shop">
|
||||
<i data-lucide="external-link" class="w-3.5 h-3.5"></i>
|
||||
</a>
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="p-1.5 rounded-lg bg-slate-100 hover:bg-amber-100 text-slate-600 hover:text-amber-800 transition" title="Bewerken & Prijscalculator">
|
||||
<a href="{{ route('admin.products.edit', $product) }}" class="p-1.5 rounded-md text-slate-500 hover:text-slate-900 hover:bg-slate-100 transition" title="Bewerken & Prijscalculator">
|
||||
<i data-lucide="pencil" class="w-3.5 h-3.5"></i>
|
||||
</a>
|
||||
<form action="{{ route('admin.products.destroy', $product) }}" method="POST" onsubmit="return confirm('Weet je zeker dat je dit product wilt verwijderen?')">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="p-1.5 rounded-lg bg-slate-100 hover:bg-rose-100 text-slate-600 hover:text-rose-700 transition cursor-pointer" title="Verwijderen">
|
||||
<button type="submit" class="p-1.5 rounded-md text-slate-400 hover:text-rose-600 hover:bg-rose-50 transition cursor-pointer" title="Verwijderen">
|
||||
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
|
||||
</button>
|
||||
</form>
|
||||
@@ -224,7 +201,7 @@
|
||||
</div>
|
||||
|
||||
@if($products->hasPages())
|
||||
<div class="p-4 border-t border-slate-200/80 bg-slate-50/50">
|
||||
<div class="p-3.5 border-t border-slate-100 bg-slate-50/50">
|
||||
{{ $products->links() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user