@extends('store.layout.main') @php $typeLabels = [ 'buyer' => ['label' => 'Buyer', 'color' => 'blue'], 'seller' => ['label' => 'Seller', 'color' => 'indigo'], 'wholesale' => ['label' => 'Wholesale', 'color' => 'violet'], 'manufacturer' => ['label' => 'Manufacturer', 'color' => 'purple'], 'agent' => ['label' => 'Agent', 'color' => 'pink'], 'other' => ['label' => 'Other', 'color' => 'secondary'], ]; @endphp @section('page-header') @endsection @section('main-container') {{-- ── FILTERS ── --}}
@if(request()->anyFilled(['search','type','status'])) Clear @endif
{{-- ── TABLE ── --}}

{{ $customers->total() }} Customer(s)

@forelse($customers as $c) @empty @endforelse
# Name Type Contact City Orders Status Actions
{{ $c->id }}
{{ $c->name }}
@if($c->company_name)
{{ $c->company_name }}
@endif
{{ $typeLabels[$c->customer_type]['label'] ?? $c->customer_type }}
{{ $c->phone ?? '—' }}
{{ $c->email ?? '' }}
{{ $c->city ?? '—' }} @if($c->orders_count > 0) {{ $c->orders_count }} order(s) @else @endif @if($c->is_active) Active @else Inactive @endif
@csrf
No customers found.
@if($customers->hasPages()) @endif
{{-- ══════════════════════ ADD CUSTOMER MODAL ══════════════════════ --}} {{-- ══════════════════════ EDIT CUSTOMER MODAL ══════════════════════ --}} {{-- ══════════════════════ ORDERS MODAL ══════════════════════ --}} @endsection @section('script') @endsection