@include('admin.common.meta') @include('admin.common.scripts')

{{ trans(' Eazee Chat Report') }}

@include('admin.loader') @php $getUserRoleData = userRoleData(); $LeadSources = explode(",",$getUserRoleData->LeadSources); @endphp
@if(session()->has('message'))

{{ trans('labels.Successlabel') }}

{{ session()->get('message') }}
@endif @if(session()->has('error'))

{{ trans('labels.WarningLabel') }}

{{ session()->get('error') }}
@endif
Search By: Date Range
@php $totalChat = $totalMissedChat = $totalMissedChatPercent = $cnt = 0; $totalChatTd = $totalMissedChatTd = $totalMissedChatPercentTd = $chatMissedTimeTd = ''; @endphp @foreach($chatss as $k => $v) @php $percent = $v->total_chat > 0 ? round(($missed_chatss[$v->dt]->total_chat ?? 0) * 100 / $v->total_chat, 2) : 0; $totalChatTd .= ''; $totalMissedChatTd .= ''; $totalMissedChatPercentTd .= ''; if(!empty($dttm[$v->dt])) { $chatMissedTimeTd .= ''; } $totalChat += $v->total_chat; $totalMissedChat += $missed_chatss[$v->dt]->total_chat ?? 0; $totalMissedChatPercent += $percent; $cnt++; @endphp @endforeach {!! $totalChatTd !!} {!! $totalMissedChatTd !!} {!! $totalMissedChatPercentTd !!} {!! $chatMissedTimeTd !!}
Date Average{{ date('d-m-Y', strtotime($k)) }}' . $v->total_chat . '' . ($missed_chatss[$v->dt]->total_chat ?? 0) . '' . $percent . '' . implode('
', $dttm[$v->dt]) . '
Total Chat {{ $cnt > 0 ? round($totalChat / $cnt, 2) : '' }}
Total Chat Missed {{ $cnt > 0 ? round($totalMissedChat / $cnt, 2) : '' }}
Missed Chat % {{ $cnt > 0 ? round($totalMissedChatPercent / $cnt, 2) : '' }}
@foreach($qry3->chunk(3) as $chunk)
@foreach($chunk as $v)
@if(!empty($data[$v->site_id])) @endif @if(!empty($data[$v->site_id])) @foreach($data[$v->site_id] as $atVal) @endforeach @endif
{{ $v->site_name == 'Smart ERP' ? 'RhysleyHR' : ($v->site_name ?? '') }}
Total Message Send {{ $qry2[$v->site_id]->total_messages ?? 0 }}
Total Message Received {{ $v->total_messages ?? 0 }}
Total Unique Chat {{ $chats[$v->site_id]->total_chat_count }}
Chat Missed {{ $chats[$v->site_id]->chats->count() }}
Name Sent Message Unique Chat
{{ $atVal->user_name }} {{ $atVal->total_messages }} {{ $atVal->chatid_unique }}
@endforeach

@endforeach