Add hero section to Watchlist index with entry stats and CTAs.
Deploy Ladill Frontdesk / deploy (push) Successful in 31s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-05 20:58:20 +00:00
co-authored by Cursor
parent 0d74330e44
commit db7f0e04c7
2 changed files with 85 additions and 59 deletions
@@ -35,10 +35,20 @@ class WatchlistController extends Controller
->paginate(25)
->withQueryString();
$statsQuery = WatchlistEntry::owned($this->ownerRef($request))
->where('organization_id', $organization->id);
$heroStats = [
'total' => (clone $statsQuery)->count(),
'requires_approval' => (clone $statsQuery)->where('status', Visitor::WATCHLIST_REQUIRES_APPROVAL)->count(),
'blacklisted' => (clone $statsQuery)->where('status', Visitor::WATCHLIST_BLACKLISTED)->count(),
];
return view('frontdesk.watchlist.index', [
'entries' => $entries,
'organization' => $organization,
'statuses' => config('frontdesk.watchlist_statuses'),
'heroStats' => $heroStats,
'canManage' => app(\App\Services\Frontdesk\FrontdeskPermissions::class)
->can($this->member($request), 'watchlist.manage'),
]);