Gather real-time data statistics and status updates on your agents.
|
@if($swap==0)
Agent
@else
|
Active On | Status | Time | Tickets | Social | Chats | ||||
|---|---|---|---|---|---|---|---|---|---|---|
@if($agent->user->role[0]->name == "agent")
@foreach($agent->user->agentRoles()->where("queue" ,">",0)->get() as $role)
@if ($role->platform == 'Google')
@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 | ||||||||||