diff --git a/app/Http/Controllers/Agent/helpdesk/OrganizationController.php b/app/Http/Controllers/Agent/helpdesk/OrganizationController.php index 5ab42060d..03a059a1f 100644 --- a/app/Http/Controllers/Agent/helpdesk/OrganizationController.php +++ b/app/Http/Controllers/Agent/helpdesk/OrganizationController.php @@ -107,14 +107,14 @@ class OrganizationController extends Controller
Organization
+ + + + {!! Lang::get('lang.edit') !!} + + +{!! Lang::get('lang.name') !!} | @@ -112,9 +195,9 @@ class="active"{!! $user_detail->email !!} | {!! $user_detail->phone_number !!} | @if($user_detail->active == 1) -{!! Lang::get('lang.active') !!} | +{!! Lang::get('lang.active') !!} | @elseif($user_detail->active == 0) -{!! Lang::get('lang.inactive') !!} | +{!! Lang::get('lang.inactive') !!} | @endif{!! $user_detail->ban !!} |
---|
- | -{!! Lang::get('lang.subject') !!} | -{!! Lang::get('lang.ticket_id') !!} | -{!! Lang::get('lang.priority') !!} | -{!! Lang::get('lang.last_replier') !!} | -{!! Lang::get('lang.assigned_to') !!} | -{!! Lang::get('lang.last_activity') !!} | - - - where('status', '=', '1')->orderBy('id', 'DESC')->paginate(20); ?> - @foreach ($tickets as $ticket) -
---|---|---|---|---|---|---|
- 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)->count(); - $attach = $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; + | {{$string}} ({!! $count!!}) - @if($collab > 0) @endif - @if($attach > 0) @endif | -#{!! $ticket->ticket_number !!} | - priority_id)->first(); ?> -@if($priority != null) |
- user_id)->first(); ?>
- {!! $username !!} | -{!! $assigned !!} | -{!! UTC::usertimezone($title->updated_at) !!} | -
Loading...
+ ++ | +{!! Lang::get('lang.subject') !!} | +{!! Lang::get('lang.ticket_id') !!} | +{!! Lang::get('lang.priority') !!} | +{!! Lang::get('lang.last_replier') !!} | +{!! Lang::get('lang.assigned_to') !!} | +{!! Lang::get('lang.last_activity') !!} | + + + where('status', '=', '1')->orderBy('id', 'DESC')->paginate(20); ?> + @foreach ($tickets as $ticket) +
---|---|---|---|---|---|---|
+ 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)->count(); + $attach = $attachments; - {{-- end deleted tickets --}} - - - | {{$string}} ({!! $count!!}) + @if($collab > 0) @endif + @if($attach > 0) @endif | +#{!! $ticket->ticket_number !!} | + priority_id)->first(); ?> +@if($priority != null) |
+ user_id)->first(); ?>
+ {!! $username !!} | +{!! $assigned !!} | +{!! UTC::usertimezone($title->updated_at) !!} | +
Loading...
- -- | -{!! Lang::get('lang.subject') !!} | -{!! Lang::get('lang.ticket_id') !!} | -{!! Lang::get('lang.priority') !!} | -{!! Lang::get('lang.last_replier') !!} | -{!! Lang::get('lang.assigned_to') !!} | -{!! Lang::get('lang.last_activity') !!} | - - - where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20); ?> - @foreach ($tickets as $ticket) -
---|---|---|---|---|---|---|
+ + | {{$string}} ({!! $count!!}) - @if($collab > 0) @endif - @if($attach > 0) @endif | -#{!! $ticket->ticket_number !!} | - priority_id)->first(); ?> -@if($priority != null) |
- user_id)->first(); ?>
- {!! $username !!} | -{!! $assigned !!} | -{!! UTC::usertimezone($title->updated_at) !!} | -
Loading...
+ ++ | +{!! Lang::get('lang.subject') !!} | +{!! Lang::get('lang.ticket_id') !!} | +{!! Lang::get('lang.priority') !!} | +{!! Lang::get('lang.last_replier') !!} | +{!! Lang::get('lang.assigned_to') !!} | +{!! Lang::get('lang.last_activity') !!} | + + + where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20); ?> + @foreach ($tickets as $ticket) +
---|---|---|---|---|---|---|
+ 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(); + // dd($attachments); + $attach = ($attachments) ? count($attachments->toArray()): 0; - | {{$string}} ({!! $count!!}) + @if($collab > 0) @endif + @if($attach > 0) @endif | +#{!! $ticket->ticket_number !!} | + priority_id)->first(); ?> +@if($priority != null) |
+ user_id)->first(); ?>
+ {!! $username !!} | +{!! $assigned !!} | +{!! UTC::usertimezone($title->updated_at) !!} | +
Loading...
+ ++ | +{!! Lang::get('lang.subject') !!} | +{!! Lang::get('lang.ticket_id') !!} | +{!! Lang::get('lang.priority') !!} | +{!! Lang::get('lang.last_replier') !!} | +{!! Lang::get('lang.assigned_to') !!} | +{!! Lang::get('lang.last_activity') !!} | + + + where('status', '=', '5')->orderBy('id', 'DESC')->paginate(20); ?> + @foreach ($tickets as $ticket) +
---|---|---|---|---|---|---|
+ 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)->count(); + $attach = $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; + } + ?> + | {{$string}} ({!! $count!!}) + @if($collab > 0) @endif + @if($attach > 0) @endif | +#{!! $ticket->ticket_number !!} | + priority_id)->first(); ?> +@if($priority != null) |
+ user_id)->first(); ?>
+ {!! $username !!} | +{!! $assigned !!} | +{!! UTC::usertimezone($title->updated_at) !!} | +
Loading...
- -- | -{!! Lang::get('lang.subject') !!} | -{!! Lang::get('lang.ticket_id') !!} | -{!! Lang::get('lang.priority') !!} | -{!! Lang::get('lang.last_replier') !!} | -{!! Lang::get('lang.assigned_to') !!} | -{!! Lang::get('lang.last_activity') !!} | - - - where('status', '=', '5')->orderBy('id', 'DESC')->paginate(20); ?> - @foreach ($tickets as $ticket) -
---|---|---|---|---|---|---|
- 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)->count(); - $attach = $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; - } - ?> - | {{$string}} ({!! $count!!}) - @if($collab > 0) @endif - @if($attach > 0) @endif | -#{!! $ticket->ticket_number !!} | - priority_id)->first(); ?> -@if($priority != null) |
- user_id)->first(); ?>
- {!! $username !!} | -{!! $assigned !!} | -{!! UTC::usertimezone($title->updated_at) !!} | -