@zeniai/web-app-ui 5.1.45-dev → 5.1.46-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-Bu1wLdr9.js +1 -0
- package/dist/assets/{AddressScreen-C3jTD0QX.js → AddressScreen-DyCQJjNT.js} +2 -2
- package/dist/assets/{AiCfoScreen-BtMMWn6B.js → AiCfoScreen-DpYulm6L.js} +5 -5
- package/dist/assets/{BillPayApprovalRoutes-DU855VPd.js → BillPayApprovalRoutes-BiuKI-Rl.js} +1 -1
- package/dist/assets/{BillPayRoutes-DzxfBsX4.js → BillPayRoutes-UlCXMjZ_.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-BiME3gzl.js → BusinessVerificationPageScreen-fLqoQmHN.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-Dk4_VP17.js → CardsAiCfoScreen-D49SttU_.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BozcfSlm.js → ChargeCardRoutes-lr8bIl57.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DNxF2lkY.js → CompanyPassportScreen-Jd7RmMxP.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DXqmojb9.js → ConnectionAuthScreen-JILvaDGY.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BM-quSNh.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-_VvrC-ga.js → CustomerOnboardingRoutes-BeYw23eY.js} +4 -4
- package/dist/assets/{DashboardRoutes-Dovp7HGT.js → DashboardRoutes-BKrnUTFX.js} +1 -1
- package/dist/assets/{DefaultTenantHome-D8-0czPn.js → DefaultTenantHome-C4xFfbR_.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D62ComgW.js → DomesticWireDetailScreen-DN6hsoHQ.js} +3 -3
- package/dist/assets/DrawerScreen-C3rL34Nr.js +1 -0
- package/dist/assets/EntityDetailRoutes-B6x-jsr1.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Cs8BXmkZ.js +25 -0
- package/dist/assets/{FeaturePreviewScreen-KfiUQgFU.js → FeaturePreviewScreen-Bq9eSSz9.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-Cn6vvoeb.js → HubSpotOAuthCallbackScreen-B3oZEnMP.js} +1 -1
- package/dist/assets/MagicLinkRoutes-Bvtkhcw0.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-RvwdSqqO.js +12 -0
- package/dist/assets/{MobileAppDrawer-DY_LJNf1.js → MobileAppDrawer-D8HOXn7v.js} +1 -1
- package/dist/assets/NotFoundScreen-0h0DiOvj.js +1 -0
- package/dist/assets/{NotificationRoutes-BkpJw4hc.js → NotificationRoutes-DkowgBJj.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-GPiaPY5A.js → OAuthConsentScreen-MNbkNl_v.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DE9xTiJG.js → PandLWithForecastRoutes-DXEDmlZd.js} +1 -1
- package/dist/assets/{PeopleRoutes--3fASQ5h.js → PeopleRoutes-CsAbJBHX.js} +3 -3
- package/dist/assets/PerformanceRoutes-8SJwQoaV.js +1 -0
- package/dist/assets/{Preview-B1kObDl3.js → Preview-DkidNz3z.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Bn0720kQ.js → QBOConnectionScreen-DwoHkIu2.js} +1 -1
- package/dist/assets/{ReferralListScreen-B9-Pm2jb.js → ReferralListScreen-DAUAqg4I.js} +2 -2
- package/dist/assets/{ReimbursementApprovalRoutes-DgN-DZyX.js → ReimbursementApprovalRoutes-DxtKouwg.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B-QO8l6D.js → ReimbursementApprovalRuleDetailScreen-BtppAsqY.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C_8B-Cx9.js → ReimbursementRoutes-eiz8xheE.js} +1 -1
- package/dist/assets/{ReportsRoutes-3IlP_YGU.js → ReportsRoutes-_Zdg3F2x.js} +1 -1
- package/dist/assets/RewardsRoutes-UFPd_8TA.js +1 -0
- package/dist/assets/{ScreenRoutes-BZhSovog.js → ScreenRoutes-BoQ6iXAM.js} +2 -2
- package/dist/assets/{SettingsRoutes-D8sH0k-9.js → SettingsRoutes-BI4dN7RS.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CyzzOWiJ.js → SetupPagesScreen-D-neLjJM.js} +5 -5
- package/dist/assets/SignInScreen-qgS7vG1A.js +1 -0
- package/dist/assets/SignOutScreen-BbyO1zZV.js +9 -0
- package/dist/assets/{TaskListScreen-VdSyXs6p.js → TaskListScreen-CVeALlL0.js} +2 -2
- package/dist/assets/{TaskRoutes-BEWp0wJa.js → TaskRoutes-Gx5x8B3t.js} +2 -2
- package/dist/assets/{TransactionDetailRoutes-DZjZQ9RI.js → TransactionDetailRoutes-Dngsr6y1.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-idWMKJZo.js → TransactionDetailScreen-Bshs2g2Z.js} +2 -2
- package/dist/assets/TransactionListRoutes-Bg_zUk5Q.js +1 -0
- package/dist/assets/{TreasuryRoutes-BQN9aD4y.js → TreasuryRoutes-CNbtiHFp.js} +1 -1
- package/dist/assets/{VendorsRoutes-CavsRr3z.js → VendorsRoutes-C5KKIVE-.js} +11 -11
- package/dist/assets/WiseConfirmationScreen-Bqy3cyw-.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CYGjvO6a.js → ZeniAccountRoutes-CDeXOkOl.js} +8 -8
- package/dist/assets/{ZeniAccountStatementScreen-BBbz4J4l.js → ZeniAccountStatementScreen-DE1cm9kp.js} +1 -1
- package/dist/assets/{accountMappingHelper-Bg3QrS2B.js → accountMappingHelper-cmIw559z.js} +1 -1
- package/dist/assets/{analytics-CR-Ji6KN.js → analytics-DORMe8dT.js} +1 -1
- package/dist/assets/{analyticsHelper-BkTwMm2V.js → analyticsHelper-aSqJwcvL.js} +1 -1
- package/dist/assets/{core-B1V19BTM.js → core-D95G1COY.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-62zSMNJP.js → decodeURIComponentSafe-BLmfpdcW.js} +1 -1
- package/dist/assets/{dnd-DY5CyMCW.js → dnd-BXlaBlTc.js} +1 -1
- package/dist/assets/{empty-DJY9ZnQE.js → empty-BE68b5E4.js} +1 -1
- package/dist/assets/{empty-BKpizSQk.js → empty-BTAxEJiS.js} +1 -1
- package/dist/assets/{emptyVideoElement-DyEXr5u4.js → emptyVideoElement-NX2rx7EQ.js} +1 -1
- package/dist/assets/{epic-BoLhMkLB.js → epic-K6OBBbJr.js} +1 -1
- package/dist/assets/getLocaleForTenant-HT8Btw6T.js +1 -0
- package/dist/assets/{index-CUT1Jf2m.js → index-B_Cirr74.js} +2 -2
- package/dist/assets/{index-Rl-vwFod.js → index-BjNhU8qP.js} +1 -1
- package/dist/assets/{index-B1BV6O_s.js → index-C8tyyalR.js} +5905 -5905
- package/dist/assets/{index-B32kgZ2L.js → index-CnP5hpUl.js} +1 -1
- package/dist/assets/{index-BWk0p_4u.js → index-CruHx9g6.js} +1 -1
- package/dist/assets/{index-Cd64f4Pj.js → index-DLVDaPoM.js} +1 -1
- package/dist/assets/{index-C1O76jd1.js → index-DMreRMIr.js} +1 -1
- package/dist/assets/{index-jGxvchTd.js → index-cIfsvMlJ.js} +1 -1
- package/dist/assets/{lexical-DtEMPKph.js → lexical-D90cNSQE.js} +1 -1
- package/dist/assets/{liveblocks-DtJmjn-F.js → liveblocks-8SEYIom7.js} +1 -1
- package/dist/assets/{lottie-PNrYlsmY.js → lottie-DGqwGfHh.js} +1 -1
- package/dist/assets/{mui-D6ES9V4N.js → mui-jqvOLufq.js} +1 -1
- package/dist/assets/{pathToGoBack-BkwIN_c3.js → pathToGoBack-Csr3Iao-.js} +1 -1
- package/dist/assets/{pdf-C3786_Gz.js → pdf-CMafEn8a.js} +3 -3
- package/dist/assets/{pdf-lib-D3JDQVpu.js → pdf-lib-C0lYQdSO.js} +1 -1
- package/dist/assets/{plaid-Cvs9FZAe.js → plaid-BvitY7vM.js} +1 -1
- package/dist/assets/{pusher-DQiFD9Ci.js → pusher-DVRirJfe.js} +1 -1
- package/dist/assets/{react-BQWMbpQu.js → react-C-4UGOsg.js} +1 -1
- package/dist/assets/{react-nsy5XQiM.js → react-CAXdypQs.js} +1 -1
- package/dist/assets/{react-CTxsS9D9.js → react-CVOHOwD-.js} +1 -1
- package/dist/assets/{react-DkNWIPJu.js → react-DADgee2G.js} +1 -1
- package/dist/assets/{react-ZHmjCTUq.js → react-DJ_69eFR.js} +1 -1
- package/dist/assets/{react-nBgf2eOj.js → react-DOyz-DAB.js} +1 -1
- package/dist/assets/{recharts-C_sYuD8f.js → recharts-B5BD4Kau.js} +1 -1
- package/dist/assets/{routePaths-BaN0YLzj.js → routePaths-STLgTv0l.js} +1 -1
- package/dist/assets/{sentry-DJoVhts9.js → sentry-Bpr6hwv_.js} +1 -1
- package/dist/assets/{url-CZfStJg6.js → url-83NdFFZ3.js} +1 -1
- package/dist/assets/{url-Dh3D7a-t.js → url-tRs_qG1D.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-B-gQ2ZCu.js → useAiCfoDashboardSuggestedQuestionsChips-BfufDhKS.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CE4sjmcs.js +1 -0
- package/dist/assets/{useDeviceId-zuDOu7ni.js → useDeviceId-DNdkDSci.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BrZkGF4L.js → useInitialThreadRequest-DzF6un_U.js} +1 -1
- package/dist/assets/{utils-B1ItiyXC.js → utils-kj_q6fLI.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CUAVvG-3.js → withTransactionSidePanel-CyTjTf4e.js} +1 -1
- package/dist/assets/{zeni-epic-state-Ct7fOB-u.js → zeni-epic-state-BnmnEdbj.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-CMaX3PoD.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-B-ksGe-B.js +0 -1
- package/dist/assets/DrawerScreen-Bzib8YfV.js +0 -1
- package/dist/assets/EntityDetailRoutes-BJQoxnJC.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-BEvk-l6F.js +0 -25
- package/dist/assets/MagicLinkRoutes-DmvvOL_Y.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BTFCnths.js +0 -12
- package/dist/assets/NotFoundScreen-98Ef_Sqs.js +0 -1
- package/dist/assets/PerformanceRoutes-zr7-gR8p.js +0 -1
- package/dist/assets/RewardsRoutes-Bn0Tad-r.js +0 -1
- package/dist/assets/SignInScreen-B7g5AeOc.js +0 -1
- package/dist/assets/SignOutScreen-Kk_O7nh6.js +0 -9
- package/dist/assets/TransactionListRoutes-BhOdNCNy.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Donx26qC.js +0 -12
- package/dist/assets/getLocaleForTenant-BaJta4jx.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-B1ysHqFw.js +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{j as h}from"./liveblocks-8SEYIom7.js";import oa from"./NotFoundScreen-0h0DiOvj.js";import{a as o,b as Jt}from"./sentry-Bpr6hwv_.js";import{n as Ue,S as sa}from"./mui-jqvOLufq.js";import{u as pe,h as Yt,g as Qe,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-D95G1COY.js";import{eT as Re,S5 as la,oc as Ee,fv as ra,rZ as da,ou as Qt,oP as Kt,S6 as Zt,oZ as ua,S7 as Ht,on as ma,rv as pa,ff as Ie,S8 as De,tX as Wt,DL as Xt,S9 as en,Sa as ha,r3 as Ke,Nn as Pt,Np as Sa,ks as ga,Nq as Ca,kz as fa,cW as Ia,v7 as Ze,oA as tn,p2 as Fe,os as re,Sb as Ea,Mg as Rt,Mf as we,Sc as Dt,kQ as ka,Sd as ya,Se as ba,Sf as va,Sg as Ta,oH as Aa,p5 as xe,Sh as wa,Si as xa,Sj as Pa,pc as Ra,kD as Da,ku as Fa,Sk as Ua,kC as Ft,Nx as Ba,Sl as Va,Sm as Oa,q$ as _a,qD as za,p3 as me,qC as Ne,Sn as Ma,So as ja,Sp as La,m7 as $a,bq as qa,m2 as Ut,lQ as Ga,Sq as Na,hC as Bt,gs as Ja,l$ as Ya,x0 as Qa,Sr as Ka,pD as Za,py as Ha,pC as Wa,pn as Xa,Ss as eo,fi as nn,oS as to,oD as no,fw as Vt,p7 as ao,St as oo,Su as so,p4 as an,Sv as co,Sw as io,Sx as lo,Sy as ro,Sz as Ot,rb as uo,qu as mo,Me as po,SA as ho,SB as So,kB as go,SC as Co,Ip as fo,kA as Io,kp as Eo,fh as ko,q0 as on,qm as yo,p1 as _t,p6 as bo,bE as vo,lY as To,lV as Ao,SD as wo,pm as zt,qi as Mt,qg as xo,SE as Po,q5 as Ro,pN as Do,qj as Fo,SF as Uo,SG as Bo,pR as Vo,SH as Oo,pI as _o,pQ as zo,pO as Mo,qp as jo}from"./zeni-epic-state-BnmnEdbj.js";import{f as sn,c as X,d as q,q as ne,X as cn,_ as ln,cQ as Lo,z as Be,cR as $o,at as Pe,cS as qo,aU as jt,B as rn,cT as Go,aq as Je,O as No,a7 as Jo,cU as Yo,a2 as Qo,cV as Ko,V as Zo,cW as Ho,cX as Wo,E as Xo,A as es,aN as ts,cY as ns,cZ as as,b9 as os,y as ss,aQ as cs}from"./index-C8tyyalR.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-Bshs2g2Z.js";import{w as us}from"./withTransactionSidePanel-CyTjTf4e.js";import{h as ms,v as ps}from"./routePaths-STLgTv0l.js";import{g as Ye}from"./accountMappingHelper-cmIw559z.js";import{D as hs}from"./DrawerScreen-C3rL34Nr.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";import"./decodeURIComponentSafe-BLmfpdcW.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="dd6715f9-e8b2-425f-a1a5-a33619721f87",t._sentryDebugIdIdentifier="sentry-dbid-dd6715f9-e8b2-425f-a1a5-a33619721f87")}catch{}})();const Ss=()=>{const t=pe(),l=Yt(),B=Qe(),f=x(d=>Re(d)),{useFeatureGate:v}=sn(),{isFeatureEnabled:C}=v(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=v(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),T=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),S=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(S.month,S.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(S,f.tenantId,!0)},[k,S,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ne(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&S!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,S]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{S!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(S,f.tenantId)},[k,S,s.fetchState,f.tenantId,y]),o.useEffect(()=>{S!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(da(S))},[S,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:C,onMonthEndCheckClick:d=>{l(`./${d}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:T,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Ue.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
|
+
`,Cs=Jt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:v})=>{const C=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:k,statementUploadChosen:T}=t,S=u[l],m=S?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{C(pa(e,n.split(".")[0]))},E=e=>{m!=null&&C(ma({accountId:l,selectedPeriod:k,fileId:e,statementUploadId:m}))},y=()=>{C(Zt({statementUploadChosen:!1}))},d=e=>{C(ua({accountId:l,selectedPeriod:k,payload:e}))},G=e=>{C(Ht({accountId:l,selectedPeriod:k,localData:{accountSource:e}}))},ee=o.useCallback(()=>{C(Qt({accountId:l}))},[C,l]),z=o.useCallback(()=>{C(Kt({accountId:l}))},[C,l]),O=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return S!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx($o,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:S,monthYearPeriod:k,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:v,onEditFileName:P,onDeleteFile:E,onSelectSourceType:G,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:T,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:ee})})}):O!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx(qo,{excludedAccountReconciliation:O,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:z})})}):null}),$t=Ue.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
height: 100%;
|
|
12
|
+
`,qt=Ue.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 fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const v=Be.getSignedInUser();if(v==null)throw Error("Can't access Customer Request page without signing in...");const C=x(r=>ha(r,t,v));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:C.fetchState==="In-Progress"||C.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:C.companyMonthEndReportTemplatesData,bulletPoints:C.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Es,comma:Gt,space:ks}},dateFormat:pn}=No.getLocalizedStrings(),Nt=jo,ys=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:C,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,k={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},T=Ie(t),{selectedTransactionCategorizationTab:S}=T;return{expenseAutomationViewSelector:T,bulkUploadSelector:I===!0?T.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:k,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Qo}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:S,monthEndInsightsCustomerRequestData:v,monthEndInsightsPreviewMode:C,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:v,isUncategorizedExpenseCategoryEnabled:C,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:k,navigate:T,onClickCustomerRequest:S,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:E,currentSelectedView:y,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(E),z=Fe(ee.start),O=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(E.month,E.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,b,g)=>{t(Ot(e,n,{fetchState:"In-Progress"}));const A=()=>t(Ot(e,n,{fetchState:"Error"}));Ko(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,g,n,c,i,b).then(V=>{V!=null?t(uo(e,V)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(Ee({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?ks+Es+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{O!=null&&z!=null&&t(an({start:z,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(_o({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Oo(e))},onConfirmBulkUploadMatch:(e,n,c,i,b)=>{t(Vo(e,n,c,i,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Nt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Nt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ne({selectedTab:c,uiState:{searchString:e}})),O!=null&&z!=null&&t(me(c,{start:z,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(C))},onClose:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0})),T("../")},onBack:()=>{y==="reconciliation"&&d!=null&&t(Vt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ne(I.state?.pathnameStackToGoBack,I.pathname);T("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:b}=n,g=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),V=Ye(G.accruedExpensesAccountList,b.selectedOptions),R={selectedPrepaidExpensesAccountIds:g.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:V.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:b,scheduleExpenseCategory:g,vendor:A}=n,{allAccountList:V,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(J=>J.id===A?.selectedOption):void 0,ae={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(J=>J.value===A?.selectedOption)?.label??"",logo:j?.logo},oe=g?.selectedOption!=null?V.find(J=>J.qboId===g.selectedOption):void 0,Ve=b?.selectedOption!=null?R.find(J=>J.classId===b.selectedOption):void 0,Oe=i?.selectedOption!=null?D.find(J=>J.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:Ve?.classId,updatedAccumulatedDepreciationCategoryID:Oe?.accountId,updatedVendor:{id:ae.id,name:ae.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ha(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Za({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Ka())},handleJeScheduleClick:(e,n,c)=>{t(Qa({selectedJEScheduleKey:n}));const i=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:S,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Ja())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Na(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,b,g,A,V,R,D,j,ae,oe)=>{t(La(e,n,c,i,k,b,g,A,V,R,D,j,ae,oe))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),O!=null&&z!=null&&(t(me(e,{start:z,end:O},!1,!1)),t(ja(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),O!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n})),O!=null&&z!=null&&t(me(e,{start:z,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ne({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,b,g,A)=>{O!=null&&z!=null&&t(me(e,{start:z,end:O},!0,c,n,i,b,g,A))},resetTransactionCategorizationLocalData:(e,n,c,i,b,g,A,V)=>{t(za(e,n,c,i,V??null,b,g,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,b)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:k,updatedVendor:b,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(E.month,E.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(E.month,E.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(_a(e,n,c,C))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Oa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,b,g,A)=>{const{transactionId:V,transaction:R,lineIds:D}=n;g!=null&&t(Ba({transactionId:V,customerUpdates:g})),t(Va({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedCustomer:g,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(Ze({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:v,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,b,g,A)=>{const{transactionId:V,transaction:R,lineIds:D}=n;g!=null&&(t(Da({transactionId:V,vendorUpdates:{name:g.name,id:g.id?g.id:void 0}})),t(Fa({vendorId:g.id?g.id:void 0,localData:{vendorName:g.name,vendorId:g.id?g.id:void 0}}))),g?.id?(t(Ft({selectedTab:i,transactionId:V.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedVendor:g,selectedEntity:b,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),b!=null&&t(Ze({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:v,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:V.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(E,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:E}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ne(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:E}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(E,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ht({accountId:e,selectedPeriod:E,localData:{accountSource:"bank_statement"}})),t(Zt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(E,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ta({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ba({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(ka(i)),t(ya({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ke("bill"));const n=ne(I.state?.pathnameStackToGoBack,I.pathname);T(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{T(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ea({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Qt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Kt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||y!=="reconciliation"||t(re(E,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...v}=B;return function(C,r,I){return{...C,...r,...I,onUploadTransactionReceipt:(s,p,u,k,T)=>{r.onUploadTransactionReceipt(s,p,u,k,T,C.authParams)}}}(t,l,v)})(Jo(Yo)),bs=us(function(t){const l=t.displayName??t.name??"Component",B=Jt.memo(t),f=v=>{const C=pe(),r=function(){const P=pe(),E=x(y=>Ie(y).reconciliation.selectedDrawerAccountId);return{isOpen:E!=null,selectedAccountId:E,openPanel:o.useCallback(y=>{P(De({selectedDrawerAccountId:y}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,E)=>{C(Wt("expense_automation_reconcile",P,E))},[C]),u=o.useCallback((P,E)=>{const y=s?.companyId;y!=null&&(C(Xt(P,y,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",E)),C(en({accountId:E,connectionInProgress:!0})))},[C,s?.companyId]),k=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Cs,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),T=o.useMemo(()=>({reconPanelContent:k,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[k,r.isOpen,r.closePanel]),S=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:S,[r.isOpen,r.closePanel,r.selectedAccountId,S]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...v,...T})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:v,reconPanelContent:C,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Zo(),u=Ho(),{isOpen:k}=Wo(),T=Yt(),S=Qe(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:E}=dn({mobileExploreReferrer:"Transaction categorization"}),y=o.useCallback(()=>{v===!0&&f!==!0&&t?.()},[t,v,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(N=>Ie(N)),U=Qe(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:w}=a,H=Je($),Y=Je(L.fetchState),Z=o.useCallback(N=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,N,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,N,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,N,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,N,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,N,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,N,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===L.fetchState&&$===H||L.fetchState!=="Completed"||Z(!1)},[$,L.fetchState,H]),Z})(),ee=Xo(),[z,O]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[b,g]=o.useState(!1),[A,V]=o.useState([]),[R,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),ae=R?.contentType==="activity"?R.detail.transactionId:void 0,oe=o.useCallback(a=>{a!=null?(s&&p(!1),u(),y(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[y,s,u,p]),Ve=o.useCallback(a=>{s&&p(!1),u(),y(),D({contentType:"transfer",detail:a})},[y,s,u,p]),Oe=o.useCallback(()=>{u(),j(),y(),E()},[y,j,E,u]),J=o.useRef(s);o.useEffect(()=>{s===!0&&J.current===!1&&(u(),j(),y()),J.current=s},[y,j,s,u]);const He=o.useRef(k);o.useEffect(()=>{k===!0&&He.current===!1&&(s&&p(!1),j(),v===!0&&f!==!0&&t?.()),He.current=k},[j,t,k,s,p,f,v]);const ke=v===!0&&f!==!0,We=o.useRef(ke);o.useEffect(()=>{ke&&!We.current&&(s&&p(!1),u(),j()),We.current=ke},[j,s,ke,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:Sn}=xt(),[_e,nt]=o.useState(S.state?.message==="comingFromTransactionDetail"),at=S.state?.message==="comingFromOverview",gn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Cn,useFeatureGate:se}=sn(),{configValue:fn}=Cn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=se(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=se(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=se(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=se(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=se(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:En}=se(X.isProjectsTransactionsEnabled),{isFeatureEnabled:kn}=se(X.isJEScheduleCOTEnabled),yn=o.useCallback(a=>{const U=Ke(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),bn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:vn,paymentAccountNames:Tn}=x(a=>ho(a.accountState)),An=x(a=>So(a.classState)),{monthEndCloseChecksView:K,currentSelectedView:F,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ce,jeSchedules:Le,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const de=ls(Pn,()=>{const a=[],U=ut.current,L=dt.current,$=L!=null&&U!=null?L[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const H of Object.values($.transactionReviewLocalDataById)){const Y=H?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const Z of Object.values(Y)){const N=Z?.account;N?.accountId!=null&&a.push(N.accountId)}}const w=it.current;for(const H of w)for(const Y of H.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&v!==!0||oe(void 0)},[F,oe,v]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,ye=`${je}|${Rn}`,be=o.useRef(null);o.useEffect(()=>{be.current!==null?be.current!==ye&&(be.current=ye,F==="transaction_categorization"&&j()):be.current=ye},[j,F,ye]);const Dn=x(a=>ae==null?void 0:go(a.transactionState,ae)),ie=Dn?.qboId,mt=x(a=>ie==null?void 0:Co(a,ie));o.useEffect(()=>{ie!=null&&m(fo(ie))},[m,ie]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:St}=M.transactionView,gt=o.useCallback(a=>rs(m,a),[m]),Ct=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:ie,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:St,onClose:()=>D(null),onCreateTransfer:gt,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,ie,pt,ht,St,gt]),Fn=Ct!=null,{selectedAccountId:Se}=xn,ft=Je(Le.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>Eo(a)),ge=tt!=null?ko(tt):F,Vn=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ce.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Ce=Fe(It.start),fe=Fe(It.end);if(Ce==null||fe==null)throw Error(`Invalid start - ${Ce} and end - ${fe} period from given ${_}`);const On=o.useCallback(()=>{i(!1)},[]),_n=o.useCallback(()=>{g(!0)},[]),zn=o.useCallback(a=>{V(a),g(!1)},[]),Mn=o.useCallback(()=>{V([])},[]),ve=M.missingReceipts.bulkUpload.phase,Et=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&ve==="matching"&&Et!=null&&m(on({cacheOverride:!0}))},[he,F,ve,Et,m]);const kt=ze?.userId,jn=_.month,Ln=_.year,yt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&ve==="idle"&&kt!=null&&yt!=null&&m(yo())},[F,he,ve,kt,yt,jn,Ln,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{ge!=null&&F!==ge&&m(nn(ge))},[ge]),o.useEffect(()=>{Xe!==!1||ce.fetchState!=="Completed"&&ce.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,te)))},[Xe,ce,d,te]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,te)),m(re(_,Se,!1,!1)))},[_.month,_.year,d,te]);const bt=o.useCallback((a=!1,U=!1)=>{const L={start:Ce,end:fe};switch(F){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(_,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(_.year,_.month,0),w=vo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(To(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(bo(L,U));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(re(_,Se,a,U))}},[F,Ce,fe,n.companyId,n.tenantId,je,_,Se,_e,nt,te]);o.useEffect(()=>{F===ge&&ce.fetchState==="Not-Started"&&d&&bt(!0)},[ce,Ce,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||wn.fetchState==="In-Progress"||ce.fetchState!=="Completed"||(et.current=!0,bt(!0,!0))},[]),o.useEffect(()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[K.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),T("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[K.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&Se==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(re(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,re,Se,_]);const $n=Lt();o.useEffect(()=>{const a=(K.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&K.monthEndCloseChecks?.reportEmailSentDate==null||T("../")},[F,K.monthEndCloseChecks]);const qn=r===!0?C:B,Gn=r===!0||v===!0,Nn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,Le.accountSettingsView.saveState.fetchState,zt]);const{transactionId:vt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Qn,vendorViewDetails:Kn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let H,Y,Z;const N=Lt(),W=a.transactionView;let Tt=()=>{};const{transactions:Hn,selectedTransactionId:ue,selectedTransactionLineId:Te,transactionLocalData:Wn}=W;if(L==="transaction_categorization"){const $e=Wn.find(le=>le.transactionId===ue),Q=Hn.find(le=>le.id===ue),At=Te!=null?$e?.transactionReviewLocalData?.lineItemById[Te]:void 0,wt=At?.account;Y=At?.class?.classId,H=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,Q?.typeOfTransaction);Q!=null&&ea&&(Z={id:ue,type:Ke(Q.typeOfTransaction)}),Tt=()=>{if(ue!=null&&Te!=null&&Q!=null){const le=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(le!=null&&Q.lines!=null&&Q.lines.length>0){const Ae=le.lineItemById[Te];let qe=le.selectedEntity;if(Ia(Q)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:Q.id,type:Q.type},transaction:Q,lineIds:Q.lines.map(aa=>aa.id)??[]};w(Ze({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,H,Y));return{transactionId:Z,onSaveVendor:()=>{w(fa(Z,void 0,!1,!0))},onSaveSuccess:Tt,onCancel:()=>{Z!=null&&w(Sa({transactionId:Z})),w(ga()),w(Ca()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{O(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Zn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,L)=>{L.onReconciliationPusherEventReceived(a)}};return gn?.loggedInUserRoleMap==null?K.fetchState==="Error"?h.jsx(os,{onGoHome:()=>T("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:b,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{g(!1)},children:h.jsx(vs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>g(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),vt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:vt,onSaveVendor:Jn,onSaveSuccess:Yn,onCancel:Qn,vendorViewDetails:Kn}),h.jsx(ys,{...Zn,navigate:T,location:S,themeState:ee,categoryOptions:vn,classesForFilters:An,accountsForFilters:Tn,vendorSearchAutoCompleteData:{autoCompleteText:Vn,entityAutoCompleteView:bn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:En,isCOTEnabled:$n,isJEScheduleCOTEnabled:kn,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:Ct,onOpenTransferRightPanel:st===!0?Ve:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:_n,handleEditClick:On,tenantEmailDomain:Sn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:oe,closeSidePanel:Nn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:yn,sidePanelListPercent:r===!0?66:void 0}),de.showPopup&&de.popupType!=null&&h.jsx(cs,{popupType:de.popupType,currencySymbol:de.currencySymbol,onSubmit:de.handleSubmit,onDismiss:de.handleDismiss})]})})),vs=Ue(sa)`
|
|
22
|
+
display: flex;
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
`;function Qs(){return h.jsxs(ia,{children:[h.jsx(Ge,{path:"*",element:h.jsx(Ss,{})}),h.jsx(Ge,{path:"/:selectedTab/:selectedPeriod/*",element:h.jsx(bs,{})}),h.jsx(Ge,{path:"*",element:h.jsx(oa,{})})]})}export{Qs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import c from"./NotFoundScreen-0h0DiOvj.js";import{h as u,g as b}from"./core-D95G1COY.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 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-Bpr6hwv_.js";import{u as f,h as l,g as m}from"./core-D95G1COY.js";import{hk as p,Lu as b,Lv as g}from"./zeni-epic-state-BnmnEdbj.js";import{u as _,L as h,z as y}from"./index-C8tyyalR.js";import"./liveblocks-8SEYIom7.js";import"./recharts-B5BD4Kau.js";import"./mui-jqvOLufq.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="6aff55b9-d5b3-420c-9116-bf42be16a2ee",e._sentryDebugIdIdentifier="sentry-dbid-6aff55b9-d5b3-420c-9116-bf42be16a2ee")}catch{}})();function R(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=_(),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"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,b("revenue"),g("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-8SEYIom7.js";import{i as S,n as g,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-D95G1COY.js";import{Ln as k,Lo as v,Lp as T,AS as A,AE as G,Lq as B,Lr as oe,Ls as se,AI as ie,f6 as $,AP as le,AM as re}from"./zeni-epic-state-BnmnEdbj.js";import{J as x,o as r,k as de,d as j,j as M,S as ce,p as me,n as pe,q as V,f as ue,c as he,r as ge,E as xe,m as fe,s as be,B as we,N as Se,R as ye,v as ke,w as ve,y as je,C as $e}from"./index-C8tyyalR.js";import{n as m}from"./mui-jqvOLufq.js";import f from"./NotFoundScreen-0h0DiOvj.js";import{a as I}from"./sentry-Bpr6hwv_.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="dc1bb1df-3be3-42be-a9a9-fa869ad07633",e._sentryDebugIdIdentifier="sentry-dbid-dc1bb1df-3be3-42be-a9a9-fa869ad07633")}catch{}})();const Ie=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
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
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=g(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Ae=m.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,Be=g(function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:M.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Le();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(Ae,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:M.googleMapsAPIKey})})})}const Le=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),ze=m.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Te=g(function(e){const t=k(e),n=v(e),o=B(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(ge);function Ge(){const e=C(),t=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Me={containerWidth:new je(100,58)},Ve=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,_e=m.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
height: 100vh;
|
|
49
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
+
width: 100vw;
|
|
51
|
+
overflow-y: scroll;
|
|
52
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
+
`,He=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Me.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,Ke=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,We=g(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),d=i.get("token"),_=n.pathname.includes("address"),b=x(),H=xe(),D=fe(),w=be(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:q,fetchState:c,billAttachment:J,billFetchState:L,companyName:R,currencySymbol:O,amount:Q}=W,{tenantId:P,userId:z,sessionId:N}=q,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&t(le(s,o,d))},[w,c,s,o,d,t]),I.useEffect(()=>{w&&c==="Completed"&&($(z,N,P),l!=null&&t(re(l)))},[c,w,z,N,P,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&L==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),O,Q))(u)}),a.jsxs(_e,{windowSize:b,children:[b!=="small"?a.jsx(Ve,{onClick:K}):null,a.jsx(Ke,{windowSize:b,isAddressPage:_,children:L==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:J,type:"bill"})}),a.jsx(He,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function qe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(qe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-8SEYIom7.js";import{a as g}from"./sentry-Bpr6hwv_.js";import{u as F,g as _,h as w,t as M,j as l,N as T}from"./core-D95G1COY.js";import{z as r,m as P,O as V,e as A,d as N,g as R,K,R as W,h as $}from"./index-C8tyyalR.js";import{eT as q,L8 as B,Li as G,L9 as H,f6 as J,fz as Q,Le as X,gj as Y,cU as Z,Lj as ee,Lk as te}from"./zeni-epic-state-BnmnEdbj.js";import{n as ne}from"./mui-jqvOLufq.js";import{u as se}from"./useDeviceId-DNdkDSci.js";import{f as ie}from"./analyticsHelper-aSqJwcvL.js";import{t as ae}from"./getLocaleForTenant-HT8Btw6T.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="53e75574-ce07-4f6c-87a5-201780501422",t._sentryDebugIdIdentifier="sentry-dbid-53e75574-ce07-4f6c-87a5-201780501422")}catch{}})();const z=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function ze(){const t=F(),i=_(),f=w(),[y]=M(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),L=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=>q(e)),k=l(e=>B(e)),j=r.getSignedInUser(),b=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&a!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,m)))},[n,p,t,a,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&L!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ae(o)),ie(s,o,b,void 0,k.tenantsInOrder),Y().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(R.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,L,s,o,k,b,i.state,t]);const E=g.useCallback(()=>{f("/signin/auth")},[f]),O=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),U=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(K,{phoneNumber:x,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:O,onVerifyOtp:U,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||j!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!z(n,p)||m==null||I==="Error"){const e=i.state?.origin??"/",v=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:v,magicLinkExpired:!v&&(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{ze as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-
|
|
1
|
+
import{j as U}from"./liveblocks-8SEYIom7.js";import{a as c}from"./sentry-Bpr6hwv_.js";import{u as pe,j as s,i as Ke,g as We,h as Je,l as M}from"./core-D95G1COY.js";import{eT as he,fb as Qe,fc as Se,e_ as Xe,bn as ea,eS as aa,fd as ta,fe as na,fg as sa,fj as oa,fs as ia,fk as g,fm as ra,fn as ue,fq as da,fo as la,fp as ca,fr as ua,cK as fa,fu as ma,cP as ba,bt as pa,eZ as ha,fz as Sa,fA as ga,fy as Ea}from"./zeni-epic-state-BnmnEdbj.js";import{a7 as ka,a8 as Ca,E as ya,f as Ia,z as k,s as Ta,u as wa,c as r,a9 as Aa,aa as _a,A as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Pa,ag as Ma,ah as be,d as R,$ as Ra,q as A,ai as N,aj as Na}from"./index-C8tyyalR.js";import{D as Ua}from"./mui-jqvOLufq.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="c39731a1-f890-450b-ba91-abfd3faf5abf",f._sentryDebugIdIdentifier="sentry-dbid-c39731a1-f890-450b-ba91-abfd3faf5abf")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ke(),a=We(),C=ya(),o=Je(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),j=k.getSignedInUser(),_=ea(j),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,x=s(e=>aa(e)),O=x.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,Z),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),q=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:H}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),W=K||H&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Pe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),J=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,K,H,w).fetchState),ie=s(e=>ca(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ua(n.userRole),[n.userRole]),Oe=fa(xe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&q.fetchState==="Completed"&&ma(q.notificationSettings,h.userEmail,Z,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[Ze,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Ba(qe);return U.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ga,{signedInUser:j,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:Oe,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",O??null,null),!ge)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Na(e.type);be(e.type)?(O!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Ee(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:x,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Za=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Za as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-8SEYIom7.js";import{h as r,n}from"./core-D95G1COY.js";import{I as i}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import"./sentry-Bpr6hwv_.js";import"./zeni-epic-state-BnmnEdbj.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="a91be54e-6c13-4a77-b876-d2a39d3636be",o._sentryDebugIdIdentifier="sentry-dbid-a91be54e-6c13-4a77-b876-d2a39d3636be")}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 +1 @@
|
|
|
1
|
-
import{l as ct,a as
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-8SEYIom7.js";import lt from"./NotFoundScreen-0h0DiOvj.js";import{a as k}from"./sentry-Bpr6hwv_.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as J}from"./core-D95G1COY.js";import{cs as St,fd as X,eT as H,fr as bt,fk as b,S0 as Q,fn as d,fc as y,sh as M,xD as It,S1 as Ct,fb as Tt,fu as yt,sm as _t,S2 as $,bq as F,hC as w,sq as K,S3 as At,cD as Et,cx as Nt}from"./zeni-epic-state-BnmnEdbj.js";import{X as xt,z as Bt,f as wt,c as Dt,_ as Rt,cN as vt,q as N,a7 as Pt,cO as Ut,a8 as Gt,p as $t}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="f4f4beb9-7906-4b71-ad91-0174a7b1974f",t._sentryDebugIdIdentifier="sentry-dbid-f4f4beb9-7906-4b71-ad91-0174a7b1974f")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(K("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ut)),qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,D]=k.useState(!1),a=S(e=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:P,fetchMore:ot}=ct(),{threads:V,isLoading:W,fetchMore:z,isFetchingMore:L,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(q!==i&&i!=null&&s(Q(i)),i==null){const e=`../${q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=_||P===!0||C!==!0||_||P===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(D(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const G=V.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(L||O===!0||z==null||z(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,P,L,C,O,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(J,{path:"/:selectedTab",element:E.jsx(qt,{})}),E.jsx(J,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-8SEYIom7.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{u as T,g as A,j as o,N as j}from"./core-D95G1COY.js";import{Lx as x,eT as z,fj as C,Ly as P,Lz as D,LA as M,LB as R,o2 as k,Ku as N}from"./zeni-epic-state-BnmnEdbj.js";import{z as h,F as I}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="1dc10ae9-bfe1-4399-9381-30c20f7fd30c",n._sentryDebugIdIdentifier="sentry-dbid-1dc10ae9-bfe1-4399-9381-30c20f7fd30c")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo(()=>x(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=>z(e)),l=o(e=>C(e)),d=o(e=>e.tenantState.fetchState),y=o(P),v=o(D),c=o(M),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[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&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[f,a,d,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&&l.some(L=>L.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=S??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:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??v,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};
|
package/dist/assets/{PandLWithForecastRoutes-DE9xTiJG.js → PandLWithForecastRoutes-DXEDmlZd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-8SEYIom7.js";import{h as z,u as X,g as Z,i as H,j as d,n as J,o as K,p as I}from"./core-D95G1COY.js";import{eT as v,s5 as P,rF as Q,M2 as M,rA as T,bt as ee,bn as ae,bU as te,rB as se,M3 as oe,LR as C,dG as re,vA as ne,M4 as ce,vX as ie,fa as le,f8 as de}from"./zeni-epic-state-BnmnEdbj.js";import{z as fe,X as me,_ as pe,A as ue,f as O,c as $,N as he,d as w,ao as Fe,q as ge}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import be from"./NotFoundScreen-0h0DiOvj.js";import{F as Ie}from"./FeaturePreviewScreen-Bq9eSSz9.js";import{a as F}from"./sentry-Bpr6hwv_.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{u as Te}from"./useInitialThreadRequest-DzF6un_U.js";import{t as Se}from"./routePaths-STLgTv0l.js";import{M as ye}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="29c4f4f3-4c04-4913-8ebb-4fd3fed67f33",s._sentryDebugIdIdentifier="sentry-dbid-29c4f4f3-4c04-4913-8ebb-4fd3fed67f33")}catch{}})();const S=(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})}},Ae=J(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:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(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,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{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("../../")}}})(Fe);function U(){const s=z(),e=X(),a=Z(),{forecastId:o,tenantEmailDomain:r}=H(),[c,p]=F.useState(!1),[f,u]=F.useState(!1),h=fe.getSignedInUser(),y=d(t=>v(t)),N=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),A=d(t=>t.profitAndLossState),k=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:G}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!c&&g)p(!0),l||e(Q());else if(l&&!f){u(!0);const t=((m,E,R)=>E!=null?m.forecasts.findIndex(b=>b.id===E):R!=null?m.forecasts.findIndex(b=>b.id===R):m.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(M(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&g&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,f,u,P,T,g]);const D=ue(),_=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=O(),{isFeatureEnabled:L}=q($.isReportsCommentingEnabled),W=Te(L?y?.companyId:void 0,{clearParams:l&&f}),[Y,V]=F.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:N,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:_,isAiCfoAccessEnabled:B,onAskAiCfoClick:G,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(c=>v(c)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-8SEYIom7.js";import{L_ as te,eT as X,kp as H,fa as J,f8 as ne,Js as Q,LE as oe,uy as Ee,L$ as N,un as ke,uH as Ie,uB as ie,ur as re,uF as Pe,uC as je,M0 as le,wm as Le,g6 as Te,g9 as ve,M1 as _,uv as de,uu as ce,uK as Fe,c3 as Ae}from"./zeni-epic-state-BnmnEdbj.js";import{J as pe,f as Y,c as E,z as K,a9 as ue,D as me,ak as ge,al as Oe,y as he,o as O,Q as fe,O as Ce,am as Re,X as Ve,_ as Ue,N as Be,d as be,g as Ze,q as $e,an as _e,A as ze}from"./index-C8tyyalR.js";import{D as ye,n as M,S as we}from"./mui-jqvOLufq.js";import ae from"./NotFoundScreen-0h0DiOvj.js";import{a as r}from"./sentry-Bpr6hwv_.js";import{u as ee,i as Ge,j as m,h as He,g as Ke,n as Me,o as se,p as $}from"./core-D95G1COY.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as qe}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="4a8feed8-8bb0-465e-8baf-7e105082cdd0",a._sentryDebugIdIdentifier="sentry-dbid-4a8feed8-8bb0-465e-8baf-7e105082cdd0")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>H(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),T=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,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(v))},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:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:i,isEditPopup:!0}):null,s.jsx(Oe,{...b})]})})},Je=M(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -15,8 +15,8 @@ import{j as s}from"./liveblocks-DtJmjn-F.js";import{L_ as te,eT as Q,kp as H,fa
|
|
|
15
15
|
margin-bottom: 30px;
|
|
16
16
|
margin-top: ${O.sp4};
|
|
17
17
|
white-space: pre-line;
|
|
18
|
-
`,
|
|
18
|
+
`,Qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>X(i)),u=m(i=>H(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=J(f,d),P=ne(d),T=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{R===!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),L=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,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:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!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:Qe.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(Re,{...b})]})})},ea=M(we)`
|
|
19
19
|
display: flex;
|
|
20
20
|
min-height: 100%;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(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(_({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(_({searchText:o}))}}}})(_e);function
|
|
22
|
+
`,aa=Me(function(a,t){const l=le(a),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(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(_({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(_({searchText:o}))}}}})(_e);function q({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=Ke(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>X(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:R}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!J(R,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(_({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),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!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(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Xe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(qe,{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:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(_({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=ze();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(q,{})}),s.jsx($,{path:"new",element:s.jsx(q,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(q,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-8SEYIom7.js";import E from"./NotFoundScreen-0h0DiOvj.js";import{a as r}from"./sentry-Bpr6hwv_.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-D95G1COY.js";import{eT as B,S4 as b,bo as F,bn as N,i6 as V,hC as $}from"./zeni-epic-state-BnmnEdbj.js";import{E as q,z as I,_ as G,cP as H}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as K}from"./MobileAppDrawer-D8HOXn7v.js";import"./recharts-B5BD4Kau.js";import"./analytics-DORMe8dT.js";import"./plaid-BvitY7vM.js";import"./dnd-BXlaBlTc.js";import"./stripe-DMRn4zHo.js";import"./lottie-DGqwGfHh.js";import"./lexical-D90cNSQE.js";import"./pdf-CMafEn8a.js";import"./utils-kj_q6fLI.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]="77c72e01-204a-40a3-ab5b-332fc8a24da9",e._sentryDebugIdIdentifier="sentry-dbid-77c72e01-204a-40a3-ab5b-332fc8a24da9")}catch{}})();const L=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(H),Q=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,A)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-Bpr6hwv_.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-8SEYIom7.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-Bpr6hwv_.js";import{L as dt,bU as Tc,eT as Ac,L8 as Rc,LC as kl,c3 as Tl,fz as Al,fA as Rl}from"./zeni-epic-state-BnmnEdbj.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-kj_q6fLI.js";import{r as un}from"./empty-BE68b5E4.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-C0lYQdSO.js";import{r as Gl}from"./index-CruHx9g6.js";import{r as zl}from"./index-DLVDaPoM.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-D95G1COY.js";import{u as Kl,z as Pc,L as Wl,G as Jl,H as Xl,j as Ql,d as tf}from"./index-C8tyyalR.js";import"./mui-jqvOLufq.js";import{d as Pe}from"./decodeURIComponentSafe-BLmfpdcW.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="2c38da57-7b53-4bcc-becc-7a9925401fb3",t._sentryDebugIdIdentifier="sentry-dbid-2c38da57-7b53-4bcc-becc-7a9925401fb3")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-8SEYIom7.js";import{a as o}from"./sentry-Bpr6hwv_.js";import{j as f,h as _,u as H,g as N,n as V}from"./core-D95G1COY.js";import{m as F,J as M,z as R,bb as W,y as U,X as $,_ as q,N as z,d as l,g as X,a7 as J,bc as G}from"./index-C8tyyalR.js";import{fe as K,eT as Q,Or as P,Os as Y,vq as Z,vg as p,fg as ee,bO as ae,vl as re,Ot as ne}from"./zeni-epic-state-BnmnEdbj.js";import{D as te,e as se,n as oe,S as ie}from"./mui-jqvOLufq.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CE4sjmcs.js";import{M as de}from"./MobileAppDrawer-D8HOXn7v.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]="e6da206e-d956-47ca-a8c7-d5a4be83538e",e._sentryDebugIdIdentifier="sentry-dbid-e6da206e-d956-47ca-a8c7-d5a4be83538e")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=M();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!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:r.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
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=
|
|
5
|
+
`,I="refer-and-earn-status-update",we=V(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(p(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(p(!0,!0))}}})(J(G));function be({isReferralDrawerOpen:e}){const a=_(),r=H(),n=N(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=R.getSignedInUser(),h=f(t=>Q(t)),m=f(t=>P(t)),v=m.fetchState,g=f(t=>t.referralViewState.rewardsPlanFetchState),y=Y([m,g]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&c&&(u(!0),r(p(!0)))},[v,r,c]),o.useEffect(()=>{!d&&g.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[g,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),b=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:T}=le({mobileExploreReferrer:"Rewards"});q({isDataReady:y===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:b}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:T,...L})]})}export{be as R};
|