PageSourceSearch

https://beamish-maamoul-a3c725.netlify.app/assets/ReservationConfirmPage-Ab061pVX.js

js beamish-maamoul-a3c725.netlify.app collected 2026-10-03 10:29:41 UTC 3,539 bytes, 1 lines download raw bytes

1import{j as e,s as t}from"./index-B-01gp8C.js";import{h as a,r as s,L as n}from"./vendor-react-7UJKJIhU.js";import{L as r,u as o,l as i}from"./vendor-ui-DJKmmfZX.js";import"./vendor-supabase-CDTnsVBO.js";function l(){const[l]=a(),c=l.get("token"),[d,m]=s.useState("loading"),[x,p]=s.useState("");return s.useEffect(()=>{!async function(){if(!c)return m("error"),void p("Neplatný odkaz - chybí token");try{const{data:a,error:s}=await t.rpc("confirm_reservation_by_token",{p_token:c});if(s)throw s;const n=null==a?void 0:a[0];if(!n)return m("error"),void p("Rezervace nebyla nalezena");if(!n.changed)return m("already-processed"),void p("rejected"===n.status?"Tato rezervace byla odmítnuta a nelze ji potvrdit":"Tato rezervace již byla potvrzena");try{const e="https://ywyxgkacawjjsqhdfhay.supabase.co/functions/v1/send-reservation-confirmation-email";(await fetch(e,{method:"POST",headers:{Authorization:"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl3eXhna2FjYXdqanNxaGRmaGF5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM5NzUwOTgsImV4cCI6MjA3OTU1MTA5OH0.zPvyfUG4z0tYqFpuzHO20i2s9DXHg-yZyUzlvFNgHUQ","Content-Type":"application/json"},body:JSON.stringify({token:c})})).ok&&await t.rpc("mark_reservation_guest_notified",{p_token:c})}catch(e){}m("success"),p("Rezervace byla úspěšně potvrzena!")}catch(a){m("error"),p("Nepodařilo se potvrdit rezervaci")}}()},[c]),e.jsx("div",{className:"min-h-screen bg-parchment-50 py-12 flex items-center",children:e.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:e.jsxs("div",{className:"paper-card p-8 lg:p-10 rounded-vintage border-2 border-oak-300 shadow-vintage text-center",children:["loading"===d&&e.jsxs(e.Fragment,{children:[e.jsx(r,{className:"w-16 h-16 text-copper-600 mx-auto mb-4 animate-spin"}),e.jsx("h1",{className:"text-2xl font-display font-bold text-oak-900 mb-2",children:"Potvrzuji rezervaci..."}),e.jsx("p",{className:"text-oak-600 font-body",children:"Prosím čekejte"})]}),"success"===d&&e.jsxs(e.Fragment,{children:[e.jsx(o,{className:"w-16 h-16 text-green-600 mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl lg:text-3xl font-display font-bold text-oak-900 mb-4",children:x}),e.jsx("p",{className:"text-lg text-oak-700 font-body mb-8",children:"Host bude informován o potvrzení rezervace."}),e.jsxs(n,{to:"/",className:"inline-flex items-center gap-2 btn-vintage",children:[e.jsx(i,{className:"w-4 h-4"}),"Zpět na hlavní stránku"]})]}),"already-processed"===d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-yellow-100 rounded-full flex items-center justify-center",children:e.jsx(o,{className:"w-10 h-10 text-yellow-600"})}),e.jsx("h1",{className:"text-2xl lg:text-3xl font-display font-bold text-oak-900 mb-4",children:x}),e.jsxs(n,{to:"/",className:"inline-flex items-center gap-2 btn-vintage mt-4",children:[e.jsx(i,{className:"w-4 h-4"}),"Zpět na hlavní stránku"]})]}),"error"===d&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 bg-red-100 rounded-full flex items-center justify-center",children:e.jsx("span",{className:"text-3xl",children:"✕"})}),e.jsx("h1",{className:"text-2xl lg:text-3xl font-display font-bold text-oak-900 mb-4",children:x}),e.jsx("p",{className:"text-oak-600 font-body mb-8",children:"Pokud problém přetrvává, kontaktujte restauraci."}),e.jsxs(n,{to:"/",className:"inline-flex items-center gap-2 btn-vintage",children:[e.jsx(i,{className:"w-4 h-4"}),"Zpět na hlavní stránku"]})]})]})})})}export{l as ReservationConfirmPage};

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.