{{ translate('customer') }} # {{ $commonData['customer']->id }}
{{ translate('customer_info') }}
{{ $commonData['customer']?->level?->name }}
{{ $commonData['customer']?->first_name . ' ' . $commonData['customer']?->last_name }}
{{ $commonData['customer']->phone }} {{ $commonData['customer']->email }} @php($address = $commonData['customer']->addresses()->where('address_label', 'default')?->first() ?? ''){{ $address->address ?? '' }}
{{ $address->city ?? '' }}
{{ translate('customer_rate_info') }}
{{ translate('total_digital_payment') }}
{{ number_format($commonData['digitalPaymentPercentage'], 2) }}
%
{{ translate('success_rate') }}
{{ number_format($commonData['success_percentage'], 2) }}
%
{{ translate('total_review_given') }}
{{ number_format(($commonData['customer_total_review_count'] / ($customer->customerTrips->count() == 0 ? 1 : $customer->customerTrips->count())) * 100, 2) }}
%
{{ translate('cancellation_rate') }}
{{ number_format($commonData['cancel_percentage'], 2) }}
%
@if ($commonData['tab'] == 'overview')
@include('usermanagement::admin.customer.partials.overview', [
'commonData' => $commonData,
'otherData' => $otherData,
])
@endif
@if ($commonData['tab'] == 'vehicle')
@include('usermanagement::admin.customer.partials.vehicle', [
'commonData' => $commonData,
'otherData' => $otherData,
])
@endif
@if ($commonData['tab'] == 'trips')
@include('usermanagement::admin.customer.partials.trips', [
'commonData' => $commonData,
'otherData' => $otherData,
])
@endif
@if ($commonData['tab'] == 'transaction')
@include('usermanagement::admin.customer.partials.transaction', [
'commonData' => $commonData,
'otherData' => $otherData,
])
@endif
@if ($commonData['tab'] == 'review')
@include('usermanagement::admin.customer.partials.review', [
'commonData' => $commonData,
'otherData' => $otherData,
])
@endif