PageSourceSearch

https://mtg-collector-pro.base44.app/assets/OrdersToShip-C_anUc1P.js

js mtg-collector-pro.base44.app collected 2026-10-03 03:07:18 UTC 2,496 bytes, 1 lines download raw bytes

1import{l as b,co as f,r as j,j as s,o as v,as as N,at as g}from"./index-BeS4oe1Y.js";import{O as S}from"./OrderExpandable-jmQ2DIUk.js";import"./ban-D9QdHSLA.js";import"./circle-check-CGkKFyKB.js";const w=[{value:"toShip",label:"To Be Shipped"},{value:"shipped",label:"Shipped"},{value:"refunded",label:"Cancelled / Refunded"},{value:"all",label:"All"}];function C(){const{user:a}=b(),{orders:c,loading:u,reload:h}=f(),[t,m]=j.useState("toShip");if(u||!a)return s.jsx("div",{className:"flex justify-center py-24",children:s.jsx(v,{className:"h-6 w-6 animate-spin text-amber-400"})});const r=c.filter(e=>(e.seller_ids||[]).includes(a.id)),d=r.filter(e=>e.status!=="refunded"&&!(e.shipments||[]).some(l=>l.seller_id===a.id)),i=r.filter(e=>e.status!=="refunded"&&(e.shipments||[]).some(l=>l.seller_id===a.id)),n=r.filter(e=>e.status==="refunded"),o=r,x={toShip:d.length,shipped:i.length,refunded:n.length,all:o.length},p=t==="toShip"?d:t==="shipped"?i:t==="refunded"?n:o;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"font-display text-2xl font-semibold flex items-center gap-2",children:[s.jsx(N,{className:"h-6 w-6 text-amber-400"})," Shipping"]}),s.jsx("p",{className:"text-slate-400 mt-1",children:"Fulfill your Card Bazaar orders — upload tracking and review past shipments."})]}),s.jsx("div",{className:"flex items-center gap-1 border-b border-slate-800 overflow-x-auto no-scrollbar",children:w.map(e=>s.jsxs("button",{onClick:()=>m(e.value),className:`inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium border-b-2 whitespace-nowrap transition-colors ${t===e.value?"border-amber-500 text-amber-300":"border-transparent text-slate-400 hover:text-slate-200"}`,children:[e.label,s.jsx("span",{className:`text-xs tabular-nums rounded-full px-1.5 ${t===e.value?"bg-amber-500/20 text-amber-300":"bg-slate-800 text-slate-500"}`,children:x[e.value]})]},e.value))}),p.length===0?s.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-900/40 p-10 text-center",children:[s.jsx(g,{className:"h-10 w-10 text-slate-600 mx-auto mb-3"}),s.jsx("p",{className:"text-slate-400",children:t==="toShip"?"Nothing to ship right now. New orders show up here instantly.":t==="shipped"?"No shipped orders yet.":t==="refunded"?"No refunded orders.":"No orders yet."})]}):s.jsx("div",{className:"space-y-3",children:p.map(e=>s.jsx(S,{order:e,userId:a.id,mode:"seller",onShipped:h,defaultOpen:t==="toShip"},e.id))})]})}export{C 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.