missed a few renames

This commit is contained in:
Godfrey M 2023-01-18 08:57:59 -08:00
parent 6fbb484dfd
commit 7ce230fadc
4 changed files with 6 additions and 6 deletions

View file

@ -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. ');

View file

@ -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)

View file

@ -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');
});
}
}

View file

@ -379,8 +379,8 @@
<!-- Auto Assign checkbox -->
<div class="form-group">
<div class="col-md-7 col-md-offset-3">
<label for="should_autoassign">
<input type="checkbox" value="1" name="should_autoassign" class="minimal" {{ (old('should_autoassign', $user->should_autoassign)) == '1' ? ' checked="checked"' : '' }} aria-label="should_autoassign">
<label for="autoassign_licenses">
<input type="checkbox" value="1" name="autoassign_licenses" class="minimal" {{ (old('autoassign_licenses', $user->autoassign_licenses)) == '1' ? ' checked="checked"' : '' }} aria-label="autoassign_licenses">
{{ trans('admin/users/general.auto_assign_label') }}
</label>