| # |
Action |
Ticket ID |
Status |
Subject |
Department |
Query Type |
Generated By |
Assigned To |
Solved By |
@if(isSuperAdmin())
Process Time |
@endif
Priority |
Date |
@php
$serial = ($tickets->currentPage() - 1) * $tickets->perPage() + 1;
@endphp
@if ($tickets->isEmpty())
| No data found |
@else
@foreach($tickets as $key => $arr)
@php
$statusColors = [
'Open' => 'info',
'Pending' => 'warning',
'Hold' => 'danger'
];
$color = $statusColors[$arr->status] ?? 'success';
$priorityColors = [
'Low' => 'secondary',
'Medium' => 'warning',
'High' => 'danger'
];
$priorColor = $priorityColors[$arr->priority] ?? 'success';
// Convert addedOn and SolvedTime to Carbon instances
$addedOn = \Carbon\Carbon::parse($arr->addedOn);
$solvedTime = \Carbon\Carbon::parse($arr->SolvedTime);
$timeDifference = '';
$diffInDays = $addedOn->diffInDays($solvedTime);
$diffInHours = $addedOn->diffInHours($solvedTime);
$diffInMinutes = $addedOn->diffInMinutes($solvedTime);
if ($diffInDays > 0) {
$timeDifference = $diffInDays . ' days';
} elseif ($diffInHours > 0) {
$timeDifference = $diffInHours . ' hours';
} elseif ($diffInMinutes > 0) {
$timeDifference = $diffInMinutes . ' minutes';
}
@endphp
| {{$serial++}} |
|
{{$arr->ticketID}} |
{{$arr->status}} |
{{$arr->subject}} |
{{$arr->department}} |
{{$arr->queryType}} |
{{getUserNameById('users','userID',$arr->generatedBy,'displayName')}} |
{{getUserNameById('users','userID',$arr->assignTo,'displayName')}} |
{{getUserNameById('users','userID',$arr->solvedBy,'displayName')}} |
@if(isSuperAdmin())
{{ $timeDifference }} |
@endif
{{$arr->priority}} |
{{dftn($arr->addedOn)}} |
@endforeach
@endif
| # |
Action |
Ticket ID |
Status |
Subject |
Department |
Query Type |
Generated By |
Assigned To |
Solved By |
@if(isSuperAdmin())
Process Time |
@endif
Priority |
Date |
{{ $tickets->appends($queryParameters)->links('pagination::bootstrap-5') }}