PageSourceSearch

https://paxpay.ng/static/js/8169.65599f0e.chunk.js

js paxpay.ng collected 2026-10-02 02:03:42 UTC 12,774 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkpaxpay_vtu=globalThis.webpackChunkpaxpay_vtu||[]).push([[8169],{451(e,a,l){l.d(a,{lB:()=>n,U1:()=>i,qn:()=>s,S6:()=>u,Ck:()=>h,lM:()=>c,Ub:()=>p,Kw:()=>o,oj:()=>m,G8:()=>d,ki:()=>x,X3:()=>r});l(5043);var t=l(579);function r(e){let{title:a,subtitle:l,action:r}=e;return(0,t.jsxs)("div",{className:"aui-section-hdr",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"aui-section-title",children:a}),l&&(0,t.jsx)("p",{className:"aui-section-sub",children:l})]}),r&&(0,t.jsx)("div",{className:"aui-section-action",children:r})]})}function s(e){let{children:a,className:l="",style:r,onClick:s,onMouseEnter:n,onMouseLeave:i}=e;return(0,t.jsx)("div",{className:`aui-card ${l}`,style:r,onClick:s,onMouseEnter:n,onMouseLeave:i,children:a})}function n(e){var a;let{status:l}=e;const r={success:{label:"Success",cls:"aui-badge--success"},completed:{label:"Completed",cls:"aui-badge--success"},approved:{label:"Approved",cls:"aui-badge--success"},active:{label:"Active",cls:"aui-badge--success"},pending:{label:"Pending",cls:"aui-badge--warning"},processing:{label:"Processing",cls:"aui-badge--info"},failed:{label:"Failed",cls:"aui-badge--danger"},rejected:{label:"Rejected",cls:"aui-badge--danger"},blocked:{label:"Blocked",cls:"aui-badge--danger"},inactive:{label:"Inactive",cls:"aui-badge--muted"},reversed:{label:"Reversed",cls:"aui-badge--muted"}}[null!==(a={0:"success",1:"failed",2:"pending",3:"reversed",5:"processing"}[Number(l)])&&void 0!==a?a:String(null!==l&&void 0!==l?l:"").toLowerCase()]||{label:String(null!==l&&void 0!==l?l:"\u2014"),cls:"aui-badge--muted"};return(0,t.jsx)("span",{className:`aui-badge ${r.cls}`,children:r.label})}function i(e){let{children:a,variant:l="primary",size:r="md",loading:s,icon:n,onClick:i,type:o="button",disabled:d,style:c}=e;return(0,t.jsxs)("button",{type:o,className:`aui-btn aui-btn--${l} aui-btn--${r}`,onClick:i,disabled:d||s,style:c,children:[s?(0,t.jsx)("span",{className:"aui-btn-spinner"}):n?(0,t.jsx)("i",{className:`fas ${n}`}):null,a&&(0,t.jsx)("span",{children:a})]})}function o(e){let{value:a,onChange:l,placeholder:r="Search\u2026"}=e;return(0,t.jsxs)("div",{className:"aui-search",children:[(0,t.jsx)("i",{className:"fas fa-magnifying-glass aui-search-icon"}),(0,t.jsx)("input",{className:"aui-search-input",value:a,onChange:e=>l(e.target.value),placeholder:r}),a&&(0,t.jsx)("button",{className:"aui-search-clear",onClick:()=>l(""),children:(0,t.jsx)("i",{className:"fas fa-xmark"})})]})}function d(e){let{cols:a,rows:l,onRowClick:r,emptyText:s="No records found",loading:n}=e;return n?(0,t.jsx)("div",{className:"aui-table-loader",children:(0,t.jsx)("span",{className:"spinner spinner-dark"})}):(0,t.jsx)("div",{className:"aui-table-wrap",children:(0,t.jsxs)("table",{className:"aui-table",children:[(0,t.jsx)("thead",{children:(0,t.jsx)("tr",{children:a.map(e=>(0,t.jsx)("th",{style:e.style,children:e.label},e.key))})}),(0,t.jsx)("tbody",{children:0===l.length?(0,t.jsx)("tr",{children:(0,t.jsxs)("td",{colSpan:a.length,className:"aui-table-empty",children:[(0,t.jsx)("i",{className:"fas fa-inbox",style:{fontSize:28,marginBottom:8,color:"var(--text-light)"}}),(0,t.jsx)("p",{children:s})]})}):l.map((e,l)=>(0,t.jsx)("tr",{className:r?"aui-table-row--click":"",onClick:()=>null===r||void 0===r?void 0:r(e),children:a.map(a=>{var l;return(0,t.jsx)("td",{children:a.render?a.render(e[a.key],e):null!==(l=e[a.key])&&void 0!==l?l:"\u2014"},a.key)})},l))})]})})}function c(e){let{open:a,onClose:l,title:r,children:s,width:n=480,footer:i,wide:o}=e;if(!a)return null;const d=o?720:n;return(0,t.jsx)("div",{className:"aui-modal-backdrop",onClick:l,children:(0,t.jsxs)("div",{className:"aui-modal",style:{maxWidth:d},onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"aui-modal-header",children:[(0,t.jsx)("h3",{className:"aui-modal-title",children:r}),(0,t.jsx)("button",{className:"aui-modal-close",onClick:l,children:(0,t.jsx)("i",{className:"fas fa-xmark"})})]}),(0,t.jsx)("div",{className:"aui-modal-body",children:s}),i&&(0,t.jsx)("div",{className:"aui-modal-footer",children:i})]})})}function u(e){let{label:a,children:l,hint:r}=e;return(0,t.jsxs)("div",{className:"aui-field",children:[a&&(0,t.jsx)("label",{className:"aui-field-label",children:a}),l,r&&(0,t.jsx)("p",{className:"aui-field-hint",children:r})]})}
1function h(e){let{type:a="text",value:l,onChange:r,placeholder:s,disabled:n,readOnly:i}=e;return(0,t.jsx)("input",{type:a,className:"aui-input",value:l,onChange:r,placeholder:s,disabled:n,readOnly:i})}function m(e){let{value:a,onChange:l,children:r,disabled:s}=e;return(0,t.jsx)("select",{className:"aui-input",value:a,onChange:l,disabled:s,children:r})}function x(e){let{value:a,onChange:l,placeholder:r,rows:s=4}=e;return(0,t.jsx)("textarea",{className:"aui-input aui-textarea",value:a,onChange:l,placeholder:r,rows:s})}function p(){return(0,t.jsx)("div",{className:"aui-page-loader",children:(0,t.jsx)("span",{className:"spinner spinner-dark",style:{width:36,height:36,borderWidth:3}})})}},8169(e,a,l){l.r(a),l.d(a,{default:()=>h});var t=l(5043),r=l(3768),s=l(8903),n=l(451),i=l(579);function o(e){return Number(e||0).toLocaleString("en-NG",{minimumFractionDigits:2})}function d(){return(new Date).toISOString().slice(0,10)}function c(e){let{columns:a,rows:l,loading:t,emptyMsg:r="No data found."}=e;return t?(0,i.jsx)("div",{style:{textAlign:"center",padding:"36px 0",color:"var(--text-light)"},children:(0,i.jsx)("span",{className:"spinner",style:{width:28,height:28,borderWidth:3}})}):l.length?(0,i.jsx)("div",{style:{overflowX:"auto"},children:(0,i.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{style:{borderBottom:"2px solid var(--border)"},children:a.map(e=>(0,i.jsx)("th",{style:{padding:"8px 10px",textAlign:"left",fontWeight:700,color:"var(--text-light)",whiteSpace:"nowrap"},children:e.label},e.key))})}),(0,i.jsx)("tbody",{children:l.map((e,l)=>(0,i.jsx)("tr",{style:{borderBottom:"1px solid var(--border)"},children:a.map(a=>{var t;return(0,i.jsx)("td",{style:{padding:"10px 10px",...a.style||{}},children:a.render?a.render(e,l):null!==(t=e[a.key])&&void 0!==t?t:"\u2014"},a.key)})},l))})]})}):(0,i.jsx)("div",{style:{textAlign:"center",padding:"28px 0",color:"var(--text-light)",fontSize:14},children:r})}function u(e){let{title:a,icon:l,color:t,children:r}=e;return(0,i.jsxs)(n.qn,{style:{marginBottom:24},children:[(0,i.jsxs)("h3",{style:{fontWeight:800,fontSize:15,color:"var(--text-dark)",marginBottom:16},children:[(0,i.jsx)("i",{className:`fas ${l}`,style:{color:t,marginRight:8}}),a]}),r]})}function h(){const[e,a]=(0,t.useState)([]),[l,h]=(0,t.useState)(!0),[m,x]=(0,t.useState)(""),[p,b]=(0,t.useState)([]),[g,y]=(0,t.useState)(!0),[v,f]=(0,t.useState)(""),[j,k]=(0,t.useState)([]),[N,w]=(0,t.useState)(!0),[C,S]=(0,t.useState)(""),[A,$]=(0,t.useState)([]),[B,L]=(0,t.useState)(!0),[R,M]=(0,t.useState)(""),[W,z]=(0,t.useState)([]),F=(0,t.useRef)([]),[T,_]=(0,t.useState)(!0),[E,U]=(0,t.useState)(""),[K,D]=(0,t.useState)(d()),[I,O]=(0,t.useState)(d()),P=(0,t.useCallback)(async()=>{h(!0);try{var e;const l=await(0,s.S9)(1e4);a(Array.isArray(null===(e=l.data)||void 0===e?void 0:e.data)?l.data.data:[])}catch{r.Ay.error("Failed to load referral contest")}finally{h(!1)}},[]),X=(0,t.useCallback)(async()=>{y(!0);try{var e;const a=await(0,s.ao)(1e4);b(Array.isArray(null===(e=a.data)||void 0===e?void 0:e.data)?a.data.data:[])}catch{r.Ay.error("Failed to load refer fund")}finally{y(!1)}},[]),q=(0,t.useCallback)(async()=>{w(!0);try{var e;const a=await(0,s.DU)(10);k(Array.isArray(null===(e=a.data)||void 0===e?void 0:e.data)?a.data.data:[])}catch{r.Ay.error("Failed to load top users")}finally{w(!1)}},[]),G=(0,t.useCallback)(async()=>{L(!0);try{var e;const a=await(0,s.Hn)(10);$(Array.isArray(null===(e=a.data)||void 0===e?void 0:e.data)?a.data.data:[])}catch{r.Ay.error("Failed to load top wallet users")}finally{L(!1)}},[]),H=(0,t.useCallback)(async(e,a)=>{_(!0),U("");try{var l;const t=await(0,s.tL)({limit:1e3,datefrom:e,dateto:a}),r=Array.isArray(null===(l=t.data)||void 0===l?void 0:l.data)?t.data.data:[];F.current=r,z(r)}catch{r.Ay.error("Failed to load sales data")}finally{_(!1)}},[]);(0,t.useEffect)(()=>{P(),X(),q(),G(),H(d(),d())},[P,X,q,G,H]);const J=(e,a)=>{if(!a)return e;const l=a.toLowerCase();return e.filter(e=>{var a,t;return(null===(a=e.email)||void 0===a?void 0:a.toLowerCase().includes(l))||(null===(t=e.referrals)||void 0===t?void 0:t.toLowerCase().includes(l))})},Q=(e,a)=>{if(!a)return e;const l=a.toLowerCase();return e.filter(e=>{var a;return(null===(a=e.email)||void 0===a?void 0:a.toLowerCase().includes(l))||`${e.fname} ${e.lname}`.toLowerCase().includes(l)})},V=[{key:"#",label:"#",render:(e,a)=>a+1},{key:"email",label:"Email"},{key:"total_earned",label:"Amount",render:e=>`\u20a6${o(e.total_earned)}`},{key:"refer_count",label:"Total Refer"},{key:"referrals",label:"Referrers"}],Y=[{key:"#",label:"#",render:(e,a)=>a+1},{key:"name",label:"Name",render:e=>`${e.fname} ${e.lname}`},{key:"total_funded",label:"Total Funded",render:e=>`\u20a6${o(e.total_funded)}`},{key:"email",label:"Email"}],Z=[{key:"#",label:"#",render:(e,a)=>a+1},{key:"name",label:"Name",render:e=>`${e.fname} ${e.lname}`},{key:"balance",label:"Wallet Balance",render:e=>`\u20a6${o(e.balance)}`},{key:"email",label:"Email"}],ee=[{key:"#",label:"#",render:(e,a)=>a+1},{key:"name",label:"Name",render:e=>`${e.fname} ${e.lname}`},{key:"total_spent",label:"Total Spent",render:e=>`\u20a6${o(e.total_spent)}`},{key:"email",label:"Email"}];return(0,i.jsxs)("div",{children:[(0,i.jsx)(n.X3,{title:"User Stats",subtitle:"Referral contests, top funders, wallet balances and sales breakdowns"}),(0,i.jsxs)(u,{title:"Monthly Referral Contest",icon:"fa-trophy",color:"#f59e0b",children:[(0,i.jsx)("div",{style:{marginBottom:12},children:(0,i.jsx)(n.Kw,{value:m,onChange:e=>x(e.target.value),placeholder:"Search email\u2026"})}),(0,i.jsx)(c,{columns:V,rows:J(e,m),loading:l,emptyMsg:"No referral contest data yet."})]}),(0,i.jsxs)(u,{title:"Refer Fund",icon:"fa-hand-holding-dollar",color:"#10b981",children:[(0,i.jsx)("div",{style:{marginBottom:12}
1,children:(0,i.jsx)(n.Kw,{value:v,onChange:e=>f(e.target.value),placeholder:"Search email\u2026"})}),(0,i.jsx)(c,{columns:V,rows:J(p,v),loading:g,emptyMsg:"No refer fund data yet."})]}),(0,i.jsxs)(u,{title:"Top 10 Users",icon:"fa-users",color:"#4f46e5",children:[(0,i.jsx)("div",{style:{marginBottom:12},children:(0,i.jsx)(n.Kw,{value:C,onChange:e=>S(e.target.value),placeholder:"Search name or email\u2026"})}),(0,i.jsx)(c,{columns:Y,rows:Q(j,C),loading:N,emptyMsg:"No top users data yet."})]}),(0,i.jsxs)(u,{title:"Top 10 Wallet Users",icon:"fa-wallet",color:"#0ea5e9",children:[(0,i.jsx)("div",{style:{marginBottom:12},children:(0,i.jsx)(n.Kw,{value:R,onChange:e=>M(e.target.value),placeholder:"Search name or email\u2026"})}),(0,i.jsx)(c,{columns:Z,rows:Q(A,R),loading:B,emptyMsg:"No wallet data yet."})]}),(0,i.jsxs)(u,{title:"Sales by User",icon:"fa-chart-bar",color:"#ef4444",children:[(0,i.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",marginBottom:14,alignItems:"flex-end"},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{style:{fontSize:12,fontWeight:700,color:"var(--text-light)",display:"block",marginBottom:4},children:"Date From"}),(0,i.jsx)("input",{type:"date",value:K,onChange:e=>D(e.target.value),style:{padding:"7px 12px",borderRadius:8,border:"1.5px solid var(--border)",fontSize:13,outline:"none",background:"var(--bg-card)",color:"var(--text-dark)"}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{style:{fontSize:12,fontWeight:700,color:"var(--text-light)",display:"block",marginBottom:4},children:"Date To"}),(0,i.jsx)("input",{type:"date",value:I,onChange:e=>O(e.target.value),style:{padding:"7px 12px",borderRadius:8,border:"1.5px solid var(--border)",fontSize:13,outline:"none",background:"var(--bg-card)",color:"var(--text-dark)"}})]}),(0,i.jsxs)("button",{onClick:()=>H(K,I),style:{padding:"7px 18px",borderRadius:8,border:"none",background:"#4f46e5",color:"#fff",fontWeight:700,fontSize:13,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[(0,i.jsx)("i",{className:"fas fa-search"})," Search"]}),(0,i.jsx)("div",{style:{marginLeft:"auto"},children:(0,i.jsx)(n.Kw,{value:E,onChange:e=>{const a=e.target.value;if(U(a),a){const e=a.toLowerCase();z(F.current.filter(a=>{var l;return(null===(l=a.email)||void 0===l?void 0:l.toLowerCase().includes(e))||`${a.fname} ${a.lname}`.toLowerCase().includes(e)}))}else z(F.current)},placeholder:"Search name or email\u2026"})})]}),(0,i.jsx)(c,{columns:ee,rows:W,loading:T,emptyMsg:"No sales data for selected period."})]})]})}}}]);
2//# sourceMappingURL=8169.65599f0e.chunk.js.map

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.