@extends('layouts.admin') @section('title', $customer->name) @section('breadcrumb', __('admin.customers')) @section('content') @php($chatStrings = [ 'failed' => __('support.send_failed'), 'limit' => __('support.attachment_limit', ['size' => '10 MB']), 'recording' => __('support.recording'), 'stop' => __('support.stop'), 'mic' => __('support.mic_denied'), ])
{{ $customer->initials }}

{{ $customer->name }}

{{ $customer->is_active ? __('admin.active') : __('admin.inactive') }} @if ($customer->phone_verified_at || $customer->email_verified_at) {{ __('admin.verified') }} @endif @if ($customer->group) {{ $customer->group->name }} @endif
    @if ($customer->email)
  • {{ $customer->email }}
  • @endif @if ($customer->phone)
  • {{ $customer->phone }}
  • @endif
  • {{ strtoupper($customer->locale) }}
{{ $online ? __('admin.online_now') : __('admin.last_login').': '.($customer->last_login_at?->diffForHumans() ?? __('admin.never')) }} {{ __('admin.member_since') }} {{ $customer->created_at->translatedFormat('M Y') }}
@csrf
@if (filled($customer->email))
@csrf
@endif @if (! $conversation || $conversation->isArchived())
@csrf
@endif
{{ __('admin.orders') }} {{ num($ordersCount) }} {{ __('admin.all_time') }}
{{ __('admin.spent_total') }} {{ money($spent) }} {{ __('admin.paid_orders') }}
{{ __('admin.messages') }} {{ num($totalMessages) }} {{ __('admin.unread') }}: {{ num($unreadMessages) }}
{{ __('admin.last_login') }} {{ $customer->last_login_at?->translatedFormat('d M') ?? '—' }} {{ $customer->last_login_at?->translatedFormat('H:i') ?? __('admin.never') }}

{{ __('admin.customer') }}

{{ __('admin.customer_overview') }}
{{ __('admin.customer_group') }}

{{ __('admin.customer_groups_help') }}

@if ($groups->isEmpty()) {{ __('admin.new_group') }} @else
@csrf @method('put')
@endif
{{ __('admin.locale') }}
{{ strtoupper($customer->locale) }}
{{ __('admin.price_list') }}
@if ($customer->group) {{ $customer->group->has_price_list ? __('admin.price_list_on') : __('admin.price_list_off') }} @else — @endif
{{ __('admin.member_since') }}
{{ $customer->created_at->translatedFormat('d M Y') }}
{{ __('admin.last_login') }}
{{ $customer->last_login_at?->translatedFormat('d M Y — H:i') ?? '—' }}

{{ __('admin.customer_activity') }}

{{ __('admin.customer_activity_help') }}
@if ($activities->isEmpty())

{{ __('admin.activity_empty') }}

@else
    @foreach ($activities as $activity)
  1. {{ $activity->type === 'login' ? __('admin.activity_login') : __('admin.activity_logout') }} {{ $activity->device() }} · {{ $activity->ip ?: '—' }}
  2. @endforeach
@endif

{{ __('admin.chat') }}

{{ __('admin.chat_help') }}
@if ($conversation)
@csrf
@if ($conversation->isArchived())
@csrf
@endif @endif
@if ($conversation)
{{ $conversation->subject ?: __('support.conversation', ['id' => $conversation->id]) }} {{ $conversation->isArchived() ? __('support.archived') : __('support.open') }} · {{ $conversation->messages_count ?? $conversation->messages()->count() }} {{ __('admin.messages') }}
{{ $conversation->isArchived() ? __('support.archived') : __('support.open') }}
@forelse ($messages as $message) @include('partials.chat-message', ['message' => $message, 'viewer' => 'admin']) @empty

{{ __('admin.chat_empty') }}

@endforelse
@if ($conversation->isArchived())

{{ __('support.archived_hint') }}

@else
@csrf

{{ __('support.attachment_limit', ['size' => '10 MB']) }}

@endif @else

{{ __('admin.chat_no_conversations') }}

@csrf
@endif

{{ __('admin.notifications') }}

@forelse ($customer->notifications()->latest()->limit(8)->get() as $notification)
{{ $notification->title }}

{{ $notification->body }}

{{ $notification->created_at->diffForHumans() }}
@empty

{{ __('account.no_notifications') }}

@endforelse

{{ __('admin.orders') }}

{{ __('admin.customer_orders_help') }}
@forelse ($customer->orders as $order) @empty @endforelse
{{ __('admin.order') }}{{ __('admin.date') }}{{ __('admin.status') }}{{ __('admin.payment') }}{{ __('admin.total') }}
{{ $order->number }} {{ $order->created_at->translatedFormat('d M Y') }} {{ status_label($order->status) }} {{ payment_status_label($order->payment_status) }} {{ money($order->total) }} {{ __('admin.open') }}
{{ __('admin.no_orders') }}
@csrf @method('put')
@csrf @method('put')

{{ __('admin.set_password_help') }}

@endsection @push('head') @endpush @push('scripts') @endpush