@if ($reportData != null)
@if($subDataType == "detaild") @foreach($levels as $level) @endforeach {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} @forelse($reportData as $ticket) @php $lastAction = $ticket->ticketActions()->where('department_id','!=',0)->latest()->first(); /* $NewAction = $ticket->ticketActions()->where('action','New Ticket')->first(); $RedirectAction = $ticket->ticketActions()->where('action','Redirect')->first(); $ResolveAction = $ticket->ticketActions()->where('action','Resolved')->first(); $ReopenAction = $ticket->ticketActions()->where('action','Reopen')->first(); $PendingAction = $ticket->ticketActions()->where('action','Reopen')->first(); $CloseAction = $ticket->ticketActions()->where('action','Closed')->first(); $categories = $ticket->ticketCategories()->where('ticket_action_id',$lastAction->id)->get();*/ @endphp {{-- @dd($categories)--}} {{-- --}} {{-- @endforeach --}} @forelse($ticket->ticketCategories()->limit($levels->count())->get() as $cat) @empty @endforelse {{--
Ticket ID Channel Type Customer Name Status Department Priority Country Language{{$level->label}}User DatePendingReopenRedirectClose
UserDateUserDateUserDateUserDateUserDateUserDate
{{$ticket->id}} {{$ticket->ticketInfo->channel}} {{$ticket->ticketInfo->type}} {{isset($ticket->ticketCustomer) ?$ticket->ticketCustomer->display_name : '-'}} {{$ticket->status}} {{$lastAction->department->name}} {{$ticket->ticketActions[0]->user->first_name}} {{$ticket->ticketInfo->priority}} {{$ticket->ticketInfo->country}} {{$ticket->ticketInfo->language}} --}} {{-- @foreach($categories as $category) {{$category->category->name}}{{$cat->category->name}}
--}} {{-- @foreach($ticket->ticketActions as $action)--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endforeach--}} {{--
--}} {{-- {{$ticket->ticketActions()->latest()->first()->action}}--}} {{-- {{$action->action}}--}} {{-- --}} {{-- {{$action->department_id !=0 ?$action->department->name :$action->user->first_name}}--}} {{--
--}} {{-- {{$ticket->ticketActions()->where('department_id','!=',0)->latest()->first()->department->name}}--}} {{----}} {{-- --}} {{$lastAction ? $lastAction->user != null ? $lastAction->user->first_name." " .$lastAction->user->last_name : "-" : " - "}} {{$lastAction ? $lastAction->updated_at->format('M d, y H:i:s') : " - "}} {{-- {{$NewAction ? $NewAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$NewAction ? $NewAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$ResolveAction ? $ResolveAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$ResolveAction ? $ResolveAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$PendingAction ? $PendingAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$PendingAction ? $PendingAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$ReopenAction ? $ReopenAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$ReopenAction ? $ReopenAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$RedirectAction ? $RedirectAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$RedirectAction ? $RedirectAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$CloseAction ? $CloseAction->user->first_name." " .$NewAction->user->last_name : " - "}}--}} {{-- {{$CloseAction ? $CloseAction->updated_at->format('M d, y H:i:s') : " - "}}--}} {{-- {{$ticket->status != 'New' ?$ticket->updated_at->format('M d, y H:i:s') : '-'}}--}} @empty There is no data found @endforelse @elseif($subDataType == "historical") @foreach($levels as $level) @endforeach {{-- @foreach($levels as $level)--}} {{-- --}} {{-- @endforeach--}} @forelse($reportData as $ticket) @foreach($ticket->ticketActions as $action) @forelse($ticket->ticketCategories()->limit($levels->count())->get() as $cat) @empty @endforelse {{-- @forelse($action->categories as $cat)--}} {{-- --}} {{-- @empty--}} {{-- @foreach($levels as $level)--}} {{-- --}} {{-- @endforeach--}} {{-- @endforelse--}} @endforeach @empty @endforelse
Ticket ID Channel Type Customer Name Status User Department Priority Country Language{{$level->label}}{{$level->label}}Comment Date
{{$ticket->id}} {{$ticket->ticketInfo->channel}} {{$ticket->ticketInfo->type}} {{isset($ticket->ticketCustomer) ?$ticket->ticketCustomer->display_name : '-'}} {{$action->action == "New Ticket"? "New": $action->action }} {{$action->user != null ? $action->user->first_name . " " .$action->user->last_name : "-"}} {{$action->department ? $action->department->name :"-"}} {{$ticket->ticketInfo->priority}} {{$ticket->ticketInfo->country}} {{$ticket->ticketInfo->language}} {{$cat->category->name}}{{$cat->category->name}}-{{$action->comment}} {{$action->created_at->format('M d, y H:i:s') }}
There is no data found
@endif
{{-- {{$reportData->links()}}--}} @else
no report select
@endif
Type

Sub Type

@if($subDataType != null)
Source

@if($subType != null)
@endif @endif