Apply fixes from StyleCI
This commit is contained in:

committed by
StyleCI Bot

parent
4ec6000d69
commit
c547b2e438
@@ -271,10 +271,12 @@ class AgentController extends Controller
|
||||
$team_assign_agent = $team_assign_agent->where('agent_id', $id);
|
||||
$team_assign_agent->delete();
|
||||
$user = $user->whereId($id)->first();
|
||||
|
||||
try {
|
||||
$error = Lang::get('lang.this_staff_is_related_to_some_tickets');
|
||||
$user->id;
|
||||
$user->delete();
|
||||
|
||||
throw new \Exception($error);
|
||||
return redirect('agents')->with('success', Lang::get('lang.agent_deleted_sucessfully'));
|
||||
} catch (\Exception $e) {
|
||||
|
@@ -428,6 +428,7 @@ class EmailsController extends Controller
|
||||
return redirect('emails')->with('fails', Lang::get('lang.you_cannot_delete_system_default_email'));
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// fetching the database instance of the current email
|
||||
$emails = $email->whereId($id)->first();
|
||||
|
@@ -106,6 +106,7 @@ class FormController extends Controller
|
||||
|
||||
return view('themes.default1.admin.helpdesk.manage.form.preview', compact('form', 'fields'));
|
||||
}
|
||||
|
||||
throw new Exception("Sorry we can't find your request");
|
||||
} catch (Exception $ex) {
|
||||
return redirect()->back()->with('fails', $ex->getMessage());
|
||||
@@ -125,6 +126,7 @@ class FormController extends Controller
|
||||
'name.*' => 'required',
|
||||
'type.*' => 'required',
|
||||
]);
|
||||
|
||||
try {
|
||||
$forms = new Forms();
|
||||
$require = Input::get('required');
|
||||
@@ -195,6 +197,7 @@ class FormController extends Controller
|
||||
//dd($fields);
|
||||
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
|
||||
}
|
||||
|
||||
throw new Exception("Sorry we can't find your request");
|
||||
} catch (Exception $ex) {
|
||||
return redirect()->back()->with('fails', $ex->getMessage());
|
||||
@@ -213,6 +216,7 @@ class FormController extends Controller
|
||||
//dd($fields);
|
||||
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
|
||||
}
|
||||
|
||||
throw new Exception("Sorry we can't find your request");
|
||||
} catch (Exception $ex) {
|
||||
return redirect()->back()->with('fails', $ex->getMessage());
|
||||
@@ -227,6 +231,7 @@ class FormController extends Controller
|
||||
'name.*' => 'required',
|
||||
'type.*' => 'required',
|
||||
]);
|
||||
|
||||
try {
|
||||
if (!$request->input('formname')) {
|
||||
throw new Exception(Lang::get('lang.please_fill_form_name'));
|
||||
@@ -391,6 +396,7 @@ class FormController extends Controller
|
||||
public function addChild($fieldid, Request $request)
|
||||
{
|
||||
$ids = $request->except('_token');
|
||||
|
||||
try {
|
||||
foreach ($ids as $valueid => $formid) {
|
||||
$field_value = new \App\Model\helpdesk\Form\FieldValue();
|
||||
|
@@ -46,7 +46,7 @@ class PriorityController extends Controller
|
||||
$user_status = CommonSettings::where('option_name', '=', 'user_priority')->first();
|
||||
// dd( $user_status);
|
||||
|
||||
return view('themes.default1.admin.helpdesk.manage.ticket_priority.index', compact('user_status'));
|
||||
return view('themes.default1.admin.helpdesk.manage.ticket_priority.index', compact('user_status'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -172,7 +172,7 @@ class PriorityController extends Controller
|
||||
public function destroy($priority_id)
|
||||
{
|
||||
$default_priority = Ticket_Priority::where('is_default', '>', '0')->first();
|
||||
// dd($default_priority->is_default);
|
||||
// dd($default_priority->is_default);
|
||||
$topic = DB::table('help_topic')->where('priority', '=', $priority_id)->update(['priority' => $default_priority->is_default]);
|
||||
// if ($topic > 0) {
|
||||
// if ($topic > 1) {
|
||||
|
@@ -150,8 +150,8 @@ class SettingsController2 extends Controller
|
||||
public function createStatuses(\App\Model\helpdesk\Ticket\Ticket_Status $statuss)
|
||||
{
|
||||
// try {
|
||||
/* fetch the values of company from company table */
|
||||
$statuss->name = Input::get('name');
|
||||
/* fetch the values of company from company table */
|
||||
$statuss->name = Input::get('name');
|
||||
$statuss->icon_class = Input::get('icon_class');
|
||||
$statuss->email_user = Input::get('email_user');
|
||||
$statuss->sort = Input::get('sort');
|
||||
@@ -164,7 +164,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!');
|
||||
return redirect()->back()->with('success', 'Status has been created!');
|
||||
// } catch (Exception $ex) {
|
||||
// return redirect()->back()->with('fails', $ex->errorInfo[2]);
|
||||
// }
|
||||
@@ -175,9 +175,9 @@ class SettingsController2 extends Controller
|
||||
try {
|
||||
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');
|
||||
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
|
||||
/* Direct to Company Settings Page */
|
||||
return redirect()->back()->with('success', 'Status has been deleted');
|
||||
} else {
|
||||
return redirect()->back()->with('failed', 'You cannot delete this status');
|
||||
}
|
||||
@@ -446,12 +446,12 @@ class SettingsController2 extends Controller
|
||||
public function getSchedular(Email $email, Template $template, Emails $email1)
|
||||
{
|
||||
// try {
|
||||
/* fetch the values of email from Email table */
|
||||
$emails = $email->whereId('1')->first();
|
||||
/* Fetch the values from Template table */
|
||||
$templates = $template->get();
|
||||
/* Fetch the values from Emails table */
|
||||
$emails1 = $email1->get();
|
||||
/* fetch the values of email from Email table */
|
||||
$emails = $email->whereId('1')->first();
|
||||
/* Fetch the values from Template table */
|
||||
$templates = $template->get();
|
||||
/* Fetch the values from Emails table */
|
||||
$emails1 = $email1->get();
|
||||
|
||||
return view('themes.default1.admin.helpdesk.settings.crone', compact('emails', 'templates', 'emails1'));
|
||||
// } catch {
|
||||
@@ -503,7 +503,7 @@ class SettingsController2 extends Controller
|
||||
// try {
|
||||
// /* fetch the values of access from access table */
|
||||
// $accesses = $access->whereId('1')->first();
|
||||
// // Direct to Access Settings Page
|
||||
// // Direct to Access Settings Page
|
||||
// return view('themes.default1.admin.helpdesk.settings.access', compact('accesses'));
|
||||
// } catch (Exception $e) {
|
||||
// return view('404');
|
||||
|
@@ -32,6 +32,7 @@ class SocialMediaController extends Controller
|
||||
'client_secret' => 'required',
|
||||
'redirect' => 'required|url',
|
||||
]);
|
||||
|
||||
try {
|
||||
$requests = $request->except('_token');
|
||||
$this->insertProvider($provider, $requests);
|
||||
|
@@ -143,16 +143,16 @@ class TeamController extends Controller
|
||||
{
|
||||
// dd($request);
|
||||
|
||||
// $id = $request->input('show_id');
|
||||
// $id = $request->input('show_id');
|
||||
|
||||
// dd($id);
|
||||
// dd($id);
|
||||
|
||||
$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')
|
||||
$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)
|
||||
// dd($users);
|
||||
return \Datatable::query($users)
|
||||
->showColumns('user_name')
|
||||
|
||||
->addColumn('first_name', function ($model) {
|
||||
|
@@ -157,11 +157,11 @@ class TemplateController extends Controller
|
||||
$fname = Input::get('folder_name');
|
||||
$filename = $directory.$fname;
|
||||
|
||||
// images folder creation using php
|
||||
// $mydir = dirname( __FILE__ )."/html/images";
|
||||
// if(!is_dir($mydir)){
|
||||
// mkdir("html/images");
|
||||
// }
|
||||
// images folder creation using php
|
||||
// $mydir = dirname( __FILE__ )."/html/images";
|
||||
// if(!is_dir($mydir)){
|
||||
// mkdir("html/images");
|
||||
// }
|
||||
// Move all images files
|
||||
|
||||
if (!file_exists($filename)) {
|
||||
|
@@ -91,7 +91,7 @@ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n";
|
||||
public function changeHttp()
|
||||
{
|
||||
//$string = "RewriteCond %{HTTPS} off
|
||||
//RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n";
|
||||
//RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n";
|
||||
$string = '';
|
||||
|
||||
return $string;
|
||||
|
@@ -149,6 +149,7 @@ class WorkflowController extends Controller
|
||||
$email_data["E-$key"] = $email;
|
||||
}
|
||||
$emails = $email_data;
|
||||
|
||||
try {
|
||||
return view('themes.default1.admin.helpdesk.manage.workflow.create', compact('emails'));
|
||||
} catch (Exception $e) {
|
||||
|
Reference in New Issue
Block a user