@extends('mainlayout.layout') @section('title', config('app.name') . ' | Customer Details') @push('css') @endpush @section('content') @php $customerName = trim($customer->first_name . ' ' . $customer->middle_name . ' ' . $customer->last_name); $initials = mb_substr($customer->first_name ?: 'C', 0, 1) . mb_substr($customer->last_name ?: '', 0, 1); @endphp
All customersCustomer management

{{ $customerName ?: 'Customer' }}

Profile and purchase history.

@include('superadmin.property.partials.workspace_feedback')
Total Orders{{ number_format($metrics['total']) }}Across accessible projects
Order Value{{ number_format((float) $metrics['value']) }}TZS · generated, initialized and completed
Completed Orders{{ number_format($metrics['completed']) }}Completed purchases
Success Rate{{ number_format($metrics['success_rate'], 2) }}%Orders completed

Customer Profile

Personal details and contact information.

@foreach(['first_name' => 'First name', 'middle_name' => 'Middle name', 'last_name' => 'Last name', 'phone' => 'Phone number', 'email' => 'Email address'] as $field => $label)
{{ $label }}
{{ $customer->$field ?: 'Not provided' }}
@endforeach
Registered on
{{ optional($customer->created_at)->format('M d, Y') ?: 'Not available' }}

Order Status Summary

A breakdown of this customer’s purchase history.

@foreach([0 => 'Generated', 1 => 'Initialized', 2 => 'Completed', 3 => 'Expired', 4 => 'Cancelled'] as $status => $label)
{{ $label }}{{ number_format($orders->where('status', $status)->count()) }}
@endforeach

Customer Orders

View the project, plot and payment details for each purchase.

{{ number_format($orderRows->total()) }} orders
@forelse($orderRows as $index => $order) @php $orderUrl = '/property/orders/view/' . encrypt($order->id); $tone = [0 => 'pw-neutral', 1 => 'pw-warning', 2 => 'pw-success', 3 => 'pw-danger', 4 => 'pw-danger'][(int) $order->status] ?? 'pw-neutral'; @endphp @empty@endforelse
# / OrderProject / PlotOrder value (TZS)StatusCreatedAction
{{ $orderRows->firstItem() + $index }}{{ $order->referenceid ?: '#' . $order->id }}{{ optional($order->property)->name ?: 'Project not available' }}Plot {{ optional($order->plot)->plotnumber ?: 'not available' }}{{ number_format((float) $order->amount) }}{{ $order->status_description ?: 'Not provided' }}{{ optional($order->created_at)->format('M d, Y H:i') ?: '—' }}View Order

No orders yet

This customer’s purchases will appear here.

@include('superadmin.property.partials.workspace_pagination', ['paginator' => $orderRows, 'label' => 'orders', 'section' => 'orders'])
@endsection @push('scripts') @endpush