This commit is contained in:
RafficMohammed
2023-02-17 13:25:50 +05:30
parent 2381fd7cf5
commit 67950fc78f
891 changed files with 102300 additions and 138477 deletions

View File

@@ -111,9 +111,6 @@ class AgentController extends Controller
*/
public function store(User $user, AgentRequest $request)
{
if ($request->fails()) {
return redirect('agents/create');
}
if ($request->get('country_code') == '' && ($request->get('phone_number') != '' || $request->get('mobile') != '')) {
return redirect()->back()->with(['fails2' => Lang::get('lang.country-code-required-error'), 'country_code' => 1])->withInput();
} else {
@@ -198,7 +195,7 @@ class AgentController extends Controller
$teams = $team->pluck('id', 'name')->toArray();
$assign = $team_assign_agent->where('agent_id', $id)->pluck('team_id')->toArray();
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'user', 'timezones', 'groups', 'departments', 'team', 'exp', 'counted'))->with('phonecode', $phonecode->phonecode);
return view('themes.default1.admin.helpdesk.agent.agents.edit', compact('teams', 'assign', 'table', 'teams1', 'user', 'timezones', 'groups', 'departments', 'team'))->with('phonecode', $phonecode->phonecode);
} catch (Exception $e) {
return redirect('agents')->with('fail', Lang::get('lang.failed_to_edit_agent'));
}

View File

@@ -9,8 +9,9 @@ use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Ticket\Tickets;
// Model
use Illuminate\Http\Request;
use Vsmoraes\Pdf\PdfFacade;
// classes
use PDF;
/**
* ReportController
@@ -263,6 +264,6 @@ class ReportController extends Controller
$html = view('themes.default1.agent.helpdesk.report.pdf', compact('table_datas', 'table_help_topic'))->render();
$html1 = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
return @PDF::load($html1)->show();
return PdfFacade::load($html1)->show(false, false, false);
}
}

View File

@@ -50,8 +50,9 @@ use Illuminate\Support\Facades\Request as Input;
use Illuminate\Support\Str;
use Lang;
use Mail;
use PDF;
use UTC;
use Vsmoraes\Pdf\Pdf;
use Vsmoraes\Pdf\PdfFacade;
use Yajra\DataTables\Facades\DataTables;
/**
@@ -507,7 +508,7 @@ class TicketController extends Controller
* @see https://github.com/dompdf/dompdf/issues/1272
* For time bieng we are silencing the error using "@" operator in front of it
*/
return @PDF::load($html1)->show();
return PdfFacade::load($html1)->show(false, false, false);
}
/**
@@ -2444,7 +2445,7 @@ class TicketController extends Controller
* @see https://github.com/dompdf/dompdf/issues/1272
* For time bieng we are silencing the error using "@" operator in front of it
*/
return @PDF::load($html1)->show();
return PdfFacade::load($html1)->show(false, false, false);
} catch (Exception $ex) {
return redirect()->back()->with('fails', $ex->getMessage());
}

View File

@@ -231,6 +231,7 @@ class UserController extends Controller
}
}
})
->rawColumns(['user_name', 'email', 'mobile', 'active', 'updated_at', 'role', 'Actions'])
->make();
}
@@ -656,7 +657,7 @@ class UserController extends Controller
// $org_name=Organization::where('id','=',$org_id)->pluck('name')->first();
// dd($org_name);
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', '$settings', '$email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
return view('themes.default1.agent.helpdesk.user.edit', compact('users', 'orgs', 'settings', 'email_mandatory', 'organization_id'))->with('phonecode', $phonecode->phonecode);
} catch (Exception $e) {
return redirect()->back()->with('fails', $e->getMessage());
}

View File

@@ -48,7 +48,7 @@ class UserController extends Controller
$article->setPath('article-list');
$categorys = $category->get();
return view('themes.default1.client.kb.article-list.articles', compact('time', 'categorys', 'article'));
return view('themes.default1.client.kb.article-list.articles', compact('categorys', 'article'));
}
/**

View File

@@ -2,9 +2,11 @@
namespace App\Http\Controllers\Common;
use App\Exports\UserExport;
use App\Http\Controllers\Controller;
use Excel;
//use Excel;
use Exception;
use Maatwebsite\Excel\Facades\Excel;
class ExcelController extends Controller
{
@@ -13,10 +15,7 @@ class ExcelController extends Controller
if (count($data) == 0) {
throw new Exception('No data');
}
Excel::create($filename, function ($excel) use ($data) {
$excel->sheet('sheet', function ($sheet) use ($data) {
$sheet->fromArray($data);
});
})->export('xls');
//dd(Excel::download(new UserExport($data), $filename.'.'.'xls'));
return Excel::download(new UserExport(), $filename.'.'.'xls');
}
}