-
Notifications
You must be signed in to change notification settings - Fork 0
Visitors
The visitors module covers pre-registration, QR-code references, check-in and check-out, and host notifications.
A host opens the Visitors page and creates a new visitor with a name, optional company and email, the expected date and time window, and a guest count. The system writes a row to visitors and generates a short reference_code that doubles as the QR payload.
The visitor detail page renders a scannable QR alongside the human-readable reference code. The QR payload is the reference_code itself, which reception can scan and paste into the kiosk to look the visitor up. The component lives in components/shared/visitor-qr.tsx and uses the qrcode.react package to render an inline SVG with no network round-trip.
Reception checks the visitor in either from the reception desk page or from the public kiosk. The system stamps checked_in_at, emails the host that their visitor has arrived, and prints an optional PDF visitor pass. On departure the visitor is checked out, stamping checked_out_at.
A printable pass is generated on demand with pdfkit. It carries the visitor name, the host, the date, the reference code, and a small QR for the door.
visitors(id, host_user_id, visitor_name, company, email, visit_date, time_window_start, time_window_end, guest_count, requires_id, accessibility_notes, reference_code, badge_number, checked_in_at, checked_out_at, status).