From 858aeae73d55518d9aa737d1e8fd4391937eb5fd Mon Sep 17 00:00:00 2001 From: Dev Singh Date: Thu, 6 Nov 2025 13:57:44 -0600 Subject: [PATCH] Implement handling for new iCard swiper --- src/ui/pages/tickets/ScanTickets.page.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui/pages/tickets/ScanTickets.page.tsx b/src/ui/pages/tickets/ScanTickets.page.tsx index 545b75de..d371ca9d 100644 --- a/src/ui/pages/tickets/ScanTickets.page.tsx +++ b/src/ui/pages/tickets/ScanTickets.page.tsx @@ -564,6 +564,18 @@ const ScanTicketsPageInternal: React.FC = ({ let email = inputValue; + // Check if input is from ACM card swiper (format: ACMCARD followed by 4 digits, followed by 9 digits) + if (email.startsWith("ACMCARD")) { + const uinMatch = email.match(/^ACMCARD(\d{4})(\d{9})/); + if (!uinMatch) { + setError("Invalid card swipe. Please try again."); + setIsLoading(false); + setShowModal(true); + return; + } + email = uinMatch[2]; // Extract the 9-digit UIN + } + // Check if input is UIN (all digits) if (/^\d+$/.test(email)) { try {