Skip to content

Commit

Permalink
Merge pull request #12268 from inietov/fixes/people_count
Browse files Browse the repository at this point in the history
Fixed: Dashboard user count scoping when full company support is enabled
  • Loading branch information
snipe committed Dec 21, 2022
2 parents 128c21a + 3a9b8a4 commit fb10a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function index()
$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'))) {
Expand Down

0 comments on commit fb10a6f

Please sign in to comment.