Real Time Dashboard

Gather real-time data statistics and status updates on your agents.

@forelse($agents ?? [] as $agent) @empty @endforelse
@if($swap==0)
Agent
@else
@endif
Active On Time Tickets Social Email Chats
mdo {{ $agent->user->first_name }} {{ $agent->user->last_name }} @if($agent->user->role[0]->name == "agent") @foreach($agent->user->agentRoles()->where("queue" ,">",0)->get() as $role)
@if ($role->platform == 'Google') mdo @elseif ($role->platform == 'Whatsapp') mdo @elseif ($role->platform == 'Facebook') mdo @elseif ($role->platform == 'Email') mdo @elseif ($role->platform == 'Chat') mdo @elseif ($role->platform == 'Voice') mdo @elseif ($role->platform == 'Livechat') mdo @elseif ($role->platform == 'Instagram') mdo @elseif ($role->platform == 'Bot') mdo @elseif ($role->platform == 'Twitter') mdo @endif {{ $role->platform == "Twitter" ? "X-Twitter" : $role->platform }} @endforeach
@else - @endif
@if($agent->user->role[0]->name == "agent") @if($agent->AgentStatus->name =='logout') Logged out @else {{$agent->AgentStatus->name}} @endif @else - @endif 00:00:00 {{-- @if($loop->index == 0)--}} {{-- @endif--}} @if($agent->user->role[0]->name == "agent") {{ \App\Models\Tenant\Ticket::whereIn("status",["New","Redirect","Reopen","Pending"]) ->where(function ($q) use($agent) { $q->where('user_id',$agent->user_id)->orWhereIn('department_id',$agent->user->departments()->pluck('departments.id')->toArray()); })->count() }} @else - @endif @if($agent->user->role[0]->name == "agent") {{ \App\Models\Tenant\ResourceInfo::rightJoin('resources', 'resource_infos.resource_id', '=', 'resources.id') ->where(function ($query) { $query->where('resource_infos.channel', '=', 'Facebook') ->orWhere('resource_infos.channel', '=', 'Instagram') ->orWhere('resource_infos.channel', '=', 'Google') ->orWhere('resource_infos.channel', '=', 'Twitter'); }) ->whereIn('resources.status',['New',"Pending"]) ->where('resources.user_id',$agent->user_id) ->count() }} @else - @endif @if($agent->user->role[0]->name == "agent") {{ \App\Models\Tenant\ResourceInfo::rightJoin('resources', 'resource_infos.resource_id', '=', 'resources.id') ->where(function ($query) { $query->where('resource_infos.channel', '=', 'Email'); }) ->whereIn('resources.status',['New',"Pending"]) ->where('resources.user_id',$agent->user_id) ->count() }} @else - @endif @if($agent->user->role[0]->name == "agent") {{ \App\Models\Tenant\ResourceInfo::rightJoin('resources', 'resource_infos.resource_id', '=', 'resources.id') ->where(function ($query) { $query->where('resource_infos.channel', '=', 'Livechat') ->orWhere('resource_infos.channel', '=', 'Whatsapp'); }) ->whereIn('resources.status',['New',"Pending"]) ->where('resources.user_id',$agent->user_id) ->count() }} @else - @endif
There is no agent found
Socials in Queue

{{$returnSocials}}

Chats in Queue

{{$returnChats}}

Emails in Queue

{{$returnEmails}}

Tickets in Queue

{{$returnTickets}}

{{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- Average Handling Time Of All Agent--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}}
Statistics For All Agents

@forelse($status ?? [] as $sta)
{{$sta->name}} {{\App\Models\Tenant\AgentStatusAction::where('agent_status_id',$sta->id)->count()}}
@empty There is no status found @endforelse