Nicer formatting for buttons in bulk user edit

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2022-05-18 15:35:57 -07:00
parent bef895eaf4
commit 891009dc67
3 changed files with 34 additions and 9 deletions
@@ -91,7 +91,10 @@ class BulkUsersController extends Controller
->conditionallyAddItem('company_id')
->conditionallyAddItem('locale')
->conditionallyAddItem('remote')
->conditionallyAddItem('ldap_sync')
->conditionallyAddItem('activated');
//dd($this);
// If the manager_id is one of the users being updated, generate a warning.
if (array_search($request->input('manager_id'), $user_raw_array)) {
@@ -107,7 +110,7 @@ class BulkUsersController extends Controller
User::whereIn('id', $user_raw_array)
->where('id', '!=', Auth::id())->update($this->update_array);
if(array_key_exists('location_id', $this->update_array)){
if (array_key_exists('location_id', $this->update_array)){
Asset::where('assigned_type', User::class)
->whereIn('assigned_to', $user_raw_array)
->update(['location_id' => $this->update_array['location_id']]);