PageSourceSearch

https://dashboard.truv.com/static/UserInformationPage-BpYcsxO4.js

js truv.com collected 2026-09-29 05:18:54 UTC 22,658 bytes, 2 lines download raw bytes

1import{_ as t,a as E,b as U}from"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B7kd0S97.js";import{j as ee,g as R,i as pe,e as _e}from"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react__loadShare__.js-Bny1it6-.js";import{j as te,c as L,h as O,q as fe}from"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare___mf_0_mui_mf_1_material__loadShare__.js-CsRoyloe.js";import{aD as he,aE as Te,a as Ee,aF as ve,aC as Ie,c as se,m as Ne,aG as ge,aH as Re,E as be,ae as ye,D as Se,aI as De,ag as Ue,aJ as Ae}from"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare___mf_0_truvhq_mf_1_ui__loadShare__.js-D5EOjEk8.js";import{f as Y,bS as Pe,e as K,dn as ie,dp as M,bR as ne,dk as Ce,d2 as Le,cm as Oe,bX as $}from"./styles-DS6rwO4K.js";import{g as Me,a as m,R as n,t as we,m as ke,p as Be,b as xe,c as Ye,h as $e,d as q,H as V,e as qe,E as Fe,T as ae,D as oe,u as We,f as Ke,I as Xe,N as B,i as Qe}from"./TransactionsReport-D30AxlEr.js";import{u as je}from"./useQueries-Cd7Lo_pU.js";import{r as x,i as re,u as He,a as Ge,b as Ve,Q as ze,c as le,d as F,e as de,f as X,g as Je,h as Ze,B as et}from"./common-D44rGLFo.js";import{Q}from"./QueryKeys-D1hSO9Bv.js";import{u as tt}from"./useUserTypeByUseCase-Tqs4Oaqn.js";import{u as st,R as k,g as it,E as nt,A as at,I as ot,a as rt,T as lt,b as dt,D as W,S as ct,c as mt,P as ce,d as ut,C as z,i as pt,e as _t,f as J,h as ft,j as ht}from"./ActionsSheet-BPGo1FsC.js";import{P as Tt}from"./common-DpCjfcMM.js";import{i as Et}from"./isNil-CHIgUVhi.js";import{f as vt}from"./formatMoney-C5MoY2NS.js";import{D as j}from"./DetailList-CayBs_uJ.js";import{P as It}from"./ProviderWithLogo-8t--j1bd.js";import{P as Nt,B as gt}from"./PageCard-BRy019R3.js";import{R as D}from"./formatDays-BuR0CMrs.js";import{u as Rt}from"./TaskStatusWrapper-DXcltes_.js";import{u as bt}from"./useResolveProductName-Bk_ahomu.js";import{g as yt}from"./getProductType-03xezQDi.js";import{T as St}from"./TabContext-Dk0B8z36.js";import{T as Dt}from"./TabPanel-DfQLpod7.js";import{aa as Ut}from"./index-C2CHh9Q3.js";import{g as At}from"./getFullName-CYnP5qqX.js";import{u as Pt}from"./useGoBack-D4_OfDfZ.js";import{M as Ct}from"./MobileActionBar-BusqNnNr.js";import{M as Lt,a as Ot}from"./MobileHeader-D0jwFDo2.js";import"./__virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-Iuq05v_9.js";import"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-wPRWw0P9.js";import"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-D1odHnpx.js";import"./__virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-CKo0pHu8.js";import"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CtysS_oS.js";import"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__notistack__loadShare__.js-CLoCY0zO.js";import"./joinOxfordComma-R8ar1xqu.js";import"./LargeDepositField-B4nr5HbD.js";import"./Field-BhUoZrgL.js";import"./index-CwszrpTO.js";import"./RecordCard-BHJWAQVW.js";import"./_createAggregator-BZx34Nww.js";import"./common-Cv-t33nj.js";import"./ExportToCSV-BxnBBr2R.js";import"./downloadFile-A6sJ-Bo0.js";import"./getUserTypeByUseCase-DDUCOhO5.js";import"./ControlTooltip-BeqU1AZF.js";import"./EmptyTableValue-FlEsbR1L.js";import"./AnalyticsLink-JO5-iey5.js";import"./uniqBy-DYvvo-Kr.js";import"./_arrayIncludes-B3ShBz6l.js";import"./startCase-BFGJ3VY5.js";import"./ProductTabIcon-PRW-Hx5M.js";import"./getSuspiciousReason-q8qZdVoU.js";import"./LinkSuspiciousLabel-CrLNM7o9.js";import"./compareLinks-BdtsOpug.js";import"./SheetOptions-C80lROZX.js";import"./common-Dv0ckODv.js";import"./getActiveProductUseCase-B9_YXwPO.js";import"../remoteEntry.js";import"./vite-preload-helper-PPVm8Dsz.js";import"./index-COpJWj9b.js";import"./_virtual_mf___mfe_internal__dashboard__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CiVvsYlj.js";import"./with-selector-ChgXeuaw.js";const H=(e,s=!1)=>
1{if(!e)return{};const o=s?e.links?.filter(a=>a.status==="done"):e.links,i=Me(o??[],"initial_product_type");if(i.assets?.length>1){const a=i.assets.filter(r=>r.status==="done");a.length>0&&(i.assets=[a[0]])}return i},Mt=e=>{const s=je({queries:Object.entries(e).map(([i,a])=>({queryKey:[Q.UseLinkReports,a.map(r=>r.id),i],queryFn:()=>Promise.all(a.map(r=>i==="income"&&r.data_source==="financial_accounts"?x.getBankIncomeReport(r.id):i==="education"?x.getEducationVerification(r.id):Y.getLinkReport(r.id,i==="deposit_switch"?"direct_deposit":i))),enabled:i!=="assets"&&a.length>0}))}),o={employment:[],income:[],deposit_switch:[],pll:[],admin:[],insurance:[],transactions:[],assets:[],education:[]};return Object.entries(e).forEach(([i,a],r)=>{o[i]=s[r].data||[],i==="insurance"&&a?.length&&re(o.insurance?.[0])&&(o.insurance[0].provider=a[0]?.provider)}),o},wt=(e,s)=>s==="assets"?{name:e.provider?.name,type:"assets"}:s==="insurance"?{name:e?.provider?.name,type:"insurance"}:X(e)?{name:e.employments?.[0]?.company?.name,type:"employer"}:s==="transactions"?{name:"",type:"transactions"}:s==="deposit_switch"?{name:e.provider?.name,type:"deposit switch"}:s==="pll"?{name:e.provider?.name,type:"paycheck loan"}:{name:"",type:"borrower"},me=e=>{const{isLoadingBorrowerPdf:s,downloadBorrowerPdf:o}=He(),{downloadAssetsPdf:i,isLoadingAssetsPdf:a}=Ge(),{downloadIncomeInsightsPdf:r,isLoadingIncomeInsightsPdf:u}=Ve(),d=Mt(e),h=tt(),p=Pe();return({item:l,onClose:_})=>{const v=[{id:"reports",label:"Reports",actions:[]}],c=!!l?.income_insights_report_id,N=!!l?.voa_report_id,y=!!l?.voie_report_id;c&&v[0].actions.push({id:`download-report-${l?.id}`,label:"Download bank income report",onClick:()=>{r({userId:l?.id,incomeInsightsReportId:l.income_insights_report_id},{onSettled:_})},isPending:u});const g=p.getQueryData([ze.getVerificationResults,"","",null,"assets",l.id,l.voa_report_id??void 0,void 0]);if(N){const I=g?.is_voe?"DVOE":"assets";v[0].actions.push({id:`download-report-${l?.id}`,label:`Download ${I} report`,onClick:()=>{i({userId:l?.id,reportId:l?.voa_report_id},{onSettled:_})},isPending:a})}return y&&v[0].actions.push({id:"borrower-report",label:`Download ${h} report`,onClick:()=>{o({userId:l?.id,voieReportId:l?.voie_report_id},{onSettled:_})},isPending:s}),Object.entries(d).forEach(([I,b])=>{b?.forEach(T=>{if(le(T)){const P=e.income.find(f=>f.provider?.id===T.provider);v[0].actions.push({id:`download-report-${T.provider}`,label:`Download income report (${P?.provider?.name??T.provider})`,onClick:()=>{window.open(T.pdf_report,"_blank"),_()}});return}if(F(T)||de(T)||T.status!=="done")return;const{name:S,type:A}=wt(T,I);v[0].actions.push({id:`download-report-${T.id}`,label:`Download ${A||I} report ${S?`(${S})`:""}`,onClick:()=>{"pdf_report"in T&&(window.open(T.pdf_report,"_blank"),_())},isDisabled:!("pdf_report"in T)})})}),v}},kt=e=>{const[s,o]=ee(null),i=R(()=>st(e?.links?.map(a=>a.initial_product_type)??[]),[e?.links]);return pe(()=>{if(!e)return;const a=new Set(e.links?.map(r=>r.initial_product_type));o(Tt.find(r=>a.has(r))??"income")},[e]),{activeTab:s,setActiveTab:o,products:i,hasAssets:i.includes("assets"),hasEducation:i.includes("education"),hasInsurance:i.includes("insurance"),hasTransactions:i.includes("transactions"),showTabs:i.length>1}},Z=({item:e,onClose:s})=>{const o=H(e,!0),i=me(o);return t(he,{actions:i({item:e,onClose:s})})},Bt=e=>e?e==="deposit_switch"?"direct_deposit":e==="bank_income"?"income":e:null,xt=({links:e,productType:s,queryEnabled:o=!0})=>{const i=Bt(s),a=e.map(r=>r.id);return K({queryKey:[Q.UseLinkReports,a,i],queryFn:()=>Promise.all(e.map(r=>r.status!=="done"?Promise.resolve(null):i==="income"&&r.data_source==="financial_accounts"?x.getBankIncomeReport(r.id):i==="education"?x.getEducationVerification(r.id):Y.getLinkReport(r.id,i))),enabled:o,staleTime:1/0})},Yt=({bankIncomeReports:e,providers:s})=>e?.length?e.flatMap(o=>{const{provider:i,income:a}=o,r=s?.find(d=>d.id===i)?.name,u={[n.INCOME_SUMMARY]:{title:"Income summary",id:m(i,n.INCOME_SUMMARY),items:{}},...a.reduce((d,h,p)=>(d[`INCOME_SOURCE_${p}`]={title:`Income source ${p+1}`,id:m(i,`${n.INCOME_SOURCES}_${p}`),items:{}},d),{})};return e.length===1?Object.values(u):[{title:t(k,{title:r??i}),id:m(i,n.INCOME_SUMMARY),items:u}]}):[],$t=({productType:e,employments:s,provider:o,providers:i,assetsVerificationResults:a,isAssetsPending:r,hasDocUpload:u,hasTaxReturn:d,assetsIdentityTitle:h,bankIncomeReports:p})=>{switch(e){case"income":return s?.length?s.flatMap(({annual_income_summary:l,bank_accounts:_,company:v,id:c,statements:N,w2s:y,employed_in_role:g,isBenefits:I,isDocUpload:b,isTaxReturn:T})=>({id:c,title:t(k,{employedInRole:g,title:v?.name??""}
1),items:{[n.IDENTITY]:{title:"Identity",id:m(c,n.IDENTITY)},[n.EMPLOYMENT]:{title:I?"Benefits":"Employment",id:m(c,n.EMPLOYMENT)},[n.EMPLOYER]:{title:I?"Company":"Employer",id:m(c,n.EMPLOYER)},[n.INCOME]:{title:"Income",id:m(c,n.INCOME)},...$e(l)&&!I?{[n.ANNUAL_INCOME_SUMMARY]:{title:"Annual income summary",id:m(c,n.ANNUAL_INCOME_SUMMARY)}}:{},...Ye(_)?.length?{[n.BANK_ACCOUNTS]:{title:"Bank accounts",id:m(c,n.BANK_ACCOUNTS)}}:{},...xe(N||[]).length?{[n.PAYROLL_STATEMENTS]:{title:I?"Benefits letter":"Paystubs",id:m(c,n.PAYROLL_STATEMENTS)}}:{},...Be(y)?.length?{[n.W2S]:{title:"W2s",id:m(c,n.W2S)}}:{},...b?{[n.UPLOADED_DOCUMENTS]:{title:"Uploaded documents",id:m(c,n.UPLOADED_DOCUMENTS)}}:{},...T?{[n.TAX_RETURNS]:{title:"Tax returns",id:m(c,n.TAX_RETURNS)}}:{}}})):u?[{id:n.UPLOADED_DOCUMENTS,title:"Uploaded documents",items:{}}]:d?[{id:n.TAX_RETURNS,title:"Tax returns",items:{}}]:[];case"employment":return s?.length?s.flatMap(({company:l,id:_,employed_in_role:v,isDocUpload:c,isTaxReturn:N})=>({id:_,title:t(k,{employedInRole:v,title:l?.name??""}),items:{[n.IDENTITY]:{title:"Identity",id:m(_,n.IDENTITY)},[n.EMPLOYMENT]:{title:"Employment",id:m(_,n.EMPLOYMENT)},[n.EMPLOYER]:{title:"Employer",id:m(_,n.EMPLOYER)},...c?{[n.UPLOADED_DOCUMENTS]:{title:"Uploaded documents",id:m(_,n.UPLOADED_DOCUMENTS)}}:{},...N?{[n.TAX_RETURNS]:{title:"Tax returns",id:m(_,n.TAX_RETURNS)}}:{}}})):u?[{id:n.UPLOADED_DOCUMENTS,title:"Uploaded documents",items:{}}]:d?[{id:n.TAX_RETURNS,title:"Tax returns",items:{}}]:[];case"assets":{if(r)return[{id:e,title:"Loading assets report...",items:{}}];const l=a?.links?.flatMap(v=>v.accounts.map(c=>({title:ke(c.type),mask:c.mask?we(c.mask):void 0,id:c.id}))),_=a?.is_voe;return o?.name&&l?[{id:e,title:o?.name,items:{[n.IDENTITY]:{title:h||"Identity",id:m("assets",n.IDENTITY)},...!_&&{[n.ASSET_SUMMARY]:{title:"Asset summary",id:m("assets",n.ASSET_SUMMARY)},...!Et(a?.large_deposit_threshold)&&{[n.LARGE_DEPOSITS]:{title:`Deposits over ${vt(a?.large_deposit_threshold)}`,id:m("assets",n.LARGE_DEPOSITS)}}},...l?.reduce((v,c,N)=>(v[`ACCOUNT_${N}`]={title:t(k,{employedInRole:c.mask,title:c.title}),id:m("assets_account",c.id)},v),{})}}]:[]}case"transactions":return o?.name?[{id:e,title:o?.name,items:{[n.IDENTITY]:{title:"Identity",id:m("transactions",n.IDENTITY)},[n.BANK_ACCOUNTS]:{title:"Bank accounts",id:m("transactions",n.BANK_ACCOUNTS)},[n.TRANSACTIONS_LIST]:{title:"Transactions",id:m("transactions",n.TRANSACTIONS_LIST)}}}]:[];case"insurance":return o?.name?[{id:e,title:o?.name,items:{[n.IDENTITY]:{title:"Identity",id:m("insurance",n.IDENTITY)},[n.INSURANCE_POLICIES]:{title:"Policies",id:m("insurance",n.INSURANCE_POLICIES)}}}]:[];case"education":return o?.name?[{id:e,title:o?.name,items:{[n.IDENTITY]:{title:"Identity",id:m("education",n.IDENTITY)},[n.ENROLLMENT]:{title:"Enrollment",id:m("education",n.ENROLLMENT)},[n.INSTITUTION]:{title:"Institution",id:m("education",n.INSTITUTION)}}}]:[];case"deposit_switch":case"pll":return o?.name?[{id:e,title:o?.name,items:{}}]:[];case"bank_income":return Yt({bankIncomeReports:p,providers:i});default:return[]}},qt=(e,s)=>K({queryKey:[Q.UseLinkIdentity,e],queryFn:()=>Y.getLinkIdentity(e),enabled:s==="transactions"||s==="insurance"}),Ft=({depositDetails:e,productType:s,pdfReport:o,companyMapping:i,provider:a})=>e?E("div",{id:"report",children:[e.bank_name&&t(q,{className:"mb-8",name:e.bank_name,pdfReport:o}),t(j,{items:[{title:"User's account number",value:e.account_number&&t(V,{shownSymbol
1sNumber:4,value:e.account_number})},{title:"User's routing number",value:e.routing_number&&t(V,{shownSymbolsNumber:4,value:e.routing_number})},{title:"User's account type",value:t("span",{className:"capitalize",children:e.account_type})},{title:"Required amount",value:s==="pll"&&t(Te,{thousandSeparator:!0,valueIsNumericString:!0,displayType:"text",prefix:"$",value:e.deposit_value})},{title:"User's deposit type",value:s==="deposit_switch"&&it(e.deposit_type,e.deposit_value)},{title:"Employer",value:i?.name},{title:"Provider",value:a?.name}]})]}):null,Wt=({report:e,productType:s,documents:o,provider:i,dataSource:a,linkId:r})=>{const u=a==="tax",{employments:d=[],pdf_report:h}=e??{};if(!d.length&&!o?.length&&!u)return null;const p=d.length>1,l=`${qe(d.length)} employers were found in the connected account`;return E(Nt,{fullWidth:!0,children:[p?t(q,{caption:l,className:"mb-5",logoUrl:i?.logo_url,name:i?.name,pdfReport:h}):t(q,{className:"mb-5",name:d?.[0]?.company?.name??i?.name,pdfReport:h}),t(te,{className:"w-full",divider:t(D,{className:L(p&&"ml-0 mr-0")}),children:d.map(_=>t("div",{className:"scroll-mt-24",id:_.id,children:t(Fe,{employment:_,foldRequired:p,foldedByDefault:p,pdfLink:d.length===1?h:void 0,providerId:i?.id,verificationType:s,linkId:r})},_.id))}),u&&E("div",{className:"w-full scroll-mt-24","data-testid":`section-${n.TAX_RETURNS}`,id:m(d[0]?.id||"tax",n.TAX_RETURNS),children:[t(D,{className:"my-6"}),t(ae,{linkId:r})]}),!!o?.length&&E("div",{className:"w-full scroll-mt-24","data-testid":`section-${n.UPLOADED_DOCUMENTS}`,id:m(d[0]?.id||"docs",n.UPLOADED_DOCUMENTS),children:[t(D,{className:"my-6"}),t(oe,{linkId:r,uploadedDocuments:o})]})]})},Kt=[...ie,"assets"],Xt=({report:e,isFetching:s,productType:o,link:i,voaReportId:a,incomeInsightsReportId:r,userId:u})=>{const{data:d}=qt(i.id,o),{data:h,isFetching:p}=We(i.id,{enabled:F(e)?!1:i.data_source==="docs"});if(s||p)return t(Ee,{className:"-mt-[150px] h-screen"});if(ie.includes(o)&&Je(e))return t(Ft,{companyMapping:i.company_mapping,depositDetails:e?.deposit_details,pdfReport:e?.pdf_report,productType:o,provider:i.provider});if(o==="transactions"&&F(e)&&d)return t("div",{id:n.IDENTITY,children:t(Ke,{identity:d,provider:i.provider,transactions:e})});if(o==="insurance"&&d&&re(e))return t("div",{id:m("insurance",n.IDENTITY),children:t(Xe,{identity:d,insurance:e?.insurance,pdf_report:e?.pdf_report,provider:i?.provider})});if(o==="education"&&de(e))return t(nt,{provider:i?.provider,report:e});if(o==="assets"&&a)return t("div",{id:m("assets",n.IDENTITY),children:t(at,{userId:u,voaReportId:a})});if(o==="income"&&r)return t(ot,{incomeInsightsReportId:r,userId:u});if(le(e))return t(gt,{report:e});if(X(e))return t(Wt,{dataSource:i.data_source??e?.data_source,documents:h,linkId:i.id,productType:o,provider:i?.provider??null,report:e});if(i.data_source==="tax")return E(U,{children:[!e&&t(B,{}),!e&&t(D,{className:"my-6"}),t("div",{className:"scroll-mt-8",id:n.TAX_RETURNS,children:t(ae,{linkId:i.id})})]});if(i.data_source==="docs")return E(U,{children:[!e&&t(B,{}),!e&&t(D,{className:"my-6"}),t("div",{className:"scroll-mt-8",id:n.UPLOADED_DOCUMENTS,children:t(oe,{linkId:i.id,uploadedDocuments:h})})]})},Qt=e=>{const{productType:s,report:o,link:i,incomeInsightsReportId:a}=e,r=!(Kt.includes(s)||s==="income"&&(a||i.data_source==="financial_accounts"));return E(U,{children:[t(Xt,{...e}),r&&t("div",{className:"mt-6",children:t(j,{items:[{title:"Data source",value:!!i?.provider&&t(It,{logoSize:24,provider:i.provider})},{title:"Completed",value:!!o&&"completed_at"in o&&!!o.completed_at&&M(o.completed_at)}]})})]})},jt=e=>[...e].sort((o,i)=>new Date(o.updated_at).getTime()-new Date(i.updated_at).getTime()),Ht=({user:e,statuses:s,useCase:o})=>{if(!e)return[];const i=[{title:"User created",icon:t(ve,{icon:t(Ie,{color:se.grey60})}),subtitles:[M(e.created_at)]}],a=jt(e.links??[]),r=a.some(d=>d.initial_product_type!==a[0].initial_product_type),u=a.map(d=>{const h=rt(d),p=M(d.updated_at),l=r?yt({product:d.initial_product_type,useCase:o}):"",_=s?.[d.status]??"";
1return{title:h?.name??"",subtitles:[p,l,_].filter(Boolean),icon:t(Ne,{logoUrl:h?.logo_url,name:h?.name??"",size:24,statusIcon:d.status==="done"?t(ge,{height:16,width:16}):t(Re,{height:16,width:16})})}});return i.push(...u),i},ue=({user:e})=>{const{data:s}=Rt(),{useCase:o}=bt(),i=R(()=>Ht({user:e,statuses:s?.task_statuses,useCase:o}),[e,s,o]);return t(lt,{dataTestId:"user-timeline",events:i})},Gt=({user:e})=>t(dt,{children:t(ue,{user:e})}),Vt=({user:e,activeTab:s})=>{const o=R(()=>e?.links?.some(r=>r.is_suspicious&&r.data_source!=="docs"),[e?.links]),i=R(()=>e?.links?.some(r=>!!r.deleted_at),[e?.links]),a=R(()=>i?E("div",{className:"flex flex-col",children:[t("span",{children:e?.id}),t(O,{className:"text-grey60 pb-4",variant:"body2",children:W})]}):e?.id,[i,e?.id]);return E(U,{children:[t(D,{}),E("div",{className:L("py-8",s&&"pl-0"),id:"user_details","data-testid":"user-information-details",children:[t(O,{className:"pb-6",variant:"h2",children:"User details"}),t(j,{items:[{title:"User ID",value:a},{title:"First name",value:e?.first_name},{title:"Last name",value:e?.last_name},{title:"Email",value:e?.email},{title:"Phone number",value:e?.phone},{title:"SSN",value:e?.ssn&&t(ct,{isSuspicious:o,ssn:e?.ssn})},{title:"Created at",value:M(e?.created_at)},{title:"Updated at",value:M(e?.updated_at)}]})]})]})},zt=({isUserLoading:e,user:s,tabs:o,isDataDeleted:i=!1}
1)=>{const{activeTab:a,setActiveTab:r,products:u}=o,d=Qe(),{isMobile:h}=ne(),p=H(s),l=R(()=>a&&a!=="bank_income"&&p[a]||[],[a,p]),_=a!=="assets"&&l.length>0,v=a==="assets"&&!!s?.voa_report_id,{data:c=[],isLoading:N,isPending:y}=xt({links:l,productType:a,queryEnabled:_}),{data:g,isPending:I}=Ze({verificationType:"assets",accessToken:"",userId:s?.id??"",reportId:s?.voa_report_id??"",queryEnabled:v}),b=R(()=>c.filter(f=>f!==null&&X(f)),[c]),T=R(()=>a?$t({productType:a,employments:b.length?b.flatMap(f=>f.employments?.map(w=>({...w,isBenefits:l[0]?.provider?.id===et,isDocUpload:f.data_source==="docs",isTaxReturn:f.data_source==="tax"}))??[]):void 0,provider:l[0]?.provider,providers:l.map(f=>f.provider).filter(f=>!!f),assetsVerificationResults:g,isAssetsPending:I,hasDocUpload:!!l.find(f=>f.data_source==="docs"),hasTaxReturn:!!l.find(f=>f.data_source==="tax"),assetsIdentityTitle:d}):[],[b,a,l,g,d,I]),S=R(()=>Object.entries(p),[p]),A=R(()=>!a||a==="bank_income"?!1:p[a]?.every(f=>f.status!=="done"&&f.data_source!=="docs"),[p,a]),P=u.length===1||a&&a!=="bank_income"&&p[a]&&p[a].length>1;return t(be,{className:L("!py-0 pr-0",h&&"flex flex-grow flex-col !px-0"),isLoading:e||S.length===1&&(v&&I||_&&y),children:E("div",{className:"flex flex-1 items-start",children:[!h&&t(mt,{isLoading:N,sections:i?[]:T,type:"user"}),t("div",{className:L("flex-1",h?"min-w-0 px-4 pt-6":"border-l border-r border-grey30 p-8"),children:E(St,{value:a??"income",children:[!h&&u.length>1&&t(ce,{className:"pb-8",activeTab:a??"income",hasAssets:u.includes("assets"),hasEducation:u.includes("education"),hasInsurance:u.includes("insurance"),hasTransactions:u.includes("transactions"),products:u,onTabChange:r}),i?E(U,{children:[t(O,{variant:"h2",children:"Report"}),t(ut,{})]}):E(U,{children:[S.map(([f,w])=>t(Dt,{value:f,children:E("div",{id:"report",children:[t(O,{variant:"h2",children:"Report"}),t(te,{children:w.map((C,G)=>E(_e,{children:[C.status==="done"||C.data_source==="docs"?E("div",{children:[t("div",{className:L("pt-8",f!=="assets"&&"md:pb-8"),children:t(Qt,{isFetching:N,link:C,productType:f,report:c[G]??void 0,userId:s?.id??"",voaReportId:s?.voa_report_id??void 0})}),G<w.length-1&&t(D,{})]},C.id):P?null:t(B,{}),!P&&t(z,{filterByProduct:u.length===1?null:a,links:s?.links??void 0,ssn:s?.ssn})]},C.id))})]})},f)),P&&E("div",{className:"pb-8",children:[A&&t(B,{}),t(z,{filterByProduct:u.length===1?null:a,links:s?.links??void 0,ssn:s?.ssn})]})]}),t("div",{children:t(Vt,{activeTab:a,user:s})})]})}),!h&&t(Gt,{user:s})]})})},Jt=e=>K({queryKey:[Ce.GetBridgeUser,e],queryFn:()=>Y.getBridgeUser(e)}),Zt=({open:e,user:s,onClose:o})=>t(Ut,{closeLabel:"Close timeline",open:e,title:"Timeline",onClose:o,children:t("div",{className:"pb-[max(1rem,env(safe-area-inset-bottom))]",children:t(ue,{user:s})})}),li=()=>{const{id:e}=Le(),{data:s,isPending:o,error:i}=Jt(e),a=H(s,!0),{isMobile:r}=ne(),[u,d]=ee(null),p=me(a)({item:s||{},onClose:Oe}),l=kt(s),_=Pt(),v=R(()=>s?.first_name&&s?.last_name?At(s.first_name,s.last_name):$.userInformation.title,[s]),c=!!s?.voie_report_id,N=!!s?.links?.some(A=>A.status==="done"),y=!!s?.voa_report_id,g=pt(s?.links),I=(c||y||N)&&p[0]?.actions.length>0,b=!!s&&!g,T=()=>d(null),S=[{id:"timeline",label:"See timeline",drillIn:!0,onClick:()=>d("timeline")}];return!s&&i&&"detail"in i&&typeof i.detail=="string"?t(ye,{className:"m-auto",title:i.detail,description:"The user you are looking for does not exist"}):E(Se,{className:"flex min-h-full flex-grow flex-col",title:v,children:[r?t(Lt,{below:l.showTabs&&l.activeTab?t(ce,{activeTab:l.activeTab,className:"px-4 pb-2",hasAssets:l.hasAssets,hasEducation:l.hasEducation,hasInsurance:l.hasInsurance,hasTransactions:l.hasTransactions,products:l.products,onTabChange:l.setActiveTab}):void 0,rightContent:t(Ot,{icon:t(De,{className:"rotate-90"}),label:"User actions",onClick:()=>d("actions")}),subtitle:g?W:void 0,title:"User information",backUrl:$.allUsers.url()}):t(Ue,{border:!0,leftContent:t(Ae,{onClick:()=>_($.allUsers.url())}),rightContent:E("div",{className:"ml-4 flex items-center gap-4",children:[b&&t(_t,{Actions:Z,hasBorrowerReport:c,hasDocuments:I,item:s}),c&&!g&&t(J,{userId:s?.id,voieReportId:s?.voie_report_id})]}),subtitle:g?t(O,{color:se.grey60,variant:"body2",children:W}):void 0,title:"User information"}),t(zt,{isDataDeleted:g,isUserLoading:o,tabs:l,user:s}),r&&b&&(c||I)&&t(Ct,{children:c?t(J,{fullWidth:!0,userId:s.id,voieReportId:s.voie_report_id}):t(fe,{fullWidth:!0,"data-testid":"download-pdf-button",variant:"contained",onClick:()=>d("downloads"),children:"Download PDF"})}),r&&E(U,{children:[t(ft,{actions:S,closeLabel:"Close user actions",dataTestId:"user-actions-sheet",open:u==="actions",onClose:T}),t(Zt,{open:u==="timeline",user:s,onClose:T}),!!s&&t(ht,{Actions:Z,item:s,open:u==="downloads",onClose:T})]})]})};export{li as default};
2//# sourceMappingURL=UserInformationPage-BpYcsxO4.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.