Merge pull request #225 from ladybirdweb/country-code-bug-fix-patch

bug-fix patch1
This commit is contained in:
Manish Verma
2016-09-30 10:09:33 +05:30
committed by GitHub
8 changed files with 28 additions and 26 deletions

View File

@@ -88,7 +88,7 @@ class AgentController extends Controller
$departments = $department->get();
// list all the teams in a single variable
$teams = $team->lists('id', 'name')->toArray();
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
// returns to the page with all the variables and their datas
return view('themes.default1.admin.helpdesk.agent.agents.create', compact('assign', 'teams', 'agents', 'timezones', 'groups', 'departments', 'team'))->with('phonecode', $phonecode->phonecode);
@@ -172,7 +172,7 @@ class AgentController extends Controller
public function edit($id, User $user, Assign_team_agent $team_assign_agent, Timezones $timezone, Groups $group, Department $department, Teams $team, CountryCode $code)
{
try {
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
$user = $user->whereId($id)->first();
$team = $team->get();

View File

@@ -159,7 +159,7 @@ class UserController extends Controller
public function create(CountryCode $code)
{
try {
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
return view('themes.default1.agent.helpdesk.user.create')->with('phonecode', $phonecode->phonecode);
@@ -263,7 +263,7 @@ class UserController extends Controller
$user = new User();
/* select the field where id = $id(request Id) */
$users = $user->whereId($id)->first();
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
return view('themes.default1.agent.helpdesk.user.edit', compact('users'))->with('phonecode', $phonecode->phonecode);
@@ -333,7 +333,7 @@ class UserController extends Controller
public function getProfileedit(CountryCode $code)
{
$user = Auth::user();
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
try {
return view('themes.default1.agent.helpdesk.user.profile-edit', compact('user'))->with('phonecode', $phonecode->phonecode);

View File

@@ -87,6 +87,7 @@ class ClientTicketController extends Controller
$inline_attachment = null;
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
}
}

View File

@@ -4,8 +4,8 @@ namespace App\Http\Controllers\Client\helpdesk;
// controllers
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Common\FileuploadController;
use App\Http\Controllers\Controller;
// requests
use App\Http\Requests\helpdesk\ClientRequest;
use App\Model\helpdesk\Agent\Department;
@@ -61,7 +61,7 @@ class FormController extends Controller
if (\Config::get('database.install') == '%0%') {
return \Redirect::route('licence');
}
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
if (System::first()->status == 1) {
$topics = $topic->get();
@@ -75,6 +75,7 @@ class FormController extends Controller
$fileupload = $fileupload->file_upload_max_size();
$max_size_in_bytes = $fileupload[0];
$max_size_in_actual = $fileupload[1];
return view('themes.default1.client.helpdesk.form', compact('topics', 'codes', 'max_size_in_bytes', 'max_size_in_actual'))->with('phonecode', $phonecode);
} else {
return \Redirect::route('home');

View File

@@ -55,7 +55,7 @@ class GuestController extends Controller
public function getProfile(CountryCode $code)
{
$user = Auth::user();
$location = GeoIP::getLocation('');
$location = GeoIP::getLocation();
$phonecode = $code->where('iso', '=', $location['isoCode'])->first();
return view('themes.default1.client.helpdesk.profile', compact('user'))->with('phonecode', $phonecode->phonecode);