PageSourceSearch

https://www.smarty.com/_next/static/chunks/pages/admin-dashboard/account/transactions-532691f2fed1e1ec.js

js smarty.com collected 2026-10-01 12:15:29 UTC 29,342 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57742],{8827:e=>{e.exports={smartyModal:"smartyModal_smartyModal__ZEwn5",smartyModalLightBackground:"smartyModal_smartyModalLightBackground__TdZ6A",smartyModalCloseIcon:"smartyModal_smartyModalCloseIcon__owE8B",smartyModalIcon:"smartyModal_smartyModalIcon__omI9W",smartyModalContainer:"smartyModal_smartyModalContainer___Khri"}},9700:e=>{e.exports={accountOrderInfo:"orderFilledRecordOfflineForm_accountOrderInfo__7Xt5D"}},13939:e=>{e.exports={loadMaster4000:"adminLoadMaster4000_loadMaster4000__nszsg",loadMaster4000Overlay:"adminLoadMaster4000_loadMaster4000Overlay__Vz6t5",spinnerImage:"adminLoadMaster4000_spinnerImage__hlD9h",spinForever:"adminLoadMaster4000_spinForever__rW0n8",slowerSpinnerImage:"adminLoadMaster4000_slowerSpinnerImage__ZaMva"}},22770:(e,a,t)=>{"use strict";t.d(a,{B9:()=>T,CP:()=>S,CS:()=>$,E3:()=>j,LY:()=>x,Lq:()=>C,T0:()=>f,Tk:()=>g,X_:()=>N,Xs:()=>k,bp:()=>D,gF:()=>w,o8:()=>v,w7:()=>M,xn:()=>I,z2:()=>_});var r=t(62139),n=t(10791),s=t(88203),i=t(73019),o=t(43970),l=t(29769),c=t(41013),d=t(49493),h=t(49668),u=t(76934),m=t(6346),y=t(64548),p=t(92956),A=t(83469),b=t(16353);let f=async(e,a)=>{try{let t=await (0,r.iD)(),{data:s}=await (0,n.T0)(e,a,t);return(0,u.s)(y.e6,s)}catch(e){throw(0,m.Ay)(e)}},w=async(e,a)=>{try{let t=await (0,r.iD)(),{data:s}=await (0,n.gF)(e,a,t);return(0,u.s)(y.e6,s)}catch(e){throw(0,m.Ay)(e)}},x=async()=>{try{let e=await (0,r.iD)(),{data:a}=await (0,s.aN)(e);return(0,u.s)(i.P7,a)}catch(e){throw(0,m.Ay)(e)}},_=async(e,a,t,s,i,o,l,c,h,p)=>{try{let m=await (0,r.iD)(),{data:A}=await (0,n.z2)(parseInt(String(e)),parseInt(String(a)),t,(0,d.ob)(Number(s)),i,o,l,parseInt(String(c)),(0,d.ob)(Number(h)),(0,d.ob)(Number(p)),m);return(0,u.s)(y.uL,A).payment_id}catch(e){throw(0,m.Ay)(e)}},g=async e=>{try{let a=await (0,r.iD)(),{data:t}=await (0,n.Tk)(e,a);return{data:(0,u.s)(y.YN,t)}}catch(e){throw(0,m.Ay)(e)}},j=async(e,a)=>{try{let t=await (0,r.iD)();await (0,o.E3)(e,a,t)}catch(e){throw(0,m.Ay)(e)}},v=async(e,a)=>{try{let t=await (0,r.iD)();await (0,o.o8)(e,a,t)}catch(e){throw(0,m.Ay)(e)}},k=async e=>{try{let a=await (0,r.iD)(),{data:t}=await (0,o.MZ)(e,a);return(0,u.s)(p.cq,t).roles}catch(e){throw(0,m.Ay)(e)}},C=async()=>{try{let e=await (0,r.iD)(),{data:a}=await (0,o.Cs)(e),t=(0,u.s)(p.uP,a);if(t?.users?.length>0)return t.users.map(e=>new h.A({id:e?.user_id,roles:e?.roles,email:e?.email_address,firstName:e?.first_name,lastName:e?.last_name,dateAccepted:"0001-01-01T00:00:00Z",disabled:e?.deactivated!=="0001-01-01T00:00:00Z"}));return[]}catch(e){throw(0,m.Ay)(e)}},N=async e=>{try{let a=await (0,r.iD)();await (0,c.Gm)(e,a)}catch(e){throw(0,m.Ay)(e)}},T=async()=>{try{let e=await (0,r.iD)(),{data:a}=await (0,c.qM)(e);return(0,u.s)(A.xd,a).accounts}catch(e){throw(0,m.Ay)(e)}},I=async(e,a)=>{try{let t=await (0,r.iD)();await (0,c.g$)(e,a,t)}catch(e){throw(0,m.Ay)(e)}},D=async e=>{try{let a=await (0,r.iD)();await (0,c.C5)(e,a)}catch(e){throw(0,m.Ay)(e)}},S=async e=>{try{let a=await (0,r.iD)();await (0,l.jO)(e,a)}catch(e){throw(0,m.Ay)(e)}},$=async e=>{try{let a=await (0,r.iD)();await (0,l.Bf)(e,a)}catch(e){throw(0,m.Ay)(e)}},M=async()=>{try{let e=await (0,r.iD)(),{data:a}=await (0,l.fo)(e);return(0,u.s)(b.y0,a).user_ids}catch(e){throw(0,m.Ay)(e)}}},28398:e=>{e.exports={avatarContainer:"accountAvatar_avatarContainer__sF7B_",circleMain:"accountAvatar_circleMain__2jI2X",circleLarge:"accountAvatar_circleLarge__taUCS",circleSmall:"accountAvatar_circleSmall__w_VkJ"}},33989:(e,a,t)=>{"use strict";t.d(a,{A:()=>h});var r=t(37876),n=t(30903),s=t(73571),i=t(4568),o=t(14232),l=t(43313),c=t(75846),d=t.n(c);let h=()=>{let{adminAccount:e}=(0,o.use)(l.A);return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:d().sideLinks,children:[(0,r.jsx)(i.A,{href:"/admin-dashboard",arrowFirst:!0,children:"Search"}),(0,r.jsx)(n.A,{sidebarLinks:(0,s.gU)(e.id),isAdminAccount:!0})]})})}},37523:e=>{e.exports={transactionInfo:"refundTransactionModal_transactionInfo__LhxOx",transactionDescription:"refundTransactionModal_transactionDescription__tn9sW"}},37645:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});
1var r=t(37876),n=t(14232),s=t(66526),i=t(73573),o=t(16824),l=t(49493);let c=({isRefund:e,hookForm:a,setOrder:t,orders:c,setFilteredTransactions:d,transactions:h,loadTransactions:u})=>{let m=a.watch("order",""),y=c.sort((e,a)=>new Date(a.placedDate??0).getTime()-new Date(e.placedDate??0).getTime()).map(({id:e,amount:a,placedDate:t})=>new i.A((e??"").toString(),`${e} - ${(0,l.tA)((0,l.s7)(a??0))}, ${(0,o.qS)(new Date(t??0))}`)),p=async()=>{if(!m)return;a.resetField("amount"),a.resetField("orders"),a.resetField("transaction");let r=c.find(e=>e.id?.toString()===m);if(t(r),e){await u();let e=h.filter(e=>e.orderId.toString()===m);a.resetField("amount"),d(e)}else r&&a.setValue("amount",(0,l.tA)((0,l.s7)(r.amount??0)))};return(0,n.useEffect)(()=>{p()},[m,a.watch("formType")]),(0,r.jsx)(s.A,{options:y,isRequired:!0,label:"Order",name:"order",hookForm:a,noOptionsText:"No orders found"})}},42087:e=>{e.exports={filterContainer:"filterTransactions_filterContainer__9nGop",filterCheckboxContainer:"filterTransactions_filterCheckboxContainer__wYgf2"}},42669:e=>{e.exports={tooltip:"dateWithTooltip_tooltip__zcBll",tooltipIcon:"dateWithTooltip_tooltipIcon__vp52W",dateContainer:"dateWithTooltip_dateContainer__yLgG1"}},44902:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});var r=t(14232),n=t(67914),s=t(69457),i=t(98227),o=t(22770),l=t(53835);let c=()=>{let e=(0,n.I)({queryKey:["internalRoles"],enabled:s.A.isAuthenticated(),retry:!1,queryFn:async()=>{let e=await (0,i.sh)();return(await (0,o.Xs)(String(e.user_id))).filter(e=>e.startsWith("internal-"))}});return(0,r.useEffect)(()=>{e.error&&(0,l.b$)("We had a problem loading your internal roles, which may limit what actions you can perform. Try refreshing the page, and if the error persists, reach out to frontend.",Array.isArray(e.error)?e.error:(0,l.CP)(e.error.message))},[e.error]),{internalRoles:e.data??[],isLoadingInternalRoles:e.isPending}}},47185:(e,a,t)=>{"use strict";t.d(a,{A:()=>d});var r=t(37876),n=t(14232),s=t(16379),i=t(51786),o=t(76507),l=t(8827),c=t.n(l);
1let d=({children:e,action:a,className:t="",useLightBackground:l=!1,containerClass:d="",hideCloseButton:h=!1,outerContainerAction:u=!0,isAnimating:m=!1,ariaLabelledby:y,ariaLabel:p})=>{let A=(0,o.Ay)({onEscape:a});(0,n.useEffect)(()=>(document.body.classList.add("body--smarty-modal-open"),()=>{document.body.classList.remove("body--smarty-modal-open")}),[]);let b=l?c().smartyModalLightBackground:"";return(0,r.jsx)(s.P.div,{className:`${c().smartyModal} ${t} ${b}`,onClick:u?a:void 0,animate:{backgroundColor:m?"rgba(0,0,0,0)":"rgba(0,0,0,0.77)"},transition:{duration:.6,ease:"easeInOut"},children:(0,r.jsxs)("div",{ref:A,className:`${c().smartyModalContainer} ${d}`,role:"dialog","aria-modal":"true","aria-labelledby":y,"aria-label":p,tabIndex:-1,onClick:e=>e.stopPropagation(),children:[!h&&(0,r.jsx)("button",{type:"button",onClick:a,className:c().smartyModalCloseIcon,"aria-label":"Close modal",children:(0,r.jsx)(i.I,{className:c().smartyModalIcon,icon:"iconXMark-24","aria-hidden":"true"})}),e]})})}},48227:(e,a,t)=>{"use strict";t.d(a,{A:()=>o});var r=t(37876),n=t(14232),s=t(13939),i=t.n(s);let o=({isLoading:e,className:a="",classConfig:t={},children:s})=>{let{overlayClass:o}=t,[l,c]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{e&&c(.98>Math.random())},[e]),(0,r.jsx)("div",{className:`${i().loadMaster4000} `+a,children:e?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:`${i().loadMaster4000Overlay} `+o,children:l?(0,r.jsx)("img",{src:"/img/kevin-picture.jpeg",height:100,width:100,alt:"Kevin spinning",className:i().spinnerImage}):(0,r.jsx)("img",{src:"/img/rotisserie-chicken.png",height:500,width:500,alt:"Rotisserie chicken",className:i().slowerSpinnerImage})})}):(0,r.jsx)(r.Fragment,{children:s})})}},48592:(e,a,t)=>{"use strict";t.d(a,{k:()=>r,z:()=>n});let r={contactInfoSaved:"Contact info saved.",changeUsernameEmailSent:"Request to change login email address has been received. Please check your new email address to confirm the change.",switchedAccount:"Successfully switched accounts.",secretKeyRestored:"Secret key restored successfully!",secretKeyDeleted:"Secret key successfully deleted!",embeddedKeyDeleted:"Embedded key successfully deleted!",keySaved:"Key saved successfully!",keyCreated:"Key successfully created!",embeddedKeyRestored:"Embedded key restored successfully!"},n={unableToLoadPrimaryContact:"Unable to load Primary Contact",unknownErrorMessage:"\uD83D\uDE2E Whoops! Something went wrong. Please try again. If the problem persists, contact support.",formHasFieldErrors:"Please correct the errors and resubmit the form.",networkError:"Network error",unhandledFieldError:"Unhandled field error",switchAccountError:"Unable to switch accounts.",permissionsFailedToLoadError:"Some features might be temporarily unavailable. Please try refreshing the page."}},48791:e=>{e.exports={hookRadioLabel:"hookRadio_hookRadioLabel__sm1Ck",hookRadioContainer:"hookRadio_hookRadioContainer__JqABT",hookRadioNonError:"hookRadio_hookRadioNonError__YvhvH",hookRadioError:"hookRadio_hookRadioError__NkPp_"}},49754:(e,a,t)=>{"use strict";t.d(a,{A:()=>d});var r=t(37876),n=t(14232),s=t(75799),i=t(28398),o=t.n(i);let l=[0,1],c={c1:"",c2:""},d=({accountId:e})=>{let a=[{c1:"hsl(226, 100%, 24%)",c2:"hsl(216, 100%, 50%)"},{c1:"hsl(216, 100%, 50%)",c2:"hsl(213, 100%, 78%)"},{c1:"hsl(216, 100%, 50%)",c2:"hsl(257, 100%, 84%)"},{c1:"hsl(216, 100%, 50%)",c2:"hsl(182, 80%, 74%)"},{c1:"hsl(183, 62%, 53%)",c2:"hsl(132, 73%, 71%)"},{c1:"hsl(135, 57%, 54%)",c2:"hsl(56, 95%, 77%)"},{c1:"hsl(338, 89%, 65%)",c2:"hsl(21, 100%, 80%)"},{c1:"hsl(260, 100%, 69%)",c2:"hsl(341, 100%, 84%)"}],t=[[0,1],[2,3],[4,5],[6,7],[1,0],[3,2],[5,4],[7,6],[7,6],[3,4],[4,3],[6,7],[1,2],[2,1],[1,3],[0,3]],[i,d]=(0,n.useState)(0),[h,u]=(0,n.use
1State)(0),[m,y]=(0,n.useState)(0),[p,A]=(0,n.useState)(0),[b,f]=(0,n.useState)(0),[w,x]=(0,n.useState)(l),[_,g]=(0,n.useState)(0),[j,v]=(0,n.useState)(0),[k,C]=(0,n.useState)(0),[N,T]=(0,n.useState)(20);(0,n.useEffect)(()=>{(async()=>{let a=String(e),r=await (0,s.t)(a,t.length-1),n=t[r];n&&x(n),d(await (0,s.t)(a,360)),u(await (0,s.t)(a+"A",360)),y(await (0,s.t)(a+"B",360)),A(await (0,s.t)(a+"C",360)),f(await (0,s.t)(a+"D",360)),T(await (0,s.t)(a,20)+10),g(await (0,s.t)(a,1)),v(await (0,s.t)(a+"E",1)),C(await (0,s.t)(a+"F",1))})()},[e]);let I=(e=0)=>a[w[e]??0]??c;return(0,r.jsxs)("div",{className:o().avatarContainer,style:{transform:`rotate(${i}deg)`},children:[(0,r.jsx)("div",{className:o().circleMain,style:{background:`linear-gradient(${h}deg, ${I(_).c1} 0%, ${I(_).c2} 100%`}}),(0,r.jsx)("div",{className:o().circleLarge,style:{background:`linear-gradient(${m}deg, ${I(j).c1} 0%, ${I(j).c2} 100%)`,left:`${N}px`}}),(0,r.jsx)("div",{className:o().circleSmall,style:{background:`linear-gradient(${p}deg, ${I(k).c1} 0%, ${I(k).c2} 100%)`,left:`${N-37}px`,transform:`rotate(${b}deg)`}})]})}},50124:(e,a,t)=>{"use strict";t.d(a,{A:()=>b});var r=t(37876),n=t(68435),s=t(5467),i=t(80997),o=t(49493),l=t(92646),c=t(14232),d=t(43313),h=t(88992),u=t(78098),m=t(68917),y=t(51786),p=t(75846),A=t.n(p);let b=({index:e,transaction:a,setTransaction:t,setRefundFormIsOpen:p,showOrderId:b=!1,canPerformFinancialActions:f})=>{let{adminAccount:w}=(0,c.use)(d.A),{openDropdownId:x,toggleActionDropdown:_}=(0,m.A)(),g=e%2==0?A().alternatingColors:"",j=(0,h.mN)({mode:"onBlur"}),v=[{label:"Refund/Void Transaction",action:()=>{t(a),j.setValue("amount",(0,o.tA)((0,o.s7)(a.amountInCents))),p(!0)}}];return(0,r.jsxs)("div",{className:A().tableRow,children:[(0,r.jsx)(n.nA,{className:g,children:(0,r.jsx)(s.A,{href:`/admin-dashboard/account/transaction-details?account_id=${w.id}&transaction_id=${a.id}`,children:a.id})}),(0,r.jsx)(n.nA,{className:g,children:(0,r.jsx)(i.A,{date:a.createdDate})}),(0,r.jsx)(n.nA,{className:g,children:(0,o.tA)((0,o.s7)(a.amountInCents))}),b&&(0,r.jsx)(n.nA,{className:g,children:a.orderId?(0,r.jsx)(s.A,{href:`/admin-dashboard/account/order-details?account_id=${w.id}&order_id=${a.orderId}`,children:a.orderId}):"- -"}),(0,r.jsx)(n.nA,{className:g,children:a.paymentForm}),(0,r.jsxs)(n.nA,{className:`${g} ${A().transactionStatusCell}`,children:[a.gatewayResponse,a.gatewayMessage&&"Approved"!==a.gatewayMessage&&(0,r.jsx)(u.A,{children:(0,r.jsx)("div",{className:A().deactivatedMessage,children:a.gatewayMessage})})]}),(0,r.jsx)(n.nA,{className:g,children:a.isVoided?"Yes":"No"}),f&&(0,r.jsx)(r.Fragment,{children:a.isVoided||a.amountInCents<0?(0,r.jsx)(n.nA,{className:g}):(0,r.jsx)(n.nA,{className:g,onClick:()=>_(a.id),children:(0,r.jsx)(l.A,{actionEllipses:!0,includeArrow:!1,options:v,isOpen:x===a.id,children:(0,r.jsx)(y.I,{icon:"iconEllipses-25"})})})})]},a.id)}},52597:(e,a,t)=>{"use strict";t.d(a,{A:()=>l});var r=t(14232),n=t(53835),s=t(69457),i=t(67768),o=t(67914);let l=(e,a)=>{let t=(0,i.jE)(),l=["orders",e?.id],c=(0,o.I)({queryKey:l,enabled:a&&s.A.isAuthenticated(),retry:!1,queryFn:async()=>e?(await e.billing.loadOrders(),e.orders):[]});(0,r.useEffect)(()=>{c.error&&e?.id&&(0,n.zP)(c.error)},[c.error,e?.id]);let d=c.data??[],h=async()=>{await c.refetch()};return{orders:d,ordersAreLoaded:!c.isPending,successLoadingOrders:c.isSuccess,errorLoadingOrders:c.isError,reloadOrders:h,emptyOrders:()=>{t.setQueryData(l,[])}}}},52797:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var r=t(37876),n=t(48791),s=t.n(n),i=t(14232),o=t(88992),l=t(19192),c=t(23347),d=t(47945),h=t(84016),u=t(63894),m=t(85125),y=t(48272);let p=({name:e,hookForm:a,options:t,customOnChange:n,isRow:p=!0,getCheckedValue:A=(e,t)=>a.getValues(e)===t.value})=>{let b=(0,i.useId)(),{errorMessage:f}=(0,l.IW)(e,a,[],!1);return(0,r.jsx)("div",{children:(0,r.jsx)(o.xI,{name:e,control:a.control,render:({field:{value:a,onChange:i}})=>{let o=a??t[0]?.value;return(0,r.jsx)(y.A,{theme:l.LY,children:(0,r.jsx)("div",{className:`${s().hookRadioContainer} ${f?s().hookRadioError:s().hookRadioNonError}`,children:(0,r.jsxs)(c.A,{children:[(0,r.jsx)(d.A,{name:e,row:p,...f?{"aria-invalid":!0,"aria-describedby":b}:{},value:o,onChange:e=>{i(),n(e.target.value)},children:t.map((a,t)=>(0,r.jsx)(h.A,{checked:A(e,a),value:a.value,control:(0,r.jsx)(u.A,{size:"small"}),label:a.label,sx:l.BO},t))}),f?(0,r.jsx)(m.A,{id:b,error:!0,sx:l.hO,children:f}):null]})})})}})})}},59260:(e,a,t)=>{"use strict";t.d(a,{A:()=>s});var r=t(89099),n=t(14232);let s=(e,a)=>{let t=(0,r.useRouter)(),s=(0,n.useRef)(e);(0,n.useEffect)(()=>
1{if(!t.isReady||s.current===e)return;s.current=e;let r=new URL(window.location.href);e?r.searchParams.set("modal",a):r.searchParams.delete("modal"),window.history.replaceState({},"",r)},[e,t.isReady,a])}},61390:e=>{e.exports={checkmark:"selectorCheckbox_checkmark__YW_lN",wrapper:"selectorCheckbox_wrapper__ay7Fm",checkbox:"selectorCheckbox_checkbox__1fYK_",input:"selectorCheckbox_input__8PJo5",onBlueWrapper:"selectorCheckbox_onBlueWrapper__XBswO"}},65124:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});var r=t(37876),n=t(43313),s=t(14232),i=t(96735),o=t(89099),l=t(53835);let c=({children:e})=>{let{adminAccount:a,setAdminAccount:t,isDoneLoadingAdminAccount:c}=(()=>{let e=(0,o.useRouter)(),[a,t]=(0,s.useState)(new i.A),[r,n]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{(()=>{if(!e.isReady)return;n(!1);let a=Number(e.query?.account_id);a||(0,l.zP)((0,l.CP)("The account ID is missing and must be provided"),"admin-dashboard"),isNaN(a)||t(new i.A(a)),n(!0)})()},[e.isReady,e.asPath]),{adminAccount:a,setAdminAccount:t,isDoneLoadingAdminAccount:r}})();return(0,r.jsx)(n.A,{value:{adminAccount:a,setAdminAccount:t,isDoneLoadingAdminAccount:c},children:e})}},67689:(e,a,t)=>{"use strict";t.d(a,{A:()=>n});var r=t(14232);let n=e=>(0,r.useMemo)(()=>{if(!e)return"";try{let a=new Date(e);if(isNaN(a.getTime()))return"";return a.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit",hour:"numeric",minute:"2-digit",timeZoneName:"short",hour12:!0})}catch(e){return console.error("Error formatting time in useFormattedTime:",e),""}},[e])},68435:(e,a,t)=>{"use strict";t.d(a,{A0:()=>o,AC:()=>i,Am:()=>l,nA:()=>c});var r=t(37876),n=t(68483),s=t.n(n);let i=({className:e="",children:a,isAdminDashTable:t=!1,style:n={}})=>(0,r.jsx)("div",{role:"table",className:`${s().tableWrapper} ${e} ${t?s().adminDashTable:""}`,style:n,children:a}),o=({className:e="",children:a,onClick:t=()=>{},ariaSort:n="none"})=>(0,r.jsx)("div",{role:"columnheader","aria-sort":n,tabIndex:0,className:`${s().tableHeader} ${s().tableCell} ${e}`,onClick:t,onKeyDown:e=>("Enter"===e.key||" "===e.key)&&t(e),children:a}),l=({className:e="",children:a})=>(0,r.jsx)("div",{role:"rowheader",className:`${s().tableHorizontalHeader} ${s().tableCell} ${e}`,children:a}),c=({className:e="",children:a,onClick:t})=>t?(0,r.jsx)("div",{role:"cell",className:`${s().tableCell} ${e}`,children:(0,r.jsx)("button",{type:"button",className:s().tableCellButton,onClick:t,children:a})}):(0,r.jsx)("div",{role:"cell",className:`${s().tableCell} ${e}`,children:a})},68483:e=>{e.exports={tableCellButton:"table_tableCellButton__SELpa",tableWrapper:"table_tableWrapper__xiVq5",adminDashTable:"table_adminDashTable__rlIr8",tableHeader:"table_tableHeader__lYGQu",tableHorizontalHeader:"table_tableHorizontalHeader__CmO4y",tableCell:"table_tableCell__LUGkt"}},68917:(e,a,t)=>{"use strict";t.d(a,{A:()=>n});var r=t(14232);let n=()=>{let[e,a]=(0,r.useState)(null);return{openDropdownId:e,toggleActionDropdown:e=>{a(a=>a===e?null:e)}}}},73571:(e,a,t)=>{"use strict";t.d(a,{G2:()=>s,dl:()=>n,gU:()=>r,v$:()=>o});let r=e=>[{href:`/admin-dashboard/account?account_id=${e}`,label:"Account Info"},{href:`/admin-dashboard/account/contacts?account_id=${e}`,label:"Team"},{href:`/admin-dashboard/account/payment-methods?account_id=${e}`,label:"Payment Methods"},{href:`/admin-dashboard/account/transactions?account_id=${e}`,label:"Transactions"},{href:`/admin-dashboard/account/licenses?account_id=${e}`,label:"Subscriptions"},{href:`/admin-dashboard/account/reports?account_id=${e}`,label:"Reports"},{href:`/admin-dashboard/account/orders?account_id=${e}`,label:"Orders"},{href:`/admin-dashboard/account/keys?account_id=${e}`,label:"Keys"},{href:`/admin-dashboard/account/audit-logs?account_id=${e}`,label:"Audit Logs"}],n=()=>[{href:"/admin-dashboard",label:"Search",requiredPermissions:["hasDashboardAccess"]},{href:"/admin-dashboard/favorited-accounts",label:"Favorited Accounts",requiredPermissions:["hasDashboardAccess"]},{href:"/admin-dashboard/employee-flashcards",label:"Employee Flashcards",requiredPermissions:["hasDashboardAccess"]},{href:"/admin-dashboard/clear-security-rate-limits",label:"Clear Security Rate Limits",requiredPermissions:["canPerformGeneralActions"],roles:["internal-finance","internal-plan-admin","internal-plan-editor","internal-root","internal-low","internal-subscription-editor"]},{href:"/admin-dashboard/set-api-trace",label:"Set API Trace",requiredPermissions:["canPerformGeneralActions"],roles:["internal-finance","internal-plan-admin","internal-plan-editor","internal-root","internal-low","internal-subscription-editor"]},{href:"/admin-dashboard/financial-tools",label:"Financial Tools",requiredPermissions:["canPerformGeneralActions"],roles:["internal-finance","internal-root"]},{href:"/admin-dashboard/internal-users",label:"Internal User Management",requiredPermissions:["isRootUser"],roles:["internal-root"]},{href:"/admin-dashboard/inventory-manager",label:"Inventory Manager",requiredPermissions:["hasDashboardAccess"]},{href:"/admin-dashboard/streamed-reports",label:"Streamed Reports",requiredPermissions:["canPerformGeneralActions"],roles:["internal-finance","internal-plan-admin","internal-plan-editor","internal-root","internal-low","internal-subscription-editor"]}],s=(e,a)=>e.filter(e=>!e.roles?.length||e.roles.some(e=>a.includes(e))),i={canEditSubscriptions:["internal-subscription-editor","internal-root"],canPerformFinancialActions:["internal-finance","internal-root"],canPerformGeneralActions:["internal-low","internal-finance","internal-subscription-editor","internal-plan-editor","internal-plan-admin","internal-root"],canDoInventory:["internal-root","internal-plan-editor","internal-plan-admin"],isRootUser:["internal-root"],hasDashboardAccess:["internal-low","internal-finance","internal-subscription-editor","internal-plan-editor","internal-plan-admin","internal-root","internal-read-only"]},o=(e,a)=>{let t=i[a];return e.some(e=>t.includes(e))}},80997:(e,a,t)=>{"use strict";t.d(a,{A:()=>c});var r=t(37876),n=t(16824),s=t(78098),i=t(67689),o=t(42669),l=t.n(o);let c=({date:e})=>{let a=new Date(null===e?0:e??NaN),t=(0,n.qS)(a),o=(0,i.A)(e);return(0,r.jsxs)("div",{className:l().dateContainer,children:[t,(0,r.jsx)(s.A,{className:l().tooltipIcon,openTooltipClassName:l().tooltip,children:o})]})}},82661:(e,a,t)=>{"use strict";t.d(a,{A:()=>p});var r=t(37876),n=t(14232),s=t(47185),i=t(37899),o=t(57777),l=t(53835),c=t(49493),d=t(91196),h=t(88992),u=t(43313),m=t(37523),y=t.n(m);let p=({transaction:e,setTransaction:a,setModalIsOpen:t,transactions:m,loadTransactions:p})=>{let{adminAccount:A}
1=(0,n.use)(u.A),b={amount:(0,c.tA)((0,c.s7)(e.amountInCents))},f=(0,h.mN)({mode:"onBlur",defaultValues:b}),w=async(t,r,n,s)=>{try{let i=await A.getAccessToken();await e.refundTransaction(t,r,n,s,i),await p(),f.reset(),a(m.find(a=>a.id===e.id)??null),x(),(0,o.tP)("Transaction successfully refunded.")}catch(e){(0,l.zP)(e)}},x=()=>{f.reset(),t(!1)};return(0,r.jsx)(s.A,{action:x,children:(0,r.jsxs)(i.A,{cardTitle:"Refund/Void Transaction",children:[(0,r.jsxs)("div",{className:y().transactionInfo,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"Account ID:"})," ",A.id]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"Transaction ID:"})," ",e.id]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"Total transaction amount:"})," ",(0,c.tA)((0,c.s7)(e.amountInCents))]})]}),(0,r.jsxs)("div",{className:y().transactionDescription,children:[(0,r.jsx)("em",{children:"Voids the whole transaction if the transaction hasn't been processed."}),(0,r.jsx)("em",{children:"Refunds the transaction (with the amount specified) if the transaction has been processed."})]}),(0,r.jsx)(d.A,{hookForm:f,transaction:e,onSubmit:w})]})})}},83662:(e,a,t)=>{"use strict";t.r(a),t.d(a,{default:()=>B});var r=t(37876),n=t(65124),s=t(93201),i=t(14232),o=t(37899),l=t(33989),c=t(68435),d=t(43313),h=t(82661),u=t(50124),m=t(92646),y=t(47185),p=t(88992),A=t(701),b=t(74530),f=t(65701),w=t(37645),x=t(52597),_=t(9700),g=t.n(_);let j=({setModalIsOpen:e,transactions:a,loadTransactions:t})=>{let{adminAccount:n,isDoneLoadingAdminAccount:s}=(0,i.use)(d.A),{orders:o}=(0,x.A)(n,s),[l,c]=(0,i.useState)(null),[h,u]=(0,i.useState)([]),[m,y]=(0,i.useState)(null),_={formType:"payment",dateReceived:(0,A.B2)(),paymentMethod:"Stripe"},j=(0,p.mN)({defaultValues:_}),v=j.watch("formType"),k=async()=>{await t(),e(!1)};return(0,i.useEffect)(()=>{let{formType:e}=j.getValues();"payment"===e?j.resetField("amount"):j.setValue("amount",""),j.resetField("transaction")},[j.watch("formType")]),(0,r.jsxs)(b.A,{customAction:k,filteredTransactions:h,setTransaction:y,account:n,order:l,transaction:m,hookForm:j,children:[(0,r.jsx)("em",{children:"This tool adds record of payment or refund to our system."}),(0,r.jsx)("div",{className:g().accountOrderInfo,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"Account ID:"})," ",n.id]})}),(0,r.jsx)(f.A,{hookForm:j}),(0,r.jsx)(w.A,{loadTransactions:t,transactions:a,isRefund:"refund"===v,hookForm:j,setOrder:e=>c(e??null),orders:o,setFilteredTransactions:u})]})};var v=t(34485),k=t(15348),C=t(44733),N=t(73573),T=t(66526),I=t(98834),D=t(42087),S=t.n(D);let $=({allTransactions:e,setFilteredTransactions:a})=>{let t={startDate:"",endDate:(0,A.B2)(),transactionType:"All"},n=(0,p.mN)({mode:"onBlur",defaultValues:t}),s=[new N.A("All","All"),new N.A("Stripe","Stripe"),new N.A("Card","Card"),new N.A("PayPal","PayPal"),new N.A("Check","Check"),new N.A("Wire Transfer","Wire Transfer")],o=(0,C.n)("minAmount",n),l=(0,C.n)("maxAmount",n),c=n.watch("minAmount",""),d=n.watch("maxAmount",""),h=n.watch("searchQuery",""),u=n.watch("startDate",""),m=n.watch("endDate",""),y=n.watch("transactionType",""),b=n.watch("declinedCheckbox","");return(0,i.useEffect)(()=>{let t;t=h.toLowerCase().split(" ").filter(e=>""!==e.trim()),a(e.filter(e=>{let a=t.every(a=>e.id.toString().toLowerCase().includes(a)||e.orderId.toString().toLowerCase().includes(a)),r=(""===c||e.amountInCents/100>=parseInt(c.replace(/,/g,"").replace(/[$]/g,"")))&&(""===d||e.amountInCents/100<=parseInt(d.replace(/,/g,"").replace(/[$]/g,""))),n=!0;if(u||m){let a=new Date(e.createdDate);if(u){let e=new Date(u);n=n&&a>=e}if(m){let[e=0,t=1,r=1]=m.split("-").map(Number),s=new Date(e,t-1,r,23,59,59,999);s.setHours(23,59,59,999),n=n&&a<=s}}let s=""===y||"All"===y||e.paymentForm.toLowerCase()===y.toLowerCase(),i=!b||!e.isVoided&&("Card"!==e.paymentForm||"Accepted"===e.gatewayResponse);return a&&r&&n&&s&&i}))},[h,c,d,u,m,y,b]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:S().filterContainer,children:[(0,r.jsxs)("div",{className:S().filterContainer,children:[(0,r.jsx)(k.A,{label:"Start Date",name:"startDate",attributes:{type:"date"},hookForm:n,shrink:!0}),(0,r.jsx)(k.A,{label:"End Date",name:"endDate",attributes:{type:"date"},hookForm:n,shrink:!0})]}),(0,r.jsxs)("div",{className:S().filterContainer,children:[(0,r.jsx)(k.A,{name:"minAmount",hookForm:n,label:"Min Amount",attributes:{...o},shrink:!0}),(0,r.jsx)(k.A,{name:"maxAmount",hookForm:n,label:"Max Amount",attributes:{...l},shrink:!0})]})]}),(0,r.jsxs)("div",{className:S().filterContainer,children:[(0,r.jsx)("div",{className:S().filterCheckboxContainer,children:(0,r.jsx)(I.A,{name:"declinedCheckbox",register:n.register,onBlue:!0,label:"Hide declined transactions"})}),(0,r.jsx)(k.A,{label:"Transaction ID or order ID",name:"searchQuery",hookForm:n}),(0,r.jsx)(T.A,{name:"transactionType",label:"Transaction type",hookForm:n,options:s})]})]})};var M=t(48227),P=t(44902),R=t(73571),E=t(59260),F=t(75846),L=t.n(F);let O=()=>{let{internalRoles:e,isLoadingInternalRoles:a}=(0,P.A)(),t=(0,R.v$)(e,"canPerformFinancialActions"),{adminAccount:n,isDoneLoadingAdminAccount:p}=(0,i.use)(d.A),{transactions:A,transactionsAreLoaded:b,successLoadingTransactions:f,loadTransactions:w}=(0,v.A)(n,p),[x,_]=(0,i.useState)([]);(0,i.useEffect)(()=>{p&&b&&!a&&_(A)},[p,b,a]);let[g,k]=(0,i.useState)(!1),[C,N]=(0,i.useState)(null),[T,I]=(0,i.useState)(!1),[D,S]=(0,i.useState)(!1);return(0,E.A)(g,"refundTransaction"),(0,E.A)(T,"recordOfflinePayment"),(0,r.jsx)(s.A,{children:(0,r.jsxs)("div",{className:L().adminThemeAccountView,children:[(0,r.jsx)(l.A,{}),(0,r.jsxs)(o.A,{hasBorder:!1,className:L().accountContent,children:[(0,r.jsxs)("div",{className:L().orderPageHeader,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:L().accountCardTitle,children:"Transactions"}),t&&(0,r.jsx)(m.A,{options:[{label:"Record Offline Payment/Refund",action:()=>{I(!0),S(!1)}}],isOpen:D,setIsOpen:S,menuStyling:L().dropdownMenu,children:"Actions"})]}),b&&A.length>0&&(0,r.jsx)("div",{className:L().orderFiltering,children:(0,r.jsx)($,{setFilteredTransactions:_,allTransactions:A})})]}),(0,r.jsx)(M.A,{isLoading:!b,children:x?.length?(0,r.jsxs)(c.AC,{isAdminDashTable:!0,className:t?L().transactionsTable:L().noActionsTransactionsTable,children:[(0,r.jsx)(c.A0,{children:"Transaction ID"}),(0,r.jsx)(c.A0,{children:"Date"}),(0,r.jsx)(c.A0,{children:"Amount"}),(0,r.jsx)(c.A0,{children:"Order ID"}),(0,r.jsx)(c.A0,{children:"Type"}),(0,r.jsx)(c.A0,{children:"Status"}),(0,r.jsx)(c.A0,{children:"Refunded/Voided"}),t&&(0,r.jsx)(c.A0,{}),x?.sort((e,a)=>new Date(a.createdDate).getTime()-new Date(e.createdDate).getTime()).map((e,a)=>(0,r.jsx)(u.A,{index:a,transaction:e,setTransaction:N,setRefundFormIsOpen:k,showOrderId:!0,canPerformFinancialActions:t},e.id))]}):f?(0,r.jsx)("div",{className:L().noTableData,children:"No entries to show"}):(0,r.jsx)("div",{className:`${L().noTableData} ${L().transactionsLoadError}`,children:"There was an error loading your transactions. Please refresh the page, and if the error persists, reach out to frontend."})})]}
1),g&&C&&(0,r.jsx)(h.A,{transactions:A,transaction:C,setTransaction:N,setModalIsOpen:k,loadTransactions:w}),T&&(0,r.jsx)(y.A,{action:()=>I(!1),children:(0,r.jsx)(o.A,{cardTitle:"Record Offline Payment",children:(0,r.jsx)(j,{transactions:A,loadTransactions:w,setModalIsOpen:I})})})]})})},B=()=>(0,r.jsx)(n.A,{children:(0,r.jsx)(O,{})})},91788:(e,a,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin-dashboard/account/transactions",function(){return t(83662)}])},98834:(e,a,t)=>{"use strict";t.d(a,{A:()=>o});var r=t(37876),n=t(51786),s=t(61390),i=t.n(s);let o=({name:e,register:a,checked:t,onChange:s,disabled:o=!1,onBlue:l=!1,label:c,className:d="",checkboxClassName:h=""})=>(0,r.jsxs)("label",{className:`${l?i().onBlueWrapper:i().wrapper} ${d}`,children:[(0,r.jsx)("input",{type:"checkbox",id:e,disabled:o,className:i().input,...a?a(e):{checked:t,onChange:s}}),(0,r.jsx)("div",{className:`${i().checkbox} ${h}`,children:(0,r.jsx)(n.I,{icon:"iconCheck-16",className:i().checkmark})}),!!c&&c]})}},e=>{e.O(0,[88992,96480,28311,75416,83845,78136,55162,84854,15348,54142,5894,45011,96735,62537,90636,46593,38792],()=>e(e.s=91788)),_N_E=e.O()}]);

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.