@extends('backend.template.layouts.template-base') @section('title', 'Customer Details') @section('content')

{{ $customer->full_name }} {{ $customer->statusLabel() }}

@can('update', \App\Models\Customer::class) Edit @endcan @can('block', \App\Models\Customer::class) @if ($customer->isBlocked()) @else @endif @endcan Back
{{ $customer->full_name }}
Referral code: {{ $customer->referral_code ?? '—' }}
Email {{ $customer->email ?? '—' }} @if ($customer->email_verified_at) Verified @else Unverified @endif
Mobile {{ $customer->mobile ?? '—' }}
Gender {{ $customer->gender ? ucfirst($customer->gender) : '—' }}
Date of Birth {{ $customer->dob?->format('d M Y') ?? '—' }}
Address {{ collect([$customer->address, $customer->city, $customer->state, $customer->pincode, $customer->country])->filter()->implode(', ') ?: '—' }}
Newsletter {{ $customer->newsletter ? 'Subscribed' : 'Not subscribed' }}
Referred By {{ $customer->referrer?->full_name ?? '—' }}
Registered {{ $customer->created_at?->format('d M Y, h:i A') }}
Last Login {{ $customer->last_login_at?->format('d M Y, h:i A') ?? '—' }} @if ($customer->last_login_ip) ({{ $customer->last_login_ip }}) @endif
Wishlist ({{ $wishlists->count() }})
@if ($wishlists->isEmpty()) @else
@foreach ($wishlists as $item) Product #{{ $item->product_id }} @endforeach
@endif
Cart ({{ $cartItems->count() }})
@if ($cartItems->isEmpty()) @else
@foreach ($cartItems as $item) @endforeach
ProductQuantityUnit Price
Product #{{ $item->product_id }} {{ $item->quantity }} {{ $item->unit_price_snapshot ? currency($item->unit_price_snapshot) : '—' }}
@endif
Submitted Enquiries ({{ $enquiries->count() }})
@if ($enquiries->isEmpty()) @else
@foreach ($enquiries as $enquiry) @endforeach
MessageStatusDate
{{ \Illuminate\Support\Str::limit($enquiry->message, 60) }} @if ($enquiry->status == 1) Not Contacted @else Contacted @endif {{ $enquiry->created_at?->format('d M Y') }}
@endif
Activity Timeline
@forelse ($activities as $activity)

{{ $activity->causer?->name ?? 'System' }} {{ $activity->description }}

{{ $activity->created_at->diffForHumans() }}

@empty

No activity recorded yet.

@endforelse
@endsection @section('scripts') @endsection