From 3a9b8a49930d696a5bcb608afeb289893ec75a86 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 20 Dec 2022 18:39:17 -0600 Subject: [PATCH] Calculate the proper amount of people in the dashboard if Full Company Support is enabled --- app/Http/Controllers/DashboardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index bd527f764..89283a7c2 100755 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -34,7 +34,7 @@ class DashboardController extends Controller $counts['license'] = \App\Models\License::assetcount(); $counts['consumable'] = \App\Models\Consumable::count(); $counts['component'] = \App\Models\Component::count(); - $counts['user'] = \App\Models\User::count(); + $counts['user'] = \App\Models\Company::scopeCompanyables(Auth::user())->count(); $counts['grand_total'] = $counts['asset'] + $counts['accessory'] + $counts['license'] + $counts['consumable']; if ((! file_exists(storage_path().'/oauth-private.key')) || (! file_exists(storage_path().'/oauth-public.key'))) {