@zeniai/web-app-ui 5.1.20-qa → 5.1.21-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-RXXXgB20.js +1 -0
- package/dist/assets/AddressScreen-M6ITZudT.js +9 -0
- package/dist/assets/{AiCfoScreen-COG2flaI.js → AiCfoScreen-DEHcIc3o.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-cecdJlYU.js → BillPayApprovalRoutes-CRLtpw8L.js} +1 -1
- package/dist/assets/{BillPayRoutes-CWmCSCXV.js → BillPayRoutes-QE1l3IXf.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-CgR5vrh_.js +9 -0
- package/dist/assets/ChargeCardRoutes-DmiSPrYm.js +71 -0
- package/dist/assets/{CompanyPassportScreen-wGuw6nrC.js → CompanyPassportScreen-2DDBVayl.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CVpVOsWt.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-C71-xqf5.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-bWedQt85.js +23 -0
- package/dist/assets/{DashboardRoutes-B8YORLtS.js → DashboardRoutes-CyWA_gZi.js} +3 -3
- package/dist/assets/{DefaultTenantHome-C_SB_0pi.js → DefaultTenantHome-CD7oLfFI.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-B0I-XVOq.js → DomesticWireDetailScreen-5_x38Q2f.js} +3 -3
- package/dist/assets/DrawerScreen-BM1IkqYU.js +1 -0
- package/dist/assets/EntityDetailRoutes-DcFDg7nT.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DM7mqBbE.js +25 -0
- package/dist/assets/FeaturePreviewScreen-D64cpfE3.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-DHwXhjpB.js +1 -0
- package/dist/assets/{MagicLinkRoutes-Ctd9-k7o.js → MagicLinkRoutes-Bns-yYjG.js} +10 -10
- package/dist/assets/MagicLinkSignInScreen-C7SzpDZh.js +12 -0
- package/dist/assets/{MobileAppDrawer-BPTcRRBp.js → MobileAppDrawer-D-KK8a6V.js} +1 -1
- package/dist/assets/NotFoundScreen-_uBNuets.js +1 -0
- package/dist/assets/{NotificationRoutes-B6VxXPmE.js → NotificationRoutes-D8m12GyZ.js} +1 -1
- package/dist/assets/OAuthConsentScreen-Cr1yMPae.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-WSlszCns.js +1 -0
- package/dist/assets/PeopleRoutes-BEXsgd2o.js +22 -0
- package/dist/assets/PerformanceRoutes-B2PAWYjz.js +1 -0
- package/dist/assets/{Preview-CVswbusF.js → Preview-Du6GpcEd.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-1sg28M5z.js → QBOConnectionScreen-CapRUwPj.js} +1 -1
- package/dist/assets/ReferralListScreen-DJrBlQOt.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CATJ14N8.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-UB01OSuZ.js → ReimbursementApprovalRuleDetailScreen-DE5SLNHQ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BudlAJyL.js → ReimbursementRoutes-BEngVJIH.js} +9 -9
- package/dist/assets/{ReportsRoutes-CWs4_ChN.js → ReportsRoutes-DO3fQiDn.js} +1 -1
- package/dist/assets/RewardsRoutes-CdmzDvTn.js +1 -0
- package/dist/assets/{ScreenRoutes-zrmKnyw0.js → ScreenRoutes-CREjypLZ.js} +2 -2
- package/dist/assets/{SettingsRoutes-BfCDh5la.js → SettingsRoutes-DZSu79pX.js} +8 -8
- package/dist/assets/{SetupPagesScreen-CGvclNp8.js → SetupPagesScreen-BHwZt18B.js} +5 -5
- package/dist/assets/{SignInScreen-C22I5CRo.js → SignInScreen-CUY4jGrN.js} +1 -1
- package/dist/assets/SignOutScreen-IVPfr8ew.js +9 -0
- package/dist/assets/{TaskListScreen-CPXhJGMg.js → TaskListScreen-DcPZQMNC.js} +2 -2
- package/dist/assets/{TaskRoutes-D0U1evnV.js → TaskRoutes-t9tSRPZQ.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-CTPQlClN.js → TransactionDetailRoutes-BXMfYYr1.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BMJ9pcvt.js → TransactionDetailScreen-m_Eg1ZwQ.js} +2 -2
- package/dist/assets/{TransactionListRoutes-CKZKgDMw.js → TransactionListRoutes-BGt0Dqlg.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DzeUslRt.js → TreasuryRoutes-CD2LSuWl.js} +5 -5
- package/dist/assets/{VendorsRoutes-LEgPzpGO.js → VendorsRoutes-S5YkdGpG.js} +23 -23
- package/dist/assets/WiseConfirmationScreen-DVgfsugF.js +12 -0
- package/dist/assets/ZeniAccountRoutes-krGa7a4T.js +57 -0
- package/dist/assets/ZeniAccountStatementScreen-nl9h02Wa.js +9 -0
- package/dist/assets/{accountMappingHelper-DSYys5zM.js → accountMappingHelper-v27yANMh.js} +1 -1
- package/dist/assets/{analytics-RHZXXukl.js → analytics-UVk0-oKJ.js} +1 -1
- package/dist/assets/analyticsHelper-CP6GGDN5.js +1 -0
- package/dist/assets/{core-Cu9_V7DI.js → core-DztGOrmh.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DwKi2VH1.js → decodeURIComponentSafe-B4Sbe0P_.js} +1 -1
- package/dist/assets/{dnd-cSRmPjhK.js → dnd-B17vdHwx.js} +1 -1
- package/dist/assets/{empty-Dh9k7Mlu.js → empty-CRQ-AG_1.js} +1 -1
- package/dist/assets/{empty-H4DS2HhT.js → empty-DgoxJHjl.js} +1 -1
- package/dist/assets/{emptyVideoElement-C8hpwYyz.js → emptyVideoElement-DBjrSaW_.js} +1 -1
- package/dist/assets/epic-BfhddWLI.js +2 -0
- package/dist/assets/getLocaleForTenant-Lg6TJpWx.js +1 -0
- package/dist/assets/{index-DrYfTQW_.js → index-BJY2LSYK.js} +1 -1
- package/dist/assets/{index-C7WXzlOi.js → index-BaXXiefw.js} +1 -1
- package/dist/assets/{index-BXA-O4AL.js → index-CGODjfix.js} +1 -1
- package/dist/assets/{index-BaDODbvC.js → index-D8Tr8f_J.js} +6113 -6129
- package/dist/assets/{index-J0IBMNGj.js → index-DWGzG1s6.js} +1 -1
- package/dist/assets/{index-C8Sg0_Jq.js → index-J2fhT3Lz.js} +1 -1
- package/dist/assets/{index-DPX9rfvS.js → index-drithkSE.js} +1 -1
- package/dist/assets/{index-Tpz76u84.js → index-kG8r9Tv5.js} +2 -2
- package/dist/assets/{lexical-B-UHoQhE.js → lexical-qTa3T6BQ.js} +1 -1
- package/dist/assets/{liveblocks-1RWQirWE.js → liveblocks-BsWb0RAR.js} +1 -1
- package/dist/assets/{lottie-qz5T1VFo.js → lottie-DKMM8AlI.js} +1 -1
- package/dist/assets/{mui-D8xl37lU.js → mui-BjggVoym.js} +1 -1
- package/dist/assets/{pathToGoBack-CS9uZra5.js → pathToGoBack-DGYnmq_c.js} +1 -1
- package/dist/assets/{pdf-Dny5wh2o.js → pdf-CtM_hPVt.js} +3 -3
- package/dist/assets/{pdf-lib-CxZmdrsT.js → pdf-lib-DcPFHOa_.js} +1 -1
- package/dist/assets/{plaid-CM1lGBpq.js → plaid-BxkA5Yh9.js} +1 -1
- package/dist/assets/{pusher-BYJa2T8d.js → pusher-e-t7lJ5J.js} +1 -1
- package/dist/assets/{react-dY49GOzE.js → react-CSvxLa9O.js} +1 -1
- package/dist/assets/{react-BbJn2EQe.js → react-CfVuffqk.js} +1 -1
- package/dist/assets/{react-B9GoOkzp.js → react-CzlJ5-0j.js} +1 -1
- package/dist/assets/{react-CITkb_ne.js → react-Dbs8etZZ.js} +1 -1
- package/dist/assets/{react-H_61_T3L.js → react-DcPVUtmR.js} +1 -1
- package/dist/assets/{react-CErU_1yP.js → react-DuChUgpV.js} +1 -1
- package/dist/assets/{recharts-DFGRflCT.js → recharts-B9nLxUln.js} +1 -1
- package/dist/assets/{routePaths-fc5DDlJm.js → routePaths-hcoH55G_.js} +1 -1
- package/dist/assets/{sentry-LUgCZnRx.js → sentry-rdlZeznM.js} +1 -1
- package/dist/assets/{url-N3s043Uw.js → url-C6ewT3ML.js} +1 -1
- package/dist/assets/{url-BkSN4Ht6.js → url-DETWO2ae.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BjonjuyY.js → useAiCfoDashboardSuggestedQuestionsChips-BaEA51J4.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CN2GXR3e.js +1 -0
- package/dist/assets/{useDeviceId-Cuegkfr2.js → useDeviceId-h16TdXxi.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BggytmMN.js → useInitialThreadRequest-CsZ0WRFn.js} +1 -1
- package/dist/assets/{utils-C0WjER8w.js → utils-DCNsphWZ.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Cts5wE1j.js → withTransactionSidePanel-STGDFELj.js} +3 -3
- package/dist/assets/{zeni-epic-state-C-Iw-Pw8.js → zeni-epic-state-C4ifweUR.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -11
- package/dist/assets/AddressRoutes-BXMIlSTb.js +0 -1
- package/dist/assets/AddressScreen-CjLQE8F3.js +0 -9
- package/dist/assets/BusinessVerificationPageScreen-ow69Wdnb.js +0 -9
- package/dist/assets/ChargeCardRoutes-BQjkBvaR.js +0 -71
- package/dist/assets/ConnectionAuthScreen-BRBF64cO.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-BzDYbX94.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-DhgfvMTb.js +0 -23
- package/dist/assets/DrawerScreen-C28AzR-_.js +0 -1
- package/dist/assets/EntityDetailRoutes-DpBE8R0L.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-CjvhJSRR.js +0 -25
- package/dist/assets/FeaturePreviewScreen-CNpXIisp.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CtNFNtZf.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BimKVzfO.js +0 -12
- package/dist/assets/NotFoundScreen-B__1dupq.js +0 -1
- package/dist/assets/OAuthConsentScreen-CLwgo45N.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BzI7Jnag.js +0 -1
- package/dist/assets/PeopleRoutes-HH2apdxr.js +0 -22
- package/dist/assets/PerformanceRoutes-81OvqD2T.js +0 -1
- package/dist/assets/ReferralListScreen-CDv4r3zP.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DAnacrd-.js +0 -1
- package/dist/assets/RewardsRoutes-BvO8B7Zb.js +0 -1
- package/dist/assets/SignOutScreen-BToYQbTA.js +0 -9
- package/dist/assets/WiseConfirmationScreen-Cze1njel.js +0 -12
- package/dist/assets/ZeniAccountRoutes-CzRdD1-H.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-LZ2-VOHt.js +0 -9
- package/dist/assets/analyticsHelper-B48RdZxU.js +0 -1
- package/dist/assets/epic-Cf6_0VZK.js +0 -2
- package/dist/assets/getLocaleForTenant-CQ6kIMFQ.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BoysBhZD.js +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-1RWQirWE.js";import Rn from"./NotFoundScreen-B__1dupq.js";import{a,b as wt}from"./sentry-LUgCZnRx.js";import{n as Fe,S as Dn}from"./mui-D8xl37lU.js";import{u as de,h as Pt,g as Ge,j as F,n as Un,i as rt,o as Fn,p as ze}from"./core-Cu9_V7DI.js";import{eP as Re,Q7 as Bn,n4 as ke,fj as _n,qS as Vn,nm as xt,nH as Rt,Q8 as Dt,nR as Mn,Q9 as Ut,nf as jn,qo as On,f3 as fe,Qa as De,sR as Ft,C2 as Bt,Qb as _t,Qc as zn,pY as qe,LG as dt,LI as Ln,jJ as Qn,LJ as $n,jQ as Gn,cV as qn,tW as Je,ns as Vt,nW as Ue,Qd as Jn,Kz as ut,Ky as we,Qe as mt,k5 as Yn,Qf as Kn,Qg as Nn,Qh as Hn,Qi as Wn,nz as Zn,nk as ue,nZ as Pe,Qj as Xn,Qk as ea,Ql as ta,o4 as na,jU as aa,jL as oa,Qm as sa,jT as ht,LQ as ca,Qn as ia,Qo as la,pU as ra,pw as da,nX as le,pv as Le,Qp as ua,Qq as ma,Qr as ha,lo as pa,bq as ga,lj as pt,l5 as Ca,Qs as Sa,gT as gt,fU as Ia,lg as fa,vP as ka,Qt as Ea,ov as va,oq as ya,ou as ba,of as Aa,Qu as Ta,f6 as Mt,nK as wa,nv as Pa,fk as Ct,n$ as xa,Qv as Ra,nY as jt,Qw as Da,Qx as Ua,Qy as Fa,Qz as Ba,QA as St,q4 as _a,pm as Va,Kx as Ma,jS as ja,QB as Oa,GA as za,jR as La,jG as Qa,f5 as $a,oW as Ot,pe as Ga,nV as It,n_ as qa,bE as Ja,ld as Ya,la as Ka,QC as Na,oe as ft,pc as kt,pa as Ha,o$ as Wa,oG as Za,pd as Xa,QD as eo,QE as to,oK as no,QF as ao,oA as oo,oJ as so,oH as co,ph as io}from"./zeni-epic-state-C-Iw-Pw8.js";import{v as zt,T as re,c as z,m as H,X as Lt,_ as Qt,cE as lo,z as Be,cF as ro,at as xe,cG as uo,aT as Et,B as $t,cH as mo,aq as Qe,D as ho,cI as po,a2 as go,cJ as Co,O as So,cK as Io,cL as fo,n as ko,k as Eo,aN as vo,b7 as yo,x as bo,cM as Ao}from"./index-BaDODbvC.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{c as vt,C as To}from"./TransactionDetailScreen-BMJ9pcvt.js";import{w as wo}from"./withTransactionSidePanel-Cts5wE1j.js";import{h as Po,v as xo}from"./routePaths-fc5DDlJm.js";import{g as $e}from"./accountMappingHelper-DSYys5zM.js";import{D as Ro}from"./DrawerScreen-C28AzR-_.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./decodeURIComponentSafe-DwKi2VH1.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="69221236-0892-4410-a51e-8c7f3d18dad6",t._sentryDebugIdIdentifier="sentry-dbid-69221236-0892-4410-a51e-8c7f3d18dad6")}catch{}})();const Do=()=>{const t=de(),i=Pt(),A=Ge(),f=F(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=F(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Uo,{children:C.jsx(lo,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:_,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Uo=Fe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Fo=wt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:A,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=de(),u=Be.getSignedInUser(),o=F(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:y,statementUploadChosen:r}=t,_=m[i],h=_?.accountReconEntity.statementMetaData?.statementUploadId,T=(e,n)=>{g(On(e,n.split(".")[0]))},I=e=>{h!=null&&g(jn({accountId:i,selectedPeriod:y,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(Mn({accountId:i,selectedPeriod:y,payload:e}))},K=e=>{g(Ut({accountId:i,selectedPeriod:y,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),V=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),D=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return _!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(ro,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:_,monthYearPeriod:y,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:T,onDeleteFile:I,onSelectSourceType:K,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):D!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(uo,{excludedAccountReconciliation:D,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:V})})}):null}),yt=Fe.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,bt=Fe.div`
|
|
13
|
-
flex: 1;
|
|
14
|
-
min-height: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
overflow-x: hidden;
|
|
20
|
-
overflow-y: auto;
|
|
21
|
-
`;function Bo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:A,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=F(u=>zn(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(mo,{onCloseClick:i,addCustomerRequest:A,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const _o=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Vo,comma:At,space:Mo}},dateFormat:qt}=ho.getLocalizedStrings(),Tt=io,jo=Un(function(t,i){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,y={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=fe(t),{selectedTransactionCategorizationTab:_}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${go}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:_,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:A,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:A,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:y,navigate:r,onClickCustomerRequest:_,handleEditClick:h,setActivityLogTransactionId:T}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:K}=S.jeSchedules,te=Vt(I),V=Ue(te.start),D=Ue(te.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{z.trackMissingReceiptAttached(I.month,I.year),t(Va(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const b=()=>t(St(e,n,{fetchState:"Error"}));Co(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(w=>{w!=null?t(_a(e,w)):b()}).catch(b)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ba(e,n)),m!=null&&t(ke({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Fa(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?Mo+Vo+l+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Ua(e))},onUpdateMissingReceiptsUIState:e=>{t(Da(e))},onFetchMissingReceiptsList:()=>{D!=null&&V!=null&&t(jt({start:V,end:D},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(co(e))},onBulkUploadProgress:e=>{t(so(e))},onBulkUploadSuccess:e=>{t(oo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(ao(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(no(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(to())},onSetBulkUploadResultsTab:e=>{t(eo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Xa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Za())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Wa(e,n))},onFetchBulkUploadBatches:e=>{t(Ot(e))},onFetchMoreBatchDetails:()=>{t(Ha())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Ra())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Le({selectedTab:s,uiState:{searchString:e}})),D!=null&&V!=null&&t(le(s,{start:V,end:D},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(xa(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(wa(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(Mt(e))},handleLogOutClick:()=>{const e=H(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=$e(K.prepaidExpensesAccountList,s.selectedOptions),b=$e(K.fixedAssetsAccountList,l.selectedOptions),w=$e(K.accruedExpensesAccountList,k.selectedOptions),M={selectedPrepaidExpensesAccountIds:p.map(P=>P.accountId),selectedFixedAssetsAccountIds:b.map(P=>P.accountId),selectedAccruedExpensesAccountIds:w.map(P=>P.accountId)};t(Ta({data:M}))},onSaveJeAccountSettingsClick:()=>{t(Aa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:b}=n,{allAccountList:w,allClassList:M,allDepreciationAccountList:P}=S.jeSchedules,Q=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find($=>$.id===b?.selectedOption):void 0,ne={id:Q?.zeniId??b?.selectedOption??"",name:Q?.name??b?.defaultOptions.find($=>$.value===b?.selectedOption)?.label??"",logo:Q?.logo},ae=p?.selectedOption!=null?w.find($=>$.qboId===p.selectedOption):void 0,Ee=k?.selectedOption!=null?M.find($=>$.classId===k.selectedOption):void 0,oe=l?.selectedOption!=null?P.find($=>$.qboId===l.selectedOption):void 0;t(ba({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:ae?.accountId,updatedClassId:Ee?.classId,updatedAccumulatedDepreciationCategoryID:oe?.accountId,updatedVendor:{id:ne.id,name:ne.name}}}))},ignoreRecommendedJeSchedule(e,n){t(ya(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(va({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ea())},handleJeScheduleClick:(e,n,s)=>{t(ka({selectedJEScheduleKey:n}));const l=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(fa(e,m.companyId,m.tenantId))},onClickCustomerRequest:_,setActivityLogTransactionId:T,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ia())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Sa(e))},onUpdateFileAttachment:e=>{t(Ca({files:e}))},previewMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(pa(m.companyId,e,m.tenantId)),z.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,ga().format(qt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,b,w,M,P,Q,ne,ae)=>{t(ha(e,n,s,l,y,k,p,b,w,M,P,Q,ne,ae))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),D!=null&&V!=null&&(t(le(e,{start:V,end:D},!1,!1)),t(ma(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{i.closeSidePanel?.(),D!=null&&V!=null&&(t(ua(e)),t(le("autoCategorized",{start:V,end:D},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n})),D!=null&&V!=null&&t(le(e,{start:V,end:D},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Le({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,b)=>{D!=null&&V!=null&&t(le(e,{start:V,end:D},!0,s,n,l,k,p,b))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,b,w)=>{t(da(e,n,s,l,w??null,k,p,!1,b))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:y,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?z.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):z.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(ra(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,b)=>{const{transactionId:w,transaction:M,lineIds:P}=n;p!=null&&t(ca({transactionId:w,customerUpdates:p})),t(ia({selectedTab:l,transactionId:w.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:y,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Je(k,e,n,s,!0,E,b))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,b)=>{const{transactionId:w,transaction:M,lineIds:P}=n;p!=null&&(t(aa({transactionId:w,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(oa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:w.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:y,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Je(k,e,n,s,!0,E,b))):t(sa({selectedTab:l,transactionId:w.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Pe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Pe(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{z.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(na(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=xo(e.id,e.qboId,i.tenantEmailDomain),s=H(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(Pe(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(ue(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ue(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Zn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Wn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Nn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Yn(l)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,qe("bill"));const n=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Jn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,A)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=A;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,y,r)=>{u.onUploadTransactionReceipt(v,S,m,y,r,g.authParams)}}}(t,i,E)})(po),Oo=wo(function(t){const i=t.displayName??t.name??"Component",A=wt.memo(t),f=E=>{const g=de(),u=function(){const T=de(),I=F(d=>fe(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{T(De({selectedDrawerAccountId:d}))},[T]),closePanel:a.useCallback(()=>{T(De({selectedDrawerAccountId:void 0}))},[T])}}(),o=F(T=>fe(T).reconciliation),v=F(T=>Re(T)),S=a.useCallback((T,I)=>{g(Ft("expense_automation_reconcile",T,I))},[g]),m=a.useCallback((T,I)=>{const d=v?.companyId;d!=null&&(g(Bt(T,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),y=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Fo,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[y,u.isOpen,u.closePanel]),_=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:_,[u.isOpen,u.closePanel,u.selectedAccountId,_]);return C.jsx(Et.Provider,{value:h,children:C.jsx(A,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:A,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=So(),m=Io(),{isOpen:y}=fo(),r=Pt(),_=Ge(),h=de(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:I}=Gt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=Lt(),K=(()=>{const c=F(G=>fe(G)),O=Ge(),{currentSelectedViewFetchState:Y,currentSelectedView:j,selectedPeriod:B}=c,Ie=Qe(j),X=Qe(Y.fetchState),be=a.useCallback(G=>{const N=O.state?.referrer;j==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?z.trackTransactionsReviewPage(B.month,B.year,c.transactionView.totalCountByTab.review,0,G,N??null):z.trackTransactionsAutoCategorisedPage(B.month,B.year,c.transactionView.totalCountByTab.autoCategorized,0,G,N??null)),j==="missing_receipts"&&z.trackMissingReceiptsPage(B.month,B.year,G,c.missingReceipts.transactions.length,N??null),j==="je_schedules"&&z.trackMonthCloseScheduleListPage(B.month,B.year,G,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,N??null),j==="flux_analysis"&&z.trackFluxAnalysisPage(B.month,B.year,G,_o(c.fluxAnalysis),N??null),j==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&z.trackInsightsEmailPage(B.month,B.year,G,"draft",c.auditSummary.auditScorePercentage,null,N??null)},[B,c]);return a.useEffect(()=>{X===Y.fetchState&&j===Ie||Y.fetchState!=="Completed"||be(!1)},[j,Y.fetchState,Ie]),be})(),te=ko(),[V,D]=a.useState(!1),e=F(c=>dt(c)),n=F(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[b,w]=a.useState([]),[M,P]=a.useState(void 0),Q=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),P(c)},[d,v,m,S]),ne=a.useCallback(()=>{m(),P(void 0),d(),I()},[d,I,m]),ae=a.useRef(v);a.useEffect(()=>{v===!0&&ae.current===!1&&(m(),P(void 0),d()),ae.current=v},[d,v,m]);const Ee=a.useRef(y);a.useEffect(()=>{y===!0&&Ee.current===!1&&(v&&S(!1),P(void 0),E===!0&&f!==!0&&t?.()),Ee.current=y},[t,y,v,S,f,E]);const oe=E===!0&&f!==!0,$=a.useRef(oe);a.useEffect(()=>{oe&&!$.current&&(v&&S(!1),m(),P(void 0)),$.current=oe},[v,oe,m,S]);const[Ye,Jt]=a.useState(!1),Ke=a.useRef(!1),{selectedTab:Ne}=rt(),{tenantEmailDomain:Yt}=rt(),[_e,He]=a.useState(_.state?.message==="comingFromTransactionDetail"),We=_.state?.message==="comingFromOverview",Kt=Eo(),Ve=Be.getSignedInUser(),{useDynamicConfig:Nt,useFeatureGate:me}=zt(),{configValue:Ht}=Nt(vo.enableUncategorizedExpenseCategory),W=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=me(re.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=me(re.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=me(re.isTransactionActivityEnabled),{isFeatureEnabled:Wt}=me(re.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Zt}=me(re.isProjectsTransactionsEnabled),Xt=a.useCallback(c=>{const O=qe(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,O)},[i]),en=F(c=>Ma(c,"common")),L=F(c=>fe(c)),{monthEndCloseChecksView:J,currentSelectedView:x,selectedPeriod:U,selectedTransactionCategorizationTab:se,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:Z,jeSchedules:Me,reconciliation:nn}=L;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||Q(void 0)},[x,Q,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==se&&(ve.current=se,x==="transaction_categorization"&&Q(void 0)):ve.current=se},[x,se,Q]);const an=F(c=>M==null?void 0:ja(c.transactionState,M)),ce=an?.qboId,on=F(c=>ce==null?void 0:Oa(c,ce));a.useEffect(()=>{ce!=null&&h(za(ce))},[h,ce]);const{selectedAccountId:pe}=nn,et=Qe(Me.accountSettingsView.saveState.fetchState),sn=F(c=>La(c.accountState,c.accountListState,"accountList")),cn=F(c=>Qa(c)),ge=Ne!=null?$a(Ne):x,ln=F(c=>c.entityAutoCompleteState.autoCompleteText.common);if(Qt({isDataReady:Z.fetchState==="Completed"}),Ve==null)throw Error("Can't access expense automation screen without signing in...");const tt=Vt(U),Ce=Ue(tt.start),Se=Ue(tt.end);if(Ce==null||Se==null)throw Error(`Invalid start - ${Ce} and end - ${Se} period from given ${U}`);const rn=a.useCallback(()=>{l(!1)},[]),dn=a.useCallback(()=>{p(!0)},[]),un=a.useCallback(c=>{w(c),p(!1)},[]),mn=a.useCallback(()=>{w([])},[]),ye=L.missingReceipts.bulkUpload.phase,nt=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{he===!0&&x==="missing_receipts"&&ye==="matching"&&nt!=null&&h(Ot({cacheOverride:!0}))},[he,x,ye,nt,h]);const at=Ve?.userId,hn=U.month,pn=U.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&he!==!1&&ye==="idle"&&at!=null&&ot!=null&&h(Ga())},[x,he,ye,at,ot,hn,pn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?D(!0):D(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{ge!=null&&x!==ge&&h(Mt(ge))},[ge]),a.useEffect(()=>{Ye!==!1||Z.fetchState!=="Completed"&&Z.fetchState!=="Error"||!R||(Jt(!0),h(It(!1,!1,W)))},[Ye,Z,R,W]),a.useEffect(()=>{!We&&R&&(h(It(!1,!1,W)),h(ue(U,pe,!1,!1)))},[U.month,U.year,R,W]);const st=a.useCallback((c=!1,O=!1)=>{const Y={start:Ce,end:Se};switch(x){case"transaction_categorization":h(le(se,Y,c,!_e,void 0,void 0,O,void 0,W)),He(!1);break;case"flux_analysis":h(Pe(U,c,O,null));break;case"month_end_insights":if(O===!1){const j=new Date(U.year,U.month,0),B=Ja(j.toDateString()).format(qt.analytics.YYYYDashMMDashDDFormat);h(Ya(!0,n.companyId,n.tenantId,B)),h(Ka(n.companyId,n.tenantId))}break;case"je_schedules":h(qa(Y,O));break;case"missing_receipts":h(jt(Y,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,O));break;default:h(ue(U,pe,c,O))}},[x,Ce,Se,n.companyId,n.tenantId,se,U,pe,_e,He,W]);a.useEffect(()=>{x===ge&&Z.fetchState==="Not-Started"&&R&&st(!0)},[Z,Ce,Se,n.companyId,n.tenantId,R]),a.useEffect(()=>{We||_e||Ke.current||tn.fetchState==="In-Progress"||Z.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),a.useEffect(()=>{J.fetchState!=="In-Progress"&&J.fetchState!=="Completed"&&h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!1}))},[J.fetchState,n.tenantId]),a.useEffect(()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!0})),h(Na({companyId:n.companyId})),r("../"))},[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,U,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{J.fetchState!=="In-Progress"&&J.fetchState==="Completed"&&h(ke({tenantId:n.tenantId,period:U,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[J.fetchState,n.tenantId,U,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&pe==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(ue(U,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,ue,pe,U]);const gn=vt();a.useEffect(()=>{const c=(J.monthEndCloseChecks?.monthEndCloseCheckList.find(O=>O.id==="month_end_insights")?.isDisabled??!1)&&!Ze;x!=="month_end_insights"||!c&&J.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,J.monthEndCloseChecks]);const Cn=u===!0?g:A,Sn=u===!0||E===!0,In=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&Me.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,Me.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:O,currentSelectedView:Y})=>{const j=de();let B,Ie,X;const be=vt(),G=c.transactionView;let N=()=>{};const{transactions:yn,selectedTransactionId:ie,selectedTransactionLineId:Ae,transactionLocalData:bn}=G;if(Y==="transaction_categorization"){const je=bn.find(ee=>ee.transactionId===ie),q=yn.find(ee=>ee.id===ie),it=Ae!=null?je?.transactionReviewLocalData?.lineItemById[Ae]:void 0,lt=it?.account;Ie=it?.class?.classId,B=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const Tn=Po(ie,q?.typeOfTransaction);q!=null&&Tn&&(X={id:ie,type:qe(q.typeOfTransaction)}),N=()=>{if(ie!=null&&Ae!=null&&q!=null){const ee=G.transactionLocalData.find(Te=>Te.transactionId===ie)?.transactionReviewLocalData;if(ee!=null&&q.lines!=null&&q.lines.length>0){const Te=ee.lineItemById[Ae];let Oe=ee.selectedEntity;if(qn(q)||(Oe=Te.selectedEntityLine),Oe!=null){const wn=Oe,Pn={transactionId:{id:q.id,type:q.type},transaction:q,lineIds:q.lines.map(xn=>xn.id)??[]};j(Je(wn,Te.amount.amount,Pn,!1,!0,be))}}}}}const An=F(je=>dt(je,void 0,B,Ie));return{transactionId:X,onSaveVendor:()=>{j(Gn(X,void 0,!1,!0))},onSaveSuccess:N,onCancel:()=>{X!=null&&j(Ln({transactionId:X})),j(Qn()),j($n()),O()},vendorViewDetails:An}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{D(!1)},currentSelectedView:x});return Kt?.loggedInUserRoleMap==null?J.fetchState==="Error"?C.jsx(yo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(Ro,{isOpen:k,drawerLeftMargin:new bo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(zo,{onClick:c=>c.stopPropagation(),children:C.jsx(Bo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:un,resetCustomerRequest:mn})})}),ct!=null&&V&&C.jsx(To,{isOpen:V,transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}),C.jsx(jo,{navigate:r,location:_,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:ln,entityAutoCompleteView:en},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:b,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:W,isAccountingClassesEnabled:cn,isProjectsTransactionsEnabled:Zt,isCOTEnabled:gn,currentTenant:n,companyId:n.companyId,signedInUser:Ve,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?M:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&M!=null?C.jsx(Ao,{activityLogView:on,qboId:ce,onClose:()=>Q(void 0),selectedTransactionId:M},String(M)):null,uncategorizedAccounts:sn,onClickCustomerRequest:dn,handleEditClick:rn,tenantEmailDomain:Yt,trackExpenseAutomationTabAnalytics:K,setActivityLogTransactionId:Q,closeSidePanel:In,openTransactionPanel:i,sidePanelIsOpen:Sn,sidePanelIsFullView:u!==!0&&f,panelContent:Cn,isAiCfoAccessEnabled:T,onAskAiCfoClick:ne,isExpenseAutomationCommentingEnabled:Wt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:u===!0?66:void 0})]})})),zo=Fe(Dn)`
|
|
22
|
-
display: flex;
|
|
23
|
-
min-height: 100%;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;function ds(){return C.jsxs(Fn,{children:[C.jsx(ze,{path:"*",element:C.jsx(Do,{})}),C.jsx(ze,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Oo,{})}),C.jsx(ze,{path:"*",element:C.jsx(Rn,{})})]})}export{ds as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-1RWQirWE.js";import{a as r}from"./sentry-LUgCZnRx.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import c from"./NotFoundScreen-B__1dupq.js";import{h as u,g as b}from"./core-Cu9_V7DI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-LUgCZnRx.js";import{u as l,h as f,g as m}from"./core-Cu9_V7DI.js";import{gA as p,JM as g,JN as _}from"./zeni-epic-state-C-Iw-Pw8.js";import{u as b,L as h,z as y}from"./index-BaDODbvC.js";import"./liveblocks-1RWQirWE.js";import"./recharts-DFGRflCT.js";import"./mui-D8xl37lU.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c3143327-0e0d-4fc6-83b3-9f591aea766a",e._sentryDebugIdIdentifier="sentry-dbid-c3143327-0e0d-4fc6-83b3-9f591aea766a")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-1RWQirWE.js";import{a as g}from"./sentry-LUgCZnRx.js";import{u as U,g as w,h as _,s as J,j as l,N as T}from"./core-Cu9_V7DI.js";import{z as r,h as P,D as A,d as M,c as V,e as N,j as R,R as W,g as q}from"./index-BaDODbvC.js";import{eP as B,Jq as $,JA as G,Jr as H,eW as K,fn as Q,Jw as X,fL as Y,cT as Z,JB as ee,JC as te}from"./zeni-epic-state-C-Iw-Pw8.js";import{n as ne}from"./mui-D8xl37lU.js";import{u as se}from"./useDeviceId-Cuegkfr2.js";import{f as ae}from"./analyticsHelper-B48RdZxU.js";import{t as ie}from"./getLocaleForTenant-CQ6kIMFQ.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="229ebe31-a40e-404b-9b19-3c3f17e71ab0",t._sentryDebugIdIdentifier="sentry-dbid-229ebe31-a40e-404b-9b19-3c3f17e71ab0")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=w(),m=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>B(e)),b=l(e=>$(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=q();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{Ce as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-1RWQirWE.js";import{h as r,n}from"./core-Cu9_V7DI.js";import{F as i}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import"./sentry-LUgCZnRx.js";import"./zeni-epic-state-C-Iw-Pw8.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="5c5889c8-57e3-45ae-9448-30e7686263ec",o._sentryDebugIdIdentifier="sentry-dbid-5c5889c8-57e3-45ae-9448-30e7686263ec")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-1RWQirWE.js";import{a as r}from"./sentry-LUgCZnRx.js";import{u as P,g as A,j as o,N as j}from"./core-Cu9_V7DI.js";import{JP as C,eP as J,f7 as R,JQ as x,JR as z,JS as D,JT as L,mW as M,IL as N}from"./zeni-epic-state-C-Iw-Pw8.js";import{z as h,N as I}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="cd83cd86-1de4-4f11-9d23-a47f8df2bd2e",n._sentryDebugIdIdentifier="sentry-dbid-cd83cd86-1de4-4f11-9d23-a47f8df2bd2e")}catch{}})();function ee(){const n=P(),s=A(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>J(e)),d=o(e=>R(e)),l=o(e=>e.tenantState.fetchState),y=o(x),S=o(z),c=o(D),[v,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(l!=="Not-Started"&&l!=="Error"||(g.current=!0,n(M(a.userId,a.zeniSessionId??void 0))))},[f,a,l,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&d.some(T=>T.tenantId===e)?e:d.length===1?d[0].tenantId:null},[p?.tenantId,d]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:l!=="Completed",tenants:d,selectedTenantId:u,onSelectTenant:b,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-1RWQirWE.js";import{h as Y,u as z,g as X,i as Z,j as d,n as H,o as J,p as I}from"./core-Cu9_V7DI.js";import{eP as U,q_ as R,qy as Q,Kl as v,qt as T,bt as ee,bn as ae,bT as te,qu as se,Km as oe,K7 as C,dE as re,un as ne,Kn as ie,uK as ce,e_ as le,eY as de}from"./zeni-epic-state-C-Iw-Pw8.js";import{z as me,X as fe,_ as pe,k as ue,v as q,T as M,r as he,c as _,ao as ge,m as Fe}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import be from"./NotFoundScreen-B__1dupq.js";import{F as Ie}from"./FeaturePreviewScreen-CNpXIisp.js";import{a as g}from"./sentry-LUgCZnRx.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{u as Te}from"./useInitialThreadRequest-BggytmMN.js";import{t as ye}from"./routePaths-fc5DDlJm.js";import{M as Se}from"./MobileAppDrawer-BPTcRRBp.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="ee2c2aee-f075-4464-aaa7-615affad0330",s._sentryDebugIdIdentifier="sentry-dbid-ee2c2aee-f075-4464-aaa7-615affad0330")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:_}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function O(){const s=Y(),e=z(),a=X(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),S=d(t=>U(t)),$=S.company?.companyInfo.firstMonthOfFY??1,c=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:w,onAskAiCfoClick:K}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(b=>b.id===L):P!=null?f.forecasts.findIndex(b=>b.id===P):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),y(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,R,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=q(),{isFeatureEnabled:E}=N(M.isReportsCommentingEnabled),G=Te(E?S?.companyId:void 0,{clearParams:l&&m}),[V,W]=g.useState(!1),j=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Se,{isAppContentDrawerOpen:V,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:w,onAskAiCfoClick:K,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{j(!0)}})]})}function We(){const s=d(i=>U(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{We as PandLWithForecastRoutes,We as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-1RWQirWE.js";import{Kg as te,eP as Y,jG as z,e_ as J,eY as ne,HI as X,JW as oe,tt as Ee,Kh as N,th as ke,tC as Ie,tw as ie,tl as re,tA as Pe,tx as je,Ki as le,v9 as Te,Kj as ve,fB as Le,Kk as K,tq as de,to as ce,tF as Fe,c2 as Ae}from"./zeni-epic-state-C-Iw-Pw8.js";import{J as pe,v as Q,T as E,z as H,a9 as ue,y as me,ak as ge,al as Re,x as he,o as R,A as fe,D as Ce,am as Oe,X as Ve,_ as Ue,r as Be,c as be,e as Ze,m as $e,an as Ke,k as _e}from"./index-BaDODbvC.js";import{D as ye,n as W,S as we}from"./mui-D8xl37lU.js";import ae from"./NotFoundScreen-B__1dupq.js";import{a as r}from"./sentry-LUgCZnRx.js";import{u as ee,i as Ge,j as m,h as ze,g as He,n as We,o as se,p as $}from"./core-Cu9_V7DI.js";import{u as qe}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{M as Me}from"./MobileAppDrawer-BPTcRRBp.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="653efc12-541b-4267-b7a8-845b72bb0f97",a._sentryDebugIdIdentifier="sentry-dbid-653efc12-541b-4267-b7a8-845b72bb0f97")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>z(e)),{useFeatureGate:f}=Q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),v=ne(u),L=X(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(L))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=W(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=W(fe.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=W(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Xe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Y(i)),u=m(i=>z(i)),{useFeatureGate:D}=Q(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),v=X(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Y(e)),{useFeatureGate:p}=Q(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!J(O,h)&&V,w=X(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,v]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=qe({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),v(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),v(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Qe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,q)=>{n(K({sortKey:e,sortOrder:q}))},onRowClick:e=>{const q=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(q,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-1RWQirWE.js";import E from"./NotFoundScreen-B__1dupq.js";import{a as r}from"./sentry-LUgCZnRx.js";import{h as _,g as v,j as p,i as M,u as P,N as U,n as z,o as O,p as h}from"./core-Cu9_V7DI.js";import{eP as B,Q6 as b,bo as F,bn as N,hn as V,gT as Q}from"./zeni-epic-state-C-Iw-Pw8.js";import{n as $,z as I,_ as q,cD as G}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{M as J}from"./MobileAppDrawer-BPTcRRBp.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="077a4f2e-0346-45f7-885e-8f86a266bc12",e._sentryDebugIdIdentifier="sentry-dbid-077a4f2e-0346-45f7-885e-8f86a266bc12")}catch{}})();const K=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:s}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:s}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:s}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),D=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(d),x=C||D||k,l=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{s?.fetchState==="Completed"&&f.current&&(u(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[s?.fetchState]);const y=r.useCallback((a,i)=>{s!=null&&s?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[s?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:s?.fetchState==="Completed"}),x?n.jsxs(n.Fragment,{children:[n.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),n.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):n.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function ge(){return n.jsxs(O,{children:[n.jsx(h,{path:"*",element:n.jsx(L,{})}),n.jsx(h,{path:"*",element:n.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-1RWQirWE.js";import{a as o}from"./sentry-LUgCZnRx.js";import{j as f,h as B,u as _,g as F,n as H}from"./core-Cu9_V7DI.js";import{h as N,J as V,z as R,b9 as W,x as U,X as $,_ as z,r as X,c as l,e as q,a7 as J,ba as G}from"./index-BaDODbvC.js";import{f2 as K,eP as Q,ML as P,MM as Y,ud as Z,u3 as g,f4 as ee,bO as re,u8 as ae,MN as ne}from"./zeni-epic-state-C-Iw-Pw8.js";import{D as te,e as se,n as oe,S as ie}from"./mui-D8xl37lU.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{M as de}from"./MobileAppDrawer-BPTcRRBp.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="59bc7951-d3c9-4fe2-b735-66e3456249f9",e._sentryDebugIdIdentifier="sentry-dbid-59bc7951-d3c9-4fe2-b735-66e3456249f9")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=N(),n=V();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>K(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=H(function(e){const r=P(e),a=e.referralViewState.rewardsPlanFetchState,n=re([r,a]);return{inviteList:r.invitations,uiState:r.uiState,pendingBonus:r.pendingBonus,earnedBonus:r.earnedBonus,pendingReferrals:r.pendingReferrals,fetchState:n.fetchState,rewardsPlan:r.rewardsPlan}},function(e,r){const{navigate:a}=r;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),a("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),a("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(ae(n))},onBackClick:()=>{a("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(J(G));function ve({isReferralDrawerOpen:e}){const r=B(),a=_(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>Q(t)),m=f(t=>P(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=Y([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(a(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),a(g(!0)))},[b,a,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),a(ee(!0)))},[p,a,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:M,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,T)=>{T.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(X,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(q.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),r("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:r,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:M,onAskAiCfoClick:O,...L})]})}export{ve as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-1RWQirWE.js";import x from"./NotFoundScreen-B__1dupq.js";import{a as p}from"./sentry-LUgCZnRx.js";import{h as I,g as C,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-Cu9_V7DI.js";import{eP as V,NF as g,NV as S,Da as T,Cj as N,D9 as d,D0 as U,O9 as _}from"./zeni-epic-state-C-Iw-Pw8.js";import{h as O,z as $,B,a7 as P,bQ as W,af as z}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-UB01OSuZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="9f1a89f5-5c35-4d8c-a495-35112bbebedb",e._sentryDebugIdIdentifier="sentry-dbid-9f1a89f5-5c35-4d8c-a495-35112bbebedb")}catch{}})();const m="reimbursement-approval-rule-update",F=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(d(s)),a(`./${s}/edit`)):(e(d()),a("./new"))}}})(P(W)),Q=()=>{const e=I(),r=C(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>V(n)),w=O(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(N(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(d())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,q,R)=>{n.endsWith(m)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(Q,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-1RWQirWE.js";import{v as x,z as w,aN as y,r as E,c as p,e as F,cN as P,T as L}from"./index-BaDODbvC.js";import"./mui-D8xl37lU.js";import l from"./NotFoundScreen-B__1dupq.js";import{a as u}from"./sentry-LUgCZnRx.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as d}from"./core-Cu9_V7DI.js";import{eP as z,QG as C,Nk as Q,QH as N,ud as G,f4 as Y,QI as H,ub as O}from"./zeni-epic-state-C-Iw-Pw8.js";import{R as j}from"./ReferralListScreen-CDv4r3zP.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import"./MobileAppDrawer-BPTcRRBp.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="432c2cbf-17a9-49d4-aa31-7c37da2e2851",a._sentryDebugIdIdentifier="sentry-dbid-432c2cbf-17a9-49d4-aa31-7c37da2e2851")}catch{}})();const q=R(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(N()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const a=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),D=Q(v);u.useEffect(()=>{a(N()),r?.rewardsLastViewedTime==null&&i===!1&&(a(G()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),a(Y(!0)))},[m.fetchState,a]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[m.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(q,{navigate:c,location:_,currentTenant:r,companyName:I,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function da(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(L.isReferralFeatureEnabled);return e.jsxs(U,{children:[e.jsx(d,{path:"/",element:t?e.jsx(j,{}):e.jsx(l,{})}),e.jsx(d,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(l,{})}),e.jsx(d,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(l,{})}),e.jsx(d,{path:"*",element:e.jsx(l,{})})]})}export{da as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-1RWQirWE.js";import{a as n}from"./sentry-LUgCZnRx.js";import{u,g as m,h as p,N as g}from"./core-Cu9_V7DI.js";import{z as f,B as y,t as b,c as d,e as h}from"./index-BaDODbvC.js";import{fQ as x,fR as I,JO as w}from"./zeni-epic-state-C-Iw-Pw8.js";import{n as j}from"./mui-D8xl37lU.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2dacdfc5-13e6-419d-bfba-01f38107e18e",e._sentryDebugIdIdentifier="sentry-dbid-2dacdfc5-13e6-419d-bfba-01f38107e18e")}catch{}})();function Q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{Q as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-1RWQirWE.js";import{a as f}from"./sentry-LUgCZnRx.js";import{s as u,u as h,j as y,N as b}from"./core-Cu9_V7DI.js";import{JL as I,eW as w,zK as j}from"./zeni-epic-state-C-Iw-Pw8.js";import{z as l,B as x,y as S,A as D}from"./index-BaDODbvC.js";import{n as c}from"./mui-D8xl37lU.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9fb9ff35-34f4-4d4a-b52a-3682c0e632dc",e._sentryDebugIdIdentifier="sentry-dbid-9fb9ff35-34f4-4d4a-b52a-3682c0e632dc")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{R as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-1RWQirWE.js";import{h as ne,g as W,u as M,i as Y,j as k,n as K,N as Q,o as Ve,p as w}from"./core-Cu9_V7DI.js";import{eP as U,OF as Ce,OG as $e,cl as ee,cm as Ne,fg as He,wX as we,B8 as Ze,wR as Tn,OH as On,OI as Bn,wU as Fn,w$ as ge,wO as Rn,wL as Ln,Nr as le,OJ as Un,Es as _n,Kx as zn,Eu as Mn,kn as Oe,OK as Vn,qo as Ge,qc as We,ke as Ye,kh as Be,Ky as Fe,Kz as $n,OL as Nn,kg as Hn,kD as Zn,k5 as Gn,iE as Wn,iD as Yn,OM as Kn,ON as ye,E9 as Jn,OO as qn,OP as Xn,Nk as ke,OQ as Re,OR as Qn,EF as ea,O3 as na,C2 as Ke,sR as Je,OS as aa,EC as ta,OT as qe,cM as Ae,EJ as Xe,fh as oa,eY as Qe,e_ as De,EH as sa,BY as ra,Ez as ia,OU as en,OV as nn,Eb as an,El as Le,OW as ca,NT as la,EK as da,bt as ua,bF as pa,cx as ma,bG as fa,bs as ha,Js as ga}from"./zeni-epic-state-C-Iw-Pw8.js";import{k as ae,v as N,z as S,T as F,h as _,B as de,bW as ya,a2 as Ie,J as V,x as J,p as tn,aq as xa,af as Ue,c as R,bX as Ca,at as Se,bY as wa,r as ue,bZ as ka,e as be,aN as G,b_ as Aa,X as Da,_ as on,ac as Ia,b$ as _e,c0 as Sa,m as ce,c1 as ba,c2 as Ea,c3 as va,a9 as Pa,o as ja}from"./index-BaDODbvC.js";import{n as z,D as q,S as X}from"./mui-D8xl37lU.js";import ie from"./NotFoundScreen-B__1dupq.js";import{S as ze}from"./SetupPagesScreen-CGvclNp8.js";import{F as sn}from"./FeaturePreviewScreen-CNpXIisp.js";import{a as d}from"./sentry-LUgCZnRx.js";import{M as pe}from"./MobileAppDrawer-BPTcRRBp.js";import{A as Ta,D as Oa,V as Ba}from"./DomesticWireDetailScreen-B0I-XVOq.js";import{A as Fa}from"./AddressScreen-CjLQE8F3.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-BoysBhZD.js";import{Z as Ra}from"./ZeniAccountStatementScreen-LZ2-VOHt.js";import"./recharts-DFGRflCT.js";import"./analytics-RHZXXukl.js";import"./plaid-CM1lGBpq.js";import"./dnd-cSRmPjhK.js";import"./stripe-DMRn4zHo.js";import"./lottie-qz5T1VFo.js";import"./lexical-B-UHoQhE.js";import"./pdf-Dny5wh2o.js";import"./utils-C0WjER8w.js";import"./analyticsHelper-B48RdZxU.js";import"./routePaths-fc5DDlJm.js";import"./BusinessVerificationPageScreen-ow69Wdnb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="f3171bbf-23be-4acf-866f-1926dfa776be",e._sentryDebugIdIdentifier="sentry-dbid-f3171bbf-23be-4acf-866f-1926dfa776be")}catch{}})();const La=z.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,Ua=K(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,a){const{navigate:s,handleDrawerToggle:o}=a;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:t=>{e(we(t))},onCreateRule:()=>{e(Ln())},onUpdateRule:t=>{e(ge(t))},onDeleteClick:t=>{e(Rn(t))},onPauseClick:t=>{e(ge(t,!0,!1))},onResumeClick:t=>{e(ge(t,!1,!0))},onActivityClick:(t,r)=>{e(Fn(t,r))},onUpdateRuleLocalData:t=>{e(Bn(t))},clearRuleLocalData:()=>{e(On())},onEditClick:t=>{s(`./${t}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(ya);function Me({isEditDrawerOpen:e}){const a=ne(),s=W(),o=M(),t=ae(),{ruleId:r,tenantEmailDomain:u}=Y(),{useFeatureGate:l}=N(),[p,f]=d.useState(!1),[x,i]=d.useState(!1),c=k(y=>U(y)),m=k(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=k(y=>$e(y)),h=c?.companyId??S.getSignedInUserTenant(u)?.companyId,A=ee(t?.loggedInUserRoleMap)||Ne(t?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(F.isTreasuryEnabled),g=c?.company!=null&&He(c.company),I=D&&g,O=S.getSignedInUser(),L=c.tenantId,j={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:L??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&h&&(i(!0),o(we(!0)))},[x,C,h,o]);const E=y=>{f(y)},T=_(),P=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(La,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:E}),n.jsx(Ua,{navigate:a,location:s,currentTenant:c,companyName:v,handleDrawerToggle:E,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:P})]})}const _a={overlayWidth:new J(100,100,58)},za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:_a.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ma,{onClick:u=>u.stopPropagation(),children:n.jsx(Ta,{vendorIdParam:e,accountContext:"express-pay"})})})},Ma=z(X)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,Va={overlayWidth:new J(100,100,58)},$a=({isDrawerOpen:e,closeDrawerHandler:a})=>{const s=M(),o=_(),t=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(q,{onClose:()=>{a(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Va.overlayWidth.valuePercentage(t),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Na,{onClick:r=>r.stopPropagation(),children:n.jsx(Fa,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Na=z(X)`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
`,Ha={overlayWidth:new J(100,100,58)},Za=({vendorId:e,isDrawerOpen:a,closeDrawerHandler:s})=>{const o=M(),t=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(le())},anchor:"right",open:a,PaperProps:{style:{width:Ha.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Ga,{onClick:u=>u.stopPropagation(),children:n.jsx(Oa,{vendorIdParam:e,accountContext:"express-pay"})})})},Ga=z(X)`
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 100%;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
`,Wa=z.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,Ya=K(function(e,a){const s=U(e),o=S.getSignedInUser(),t=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:t??""},u=a.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:a.analytics}},function(e,a){const{navigate:s}=a;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,t)=>{e(Be({vendorId:t,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Zn(o))},initializeVendorAddress:()=>{e(Hn())},resetVendorSaveStatus:o=>{e(Nn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,t)=>{o.trim().length>=2?e($n({searchString:o,entityType:t,searchOrigin:"common"})):o.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,t)=>{e(Ge(o,t.split(".")[0]))},onBackClick:o=>{o!=null&&e(Oe(o)),e(Oe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ca);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:s}){const o=ne(),t=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=Y(),f=ae(),x=k(y=>y.expressPayState.fetchState),i=k(y=>U(y)),c=k(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,h]=d.useState(!1),[A,D]=d.useState(!1),[g,I]=d.useState(!1),O=tn(t.state?.pathnameStackToGoBack),{poppedPathname:L}=O,j=L?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?h(!0):(h(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{a===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[a]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const E=xa(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{E==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&P()},[E,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},P=()=>{h(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wa,{children:[Ue(t)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(za,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:b}):null,A===!0?n.jsx(Za,{vendorId:m,closeDrawerHandler:P,isDrawerOpen:A}):null,g===!0?n.jsx($a,{closeDrawerHandler:P,isDrawerOpen:g}):null,n.jsx(Ba,{vendorId:m,isExpressPayPage:!0}),n.jsx(Ya,{navigate:o,location:t,companyId:C,accountId:v,analytics:R,currentTenant:i,vendorId:m,roleMap:f?.loggedInUserRoleMap,isSettings:Ue(t),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const Ka={overlayWidth:new J(100,100,58)},Ja=({authParams:e,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:t})=>{const r=_(),u=V(),l=k(i=>$e(i)),p=k(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{t(!0)},x={depositAccount:o,onDismissClick:f,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:a,currentTenant:p};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:Ka.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:n.jsx(qa,{onClick:i=>i.stopPropagation(),children:n.jsx(wa,{...x})})})},qa=z(X)`
|
|
30
|
-
display: flex;
|
|
31
|
-
min-height: 100%;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
`,Xa={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:a})=>{const s=_(),o=V(),t=M(),r=k(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const f=k(i=>Kn(i)),x={analytics:R,checkDeposit:f,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{t(qn(i))},updateFilesEntity:i=>{t(Ye({files:i}))},onAnotherTransferClick:()=>{t(ye())},onDeleteFile:i=>{t(We(i))},onEditFileName:(i,c)=>{t(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{t(Jn())},onDismissClick:()=>{a(!0),t(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:Xa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(a(!0),void t(ye())),children:n.jsx(Qa,{onClick:i=>i.stopPropagation(),children:n.jsx(ka,{...x})})})]})},Qa=z(X)`
|
|
34
|
-
display: flex;
|
|
35
|
-
min-height: 100%;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
`,et={overlayWidth:new J(100,100,58)},nt=K(function(e,a){const s=a.currentTenant?.companyId;return{plaidConnectionDetails:na(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(e.depositAccountState,e.depositAccountListState)}},function(e,a){return{onReviewClick:()=>e(ta()),clearReviewTransferDetail:()=>e(aa()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(Aa),ln=({isTransferDrawerOpen:e,authParams:a,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:t})=>{const r=k(g=>Xn(g)),u=k(g=>U(g)),l=_(),p=V(),f=M(),{accountId:x}=Y(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=N(),{configValue:h}=b(G.zeniAccountsConfig),A=ke(h),D=()=>{o(!0),f(Re())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:R,onLoad:g=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(q,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:et.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(at,{onClick:g=>g.stopPropagation(),children:n.jsx(nt,{analytics:R,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&t.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>t.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(ea(x))},onDismissClick:D,onSaveChangesToLocalStore:g=>{f(Qn(g))},onAnotherTransferClick:()=>{C(!1),f(Re())},currentTenant:u,zeniAccountsConfigDetail:t,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},at=z(X)`
|
|
38
|
-
display: flex;
|
|
39
|
-
min-height: 100%;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
`,tt=z.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
min-height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,ot=K(function(e,a){return{zeniAccountListView:qe(e),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(e,a){const{navigate:s,currentTenant:o,location:t,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=st(x,i),C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Xe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,f):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(t.state?.pathnameStackToGoBack,t.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(ia(i))},onFetchLinkTokenClick:(i,c)=>{e(Je("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(ra(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(Ke(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(sa(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...t.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Sa);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a}){const s=W(),o=ne(),t=M(),r=V(),{tenantEmailDomain:u}=Y(),{useDynamicConfig:l,useFeatureGate:p}=N(),f=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(F.isTreasuryEnabled),{isFeatureEnabled:c}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(F.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(F.isCheckingCommentingEnabled),b=ke(x),h=k(B=>U(B)),A=h.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),g=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(h.tenantId),[I,O]=d.useState(!1),[L,j]=d.useState(!1),[v,E]=d.useState(!1),[T,P]=d.useState(!1),y=k(B=>qe(B)),$=y.fetchState,te=k(B=>Ce(B)),oe=te?.fetchState??"Not-Started",me=!!h.companyZeniAccountInfo?.info?.isZeniAccountEnabled,H=ae(),Z=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,fn=!!h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,hn=ee(H?.loggedInUserRoleMap),gn=Ae(H?.loggedInUserRoleMap),yn=!!h.companyBillPayInfo?.info?.isBillPayEnabled,Ee=S.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:h.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Da();d.useEffect(()=>{!I&&ve&&(O(!0),t(Xe(!1)))},[I,t,$,ve]),d.useEffect(()=>{!L&&oe==="Not-Started"&&A&&(j(!0),t(we(!0)))},[L,oe,A,t]),d.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{P(a!=null&&a===!0)},[a]);const Pe=()=>{E(!1),o("..")},[wn,kn]=d.useState(!1),je=B=>{kn(B)},{isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=h.company!=null&&He(h.company),fe=(i&&In)===!0&&!fn,[Sn,bn]=d.useState(!1),he=k(B=>B.treasurySetupViewState.treasuryFundsDetails),En=he.fundsDetails,vn=Ia(En);d.useEffect(()=>{fe!==!0||Sn||he?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),t(oa()))},[he.fetchStatus,t]);const Pn=Qe(h),jn=De(c,h);return Pn===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:R,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Pe,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:T}):null,n.jsxs(tt,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:wn,handleDrawerToggle:je}),n.jsx(ot,{zeniBankListView:y,navigate:o,currentTenant:h,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:fe,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:An,onAskAiCfoClick:Dn})]})]}):Z&&hn?n.jsx(Q,{to:"../setup"}):h.companyZeniAccountInfo?.info&&!Z&&gn?n.jsx(Q,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const dn=(e,a,s)=>{const o=De(s,e),{tenantEmailDomain:t}=e;return o===!0||a===!1?`/${t}/bills`:`/${t}/bill/new`},st=(e,a)=>`/${e}/checking/${a}`,un=(e,a)=>a==null?`/${e}/checking/transfer`:`/${e}/checking/${a}/transfer`,pn=(e,a)=>a==null?`/${e}/checking/check-deposit`:`/${e}/checking/${a}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,rt=z.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
width: 100%;
|
|
52
|
-
flex: 1 1 auto;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
align-items: center;
|
|
55
|
-
min-height: 100vh;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,it=K(function(e,a){const{currentTenant:s}=a,o=nn(e,a.accountId),t=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:o.fetchState}},function(e,a){const{navigate:s,currentTenant:o,location:t,accountId:r}=a,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let f="page-not-found";l==="sendMoney"?f=mn(u):l==="payBill"?f=dn(o,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):l==="transfer"?(f=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(f=pn(u,r),p!=null&&e(ca(p))):l==="accountStatement"&&(f=lt(u,r));const x=ce(t.state?.pathnameStackToGoBack,t.pathname);s(f,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ct(u,r),p=ce(t.state?.pathnameStackToGoBack,t.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Le(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(an(r,!1))},onCloseAccountClick:()=>{e(Le(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(ba);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:s}){const o=W(),t=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=Y(),{useDynamicConfig:f}=N(),{useFeatureGate:x}=N(),{isFeatureEnabled:i}=x(F.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(F.isCheckingCommentingEnabled),m=k(Z=>U(Z)),{configValue:C}=f(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),h=!!m.companyBillPayInfo?.info?.isBillPayEnabled,A=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,g={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[O,L]=d.useState(!1),[j,v]=d.useState(!1),[E,T]=d.useState(!1),[P,y]=d.useState(!1),$=k(Z=>nn(Z,p??"")),te=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:te==="Completed"}),d.useEffect(()=>{O||(r(an(p??"",!1)),L(!0))},[O,r,te]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(a!=null&&a===!0)},[a]);const H=()=>{y(!1),t("..")};return n.jsxs(n.Fragment,{children:[P===!0&&$.accountDetail!=null?n.jsx(Ja,{authParams:g,downloadAccountDetailEndPoint:I,closeDrawerHandler:H,isAccountInfoDrawerOpen:P,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:H,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:I}):null,E===!0?n.jsx(cn,{closeDrawerHandler:H,isCheckDepositDrawerOpen:E}):null,n.jsx(rt,{windowSize:u,children:n.jsx(it,{navigate:t,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:h,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ct=(e,a)=>`/${e}/checking/${a}/account-info`,lt=(e,a)=>`/${e}/checking/${a}/statements`,dt=K(function(e,a){const{companyId:s}=a;return{zeniAccountSetupView:la(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,a){const{navigate:s,companyId:o}=a;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(da(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(va),ut=()=>{const e=ne(),a=W(),{tenantEmailDomain:s}=Y(),{useDynamicConfig:o}=N(),t=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),f=k(g=>U(g)),{configValue:x}=o(G.zeniAccountsConfig),i=ke(x);d.useEffect(()=>{l===!1&&a.state?.message==="activation"&&p(!0)},[a.state]);const c=S.getSignedInUserTenant(s)?.companyId??f.companyId,m=S.getSignedInUser(),C=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=g=>{u(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const h=ae(),A=ee(h?.loggedInUserRoleMap),D=Ae(h?.loggedInUserRoleMap);if(C&&A)return n.jsx(Q,{to:"../../checking/setup"});if(f.company?.companyZeniAccountInfo&&(!C&&A||D)){if(a.state?.message==="activation"){const g=tn(a.state?.pathnameStackToGoBack);e(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ea,{showConfetti:l}),n.jsx(ue,{analytics:R,onLoad:g=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(dt,{analytics:R,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:t.colors.grey5}})};function zt(){const e=W(),a=k(P=>U(P)),s=_(),{useFeatureGate:o,useDynamicConfig:t}=N(),r=ae(),u=ee(r?.loggedInUserRoleMap),l=Ae(r?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(F.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(F.isDebitCardFeatureEnabled),c=Qe(a),m=De(i,a),C=a?.userRole!=null&&ua(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pa(r?.loggedInUserRoleMap),h=ma(r?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&fa(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(F.isDepositAccountsFeatureEnabled),g=D&&!C,{configValue:I}=t(G.expressPayConfig),O=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(a.tenantId),{isFeatureEnabled:L}=o(F.isAutoTransferRuleEnabled),j=Pa(a,x,i)&&!C&&ha(r?.loggedInUserRoleMap),v=ga(r?.loggedInUserRoleMap),E=g&&ee(r?.loggedInUserRoleMap),T=E||Ne(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(w,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(w,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:E,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),L?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(w,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(w,{path:"auto-transfer",element:n.jsx(ie,{})}),O&&u?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(w,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(w,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(w,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(w,{path:"promo",element:n.jsx(ut,{})}),c&&!m?n.jsx(w,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(w,{path:"/",element:n.jsx(xe,{})}),n.jsx(w,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:":accountId/*",element:n.jsx(pt,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]}):f&&u?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&l?n.jsx(w,{path:"*",element:n.jsx(Q,{to:"../promo",state:e.state})}):n.jsx(w,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${ja.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pt(){return n.jsxs(Ve,{children:[n.jsx(w,{path:"/",element:n.jsx(re,{})}),n.jsx(w,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(w,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(w,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(w,{path:"statements",element:n.jsx(Ra,{})}),n.jsx(w,{path:"*",element:n.jsx(ie,{})})]})}export{zt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-1RWQirWE.js";import{a as u}from"./sentry-LUgCZnRx.js";import{h as x,u as j,g as B,i as $,j as p}from"./core-Cu9_V7DI.js";import{II as s,IH as v,OX as C,eP as P,OY as T}from"./zeni-epic-state-C-Iw-Pw8.js";import{J as z,at as g,h as D,z as E,B as L,c4 as N,p as U}from"./index-BaDODbvC.js";import{n as _}from"./mui-D8xl37lU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="decdd614-f67e-45df-9f5f-82f6a5a8403c",e._sentryDebugIdIdentifier="sentry-dbid-decdd614-f67e-45df-9f5f-82f6a5a8403c")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function X(){const e=x(),n=j(),d=z(),f=B();let{accountId:a}=$(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=D();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=U(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>P(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{X as Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cH as m,cI as l,JD as _,JE as d}from"./zeni-epic-state-C-Iw-Pw8.js";import{c as u}from"./index-BaDODbvC.js";import"./sentry-LUgCZnRx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="1429d6e3-4d05-41b9-80af-8843db66835c",e._sentryDebugIdIdentifier="sentry-dbid-1429d6e3-4d05-41b9-80af-8843db66835c")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
|