PageSourceSearch

https://titan.growcapitalinc.com/service-provider/assets/index.tsx-Cljh-mKx.js

js growcapitalinc.com collected 2026-10-05 23:19:18 UTC 11,886 bytes, 1 lines download raw bytes

1import{cL as t,cM as B,eJ as be,ey as ve,eK as O,eS as Ne,dA as ye,r,ej as Ie,dG as Te,eM as Se,dr as F,eR as je}from"./chunk-D6vyTsK3.js";import{ev as se,ew as ae,T as ne,i$ as we,a5 as _,c as Ce,it as Re,e as C,m as U,l7 as Be,l8 as Me,bN as Ae,B as ee,i as R,F as b,ff as De,y as D,P as Fe,ax as Pe}from"./chunk-BUY0zr-c.js";import{u as ke}from"./chunk-Db9dKAu8.js";import{T as re}from"./chunk-C0XABCx1.js";import{A as te}from"./chunk-DUJUyxiB.js";import{D as Ee}from"./chunk-BNVjfwNp.js";var L=(s=>(s.None="None",s.Type="Type",s.Amount="Amount",s))(L||{}),oe=(s=>(s.Newest="Newest",s.Oldest="Oldest",s))(oe||{});const ze=s=>{const o=[se.transactions,s];return ae(o,async()=>await re.fetchUserTransactionHistory(s))},Ue=s=>{const o=[se.fetchTradesById,s];return ae(o,async()=>await re.fetchUserTradesById(s))},_e=B(ne).withConfig({displayName:"Investments__InvestmentTable",componentId:"sc-1r4x7pr-0"})(["background:"," !important;table{border:none !important;}thead{border-bottom:none !important;}td{height:50px !important;color:"," !important;}"],({theme:s})=>s.color.greyBlueBg,({theme:s})=>s.color.textPrimary),Le=[{Header:"Investment",accessor:"investmentName",disableSortBy:!0,maxWidth:320},{Header:"Source",accessor:"sourceDisplayName",disableSortBy:!0,maxWidth:200},{Header:"Ticker",accessor:"ticker",disableSortBy:!0,maxWidth:120},{Header:()=>t.jsx("div",{className:"table-cell-right-align",children:"Units"}),accessor:"units",disableSortBy:!0,maxWidth:100,Cell:({row:s})=>t.jsx("div",{className:"text-right",children:we(s.original.units||"")})},{Header:()=>t.jsx("div",{className:"table-cell-right-align",children:"Price"}),accessor:"price",maxWidth:100,disableSortBy:!0,Cell:({row:s})=>t.jsx("div",{className:"text-right",children:_(s.original.price||"")})},{Header:()=>t.jsx("div",{className:"table-cell-right-align p-0",children:"Amount"}),accessor:"dollars",disableSortBy:!0,maxWidth:120,Cell:({row:s})=>{var o;return t.jsx("div",{className:"text-right",children:_(((o=s==null?void 0:s.original)==null?void 0:o.dollars)||0)})}},{Header:"",disableSortBy:!0,id:"action",minWidth:80,Cell:({row:s})=>t.jsx(t.Fragment,{})}],Ve=({row:s})=>{const{id:o}=s==null?void 0:s.original,{data:p,isLoading:c,error:m}=Ue(o);return t.jsx(t.Fragment,{children:t.jsx(_e,{columns:Le,data:p,isLoading:c,shouldShowNoDataMessage:!(p!=null&&p.length),noDataMessage:m?"Error retreiving information":"No data available",noStripedRows:!0,noExternalBorder:!0})})},$e=()=>({dateRange:[F().subtract(90,"days").toDate(),new Date]}),We=B.div.withConfig({displayName:"Transactions__IconContainer",componentId:"sc-1o7t8l9-0"})(["border:2px solid ",";border-radius:8px;height:45px;width:45px;text-align:center;"],({theme:s})=>s.color.greyBlue),He=B(b).withConfig({displayName:"Transactions__QuickLinkItem",componentId:"sc-1o7t8l9-1"})(["border-bottom:1px solid ",";margin-bottom:20px;cursor:pointer;&:last-child{border-bottom:none;}"],({theme:s})=>s.color.inputBorder),Qe=B(ne).withConfig({displayName:"Transactions__TransactionTable",componentId:"sc-1o7t8l9-2"})(["tr.isexpanded td{border-top-right-radius:8px;border-top-left-radius:8px;}table{border:none !important;}thead{border-bottom:1.2px solid ",";}"],({theme:s})=>s.color.textPrimary),Ye=B(b).withConfig({displayName:"Transactions__FilterContainer",componentId:"sc-1o7t8l9-3"})([".select{min-width:130px;max-width:213px;}"]),et=s=>be(s)({component:Ge});function Ge(){var J,X;const{accId:s,planId:o}=ve({strict:!1}),p=O({strict:!1}),c=((J=p==null?void 0:p.transactionTypes)==null?void 0:J.transactions)??[],{user:m}=O({strict:!1}),{products:l}=Ne({strict:!1}),ie=ye(),{queryObject:i}=Ce().fromRoot(),ce=Re(),[f,le]=r.useState({pageNumber:(i==null?void 0:i.pageNumber)||1,pageSize:(i==null?void 0:i.pageSize)||20}),g=r.useMemo(()=>{var e,n,u;return s??((u=(n=(e=p.contributionSummary)==null?void 0:e.accountBalances)==null?void 0:n.find(x=>x.isActive))==null?void 0:u.id)},[s,(X=p.contributionSummary)==null?void 0:X.accountBalances]),{enumToOptions:V}=ke(),v=r.useMemo(()=>{const e=["Census Create User","Census Update User","Election Change","Enrollment","Funding Assignment Change","Sra"];return V(C).filter(n=>n.label?!e.includes(n.label):!0)},[V]),$=r.useMemo(()=>v==null?void 0:v.map(e=>e.value),[v]),P=r.useMemo(()=>[{show:c==null?void 0:c.includes(C.ElectionChange),iconName:"dollarInSlot",route:`/retirement-plans/plan/${o}/account/${g}/transactions/elections`,title:"Investment Elections",content:"Specify or change how your future contributions are invested."},{show:c==null?void 0:c.includes(C.Rebalance),iconName:"scaleUnbalanced",route:`/retirement-plans/plan/${o}/account/${g}/transactions/rebalance`,title:"Rebalance",content:"Allows you to rebalance your existing balances to match your current elections."},{show:c==null?void 0:c.includes(C.Realignment),iconName:"slidersSimple",title:"Realign",route:`/retirement-plans/plan/${o}/account/${g}/transactions/realign`,content:"Realign your existing balances from all your investments into any number of available investments."},{show:c==null?void 0:c.includes(C.FundTransfer),iconName:"moneyBillTransfer",route:`/retirement-plans/plan/${o}/account/${g}/transactions/transfer`,title:"Transfer",content:"Assign percentage allocations among available investment choices."}],[g,o,c]),M=r.useMemo(()=>{const e=l==null?void 0:l.map(n=>Number(n.productId));return Ie(e)},[l]),W=r.useMemo(()=>{var e;if(g){const n=(e=l==null?void 0:l.find(u=>u.investmentAccountId===parseInt(g)))==null?void 0:e.productId;return[Number(n)]}else return M},[g,M,l]),H=r.useMemo(()=>i!=null&&i.transactionType?[i==null?void 0:i.transactionType]:$,[$,i==null?void 0:i.transactionType]),k=r.useMemo(()=>({...$e(),products:W,transactionTypes:H}),[W,H]),{control:y,watch:de,setValue:j,reset:E}=Te({defaultValues:{...k,...i}}),a=de(),ue=r.useCallback(e=>{le({...f,pageNumber:e})},[f]),w=r.useMemo(()=>{const e=U(l,"productName","productId");return Se(e,"value")},[l]),me=r.useCallback(()=>{var n;let e=((n=a.products)==null?void 0:n.filter(u=>!isNaN(u)))||[];return{userIdentifier:(m==null?void 0:m.userIdentifier)||"",planId:Number(o)||void 0,products:e.length>0?e:void 0,startDate:a.dateRange?a.dateRange[0]:F().subtract(90,"days").toDate(),endDate:a.dateRange?a.dateRange[1]:new Date}},[m==null?void 0:m.userIdentifier,o,a.products,a.dateRange]),{data:I}=Be(me()),N=r.useMemo(()=>je(U(I==null?void 0:I.sourceTypes,"contributionSourceCode","sourceId"),["label"]),[I==null?void 0:I.sourceTypes]),T=r.useMemo(()=>N==null?void 0:N.map(e=>e.value),[N]),pe=r.useCallback(()=>{var n,u,x;let e=((n=a.products)==null?void 0:n.filter(A=>!isNaN(A)))||[];return{userIdentifier:(m==null?void 0:m.userIdentifier)||void 0,products:(u=a.products)!=null&&u.length&&((x=a.products)==null?void 0:x.length)!==w.length?e:void 0}},[m==null?void 0:m.userIdentifier,a.products,w.length,a.dateRange]),{data:{investments:Q=[]}={}}=Me(pe()),h=r.useMemo(()=>U(Q,"tickerandName","investmentId"),[Q]),S=r.useMemo(()=>h==null?void 0:h.map(e=>e.value),[h]);r.useEffect(()=>{S!=null&&S.length&&j("investmentIds",S)},[S]),r.useEffect(()=>{T!=null&&T.length&&j("sourceTypes",T)},[T]),r.useEffect(()=>{var e;if(l)if(g){const n=(e=l.find(u=>u.investmentAccountId===parseInt(g)))==null?void 0:e.productId;j("products",[Number(n)])}else j("products",M)},[g,M,y,l,j]);const Y=r.useCallback(()=>{var e;if((e=a.transactionTypes)!=null&&e.length&&a.transactionTypes.length!==v.length)return a.transactionTypes},[a.transactionTypes,v.length]),G=r.useCallback(()=>{var e;if((e=a.investmentIds)!=null&&e.length&&a.investmentIds.length!==(h==null?void 0:h.length))return a.investmentIds},[a.investmentIds,h==null?void 0:h.length]),ge=r.useMemo(()=>{var x,A,Z,q;let e=((x=a.products)==null?void 0:x.filter(z=>!isNaN(z)))??[],n=((A=a.sourceTypes)==null?void 0:A.filter(z=>!isNaN(z)))??[];return{startDate:a.dateRange?a.dateRange[0]:F().subtract(90,"days").toDate(),endDate:a.dateRange?a.dateRange[1]:new Date,transactionTypes:Y(),products:(Z=a.products)!=null&&Z.length&&a.products.length!==w.length&&e.length>0?e:void 0,sourceTypes:(q=a.sourceTypes)!=null&&q.length&&a.sourceTypes.length!==N.length&&n.length>
10?n:void 0,investmentIds:G(),pageSize:f.pageSize,pageNumber:f.pageNumber,sortView:oe.Newest,planId:o?parseInt(o):void 0,investmentAccountId:s?parseInt(s):void 0,posted:!0}},[a.products,a.sourceTypes,a.dateRange,Y,w.length,N.length,G,f.pageSize,f.pageNumber,o,s]);Ae(()=>{E({...k,...i})},[i,E]);const{data:d,isLoading:K}=ze(ge),he=r.useMemo(()=>[{Header:"Effective Date",disableSortBy:!0,accessor:"effectiveDate",Cell:({row:e})=>F(e.original.effectiveDate).format("MM/DD/YYYY")},{Header:"Transaction Type",disableSortBy:!0,id:L.Type,accessor:"type"},{Header:"Subtype",disableSortBy:!0,id:"subtype",accessor:e=>e.subType??"-"},{Header:"Product",disableSortBy:!0,id:"productName",accessor:"productName"},{Header:()=>t.jsx("div",{className:"table-cell-right-align",children:"Amount"}),disableSortBy:!0,id:L.Amount,accessor:"amount",Cell:({row:e})=>t.jsx("div",{className:"table-cell-right-align",children:_(e.original.amount||"0")})},{Header:"",disableSortBy:!0,id:"action",Cell:({row:e})=>t.jsx("div",{className:"text-right",children:t.jsx(ee,{icon:!0,outlined:!0,variant:"secondary",onClick:()=>e.toggleRowExpanded(),children:e.isExpanded?t.jsx(R,{name:"chevronUp",size:"sm"}):t.jsx(R,{name:"chevronDown",size:"sm"})})})}],[]),xe=e=>()=>{var u,x;const n=g??(l!=null&&l.length?(x=(u=l[0])==null?void 0:u.investmentAccountId)==null?void 0:x.toString():void 0);!n||isNaN(Number(n))||ie({to:e,params:{accId:n,planId:o}})},fe=()=>{E({...k,investmentIds:S,sourceTypes:T})};return t.jsxs(b,{flexDirection:"row",className:"w-100",children:[t.jsx(b,{flexGrow:1,flexDirection:"column",className:"w-75",children:t.jsxs(De,{isLoading:K,children:[t.jsxs(b,{gap:"20px",children:[t.jsx(te,{title:"Transaction History",iconName:"clock"}),t.jsx("div",{className:"w-25",children:t.jsx(Ee,{control:y,name:"dateRange",label:"Date Range",disableFuture:!0})})]}),t.jsxs(Ye,{className:"w-100",gap:"8px",children:[t.jsx(D,{className:"select",control:y,name:"transactionTypes",removeNone:!0,label:"Transaction Types",options:v,showAllOption:!0}),t.jsx(D,{className:"select",control:y,name:"products",removeNone:!0,label:"Product",options:w,showAllOption:!0}),t.jsx(D,{className:"select",control:y,name:"investmentIds",removeNone:!0,label:"Investments",options:h,showAllOption:!0}),t.jsx(D,{className:"select",control:y,name:"sourceTypes",removeNone:!0,label:"Source Types",options:N,showAllOption:!0}),t.jsxs(b,{children:[t.jsx(ee,{className:"ml-15",onClick:fe,children:t.jsx(R,{name:"regularXmark"})}),t.jsx("div",{className:"p-10",children:t.jsx(R,{name:"ellipsisVertical",variant:"gray",className:"mr-2"})})]})]}),t.jsxs(b,{flexGrow:1,flexDirection:"column",className:"mt-25",children:[t.jsx(Qe,{className:"bg-white",columns:he,data:(d==null?void 0:d.rowModels)||[],isLoading:K,removeExpandedStyle:!0,shouldShowNoDataMessage:(d==null?void 0:d.rowModels.length)===0,noDataMessage:"No transaction found for the selected filters.",renderRowSubComponent:e=>t.jsx(Ve,{...e})}),d!=null&&d.totalRecords&&(d==null?void 0:d.totalRecords)>f.pageSize?t.jsx(Fe,{pageSize:f.pageSize,numTotalRecords:d==null?void 0:d.totalRecords,pageIndex:f.pageNumber,onPageChange:ue}):null]})]})}),ce?null:t.jsxs("div",{className:"w-25 pl-20",children:[t.jsx(te,{title:"Manage Your Account",iconName:"fileInvoiceDollar"}),t.jsx(b,{flexDirection:"column",children:P==null?void 0:P.map(e=>e.show?t.jsxs(He,{className:"p-20 mb-5",onClick:xe(e.route),children:[t.jsx("div",{children:t.jsx(We,{children:t.jsx(R,{name:e.iconName??"badgeDollar",size:"lg",className:"p-10",variant:"greyBlue"})})}),t.jsxs("div",{className:"ml-15 w-auto content",children:[t.jsx("h4",{className:"mb-5",children:e.title}),t.jsx(Pe,{variant:"body1",children:e.content})]})]},e.title):null)})]})]})}export{et as Route,Ge 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.