@php $u = auth()->user(); $cfg = $u?->current_workspace_id ? \App\Models\WaProviderConfig::query()->forWorkspace($u->current_workspace_id)->first() : null; $sf = $u?->current_workspace_id ? \App\Models\WaStorefront::where('workspace_id', $u->current_workspace_id)->first() : null; @endphp
@include('user.store._sidebar', ['current' => 'customers', 'cfg' => $cfg, 'sf' => $sf])
{{ __('Store / Customers') }}

{{ __('Saved customers') }}

{{ __('Pre-set a customer’s delivery address here. When they order on WhatsApp, it shows automatically — they just reply YES, no re-typing.') }}

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- Add / edit a customer (one form does both — keyed by phone) --}}
@csrf
{{ __('Add a customer') }}
{{-- Search --}}
{{-- List --}}
@forelse ($rows as $c) @empty @endforelse
{{ __('Customer') }} {{ __('Address') }} {{ __('Actions') }}
{{ $c->name ?: '—' }}
@if ($c->company)
{{ $c->company }}
@endif
+{{ $c->phone }}
{{ $c->address ?: '—' }}
@csrf @method('DELETE')
{{ __('No saved customers yet. Add one above.') }}
{{ $rows->links() }}
{{-- Edit prefills the form from the row's data-* (no extra page load). --}}