@extends('layouts.app') @section('title', 'Detail Pelanggan') @section('content')

Detail Pelanggan

Informasi lengkap pelanggan: {{ $customer->name }}.

Edit ← Kembali

Data Pelanggan / Customer Details

Nama / Name {{ $customer->name }}

Telepon / Phone {{ $customer->phone }}

Email {{ $customer->email ?? '—' }}

Alamat / Address {{ $customer->address }}

Kota / City {{ $customer->city }}

Provinsi / State {{ $customer->province }}

Negara / Country {{ $customer->country }}

Kode Pos / Postal {{ $customer->postal_code }}

@if ($customer->notes)

Catatan / Notes {{ $customer->notes }}

@endif

Terdaftar / Registered {{ $customer->created_at->format('d M Y H:i') }}

{{-- STATISTIK --}}
{{ $stats['total_orders'] }} Total Transaksi
Rp {{ number_format($stats['total_spent'], 0, ',', '.') }} Total Dibayar
{{ $stats['pending'] }} Menunggu Bayar
{{ $stats['completed'] }} Selesai
{{-- RIWAYAT TRANSAKSI --}}

Riwayat Transaksi / Transaction History

@if ($orders->isEmpty())

Belum ada transaksi dari pelanggan ini. / No transactions from this customer yet.

@else
@foreach ($orders as $order) @endforeach
Kode Tanggal Item Total Metode Status
{{ $order->code }} {{ $order->created_at->format('d M Y H:i') }} {{ $order->items->sum('qty') }} item Rp {{ number_format($order->total, 0, ',', '.') }} {{ $order->payment_method === 'whatsapp' ? 'WhatsApp' : 'Online' }} {{ $order->statusLabel() }} Detail →
@endif
@endsection @push('head') @include('admin.partials.track-styles') @endpush