@extends('layouts.app') @section('title', $customer->name) @section('heading', 'Customer 360') @section('content') @php $c = $customer; @endphp

{{ $c->name }}

@if ($c->company_name)

{{ $c->company_name }}

@endif
Call WhatsApp @if ($c->email)Email@endif @can('leads.create')New lead@endcan @can('customers.edit')Edit@endcan

Contact

Phone
{{ $c->display_phone }}{{ $c->alt_phone ? ' · '.\App\Support\Phone::display($c->alt_phone) : '' }}
Email
{{ $c->email ?: 'Not recorded' }}
Prefers
{{ config('crm.contact_methods')[$c->preferred_contact] ?? $c->preferred_contact }}
Location
{{ collect([$c->address_line, $c->town, $c->county])->filter()->implode(', ') ?: 'Not recorded' }}
Marketing messages
{{ $c->marketing_consent ? 'Agreed on '.$c->consent_recorded_at?->format('d M Y') : 'No consent recorded: do not send offers' }}

Identification

@can('customers.view_sensitive') @php $show = $revealed ?? null; @endphp
{{ config('crm.id_types')[$c->id_type] ?? 'ID number' }}
{{ $show ? ($show['national_id'] ?: 'Not recorded') : \App\Models\Customer::mask($c->national_id) }}
KRA PIN
{{ $show ? ($show['kra_pin'] ?: 'Not recorded') : \App\Models\Customer::mask($c->kra_pin) }}
Driving licence
{{ $show ? ($show['driving_licence_no'] ?: 'Not recorded') : \App\Models\Customer::mask($c->driving_licence_no) }}{{ $c->licence_expiry ? ' · expires '.$c->licence_expiry->format('d M Y') : '' }}
@unless ($show)
@csrf

Each reveal is recorded in the audit log.

@endunless @else

ID numbers, KRA PINs and licence numbers are visible to managers and finance only.

@endcan

Purchase history

@includeIf('staff._portal_invite', ['customer' => $customer])

Leads ({{ $c->leads->count() }})

Test drives

Wishlist

@if ($c->notes)

Notes

{{ $c->notes }}

@endif @endsection