diff --git a/app/Http/ViewComposers/AgentLayout.php b/app/Http/ViewComposers/AgentLayout.php index f25b6510e..df04bf23d 100644 --- a/app/Http/ViewComposers/AgentLayout.php +++ b/app/Http/ViewComposers/AgentLayout.php @@ -143,15 +143,16 @@ class AgentLayout public function inbox() { - $ticket = $this->tickets(); - if ($this->auth->role == 'admin') { - return $ticket->whereIn('status', [1, 7])->select('id'); - } elseif ($this->auth->role == 'agent') { - return $ticket->whereIn('status', [1, 7]) - ->where('dept_id', '=', $this->auth->primary_dpt) - ->orWhere('assigned_to', '=', Auth::user()->id) - ->select('id'); + $table = $this->tickets(); + if (Auth::user()->role == 'agent') { + $id = Auth::user()->primary_dpt; + $table = $table->where('tickets.dept_id', '=', $id)->orWhere('assigned_to', '=', Auth::user()->id); } + + return $table->Join('ticket_status', function ($join) { + $join->on('ticket_status.id', '=', 'tickets.status') + ->whereIn('ticket_status.id', [1, 7]); + }); } public function overdues() diff --git a/resources/lang/de/lang.php b/resources/lang/de/lang.php index 1fd3b883e..e2d90f32e 100644 --- a/resources/lang/de/lang.php +++ b/resources/lang/de/lang.php @@ -1144,5 +1144,6 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index 84cb89d7c..d96b13e49 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -1581,5 +1581,6 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/fr/lang.php b/resources/lang/fr/lang.php index d559da919..2df9999b9 100644 --- a/resources/lang/fr/lang.php +++ b/resources/lang/fr/lang.php @@ -1552,5 +1552,6 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/it/lang.php b/resources/lang/it/lang.php index 1eac60dcb..40bb8faaf 100644 --- a/resources/lang/it/lang.php +++ b/resources/lang/it/lang.php @@ -1104,4 +1104,5 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/nl/lang.php b/resources/lang/nl/lang.php index 852f5973e..34c6e13ce 100644 --- a/resources/lang/nl/lang.php +++ b/resources/lang/nl/lang.php @@ -1597,5 +1597,6 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/pt/lang.php b/resources/lang/pt/lang.php index 1e32a29ac..fed5c3db7 100644 --- a/resources/lang/pt/lang.php +++ b/resources/lang/pt/lang.php @@ -1542,5 +1542,6 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/lang/ru/lang.php b/resources/lang/ru/lang.php index 8bded83eb..df3ffe5c0 100644 --- a/resources/lang/ru/lang.php +++ b/resources/lang/ru/lang.php @@ -1051,4 +1051,5 @@ return [ 'user-account-is-deleted' => 'This user account has been deleted.', 'restore-user' => 'Restore user account', 'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.', + 'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.', ]; diff --git a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php index 45c4662b0..fbec57e1b 100644 --- a/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php +++ b/resources/views/themes/default1/client/helpdesk/ckeckticket.blade.php @@ -364,18 +364,27 @@ alert(h+20);