Throw a warning if there were no users affected

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-18 02:07:17 -07:00
parent a8a3ca3624
commit dc6eb6f104

View file

@ -184,6 +184,10 @@ class LicenseCheckoutController extends Controller
} }
} }
if ($assigned_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_no_avail_users', ['count' => $assigned_count]));
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] )); return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] ));