Add customer contact inquiry system, automated receipt emails, admin communication inbox, and customer profile management

This commit is contained in:
2026-11-02 09:56:24 +01:00
parent 387241f971
commit 9fd39bd7d6
28 changed files with 2426 additions and 8 deletions
+94 -1
View File
@@ -56,11 +56,24 @@
>
<i data-lucide="package" class="w-3.5 h-3.5"></i>
<span>Mijn Bestellingen</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] {{ $tab === 'orders' ? 'bg-slate-100 text-slate-700' : 'bg-slate-200/60 text-slate-600' }}">
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-700">
{{ $orders->count() }}
</span>
</button>
<button
type="button"
@click="tab = 'messages'"
:class="tab === 'messages' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900'"
class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 cursor-pointer"
>
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
<span>Mijn Vragen</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-700">
{{ $communications->count() }}
</span>
</button>
<button
type="button"
@click="tab = 'profile'"
@@ -153,6 +166,86 @@
@endif
</div>
<!-- TAB: MIJN VRAGEN & COMMUNICATIE -->
<div x-show="tab === 'messages'" class="space-y-4">
<div class="flex items-center justify-between">
<div>
<h2 class="text-sm font-bold text-slate-900">Jouw gestelde vragen aan Jouwdriedee.nl</h2>
<p class="text-xs text-slate-500">Volg hier jouw berichten en antwoorden van onze printstudio.</p>
</div>
<a href="{{ route('contact.index') }}" class="px-3.5 py-1.5 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition flex items-center space-x-1.5 shadow-xs">
<i data-lucide="plus" class="w-3.5 h-3.5"></i>
<span>Nieuwe vraag stellen</span>
</a>
</div>
@if($communications->isEmpty())
<div class="p-10 text-center rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-2.5">
<div class="w-10 h-10 rounded-xl bg-slate-100 text-slate-400 flex items-center justify-center mx-auto">
<i data-lucide="message-square" class="w-5 h-5"></i>
</div>
<h3 class="text-sm font-semibold text-slate-900">Nog geen vragen gesteld</h3>
<p class="text-xs text-slate-500 max-w-xs mx-auto">
Heb je een vraag over een model, levering of materiaal? Stel hem gerust!
</p>
<div class="pt-2">
<a href="{{ route('contact.index') }}" class="inline-flex items-center space-x-1.5 px-4 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition shadow-xs">
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
<span>Vraag stellen aan de shop</span>
</a>
</div>
</div>
@else
<div class="space-y-3">
@foreach($communications as $comm)
<div class="p-5 rounded-2xl bg-white border border-slate-200/80 shadow-2xs space-y-3">
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-2.5 border-b border-slate-100 gap-2">
<div>
<span class="font-mono text-xs text-slate-400">#{{ $comm->id }}</span>
<h3 class="font-bold text-slate-900 text-xs sm:text-sm inline ml-1">{{ $comm->subject }}</h3>
<span class="text-xs text-slate-400 ml-2">&bull; {{ $comm->created_at->format('d-m-Y om H:i') }}</span>
</div>
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold self-start sm:self-auto
@if($comm->status === 'new') bg-sky-50 text-sky-700 border border-sky-200/60
@elseif($comm->status === 'in_progress') bg-amber-50 text-amber-700 border border-amber-200/60
@elseif($comm->status === 'resolved') bg-emerald-50 text-emerald-700 border border-emerald-200/60
@else bg-slate-100 text-slate-600 border border-slate-200/60 @endif">
{{ $comm->status_label }}
</span>
</div>
<!-- Oorspronkelijke vraag -->
<div class="text-xs text-slate-700 leading-relaxed bg-slate-50 p-3 rounded-xl border border-slate-100">
<span class="font-semibold text-slate-900 block text-[11px] mb-1">Jouw vraag:</span>
{{ $comm->message }}
</div>
<!-- Eventuele antwoorden van de shop -->
@if($comm->replies->isNotEmpty())
<div class="space-y-2 pt-1">
<span class="text-[11px] font-semibold text-emerald-700 block">Antwoord van Jouwdriedee.nl:</span>
@foreach($comm->replies as $reply)
<div class="p-3 rounded-xl bg-emerald-50/60 border border-emerald-200/70 text-xs text-slate-800 space-y-1">
<div class="flex items-center justify-between text-[10px] text-emerald-700 font-medium">
<span>Studio Specialist</span>
<span>{{ $reply->created_at->format('d-m-Y H:i') }}</span>
</div>
<div class="whitespace-pre-wrap">{{ $reply->message }}</div>
</div>
@endforeach
</div>
@else
<div class="text-[11px] text-slate-400 italic">
We hebben jouw vraag in behandeling. Je ontvangt zo snel mogelijk antwoord via e-mail.
</div>
@endif
</div>
@endforeach
</div>
@endif
</div>
<!-- TAB 2: PROFIEL & BEVEILIGING -->
<div x-show="tab === 'profile'" class="grid grid-cols-1 md:grid-cols-2 gap-5">
@@ -0,0 +1,222 @@
@extends('layouts.admin')
@section('title', 'Communicatie & Klantvragen | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/80 gap-4">
<div>
<div class="inline-flex items-center space-x-1.5 text-xs text-slate-500 font-medium mb-1">
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
<span>Klantenservice &amp; Inquiries</span>
</div>
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Communicatie ({{ $counts['all'] }})</h1>
<p class="text-xs text-slate-500 mt-1">
Overzicht van binnengekomen vragen via de webshop, afschriften en verzonden reacties.
</p>
</div>
<div class="flex items-center space-x-2">
<a href="{{ route('admin.customers.index') }}" class="px-3.5 py-2 rounded-xl 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="users" class="w-3.5 h-3.5 text-slate-400"></i>
<span>Klantprofielen</span>
</a>
<a href="{{ route('contact.index') }}" target="_blank" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition flex items-center space-x-1.5 shadow-xs">
<i data-lucide="external-link" class="w-3.5 h-3.5 text-slate-400"></i>
<span>Open Formulier</span>
</a>
</div>
</div>
<!-- Flash message -->
@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
<!-- Filter & Search Bar -->
<div class="flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3">
<!-- Status Tabs -->
<div class="flex items-center space-x-1.5 p-1 bg-slate-100/80 rounded-xl max-w-max text-xs font-medium overflow-x-auto">
<a href="{{ route('admin.communications.index', ['status' => 'all', 'q' => $search]) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ $currentStatus === 'all' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
<span>Alle</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] {{ $currentStatus === 'all' ? 'bg-slate-100 text-slate-700' : 'bg-slate-200/60 text-slate-600' }}">
{{ $counts['all'] }}
</span>
</a>
<a href="{{ route('admin.communications.index', ['status' => 'new', 'q' => $search]) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ $currentStatus === 'new' ? '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-sky-500 {{ $counts['new'] > 0 ? 'animate-pulse' : '' }}"></span>
<span>Nieuw</span>
@if($counts['new'] > 0)
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-sky-100 text-sky-800 font-bold">
{{ $counts['new'] }}
</span>
@endif
</a>
<a href="{{ route('admin.communications.index', ['status' => 'in_progress', 'q' => $search]) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ $currentStatus === 'in_progress' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
<span>In behandeling</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-600">
{{ $counts['in_progress'] }}
</span>
</a>
<a href="{{ route('admin.communications.index', ['status' => 'resolved', 'q' => $search]) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ $currentStatus === 'resolved' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
<span>Beantwoord</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-600">
{{ $counts['resolved'] }}
</span>
</a>
<a href="{{ route('admin.communications.index', ['status' => 'closed', 'q' => $search]) }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ $currentStatus === 'closed' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900' }}">
<span>Gesloten</span>
</a>
</div>
<!-- Search Form -->
<form action="{{ route('admin.communications.index') }}" method="GET" class="flex items-center space-x-2">
<input type="hidden" name="status" value="{{ $currentStatus }}">
<div class="relative w-full sm:w-64">
<input
type="text"
name="q"
value="{{ $search }}"
placeholder="Zoek op naam, e-mail..."
class="w-full pl-8 pr-3 py-1.5 bg-white border border-slate-200/80 rounded-xl text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-900 focus:border-slate-900"
>
<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>
@if($search)
<a href="{{ route('admin.communications.index', ['status' => $currentStatus]) }}" class="px-2.5 py-1.5 text-xs text-slate-500 hover:text-slate-800 transition">
Wissen
</a>
@endif
</form>
</div>
<!-- Communications Table Card -->
<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-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 px-4 w-20">ID</th>
<th class="py-3 px-4 w-40">Datum &amp; Tijd</th>
<th class="py-3 px-4">Klant</th>
<th class="py-3 px-4">Onderwerp &amp; Vraag</th>
<th class="py-3 px-4 w-32">Status</th>
<th class="py-3 px-4 text-right w-28">Actie</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 font-medium">
@forelse($communications as $comm)
<tr class="hover:bg-slate-50/60 transition {{ $comm->status === 'new' ? 'bg-sky-50/30 font-semibold' : '' }}">
<!-- ID -->
<td class="py-3.5 px-4 font-mono text-slate-500">
#{{ $comm->id }}
</td>
<!-- Datum -->
<td class="py-3.5 px-4 text-slate-500 whitespace-nowrap">
<div>{{ $comm->created_at->format('d-m-Y') }}</div>
<div class="text-[10px] text-slate-400 font-mono">{{ $comm->created_at->format('H:i') }}</div>
</td>
<!-- Klant -->
<td class="py-3.5 px-4">
<div class="flex items-center space-x-2">
<a href="{{ route('admin.customers.show', $comm->user_id ?? $comm->email) }}" class="font-semibold text-slate-900 hover:underline">
{{ $comm->name }}
</a>
@if($comm->user_id)
<span class="px-1.5 py-0.2 rounded bg-slate-100 text-slate-600 text-[10px] font-normal" title="Geregistreerde klant">
Account
</span>
@else
<span class="px-1.5 py-0.2 rounded bg-slate-50 text-slate-400 text-[10px] font-normal" title="Gastbezoeker">
Gast
</span>
@endif
</div>
<div class="text-[11px] text-slate-400 font-normal">
{{ $comm->email }}
</div>
@if($comm->order)
<div class="text-[10px] text-slate-500 mt-0.5">
Betreft order:
<a href="{{ route('admin.orders.show', $comm->order) }}" class="font-mono text-indigo-600 hover:underline">
#{{ $comm->order->order_number }}
</a>
</div>
@endif
</td>
<!-- Onderwerp & Snippet -->
<td class="py-3.5 px-4">
<a href="{{ route('admin.communications.show', $comm) }}" class="font-bold text-slate-900 hover:text-slate-700 block truncate max-w-md">
{{ $comm->subject }}
</a>
<p class="text-[11px] text-slate-500 font-normal line-clamp-1 max-w-md mt-0.5">
{{ $comm->message }}
</p>
@if($comm->replies->isNotEmpty())
<span class="inline-flex items-center space-x-1 text-[10px] text-emerald-700 font-semibold mt-1">
<i data-lucide="check" class="w-3 h-3"></i>
<span>{{ $comm->replies->count() }} reactie(s) verzonden</span>
</span>
@endif
</td>
<!-- Status Badge -->
<td class="py-3.5 px-4 whitespace-nowrap">
<span class="px-2.5 py-0.5 rounded-full text-[10px] font-semibold
@if($comm->status === 'new') bg-sky-50 text-sky-700 border border-sky-200/80
@elseif($comm->status === 'in_progress') bg-amber-50 text-amber-700 border border-amber-200/80
@elseif($comm->status === 'resolved') bg-emerald-50 text-emerald-700 border border-emerald-200/80
@else bg-slate-100 text-slate-600 border border-slate-200/60
@endif">
{{ $comm->status_label }}
</span>
</td>
<!-- Actie -->
<td class="py-3.5 px-4 text-right whitespace-nowrap">
<a href="{{ route('admin.communications.show', $comm) }}" 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>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="py-12 text-center text-slate-400">
<div class="w-10 h-10 rounded-xl bg-slate-100 flex items-center justify-center text-slate-400 mx-auto mb-2">
<i data-lucide="inbox" class="w-5 h-5"></i>
</div>
<p class="text-xs font-medium text-slate-600">Geen berichten gevonden</p>
<p class="text-[11px] text-slate-400 mt-0.5">Vragen van klanten via het contactformulier verschijnen hier direct.</p>
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if($communications->hasPages())
<div class="p-4 border-t border-slate-100">
{{ $communications->links() }}
</div>
@endif
</div>
</div>
@endsection
@@ -0,0 +1,282 @@
@extends('layouts.admin')
@section('title', 'Klantvraag #' . $communication->id . ': ' . $communication->subject . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-6xl mx-auto">
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/80 gap-4">
<div>
<a href="{{ route('admin.communications.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 Communicatie overzicht</span>
</a>
<div class="flex items-center space-x-2 mt-0.5">
<span class="font-mono text-xs text-slate-400">#{{ $communication->id }}</span>
<h1 class="text-xl sm:text-2xl font-bold tracking-tight text-slate-900">{{ $communication->subject }}</h1>
</div>
<p class="text-xs text-slate-500 mt-0.5">
Ontvangen op {{ $communication->created_at->format('d-m-Y om H:i') }} &bull; Afschrift verzonden naar klant
</p>
</div>
<div class="flex items-center space-x-2">
<!-- Delete Communication -->
<form action="{{ route('admin.communications.destroy', $communication) }}" method="POST" onsubmit="return confirm('Weet je zeker dat je dit klantbericht wilt verwijderen?');">
@csrf
@method('DELETE')
<button type="submit" class="px-3 py-1.5 rounded-lg text-slate-400 hover:text-rose-600 hover:bg-rose-50 border border-transparent hover:border-rose-200 text-xs font-medium transition cursor-pointer flex items-center space-x-1">
<i data-lucide="trash-2" class="w-3.5 h-3.5"></i>
<span>Verwijderen</span>
</button>
</form>
</div>
</div>
<!-- Flash message -->
@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
@if(session('warning'))
<div class="p-3.5 rounded-xl bg-amber-50 border border-amber-200/60 text-amber-800 text-xs flex items-center space-x-2.5">
<i data-lucide="alert-triangle" class="w-4 h-4 text-amber-600 shrink-0"></i>
<span class="font-medium">{{ session('warning') }}</span>
</div>
@endif
<div class="grid grid-cols-1 lg:grid-cols-12 gap-6 items-start">
<!-- Linkerkolom: Bericht Thread & Antwoordformulier -->
<div class="lg:col-span-8 space-y-6">
<!-- Oorspronkelijke vraag van de klant -->
<div class="bg-white rounded-2xl border border-slate-200/80 shadow-xs p-6 space-y-4">
<div class="flex items-center justify-between pb-3 border-b border-slate-100">
<div class="flex items-center space-x-3">
<div class="w-9 h-9 rounded-xl bg-slate-900 text-white flex items-center justify-center font-bold text-xs">
{{ strtoupper(substr($communication->name, 0, 1)) }}
</div>
<div>
<div class="flex items-center space-x-2">
<span class="font-bold text-slate-900 text-xs">{{ $communication->name }}</span>
<span class="text-[10px] text-slate-400">&lt;{{ $communication->email }}&gt;</span>
</div>
<span class="text-[11px] text-slate-400">Oorspronkelijk bericht</span>
</div>
</div>
<span class="text-[11px] text-slate-400 font-mono">
{{ $communication->created_at->format('d-m-Y H:i:s') }}
</span>
</div>
<!-- Het daadwerkelijke bericht -->
<div class="text-xs sm:text-sm text-slate-800 leading-relaxed whitespace-pre-wrap font-normal p-4 rounded-xl bg-slate-50 border border-slate-200/60">
{{ $communication->message }}
</div>
@if($communication->ip_address)
<div class="text-[10px] text-slate-400 flex items-center space-x-3 pt-1">
<span>IP-adres: {{ $communication->ip_address }}</span>
<span>&bull;</span>
<span>Afschrift verstuurd naar: {{ $communication->email }}</span>
</div>
@endif
</div>
<!-- Reactie Geschiedenis (Replies) -->
@if($communication->replies->isNotEmpty())
<div class="space-y-4">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider flex items-center space-x-2">
<i data-lucide="corner-down-right" class="w-3.5 h-3.5 text-slate-400"></i>
<span>Eerdere Reacties ({{ $communication->replies->count() }})</span>
</h3>
@foreach($communication->replies as $reply)
<div class="bg-white rounded-2xl border border-emerald-200/80 shadow-xs p-5 space-y-3">
<div class="flex items-center justify-between pb-2 border-b border-slate-100">
<div class="flex items-center space-x-2.5">
<div class="w-7 h-7 rounded-lg bg-emerald-600 text-white flex items-center justify-center font-bold text-[10px]">
{{ $reply->user ? strtoupper(substr($reply->user->name, 0, 1)) : 'J3D' }}
</div>
<div>
<span class="font-semibold text-slate-900 text-xs">{{ $reply->user?->name ?? 'Jouwdriedee.nl Beheer' }}</span>
<span class="text-[10px] text-emerald-700 font-medium ml-1.5 px-1.5 py-0.2 rounded bg-emerald-50">Verzonden via info@jouwdriedee.nl</span>
</div>
</div>
<span class="text-[11px] text-slate-400 font-mono">
{{ $reply->created_at->format('d-m-Y H:i') }}
</span>
</div>
<div class="text-xs sm:text-sm text-slate-800 leading-relaxed whitespace-pre-wrap">
{{ $reply->message }}
</div>
</div>
@endforeach
</div>
@endif
<!-- Direct Antwoord Formulier -->
<div class="bg-white rounded-2xl border border-slate-200/80 shadow-xs p-6 space-y-4">
<div>
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider flex items-center space-x-2">
<i data-lucide="reply" class="w-3.5 h-3.5 text-slate-500"></i>
<span>Beantwoord deze vraag direct</span>
</h3>
<p class="text-xs text-slate-500 mt-0.5">
Jouw antwoord wordt als e-mail verzonden vanuit <code class="text-slate-800 font-mono bg-slate-100 px-1 py-0.2 rounded">info@jouwdriedee.nl</code> naar <strong class="text-slate-800">{{ $communication->email }}</strong>.
</p>
</div>
<form action="{{ route('admin.communications.reply', $communication) }}" method="POST" class="space-y-3">
@csrf
<div>
<textarea
name="message"
rows="5"
required
placeholder="Typ jouw reactie aan {{ $communication->name }}..."
class="w-full bg-slate-50 border border-slate-200 rounded-xl p-3.5 text-xs sm:text-sm text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900 leading-relaxed"
></textarea>
</div>
<div class="flex items-center justify-between pt-1">
<div class="text-[11px] text-slate-400 flex items-center space-x-1.5">
<i data-lucide="mail-check" class="w-3.5 h-3.5 text-emerald-600"></i>
<span>Status wordt na verzending automatisch 'Beantwoord'</span>
</div>
<button type="submit" class="px-5 py-2.5 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition flex items-center space-x-2 shadow-xs cursor-pointer">
<i data-lucide="send" class="w-3.5 h-3.5"></i>
<span>Verstuur Reactie naar Klant</span>
</button>
</div>
</form>
</div>
</div>
<!-- Rechterkolom: Klantprofiel Info & Status Paneel -->
<div class="lg:col-span-4 space-y-5">
<!-- Status & Notities Box -->
<div class="bg-white p-5 rounded-2xl border border-slate-200/80 shadow-xs space-y-4">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider">Status &amp; Interne Notities</h3>
<form action="{{ route('admin.communications.status', $communication) }}" method="POST" class="space-y-3">
@csrf
<div class="space-y-1">
<label class="block text-xs font-medium text-slate-700">Dossier Status</label>
<select name="status" class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs font-semibold text-slate-900 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">
<option value="new" {{ $communication->status === 'new' ? 'selected' : '' }}>Nieuw</option>
<option value="in_progress" {{ $communication->status === 'in_progress' ? 'selected' : '' }}>In behandeling</option>
<option value="resolved" {{ $communication->status === 'resolved' ? 'selected' : '' }}>Beantwoord / Opgelost</option>
<option value="closed" {{ $communication->status === 'closed' ? 'selected' : '' }}>Gesloten</option>
</select>
</div>
<div class="space-y-1">
<label class="block text-xs font-medium text-slate-700">Interne beheerder notitie</label>
<textarea name="admin_notes" rows="3" placeholder="Alleen zichtbaar voor beheerders..." class="w-full bg-slate-50 border border-slate-200 rounded-xl p-2.5 text-xs text-slate-900 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900">{{ old('admin_notes', $communication->admin_notes) }}</textarea>
</div>
<button type="submit" class="w-full py-2 rounded-xl bg-slate-100 hover:bg-slate-200 text-slate-800 text-xs font-medium transition cursor-pointer">
Status &amp; Notitie Opslaan
</button>
</form>
</div>
<!-- Klantprofiel Kaart -->
<div class="bg-white p-5 rounded-2xl border border-slate-200/80 shadow-xs space-y-3.5">
<div class="flex items-center justify-between">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider">Klantgegevens</h3>
<a href="{{ route('admin.customers.show', $communication->user_id ?? $communication->email) }}" class="text-[11px] font-semibold text-slate-900 underline hover:text-slate-700">
Volledig Profiel &rarr;
</a>
</div>
<div class="text-xs space-y-2 text-slate-600">
<div>
<span class="text-slate-400 block text-[10px]">Naam</span>
<a href="{{ route('admin.customers.show', $communication->user_id ?? $communication->email) }}" class="font-semibold text-slate-900 hover:underline">
{{ $communication->name }}
</a>
</div>
<div>
<span class="text-slate-400 block text-[10px]">E-mailadres</span>
<a href="mailto:{{ $communication->email }}" class="text-slate-900 hover:underline font-mono">
{{ $communication->email }}
</a>
</div>
@if($communication->phone)
<div>
<span class="text-slate-400 block text-[10px]">Telefoonnummer</span>
<a href="tel:{{ $communication->phone }}" class="text-slate-900 hover:underline font-mono">
{{ $communication->phone }}
</a>
</div>
@endif
<div>
<span class="text-slate-400 block text-[10px]">Account status</span>
@if($communication->user)
<span class="inline-flex items-center space-x-1 text-emerald-700 font-semibold">
<i data-lucide="check" class="w-3 h-3"></i>
<span>Geregistreerd account (#{{ $communication->user->id }})</span>
</span>
@else
<span class="text-slate-500">Gastbezoeker (geen account)</span>
@endif
</div>
</div>
<div class="pt-2 border-t border-slate-100">
<a href="{{ route('admin.customers.show', $communication->user_id ?? $communication->email) }}" class="w-full py-2 px-3 rounded-xl bg-slate-50 hover:bg-slate-100 text-slate-800 text-xs font-medium transition flex items-center justify-center space-x-1.5">
<i data-lucide="user" class="w-3.5 h-3.5 text-slate-500"></i>
<span>Bekijk alle communicatie van deze klant</span>
</a>
</div>
</div>
<!-- Gekoppelde Bestelling (indien van toepassing) -->
@if($communication->order)
<div class="bg-white p-5 rounded-2xl border border-slate-200/80 shadow-xs space-y-3">
<div class="flex items-center justify-between">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider">Betreft Bestelling</h3>
<a href="{{ route('admin.orders.show', $communication->order) }}" class="text-[11px] font-semibold text-indigo-600 underline">
Order details &rarr;
</a>
</div>
<div class="text-xs space-y-1.5 text-slate-600">
<div>
<span class="text-slate-400 block text-[10px]">Ordernummer</span>
<span class="font-mono font-bold text-slate-900">#{{ $communication->order->order_number }}</span>
</div>
<div>
<span class="text-slate-400 block text-[10px]">Orderdatum</span>
<span>{{ $communication->order->created_at->format('d-m-Y H:i') }}</span>
</div>
<div>
<span class="text-slate-400 block text-[10px]">Bedrag &amp; Status</span>
<span class="font-bold text-slate-900">{{ $communication->order->formatted_total }}</span>
<span class="ml-1 text-[10px] px-1.5 py-0.2 rounded bg-slate-100 font-semibold">{{ $communication->order->status }}</span>
</div>
</div>
</div>
@endif
</div>
</div>
</div>
@endsection
@@ -8,7 +8,7 @@
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/60 gap-4">
<div>
<span class="text-[11px] font-semibold uppercase tracking-wider text-slate-400 block mb-1">Content Management</span>
<span class="text-[11px] font-semibold uppercase tracking-wider text-slate-400 block mb-1">Shop Content & Stijl CMS</span>
<h1 class="font-heading text-2xl sm:text-3xl font-bold text-slate-900 tracking-tight">Layout & Teksten</h1>
<p class="text-xs sm:text-sm text-slate-500 mt-1">
Pas teksten, titels, USP's, kostprijstarieven en instellingen van de webshop aan.
@@ -0,0 +1,150 @@
@extends('layouts.admin')
@section('title', 'Klanten & Profielen | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6">
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/80 gap-4">
<div>
<div class="inline-flex items-center space-x-1.5 text-xs text-slate-500 font-medium mb-1">
<i data-lucide="users" class="w-3.5 h-3.5"></i>
<span>Relatiebeheer &amp; Accounts</span>
</div>
<h1 class="text-2xl font-bold tracking-tight text-slate-900">Klanten &amp; Profielen</h1>
<p class="text-xs text-slate-500 mt-1">
Overzicht van geregistreerde klanten ({{ $totalRegistered }}) en gastkopers ({{ $totalGuests }}).
</p>
</div>
<div class="flex items-center space-x-2">
<a href="{{ route('admin.communications.index') }}" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition flex items-center space-x-1.5 shadow-xs">
<i data-lucide="message-square" class="w-3.5 h-3.5 text-slate-400"></i>
<span>Communicatie Inbox</span>
</a>
</div>
</div>
<!-- Search Bar -->
<div class="flex items-center justify-between">
<form action="{{ route('admin.customers.index') }}" method="GET" class="flex items-center space-x-2 w-full sm:w-80">
<div class="relative w-full">
<input
type="text"
name="q"
value="{{ $search }}"
placeholder="Zoek klant op naam of e-mail..."
class="w-full pl-8 pr-3 py-2 bg-white border border-slate-200/80 rounded-xl text-xs text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-1 focus:ring-slate-900 focus:border-slate-900"
>
<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>
@if($search)
<a href="{{ route('admin.customers.index') }}" class="px-2.5 py-2 text-xs text-slate-500 hover:text-slate-800 transition">
Wissen
</a>
@endif
</form>
</div>
<!-- Customers Table Card -->
<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-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 px-4">Klant</th>
<th class="py-3 px-4">Type</th>
<th class="py-3 px-4">Bestellingen</th>
<th class="py-3 px-4">Communicatie / Vragen</th>
<th class="py-3 px-4">Actief sinds</th>
<th class="py-3 px-4 text-right">Profiel</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 font-medium">
@forelse($customers as $customer)
<tr class="hover:bg-slate-50/60 transition">
<!-- Naam & E-mail -->
<td class="py-3.5 px-4">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 rounded-xl bg-slate-900 text-white flex items-center justify-center font-bold text-xs shrink-0">
{{ strtoupper(substr($customer->name, 0, 1)) }}
</div>
<div>
<a href="{{ route('admin.customers.show', $customer->id ?? $customer->email) }}" class="font-bold text-slate-900 hover:underline">
{{ $customer->name }}
</a>
<div class="text-[11px] text-slate-400 font-normal">
{{ $customer->email }}
</div>
</div>
</div>
</td>
<!-- Type -->
<td class="py-3.5 px-4">
@if($customer->is_registered)
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200/60">
Geregistreerd account
</span>
@else
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold bg-slate-100 text-slate-600 border border-slate-200/60">
Gastkoper
</span>
@endif
</td>
<!-- Bestellingen -->
<td class="py-3.5 px-4">
<span class="px-2 py-0.5 rounded-md bg-slate-100 text-slate-700 text-[11px] font-medium">
{{ $customer->orders_count }} order(s)
</span>
</td>
<!-- Communicatie -->
<td class="py-3.5 px-4">
@if($customer->communications_count > 0)
<span class="inline-flex items-center space-x-1 px-2 py-0.5 rounded-md bg-indigo-50 text-indigo-700 text-[11px] font-semibold border border-indigo-200/60">
<i data-lucide="message-square" class="w-3 h-3"></i>
<span>{{ $customer->communications_count }} bericht(en)</span>
</span>
@else
<span class="text-slate-400 text-[11px]">0 berichten</span>
@endif
</td>
<!-- Actief sinds -->
<td class="py-3.5 px-4 text-slate-500 whitespace-nowrap">
{{ $customer->created_at instanceof \Carbon\Carbon ? $customer->created_at->format('d-m-Y') : date('d-m-Y', strtotime((string)$customer->created_at)) }}
</td>
<!-- Actie -->
<td class="py-3.5 px-4 text-right whitespace-nowrap">
<a href="{{ route('admin.customers.show', $customer->id ?? $customer->email) }}" 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>Bekijk profiel</span>
<i data-lucide="chevron-right" class="w-3 h-3"></i>
</a>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="py-12 text-center text-slate-400">
Geen klanten gevonden die voldoen aan de zoekopdracht.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if($customers->hasPages())
<div class="p-4 border-t border-slate-100">
{{ $customers->links() }}
</div>
@endif
</div>
</div>
@endsection
@@ -0,0 +1,239 @@
@extends('layouts.admin')
@section('title', 'Klantprofiel: ' . $customerName . ' | Jouwdriedee Beheer')
@section('content')
<div class="space-y-6 max-w-6xl mx-auto" x-data="{ tab: 'communications' }">
<!-- Header Section -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-6 border-b border-slate-200/80 gap-4">
<div>
<a href="{{ route('admin.customers.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 Klantenoverzicht</span>
</a>
<div class="flex items-center space-x-2 mt-0.5">
<h1 class="text-2xl font-bold tracking-tight text-slate-900">{{ $customerName }}</h1>
@if($user)
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200/60">
Geregistreerd account (#{{ $user->id }})
</span>
@else
<span class="px-2 py-0.5 rounded-full text-[10px] font-semibold bg-slate-100 text-slate-600 border border-slate-200/60">
Gastkoper
</span>
@endif
</div>
<p class="text-xs text-slate-500 mt-0.5">
{{ $email }} @if($customerPhone) &bull; {{ $customerPhone }} @endif
</p>
</div>
<div class="flex items-center space-x-2">
<a href="{{ route('admin.communications.index') }}" class="px-3.5 py-2 rounded-xl 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="inbox" class="w-3.5 h-3.5 text-slate-400"></i>
<span>Alle Communicatie</span>
</a>
<a href="mailto:{{ $email }}" class="px-3.5 py-2 rounded-xl bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition flex items-center space-x-1.5 shadow-xs">
<i data-lucide="mail" class="w-3.5 h-3.5 text-slate-400"></i>
<span>E-mail Sturen</span>
</a>
</div>
</div>
<!-- Quick Stats Cards -->
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="p-4 rounded-2xl bg-white border border-slate-200/80 shadow-2xs flex items-center justify-between">
<div>
<span class="text-[11px] font-semibold text-slate-400 uppercase tracking-wider block">Communicatie Dossier</span>
<span class="text-xl font-bold text-slate-900 mt-0.5 block">{{ $communications->count() }} vragen / berichten</span>
</div>
<div class="w-10 h-10 rounded-xl bg-indigo-50 text-indigo-600 flex items-center justify-center">
<i data-lucide="message-square" class="w-5 h-5"></i>
</div>
</div>
<div class="p-4 rounded-2xl bg-white border border-slate-200/80 shadow-2xs flex items-center justify-between">
<div>
<span class="text-[11px] font-semibold text-slate-400 uppercase tracking-wider block">Bestellingen</span>
<span class="text-xl font-bold text-slate-900 mt-0.5 block">{{ $orders->count() }} orders</span>
</div>
<div class="w-10 h-10 rounded-xl bg-sky-50 text-sky-600 flex items-center justify-center">
<i data-lucide="shopping-cart" class="w-5 h-5"></i>
</div>
</div>
<div class="p-4 rounded-2xl bg-white border border-slate-200/80 shadow-2xs flex items-center justify-between">
<div>
<span class="text-[11px] font-semibold text-slate-400 uppercase tracking-wider block">Totale Omzet</span>
<span class="text-xl font-bold text-slate-900 mt-0.5 block">&euro; {{ number_format($totalSpent, 2, ',', '.') }}</span>
</div>
<div class="w-10 h-10 rounded-xl bg-emerald-50 text-emerald-600 flex items-center justify-center">
<i data-lucide="receipt" class="w-5 h-5"></i>
</div>
</div>
</div>
<!-- Segmented Navigation Tabs -->
<div class="flex items-center space-x-1.5 p-1 bg-slate-100/80 rounded-xl max-w-max text-xs font-medium">
<button
type="button"
@click="tab = 'communications'"
:class="tab === 'communications' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900'"
class="px-3.5 py-1.5 rounded-lg transition flex items-center space-x-1.5 cursor-pointer"
>
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
<span>Communicatie &amp; Vragen</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-700">
{{ $communications->count() }}
</span>
</button>
<button
type="button"
@click="tab = 'orders'"
:class="tab === 'orders' ? 'bg-white text-slate-900 font-semibold shadow-2xs' : 'text-slate-600 hover:text-slate-900'"
class="px-3.5 py-1.5 rounded-lg transition flex items-center space-x-1.5 cursor-pointer"
>
<i data-lucide="shopping-bag" class="w-3.5 h-3.5"></i>
<span>Bestelgeschiedenis</span>
<span class="px-1.5 py-0.2 rounded-md text-[10px] bg-slate-200/60 text-slate-700">
{{ $orders->count() }}
</span>
</button>
</div>
<!-- TAB 1: COMMUNICATIE & VRAGEN BINNEN DIT KLANTPROFIEL -->
<div x-show="tab === 'communications'" class="space-y-4">
@if($communications->isEmpty())
<div class="p-12 text-center rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-2">
<div class="w-10 h-10 rounded-xl bg-slate-100 text-slate-400 flex items-center justify-center mx-auto mb-1">
<i data-lucide="message-square-off" class="w-5 h-5"></i>
</div>
<h3 class="text-sm font-semibold text-slate-800">Geen communicatie gevonden</h3>
<p class="text-xs text-slate-500 max-w-sm mx-auto">
Deze klant heeft nog geen vragen gesteld via het contactformulier.
</p>
</div>
@else
<div class="space-y-3">
@foreach($communications as $comm)
<div class="p-5 rounded-2xl bg-white border border-slate-200/80 shadow-2xs space-y-3 hover:border-slate-300 transition">
<!-- Header regel -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pb-2.5 border-b border-slate-100 gap-2">
<div class="flex items-center space-x-2">
<span class="font-mono text-xs text-slate-400">#{{ $comm->id }}</span>
<h3 class="font-bold text-slate-900 text-sm">{{ $comm->subject }}</h3>
</div>
<div class="flex items-center space-x-3">
<span class="px-2.5 py-0.5 rounded-full text-[10px] font-semibold
@if($comm->status === 'new') bg-sky-50 text-sky-700 border border-sky-200/80
@elseif($comm->status === 'in_progress') bg-amber-50 text-amber-700 border border-amber-200/80
@elseif($comm->status === 'resolved') bg-emerald-50 text-emerald-700 border border-emerald-200/80
@else bg-slate-100 text-slate-600 border border-slate-200/60
@endif">
{{ $comm->status_label }}
</span>
<span class="text-xs text-slate-400 font-mono">
{{ $comm->created_at->format('d-m-Y H:i') }}
</span>
</div>
</div>
<!-- Vraag tekst -->
<div class="text-xs text-slate-700 leading-relaxed bg-slate-50 p-3 rounded-xl border border-slate-100">
{{ $comm->message }}
</div>
<!-- Footer info & link naar communicatiedossier -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between pt-1 gap-2 text-xs">
<div class="flex items-center space-x-3 text-slate-500">
@if($comm->order)
<span>Betreft: <a href="{{ route('admin.orders.show', $comm->order) }}" class="font-mono text-indigo-600 hover:underline">#{{ $comm->order->order_number }}</a></span>
<span>&bull;</span>
@endif
<span>{{ $comm->replies->count() }} antwoord(en) verzonden</span>
</div>
<a href="{{ route('admin.communications.show', $comm) }}" class="inline-flex items-center space-x-1.5 px-3 py-1.5 rounded-lg bg-slate-900 hover:bg-slate-800 text-white text-xs font-medium transition shadow-xs self-start sm:self-auto">
<span>Open Bericht &amp; Beantwoord</span>
<i data-lucide="arrow-right" class="w-3.5 h-3.5"></i>
</a>
</div>
</div>
@endforeach
</div>
@endif
</div>
<!-- TAB 2: BESTELGESCHIEDENIS BINNEN DIT KLANTPROFIEL -->
<div x-show="tab === 'orders'" class="space-y-4">
@if($orders->isEmpty())
<div class="p-12 text-center rounded-2xl bg-white border border-slate-200/80 shadow-xs space-y-2">
<div class="w-10 h-10 rounded-xl bg-slate-100 text-slate-400 flex items-center justify-center mx-auto mb-1">
<i data-lucide="shopping-cart" class="w-5 h-5"></i>
</div>
<h3 class="text-sm font-semibold text-slate-800">Nog geen bestellingen</h3>
<p class="text-xs text-slate-500 max-w-sm mx-auto">
Deze klant heeft nog geen geplaatste orders in het systeem.
</p>
</div>
@else
<div class="rounded-2xl bg-white border border-slate-200/80 overflow-hidden shadow-2xs">
<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 px-4">Order #</th>
<th class="py-3 px-4">Datum</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-100 font-medium">
@foreach($orders as $order)
<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-500">
{{ $order->created_at->format('d-m-Y H:i') }}
</td>
<td class="py-3.5 px-4">
{{ $order->items->count() }} prints
</td>
<td class="py-3.5 px-4 font-bold text-slate-900">
{{ $order->formatted_total }}
</td>
<td class="py-3.5 px-4">
<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="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>Order bekijken</span>
<i data-lucide="chevron-right" class="w-3 h-3"></i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>
@endsection
+9 -2
View File
@@ -88,12 +88,19 @@
<!-- Klant & Verzendinfo -->
<div class="space-y-4">
<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="flex items-center justify-between">
<h3 class="font-bold text-xs text-slate-900 uppercase tracking-wider">Klantgegevens</h3>
<a href="{{ route('admin.customers.show', $order->user_id ?? $order->customer_email) }}" class="text-[11px] font-semibold text-slate-900 underline hover:text-slate-700">
Klantprofiel &rarr;
</a>
</div>
<div class="text-xs space-y-1.5 text-slate-600">
<div>
<span class="text-slate-400 block text-[10px]">Naam</span>
<span class="font-semibold text-slate-900">{{ $order->customer_name }}</span>
<a href="{{ route('admin.customers.show', $order->user_id ?? $order->customer_email) }}" class="font-semibold text-slate-900 hover:underline">
{{ $order->customer_name }}
</a>
</div>
<div>
<span class="text-slate-400 block text-[10px]">E-mailadres</span>
@@ -338,7 +338,7 @@
<div>
<div class="flex items-center space-x-2">
<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>
<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">
@@ -347,7 +347,7 @@
<div>
<div class="flex items-center space-x-2">
<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>
<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">
@@ -394,7 +394,7 @@
<!-- 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="text-[10px] font-semibold text-slate-500 uppercase tracking-wider">Hoofdafbeelding</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-[11px] transition">
Verwijderen
+252
View File
@@ -0,0 +1,252 @@
@extends('layouts.app')
@section('title', 'Vraag stellen & Contact | Jouwdriedee.nl')
@section('content')
<!-- Header Banner -->
<div class="border-b border-slate-200/80 py-8 sm:py-12 bg-slate-50/50">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-2.5">
<span class="px-3 py-1 rounded-full bg-white border border-slate-200 text-xs font-medium text-slate-700 inline-flex items-center space-x-1.5 shadow-2xs">
<i data-lucide="message-square" class="w-3.5 h-3.5 text-slate-500"></i>
<span>Klantenservice &amp; Advies</span>
</span>
<h1 class="text-3xl sm:text-4xl font-bold tracking-tight text-slate-900">Stel jouw vraag aan de printstudio</h1>
<p class="text-xs sm:text-sm text-slate-500 max-w-xl mx-auto leading-relaxed">
Heb je een vraag over een 3D-model, een lopende bestelling of advies nodig over filament of kleuren? Stuur ons gerust een bericht. Je ontvangt direct een afschrift per e-mail.
</p>
</div>
</div>
<div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-8 sm:py-12">
<!-- Success Alert -->
@if(session('success'))
<div class="mb-8 p-4 rounded-2xl bg-emerald-50 border border-emerald-200/60 text-emerald-800 text-xs flex items-start space-x-3 shadow-xs">
<i data-lucide="check-circle" class="w-5 h-5 text-emerald-600 shrink-0 mt-0.5"></i>
<div>
<strong class="font-semibold block text-sm mb-0.5">Bericht succesvol verzonden!</strong>
<span>{{ session('success') }}</span>
</div>
</div>
@endif
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start">
<!-- Contactformulier Card -->
<div class="lg:col-span-7 bg-white p-6 sm:p-8 rounded-2xl border border-slate-200/80 shadow-xs space-y-6">
<div>
<h2 class="text-base font-bold text-slate-900">Stel een vraag</h2>
<p class="text-xs text-slate-500 mt-0.5">Vul onderstaand formulier in, dan reageren wij binnen 24 uur.</p>
</div>
<form action="{{ route('contact.store') }}" method="POST" class="space-y-4">
@csrf
<!-- Naam & E-mail -->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="space-y-1">
<label for="name" class="block text-xs font-medium text-slate-700">Jouw naam *</label>
<input
type="text"
name="name"
id="name"
required
value="{{ old('name', $user->name ?? '') }}"
placeholder="Jan Jansen"
class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900 @error('name') border-rose-400 @enderror"
>
@error('name')
<p class="text-[11px] text-rose-600 mt-1">{{ $message }}</p>
@enderror
</div>
<div class="space-y-1">
<label for="email" class="block text-xs font-medium text-slate-700">E-mailadres *</label>
<input
type="email"
name="email"
id="email"
required
value="{{ old('email', $user->email ?? '') }}"
placeholder="jouw@email.nl"
class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900 @error('email') border-rose-400 @enderror"
>
@error('email')
<p class="text-[11px] text-rose-600 mt-1">{{ $message }}</p>
@enderror
</div>
</div>
<!-- Telefoon & Bestelnummer -->
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="space-y-1">
<label for="phone" class="block text-xs font-medium text-slate-700">Telefoonnummer (optioneel)</label>
<input
type="tel"
name="phone"
id="phone"
value="{{ old('phone') }}"
placeholder="06-12345678"
class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900"
>
</div>
<div class="space-y-1">
<label for="order_number" class="block text-xs font-medium text-slate-700">Bestelnummer (optioneel)</label>
@if($userOrders->isNotEmpty())
<select
name="order_number"
id="order_number"
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"
>
<option value="">-- Geen specifieke bestelling --</option>
@foreach($userOrders as $order)
<option value="{{ $order->order_number }}" {{ old('order_number') === $order->order_number ? 'selected' : '' }}>
Order #{{ $order->order_number }} ({{ $order->created_at->format('d-m-Y') }})
</option>
@endforeach
</select>
@else
<input
type="text"
name="order_number"
id="order_number"
value="{{ old('order_number') }}"
placeholder="bijv. ORD-2026-..."
class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900"
>
@endif
</div>
</div>
<!-- Onderwerp -->
<div class="space-y-1">
<label for="subject" class="block text-xs font-medium text-slate-700">Onderwerp van jouw vraag *</label>
<input
type="text"
name="subject"
id="subject"
required
value="{{ old('subject') }}"
placeholder="bijv. Vraag over levertijd of materiaalkeuze..."
class="w-full bg-slate-50 border border-slate-200 rounded-xl px-3.5 py-2 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900 @error('subject') border-rose-400 @enderror"
>
@error('subject')
<p class="text-[11px] text-rose-600 mt-1">{{ $message }}</p>
@enderror
</div>
<!-- Bericht -->
<div class="space-y-1">
<label for="message" class="block text-xs font-medium text-slate-700">Jouw bericht of vraag *</label>
<textarea
name="message"
id="message"
rows="5"
required
placeholder="Typ hier jouw vraag zo duidelijk mogelijk..."
class="w-full bg-slate-50 border border-slate-200 rounded-xl p-3.5 text-xs text-slate-900 placeholder-slate-400 focus:bg-white focus:outline-none focus:ring-2 focus:ring-slate-900/10 focus:border-slate-900 leading-relaxed @error('message') border-rose-400 @enderror"
>{{ old('message') }}</textarea>
@error('message')
<p class="text-[11px] text-rose-600 mt-1">{{ $message }}</p>
@enderror
</div>
<!-- Note over afschrift -->
<div class="p-3 rounded-xl bg-slate-50 border border-slate-200/80 text-[11px] text-slate-500 flex items-center space-x-2">
<i data-lucide="shield-check" class="w-4 h-4 text-slate-400 shrink-0"></i>
<span>Je ontvangt na verzending direct een <strong>bevestigingsafschrift</strong> via <code class="text-slate-700 font-mono">noreply@jouwdriedee.nl</code>.</span>
</div>
<!-- Submit Button -->
<div class="pt-1">
<button type="submit" class="w-full py-3 px-5 rounded-xl bg-slate-900 hover:bg-slate-800 text-white font-medium text-xs transition flex items-center justify-center space-x-2 shadow-xs cursor-pointer">
<i data-lucide="send" class="w-3.5 h-3.5"></i>
<span>Vraag Versturen</span>
</button>
</div>
</form>
</div>
<!-- Rechterkolom: Info & FAQ links -->
<div class="lg:col-span-5 space-y-5">
<!-- Quick Studio Info -->
<div class="bg-white p-6 rounded-2xl border border-slate-200/80 shadow-xs space-y-4">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider">Directe Contactgegevens</h3>
<div class="space-y-3 text-xs text-slate-600">
<div class="flex items-start space-x-3">
<div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center text-slate-500 shrink-0 mt-0.5">
<i data-lucide="mail" class="w-4 h-4"></i>
</div>
<div>
<span class="text-[10px] text-slate-400 uppercase font-medium block">E-mail Klantenservice</span>
<a href="mailto:info@jouwdriedee.nl" class="font-semibold text-slate-900 hover:underline">info@jouwdriedee.nl</a>
<span class="block text-[11px] text-slate-400">Reactie doorgaans binnen 24 uur</span>
</div>
</div>
<div class="flex items-start space-x-3">
<div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center text-slate-500 shrink-0 mt-0.5">
<i data-lucide="clock" class="w-4 h-4"></i>
</div>
<div>
<span class="text-[10px] text-slate-400 uppercase font-medium block">Openingstijden Studio</span>
<span class="font-semibold text-slate-900">Maandag t/m Vrijdag: 09:00 - 18:00</span>
<span class="block text-[11px] text-slate-400">Printers draaien 24/7 door</span>
</div>
</div>
<div class="flex items-start space-x-3">
<div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center text-slate-500 shrink-0 mt-0.5">
<i data-lucide="truck" class="w-4 h-4"></i>
</div>
<div>
<span class="text-[10px] text-slate-400 uppercase font-medium block">Verzending &amp; Levering</span>
<span class="font-semibold text-slate-900">PostNL Track &amp; Trace</span>
<span class="block text-[11px] text-slate-400">Veilig en stootvast verpakt</span>
</div>
</div>
</div>
</div>
<!-- Snelle Links -->
<div class="bg-white p-6 rounded-2xl border border-slate-200/80 shadow-xs space-y-3">
<h3 class="text-xs font-bold text-slate-900 uppercase tracking-wider">Veelgestelde Hulp</h3>
<div class="space-y-2 text-xs">
<a href="{{ route('custom.request') }}" class="p-2.5 rounded-xl bg-slate-50 hover:bg-slate-100 transition flex items-center justify-between group">
<div class="flex items-center space-x-2.5">
<i data-lucide="layers" class="w-4 h-4 text-slate-500 group-hover:text-slate-900"></i>
<span class="font-medium text-slate-700 group-hover:text-slate-900">Eigen STL / 3MF bestand uploaden</span>
</div>
<i data-lucide="chevron-right" class="w-3.5 h-3.5 text-slate-400"></i>
</a>
<a href="{{ route('catalog') }}" class="p-2.5 rounded-xl bg-slate-50 hover:bg-slate-100 transition flex items-center justify-between group">
<div class="flex items-center space-x-2.5">
<i data-lucide="box" class="w-4 h-4 text-slate-500 group-hover:text-slate-900"></i>
<span class="font-medium text-slate-700 group-hover:text-slate-900">Assortiment &amp; Collecties bekijken</span>
</div>
<i data-lucide="chevron-right" class="w-3.5 h-3.5 text-slate-400"></i>
</a>
@auth
<a href="{{ route('account.index') }}" class="p-2.5 rounded-xl bg-slate-50 hover:bg-slate-100 transition flex items-center justify-between group">
<div class="flex items-center space-x-2.5">
<i data-lucide="user" class="w-4 h-4 text-slate-500 group-hover:text-slate-900"></i>
<span class="font-medium text-slate-700 group-hover:text-slate-900">Jouw bestelstatus &amp; account</span>
</div>
<i data-lucide="chevron-right" class="w-3.5 h-3.5 text-slate-400"></i>
</a>
@endauth
</div>
</div>
</div>
</div>
</div>
@endsection
@@ -0,0 +1,67 @@
@extends('emails.layouts.master')
@section('title', 'Afschrift van jouw vraag aan Jouwdriedee.nl')
@section('content')
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-bottom: 20px;">
<span style="display: inline-block; background-color: #ECFDF5; color: #059669; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.5px;">
Afschrift Klantvraag Ontvangen
</span>
<h1 style="margin: 12px 0 6px 0; font-size: 22px; font-weight: 800; color: #0F172A; line-height: 1.3;">
Bedankt voor je vraag, {{ $communication->name }}!
</h1>
<p style="margin: 0; font-size: 14px; color: #64748B; line-height: 1.5;">
We hebben jouw bericht in goede orde ontvangen. Onze 3D-printspecialisten bekijken jouw vraag zorgvuldig en nemen doorgaans <strong>binnen 24 uur</strong> (op werkdagen) contact met je op.
</p>
</td>
</tr>
<!-- Samenvatting Afschrift Card -->
<tr>
<td style="padding: 16px; background-color: #F8FAFC; border-radius: 12px; border: 1px solid #E2E8F0;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B; width: 130px;"><strong>Onderwerp:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A; font-weight: 600;">{{ $communication->subject }}</td>
</tr>
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Referentienummer:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A; font-family: monospace; font-weight: 700;">#{{ $communication->id }}</td>
</tr>
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Datum &amp; tijd:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A;">{{ $communication->created_at->format('d-m-Y om H:i') }}</td>
</tr>
@if($communication->order)
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Betreft bestelling:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A; font-family: monospace;">#{{ $communication->order->order_number }}</td>
</tr>
@endif
</table>
</td>
</tr>
<!-- Jouw verstuurde bericht -->
<tr>
<td style="padding-top: 20px;">
<h3 style="margin: 0 0 10px 0; font-size: 13px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px;">
Kopie van jouw bericht:
</h3>
<div style="background-color: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 16px; font-size: 13px; line-height: 1.6; color: #334155; white-space: pre-wrap;">{{ $communication->message }}</div>
</td>
</tr>
<!-- Info note -->
<tr>
<td style="padding-top: 24px;">
<p style="margin: 0; font-size: 12px; color: #94A3B8; line-height: 1.5; text-align: center;">
Dit is een automatisch verzonden afschrift vanuit <strong>noreply@jouwdriedee.nl</strong> ter bevestiging van je aanvraag.<br>
Heb je aanvullende informatie? Reageer dan gerust zodra je ons persoonlijke antwoord ontvangt.
</p>
</td>
</tr>
</table>
@endsection
@@ -0,0 +1,81 @@
@extends('emails.layouts.master')
@section('title', 'Nieuwe klantvraag #' . $communication->id)
@section('content')
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-bottom: 20px;">
<span style="display: inline-block; background-color: #EEF2FF; color: #4F46E5; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.5px;">
Nieuwe Klantvraag #{{ $communication->id }}
</span>
<h1 style="margin: 12px 0 6px 0; font-size: 22px; font-weight: 800; color: #0F172A; line-height: 1.3;">
{{ $communication->subject }}
</h1>
<p style="margin: 0; font-size: 13px; color: #64748B;">
Binnengekomen via het contactformulier op {{ $communication->created_at->format('d-m-Y om H:i') }}
</p>
</td>
</tr>
<!-- Klantgegevens Card -->
<tr>
<td style="padding: 16px; background-color: #F8FAFC; border-radius: 12px; border: 1px solid #E2E8F0; margin-bottom: 20px;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B; width: 120px;"><strong>Klantnaam:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A; font-weight: 600;">{{ $communication->name }}</td>
</tr>
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>E-mailadres:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A;"><a href="mailto:{{ $communication->email }}" style="color: #4F46E5; text-decoration: none;">{{ $communication->email }}</a></td>
</tr>
@if($communication->phone)
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Telefoonnummer:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A;">{{ $communication->phone }}</td>
</tr>
@endif
@if($communication->order)
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Bestelnummer:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #0F172A; font-family: monospace; font-weight: 700;">
#{{ $communication->order->order_number }}
</td>
</tr>
@endif
@if($communication->user)
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Account status:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #059669; font-weight: 600;">Geregistreerde klant (ID: #{{ $communication->user->id }})</td>
</tr>
@else
<tr>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;"><strong>Account status:</strong></td>
<td style="padding: 4px 0; font-size: 13px; color: #64748B;">Gastbezoeker</td>
</tr>
@endif
</table>
</td>
</tr>
<!-- Bericht van de klant -->
<tr>
<td style="padding-top: 20px;">
<h3 style="margin: 0 0 10px 0; font-size: 14px; font-weight: 700; color: #0F172A; text-transform: uppercase; letter-spacing: 0.5px;">
Bericht van de klant:
</h3>
<div style="background-color: #FFFFFF; border: 1px solid #CBD5E1; border-left: 4px solid #4F46E5; border-radius: 8px; padding: 18px; font-size: 14px; line-height: 1.6; color: #1E293B; white-space: pre-wrap;">{{ $communication->message }}</div>
</td>
</tr>
<!-- CTA knop naar Admin -->
<tr>
<td align="center" style="padding-top: 28px; padding-bottom: 10px;">
<a href="{{ route('admin.communications.show', $communication) }}" style="display: inline-block; background-color: #0F172A; color: #FFFFFF; text-decoration: none; padding: 12px 24px; border-radius: 10px; font-size: 13px; font-weight: 600;">
Bekijk &amp; Beantwoord in Admin &rarr;
</a>
</td>
</tr>
</table>
@endsection
@@ -0,0 +1,49 @@
@extends('emails.layouts.master')
@section('title', 'Reactie op vraag #' . $communication->id)
@section('content')
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="padding-bottom: 20px;">
<span style="display: inline-block; background-color: #EEF2FF; color: #4F46E5; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.5px;">
Antwoord van Jouwdriedee.nl
</span>
<h1 style="margin: 12px 0 6px 0; font-size: 22px; font-weight: 800; color: #0F172A; line-height: 1.3;">
Beste {{ $communication->name }},
</h1>
<p style="margin: 0; font-size: 14px; color: #64748B;">
We hebben een reactie voor je klaarstaan op jouw vraag met betrekking tot <strong>{{ $communication->subject }}</strong>.
</p>
</td>
</tr>
<!-- Reactie box -->
<tr>
<td style="padding: 20px; background-color: #F8FAFC; border-radius: 12px; border: 1px solid #E2E8F0; border-left: 4px solid #059669;">
<h3 style="margin: 0 0 10px 0; font-size: 13px; font-weight: 700; color: #059669; text-transform: uppercase; letter-spacing: 0.5px;">
Ons antwoord:
</h3>
<div style="font-size: 14px; line-height: 1.6; color: #0F172A; white-space: pre-wrap;">{{ $reply->message }}</div>
</td>
</tr>
<!-- Oorspronkelijk bericht -->
<tr>
<td style="padding-top: 24px;">
<h4 style="margin: 0 0 8px 0; font-size: 12px; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.5px;">
Jouw eerdere vraag (#{{ $communication->id }}):
</h4>
<div style="background-color: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 14px; font-size: 12px; line-height: 1.5; color: #64748B; white-space: pre-wrap;">{{ $communication->message }}</div>
</td>
</tr>
<tr>
<td style="padding-top: 24px; text-align: center;">
<p style="margin: 0; font-size: 13px; color: #64748B;">
Heb je nog meer vragen? Je kunt direct antwoorden op deze e-mail of contact opnemen via <a href="mailto:info@jouwdriedee.nl" style="color: #4F46E5; text-decoration: none; font-weight: 600;">info@jouwdriedee.nl</a>.
</p>
</td>
</tr>
</table>
@endsection
+29
View File
@@ -73,6 +73,24 @@
<span>Bestellingen</span>
</a>
@php
$unreadCommCount = \App\Models\Communication::where('status', 'new')->count();
@endphp
<a href="{{ route('admin.communications.index') }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ request()->routeIs('admin.communications.*') ? 'bg-slate-900 text-white font-semibold' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100' }}">
<i data-lucide="message-square" class="w-3.5 h-3.5"></i>
<span>Communicatie</span>
@if($unreadCommCount > 0)
<span class="ml-1 px-1.5 py-0.2 rounded-full text-[10px] font-bold {{ request()->routeIs('admin.communications.*') ? 'bg-white text-slate-900' : 'bg-sky-500 text-white animate-pulse' }}">
{{ $unreadCommCount }}
</span>
@endif
</a>
<a href="{{ route('admin.customers.index') }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ request()->routeIs('admin.customers.*') ? 'bg-slate-900 text-white font-semibold' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100' }}">
<i data-lucide="users" class="w-3.5 h-3.5"></i>
<span>Klanten</span>
</a>
<a href="{{ route('admin.makerworld.index') }}" class="px-3 py-1.5 rounded-lg transition flex items-center space-x-1.5 {{ request()->routeIs('admin.makerworld.index*') ? 'bg-slate-900 text-white font-semibold' : 'text-slate-600 hover:text-slate-900 hover:bg-slate-100' }}">
<i data-lucide="download-cloud" class="w-3.5 h-3.5"></i>
<span>MakerWorld Sync</span>
@@ -139,6 +157,17 @@
<a href="{{ route('admin.orders.index') }}" class="block px-3 py-2 rounded-lg {{ request()->routeIs('admin.orders.*') ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50' }}">
Bestellingen
</a>
<a href="{{ route('admin.communications.index') }}" class="block px-3 py-2 rounded-lg {{ request()->routeIs('admin.communications.*') ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50' }}">
Communicatie
@if(($unreadCommCount ?? 0) > 0)
<span class="ml-2 px-1.5 py-0.5 rounded-full text-[10px] font-bold bg-sky-500 text-white">
{{ $unreadCommCount }}
</span>
@endif
</a>
<a href="{{ route('admin.customers.index') }}" class="block px-3 py-2 rounded-lg {{ request()->routeIs('admin.customers.*') ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50' }}">
Klanten &amp; Profielen
</a>
<a href="{{ route('admin.makerworld.index') }}" class="block px-3 py-2 rounded-lg {{ request()->routeIs('admin.makerworld.*') ? 'bg-slate-100 text-slate-900 font-semibold' : 'text-slate-600 hover:bg-slate-50' }}">
MakerWorld Sync
</a>
+12
View File
@@ -102,6 +102,9 @@
<a href="{{ route('catalog') }}" class="px-3 py-1.5 rounded-lg transition {{ request()->routeIs('catalog') && !request('category') ? 'bg-slate-100 text-slate-900 font-semibold' : 'hover:text-slate-900 hover:bg-slate-50' }}">
Alle Prints
</a>
<a href="{{ route('contact.index') }}" class="px-3 py-1.5 rounded-lg transition {{ request()->routeIs('contact.*') ? 'bg-slate-100 text-slate-900 font-semibold' : 'hover:text-slate-900 hover:bg-slate-50' }}">
Vraag stellen
</a>
</nav>
</div>
@@ -210,6 +213,9 @@
<a href="{{ route('catalog') }}" class="px-3 py-2 rounded-lg hover:bg-slate-50 flex items-center justify-between text-slate-600">
<span>Alle Prints Bekijken</span>
</a>
<a href="{{ route('contact.index') }}" class="px-3 py-2 rounded-lg hover:bg-slate-50 flex items-center justify-between text-slate-900 font-medium">
<span>Vraag stellen / Contact</span>
</a>
<div class="border-t border-slate-100 pt-3 mt-2">
@guest
@@ -337,6 +343,12 @@
<i data-lucide="truck" class="w-3.5 h-3.5 text-slate-400"></i>
<span>{{ setting('footer_shipping_text', 'Snelle verzending via PostNL') }}</span>
</div>
<div class="pt-1">
<a href="{{ route('contact.index') }}" class="inline-flex items-center space-x-1 text-slate-900 font-semibold hover:underline">
<span>Direct vraag stellen</span>
<span>&rarr;</span>
</a>
</div>
</div>
</div>