Fixes #14692 - set default variables for sidebar totals
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
fd929f5dd9
commit
4f12c86e74
1 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,14 @@ class AssetCountForSidebar
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* This needs to be set for the /setup process, since the tables might not exist yet
|
||||||
|
*/
|
||||||
|
$total_due_for_checkin = 0;
|
||||||
|
$total_overdue_for_checkin = 0;
|
||||||
|
$total_due_for_audit = 0;
|
||||||
|
$total_overdue_for_audit = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$total_rtd_sidebar = Asset::RTD()->count();
|
$total_rtd_sidebar = Asset::RTD()->count();
|
||||||
view()->share('total_rtd_sidebar', $total_rtd_sidebar);
|
view()->share('total_rtd_sidebar', $total_rtd_sidebar);
|
||||||
|
|
Loading…
Add table
Reference in a new issue