PageSourceSearch

https://bbcc.ai/build/assets/handlesellhistory-DUDo732n.js

js bbcc.ai collected 2026-10-05 12:13:30 UTC 10,300 bytes, 8 lines download raw bytes

1import{u as C,r as s,j as t,b as H,H as _,L as m}from"./app-DP13319Q.js";import{F as a,k as r,h as T,f as A,aw as P,j as x,ar as D,ai as F,at as L,az as h,au as z,av as M,ah as $}from"./index-CtyZ6W6U.js";import{D as E}from"./DraggableMenu-Bk7Spryo.js";import{M as j}from"./react-tooltip.min-DW3XhwOj.js";/* empty css            */import"./index-DQkUn08L.js";function q(){const{auth:g,template:I,sales:l}=C().props,[i,f]=s.useState(!1),[w,V]=s.useState(!0),[u,N]=s.useState(l.current_page||1),[c,b]=s.useState(l.data),[d,y]=s.useState(l.current_page<l.last_page),v=s.useCallback(e=>new Date(e).toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),[]),k=s.useCallback(e=>{switch(e){case"completed":return t.jsx(a,{icon:A,className:"text-green-500","data-tooltip-id":"action-tooltip","data-tooltip-content":"Completed"});case"failed":return t.jsx(a,{icon:T,className:"text-red-500","data-tooltip-id":"action-tooltip","data-tooltip-content":"Failed"});case"pending":return t.jsx(a,{icon:r,className:"text-yellow-500 animate-spin","data-tooltip-id":"action-tooltip","data-tooltip-content":"Pending"});default:return t.jsx(a,{icon:r,className:"text-gray-500","data-tooltip-id":"action-tooltip","data-tooltip-content":"Unknown Status"})}},[]),S=s.useCallback(async()=>{if(!(!d||i)){f(!0);try{const e=u+1,o=await H.get("/handlesellhistory",{params:{page:e}});o.data.data&&o.data.data.length>0?(b(n=>[...n,...o.data.data]),N(e),y(o.data.current_page<o.data.last_page)):y(!1)}catch(e){console.error("Error loading more sales:",e)}finally{f(!1)}}},[u,d,i]),p=s.useCallback(e=>{const o=typeof e=="string"?parseFloat(e):e;return isNaN(o)?"0.00":o.toFixed(2)},[]);return t.jsxs(t.Fragment,{children:[t.jsxs(_,{children:[t.jsx("title",{children:"Handle Sell History - Your Domain and Handle Sales"}),t.jsx("meta",{name:"description",content:"View your domain and handle sales history and transactions"}),t.jsx("style",{children:`
2                    .react-tooltip {
3                        z-index: 99999 !important;
4                        opacity: 1 !important;
5                        font-size: 12px;
6                        padding: 4px 8px;
7                    }
8                `})]}),t.jsx(j,{id:"action-tooltip"}),t.jsx(j,{id:"form-tooltip"}),t.jsx(E,{auth:g}),t.jsx("main",{className:"relative flex justify-end p-4 min-h-screen overflow-hidden",children:w&&t.jsx("div",{className:"relative mt-4 mx-auto bottom-4 z-50 backdrop-blur-sm p-4 rounded-xl border border-white-700 overflow-y-auto shadow-2xl w-full max-w-6xl",children:t.jsxs("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-6 space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-6",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(a,{icon:P,className:"text-yellow-400 text-2xl"}),t.jsx("h1",{className:"text-2xl font-bold text-white",children:"Handle Sell History"})]}),t.jsxs(m,{href:"/ez-sell-price",className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-4 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"action-tooltip","data-tooltip-content":"Go to the domain/handle marketplace",children:[t.jsx(a,{icon:x}),"Sell More Handles"]})]}),i&&c.length===0?t.jsx("div",{className:"flex justify-center items-center h-64",children:t.jsx(a,{icon:r,className:"text-yellow-400 text-4xl animate-spin"})}):c.length===0?t.jsxs("div",{className:"text-center py-12",children:[t.jsx(a,{icon:D,className:"text-gray-400 text-5xl mb-4"}),t.jsx("h3",{className:"text-xl font-medium text-gray-300 mb-2",children:"No sales yet"}),t.jsx("p",{className:"text-gray-400 mb-6",children:"Your handle sales history will appear here"}),t.jsxs(m,{href:"/ez-sell-price",className:"inline-flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"action-tooltip","data-tooltip-content":"Start selling your domains and handles",children:[t.jsx(a,{icon:x}),"Sell Domain Handles"]})]}):t.jsxs("div",{className:"overflow-x-auto",children:[t.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[t.jsx("thead",{className:"bg-gray-900/50",children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The specific domain or handle that was sold",children:"Domain/Handle"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The official invoice for this transaction",children:"Invoice"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"Total sale price paid by the buyer",children:"Amount"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The amount you received after commission",children:"Your Earnings"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The platform fee for facilitating the sale",children:"Commission"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The payment method used for the transaction",children:"Method"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"Current status of the transaction (e.g., completed, pending)",children:"Status"}),t.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The date and time the transaction was processed",children:"Date"})]})}),t.jsx("tbody",{className:"bg-gray-800/50 divide-y divide-gray-700",children:c.map(e=>{var o,n;return t.jsxs("tr",{className:"hover:bg-gray-700/50 transition-colors",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":`Sold Item: ${((o=e.domain)==null?void 0:o.url)||"N/A"}`,children:e.domain?t.jsxs("div",{className:"flex items-center",children:[t.jsx(a,{icon:e.domain.type==="custom"?F:x,className:`mr-2 ${e.domain.type==="custom"?"text-blue-400":"text-green-400"}`}),t.jsx("a",{href:e.domain.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-white hover:underline","data-tooltip-id":"action-tooltip","data-tooltip-content":"View the sold domain/handle",children:e.domain.url})]}):t.jsx("span",{className:"text-sm text-gray-400",children:"N/A"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":`Invoice: ${((n=e.invoice)==null?void 0:n.number)||"N/A"}`,children:e.invoice?t.jsxs(m,{href:`/handle-sell-invoice/${e.invoice.number}`,target:"_blank",className:"flex items-center text-sm text-blue-400 hover:text-blue-300 hover:underline","data-tooltip-id":"action-tooltip","data-tooltip-content":"View invoice",children:[t.jsx(a,{icon:L,className:"mr-2"}),e.invoice.number]}):t.jsx("span",{className:"text-sm text-gray-400",children:"N/A"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":"Total sale price",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(a,{icon:h,className:"text-yellow-400 mr-2"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",p(e.amount)]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":"Your share of the sale",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(a,{icon:h,className:"text-yellow-400 mr-2"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",p(e.seller_amount)]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":"Platform fee",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(a,{icon:h,className:"text-red-400 mr-2"}),t.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",p(e.commission)]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":`Payment via ${e.payment_method}`,children:t.jsx("span",{className:"text-sm text-gray-300 capitalize",children:e.payment_method})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[k(e.status),t.jsx("span",{className:"ml-2 text-sm text-gray-300 capitalize",children:e.status})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap","data-tooltip-id":"form-tooltip","data-tooltip-content":e.processed_at,children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(a,{icon:z,className:"text-blue-400 mr-2"}),t.jsx("span",{className:"text-sm text-gray-300",children:v(e.processed_at)})]})})]},e.id)})})]}),t.jsxs("div",{className:"mt-6 flex flex-col items-center space-y-4",children:[t.jsxs("button",{className:"flex items-center gap-2 bg-gray-700 text-white px-4 py-2 rounded-md hover:bg-gray-600 transition-colors",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),"data-tooltip-id":"action-tooltip","data-tooltip-content":"Scroll to the top of the page",children:[t.jsx(a,{icon:M}),"Back to Top"]}),d&&t.jsx("button",{onClick:S,disabled:i,className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors disabled:opacity-50","data-tooltip-id":"action-tooltip","data-tooltip-content":"Load more sales records",children:i?t.jsxs(t.Fragment,{children:[t.jsx(a,{icon:r,className:"animate-spin"}),"Loading..."]}):t.jsxs(t.Fragment,{children:[t.jsx(a,{icon:$}),"Load More"]})})]})]})]})})})]})}export{q 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.