PageSourceSearch

https://slantapp.ai/assets/ScoutCheckin-Bj0RdZY8.js

js slantapp.ai collected 2026-10-05 15:05:22 UTC 4,699 bytes, 1 lines download raw bytes

1import{b6 as v,c as C,r as m,F as b,j as e,C as u,a as h,K as k,N as w,aa as P,b9 as S,a4 as c,B as F,L as E}from"./index-tc5-nNLC.js";import{L as r}from"./label-MwGx_WS4.js";import{T}from"./textarea-DN2rY_yY.js";import{C as x}from"./circle-check-big-CUgqPmz6.js";import{M as O}from"./mail-DG8jvVe4.js";import{B as I}from"./building-DF-y24pG.js";import{P as q}from"./phone-DkyZOs2j.js";function A(){const[,i]=v("/scout-checkin/:qrToken"),p=(i==null?void 0:i.qrToken)||"",{toast:o}=C(),[t,n]=m.useState({scoutName:"",scoutEmail:"",scoutOrganization:"",scoutPhone:"",notes:""}),[j,g]=m.useState(!1),[a,N]=m.useState(null),l=b({mutationFn:async s=>{const d=await fetch(`/api/group-trips/scan-player-qr/${p}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!d.ok){const y=await d.json();throw new Error(y.message||"Check-in failed")}return d.json()},onSuccess:s=>{g(!0),N(s.player),o({title:"Check-in Successful!",description:"Your attendance has been recorded"})},onError:s=>{o({title:"Check-in Failed",description:s.message||"Unable to record attendance",variant:"destructive"})}}),f=s=>{if(s.preventDefault(),!t.scoutName.trim()){o({title:"Name Required",description:"Please enter your name",variant:"destructive"});return}l.mutate(t)};return j?e.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center p-4",children:e.jsx(u,{className:"w-full max-w-md",children:e.jsx(h,{className:"pt-8 pb-8",children:e.jsxs("div",{className:"text-center space-y-4",children:[e.jsx("div",{className:"w-20 h-20 mx-auto rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center",children:e.jsx(x,{className:"w-12 h-12 text-green-600"})}),e.jsx("h2",{className:"text-2xl font-bold text-green-600","data-testid":"checkin-success",children:"Check-in Complete!"}),a&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-lg font-medium",children:a.name}),a.jerseyNumber&&e.jsxs("p",{className:"text-muted-foreground",children:["#",a.jerseyNumber," • ",a.position]}),a.team&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.team})]}),e.jsx("p",{className:"text-muted-foreground",children:"Your attendance has been recorded. The player and coach will be notified."})]})})})}):e.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center p-4",children:e.jsxs(u,{className:"w-full max-w-md",children:[e.jsxs(k,{className:"text-center",children:[e.jsx(w,{className:"text-2xl",children:"Scout Check-in"}),e.jsx(P,{children:"Record your attendance at this player's game"})]}),e.jsx(h,{children:e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{htmlFor:"scoutName",className:"flex items-center gap-2",children:[e.jsx(S,{className:"w-4 h-4"}),"Your Name *"]}),e.jsx(c,{id:"scoutName",placeholder:"John Smith",value:t.scoutName,onChange:s=>n({...t,scoutName:s.target.value}),required:!0,"data-testid":"scout-name-input"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{htmlFor:"scoutEmail",className:"flex items-center gap-2",children:[e.jsx(O,{className:"w-4 h-4"}),"Email"]}),e.jsx(c,{id:"scoutEmail",type:"email",placeholder:"[email protected]",value:t.scoutEmail,onChange:s=>n({...t,scoutEmail:s.target.value}),"data-testid":"scout-email-input"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{htmlFor:"scoutOrganization",className:"flex items-center gap-2",children:[e.jsx(I,{className:"w-4 h-4"}),"Organization / University"]}),e.jsx(c,{id:"scoutOrganization",placeholder:"State University Athletics",value:t.scoutOrganization,onChange:s=>n({...t,scoutOrganization:s.target.value}),"data-testid":"scout-org-input"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(r,{htmlFor:"scoutPhone",className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-4 h-4"}),"Phone (optional)"]}),e.jsx(c,{id:"scoutPhone",type:"tel",placeholder:"(555) 123-4567",value:t.scoutPhone,onChange:s=>n({...t,scoutPhone:s.target.value}),"data-testid":"scout-phone-input"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"notes",children:"Notes (optional)"}),e.jsx(T,{id:"notes",placeholder:"Any additional notes...",value:t.notes,onChange:s=>n({...t,notes:s.target.value}),rows:2,"data-testid":"scout-notes-input"})]}),e.jsx(F,{type:"submit",className:"w-full",disabled:l.isPending,"data-testid":"submit-checkin",children:l.isPending?e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"w-4 h-4 mr-2 animate-spin"}),"Recording Attendance..."]}
1):e.jsxs(e.Fragment,{children:[e.jsx(x,{className:"w-4 h-4 mr-2"}),"Check In"]})})]})})]})})}export{A as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.