PageSourceSearch

https://letshubon.com/assets/js/index-DremS1BQ.js

js letshubon.com collected 2026-09-24 19:20:58 UTC 2,796 bytes, 1 lines download raw bytes

1import{j as e,L as n}from"./vendor-BEUer1XH.js";import{u}from"./useQuery-BhaiNdUJ.js";import{g as x}from"./coupon.api-DcV2WIU0.js";import{u as g}from"./useUpdateQuery-CBQx1ptH.js";import{B as y}from"./Breadcrumb-DW4w8HQp.js";import{B as h,T as j}from"./index-DENArrSa.js";import{F as f}from"./Table-DVvNjDQl.js";import"./index-xmoZg6gj.js";import"./utils-w1iDNRBg.js";import"./index-C9C5-gxl.js";import"./DownOutlined-CeXDrnPO.js";import"./dropdown-qHy0AlcK.js";import"./LeftOutlined-CpjQE-vN.js";import"./RightOutlined-9GOMZsx1.js";import"./Dropdown-CDCCRALY.js";import"./PurePanel-CbtVgttN.js";import"./index-BzPrgs7b.js";import"./EllipsisOutlined-Djar-icM.js";import"./Overflow-CAQIMHA2.js";import"./mediaQueryUtil-BSyvLspT.js";import"./collapse-BbEVqHco.js";import"./addEventListener-DapjV_MG.js";import"./index-Cn9ZDzL8.js";import"./SearchOutlined-DVVMytpw.js";import"./index-pp2-ToLR.js";import"./index-DQHdZsHa.js";import"./gapSize-U1swVQyS.js";import"./index-B3fdPxRr.js";import"./useForm-DrUwT_4T.js";import"./useBreakpoint-BBrUbbpN.js";import"./Pagination-B4vWHmlc.js";import"./index-CCT_oRJ6.js";import"./index-CUWDS_la.js";import"./Input-CD5EvbY1.js";const{Text:C}=j,b=[{title:"ID",dataIndex:"id",key:"name"},{title:"Code",dataIndex:"code",key:"code",render:(o,m)=>e.jsx(n,{className:"underline",to:`/admin/coupons/${m.id}`,children:o})},{title:"Type",dataIndex:"type",key:"type"},{title:"Quantity",dataIndex:"usage_limit",key:"usage_limit"}],oe=()=>{var c,l;const[o,m]=g({page:1,page_size:5}),{data:t,isLoading:p,isFetching:a,isError:d}=u({queryKey:["coupon",o],queryFn:()=>x(o),select:r=>{var s;return{coupons:(s=r==null?void 0:r.coupons)==null?void 0:s.map(i=>({...i,title:i.code,key:i.id})),meta:r.meta}},retry:0});return e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"container",children:e.jsx(y,{style:{margin:"16px 0"},items:[{title:e.jsx(n,{to:"/admin",children:"..."})},{title:e.jsx(n,{to:"/admin/coupons",children:"Coupons"})}]})}),e.jsxs("section",{className:"container mb-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("p",{className:"text-sm text-right text-muted-darken",children:p||a?"":`${(c=t==null?void 0:t.meta)==null?void 0:c.total_items} results found`}),e.jsx(n,{to:"/admin/coupons/create",children:e.jsx(h,{type:"primary",children:"Add Coupon"})})]}),d?e.jsx("div",{className:"text-center",children:e.jsx(C,{children:"No Found Coupon"})}):e.jsx(f,{loading:p||a,bordered:!0,rowHoverable:!1,scroll:{x:"max-content"},columns:b,dataSource:t==null?void 0:t.coupons,pagination:{showSizeChanger:!0,total:(l=t==null?void 0:t.meta)==null?void 0:l.total_items,current:o.page,pageSize:o.page_size,onChange:(r,s)=>{m(i=>({...i,page:r,page_size:s}))},pageSizeOptions:[5,10,20,50,100]}})]})]})};export{oe 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.