- Laravel 11, Blade, Alpine.js, Tailwind CSS - Produkt- & Kategorieverwaltung mit Varianten - Checkout (Vorkasse + Rechnung), Session-Warenkorb - Admin-Backend (Dashboard, Bestellungen, Kunden, CMS) - DSGVO-konform: Cookie-Consent, Impressum, Widerruf, AGB - PDF-Rechnung via dompdf, SMTP-Mailversand - Kundenverwaltung mit manueller Freischaltung Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70 lines
3.4 KiB
PHP
70 lines
3.4 KiB
PHP
@extends('layouts.admin')
|
|
@section('title', 'Bestellungen')
|
|
@section('content')
|
|
<div class="flex items-center gap-3 mb-6">
|
|
<h2 class="text-lg font-semibold">Bestellungen</h2>
|
|
<form method="GET" class="flex gap-2 ml-4">
|
|
<input type="text" name="q" value="{{ request('q') }}" placeholder="Bestellnr." class="border rounded px-3 py-1.5 text-sm w-36">
|
|
<select name="status" class="border rounded px-2 py-1.5 text-sm">
|
|
<option value="">Alle Status</option>
|
|
@foreach(\App\Models\Order::$statusLabels as $key => $label)
|
|
<option value="{{ $key }}" {{ request('status') === $key ? 'selected' : '' }}>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<select name="payment" class="border rounded px-2 py-1.5 text-sm">
|
|
<option value="">Alle Zahlungsarten</option>
|
|
@foreach(\App\Models\Order::$paymentLabels as $key => $label)
|
|
<option value="{{ $key }}" {{ request('payment') === $key ? 'selected' : '' }}>{{ $label }}</option>
|
|
@endforeach
|
|
</select>
|
|
<button class="bg-gray-200 px-3 py-1.5 rounded text-sm hover:bg-gray-300">Filtern</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="bg-white rounded shadow overflow-hidden">
|
|
<table class="w-full text-sm">
|
|
<thead class="bg-gray-50 text-left">
|
|
<tr>
|
|
<th class="px-4 py-3">Bestellnr.</th>
|
|
<th class="px-4 py-3">Kunde</th>
|
|
<th class="px-4 py-3">Zahlungsart</th>
|
|
<th class="px-4 py-3">Status</th>
|
|
<th class="px-4 py-3 text-right">Betrag</th>
|
|
<th class="px-4 py-3">Datum</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y">
|
|
@forelse($orders as $o)
|
|
<tr class="hover:bg-gray-50">
|
|
<td class="px-4 py-3 font-mono font-medium">{{ $o->order_number }}</td>
|
|
<td class="px-4 py-3">{{ $o->billingAddress()?->full_name ?? $o->guest_email }}</td>
|
|
<td class="px-4 py-3">{{ $o->payment_label }}</td>
|
|
<td class="px-4 py-3">
|
|
<span class="px-2 py-0.5 rounded text-xs
|
|
{{ match($o->status) {
|
|
'new' => 'bg-yellow-100 text-yellow-700',
|
|
'payment_received' => 'bg-blue-100 text-blue-700',
|
|
'shipped' => 'bg-indigo-100 text-indigo-700',
|
|
'completed' => 'bg-green-100 text-green-700',
|
|
'cancelled' => 'bg-red-100 text-red-700',
|
|
default => 'bg-gray-100 text-gray-600',
|
|
} }}">
|
|
{{ $o->status_label }}
|
|
</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-right">{{ number_format($o->total, 2, ',', '.') }} €</td>
|
|
<td class="px-4 py-3 text-gray-400">{{ $o->created_at->format('d.m.Y') }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<a href="{{ route('admin.orders.show', $o) }}" class="text-blue-600 hover:underline">Details</a>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="7" class="px-4 py-8 text-center text-gray-400">Keine Bestellungen gefunden.</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
<div class="px-4 py-3 border-t">{{ $orders->withQueryString()->links() }}</div>
|
|
</div>
|
|
@endsection
|