@@ -9,6 +9,7 @@ import { Logo } from './icons';
99import EntryPassCard from './EntryPassCard' ;
1010import SeatCounter from './SeatCounter' ;
1111import styles from './AuthOverlay.module.css' ;
12+ import { isIterSoaCollege , isIterSoaEmail , ITER_SOA_ERROR_MESSAGE } from '@/lib/validation' ;
1213
1314/* ── Payment QR lightbox state lives here, outside JSX ── */
1415
@@ -17,6 +18,7 @@ export default function AuthOverlay({ v }: { v: V }) {
1718 useDialogFocus ( v . authHidden === 'false' , dialog , v . closeAuthH ) ;
1819 const [ userCollege , setUserCollege ] = useState < string | null > ( null ) ;
1920 const collegeValue = userCollege !== null ? userCollege : ( v . regVals ?. college || '' ) ;
21+ const isIterSoa = isIterSoaCollege ( collegeValue ) || isIterSoaEmail ( v . regVals ?. email ) ;
2022 const [ payQrOpen , setPayQrOpen ] = useState ( false ) ;
2123 return (
2224 < >
@@ -91,6 +93,10 @@ export default function AuthOverlay({ v }: { v: V }) {
9193
9294 < div style = { { display : v . d . s0 , flexDirection : "column" , gap : "20px" } } >
9395 < h3 data-s-in = "" style = { { margin : "0 0 4px" , fontFamily : "var(--font-display)" , fontWeight : "400" , fontSize : "clamp(24px,2.2vw,32px)" , lineHeight : "1.1" } } > Your details</ h3 >
96+ < p data-s-in = "" role = "note" style = { { display : "flex" , alignItems : "flex-start" , gap : "10px" , margin : "-4px 0 0" , padding : "12px 14px" , border : "1px solid rgba(239,68,68,.55)" , background : "rgba(239,68,68,.1)" , fontSize : "14px" , lineHeight : "1.45" , color : "#fca5a5" , overflowWrap : "anywhere" } } >
97+ < svg viewBox = "0 0 16 16" aria-hidden = "true" style = { { flex : "none" , width : "16px" , height : "16px" , marginTop : "1px" } } > < circle cx = "8" cy = "8" r = "6.5" fill = "none" stroke = "currentColor" strokeWidth = "1.5" > </ circle > < path d = "M3.5 12.5l9-9" stroke = "currentColor" strokeWidth = "1.5" > </ path > </ svg >
98+ < span > Students of ITER / SOA (Siksha ‘O’ Anusandhan) are not allowed to register.</ span >
99+ </ p >
94100 { v . gNote ? (
95101 < p data-s-in = "" role = "status" style = { { display : "flex" , alignItems : "flex-start" , gap : "10px" , margin : "-4px 0 0" , padding : "12px 14px" , border : "1px solid rgba(236,232,223,.18)" , background : "rgba(236,232,223,.04)" , fontSize : "14px" , lineHeight : "1.45" , color : "rgba(236,232,223,.86)" , overflowWrap : "anywhere" } } >
96102 < svg viewBox = "0 0 16 16" aria-hidden = "true" style = { { flex : "none" , width : "16px" , height : "16px" , marginTop : "1px" , color : "oklch(0.78 0.075 85)" } } > < path d = "M3 8.5 6.5 12 13 4.5" fill = "none" stroke = "currentColor" strokeWidth = "2" > </ path > </ svg >
@@ -143,7 +149,7 @@ export default function AuthOverlay({ v }: { v: V }) {
143149 } }
144150 style-focus = "border-color:oklch(0.78 0.075 85);background:rgba(236,232,223,.08)"
145151 />
146- { v . err . college ? ( < span role = "alert" style = { { fontSize : "14px" , lineHeight : "1.4" , color : "oklch(0.76 0.14 35)" } } > { v . err . college } </ span > ) : null }
152+ { v . err . college || isIterSoa ? ( < span role = "alert" style = { { fontSize : "14px" , lineHeight : "1.4" , color : "oklch(0.76 0.14 35)" } } > { isIterSoa ? ITER_SOA_ERROR_MESSAGE : v . err . college } </ span > ) : null }
147153 </ label >
148154 < label data-s-in = "" style = { { display : "flex" , flexDirection : "column" , gap : "8px" } } >
149155 < span style = { { fontSize : "12px" , fontWeight : "700" , letterSpacing : ".16em" , color : "rgba(236,232,223,.86)" } } > EMAIL</ span >
0 commit comments