diff --git a/app/Http/Controllers/FrontController.php b/app/Http/Controllers/FrontController.php index 38102fec..3a47619a 100644 --- a/app/Http/Controllers/FrontController.php +++ b/app/Http/Controllers/FrontController.php @@ -554,8 +554,9 @@ public function showProfile($id = null) $feedback = Feedback::where('controller_id', '=', $id)->where('status', 1)->orderBy('created_at', 'DESC')->get(); $log = ControllerLog::where('cid', '=', $id)->orderBy('id', 'DESC')->get(); $stats = ControllerLog::getControllerStats($id); - - return view('site.profile')->with('user', $user)->with('feedback', $feedback) + $dashstats = ControllerLog::aggregateAllControllersByPosAndMonth($year, $month); + $personal_stats = $dashstats[$user_id]; + return view('site.profile')->with('user', $user)->with('feedback', $feedback)->with('dashstats', $dashstats)->with('personal_stats', $personal_stats) ->with('log', $log)->with('stats', $stats)->with('url_exist', $url_exist)->with('tickets', $tickets)->with('last_training', $last_training)->with('last_training_given', $last_training_given); } diff --git a/resources/views/site/profile.blade.php b/resources/views/site/profile.blade.php index db4b9af1..2e2d80cd 100644 --- a/resources/views/site/profile.blade.php +++ b/resources/views/site/profile.blade.php @@ -8,119 +8,119 @@