{{ __('Customer Details') }}
@if (session('status'))
{{ session('status') }}
@endif

{{ $customer->name }}

{{ __('Edit') }}
@foreach ([ 'Phone' => $customer->phone, 'Email' => $customer->email, 'Address' => $customer->address, 'Added' => $customer->created_at->format('M j, Y'), ] as $label => $value)
{{ __($label) }}
{{ $value ?: '—' }}
@endforeach @if ($customer->notes)
{{ __('Notes') }}
{{ $customer->notes }}
@endif

{{ __('Custom Fields') }}

{{ __("Extra fields tracked on every trip for this customer — e.g. a Gatepass Number or Bill Number.") }}

@if ($customer->customFields->isEmpty())

{{ __('No custom fields yet.') }}

@else
    @foreach ($customer->customFields as $field)
  • {{ $field->field_name }}
    @csrf @method('DELETE')
  • @endforeach
@endif
@csrf

{{ __('Trips') }}

@if ($customer->trips->isEmpty())

{{ __('No trips recorded for this customer yet.') }}

@else @foreach ($customer->trips as $trip) @endforeach
{{ __('Date') }} {{ __('Vehicle') }} {{ __('Driver') }} {{ __('Pickup') }} {{ __('Dropoff') }} {{ __('Status') }}
{{ $trip->date->format('M j, Y') }} {{ $trip->vehicle?->plate ?? '—' }} {{ $trip->driver?->name ?? '—' }} {{ $trip->pickup_location }} {{ $trip->dropoff_location }} {{ $trip->status->label() }}
@endif
← {{ __('Back to Customers') }}