Bug-fix-patch-1
# unverifeied user tickets issue(now showing tickets in inbox and concating exclaimation marks on user name if account not verified)
This commit is contained in:
@@ -1124,24 +1124,29 @@ 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 ($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 {
|
||||
$ticket->status = $status;
|
||||
}
|
||||
} else {
|
||||
$ticket->status = 6;
|
||||
}
|
||||
} else {
|
||||
if ($status == null) {
|
||||
$ticket->status = 1;
|
||||
} else {
|
||||
$ticket->status = $status;
|
||||
}
|
||||
}
|
||||
$ticket->save();
|
||||
|
||||
$sla_plan = Sla_plan::where('id', '=', $sla)->first();
|
||||
@@ -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 "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($from->user_name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".ucfirst(str_limit($name, 30)).'</span></a>';
|
||||
$color = "";
|
||||
if($verify->status == 1 || $verify->status == '1') {
|
||||
if($from->active == 0 || $from->active == '0') {
|
||||
$color = "<i class='fa fa-exclamation-triangle'></i>";
|
||||
}
|
||||
}
|
||||
return "<a href='".$url."' title='".Lang::get('lang.see-profile1').' '.ucfirst($from->user_name).'''.Lang::get('lang.see-profile2')."'><span style='color:#508983'>".ucfirst(str_limit($name, 30)).' <span style="color:#f75959">'.$color.'</span></span></a>';
|
||||
})
|
||||
// ->addColumn('Last Replier', function ($ticket) {
|
||||
// $TicketData = Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');
|
||||
|
Reference in New Issue
Block a user