mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use totals for sidebar
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
52d6a8990a
commit
860764a436
|
@ -102,6 +102,9 @@ class AssetCountForSidebar
|
|||
\Log::debug($e);
|
||||
}
|
||||
|
||||
view()->share('total_due_and_overdue_for_checkin', ($total_due_for_checkin + $total_overdue_for_checkin));
|
||||
view()->share('total_due_and_overdue_for_audit', ($total_due_for_audit + $total_overdue_for_audit));
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@
|
|||
<li{!! (Request::is('hardware/audit/due') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('assets.audit.due') }}">
|
||||
<i class="fas fa-history text-yellow fa-fw"></i> {{ trans('general.audit_due') }}
|
||||
<badge class="badge">{{ (isset($total_due_for_audit)) ? $total_due_for_audit : '' }}</badge>
|
||||
<badge class="badge">{{ (isset($total_due_and_overdue_for_audit)) ? $total_due_and_overdue_for_audit : '' }}</badge>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
@ -518,7 +518,7 @@
|
|||
<li{!! (Request::is('hardware/checkins/due') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('assets.checkins.due') }}">
|
||||
<i class="fas fa-history text-yellow fa-fw"></i> {{ trans('general.checkin_due') }}
|
||||
<badge class="badge">{{ (isset($total_overdue_for_checkin)) ? $total_overdue_for_checkin : '' }}</badge>
|
||||
<badge class="badge">{{ (isset($total_due_and_overdue_for_checkin)) ? $total_due_and_overdue_for_checkin : '' }}</badge>
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
|
|
Loading…
Reference in a new issue