@php
$getUserRoleData = userRoleData();
$Tickets = explode(",",$getUserRoleData->Tickets);
$Lock_button=explode(",",$getUserRoleData->Lock_button);
@endphp
@if(count((array) $result['ticketsData'])>0)
@foreach ($result['ticketsData'] as $rsVal)
#{{ $rsVal->tickets_number }}
{{ $rsVal->subject }}
{{ $rsVal['tickets_categories']->name ?? '' }}
{{ $rsVal['tickets_sub_categories']->name ?? '' }}
@if(count((array) $rsVal['assigned_to_user'])>0){{ $rsVal['assigned_to_user']->first_name}} {{ $rsVal['assigned_to_user']->last_name}} @endif
@if(count((array) $rsVal['assigned_to_user_sub'])>0){{ $rsVal['assigned_to_user_sub']->first_name}} {{ $rsVal['assigned_to_user_sub']->last_name}} @endif
@if(count((array) $rsVal['updated_by'])>0){{ $rsVal['updated_by']->first_name}} {{ $rsVal['updated_by']->last_name}} @endif
{{ $rsVal['managed_by']->first_name. " ".$rsVal['managed_by']->last_name ?? '' }}
{{ $rsVal['tickets_prioritys']->name ?? '' }}
{{ $rsVal['tickets_status']->name ?? '' }}
{{ ($rsVal['schedule_date'] && $rsVal['schedule_date'] != "0000-00-00") ? date('d/m/Y h:i A', strtotime($rsVal['schedule_date'])) : '00/00/0000' }}
{{ date('d/m/Y h:i A', strtotime($rsVal->created_at))}}
@if (isset($rsVal['tickets_status']->name) && $rsVal['tickets_status']->name != "Closed")
@php
$created_at = new DateTime(date('Y-m-d', strtotime($rsVal->created_at)));
$updated_at = new DateTime(date('Y-m-d', strtotime($rsVal->updated_at)));
$current = new DateTime();
@endphp
Ageing:
{{ $created_at->diff($current)->days }} Days
@endif
{{ date('d/m/Y h:i A', strtotime($rsVal->updated_at))}}
@if (isset($rsVal['tickets_status']->name) && $rsVal['tickets_status']->name != "Closed")
Ageing:
{{ $updated_at->diff($current)->days }} Days
@endif
@if(in_array("Edit",$Tickets ) || in_array("Delete",$Tickets ))
@if(in_array("Edit",$Tickets ))
@endif
@if(in_array("View",$Tickets ))
@endif
@if(in_array("Delete",$Tickets ))
@endif
@if(in_array("Send", $Whats_icon))
@if(!empty($rsVal->accounts)
&& !empty($rsVal->accounts->products)
&& (!empty($rsVal->accounts->products->name)
&&
($rsVal->accounts->products->name == "Guru" || $rsVal->accounts->products->name == "Tashan" || $rsVal->accounts->products->name == "Brampton" || $rsVal->accounts->products->name == "Indian TV" || $rsVal->accounts->products->name == "Boss" || $rsVal->accounts->products->name == "Vois")))
@endif
@endif
@php
$currentDate = \Carbon\Carbon::now();
$null = null;
$dateCar = \Carbon\Carbon::parse($rsVal->callback_date.' '.$rsVal->callback_time);
@endphp
@if($rsVal->callback_date == $null)
@elseif($dateCar->lt($currentDate))
@elseif($dateCar->gt($currentDate))
@endif
@endif
@endforeach
{{ $result['ticketsData']->appends($_GET)->links() }}
@else
No record found
@endif