Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions app/Http/Controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
];
Expand Down Expand Up @@ -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([
Expand All @@ -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 : '';
}],
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down