diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 7f4f45a..c948654 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -16,9 +16,9 @@ public function index() 'permission' => 'view-user-reports', ], [ - 'name' => 'Member Activity', - 'description' => 'A view of all gatekeeper authentications in the database by member.', - 'route' => route('reports.member-activity-report'), + 'name' => 'Gatekeeper Activity', + 'description' => 'A view of all gatekeeper authentications by time base.', + 'route' => route('reports.gatekeeper-activity-report'), 'permission' => 'view-gatekeeper-reports', ], ]; @@ -58,9 +58,9 @@ public function member_status_report() ]); } - public function member_activity_report(Request $request) + public function gatekeeper_activity_report(Request $request) { - $report_name = 'Member Activity Report'; + $report_name = 'Gatekeeper Activity Report'; if ($request->has('fromDate', 'toDate')) { $validated = $request->validate([ @@ -79,9 +79,6 @@ public function member_activity_report(Request $request) ['name' => 'Timestamp', 'callback' => function ($authentication) { return $authentication->lock_in; }], - ['name' => 'Name', 'callback' => function ($authentication) { - return ! is_null($authentication->user) ? $authentication->user->get_name() : ''; - }], ['name' => 'Gatekeeper', 'callback' => function ($authentication) { return ! is_null($authentication->gatekeeper) ? $authentication->gatekeeper->name : ''; }], diff --git a/routes/web.php b/routes/web.php index eb1abb0..76efd81 100644 --- a/routes/web.php +++ b/routes/web.php @@ -92,7 +92,7 @@ Route::middleware(['auth', 'can:manage-reports'])->group(function () { Route::get('/reports', [ReportsController::class, 'index'])->name('reports'); Route::get('/reports/member-status-report', [ReportsController::class, 'member_status_report'])->middleware(['auth', 'can:view-user-reports'])->name('reports.member-status-report'); - Route::get('/reports/member-activity-report', [ReportsController::class, 'member_activity_report'])->middleware(['auth', 'can:view-gatekeeper-reports'])->name('reports.member-activity-report'); + Route::get('/reports/gatekeeper-activity-report', [ReportsController::class, 'gatekeeper_activity_report'])->middleware(['auth', 'can:view-gatekeeper-reports'])->name('reports.gatekeeper-activity-report'); }); // Gatekeeper sync and key authentication routes