Show missing products on dashboard

This commit is contained in:
Bernd Bestel
2017-04-21 13:21:09 +02:00
parent f2f18d260d
commit 52e311d847
6 changed files with 39 additions and 6 deletions

View File

@@ -37,12 +37,13 @@ $db = Grocy::GetDbConnection();
$app->get('/', function(Request $request, Response $response) use($db)
{
$db = Grocy::GetDbConnection(true); //For database schema migration
return $this->renderer->render($response, '/layout.php', [
'title' => 'Dashboard',
'contentPage' => 'dashboard.php',
'products' => $db->products(),
'currentStock' => GrocyLogicStock::GetCurrentStock()
'currentStock' => GrocyLogicStock::GetCurrentStock(),
'missingProducts' => GrocyLogicStock::GetMissingProducts()
]);
});