Add Visitors page hero and drop dark-mode classes from Reports.
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -33,7 +33,19 @@ class VisitorController extends Controller
|
||||
->paginate(25)
|
||||
->withQueryString();
|
||||
|
||||
return view('frontdesk.visitors.index', compact('visitors', 'organization'));
|
||||
$statsQuery = Visitor::owned($this->ownerRef($request))
|
||||
->where('organization_id', $organization->id);
|
||||
|
||||
$heroStats = [
|
||||
'total' => (clone $statsQuery)->count(),
|
||||
'frequent' => (clone $statsQuery)->where('is_frequent', true)->count(),
|
||||
'flagged' => (clone $statsQuery)->whereIn('watchlist_status', [
|
||||
Visitor::WATCHLIST_REQUIRES_APPROVAL,
|
||||
Visitor::WATCHLIST_BLACKLISTED,
|
||||
])->count(),
|
||||
];
|
||||
|
||||
return view('frontdesk.visitors.index', compact('visitors', 'organization', 'heroStats'));
|
||||
}
|
||||
|
||||
public function show(Request $request, Visitor $visitor): View
|
||||
|
||||
Reference in New Issue
Block a user