PageSourceSearch

https://eromantic.ai/static/js/7158.b28c2d97.chunk.js

js eromantic.ai collected 2026-10-05 11:59:15 UTC 8,650 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkeromantic_ai=self.webpackChunkeromantic_ai||[]).push([[7158],{20868:(e,t,s)=>{s.d(t,{A:()=>l});var a=s(44414);const l=e=>{let{pageLinks:t,handlePrevNextPage:s}=e;return(0,a.jsxs)("div",{className:"mt-4 flex justify-end gap-2",children:[(0,a.jsx)("button",{disabled:!t.prev,onClick:()=>s("prev"),className:"px-4 py-1 m-2 font-semibold text-lg rounded-lg transition-colors duration-300 "+(t.prev?"bg-[#000] text-white":"text-gray-600 cursor-not-allowed"),children:"< Prev"}),(0,a.jsx)("button",{disabled:!t.next,onClick:()=>s("next"),className:"px-4 py-1 m-2 font-semibold text-lg rounded-lg transition-colors duration-300 "+(t.next?"bg-[#000] text-white":"text-gray-600 cursor-not-allowed"),children:"Next >"})]})}},74761:(e,t,s)=>{s.d(t,{Q5:()=>r,W3:()=>i,fK:()=>c,ic:()=>o});var a=s(23406),l=s(41337);const n=l.KH.ADMIN,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,a.r6)({title:e,message:t,tone:l.Bf.SUCCESS,persistence:l.G1.TRANSIENT,context:n,source:"admin"})},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Bf.INFO;return(0,a.r6)({title:e,message:t,tone:s,persistence:l.G1.DISMISSIBLE,surface:l.kA.MODAL,context:n,source:"admin"})},i=function(e){return r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Please try again.",l.Bf.ERROR)},o=e=>{let{title:t,message:s,confirmLabel:c,cancelLabel:r="Cancel",destructive:i=!1,intent:o}=e;return(0,a.lr)({title:t,message:s,tone:i?l.Bf.DESTRUCTIVE:l.Bf.WARNING,context:n,...i&&o?{destructiveIntent:o}:{},primaryAction:{action:"confirm",label:c},secondaryAction:{action:"cancel",label:r},source:"admin"})}},77158:(e,t,s)=>{s.r(t),s.d(t,{default:()=>x});var a=s(9950),l=s(74761),n=s(45264),c=s(20868),r=s(94675),i=s(44414);const o=[{value:"pending",label:"Pending"},{value:"matched",label:"Matched"},{value:"rejected",label:"Rejected"},{value:"",label:"All"}],d=e=>e?e.split("T")[0]:"-",x=()=>{const[e,t]=(0,a.useState)(!1),[s,x]=(0,a.useState)({}),[p,u]=(0,a.useState)([]),[m,h]=(0,a.useState)({next:null,prev:null}),[g,b]=(0,a.useState)(null),[y,j]=(0,a.useState)(null),[f,v]=(0,a.useState)(null),[N,w]=(0,a.useState)("pending"),C=async e=>{const t=new URLSearchParams;t.set("search",g||""),t.set("review_status",N),f&&t.set("page_size",f);const s=e&&e.includes("?page")?`${e}&search=${encodeURIComponent(g||"")}&review_status=${encodeURIComponent(N)}${f?`&page_size=${f}`:""}`:`api/v1/admin/user/unmatched-payments/?${t.toString()}`,a=await n.A.get(s,{},!0);a.success&&(h({next:a.data.next,prev:a.data.previous}),u(a.data.results||a.data||[]))};(0,a.useEffect)((()=>{C()}),[]),(0,a.useEffect)((()=>{if(null!=g){const e=setTimeout((()=>j(g)),700);return()=>clearTimeout(e)}}),[g]),(0,a.useEffect)((()=>{null!=y&&C()}),[y]),(0,a.useEffect)((()=>{C()}),[f,N]);const k=async e=>{const t=(e=>`${window.location.origin}/link-payment?email=${encodeURIComponent(e||"")}`)(e);await navigator.clipboard.writeText(t),(0,l.fK)("Link copied","The payment recovery link is on your clipboard.")};return(0,i.jsxs)("div",{className:"bg-white px-7 pb-20 font-josefin-sans",children:[(0,i.jsx)(r.A,{title:"Unmatched Payments",placename:"Search payment email, plan, membership, or checkout",inputValue:g,onSearchChange:e=>b(e.target.value.toLowerCase())}),(0,i.jsxs)("div",{className:"mt-3 mb-5 rounded-lg border border-stone-200 bg-stone-50 px-4 py-3 text-sm text-stone-700",children:[(0,i.jsx)("p",{className:"font-semibold text-stone-900",children:"Payment recovery queue"}),(0,i.jsx)("p",{className:"mt-1",children:"Use these records when a customer paid but their account did not upgrade automatically. Copy the recovery link to help them attach the payment to the correct account."})]}),(0,i.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,i.jsx)("select",{className:"py-1.5 px-3 focus:outline-none text-lg rounded h-10",value:N,onChange:e=>w(e.target.value),children:o.map((e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.label)))}),(0,i.jsxs)("select",{className:"py-1.5 px-3 focus:outline-none text-lg rounded h-10",onChange:e=>v(e.target.value),children:[(0,i.jsx)("option",{value:"20",children:"20"}),(0,i.jsx)("option",{value:"50",children:"50"}),(0,i.jsx)("option",{value:"100",children:"100"}),(0,i.jsx)("option",{value:"500",children:"500"})]})]}),(0,i.jsx)("div",{className:"overflow-x-auto rounded-lg",children:(0,i.jsxs)("table",{className:"w-full text-left text-gray-500 border border-stone-300 table-auto mt-5",children:[(0,i.jsx)("thead",{className:"text-xl text-black bg-stone-300",children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Sr."}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Payment Email"}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Plan"}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Amount"}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Status"}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3",children:"Created At"}),(0,i.jsx)("th",{scope:"col",className:"px-2 2xl:px-6 py-3 text-center",children:"Action"})]})}),(0,i.jsx)("tbody",{children:p.map(((e,s)=>(0,i.jsxs)("tr",{className:"bg-white text-xl font-normal text-black border-b border-stone-300",children:[(0,i.jsxs)("td",{className:"px-2 2xl:px-6 py-4",children:[s+1,"."]}),(0,i.jsx)("td",{className:"px-2 2xl:px-6 py-4",children:e.whop_email}),(0,i.jsx)("td",{className:"px-2 2xl:px-6 py-4",children:e.plan_id||"-"}),(0,i.jsxs)("td",{className:"px-2 2xl:px-6 py-4",children:[e.amount," ",e.currency]}),(0,i.jsx)("td",{className:"px-2 2xl:px-6 py-4 capitalize",children:e.review_status}),(0,i.jsx)("td",{className:"px-2 2xl:px-6 py-4",children:d(e.created_at)}),(0,i.jsxs)("td",{className:"px-2 2xl:px-6 py-4 flex-wrap flex gap-3 justify-center items-center",children:[(0,i.jsx)("button",{className:"px-3 py-1 rounded bg-stone-200 text-sm",onClick:()=>(e=>{x(e),t(!0)})(e),children:"View"}),(0,i.jsx)("button",{className:"px-3 py-1 rounded bg-red-700 text-white text-sm",onClick:()=>k(e.whop_email),children:"Copy Link"})]})]},e.id)))})]})}),(0,i.jsx)(c.A,{pageLinks:m,handlePrevNextPage:async e=>{"next"===e?C(m.next):"prev"===e&&C(m.prev)}}),e&&(0,i.jsx)("div",{className:"fixed inset-0 bg-gray-700 bg-opacity-75 flex justify-center items-center z-50",children:(0,i.jsxs)("div",{className:"relative bg-white rounded-lg shadow-xl p-6 w-full max-w-md landscape:h-[350px] overflow-auto",style:{scrollbarWidth:"none",scrollBehavior:"smooth"},children:[(0,i.jsxs)("div",{className:"flex justify-between items-center pb-3",children:[(0,i.jsx)("p",{className:"text-2xl font-bold",children:"Payment Details"}),(0,i.jsx)("button",{className:"cursor-pointer z-50 text-2xl",onClick:()=>{t(!1)},children:"x"})]}),(0,i.jsxs)("div",{className:"space-y-2",children:[[["ID",s.id],["Payment Email",s.whop_email],["Plan ID",s.plan_id],["Membership ID",s.membership_id],["Checkout ID",s.checkout_id],["Amount",`${s.amount} ${s.currency||""}`],["Review Status",s.review_status],["Matched User",s.matched_user],["Created At",d(s.created_at)],["Resolved At",d(s.resolved_at)]].map((e=>{let[t,s]=e;return(0,i.jsxs)("p",{className:"p-2 m-1 flex flex-wrap justify-between border rounded-lg",children:[(0,i.jsxs)("strong",{className:"mb-1",children:[t,":"]})," ",s||"-"]},t)})),(0,i.jsx)("button",{className:"mt-3 w-full px-4 py-2 rounded bg-red-700 text-white",onClick:()=>k(s.whop_email),children:"Copy Recovery Link"})]})]})})]})}},94675:(e,t,s)=>{s.d(t,{A:()=>l});s(9950);var a=s(44414);const l=e=>{let{title:t,titlesecond:s,placename:l,btnname:n,btnfunction:c,imgDote:r,onSearchChange:i,inputValue:o=""}=e;return(0,a.jsx)("div",{className:"flex flex-wrap justify-around sm:justify-between items-center pt-9 pb-8",children:(0,a.jsxs)("div",{className:"flex justify-center flex-wrap gap-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("p",{className:"text-[28px] font-semibold text-gray-900",children:t}),s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("img",{loading:"lazy",src:r,alt:"dote"}),(0,a.jsx)("p",{className:"text-[28px] font-semibold text-gray-900",children:s})]})]}),l&&(0,a.jsx)("div",{className:"bg-white ms-5 px-2 py-1 border border-zinc-300 rounded-lg flex items-center",children:(0,a.jsx)("input",{type:"text",className:"focus:outline-none text-lg w-full",placeholder:l,value:o,onChange:i})}),n&&(0,a.jsx)("button",{onClick:c,className:"rounded-lg text-lg bg-red-800 hover:bg-red-700 text-white py-2 px-4 min-w-44",children:n})]})})}}}]);

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.