@foreach([ ['label' => 'Active conversations', 'value' => $metrics['active'], 'hint' => 'Open, in progress, or waiting for customer', 'icon' => 'ti-message-circle', 'color' => 'primary'], ['label' => 'Unassigned', 'value' => $metrics['unassigned'], 'hint' => 'Active chats without an assigned executive', 'icon' => 'ti-user-question', 'color' => 'warning'], ['label' => 'Resolved in period', 'value' => $metrics['resolved'], 'hint' => 'Based on resolved_at from '.$from->format('d M').' to '.$to->format('d M Y'), 'icon' => 'ti-circle-check', 'color' => 'success'], ['label' => 'Callbacks waiting', 'value' => $metrics['callbacks'], 'hint' => 'Requested callbacks on active chats only', 'icon' => 'ti-phone-calling', 'color' => 'danger'], ] as $metric)
{{ number_format($metric['value']) }}
{{ $metric['label'] }}
{{ $metric['hint'] }}
@endforeach

Customer rating

@if($metrics['rating_average'] !== null) {{ number_format($metrics['rating_average'], 2) }} average from {{ number_format($metrics['rating_count']) }} ratings @else No ratings in this period @endif
@for($score = 5; $score >= 1; $score--) @php $count = (int) ($ratingDistribution[$score] ?? 0); $percentage = $metrics['rating_count'] > 0 ? round(($count / $metrics['rating_count']) * 100) : 0; @endphp
{{ $score }}
{{ $count }}
@endfor

Customers waiting

{{ number_format($metrics['waiting']) }} active chats whose latest message is from the customer.
@include('admin.support.partials.dashboard-queue-items', [ 'items' => $waitingCustomers, 'queue' => 'waiting', 'showEmpty' => true, ])
Loading more customers…

Late replies

Customers waiting beyond the selected reply time.
{{ $metrics['late'] }} late
@include('admin.support.partials.dashboard-queue-items', [ 'items' => $lateReplies, 'queue' => 'late', 'lateReplyMinutes' => $lateReplyMinutes, 'showEmpty' => true, ])
Loading more late replies…

Conversation topics

@php $largestTopic = max(1, (int) ($topics->max('total') ?? 1)); @endphp @forelse($topics as $topic)
{{ $topic->topic }} {{ number_format($topic->total) }}
@empty

No conversations in this period.

@endforelse

Recent conversations