feat: complete admin CMS for customizable layout, texts, products, categories and orders
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', 'Bestelling #' . $order->order_number . ' | Jouwdriedee Beheer')
|
||||
|
||||
@section('content')
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
</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">
|
||||
<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>
|
||||
<option value="shipped" {{ $order->status === 'shipped' ? 'selected' : '' }}>Verzonden via PostNL</option>
|
||||
<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">
|
||||
Status Bijwerken
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<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="divide-y divide-slate-800">
|
||||
@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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<span class="font-heading font-black text-white text-sm">
|
||||
{{ $item->quantity }}x € {{ number_format($item->unit_price, 2, ',', '.') }}
|
||||
</span>
|
||||
<div class="text-xs font-black text-amber-400 mt-1">
|
||||
€ {{ number_format($item->total_price, 2, ',', '.') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Klantgegevens & Afleveradres -->
|
||||
<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>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Naam</span>
|
||||
<strong class="text-white">{{ $order->customer_name }}</strong>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">E-mail</span>
|
||||
<span>{{ $order->customer_email }}</span>
|
||||
</div>
|
||||
|
||||
@if($order->customer_phone)
|
||||
<div>
|
||||
<span class="text-slate-500 block text-[10px] uppercase font-bold">Telefoon</span>
|
||||
<span>{{ $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>
|
||||
|
||||
@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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user