@extends('themes.default1.agent.layout.agent') @section('Tickets') class="active" @stop @section('ticket-bar') active @stop @section('overdue') class="active" @stop @section('content') role == 'agent') { $dept = App\Model\helpdesk\Agent\Department::where('id','=',Auth::user()->primary_dpt)->first(); $tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20); } else { $tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20); } ?>

Overdue

{!! $tickets->total() !!} tickets
@if(Session::has('success'))
Success {{Session::get('success')}}
@endif @if(Session::has('fails'))
Fail! {{Session::get('fails')}}
@endif
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}

{!! $tickets->count().'-'.$tickets->total(); !!}

@foreach ($tickets as $ticket ) seen_by == null) {?> style="color:green;" sla; $SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first(); $time = $ticket->created_at; $time = date_create($time); date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period)); echo date_format($time, 'd/m/Y H:i:s'); ?> > id)->get(); $collab = count($collaborators); // title $title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first(); $string = strip_tags($title->title); // check atatchments $attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first(); $attach = count($attachments); if (strlen($string) > 40) { $stringCut = substr($string, 0, 40); $string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...'; } $TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id'); $TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first(); $LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first(); if($LastResponse->role == "user") { $rep = "#F39C12"; $username = $LastResponse->user_name; } else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name; if($LastResponse->first_name==null || $LastResponse->last_name==null) { $username = $LastResponse->user_name; }} $titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get(); $count = count($titles); foreach($titles as $title) { $title = $title; } $assigned_to = App\User::where('id','=',$ticket->assigned_to)->first(); if($assigned_to == null) { $assigned = "Unassigned"; } else { $assigned = $assigned_to->first_name ." ". $assigned_to->last_name; } ?> priority_id)->first();?> user_id)->first(); ?> @if($from->role == "user") @else @endif @endforeach
Subject Ticket ID Priority From Last Replier Assigned To Last Activity
{{$string}} ({!! $count!!}) @if($collab > 0) @endif @if($attach > 0) @endif #{!! $ticket->ticket_number !!} {{$priority->priority_desc}} {!! $from->user_name !!}{!! $from->first_name." ".$from->last_name !!}{!! $username !!} {!! $assigned !!} {!! UTC::usertimezone($title->updated_at) !!}
setPath(url('/ticket/overdue'))->render();?> 
{!! Form::close() !!}
@stop