@forelse ($tickets as $ticket) @php $colored = false; if ($ticket->status == "New") { //$overdue = \App\Models\Tenant\Distribution::where('department_id',$ticket->department_id)->first(); $category = $ticket->ticket->ticketCategories()->orderBy('id','desc')->first(); if ($category){ $overdue = \App\Models\Tenant\Distribution::where('category_id',$category->category_id)->first(); } else{ $overdue = false; } if ($overdue){ // Retrieve the current time $currentDateTime = \Carbon\Carbon::now(); $timestamp = $currentDateTime->timestamp; // Calculate the due time based on the creation time of the ticket and the SLA $created_at = \Carbon\Carbon::parse($ticket->created_at); $dueDateTime = $created_at->addMinutes((int) $overdue->sla_per_minuets); $timestamp2 = $dueDateTime->timestamp; // Add minutes to the created_at time if ($timestamp2 < $timestamp) { $colored = true; }else{ $colored = false; } } } @endphp
mdo {{ $ticket->ticket->ticketCustomer->display_name }}
@if($bulkUpdateStatus)
@endif @if ($ticket->comment) {{ \Illuminate\Support\Str::words($ticket->comment,5) }} @endif
#{{ $ticket->ticket_id }} {{ $ticket->created_at }}
@empty
No Data Found
@endforelse
@if($ticketsCount > $limit ) @endif