From 7ce230fadcb47a4d1b5f39184bacdb18125059aa Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 18 Jan 2023 08:57:59 -0800 Subject: [PATCH] missed a few renames --- app/Console/Commands/CheckoutLicenseToAllUsers.php | 2 +- app/Http/Controllers/Users/UsersController.php | 4 ++-- ...1_15_232525_adds_should_autoassign_bool_to_users_table.php | 2 +- resources/views/users/edit.blade.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Console/Commands/CheckoutLicenseToAllUsers.php b/app/Console/Commands/CheckoutLicenseToAllUsers.php index 44ec72e13c..1ba57895c2 100644 --- a/app/Console/Commands/CheckoutLicenseToAllUsers.php +++ b/app/Console/Commands/CheckoutLicenseToAllUsers.php @@ -56,7 +56,7 @@ class CheckoutLicenseToAllUsers extends Command return false; } - $users = User::whereNull('deleted_at')->where('should_autoassign', '==', 0)->with('licenses')->get(); + $users = User::whereNull('deleted_at')->where('autoassign_licenses', '==', 1)->with('licenses')->get(); if ($users->count() > $license->getAvailSeatsCountAttribute()) { $this->info('You do not have enough free seats to complete this task, so we will check out as many as we can. '); diff --git a/app/Http/Controllers/Users/UsersController.php b/app/Http/Controllers/Users/UsersController.php index b863fb966b..eecce0aea6 100755 --- a/app/Http/Controllers/Users/UsersController.php +++ b/app/Http/Controllers/Users/UsersController.php @@ -121,7 +121,7 @@ class UsersController extends Controller $user->created_by = Auth::user()->id; $user->start_date = $request->input('start_date', null); $user->end_date = $request->input('end_date', null); - $user->should_autoassign= $request->input('should_autoassign', 0); + $user->autoassign_licenses= $request->input('autoassign_licenses', 1); // Strip out the superuser permission if the user isn't a superadmin $permissions_array = $request->input('permission'); @@ -275,7 +275,7 @@ class UsersController extends Controller $user->website = $request->input('website', null); $user->start_date = $request->input('start_date', null); $user->end_date = $request->input('end_date', null); - $user->should_autoassign = $request->input('should_autoassign', 0); + $user->autoassign_licenses = $request->input('autoassign_licenses', 1); // Update the location of any assets checked out to this user Asset::where('assigned_type', User::class) diff --git a/database/migrations/2022_11_15_232525_adds_should_autoassign_bool_to_users_table.php b/database/migrations/2022_11_15_232525_adds_should_autoassign_bool_to_users_table.php index 854feebfea..b728e1f22b 100644 --- a/database/migrations/2022_11_15_232525_adds_should_autoassign_bool_to_users_table.php +++ b/database/migrations/2022_11_15_232525_adds_should_autoassign_bool_to_users_table.php @@ -26,7 +26,7 @@ class AddsShouldAutoassignBoolToUsersTable extends Migration public function down() { Schema::table('users', function (Blueprint $table) { - $table->dropColumn('should_autoassign'); + $table->dropColumn('autoassign_licenses'); }); } } diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index 7126428607..e4666a4d0c 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -379,8 +379,8 @@
-