diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php index 722f1495b..cbc8300be 100644 --- a/app/Http/Controllers/Agent/helpdesk/TicketController.php +++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php @@ -1124,23 +1124,28 @@ class TicketController extends Controller $ticket->source = $source; $ticket_status = $this->checkUserVerificationStatus(); //dd($ticket_status); - if ($ticket_status == 0) { - //check if user active then allow ticket creation else create unverified ticket - if ($user_status->active == 1) { - if ($status == null) { - $ticket->status = 1; - } else { - $ticket->status = $status; - } - } else { - $ticket->status = 6; - } + // if ($ticket_status == 0) { + // //check if user active then allow ticket creation else create unverified ticket + // if ($user_status->active == 1) { + // if ($status == null) { + // $ticket->status = 1; + // } else { + // $ticket->status = $status; + // } + // } else { + // $ticket->status = 6; + // } + // } else { + // if ($status == null) { + // $ticket->status = 1; + // } else { + // $ticket->status = $status; + // } + // } + if ($status == null) { + $ticket->status = 1; } else { - if ($status == null) { - $ticket->status = 1; - } else { - $ticket->status = $status; - } + $ticket->status = $status; } $ticket->save(); @@ -2537,7 +2542,8 @@ class TicketController extends Controller return $prio; }) ->addColumn('from', function ($ticket) { - $from = DB::table('users')->select('user_name', 'first_name', 'last_name')->where('id', '=', $ticket->user_id)->first(); + $verify = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first(); + $from = DB::table('users')->select('user_name', 'first_name', 'last_name', 'active')->where('id', '=', $ticket->user_id)->first(); $url = route('user.show', $ticket->user_id); $name = ''; if ($from) { @@ -2547,8 +2553,13 @@ class TicketController extends Controller $name = $from->user_name; } } - - return "user_name).'''.Lang::get('lang.see-profile2')."'>".ucfirst(str_limit($name, 30)).''; + $color = ""; + if($verify->status == 1 || $verify->status == '1') { + if($from->active == 0 || $from->active == '0') { + $color = ""; + } + } + return "user_name).'''.Lang::get('lang.see-profile2')."'>".ucfirst(str_limit($name, 30)).' '.$color.''; }) // ->addColumn('Last Replier', function ($ticket) { // $TicketData = Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');