@extends('layouts.admin') @section('title', 'Customer Profile - ' . $customer->name) @section('content')

Customer Profile

Manage details, shipments, and rewards for this customer.

{{ strtoupper(substr($customer->name, 0, 1)) }}

{{ $customer->name }}

Customer ID: {{ $customer->id }}

{{ ucfirst($customer->customer_type) }} Member {{ $customer->is_active ? 'Active' : 'Inactive' }}

Phone

{{ $customer->phone }}

Email

{{ $customer->email }}

Total Shipments

{{ $customer->shipments->count() }}

Reward Points

{{ number_format($customer->points ?? 0) }}

Renewal Date

{{ $customer->renewal_date ? $customer->renewal_date->format('M d, Y') : '-' }}

@foreach(['overview','shipments','invoices','rewards','activity'] as $t) @endforeach

Contact Information

Name: {{ $customer->name }}

Phone: {{ $customer->phone }}

Email: {{ $customer->email }}

Address: {{ $customer->address ?? '-' }}

Points Summary

{{ number_format($customer->points ?? 0) }} pts

Lifetime Earned: {{ number_format($customer->lifetime_points ?? 0) }}

Shipments

@forelse($shipments as $shipment)

{{ $shipment->tracking_number }}

{{ $shipment->status }}

{{ $shipment->weight }} kg • ₦{{ number_format($shipment->price, 2) }}

{{ $shipment->created_at->format('Y-m-d') }} View
@empty

No shipments found.

@endforelse
@if($shipments->hasPages())
{{ $shipments->links('pagination::tailwind') }}
@endif

Invoices

@forelse($invoices as $invoice)
@php $invoiceColors = [ 'Paid' => 'bg-green-100 text-green-700', 'Pending' => 'bg-amber-100 text-amber-700', 'Overdue' => 'bg-red-100 text-red-700', ]; @endphp

{{ $invoice->invoice_number }}

{{ $invoice->status }}

₦{{ number_format($invoice->amount, 2) }}

{{ $invoice->created_at->format('Y-m-d') }} View
@empty

No invoices found.

@endforelse
@if($invoices->hasPages())
{{ $invoices->links('pagination::tailwind') }}
@endif

Reward Points History

@forelse($rewards as $reward)

{{ $reward->type }}

{{ $reward->created_at->format('Y-m-d') }}

{{ $reward->points }} pts

{{ $reward->description ?? '-' }}

@empty

No reward points history found.

@endforelse
@if($rewards->hasPages())
{{ $rewards->links('pagination::tailwind') }}
@endif
@endsection