Apply fixes from StyleCI
This commit is contained in:

committed by
RafficMohammed

parent
ac7fc33df2
commit
e8f61f16d5
@@ -235,6 +235,7 @@ class AgentController extends Controller
|
||||
foreach ($requests as $req) {
|
||||
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
|
||||
}
|
||||
|
||||
//Todo For success and failure conditions
|
||||
try {
|
||||
if ($request->input('country_code') != '' or $request->input('country_code') != null) {
|
||||
@@ -304,6 +305,7 @@ class AgentController extends Controller
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
|
||||
// return random string
|
||||
return $randomString;
|
||||
}
|
||||
|
@@ -87,6 +87,7 @@ class BanlistController extends Controller
|
||||
$use->ban = $request->input('ban');
|
||||
$use->internal_note = $request->input('internal_note');
|
||||
$use->save();
|
||||
|
||||
// $user->create($request->input())->save();
|
||||
return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully'));
|
||||
} else {
|
||||
|
@@ -380,6 +380,7 @@ class EmailsController extends Controller
|
||||
}
|
||||
//dd($ex->getMessage());
|
||||
loging('mail-config', $message);
|
||||
|
||||
//Log::error($ex->getMessage());
|
||||
return $this->jsonResponse('fails', $message);
|
||||
}
|
||||
|
@@ -196,6 +196,7 @@ class FormController extends Controller
|
||||
//dd($form);
|
||||
if ($form) {
|
||||
$fields = $form->fields();
|
||||
|
||||
//dd($fields);
|
||||
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
|
||||
}
|
||||
@@ -215,6 +216,7 @@ class FormController extends Controller
|
||||
//dd($form);
|
||||
if ($form) {
|
||||
$fields = $form->fields();
|
||||
|
||||
//dd($fields);
|
||||
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
|
||||
}
|
||||
|
@@ -168,9 +168,11 @@ class GroupController extends Controller
|
||||
//Updating admin_notes field
|
||||
$adminNotes = $request->input('admin_notes');
|
||||
$var->admin_notes = $adminNotes;
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$var->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -198,9 +200,11 @@ class GroupController extends Controller
|
||||
}
|
||||
$group_assign_department->where('group_id', $id)->delete();
|
||||
$groups = $group->whereId($id)->first();
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$groups->delete();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
|
||||
} catch (Exception $e) {
|
||||
|
@@ -118,6 +118,7 @@ class HelptopicController extends Controller
|
||||
}
|
||||
/* Check whether function success or not */
|
||||
$topic->fill($request->except('custom_form', 'auto_assign'))->save();
|
||||
|
||||
// $topics->fill($request->except('custom_form','auto_assign'))->save();
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully'));
|
||||
@@ -192,6 +193,7 @@ class HelptopicController extends Controller
|
||||
->where('id', '=', 1)
|
||||
->update(['help_topic' => $id]);
|
||||
}
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -238,9 +240,11 @@ class HelptopicController extends Controller
|
||||
}
|
||||
$message = $ticket.$email;
|
||||
$topics = $topic->whereId($id)->first();
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$topics->delete();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message);
|
||||
} catch (Exception $e) {
|
||||
|
@@ -74,6 +74,7 @@ class SettingsController extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$companys = $company->whereId('1')->first();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
|
||||
} catch (Exception $e) {
|
||||
@@ -104,9 +105,11 @@ class SettingsController extends Controller
|
||||
if ($request->input('use_logo') == null) {
|
||||
$companys->use_logo = '0';
|
||||
}
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$companys->fill($request->except('logo'))->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -167,6 +170,7 @@ class SettingsController extends Controller
|
||||
$email_mandatory = $common_settings->select('status')
|
||||
->where('option_name', '=', 'email_mandatory')
|
||||
->first();
|
||||
|
||||
/* Direct to System Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory'));
|
||||
} catch (Exception $e) {
|
||||
@@ -215,6 +219,7 @@ class SettingsController extends Controller
|
||||
$sett->status = $itil;
|
||||
$sett->save();
|
||||
}
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -242,6 +247,7 @@ class SettingsController extends Controller
|
||||
$slas = $sla->get();
|
||||
/* Fetch the values from Help_topic table */
|
||||
$topics = $topic->get();
|
||||
|
||||
/* Direct to Ticket Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
|
||||
} catch (Exception $e) {
|
||||
@@ -276,6 +282,7 @@ class SettingsController extends Controller
|
||||
$tickets->collision_avoid = $request->input('collision_avoid');
|
||||
/* Check whether function success or not */
|
||||
$tickets->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -302,6 +309,7 @@ class SettingsController extends Controller
|
||||
$templates = $template->get();
|
||||
/* Fetch the values from Emails table */
|
||||
$emails1 = $email1->get();
|
||||
|
||||
/* Direct to Email Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
|
||||
} catch (Exception $e) {
|
||||
@@ -334,6 +342,7 @@ class SettingsController extends Controller
|
||||
$emails->attachment = $request->input('attachment');
|
||||
/* Check whether function success or not */
|
||||
$emails->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -435,6 +444,7 @@ class SettingsController extends Controller
|
||||
}
|
||||
$work->save();
|
||||
$this->saveConditions();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
|
||||
} catch (Exception $e) {
|
||||
@@ -455,6 +465,7 @@ class SettingsController extends Controller
|
||||
try {
|
||||
/* fetch the values of responder from responder table */
|
||||
$responders = $responder->whereId('1')->first();
|
||||
|
||||
/* Direct to Responder Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
|
||||
} catch (Exception $e) {
|
||||
@@ -484,6 +495,7 @@ class SettingsController extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$responders->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -504,6 +516,7 @@ class SettingsController extends Controller
|
||||
try {
|
||||
/* fetch the values of alert from alert table */
|
||||
$alerts = $alert->whereId('1')->first();
|
||||
|
||||
/* Direct to Alert Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
|
||||
} catch (Exception $e) {
|
||||
@@ -572,6 +585,7 @@ class SettingsController extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$alerts->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -615,6 +629,7 @@ class SettingsController extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$statuss = \DB::table('ticket_status')->get();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
|
||||
} catch (Exception $e) {
|
||||
@@ -635,6 +650,7 @@ class SettingsController extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$status = \DB::table('ticket_status')->where('id', '=', $id)->first();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status'));
|
||||
} catch (Exception $e) {
|
||||
@@ -667,6 +683,7 @@ class SettingsController extends Controller
|
||||
}
|
||||
$statuss->sort = $request->input('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -698,6 +715,7 @@ class SettingsController extends Controller
|
||||
}
|
||||
$statuss->sort = $request->input('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully'));
|
||||
} catch (Exception $ex) {
|
||||
@@ -718,6 +736,7 @@ class SettingsController extends Controller
|
||||
if ($id > 5) {
|
||||
/* fetch the values of company from company table */
|
||||
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted'));
|
||||
} else {
|
||||
|
@@ -109,6 +109,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$statuss = \DB::table('ticket_status')->get();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
|
||||
} catch (Exception $e) {
|
||||
@@ -141,6 +142,7 @@ class SettingsController2 extends Controller
|
||||
}
|
||||
$statuss->sort = Input::get('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been updated!');
|
||||
} catch (Exception $e) {
|
||||
@@ -164,6 +166,7 @@ class SettingsController2 extends Controller
|
||||
}
|
||||
$statuss->sort = Input::get('sort');
|
||||
$statuss->save();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been created!');
|
||||
// } catch (Exception $ex) {
|
||||
@@ -177,6 +180,7 @@ class SettingsController2 extends Controller
|
||||
if ($id > 5) {
|
||||
/* fetch the values of company from company table */
|
||||
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been deleted');
|
||||
} else {
|
||||
@@ -200,6 +204,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of company from company table */
|
||||
$companys = $company->whereId('1')->first();
|
||||
|
||||
/* Direct to Company Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
|
||||
} catch (Exception $e) {
|
||||
@@ -230,9 +235,11 @@ class SettingsController2 extends Controller
|
||||
if ($request->input('use_logo') == null) {
|
||||
$companys->use_logo = '0';
|
||||
}
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$companys->fill($request->except('logo'))->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getcompany')->with('success', 'Company Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -283,6 +290,7 @@ class SettingsController2 extends Controller
|
||||
$departments = $department->get();
|
||||
/* Fetch the values from Timezones table */
|
||||
$timezones = $timezone->get();
|
||||
|
||||
/* Direct to System Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time'));
|
||||
} catch (Exception $e) {
|
||||
@@ -308,6 +316,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$systems->fill($request->input())->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getsystem')->with('success', 'System Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -335,6 +344,7 @@ class SettingsController2 extends Controller
|
||||
$slas = $sla->get();
|
||||
/* Fetch the values from Help_topic table */
|
||||
$topics = $topic->get();
|
||||
|
||||
/* Direct to Ticket Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
|
||||
} catch (Exception $e) {
|
||||
@@ -369,6 +379,7 @@ class SettingsController2 extends Controller
|
||||
$tickets->collision_avoid = $request->input('collision_avoid');
|
||||
/* Check whether function success or not */
|
||||
$tickets->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getticket')->with('success', 'Ticket Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -395,6 +406,7 @@ class SettingsController2 extends Controller
|
||||
$templates = $template->get();
|
||||
/* Fetch the values from Emails table */
|
||||
$emails1 = $email1->get();
|
||||
|
||||
/* Direct to Email Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
|
||||
} catch (Exception $e) {
|
||||
@@ -427,6 +439,7 @@ class SettingsController2 extends Controller
|
||||
$emails->attachment = $request->input('attachment');
|
||||
/* Check whether function success or not */
|
||||
$emails->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getemail')->with('success', 'Email Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -485,6 +498,7 @@ class SettingsController2 extends Controller
|
||||
$emails->notification_cron = 0;
|
||||
}
|
||||
$emails->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
|
||||
} catch (Exception $e) {
|
||||
@@ -556,6 +570,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of responder from responder table */
|
||||
$responders = $responder->whereId('1')->first();
|
||||
|
||||
/* Direct to Responder Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
|
||||
} catch (Exception $e) {
|
||||
@@ -585,6 +600,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$responders->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getresponder')->with('success', 'Responder Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
@@ -605,6 +621,7 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
/* fetch the values of alert from alert table */
|
||||
$alerts = $alert->whereId('1')->first();
|
||||
|
||||
/* Direct to Alert Settings Page */
|
||||
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
|
||||
} catch (Exception $e) {
|
||||
@@ -673,6 +690,7 @@ class SettingsController2 extends Controller
|
||||
/* fill the values to coompany table */
|
||||
/* Check whether function success or not */
|
||||
$alerts->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('getalert')->with('success', 'Alert Updated Successfully');
|
||||
} catch (Exception $e) {
|
||||
|
@@ -45,6 +45,7 @@ class SlaController extends Controller
|
||||
try {
|
||||
/* Declare a Variable $slas to store all Values From Sla_plan Table */
|
||||
$slas = $sla->get();
|
||||
|
||||
/* Listing the values From Sla_plan Table */
|
||||
return view('themes.default1.admin.helpdesk.manage.sla.index', compact('slas'));
|
||||
} catch (Exception $e) {
|
||||
@@ -81,6 +82,7 @@ class SlaController extends Controller
|
||||
/* Fill the request values to Sla_plan Table */
|
||||
/* Check whether function success or not */
|
||||
$sla->fill($request->input())->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('sla')->with('success', Lang::get('lang.sla_plan_created_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -196,9 +198,11 @@ class SlaController extends Controller
|
||||
$message = $ticket.$dept.$topic;
|
||||
/* Delete a perticular field from the database by delete() using Id */
|
||||
$slas = Sla_plan::whereId($id)->first();
|
||||
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$slas->delete();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('sla')->with('success', Lang::get('lang.sla_plan_deleted_successfully').$message);
|
||||
} catch (Exception $e) {
|
||||
|
@@ -150,6 +150,7 @@ class TeamController extends Controller
|
||||
$users = DB::table('team_assign_agent')->select('team_assign_agent.id', 'team_assign_agent.team_id', 'users.user_name', 'users.first_name', 'users.last_name', 'users.active', 'users.assign_group', 'users.primary_dpt', 'users.role')
|
||||
->join('users', 'users.id', '=', 'team_assign_agent.agent_id')
|
||||
->where('team_assign_agent.team_id', '=', $id);
|
||||
|
||||
// ->get();
|
||||
// dd($users);
|
||||
return \Datatable::query($users)
|
||||
@@ -219,6 +220,7 @@ class TeamController extends Controller
|
||||
}
|
||||
// dd($a_id);
|
||||
$user = $user->whereIn('id', $a_id)->where('active', '=', 1)->orderBy('first_name')->get();
|
||||
|
||||
// dd($user);
|
||||
return view('themes.default1.admin.helpdesk.agent.teams.edit', compact('agent_id', 'user', 'teams'));
|
||||
} catch (Exception $e) {
|
||||
@@ -250,10 +252,12 @@ class TeamController extends Controller
|
||||
$alert = $request->input('assign_alert');
|
||||
$teams->assign_alert = $alert;
|
||||
$teams->save(); //saving check box
|
||||
|
||||
//updating whole field
|
||||
/* Check whether function success or not */
|
||||
try {
|
||||
$teams->fill($request->except('team_lead'))->save();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('teams')->with('success', Lang::get('lang.teams_updated_successfully'));
|
||||
} catch (Exception $e) {
|
||||
@@ -279,6 +283,7 @@ class TeamController extends Controller
|
||||
$tickets = DB::table('tickets')->where('team_id', '=', $id)->update(['team_id' => null]);
|
||||
/* Check whether function success or not */
|
||||
$teams->delete();
|
||||
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect('teams')->with('success', Lang::get('lang.teams_deleted_successfully'));
|
||||
} catch (Exception $e) {
|
||||
|
@@ -32,6 +32,7 @@ class ThreadController extends Controller
|
||||
$threads = $thread->get();
|
||||
/* get the values of priority from Priority Table */
|
||||
$priorities = $priority->get();
|
||||
|
||||
/* Direct to view page */
|
||||
return view('themes.default1.admin.helpdesk.tickets.ticket', compact('threads', 'priorities'));
|
||||
} catch (Exception $e) {
|
||||
|
@@ -18,6 +18,7 @@ class UrlSettingController extends Controller
|
||||
$url = $request->url();
|
||||
$www = $this->checkWWW($url);
|
||||
$https = $this->checkHTTP($url);
|
||||
|
||||
//dd($www, $https);
|
||||
try {
|
||||
return view('themes.default1.admin.helpdesk.settings.url.settings', compact('www', 'https'));
|
||||
|
Reference in New Issue
Block a user