@extends('crm.master') @section('title', $customer->name) @php $nameParts = preg_split('/\s+/', trim((string) $customer->name), 2); $firstName = $nameParts[0] ?? ''; $lastName = $nameParts[1] ?? ''; $statusClass = $customer->status === 'active' ? 'customer-status-dot active' : 'customer-status-dot inactive'; @endphp @section('content')
@include('crm.components.alerts')

Customer Profile

{{ strtoupper($customer->status ?: 'inactive') }}
@if($customer->notes)
@endif
Bookings
@forelse($customer->bookings as $booking) @php $firstItem = $booking->items->first(); @endphp @empty @endforelse
ID Customer Type Booking Booking Date Created Amount Status Action
#{{ $booking->id }} {{ $booking->booking_number }} {{ ucfirst($booking->source ?: 'Booker') }}
{{ $booking->customer_name ?: $customer->name }} {{ $firstItem?->product_name ?: 'Booking item' }}
{{ $booking->start_datetime?->format('m/d/y') ?: '-' }}
{{ $booking->created_at?->format('m/d/y') ?: '-' }}
{{ $booking->created_at?->format('h:i A') ?: '' }}
${{ number_format((float) $booking->total_amount, 2) }} {{ $booking->status_label }} View
No bookings found for this customer.
@endsection