diff --git a/frontend/src/components/EventCheckIn/CheckInList.jsx b/frontend/src/components/EventCheckIn/CheckInList.jsx index 67e23749..73074f63 100644 --- a/frontend/src/components/EventCheckIn/CheckInList.jsx +++ b/frontend/src/components/EventCheckIn/CheckInList.jsx @@ -4,6 +4,9 @@ import { formatDistanceToNow } from 'date-fns'; import './EventCheckIn.scss'; function getAttendeeDisplayName(attendee) { + if (attendee.anonymousBrowserCheckIn) { + return attendee.guestName || 'Anonymous user'; + } if (attendee.formResponseId && (attendee.guestName || attendee.guestEmail)) { return attendee.guestName && String(attendee.guestName).trim() ? String(attendee.guestName).trim() @@ -49,12 +52,14 @@ function CheckInList({ attendees, onManualCheckIn, onRemoveCheckIn, onOpenManual }; const getUserPicture = (attendee) => { + if (attendee.anonymousBrowserCheckIn) return null; if (attendee.formResponseId) return null; const user = attendee.userId; return user?.picture || null; }; const getAttendeeRemoveId = (attendee) => { + if (attendee.anonymousBrowserCheckIn) return null; if (attendee.formResponseId) return { formResponseId: attendee.formResponseId }; const uid = attendee.userId && (attendee.userId._id || attendee.userId.id || attendee.userId); return uid ? { userId: uid } : null; @@ -117,9 +122,10 @@ function CheckInList({ attendees, onManualCheckIn, onRemoveCheckIn, onOpenManual const user = attendee.userId; const checkedInBy = attendee.checkedInBy; const isManual = !!checkedInBy; + const isAnonymousBrowser = !!attendee.anonymousBrowserCheckIn; const removeId = getAttendeeRemoveId(attendee); return ( -
+ Anonymous check-in is enabled for this event. This anonymous user can check in once without sharing personal details. +
+ )}