feat(scan): confirm before welcome check-in, with print warning

The staff scanner checked attendees in silently, and the default session
mode never prints — so a welcome-desk scan could check someone in with no
badge and no confirmation.

- new read-only RPC preview_welcome_checkin(qr): resolves the attendee and
  reports already + will_print (mirrors the exact welcome_checkin enqueue
  condition: first check-in AND a layout exists). Staff/admin only; checks
  nobody in, enqueues nothing.
- attendee Scan screen previews first and shows a Yes/No sheet: "You are
  checking in [Name]. By confirming, you will print this person's label."
  Only Yes runs welcome_checkin. Session check-in unchanged (never prints).
- badge_print_tests.sql +8 assertions (109 total); ScanPage + welcome specs
  drive the confirm step; new CONV-CHECKIN-003 (No cancels, Yes checks in).
- docs: rpcs.md, printing.md, releases/2026-10-19.md.

Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
committed 2026-10-19 09:45:20 +02:00
1 parent 00c89c1b48
commit 65dcf64c4e
11 files changed
+348 -7

No files matched your search

+8
View File
@@ -16,6 +16,7 @@ import type {
Session,
Slot,
WelcomeCheckinResult,
WelcomeCheckinPreview,
AcceptConnectionResult,
TalkCohortMember,
} from './types';
@@ -201,6 +202,13 @@ export async function welcomeCheckin(attendeeQr: string): Promise<WelcomeCheckin
return rows[0];
}
/** Read-only preview of a welcome check-in: resolves the attendee and reports
* whether confirming will print their badge. Checks nobody in. */
export async function previewWelcomeCheckin(attendeeQr: string): Promise<WelcomeCheckinPreview> {
const rows = await rpc<WelcomeCheckinPreview[]>('preview_welcome_checkin', { p_attendee_qr: attendeeQr });
return rows[0];
}
export async function getMyFeedback(email: string): Promise<Feedback[]> {
const { data, error } = await supabase.from('feedback').select('*').eq('contact_email', email);
if (error) throw new ApiError(error.message);
+9
View File
@@ -187,6 +187,15 @@ export interface WelcomeCheckinResult {
already: boolean;
}
/** Read-only preview of a welcome check-in (shown before confirming). */
export interface WelcomeCheckinPreview {
attendee_email: string;
attendee_name: string;
already: boolean;
/** True when confirming will enqueue a badge print (first check-in + a layout exists). */
will_print: boolean;
}
/** Result of accepting a connection (the connection row + the shared-talk flag). */
export interface AcceptConnectionResult extends Connection {
/** True when both parties were checked into the same session (talk). */