Added a rudimentary habit analysis possibility

This commit is contained in:
Bernd Bestel
2018-07-25 20:01:58 +02:00
parent 42c1709633
commit 6f47a5415c
6 changed files with 115 additions and 0 deletions

View File

@@ -50,6 +50,15 @@ class HabitsController extends BaseController
]);
}
public function Analysis(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
return $this->AppContainer->view->render($response, 'habitsanalysis', [
'habitsLog' => $this->Database->habits_log()->orderBy('tracked_time', 'DESC'),
'habits' => $this->Database->habits()->orderBy('name'),
'users' => $this->Database->users()->orderBy('username')
]);
}
public function HabitEditForm(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
if ($args['habitId'] == 'new')