PageSourceSearch

https://demotelemed.lovable.app/assets/OrderSuccess-BjaniCR9.js

js demotelemed.lovable.app collected 2026-10-03 03:25:36 UTC 6,292 bytes, 8 lines download raw bytes

1import{j as e,s as h,t as p,L as d,v as u,q as j}from"./index-42OYDF60.js";import{L as f,A as g}from"./Layout-CvY-dOeA.js";import{B as n}from"./button-EfpS49lo.js";import{L as N}from"./loader-circle-C9c4MVet.js";import{C as y}from"./circle-check-9IzNzBLR.js";import{B as v}from"./banknote-D_xYAaJj.js";import{C as b}from"./copy-B12tt65m.js";import{M as w}from"./phone-CUz94ybs.js";import{P as C}from"./package-NwB09wg9.js";import"./menu-CkpBHtij.js";import"./mail-T8cR2-w0.js";import"./dialog-BPqr1XfL.js";import"./trash-2-B3_ksNI2.js";import"./minus-LiessKcH.js";import"./plus-UlO-Lz9K.js";const _=()=>{const{orderId:a}=h(),{data:s,isLoading:i}=p({queryKey:["order_lookup",a],queryFn:async()=>{if(!a)return null;const{data:r,error:t}=await u.from("orders").select("*").eq("order_number",a).maybeSingle();if(t)throw t;return r},enabled:!!a});if(i)return e.jsx("div",{className:"container max-w-2xl mx-auto px-4 py-20 text-center",children:e.jsx(N,{className:"h-10 w-10 animate-spin text-primary mx-auto"})});if(!s)return e.jsxs("div",{className:"container max-w-2xl mx-auto px-4 py-20 text-center space-y-4",children:[e.jsx("h1",{className:"text-3xl font-bold",children:"অর্ডার পাওয়া যায়নি"}),e.jsx(n,{asChild:!0,className:"gradient-primary rounded-xl",children:e.jsx(d,{to:"/shop",children:"Shop দেখুন"})})]});const o=s.items||[],c=`Order #${s.order_number}
2${o.map(r=>`• ${r.name} × ${r.quantity} = ৳${r.price*r.quantity}`).join(`
3`)}
4Total: à§³${s.total}
5Name: ${s.customer_name}
6Phone: ${s.customer_phone}
7Address: ${s.shipping_address}, ${s.city||""}
8Payment: ${s.payment_method}`,m=`https://wa.me/8801842525924?text=${encodeURIComponent(c)}`,x=()=>{navigator.clipboard.writeText(s.order_number),j.success("Order ID কপি হয়েছে")},l=s.payment_method==="cod";return e.jsxs("div",{className:"container max-w-3xl mx-auto px-4 py-12 md:py-16",children:[e.jsxs("div",{className:"text-center space-y-4 animate-fade-in-up",children:[e.jsx("div",{className:"inline-flex h-20 w-20 items-center justify-center rounded-3xl gradient-primary shadow-glow mx-auto",children:e.jsx(y,{className:"h-10 w-10 text-primary-foreground"})}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-extrabold tracking-tight",children:[e.jsx("span",{className:"font-serif italic font-normal",children:"Thank You! "}),e.jsx("span",{className:"gradient-hero-text",children:"অর্ডার সফল"})]}),e.jsx("p",{className:"text-muted-foreground",children:"আপনার অর্ডার সফলভাবে গ্রহণ করা হয়েছে। শীঘ্রই আমরা যোগাযোগ করব।"})]}),e.jsxs("div",{className:"mt-10 glass-card rounded-3xl p-6 md:p-8 space-y-6",children:[l&&e.jsxs("div",{className:"rounded-2xl glass border border-success/40 p-4 flex items-start gap-3",children:[e.jsx(v,{className:"h-6 w-6 text-success shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-success",children:"Cash on Delivery"}),e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["পণ্য ডেলিভারি পাওয়ার পরে ",e.jsxs("span",{className:"font-bold text-foreground",children:["৳",Number(s.total).toLocaleString()]})," নগদে পরিশোধ করবেন। কোনো advance payment প্রয়োজন নেই।"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Order ID"}),e.jsx("div",{className:"text-2xl font-extrabold gradient-hero-text",children:s.order_number})]}),e.jsxs(n,{onClick:x,variant:"outline",className:"rounded-xl glass",children:[e.jsx(b,{className:"h-4 w-4"})," Copy ID"]})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl glass p-4 space-y-1 text-sm",children:[e.jsx("div",{className:"font-bold text-foreground mb-1",children:"Shipping"}),e.jsx("div",{className:"text-muted-foreground",children:s.customer_name}),e.jsx("div",{className:"text-muted-foreground",children:s.customer_phone}),e.jsxs("div",{className:"text-muted-foreground",children:[s.shipping_address,s.city?`, ${s.city}`:""]})]}),e.jsxs("div",{className:"rounded-2xl glass p-4 space-y-1 text-sm",children:[e.jsx("div",{className:"font-bold text-foreground mb-1",children:"Payment"}),e.jsx("div",{className:"text-muted-foreground uppercase",children:l?"Cash on Delivery":s.payment_method}),e.jsxs("div",{className:"text-muted-foreground",children:["Status: ",e.jsx("span",{className:"text-warning font-bold uppercase",children:s.status})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[o.map((r,t)=>e.jsxs("div",{className:"flex gap-3 rounded-xl glass p-3",children:[e.jsx("img",{src:r.image,alt:r.name,className:"h-14 w-14 roun
8ded-lg object-cover"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm font-bold line-clamp-1",children:r.name}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Qty: ",r.quantity]})]}),e.jsxs("div",{className:"font-bold text-sm",children:["৳",r.price*r.quantity]})]},t)),e.jsxs("div",{className:"flex justify-between border-t border-border/40 pt-3 font-bold",children:[e.jsx("span",{children:"Total"}),e.jsxs("span",{className:"text-2xl gradient-hero-text",children:["৳",Number(s.total).toLocaleString()]})]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(n,{asChild:!0,className:"rounded-xl gradient-primary h-12 font-bold shadow-glow",children:e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(w,{className:"h-4 w-4"})," WhatsApp Confirm"]})}),e.jsx(n,{asChild:!0,variant:"outline",className:"rounded-xl glass h-12 font-bold",children:e.jsxs(d,{to:"/track-order",children:[e.jsx(C,{className:"h-4 w-4"})," Track Order"]})})]}),e.jsx("div",{className:"text-center",children:e.jsxs(d,{to:"/shop",className:"inline-flex items-center gap-1.5 text-sm text-primary-glow font-bold hover:gap-2.5 transition-smooth",children:["আরো শপিং করুন ",e.jsx(g,{className:"h-4 w-4"})]})})]})]})},E=()=>e.jsx(f,{children:e.jsx(_,{})});export{E 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.