{{-- Success Message --}} @if (session()->has('message')) @endif {{-- Customer Database Card --}}
{{-- Header --}}

Customer Database

Total: {{ $customers->total() }} customers
{{-- Filters & Search Bar --}}
{{-- Search --}}
{{-- Lucky Filter --}}
{{-- Per Page Selector --}}
entries
@if($search || $luckyFilter !== 'all') @endif
{{-- Table --}}
{{-- Dynamic Custom Fields --}} @foreach($visibleFields as $field) @endforeach @forelse($customers as $customer) {{-- Name --}} {{-- Email --}} {{-- Contact --}} {{-- Dynamic Custom Fields --}} @foreach($visibleFields as $field) @endforeach {{-- Pincode --}} {{-- Serial --}} {{-- Product --}} {{-- Assign (Seller) --}} {{-- Date --}} {{-- Actions --}} @empty @endforelse
Name Email Contact {{ $field->name }} Pincode Serial Product Assign Date Actions
{{ $customer->name ?: '-' }}
@if($customer->is_lucky_draw) Winner @endif
{{ $customer->email ?: '-' }}
{{ $customer->contact ?: '-' }}
@php $extraFields = is_string($customer->extra_fields) ? json_decode($customer->extra_fields, true) : $customer->extra_fields; $value = $extraFields[$field->unique_key] ?? '-'; @endphp {{ $value }}
{{ $customer->pincode ?: '-' }}
{{ $customer->serial }}
@if($customer->product_name)
{{ $customer->product_name }}
@if($customer->product_code)
{{ $customer->product_code }}
@endif @endif @if($customer->products && $customer->products->count() > 0)
@foreach($customer->products as $taggedProduct) {{ $taggedProduct->name }} @endforeach
@endif @if(!$customer->product_name && (!$customer->products || $customer->products->count() === 0)) - @endif
@if($customer->seller_name) {{ $customer->seller_name }} @if($customer->seller_id) ({{ $customer->seller_id }}) @endif @else Not Assigned @endif
{{ $customer->created_at->format('M d, Y') }}
{{ $customer->created_at->format('h:i A') }}
@if($search || $luckyFilter !== 'all') No customers found matching your filters. @else No customers registered yet. Customers will appear here after product verification. @endif
{{-- Pagination --}}
{{ $customers->links() }}