PageSourceSearch

https://zoko-studios-vollst-v49z.bolt.host/assets/VoucherCheckPage-BT1iKpNI.js

js zoko-studios-vollst-v49z.bolt.host collected 2026-10-03 03:11:22 UTC 6,376 bytes, 1 lines download raw bytes

1import{n as g,d as f,r as a,j as e,S as d,m,k as j,f as N,s as v}from"./index-Bm8T6_6G.js";import{f as x,a as y,b as w}from"./voucher-xvdpMtZY.js";import{A as k}from"./alert-circle-Cnf5ncEV.js";import{R as h,G as S,f as C,d as G}from"./de-CK02G6GN.js";import{S as E}from"./shield-BzPOza1U.js";const R=()=>{const{code:s}=g(),r=f(),[t,u]=a.useState(null),[b,i]=a.useState(!0),[l,o]=a.useState(null),c=async()=>{if(!s){o("Kein Gutschein-Code angegeben"),i(!1);return}try{i(!0),o(null);const{data:n,error:p}=await v.from("vouchers").select("remaining_cents, status, created_at").eq("code",s).maybeSingle();if(p||!n)throw new Error("Gutschein nicht gefunden");u({remainingCents:n.remaining_cents,status:n.status,createdAt:n.created_at})}catch(n){console.error("Error loading voucher:",n),o(n instanceof Error?n.message:"Fehler beim Laden")}finally{i(!1)}};return a.useEffect(()=>{c()},[s]),b?e.jsx("div",{className:"pt-24 pb-16 bg-stone-100 min-h-screen",children:e.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"bg-white p-8 rounded-lg border border-stone-200 shadow-sm text-center",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-stone-300 border-t-black rounded-full animate-spin mx-auto mb-4"}),e.jsx("p",{className:"text-stone-600 font-medium",children:"Lade Gutschein-Daten..."})]})})}):l||!t?e.jsxs(e.Fragment,{children:[e.jsx(d,{title:"Gutschein nicht gefunden - ZØKO Studios",description:"Der gesuchte Gutschein konnte nicht gefunden werden."}),e.jsx("div",{className:"pt-24 pb-16 bg-stone-100 min-h-screen",children:e.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white p-8 rounded-lg border border-stone-200 shadow-sm text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(k,{className:"w-8 h-8 text-red-600"})}),e.jsx("h1",{className:"text-2xl font-bold text-black mb-2",children:"Gutschein nicht gefunden"}),e.jsx("p",{className:"text-stone-600 mb-6",children:l}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx("button",{onClick:()=>r("/"),className:"bg-black text-white px-6 py-3 rounded-lg hover:opacity-80 transition-opacity font-semibold",children:"Zur Hauptseite"}),e.jsxs("button",{onClick:c,className:"bg-stone-600 text-white px-6 py-3 rounded-lg hover:opacity-80 transition-opacity font-semibold flex items-center justify-center gap-2",children:[e.jsx(h,{size:16}),"Erneut versuchen"]})]})]})})})]}):e.jsxs(e.Fragment,{children:[e.jsx(d,{title:`Gutschein ${s==null?void 0:s.substring(0,8)}... - ZØKO Studios`,description:`ZØKO Studios Gutschein mit ${x(t.remainingCents)} verfügbarem Guthaben.`,keywords:"ZOKO Studios Gutschein, Gutschein Kontostand, Tattoo Gutschein"}),e.jsx("div",{className:"pt-24 pb-16 bg-stone-100 min-h-screen",children:e.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-white rounded-lg border border-stone-200 shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"bg-black text-white p-6 text-center",children:[e.jsx(S,{className:"w-12 h-12 mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"ZØKO STUDIOS"}),e.jsx("p",{className:"text-stone-300",children:"Geschenkgutschein"})]}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("p",{className:"text-stone-600 text-sm mb-2",children:"Verfügbares Guthaben"}),e.jsx("p",{className:"text-4xl font-bold text-black mb-4",children:x(t.remainingCents)}),e.jsx("div",{className:"inline-flex items-center gap-2",children:e.jsx("span",{className:`px-4 py-2 rounded-full text-sm font-semibold border ${y(t.status)}`,children:w(t.status)})})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-stone-50 p-4 rounded-lg border border-stone-200 text-center",children:[e.jsx(j,{className:"w-6 h-6 mx-auto mb-2 text-stone-600"}),e.jsx("p",{className:"text-xs text-stone-500 uppercase tracking-wide mb-1",children:"Erstellt am"}),e.jsx("p",{className:"font-semibold text-black",children:C(new Date(t.createdAt),"dd. MMMM yyyy",{locale:G})})]}),e.jsxs("div",{className:"bg-stone-50 p-4 rounded-lg border border-stone-200 text-center",children:[e.jsx(E,{className:"w-6 h-6 mx-auto mb-2 text-stone-600"}),e.jsx("p",{className:"text-xs text-stone-500 uppercase tracking-wide mb-1",children:"Code"}),e.jsxs("p",{className:"font-mono text-black text-sm",children:[s==null?void 0:s.substring(0,8),"..."]})]})]}),t.status==="active"&&t.remainingCents>0&&e.jsxs("div",{className:"bg-green-50 p-4 rounded-lg border border-green-200 mb-6",children:[e.jsx("h3",{className:"font-semibold text-green-800 mb-2",children:"Gutschein einlösen"}),e.jsx("p",{className:"text-green-700 text-sm mb-3",children:"Zeigen Sie diesen QR-Code oder den Code im ZØKO Studios vor, um den Gutschein einzulösen."}),e.jsx("p",{className:"text-green-600 text-xs",children:"💡 Tipp: Eine teilweise Einlösung ist möglich - der Rest bleibt erhalten"})]}),t.remainingCents===0&&e.jsx("div",{className:"bg-gray-50 p-4 rounded-lg border border-gray-200 mb-6 text-center",children:e.jsx("p",{className:"text-gray-600 font-medium",children:"Dieser Gutsc
1hein wurde vollständig eingelöst."})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("button",{onClick:c,className:"flex-1 bg-stone-600 text-white px-6 py-3 rounded-lg hover:opacity-80 transition-opacity font-semibold flex items-center justify-center gap-2",children:[e.jsx(h,{size:16}),"Aktualisieren"]}),e.jsxs("button",{onClick:()=>r("/"),className:"flex-1 bg-black text-white px-6 py-3 rounded-lg hover:opacity-80 transition-opacity font-semibold flex items-center justify-center gap-2",children:[e.jsx(N,{size:16}),"Zu ZØKO Studios"]})]}),e.jsxs("div",{className:"text-center mt-6 pt-6 border-t border-stone-200",children:[e.jsx("p",{className:"text-stone-500 text-sm mb-2",children:"ZØKO Studios Mitarbeiter?"}),e.jsx("button",{onClick:()=>r("/vouchers"),className:"text-black hover:opacity-70 transition-opacity text-sm font-semibold",children:"Zum Admin-Bereich →"})]})]})]})})})]})};export{R 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.