PageSourceSearch

https://bizvanguard.ai/assets/WaitlistStaffKiosk-DwxDnliN.js

js bizvanguard.ai collected 2026-10-05 13:47:01 UTC 22,433 bytes, 1 lines download raw bytes

1import{r as i,j as e,t as l}from"./vendor-react-zwv87yMD.js";import{u as Qe,a as G,b as g}from"./vendor-query-DYq8g7OI.js";import{s as v}from"./waitlist-BuuPR6ss.js";import{s as C}from"./reservations-7yQ-Swm2.js";import{a as T}from"./kioskAuth-DLY0QXQp.js";import{u as Le}from"./useOrgTimezone-C1UagyKl.js";import{B as c}from"./button-DlBDuKbo.js";import{I as N}from"./input-C9cRIRX4.js";import{L as p}from"./label-CSUA9GMO.js";import{T as ve}from"./textarea-CfTUtQow.js";import{B as X}from"./badge-QivbhJml.js";import{D as Ne,a as ye,b as ke,c as we}from"./dialog-CCoQRIQ_.js";import{f as Ce}from"./phoneUtils-CLDOdnrv.js";import{t as Se,d as $e,a as Ue}from"./timezoneFormatters-Lg56xFv0.js";import{w as Pe,n as Oe,a1 as V,a0 as F,P as D,a5 as Te,a6 as Fe,y as Be,a7 as Ge,a8 as Ve}from"./vendor-icons-bLSWzydc.js";import{e as Xe}from"./vendor-router-DimZLiZb.js";import"./vendor-charts-CtrTLS4K.js";import"./vendor-i18n-BdYkS11p.js";import"./vendor-ui-CfDMlrKu.js";import"./vendor-pdf-DQuePnfN.js";import"./vendor-state-ByI9XJey.js";import"./vendor-editor-C_dhmuey.js";import"./api-client-wl3SCNAO.js";import"./authStore-Bv6p2Ne2.js";import"./i18n-CwjSIy0a.js";import"./employeeAuthStore-lYSKMuhw.js";import"./utils-BXSzAfFa.js";function Ze(t){const a=Date.now(),f=new Date(t).getTime(),n=Math.floor((a-f)/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;const d=Math.floor(n/60),x=n%60;return x>0?`${d}h ${x}m`:`${d}h`}function He(t,a){const f=Se(new Date,a),n=$e(new Date,a),x=new Date(Date.UTC(n.year,n.month-1,n.day+1)).toISOString().slice(0,10),u={};for(const m of t){const y=m.reservationDate;u[y]||(u[y]=[]),u[y].push(m)}return Object.entries(u).map(([m,y])=>{let b;return m===f?b="Today":m===x?b="Tomorrow":b=Ue(m+"T12:00:00Z","UTC",{weekday:"short",month:"short",day:"numeric",year:void 0}),{date:m,label:b,reservations:y}})}function Je({entry:t,onCall:a,onRecall:f,onSeat:n,onRemove:d,isActioning:x}){const u=t.status==="CALLED"&&t.calledAt?Math.max(0,Math.floor((Date.now()-new Date(t.calledAt).getTime())/6e4)):null;return e.jsxs("div",{className:`flex flex-col sm:flex-row sm:items-center gap-3 p-4 rounded-xl border-2 select-none ${t.status==="CALLED"?"bg-amber-50 border-amber-300":"bg-white border-gray-200"}`,children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold text-lg text-gray-900 truncate",children:t.customerName}),t.status==="CALLED"&&e.jsx(X,{variant:"outline",className:`text-sm ${(u??0)>=10?"bg-red-100 text-red-700 border-red-300":"bg-amber-100 text-amber-800 border-amber-300"}`,children:u!=null&&u>0?`Called ${u}m ago`:"Called"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-500 mt-1",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"h-4 w-4"}),t.partySize]}),t.customerPhone&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"h-4 w-4"}),t.customerPhone]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Pe,{className:"h-4 w-4"}),Ze(t.createdAt)]})]}),t.notes&&e.jsx("p",{className:"text-sm text-gray-400 mt-1 truncate",children:t.notes})]}),e.jsxs("div",{className:"flex items-center gap-2.5 w-full sm:w-auto",children:[t.status==="CALLED"&&t.customerPhone&&e.jsxs(c,{size:"lg",variant:"outline",onClick:f,disabled:x,className:"flex-1 sm:flex-none min-w-[96px] min-h-[52px] text-base",children:[e.jsx(D,{className:"h-6 w-6 mr-1.5"}),"Text again"]}),t.status==="WAITING"&&e.jsxs(c,{size:"lg",onClick:a,disabled:x,className:"flex-1 sm:flex-none min-w-[96px] min-h-[52px] text-base",children:[t.customerPhone?e.jsx(D,{className:"h-6 w-6 mr-1.5"}):e.jsx(Ve,{className:"h-6 w-6 mr-1.5"}),"Call"]}),e.jsxs(c,{size:"lg",variant:"outline",className:"flex-1 sm:flex-none text-green-700 border-green-300 hover:bg-green-50 min-w-[52px] min-h-[52px] text-base",onClick:n,disabled:x,children:[e.jsx(Te,{className:"h-6 w-6"}),e.jsx("span",{className:"hidden md:inline ml-1.5",children:"Seat"})]}),e.jsxs(c,{size:"lg",variant:"outline",className:"flex-1 sm:flex-none text-red-600 border-red-300 hover:bg-red-50 min-w-[52px] min-h-[52px] text-base",onClick:d,disabled:x,children:[e.jsx(Fe,{className:"h-6 w-6"}),e.jsx("span",{className:"hidden md:inline ml-1.5",children:"No-show"})]})]})]})}function Ye({orgName:t,loading:a,error:f,onSubmitCode:n}){const[d,x]=i.useState(""),u=d.length===8&&!a;return e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-6 select-none",children:e.jsxs("div",{className:"w-full max-w-sm bg-white rounded-2xl border border-gray-200 shadow-sm p-7 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 h-12 w-12 rounded-xl bg-blue-50 text-blue-600 flex items-center justify-center",children:e.jsx(Ge,{className:"h-6 w-6"})}),e.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"Pair this tablet"}),e.jsxs("p",{className:"text-sm text-gray-500 mt-2 leading-relaxed",children:[t?`For ${t}. `:"","In the manager dashboard, open"," ",e.jsx("span",{className:"font-medium text-gray-700",children:"Waitlist → Kiosk devices → Pair a device"}),", then enter the 8-digit code below."]}),e.jsxs("form",{onSubmit:m=>{m.preventDefault(),u&&n(d)},className:"mt-6",children:[e.jsx("input",{value:d,onChange:m=>x(m.target.value.replace(/\D/g,"").slice(0,8)),inputMode:"numeric",autoComplete:"one-time-code",autoFocus:!0,"aria-label":"Pairing code",placeholder:"0 0 0 0 0 0 0 0",className:"w-full text-center font-mono text-2xl tracking-[0.35em] py-3 rounded-xl border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 focus:outline-none tabular-nums"}),f&&e.jsx("p",{className:"text-sm text-red-600 mt-3",children:f}),e.jsx("button",{type:"submit",disabled:!u,className:"mt-5 w-full bg-blue-600 hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed text-white font-semibold py-3 rounded-xl transition-colors",children:a?"Pairing…":"Pair tablet"})]}),e.jsx("p",{className:"text-xs text-gray-400 mt-5",children:"This keeps the guest list private — only tablets a manager pairs can open it."})]})})}function Ss(){const{token:t}=Xe(),a=Qe(),f=Le(),{data:n}=G({queryKey:["staff-kiosk-info",t],queryFn:()=>v.getInfo(t),enabled:!!t,refetchInterval:3e4}),d=(n==null?void 0:n.timezone)||f,x=i.useMemo(()=>new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:d}),[d]),[u,m]=i.useState(!1),[y,b]=i.useState(!1),[De,Ae]=i.useState(new Date),[A,Z]=i.useState(""),[H,J]=i.useState(""),[Y,_]=i.useState(2),[ee,se]=i.useState(""),[q,te]=i.useState(""),[ae,ne]=i.useState(""),[z,ie]=i.useState(""),[E,re]=i.useState(""),[le,oe]=i.useState(2),[ce,me]=i.useState("");i.useEffect(()=>{const s=setInterval(()=>Ae(new Date),3e4);return()=>clearInterval(s)},[]);const[M,de]=i.useState(()=>T.isPaired()),[qe,ue]=i.useState(!1),[ze,xe]=i.useState(null),I=i.useCallback(async s=>{var o,h;ue(!0),xe(null);try{const r=await v.redeemPairing({...s,waitlistToken:t});T.save(r.deviceToken,r.waitlistToken,r.deviceName),de(!0),a.invalidateQueries({queryKey:["staff-kiosk-entries",t]}),a.invalidateQueries({queryKey:["staff-kiosk-reservations",t]})}catch(r){xe(((h=(o=r==null?void 0:r.response)==null?void 0:o.data)==null?void 0:h.message)||"That code is invali
1d or has expired.")}finally{ue(!1)}},[a,t]);i.useEffect(()=>{if(T.isPaired())return;const s=new URLSearchParams(window.location.search).get("pair");s&&I({pairingToken:s})},[I]);const{data:j=[],isLoading:Ee,error:S}=G({queryKey:["staff-kiosk-entries",t],queryFn:()=>v.getEntries(t),enabled:!!t&&M,refetchInterval:5e3});i.useEffect(()=>{var s;((s=S==null?void 0:S.response)==null?void 0:s.status)===401&&(T.clear(),de(!1))},[S]);const{data:R=[]}=G({queryKey:["staff-kiosk-reservations",t],queryFn:()=>C.getUpcomingReservations(t),enabled:!!t&&M,refetchInterval:3e4}),K=i.useMemo(()=>{const s=j.filter(h=>h.status==="CALLED"),o=j.filter(h=>h.status==="WAITING");return[...s,...o]},[j]),Me=i.useMemo(()=>j.filter(s=>s.status==="WAITING").length,[j]),he=i.useMemo(()=>j.filter(s=>s.status==="CALLED").length,[j]),P=i.useMemo(()=>j.filter(s=>s.needsConfirmation),[j]),Ie=g({mutationFn:s=>v.confirmStillWaiting(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),l.success("Party confirmed")},onError:()=>l.error("Could not confirm this party")}),fe=g({mutationFn:s=>v.callEntry(t,s),onSuccess:s=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]});const o=s.customerName;s.customerPhone?s.smsSent?l.success(`Called ${o} — SMS notification sent`):l.success(`Called ${o} — SMS could not be sent`):l.success(`Called ${o} — no phone number on file`)},onError:()=>l.error("Failed to call customer")}),Re=g({mutationFn:s=>v.recallEntry(t,s),onSuccess:s=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),l.success(s.smsSent?`Texted ${s.customerName} again`:`Could not text ${s.customerName} again`)},onError:()=>l.error("Failed to re-text customer")}),W=g({mutationFn:s=>v.seatEntry(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]}),l.success("Customer seated")},onError:()=>l.error("Failed to seat customer")}),Q=g({mutationFn:s=>v.removeEntry(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]}),l.success("Customer removed")},onError:()=>l.error("Failed to remove customer")}),[L,$]=i.useState(null),w=g({mutationFn:s=>v.addWalkin(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]}),m(!1),$(null),O(),l.success("Walk-in added")},onError:s=>{var h,r,je;const o=(r=(h=s==null?void 0:s.response)==null?void 0:h.data)==null?void 0:r.duplicates;if(((je=s==null?void 0:s.response)==null?void 0:je.status)===409&&(o!=null&&o.length)){$(o);return}l.error("Failed to add walk-in")}}),ge=g({mutationFn:s=>C.checkIn(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-entries"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]}),a.invalidateQueries({queryKey:["staff-kiosk-reservations"]}),l.success("Reservation checked in")},onError:()=>l.error("Failed to check in reservation")}),U=g({mutationFn:s=>C.create(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-reservations"]}),a.invalidateQueries({queryKey:["staff-kiosk-info"]}),b(!1),B(),l.success("Reservation created")},onError:()=>l.error("Failed to create reservation")}),Ke=g({mutationFn:s=>C.cancel(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-reservations"]}),l.success("Reservation cancelled")},onError:()=>l.error("Failed to cancel reservation")}),We=g({mutationFn:s=>C.markNoShow(t,s),onSuccess:()=>{a.invalidateQueries({queryKey:["staff-kiosk-reservations"]}),l.success("Marked as no-show")},onError:()=>l.error("Failed to mark no-show")}),k=fe.isPending||W.isPending||Q.isPending||ge.isPending;function O(){Z(""),J(""),_(2),se(""),$(null)}function pe(s=!1){w.mutate({customerName:A.trim(),customerPhone:H.trim()||void 0,partySize:Y,notes:ee.trim()||void 0,...s?{confirmDuplicate:!0}:{}})}function B(){te(""),ne(""),ie(""),re(""),oe(2),me("")}const[be]=i.useState(()=>localStorage.getItem("kioskPath"));return t?M?e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col select-none",children:[e.jsx("header",{className:"bg-white border-b border-gray-200 px-4 py-3 sm:px-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-gray-900",children:(n==null?void 0:n.organizationName)||"Waitlist"}),e.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[e.jsx(X,{variant:"outline",className:(n==null?void 0:n.status)==="ACTIVE"?"bg-green-50 text-green-700 border-green-200":"bg-amber-50 text-amber-700 border-amber-200",children:(n==null?void 0:n.status)==="ACTIVE"?"Active":"Paused"}),e.jsxs("span",{className:"text-sm text-gray-500",children:[Me," waiting",he>0&&`, ${he} called`]}
1)]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"text-lg font-medium text-gray-700",children:x.format(De)}),be&&e.jsxs("button",{onClick:()=>{window.location.href=be},className:"inline-flex items-center gap-1.5 rounded-lg bg-gray-100 px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-200 transition-colors touch-manipulation",children:[e.jsx(Pe,{className:"h-4 w-4"}),"Time Clock"]})]})]})}),e.jsxs("div",{className:"px-4 py-3 sm:px-6 flex gap-2",children:[e.jsxs(c,{size:"lg",onClick:()=>m(!0),className:"flex-1 sm:flex-none min-h-[48px] text-base",children:[e.jsx(Oe,{className:"h-5 w-5 mr-2"}),"Add Walk-in"]}),e.jsxs(c,{size:"lg",variant:"outline",onClick:()=>b(!0),className:"flex-1 sm:flex-none min-h-[48px] text-base",children:[e.jsx(V,{className:"h-5 w-5 mr-2"}),"Add Reservation"]})]}),e.jsxs("div",{className:"px-4 sm:px-6 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(V,{className:"h-4 w-4 text-gray-500"}),e.jsxs("h2",{className:"text-sm font-semibold text-gray-700",children:["Upcoming Reservations (",R.length,")"]})]}),R.length===0?e.jsxs("div",{className:"text-center py-6 bg-white rounded-xl border-2 border-dashed border-gray-200",children:[e.jsx(V,{className:"h-10 w-10 text-gray-300 mx-auto mb-2"}),e.jsx("p",{className:"text-gray-500 text-sm",children:"No upcoming reservations"})]}):e.jsx("div",{className:"space-y-3",children:He(R,d).map(({date:s,label:o,reservations:h})=>e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1.5",children:o}),e.jsx("div",{className:"space-y-2",children:h.map(r=>e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 p-3 rounded-xl border-2 border-blue-200 bg-blue-50",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold text-gray-900 truncate",children:r.customerName}),e.jsx(X,{variant:"outline",className:"bg-blue-100 text-blue-800 border-blue-300 text-sm",children:r.reservationTime})]}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-500 mt-1",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"h-4 w-4"}),r.partySize]}),r.customerPhone&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"h-4 w-4"}),r.customerPhone]})]}),r.notes&&e.jsx("p",{className:"text-sm text-gray-400 mt-1 truncate",children:r.notes})]}),e.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[e.jsxs(c,{size:"lg",onClick:()=>ge.mutate(r.id),disabled:k,className:"flex-1 sm:flex-none min-h-[44px]",children:[e.jsx(Te,{className:"h-5 w-5 mr-1"}),"Check In"]}),e.jsx(c,{size:"lg",variant:"outline",className:"flex-1 sm:flex-none text-amber-600 border-amber-300 hover:bg-amber-50 min-h-[44px]",onClick:()=>We.mutate(r.id),disabled:k,title:"No-show",children:e.jsx(Fe,{className:"h-5 w-5"})}),e.jsx(c,{size:"lg",variant:"outline",className:"flex-1 sm:flex-none text-red-600 border-red-300 hover:bg-red-50 min-h-[44px]",onClick:()=>Ke.mutate(r.id),disabled:k,title:"Cancel",children:e.jsx(Be,{className:"h-5 w-5"})})]})]},r.id))})]},s))})]}),e.jsxs("div",{className:"flex-1 px-4 pb-6 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(F,{className:"h-4 w-4 text-gray-500"}),e.jsxs("h2",{className:"text-sm font-semibold text-gray-700",children:["Waitlist Queue (",K.length,")"]})]}),Ee?e.jsx("div",{className:"flex items-center justify-center py-16",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):K.length===0?e.jsxs("div",{className:"text-center py-16 bg-white rounded-xl border-2 border-dashed border-gray-200",children:[e.jsx(F,{className:"h-14 w-14 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-1",children:"No one in line"}),e.jsx("p",{className:"text-gray-500",children:'Tap "Add Walk-in" to add someone to the waitlist.'})]}):e.jsxs("div",{className:"space-y-2",children:[P.length>0&&e.jsxs("div",{className:"rounded-xl border-2 border-amber-300 bg-amber-50 p-3",children:[e.jsx("p",{className:"font-medium text-amber-900",children:P.length===1?"1 party waiting a long time — still here?":`${P.length} parties waiting a long time — still here?`}),e.jsx("p",{className:"text-sm text-amber-800",children:"These parties no longer count toward wait estimates for new guests."}),e.jsx("div",{className:"mt-2 space-y-2",children:P.map(s=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-lg bg-white/70 px-3 py-2",children:[e.jsx("span",{className:"font-medium text-gray-900",children:s.customerName}),e.jsxs("span",{className:"text-sm text-gray-600",children:["waiting"," ",Math.floor((Date.now()-new Date(s.createdAt).getTime())/6e4),"m"]}),e.jsxs("div",{className:"ml-auto flex gap-2",children:[e.jsx(c,{variant:"outline",className:"min-h-[44px]",disabled:k,onClick:()=>Ie.mutate(s.id),children:"Still waiting"}),e.jsx(c,{variant:"outline",className:"min-h-[44px]",disabled:k,onClick:()=>W.mutate(s.id),children:"Seat"}),e.jsx(c,{variant:"outline",className:"min-h-[44px]",disabled:k,onClick:()=>Q.mutate(s.id),children:"No-show"})]})]},s.id))})]}),K.map(s=>e.jsx(Je,{entry:s,onCall:()=>fe.mutate(s.id),onRecall:()=>Re.mutate(s.id),onSeat:()=>W.mutate(s.id),onRemove:()=>Q.mutate(s.id),isActioning:k},s.id))]})]}),e.jsx(Ne,{open:u,onOpenChange:s=>{m(s),s||O()},children:e.jsxs(ye,{className:"sm:max-w-md",children:[e.jsx(ke,{children:e.jsx(we,{children:"Add Walk-in"})}),e.jsxs("form",{onSubmit:s=>{s.preventDefault(),pe()},className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-walkin-name",children:"Name *"}),e.jsx(N,{id:"staff-walkin-name",value:A,onChange:s=>Z(s.target.value),placeholder:"Customer name",required:!0,autoFocus:!0,className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-walkin-phone",children:"Phone"}),e.jsx(N,{id:"staff-walkin-phone",type:"tel",value:H,onChange:s=>J(Ce(s.target.value)),placeholder:"(555) 555-5555",className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-walkin-party",children:"Party Size"}),e.jsx(N,{id:"staff-walkin-party",type:"number",min:1,value:Y,onChange:s=>_(parseInt(s.target.value)||1),onFocus:s=>{const o=s.currentTarget;requestAnimationFrame(()=>o.select())},onClick:s=>s.currentTarget.select(),className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-walkin-notes",children:"Notes"}),e.jsx(ve,{id:"staff-walkin-notes",value:ee,onChange:s=>se(s.target.value),placeholder:"Any notes?",rows:2,className:"text-base"})]}),L&&e.jsxs("div",{className:"rounded-md border border-amber-300 bg-amber-50 p-3",children:[e.jsx("p",{className:"font-medium text-amber-900",children:"Already on the list?"}),e.jsx("ul",{className:"mt-1 space-y-0.5 text-sm text-amber-800",children:L.map(s=>e.jsxs("li",{children:[s.customerName," · party of ",s.partySize," · added ",s.minutesAgo,"m ago"]},s.id))}),e.jsx("p",{className:"mt-1 text-xs text-amber-800",children:"Adding a second entry for the same party makes everyone else's wait quote longer."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(c,{type:"button",variant:"outline",size:"lg",className:"min-h-[44px]",onClick:()=>{m(!1),O()},children:"Cancel"}),L?e.jsx(c,{type:"button",size:"lg",className:"min-h-[44px]",disabled:w.isPending,onClick:()=>pe(!0),children:w.isPending?"Adding...":"Add anyway"}):e.jsx(c,{type:"submit",size:"lg",className:"min-h-[44px]",disabled:!A.trim()||w.isPending,children:w.isPending?"Adding...":"Add to Waitlist"})]})]})]})}),e.jsx(Ne,{open:y,onOpenChange:s=>{b(s),s||B()},children:e.jsxs(ye,{className:"sm:max-w-md",children:[e.jsx(ke,{children:e.jsx(we,{children:"Add Reservation"})}),e.jsxs("form",{onSubmit:s=>{s.preventDefault(),U.mutate({customerName:q.trim(),customerPhone:ae.trim()||void 0,partySize:le,reservationDate:z,reservationTime:E,notes:ce.trim()||void 0})},className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-name",children:"Name *"}),e.jsx(N,{id:"staff-res-name",value:q,onChange:s=>te(s.target.value),placeholder:"Customer name",required:!0,autoFocus:!0,className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-phone",children:"Phone"}),e.jsx(N,{id:"staff-res-phone",type:"tel",value:ae,onChange:s=>ne(Ce(s.target.value)),placeholder:"(555) 555-5555",className:"min-h-[44px] text-base"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-date",children:"Date *"}),e.jsx(N,{id:"staff-res-date",type:"date",value:z,onChange:s=>ie(s.target.value),min:Se(new Date,d),required:!0,className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-time",children:"Time *"}),e.jsx(N,{id:"staff-res-time",type:"time",value:E,onChange:s=>re(s.target.value),required:!0,className:"min-h-[44px] text-base"})]})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-party",children:"Party Size"}),e.jsx(N,{id:"staff-res-party",type:"number",min:1,value:le,onChange:s=>oe(parseInt(s.target.value)||1),onFocus:s=>{const o=s.currentTarget;requestAnimationFrame(()=>o.select())},onClick:s=>s.currentTarget.select(),className:"min-h-[44px] text-base"})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"staff-res-notes",children:"Notes"}),e.jsx(ve,{id:"staff-res-notes",value:ce,onChange:s=>me(s.target.value),placeholder:"Any notes?",rows:2,className:"text-base"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(c,{type:"button",variant:"outline",size:"lg",className:"min-h-[44px]",onClick:()=>{b(!1),B()},children:"Cancel"}),e.jsx(c,{type:"submit",size:"lg",className:"min-h-[44px]",disabled:!q.trim()||!z||!E||U.isPending,children:U.isPending?"Creating...":"Create Reservation"})]})]})]})})]}):e.jsx(Ye,{orgName:n==null?void 0:n.organizationName,loading:qe,error:ze,onSubmitCode:s=>I({code:s})}):e.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:e.jsx("p",{className:"text-gray-500 text-lg",children:"Invalid kiosk link"})})}
1export{Ss 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.