@extends('layouts.app') @section('title', 'Customer Profile') @section('breadcrumb') @endsection @section('content')
{{-- Customer Info Sidebar --}}
{{-- Profile Card --}}
{{ strtoupper(substr($customer->name, 0, 1)) }}

{{ $customer->name }}

{{ $customer->group?->name ?? 'General Customer' }}

@if($customer->loyalty_tier) {{ ucfirst($customer->loyalty_tier) }} Member @endif
@if($customer->is_active) Active @else Inactive @endif
{{-- Contact Details --}}
Contact Details
@if($customer->phone)
Phone {{ $customer->phone }}
@endif @if($customer->email)
Email {{ $customer->email }}
@endif @if($customer->address || $customer->city)
Address {{ $customer->address }}{{ $customer->city ? ', ' . $customer->city : '' }}
@endif @if($customer->nic)
NIC {{ $customer->nic }}
@endif @if($customer->date_of_birth)
Birthday {{ $customer->date_of_birth->format('M d, Y') }}
@endif
{{-- Credit Info --}}
Credit Info
Credit Limit: Rs. {{ number_format($customer->credit_limit, 2) }}
Current Balance: Rs. {{ number_format($customer->current_balance, 2) }}
Member Since: {{ $customer->created_at->format('M d, Y') }}
{{-- Main Content --}}
{{-- Stats Cards --}}
{{ $customer->total_orders }}
Total Orders
Rs. {{ number_format($customer->total_purchases, 0) }}
Total Purchases
{{ number_format($customer->loyalty_points) }}
Loyalty Points
{{-- Recent Orders --}}
Recent Orders
@forelse($orders as $order) @empty @endforelse
Order # Date Items Total Status Action
{{ $order->order_number }}
{{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('h:i A') }}
{{ $order->items->count() }} items Rs. {{ number_format($order->total_amount, 2) }} @php $statusClass = match($order->status) { 'completed' => 'status-completed', 'pending' => 'status-pending', 'cancelled' => 'status-cancelled', 'refunded' => 'status-refunded', default => 'status-pending' }; @endphp {{ ucfirst($order->status) }}

No orders yet

{{-- Notes --}} @if($customer->notes)
Notes

{{ $customer->notes }}

@endif
@push('styles') @endpush @endsection