Fix user switch for resellers and company name on order
This commit is contained in:
parent
5373e6b246
commit
b737375be5
@ -72,7 +72,7 @@ class Account extends Model
|
|||||||
|
|
||||||
public function getSwitchUrlAttribute()
|
public function getSwitchUrlAttribute()
|
||||||
{
|
{
|
||||||
return sprintf('<a href="/a/switch/start/%s"><i class="fa fa-external-link"></i></a>',$this->user_id);
|
return sprintf('<a href="/r/switch/start/%s"><i class="fa fa-external-link"></i></a>',$this->user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _address()
|
private function _address()
|
||||||
|
@ -87,8 +87,8 @@
|
|||||||
<label for="order_email">Client Account</label>
|
<label for="order_email">Client Account</label>
|
||||||
<select class="form-control" id="order_email" name="order_email">
|
<select class="form-control" id="order_email" name="order_email">
|
||||||
<option value=""> </option>
|
<option value=""> </option>
|
||||||
@foreach ($user->all_clients()->sortBy('sur_first_name') as $o)
|
@foreach ($user->all_accounts()->sortBy('company') as $o)
|
||||||
<option value="{{ $o->email }}" @if($o->email == old('order_email')) selected @endif>{{ $o->sur_first_name }}</option>
|
<option value="{{ $o->user->email }}" @if($o->user->email == old('order_email')) selected @endif>{{ $o->company }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
<span class="help-block">{{ $errors->first('order_email') }}</span>
|
<span class="help-block">{{ $errors->first('order_email') }}</span>
|
||||||
|
@ -21,7 +21,6 @@ Route::get('image/generic/{width}/{height}/{color}/{name?}','MediaController@ima
|
|||||||
Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'prefix'=>'a'], function() {
|
Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'prefix'=>'a'], function() {
|
||||||
Route::get('setup','AdminHomeController@setup');
|
Route::get('setup','AdminHomeController@setup');
|
||||||
Route::post('setup','AdminHomeController@setup_update');
|
Route::post('setup','AdminHomeController@setup_update');
|
||||||
Route::get('switch/start/{id}','\Leenooks\Controllers\AdminController@user_switch_start')->name('switch.user.stop');
|
|
||||||
|
|
||||||
//Route::get('accounting/connect', 'AccountingController@connect');
|
//Route::get('accounting/connect', 'AccountingController@connect');
|
||||||
});
|
});
|
||||||
@ -33,6 +32,7 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:reseller'],'prefix
|
|||||||
Route::get('supplier/index', 'SuppliersController@index');
|
Route::get('supplier/index', 'SuppliersController@index');
|
||||||
Route::get('supplier/create', 'SuppliersController@create');
|
Route::get('supplier/create', 'SuppliersController@create');
|
||||||
Route::post('supplier/store', 'SuppliersController@store');
|
Route::post('supplier/store', 'SuppliersController@store');
|
||||||
|
Route::get('switch/start/{id}','\Leenooks\Controllers\AdminController@user_switch_start')->name('switch.user.stop');
|
||||||
Route::get('home/{o}', 'UserHomeController@user');
|
Route::get('home/{o}', 'UserHomeController@user');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user