@@ -8,7 +8,6 @@ |
||
8 | 8 | use App\Http\Requests\helpdesk\BanlistRequest; |
9 | 9 | use App\Http\Requests\helpdesk\BanRequest; |
10 | 10 | // model |
11 | -use App\Model\helpdesk\Email\Banlist; |
|
12 | 11 | use App\User; |
13 | 12 | //classes |
14 | 13 | use Exception; |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use App\Model\helpdesk\Agent\Teams; |
15 | 15 | use App\Model\helpdesk\Email\Emails; |
16 | 16 | use App\Model\helpdesk\Email\Template; |
17 | -use App\Model\helpdesk\Manage\Help_topic; |
|
18 | 17 | use App\Model\helpdesk\Manage\Sla_plan; |
19 | 18 | use App\Model\helpdesk\Settings\System; |
20 | 19 | use App\Model\helpdesk\Ticket\Tickets; |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use Exception; |
16 | 16 | // classes |
17 | 17 | use Illuminate\Http\Request; |
18 | -use Illuminate\Support\Facades\Input; |
|
19 | 18 | use Lang; |
20 | 19 | |
21 | 20 | /** |
@@ -7,7 +7,6 @@ |
||
7 | 7 | // requests |
8 | 8 | use App\Http\Controllers\Controller; |
9 | 9 | //supports |
10 | -use App\Http\Requests; |
|
11 | 10 | use Config; |
12 | 11 | //classes |
13 | 12 | use File; |
@@ -82,27 +82,27 @@ discard block |
||
82 | 82 | public function getLanguages() |
83 | 83 | { |
84 | 84 | $path = base_path('resources/lang'); |
85 | - $values = scandir($path); //Extracts names of directories present in lang directory |
|
85 | + $values = scandir($path); //Extracts names of directories present in lang directory |
|
86 | 86 | $values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..' |
87 | 87 | return \Datatable::collection(new Collection($values)) |
88 | - ->addColumn('language', function ($model) { |
|
88 | + ->addColumn('language', function($model) { |
|
89 | 89 | if ($model == Config::get('app.fallback_locale')) { |
90 | 90 | return Config::get('languages.'.$model).' ('.Lang::get('lang.default').')'; |
91 | 91 | } else { |
92 | 92 | return Config::get('languages.'.$model); |
93 | 93 | } |
94 | 94 | }) |
95 | - ->addColumn('id', function ($model) { |
|
95 | + ->addColumn('id', function($model) { |
|
96 | 96 | return $model; |
97 | 97 | }) |
98 | - ->addColumn('status', function ($model) { |
|
98 | + ->addColumn('status', function($model) { |
|
99 | 99 | if (Lang::getLocale() === $model) { |
100 | 100 | return "<span style='color:green'>".Lang::trans('lang.active').'</span>'; |
101 | 101 | } else { |
102 | 102 | return "<span style='color:red'>".Lang::trans('lang.inactive').'</span>'; |
103 | 103 | } |
104 | 104 | }) |
105 | - ->addColumn('Action', function ($model) { |
|
105 | + ->addColumn('Action', function($model) { |
|
106 | 106 | if (Lang::getLocale() === $model) { |
107 | 107 | return "<a href='change-language/".$model."'><input type='button' class='btn btn-info btn-xs btn-flat' disabled value='".Lang::trans('lang.disable')."'/></a> |
108 | 108 | <a href='change-language/".$model."' class='btn btn-danger btn-xs btn-flat' disabled><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>'; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | { |
228 | 228 | if ($lang !== App::getLocale()) { |
229 | 229 | if ($lang !== Config::get('app.fallback_locale')) { |
230 | - $deletePath = base_path('resources/lang').'/'.$lang; //define file path to delete |
|
230 | + $deletePath = base_path('resources/lang').'/'.$lang; //define file path to delete |
|
231 | 231 | $success = File::deleteDirectory($deletePath); //remove extracted folder and it's subfolder from lang |
232 | 232 | if ($success) { |
233 | 233 | //sending back with success message |
@@ -10,17 +10,14 @@ |
||
10 | 10 | use App\Http\Requests\helpdesk\PriorityRequest; |
11 | 11 | // models |
12 | 12 | use App\Model\helpdesk\Email\Emails; |
13 | -use App\Model\helpdesk\Manage\Help_topic; |
|
14 | 13 | use App\Model\helpdesk\Settings\CommonSettings; |
15 | 14 | use App\Model\helpdesk\Settings\Email; |
16 | 15 | use App\Model\helpdesk\Ticket\Ticket_Priority; |
17 | -use Auth; |
|
18 | 16 | use DB; |
19 | 17 | use Exception; |
20 | 18 | // classes |
21 | 19 | use Illuminate\Http\Request; |
22 | 20 | use Illuminate\support\Collection; |
23 | -use Input; |
|
24 | 21 | use Lang; |
25 | 22 | |
26 | 23 | /** |
@@ -79,10 +79,10 @@ discard block |
||
79 | 79 | |
80 | 80 | return \Datatable::Collection($tickets) |
81 | 81 | ->showColumns('priority', 'priority_desc') |
82 | - ->addColumn('priority_color', function ($model) { |
|
82 | + ->addColumn('priority_color', function($model) { |
|
83 | 83 | return "<button class='btn' style = 'background-color:$model->priority_color'></button>"; |
84 | 84 | }) |
85 | - ->addColumn('status', function ($model) { |
|
85 | + ->addColumn('status', function($model) { |
|
86 | 86 | if ($model->status == 1) { |
87 | 87 | return "<a style='color:green'>active</a>"; |
88 | 88 | } elseif ($model->status == 0) { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return "<a style='color:red'>inactive</a>"; |
93 | 93 | } |
94 | 94 | }) |
95 | - ->addColumn('action', function ($model) { |
|
95 | + ->addColumn('action', function($model) { |
|
96 | 96 | if ($model->is_default > 0) { |
97 | 97 | return '<a href='.url('ticket/priority/'.$model->priority_id.'/edit')." class='btn btn-info btn-xs' disabled='disabled'>Edit</a> <a href=".url('ticket/priority/'.$model->priority_id.'/destroy')." class='btn btn-warning btn-info btn-xs' disabled='disabled' > delete </a>"; |
98 | 98 | } else { |
@@ -8,9 +8,7 @@ |
||
8 | 8 | use App\Http\Requests\helpdesk\SecurityRequest; |
9 | 9 | use App\Model\helpdesk\Settings\Security; |
10 | 10 | // Request |
11 | -use Illuminate\Http\Request; |
|
12 | 11 | // Class |
13 | -use Input; |
|
14 | 12 | use Lang; |
15 | 13 | use Redirect; |
16 | 14 |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use App\Http\Requests\helpdesk\CannedUpdateRequest; |
10 | 10 | // model |
11 | 11 | use App\Model\helpdesk\Agent_panel\Canned; |
12 | -use App\User; |
|
13 | 12 | // classes |
14 | 13 | use Exception; |
15 | 14 | use Lang; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | // controllers |
6 | 6 | use App\Http\Controllers\Controller; |
7 | 7 | // models |
8 | -use App\User; |
|
9 | 8 | // classes |
10 | 9 | use Auth; |
11 | 10 | use DB; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use App\Http\Controllers\Agent\helpdesk\TicketController; |
6 | 6 | use App\Http\Controllers\Controller; |
7 | 7 | use App\Model\helpdesk\Filters\Filter; |
8 | -use App\Model\helpdesk\Filters\Label; |
|
9 | 8 | use App\Model\helpdesk\Ticket\Tickets; |
10 | 9 | use Auth; |
11 | 10 | use DB; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $render = false; |
36 | 36 | if (is_array($labels) && count($labels) > 0) { |
37 | 37 | $table = $table |
38 | - ->leftJoin('filters as label', function ($join) { |
|
38 | + ->leftJoin('filters as label', function($join) { |
|
39 | 39 | $join->on('tickets.id', '=', 'label.ticket_id') |
40 | 40 | ->where('label.key', '=', 'label'); |
41 | 41 | }) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | if (is_array($tags) && count($tags) > 0) { |
45 | 45 | $table = $table |
46 | - ->leftJoin('filters as tag', function ($join) { |
|
46 | + ->leftJoin('filters as tag', function($join) { |
|
47 | 47 | $join->on('tickets.id', '=', 'tag.ticket_id') |
48 | 48 | ->where('tag.key', '=', 'tag'); |
49 | 49 | }) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $filter = new Filter(); |
62 | 62 | $query = $filter->where('key', $key) |
63 | - ->where(function ($query) use ($labels) { |
|
63 | + ->where(function($query) use ($labels) { |
|
64 | 64 | if (is_array($labels) && count($labels) > 0) { |
65 | 65 | for ($i = 0; $i < count($labels); $i++) { |
66 | 66 | $query->orWhere('value', 'LIKE', '%'.$labels[$i].'%'); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | return $table |
90 | - ->Join('ticket_status', function ($join) { |
|
90 | + ->Join('ticket_status', function($join) { |
|
91 | 91 | $join->on('ticket_status.id', '=', 'tickets.status') |
92 | 92 | ->whereIn('ticket_status.id', [1, 7]); |
93 | 93 | }); |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | return $table |
101 | - ->Join('ticket_status', function ($join) { |
|
101 | + ->Join('ticket_status', function($join) { |
|
102 | 102 | $join->on('ticket_status.id', '=', 'tickets.status') |
103 | 103 | ->whereIn('ticket_status.state', ['closed']); |
104 | 104 | }); |
105 | 105 | case '/ticket/myticket': |
106 | 106 | return $table |
107 | - ->leftJoin('ticket_status', function ($join) { |
|
107 | + ->leftJoin('ticket_status', function($join) { |
|
108 | 108 | $join->on('ticket_status.id', '=', 'tickets.status'); |
109 | 109 | }) |
110 | 110 | ->orWhere('tickets.assigned_to', '=', Auth::user()->id) |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | return $table |
119 | - ->leftJoin('ticket_status', function ($join) { |
|
119 | + ->leftJoin('ticket_status', function($join) { |
|
120 | 120 | $join->on('ticket_status.id', '=', 'tickets.status'); |
121 | 121 | }) |
122 | 122 | ->where('tickets.assigned_to', '=', null) |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | |
130 | 130 | return $table |
131 | - ->leftJoin('ticket_status', function ($join) { |
|
131 | + ->leftJoin('ticket_status', function($join) { |
|
132 | 132 | $join->on('ticket_status.id', '=', 'tickets.status'); |
133 | 133 | }) |
134 | 134 | ->where('tickets.status', '=', 1) |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | |
147 | 147 | return $table |
148 | - ->Join('ticket_status', function ($join) { |
|
148 | + ->Join('ticket_status', function($join) { |
|
149 | 149 | $join->on('ticket_status.id', '=', 'tickets.status') |
150 | 150 | ->where('tickets.status', '=', 7); |
151 | 151 | }); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | return $table |
160 | - ->Join('ticket_status', function ($join) { |
|
160 | + ->Join('ticket_status', function($join) { |
|
161 | 161 | $join->on('ticket_status.id', '=', 'tickets.status') |
162 | 162 | ->where('tickets.status', '=', 5); |
163 | 163 | }); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | return $table |
172 | - ->Join('ticket_status', function ($join) { |
|
172 | + ->Join('ticket_status', function($join) { |
|
173 | 173 | $join->on('ticket_status.id', '=', 'tickets.status') |
174 | 174 | ->where('tickets.status', '=', 1) |
175 | 175 | ->where('tickets.isanswered', '=', 1); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | return $table |
184 | - ->leftJoin('ticket_status', function ($join) { |
|
184 | + ->leftJoin('ticket_status', function($join) { |
|
185 | 185 | $join->on('ticket_status.id', '=', 'tickets.status'); |
186 | 186 | }) |
187 | 187 | ->where('tickets.assigned_to', '>', 0) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | return $table |
196 | - ->leftJoin('ticket_status', function ($join) { |
|
196 | + ->leftJoin('ticket_status', function($join) { |
|
197 | 197 | $join->on('ticket_status.id', '=', 'tickets.status'); |
198 | 198 | }) |
199 | 199 | ->where('isanswered', '=', 0) |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | return $table |
208 | - ->leftJoin('ticket_status', function ($join) { |
|
208 | + ->leftJoin('ticket_status', function($join) { |
|
209 | 209 | $join->on('ticket_status.id', '=', 'tickets.status'); |
210 | 210 | }) |
211 | 211 | ->where('tickets.status', '=', 1) |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | } |
221 | 221 | |
222 | 222 | return $table |
223 | - ->leftJoin('ticket_status', function ($join) { |
|
223 | + ->leftJoin('ticket_status', function($join) { |
|
224 | 224 | $join->on('ticket_status.id', '=', 'tickets.status'); |
225 | 225 | }) |
226 | 226 | ->where('tickets.status', '=', 1) |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | // if (Auth::user()->role == 'admin') { |
235 | 235 | $ticket = new Tickets(); |
236 | 236 | $tickets = $ticket |
237 | - ->leftJoin('ticket_thread', function ($join) { |
|
237 | + ->leftJoin('ticket_thread', function($join) { |
|
238 | 238 | $join->on('tickets.id', '=', 'ticket_thread.ticket_id') |
239 | 239 | ->whereNotNull('title') |
240 | 240 | ->where('ticket_thread.is_internal', '<>', 1); |