@zeniai/web-app-ui 5.3.98-qa → 5.3.99-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/AccountMappingScreen-Cwa6Sncr.js +9 -0
- package/dist/assets/ActualMatchingMatchDetailScreen-JAoGrJi3.js +1 -0
- package/dist/assets/AddressRoutes-D0QZxsbK.js +1 -0
- package/dist/assets/AddressScreen-hby_CR8D.js +9 -0
- package/dist/assets/AiCfoScreen-DNDihu3K.js +22 -0
- package/dist/assets/{AppDrawer-B6XGm--J.js → AppDrawer-Cupbn6L3.js} +2 -2
- package/dist/assets/BillPayApprovalRoutes-sOvVtkKV.js +1 -0
- package/dist/assets/{BillPayRoutes-BXSQK4Z1.js → BillPayRoutes-DAZ2LiAE.js} +18 -18
- package/dist/assets/BusinessVerificationPageScreen-CpAzjlh5.js +9 -0
- package/dist/assets/{CardsAiCfoScreen-D7eizM_e.js → CardsAiCfoScreen-BP02_M1s.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CHKFOxrs.js → ChargeCardRoutes-Ba3x5MoU.js} +8 -8
- package/dist/assets/{CompanyPassportScreen-Dk-3Eud9.js → CompanyPassportScreen-B7KOuZR_.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-CDQ0Sa51.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-CzX3lGuD.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-n-9HOpeM.js → CustomerOnboardingRoutes-B3teunq3.js} +3 -3
- package/dist/assets/DashboardRoutes-DnxyUY7k.js +20 -0
- package/dist/assets/{DefaultTenantHome-C-xDsqWH.js → DefaultTenantHome-DNm_mIU1.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Cb0F3Rod.js +18 -0
- package/dist/assets/DrawerScreen-B5Qgxoe2.js +1 -0
- package/dist/assets/EntityDetailRoutes--Mqqoc0l.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Ce113KIS.js +38 -0
- package/dist/assets/FeaturePreviewScreen-Bu-JxAVw.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-B12KbAGI.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-Db8GSYr5.js → InboxNotificationsProvider-Bz8aI0zf.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BEEsHk_H.js → InvoicingRoutes-IUj-CS51.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-Dj9i4Hr2.js → MagicLinkRoutes-6bWvZ6Ex.js} +18 -18
- package/dist/assets/MagicLinkSignInScreen-kYQNLgBh.js +12 -0
- package/dist/assets/MobileAppDrawer-D4DOSbVQ.js +1 -0
- package/dist/assets/NotFoundScreen-D92eiixV.js +1 -0
- package/dist/assets/NotificationRoutes-BV6tu0jZ.js +1 -0
- package/dist/assets/OAuthConsentScreen-BKzEKwhD.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CcRkLhpt.js +1 -0
- package/dist/assets/{PaymentLinkScreen-C6K4l799.js → PaymentLinkScreen-DVW3u8lI.js} +5 -5
- package/dist/assets/PeopleRoutes-DPu9dF6W.js +22 -0
- package/dist/assets/PerformanceRoutes-D8D-QN7a.js +1 -0
- package/dist/assets/{Preview-Dmk92_3R.js → Preview-DSYEA-qi.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-w89pHWnf.js → QBOConnectionScreen-BbOyxErb.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-CixN0rww.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-XsqK1nGV.js +1 -0
- package/dist/assets/ReimbursementRoutes-B2FNn_0P.js +68 -0
- package/dist/assets/{ReportsRoutes-B3kIWCeV.js → ReportsRoutes-CJrunnvK.js} +1 -1
- package/dist/assets/RewardsRoutes-8HmabMf6.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-edh3y6eB.js → ScheduleDetailsPrepaidExpensesScreen-DHpH5oJw.js} +5 -5
- package/dist/assets/ScreenRoutes-DAK3aVc9.js +2 -0
- package/dist/assets/{SettingsRoutes-DP3k31bS.js → SettingsRoutes-6-0ys-s5.js} +6 -6
- package/dist/assets/{SetupPagesScreen-CxoDK6yX.js → SetupPagesScreen-BbFcVR26.js} +5 -5
- package/dist/assets/SignInScreen-mTQjLuAc.js +1 -0
- package/dist/assets/SignOutScreen-C7lCXdn2.js +9 -0
- package/dist/assets/{TaskListScreen-CfRSt11Z.js → TaskListScreen-CW5lbYvD.js} +2 -2
- package/dist/assets/{TaskRoutes-Bsl06EUw.js → TaskRoutes-ssEkwrEi.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-DBqh72Ke.js +1 -0
- package/dist/assets/TransactionDetailScreen-B1no9UdL.js +5 -0
- package/dist/assets/{TransactionListRoutes-Cf10-jIo.js → TransactionListRoutes-DCMjmg_J.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CUsBc54k.js → TreasuryRoutes-BUhJHYkV.js} +5 -5
- package/dist/assets/{VendorsRoutes-VjUFmibF.js → VendorsRoutes-C1J2HapW.js} +11 -11
- package/dist/assets/WiseConfirmationScreen-DgUBxs8P.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CCtz7FC8.js → ZeniAccountRoutes-C4aExMdo.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-Vi4F2dbO.js +9 -0
- package/dist/assets/{accountMappingHelper-DLreHlS2.js → accountMappingHelper-CvrKmWxH.js} +1 -1
- package/dist/assets/{analytics-DOu6Ih_Z.js → analytics-DbFSqIth.js} +1 -1
- package/dist/assets/{analyticsHelper-Bjsf9R5q.js → analyticsHelper-drNlDujn.js} +1 -1
- package/dist/assets/{core-Dx-yNdOO.js → core-C9Jt3gNb.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-gD0LryXw.js → decodeURIComponentSafe-Cr8jQXNX.js} +1 -1
- package/dist/assets/{dnd-DfkYz8Zm.js → dnd-KhFMfpEU.js} +1 -1
- package/dist/assets/{empty-D2eoN5PS.js → empty-D0s_5kET.js} +1 -1
- package/dist/assets/{empty-D1pJjZqZ.js → empty-DDPaROCO.js} +1 -1
- package/dist/assets/{emptyVideoElement-BfILpxFo.js → emptyVideoElement-LvEbv-wS.js} +1 -1
- package/dist/assets/epic-Ds-UlHfx.js +2 -0
- package/dist/assets/{expenseAutomationHelper--OaaBO01.js → expenseAutomationHelper-D-1MzDTJ.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CCedhKv9.js → getLocaleForTenant-7mVUFLO-.js} +1 -1
- package/dist/assets/{index-BJmkm_zf.js → index-B3Xhbg9K.js} +1 -1
- package/dist/assets/{index-Cp3PWInT.js → index-ByO3g4MC.js} +1 -1
- package/dist/assets/{index-C19xNC89.js → index-C0qnV65V.js} +1 -1
- package/dist/assets/{index-CFth-nEE.js → index-CFbnVkgh.js} +1 -1
- package/dist/assets/{index-D2mWQKs0.js → index-CIoiM__n.js} +1 -1
- package/dist/assets/{index-BN_JNPW3.js → index-DmFy--fV.js} +17146 -16586
- package/dist/assets/{index-CAZwNpzy.js → index-JIbs7_F9.js} +2 -2
- package/dist/assets/{index-CfVtthD8.js → index-Xo8KkzkM.js} +1 -1
- package/dist/assets/{lexical-CeKyhyV8.js → lexical-CpBrNOz8.js} +1 -1
- package/dist/assets/{liveblocks-BlNqAXG4.js → liveblocks-Bym0XjRt.js} +1 -1
- package/dist/assets/{lottie-CICLPim-.js → lottie-CvA92JCl.js} +1 -1
- package/dist/assets/{mui-DicWBIpH.js → mui-BsgiBiT9.js} +1 -1
- package/dist/assets/{pathToGoBack-BzzMe8-p.js → pathToGoBack-CMP2hETE.js} +1 -1
- package/dist/assets/{pdf-BwuxCG-0.js → pdf-O569E9WB.js} +3 -3
- package/dist/assets/{pdf-lib-BK2JzciQ.js → pdf-lib-CRTLGVrP.js} +1 -1
- package/dist/assets/{plaid-BW55_XuJ.js → plaid-C8X6T_ms.js} +1 -1
- package/dist/assets/{pusher-CYljAxCY.js → pusher-CudE88Nt.js} +1 -1
- package/dist/assets/{react-C0TfUb2o.js → react-C2Rb5fzR.js} +1 -1
- package/dist/assets/{react-BRFjbln3.js → react-D5axG0I8.js} +1 -1
- package/dist/assets/{react-CoUnzBTV.js → react-DE5Goxu8.js} +1 -1
- package/dist/assets/{react-Dl4MB9dn.js → react-DvRjMeo2.js} +1 -1
- package/dist/assets/{react-R2WFHHNj.js → react-LkPios_L.js} +1 -1
- package/dist/assets/{react-DZ74qEy0.js → react-eTtPELPj.js} +1 -1
- package/dist/assets/{recharts-DkhthbKK.js → recharts-GCccddBO.js} +1 -1
- package/dist/assets/routePaths-DQh6iYo4.js +1 -0
- package/dist/assets/{sentry-oO1cMYln.js → sentry-CoKtZcTW.js} +1 -1
- package/dist/assets/{stripSplatSuffix-DUyz4jOZ.js → stripSplatSuffix-B7IfcJr8.js} +1 -1
- package/dist/assets/{url-1v6FOp1K.js → url-BXei0vv_.js} +1 -1
- package/dist/assets/{url-Hqju5Y0N.js → url-llYM4lhi.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-CN5JVNal.js +1 -0
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-3GfaqAPj.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CgHJ-iCU.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-CCCFXoUc.js → useChargeCardPusherEvents-JxJnisR-.js} +1 -1
- package/dist/assets/{useDeviceId-CLaYnGNC.js → useDeviceId-Cf3xan56.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-C_lu7Qr7.js → useEmailConnectResultRefresh-Dv9IT8_0.js} +1 -1
- package/dist/assets/useEnsureVendorListLoaded-YOFp3iHN.js +1 -0
- package/dist/assets/{useInitialThreadRequest-J-yGGXi5.js → useInitialThreadRequest-DA5FMzag.js} +1 -1
- package/dist/assets/useTaskManagerAccess-CpacCRSq.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-C9HPPvD2.js → useTaskManagerPusherEvents-CcIRdnMY.js} +1 -1
- package/dist/assets/{utils-vB0Nm3XK.js → utils-CNqTTzSx.js} +1 -1
- package/dist/assets/withTransactionSidePanel-BOIdrs8l.js +25 -0
- package/dist/assets/{zeni-epic-state-DU8p9Pr6.js → zeni-epic-state-OTisIlmp.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AccountMappingScreen-CsvIh3pU.js +0 -9
- package/dist/assets/ActualMatchingMatchDetailScreen-BeyJfzoq.js +0 -1
- package/dist/assets/AddressRoutes-DlDhfbdO.js +0 -1
- package/dist/assets/AddressScreen-xlCgJTb4.js +0 -9
- package/dist/assets/AiCfoScreen-jcAGVejP.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-CWaHbHoJ.js +0 -1
- package/dist/assets/BusinessVerificationPageScreen-B2MzrRz9.js +0 -9
- package/dist/assets/ConnectionAuthScreen-H57FpfA5.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Bga-XNUf.js +0 -1
- package/dist/assets/DashboardRoutes-BdEdFLmK.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-DtE2OBa7.js +0 -18
- package/dist/assets/DrawerScreen-g7gMvOCC.js +0 -1
- package/dist/assets/EntityDetailRoutes-CuFBFS-c.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-XTTRYQTO.js +0 -38
- package/dist/assets/FeaturePreviewScreen-ocxt03Zk.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-BtBx3Urb.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-C6hfbFq3.js +0 -12
- package/dist/assets/MobileAppDrawer-D9_9MdJz.js +0 -1
- package/dist/assets/NotFoundScreen-C9HgOUVr.js +0 -1
- package/dist/assets/NotificationRoutes-DJGhb-22.js +0 -1
- package/dist/assets/OAuthConsentScreen-B3Frt3xZ.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BVhl9s7m.js +0 -1
- package/dist/assets/PeopleRoutes-DcnEXgK1.js +0 -22
- package/dist/assets/PerformanceRoutes-CPPduOhh.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-C4rWwmOK.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-C5VRjOUn.js +0 -1
- package/dist/assets/ReimbursementRoutes-xmP1sf5g.js +0 -68
- package/dist/assets/RewardsRoutes-B0ffV2tU.js +0 -1
- package/dist/assets/ScreenRoutes-BXmr-cb0.js +0 -2
- package/dist/assets/SignInScreen-iAhBMOUT.js +0 -1
- package/dist/assets/SignOutScreen-MC6Mvo1b.js +0 -9
- package/dist/assets/TransactionDetailRoutes-D82kBzWU.js +0 -1
- package/dist/assets/TransactionDetailScreen-DEfBPk22.js +0 -5
- package/dist/assets/WiseConfirmationScreen-BLzh4txk.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CYxLDv4m.js +0 -9
- package/dist/assets/epic-BWvBjvXV.js +0 -2
- package/dist/assets/routePaths-P47RCoW6.js +0 -1
- package/dist/assets/useActualMatchingMatchDetail-CR2SRNcX.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CQ8NCzd2.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BOks8lHg.js +0 -1
- package/dist/assets/useTaskManagerAccess-Ces4QXd0.js +0 -1
- package/dist/assets/withTransactionSidePanel-BGYKHHLT.js +0 -25
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-BlNqAXG4.js";import{u as Se,h as _e,g as fe,j as B,i as Te,t as qn,l as io,n as lo,o as Ge,N as ro}from"./core-Dx-yNdOO.js";import{fI as ye,a1G as Jn,q4 as De,UO as xt,Aq as uo,a1H as mo,a1I as po,a1J as ho,a1K as yt,a1L as it,gk as Rt,a1M as In,eH as So,g3 as fo,a1N as Cn,a1O as lt,qX as go,uY as Io,gW as Co,gU as ko,a1P as bo,r8 as To,rh as yo,qf as Po,qt as Yn,gT as re,gV as vo,a1Q as Eo,qP as Wn,ri as Ao,qq as xo,ql as Ro,v2 as wo,gS as Fe,a1R as ut,CA as Hn,N4 as Xn,a1S as Kn,F$ as Qn,a1T as Do,e$ as Fo,f1 as _o,sZ as wt,Xy as kn,XA as Mo,m6 as Bo,XB as Oo,md as Uo,dm as Vo,DT as Dt,a1U as jo,a1V as $o,a1W as zo,a1X as Lo,fp as Ft,sN as bn,Xr as Go,a1Y as No,a1Z as qo,mf as Jo,a1_ as Yo,RP as Wo,me as Ho,m3 as Xo,qI as Zn,rn as mt,tA as ea,tW as Ko,UE as ta,rm as Tn,rp as na,rr as Qo,bF as Zo,nC as es,nz as ts,rq as rt,ro as be,a1$ as ns,rI as yn,a20 as as,a21 as os,sR as ss,sS as cs,Xn as is,Wt as ls,a18 as rs,a22 as ds,Xt as Pn,Xs as ct,a23 as vn,mu as us,a24 as ms,a25 as ps,a26 as hs,a27 as Ss,qD as fs,a28 as gs,a29 as Is,a2a as Cs,ry as ks,mh as bs,m8 as Ts,a2b as ys,mg as En,XL as Ps,a2c as vs,a2d as Es,uz as As,ua as xs,u9 as Pt,a2e as Rs,a2f as ws,a2g as Ds,a2h as Fs,nN as _s,br as aa,nI as An,nu as Ms,a2i as Bs,h3 as Os,nF as Us,s$ as Vs,t1 as js,sK as $s,Ww as zs,Wx as Ls,Ft as Gs,Fs as Ns,FJ as qs,a2j as xn,sQ as Js,sl as Ys,a2k as Ws,s1 as Hs,s6 as Xs,sh as Ks,s4 as Qs,a2l as Zs,rZ as ec,sg as tc,sW as nc,a2m as ac,t7 as oc,sE as sc,td as cc,sJ as ic,rJ as lc,a2n as rc,q$ as dc,qz as uc,qG as Rn,rt as mc,a2o as pc,a2p as hc,a2q as Sc,a2r as fc,a2s as gc,a2t as Ic,a2u as Cc,th as kc,a2v as bc,a2w as Tc,a2x as wn,uK as yc,u1 as Pc,tS as Dn,tQ as vc,a2y as Ec,tF as Ac,tk as xc,tT as Rc,a2z as wc,a2A as Dc,tq as Fc,a2B as _c,tl as Mc,tp as Bc,tn as Oc,tZ as Uc,a2C as Vc,q8 as Fn,a2D as jc,E3 as _n,cz as $c}from"./zeni-epic-state-DU8p9Pr6.js";import Ot from"./NotFoundScreen-C9HgOUVr.js";import{a as o,R as oa}from"./sentry-oO1cMYln.js";import{n as Me,S as zc}from"./mui-DicWBIpH.js";import{q as qe,$ as K,h as ee,p as Z,ao as sa,aq as ca,dM as Lc,dN as Gc,z as Je,dO as _t,dP as Nc,dQ as qc,ac as Ne,dR as Jc,dS as Mn,b8 as Bn,dT as Yc,a5 as ia,dU as Wc,g as dt,a as Hc,dV as Xc,dW as Kc,k as Qc,V as Zc,dX as ei,dY as ti,dZ as ni,b2 as ai,bq as oi,a9 as si,b3 as ci,b4 as ii,G as la,w as li,d_ as ri,at as Mt,d$ as di,a2 as ui,e0 as mi}from"./index-BN_JNPW3.js";import{u as Ut}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{g as On,b as pi,c as hi,h as Si,a as fi,i as gi,r as Ii,C as Ci}from"./TransactionDetailScreen-DEfBPk22.js";import{u as ki,a as bi}from"./useActualMatchingMatchDetail-CR2SRNcX.js";import{d as Ti}from"./decodeURIComponentSafe-gD0LryXw.js";import{m as Vt,a as ra,b as da,i as Bt}from"./expenseAutomationHelper--OaaBO01.js";import{u as ua,a as ma,w as yi}from"./withTransactionSidePanel-BGYKHHLT.js";import{b as Pi,S as vi,a as Ei,J as Ai}from"./ScheduleDetailsPrepaidExpensesScreen-edh3y6eB.js";import{s as Un,i as pa,h as xi,v as Ri,c as wi}from"./routePaths-P47RCoW6.js";import{a as vt}from"./accountMappingHelper-DLreHlS2.js";import{D as Di}from"./DrawerScreen-g7gMvOCC.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./useInitialThreadRequest-J-yGGXi5.js";import"./stripSplatSuffix-DUyz4jOZ.js";import"./pathToGoBack-BzzMe8-p.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="2c06e6a3-7867-4b8e-867f-b43012d8dc06",t._sentryDebugIdIdentifier="sentry-dbid-2c06e6a3-7867-4b8e-867f-b43012d8dc06")}catch{}})();const Fi=()=>{const t=Se(),a=_e(),S=fe(),I=B((u=>ye(u))),{useFeatureGate:d}=qe(),{isFeatureEnabled:i}=d(K.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:l}=d(K.aiAuditScorePercentage),x=B((u=>u.expenseAutomationViewState.selectedPeriodByTenantId)),r=B((u=>Jn(u,I.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:R}=Ut({mobileExploreReferrer:"Month-End Close Overview"}),C=o.useCallback(((u,y,p=!1)=>{t(De({tenantId:y,period:{month:u.month,year:u.year},refreshViewInBackground:p}))}),[]),h=o.useCallback((u=>{const y=S.state?.referrer;r.monthEndCloseChecks?.auditSummary!=null&&ee.trackMonthCloseAuditPage(u.month,u.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,y??null),t(xt(I.tenantId,u))}),[I.tenantId,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),g=x[I.tenantId],D=o.useCallback((()=>{const u=S.state?.referrer;r.monthEndCloseChecks?.auditSummary!=null&&ee.trackMonthCloseAuditPage(g.month,g.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,u??null),C(g,I.tenantId,!0)}),[C,g,I.tenantId,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),U=Z(S.state?.pathnameStackToGoBack,S.pathname),V=o.useCallback((()=>{if(r.monthEndCloseChecks!=null&&g!=null){const u=r.monthEndCloseChecks.monthEndCloseCheckList.find((y=>y.progress<100));if(u!=null)return void a(`./${u.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:U,message:"comingFromOverview"}});a(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:U,message:"comingFromOverview"}})}}),[r.monthEndCloseChecks,g]),{areTenantIdsInSync:b}=sa();return ca({isDataReady:r.fetchState==="Completed"}),o.useEffect((()=>{g!=null&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&b&&C(g,I.tenantId)}),[C,g,r.fetchState,I.tenantId,b]),o.useEffect((()=>{g!=null&&r.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&r.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&b&&t(uo(g))}),[g,r.monthClosePerformanceTrendFetchStatus.fetchState,b]),o.useEffect((()=>{const u=setInterval((()=>{r.fetchState!=="In-Progress"&&r.fetchState==="Completed"&&D()}),3e5);return()=>clearInterval(u)}),[r.fetchState]),o.useEffect((()=>{if(r.fetchState==="Completed"&&r.monthEndCloseChecks?.auditSummary!=null){const u=S.state?.referrer;ee.trackMonthCloseAuditPage(r.selectedPeriod.month,r.selectedPeriod.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,u??null)}}),[r.fetchState,r.selectedPeriod,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),T.jsx(_i,{children:T.jsx(Lc,{monthEndCloseChecksView:r,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:u=>{a(`./${u}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:U,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:h,handleReviewButtonClick:V,onBackClick:()=>{a("../../dashboard")},onReload:D,isAiCfoAccessEnabled:v,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:l})})},_i=Me.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
|
-
`;function Mi({isFullView:t,matchId:a,onClose:S}){const{match:I,detailFetchState:d,handleOpenBill:i,handleApproveAndReverse:l,handleIgnoreMatchSuggestion:x,handleRefresh:r,handleUndoReversal:v,lastMatchResults:R,lastUndoResults:C,refreshStatus:h,ignoreStatus:g,matchAndReverseStatus:D,undoReversalStatus:U}=ki(a);return T.jsx(Gc,{match:I,detailFetchState:d.fetchState,isRenderedInPanel:!t,isApproveInFlight:D.fetchState==="In-Progress",isIgnoreInFlight:g.fetchState==="In-Progress",isUndoInFlight:U.fetchState==="In-Progress",refreshStatus:h.fetchState,onNavigateBack:S,onOpenBill:i,onApproveAndReverse:l,onIgnoreMatchSuggestion:x,onRefresh:r,onUndoReversal:v,lastMatchResults:R,lastUndoResults:C})}const Bi=/^match\/([^/?]+)$/,Oi=ma({displayNamePrefix:"withActualMatchingSidePanel",usePanelSetup:function(t){const{useFeatureGate:a}=qe(),{isFeatureEnabled:S}=a(K.isTransactionDetailSplitViewEnabled),{isFeatureEnabled:I}=a(K.isAccrualEnabled),d=(function(l=!0){const x=_e(),r=fe(),v=Te(),R=Vt(v),C=ua({childPathPattern:Bi,enabled:l,listPath:R}),h=C.matchGroups[0]!=null&&C.matchGroups[0]!==""?Ti(C.matchGroups[0]):void 0,g=v.tenantEmailDomain??r.pathname.split("/").find(Boolean)??"",D=o.useRef({isOpen:C.isOpen,matchId:h});D.current={isOpen:C.isOpen,matchId:h};const U=o.useCallback((u=>{!C.isMobile&&l?D.current.isOpen&&D.current.matchId===u?C.closePanel():C.navigateToChild(`match/${encodeURIComponent(u)}`,{replace:D.current.isOpen}):x(`/${g}/expense-automation/actual-matching/${encodeURIComponent(u)}`)}),[x,C.isMobile,C.navigateToChild,C.closePanel,l,g]),V=o.useCallback((()=>{if(h==null)return;const u=Z(r.state?.pathnameStackToGoBack,`${r.pathname}${r.search}`);x(`/${g}/expense-automation/actual-matching/${encodeURIComponent(h)}`,{state:{pathnameStackToGoBack:u}})}),[r.pathname,r.search,r.state,h,x,g]),b=C.isOpen&&h!=null;return{closePanel:C.closePanel,isOpen:b,maximize:V,matchId:l&&b?h:void 0,openPanel:U}})(t&&I===!0&&S===!0),i=o.useMemo((()=>{if(d.isOpen&&d.matchId!=null)return T.jsx(Mi,{isFullView:!1,matchId:d.matchId,onClose:d.closePanel},d.matchId)}),[d.closePanel,d.isOpen,d.matchId]);return{injectedProps:o.useMemo((()=>({closeMatchSidePanel:d.closePanel,isMatchPanelOpen:d.isOpen,matchPanelContent:i,matchPanelMatchId:d.matchId,openMatchPanel:d.openPanel})),[i,d.closePanel,d.isOpen,d.matchId,d.openPanel]),selectedItemId:d.matchId,sidePanel:{closePanel:d.closePanel,maximize:d.maximize}}}}),Ui=oa.memo((({reconciliation:t,selectedDrawerAccountId:a,onClose:S,onFetchLinkTokenClick:I,onEstablishConnectionClick:d})=>{const i=Se(),l=_e(),x=fe(),{tenantEmailDomain:r,selectedTab:v,selectedPeriod:R}=Te(),{useFeatureGate:C}=qe(),{isFeatureEnabled:h}=C(K.isReconV3Enabled),{isFeatureEnabled:g}=C(K.isReconciliationCombinedStatementEnabled),{isFeatureEnabled:D}=C(K.isReconReportEnabled),U=Je.getSignedInUser(),V=B((w=>ye(w))),b=o.useMemo((()=>({userId:U?.userId??"",sessionId:U?.zeniSessionId??"",tenantId:V?.tenantId??""})),[U?.userId,U?.zeniSessionId,V?.tenantId]),{accountReconciliationsByAccountID:u,excludedAccountIDs:y,monthYearPeriod:p,statementUploadChosen:E}=t,_=u[a],j=o.useMemo((()=>mo(u,a)),[u,a]),f=o.useMemo((()=>po(u)),[u]),O=o.useMemo((()=>ho(u,a)),[u,a]),e=o.useRef(!1),n=o.useCallback((w=>{e.current=w,Mn(a,w)}),[a]),c=o.useCallback((w=>{i(yt({accountId:a,selectedPeriod:p,dismissedToBackground:!0,backgroundCompletedSteps:w.completedSteps,startedAtMs:w.startedAtMs,totalDurationSeconds:w.totalDurationSeconds})),w.accountMappings!=null&&i(it({accountId:a,selectedPeriod:p,localData:{combinedStatementAccountMappings:w.accountMappings}})),_!=null&&requestAnimationFrame((()=>{e.current||i(Rt({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:_t(_)}]}))}))}),[i,p,_,a]),m=o.useCallback((()=>{i(yt({accountId:a,selectedPeriod:p,dismissedToBackground:!1}))}),[i,a,p]),k=o.useCallback((w=>{i(In({accountId:a,selectedPeriod:p,backgroundCompletedSteps:w}))}),[i,p,a]),P=o.useCallback((()=>{i(In({accountId:a,selectedPeriod:p,backgroundCompletedSteps:0})),i(yt({accountId:a,selectedPeriod:p,dismissedToBackground:!1}))}),[i,p,a]);o.useEffect((()=>()=>{Mn(null,!1)}),[]);const F=_?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??_?.accountReconEntity.statementMetaData?.statementUploadId,z=_?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,H=B((w=>z!=null&&z!==""?So(fo(w.userState,z)):"")),X=o.useCallback((()=>{i(Cn({accountId:a,selectedPeriod:p}))}),[i,a,p]),oe=o.useCallback((()=>{i(Cn({accountId:a,selectedPeriod:p})),i(lt({statementUploadChosen:!0}))}),[i,a,p]),te=(w,Q)=>{i(wo(w,Q.split(".")[0]))},ue=(w,Q)=>{if(Q===!0){const ae=_?.combinedStatementGroupId??_?.parsedStatementData?.statementUpload?.statementMeta?.combinedStatementGroupId??_?.parsedStatementData?.statementUpload?.combinedStatementDetails?.combinedStatementGroupId;if(ae!=null&&ae!=="")return void i(xo({accountId:a,selectedPeriod:p,combinedStatementGroupId:ae,fileId:w}))}F!=null&&i(Ro({accountId:a,selectedPeriod:p,fileId:w,statementUploadId:F}))},A=()=>{i(lt({statementUploadChosen:!1}))},$=w=>{i(Ao({accountId:a,selectedPeriod:p,payload:w,statementAccountScope:g===!0?_?.localData?.statementAccountScope??"single_account":"single_account"}))},L=o.useCallback(((w,Q,ae)=>{i(go({accountId:w,selectedPeriod:Q,statementUploadId:ae}))}),[i]),ge=o.useCallback(((w,Q,ae,ve,Ee)=>{Ee!=null&&Ee!==""&&i(Io(Ee)),i(ve==null||ve===""?ko({accountId:w,selectedPeriod:Q,statementUploadId:ae}):Co({accountId:w,selectedPeriod:Q,statementUploadId:ae,combinedStatementGroupId:ve}))}),[i]),Ye=o.useCallback(((w,Q)=>{Q!==""&&i(bo({accountId:a,selectedPeriod:p,statementUpdateLocalData:w,statementUploadId:Q}))}),[i,a,p]),q=o.useCallback((()=>{F!=null&&i(_?.localData?.statementAccountScope!=="multi_account"?yo({accountId:a,selectedPeriod:p,statementUploadId:F}):To({accountId:a,selectedPeriod:p,statementUploadId:F}))}),[i,_?.localData?.statementAccountScope,a,p,F]),pt=o.useCallback((w=>{F!=null&&i(Po({accountId:a,selectedPeriod:p,statementUploadId:F,accountMappings:w}))}),[i,p,a,F]),Be=o.useCallback((()=>{i(lt({statementUploadChosen:!0}))}),[i]),We=w=>{i(it({accountId:a,selectedPeriod:p,localData:{accountSource:w}}))},Pe=w=>{i(it({accountId:a,selectedPeriod:p,localData:{statementAccountScope:w}}))},He=o.useCallback((()=>{i(Yn({accountId:a}))}),[i,a]),Xe=o.useCallback((w=>{i(re(p,w,!0)),S()}),[i,p,S]),se=o.useCallback((w=>{if(r==null||v==null||R==null)return;const Q=Z(x.state?.pathnameStackToGoBack,x.pathname);S();const ae=ra({tenantEmailDomain:r,selectedTab:v,accountId:w,period:R});ae!=null&&l(ae,{state:{pathnameStackToGoBack:Q}})}),[x.pathname,x.state,l,S,R,v,r]),me=o.useCallback((()=>{i(vo({accountId:a,selectedPeriod:p,statementProcessingFailed:!1})),i(Eo({accountId:a,selectedPeriod:p}))}),[i,a,p]),ce=o.useCallback((()=>{i(Wn({accountId:a}))}),[i,a]),Oe=y.includes(a)?t.excludedAccountReconciliationByAccountID[a]:void 0;if(Oe!=null)return T.jsx(Vn,{children:T.jsx(jn,{$isV3:h===!0,children:T.jsx(Nc,{excludedAccountReconciliation:Oe,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:h,onDismissClick:S,onIncludeIntoReconciliation:ce})})});if(_!=null){const w=h===!0?T.jsx(qc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:_,monthYearPeriod:p,onDismissClick:S,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:d,onEditFileName:te,onDeleteFile:ue,onSelectSourceType:We,onSelectStatementAccountScope:Pe,isReconciliationCombinedStatementEnabled:g===!0,ledgerAccounts:j,statementOverrideWarningAccountIds:O,unavailableLedgerAccountIds:f,onConfirmStatementMapping:pt,filesEndPoint:Ne.fileMicroServiceBaseUrl,authParams:b,openFilePicker:E,onStatementUploadSuccess:$,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:He,onRetryParsing:L,onFetchStatementParseInfo:ge,onReviewClicked:Xe,onViewReportClicked:D===!0?se:void 0,statementProcessingFailed:_.statementProcessingFailed,statementProcessingDismissedToBackground:_.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:me,onContinueInBackground:c,onClearStatementProcessingDismissedToBackground:m,onResetStatementProcessingProgress:P,onStatementProcessingProgressChange:k,onStatementFlowVisibilityChange:n,onReuploadStatement:Be,onStatementFormDataChange:Ye,onStatementConfirmSave:q,reconciledByName:H,onDismissDateConflict:X,onReuploadAfterDateConflict:oe,isReconV3Enabled:h}):T.jsx(Jc,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:_,monthYearPeriod:p,onDismissClick:S,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:I,onEstablishConnectionClick:d,onEditFileName:te,onDeleteFile:ue,onSelectSourceType:We,filesEndPoint:Ne.fileMicroServiceBaseUrl,authParams:b,openFilePicker:E,onStatementUploadSuccess:$,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:He});return T.jsx(Vn,{children:T.jsx(jn,{$isV3:h===!0,children:w})})}return null})),Vn=Me.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,jn=Me.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: ${t=>t.$isV3===!0?"hidden":"auto"};
|
|
21
|
-
`;function Vi({panelType:t,scheduleId:a,onClose:S,onCloseAfterDecision:I}){return T.jsx($i,{children:T.jsx(zi,{children:ji(t,a,S,I)})})}function ji(t,a,S,I){switch(t){case"one_time_accrual":return T.jsx(Ai,{isRenderedInPanel:!0,accrualIdOverride:a,onPanelNavigateBack:S});case"accrued_expenses":return T.jsx(Ei,{isRenderedInPanel:!0,scheduleDetailIdOverride:a,onPanelNavigateBack:S,onPanelCloseAfterDecision:I});case"fixed_assets":return T.jsx(vi,{isRenderedInPanel:!0,scheduleDetailIdOverride:a,onPanelNavigateBack:S,onPanelCloseAfterDecision:I});case"prepaid_expenses":return T.jsx(Pi,{isRenderedInPanel:!0,scheduleDetailIdOverride:a,scheduleTypeOverride:"prepaid_expenses",onPanelNavigateBack:S,onPanelCloseAfterDecision:I})}}const $i=Me.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
height: 100%;
|
|
25
|
-
`,zi=Me.div`
|
|
26
|
-
flex: 1;
|
|
27
|
-
min-height: 0;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
overflow-x: hidden;
|
|
33
|
-
overflow-y: auto;
|
|
34
|
-
`,Li=/^schedule\/(prepaid_expenses|fixed_assets|accrued_expenses|one_time_accrual)\/([^/?]+)$/,Gi=ma({displayNamePrefix:"withScheduleSidePanel",usePanelSetup:function(t){const a=(function(h=!0){const g=_e(),D=fe(),U=Se(),V=Te(),b=ua({childPathPattern:Li,enabled:h}),u=b.matchGroups[0],y=pa(u)?u:void 0,p=b.matchGroups[1]!=null&&b.matchGroups[1]!==""?b.matchGroups[1]:void 0,E=b.isOpen&&y!=null&&p!=null,_=V.tenantEmailDomain??D.pathname.split("/").find(Boolean)??"",j=o.useRef({isOpen:E,scheduleId:p});j.current={isOpen:E,scheduleId:p};const f=o.useCallback(((e,n,c)=>{c!=null&&(n==="prepaid_expenses"||n==="fixed_assets")&&U(Qn({selectedJEScheduleKey:c})),!b.isMobile&&h?j.current.isOpen&&j.current.scheduleId===e?b.closePanel():b.navigateToChild(`schedule/${n}/${e}`,{replace:j.current.isOpen}):g(Un(n,e,_),{state:{message:"expenseAutomation",origin:"je_schedules"}})}),[U,g,b.isMobile,b.navigateToChild,b.closePanel,h,_]),O=o.useCallback((()=>{if(y==null||p==null)return;const e=Z(D.state?.pathnameStackToGoBack,D.pathname);g(Un(y,p,_),{state:{pathnameStackToGoBack:e,message:"expenseAutomation",origin:"je_schedules"}})}),[g,y,p,_,D.pathname,D.state]);return{closePanel:b.closePanel,isOpen:E,maximize:O,openPanel:f,panelType:E?y:void 0,scheduleId:E?p:void 0}})(t),S=o.useRef(null),[I,d]=o.useState(null),i=o.useMemo((()=>({registerPanelDirtyGuard:h=>{S.current=h}})),[]),l=o.useCallback((h=>{S.current?.isDirty()===!0?d((()=>h)):h()}),[]),x=o.useCallback((()=>{l(a.closePanel)}),[l,a.closePanel]),r=o.useCallback((()=>{l(a.maximize)}),[l,a.maximize]),v=o.useCallback(((h,g,D)=>{l((()=>a.openPanel(h,g,D)))}),[l,a.openPanel]),R=o.useMemo((()=>{if(I!=null)return{onCancel:()=>d(null),onDiscard:()=>{S.current=null,d(null),I()}}}),[I]),C=o.useMemo((()=>{if(a.isOpen&&a.panelType!=null&&a.scheduleId!=null)return T.jsx(Yc.Provider,{value:i,children:T.jsx(Vi,{panelType:a.panelType,scheduleId:a.scheduleId,onClose:x,onCloseAfterDecision:()=>{S.current=null,a.closePanel()}},`${a.panelType}:${a.scheduleId}`)})}),[a.isOpen,a.panelType,a.scheduleId,a.closePanel,x,i]);return{injectedProps:o.useMemo((()=>({closeSchedulePanel:x,isSchedulePanelOpen:a.isOpen,openSchedulePanel:v,schedulePanelContent:C,schedulePendingDiscardConfirmation:R})),[x,v,C,R,a.isOpen]),selectedItemId:a.scheduleId,sidePanel:{closePanel:x,maximize:r}}}});function Ni({companyId:t,closeCustomerRequestDrawer:a,addCustomerRequest:S,resetCustomerRequest:I}){const d=Je.getSignedInUser();if(d==null)throw Error("Can't access Customer Request page without signing in...");const i=B((l=>Do(l,t,d)));return o.useEffect((()=>{I()}),[]),T.jsx(T.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?T.jsx(ia,{fetchState:"In-Progress"}):T.jsx(Wc,{onCloseClick:a,addCustomerRequest:S,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const qi={schedules:"Review Schedules",actual_matching:"Actual Matching",existing_schedules:"Existing Schedules"},Ji=()=>{const t=B((R=>Fe(R))),a=fe(),{currentSelectedViewFetchState:S,currentSelectedView:I,selectedPeriod:d}=t,i=dt(I),l=dt(S.fetchState),x=t.jeSchedules.uiState.selectedPageTab??"schedules",r=dt(x),v=o.useCallback((R=>{const C=a.state?.referrer;I==="transaction_categorization"&&(t.selectedTransactionCategorizationTab==="review"?ee.trackTransactionsReviewPage(d.month,d.year,t.transactionView.totalCountByTab.review,0,R,C??null):ee.trackTransactionsAutoCategorisedPage(d.month,d.year,t.transactionView.totalCountByTab.autoCategorized,0,R,C??null)),I==="missing_receipts"&&ee.trackMissingReceiptsPage(d.month,d.year,R,t.missingReceipts.transactions.length,C??null),I==="je_schedules"&&ee.trackMonthCloseScheduleListPage(d.month,d.year,R,t.jeSchedules.pendingReviewSchedules.length,t.jeSchedules.failedPostings.length,(h=>{const g={accruedCount:0,fixedAssetsCount:0,oneTimeAccrualCount:0,prepaidCount:0};return h.forEach((D=>{if(Fo(D))g.oneTimeAccrualCount+=1;else switch(_o(D)){case"prepaid_expenses":g.prepaidCount+=1;break;case"fixed_assets":g.fixedAssetsCount+=1;break;case"accrued_expenses":g.accruedCount+=1}})),g})(t.jeSchedules.pendingReviewSchedules),qi[x],C??null),I==="flux_analysis"&&ee.trackFluxAnalysisPage(d.month,d.year,R,Yi(t.fluxAnalysis),C??null),I==="month_end_insights"&&t.auditSummary?.auditScorePercentage!=null&&ee.trackInsightsEmailPage(d.month,d.year,R,"draft",t.auditSummary.auditScorePercentage,null,C??null)}),[d,t,x]);return o.useEffect((()=>{(l!==S.fetchState||I!==i||I==="je_schedules"&&r!=null&&x!==r)&&S.fetchState==="Completed"&&v(!1)}),[I,S.fetchState,i,x,r]),v},Yi=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Wi,comma:$n,space:Hi}},dateFormat:ha}=la.getLocalizedStrings(),zn=Uc,Xi=io((function(t,a){const{uncategorizedAccounts:S,vendorSearchAutoCompleteData:I,monthEndInsightsCustomerRequestData:d,monthEndInsightsPreviewMode:i,companyId:l,isMissingReceiptsBulkUploadEnabled:x,isTransactionActivityEnabled:r,newScheduleActiveType:v}=a,R=Je.getSignedInUser(),C=t.tenantState.currentTenantId,h={userId:R?.userId??"",sessionId:R?.zeniSessionId??"",tenantId:C??""},g=Fe(t),{selectedTransactionCategorizationTab:D}=g,{searchTransactionsResults:U,searchTransactionsFetchState:V}=as(t),b=v==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:y,allDepreciationAccountListNestedAccountHierarchy:p,newScheduleLocalData:E,saveStatus:_}=os(t,b);return{expenseAutomationViewSelector:g,accountListNestedAccountHierarchy:u,allDepreciationAccountListNestedAccountHierarchy:p,baseTransactionSearchFetchState:V,baseTransactionSearchResults:U,classListNestedAccountHierarchy:y,newScheduleLocalData:E,initialSelectedBaseTransaction:E.selectedBaseTransactionId!=null?ss(t.transactionState,cs(E.selectedBaseTransactionId)):void 0,newAccrualAccountsView:is(t),newScheduleSaveStatus:_,bulkUploadSelector:x===!0?g.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:I,authParams:h,receiptUploadEndpoint:`${Ne.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Mt}/transaction_attachments`,bulkUploadEndpoint:x===!0?`${Ne.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:D,selectedTransactionGroup:g.transactionView.selectedTransactionGroup,monthEndInsightsCustomerRequestData:d,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:R,uncategorizedAccounts:S,companyId:l,isTransactionActivityEnabled:r,receiptsEmail:rs(t.tenantState,C),downloadParams:{authParams:h,jeScheduleEndPoint:`${Mt}/jeScheduleReports`,timezone:ls(),companyName:ye(t).companyName}}}),(function(t,a){const{themeState:S,isAccountingClassesEnabled:I,isCOTEnabled:d,isMissingReceiptsBulkUploadEnabled:i,location:l,vendorSearchAutoCompleteData:x,expenseAutomationViewSelector:r,currentTenant:v,newScheduleActiveType:R,uncategorizedAccounts:C,navigate:h,onClickCustomerRequest:g,handleEditClick:D,closeSchedulePanel:U,isSchedulePanelOpen:V,openSchedulePanel:b,setActivityLogTransactionId:u}=a,{selectedPeriod:y,currentSelectedView:p,reconciliation:{selectedAccountId:E}}=r,{accountSettingsView:_}=r.jeSchedules,j=Zn(y),f=mt(j.start),O=mt(j.end);return{onZeniLogoClick:()=>{S.toggle()},onUploadReceiptAttachment:e=>{ee.trackMissingReceiptAttached(y.month,y.year),t(Pc(e))},onUploadTransactionReceipt:(e,n,c,m,k,P)=>{t(wn(e,n,{fetchState:"In-Progress"}));const F=()=>t(wn(e,n,{fetchState:"Error"}));di(`${Ne.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,P,n,c,m,k).then((z=>{z!=null?t(yc(e,z)):F()})).catch(F)},onMissingReceiptsRowClick:(e,n)=>{if(a.openTransactionPanel)return void a.openTransactionPanel(e,n);const c=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Tc(e,n)),v!=null&&t(De({tenantId:v.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,m)=>{t(bc(e,{fetchState:n,error:c})),c!=null&&t(Rt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:m!=null?Hi+Wi+m+$n:$n}]}))},onUpdateJESchedulesUIState:e=>{const n=r.jeSchedules.uiState,c=e.selectedPageTab!=null&&e.selectedPageTab!==n.selectedPageTab,m=e.selectedJETypeFilter!==void 0&&e.selectedJETypeFilter!==n.selectedJETypeFilter;c&&a.closeMatchSidePanel?.(),V===!0&&(c||m)&&U?.(),e.createdGroupCollapsed!=null?t(fc()):e.pendingGroupCollapsed!=null?t(gc()):e.failedGroupCollapsed!=null?t(Ic()):e.selectedJETypeFilter!==void 0?t(Cc(e.selectedJETypeFilter)):t(kc(e))},onUpdateMissingReceiptsUIState:e=>{t(Sc(e))},onFetchMissingReceiptsList:()=>{O!=null&&f!=null&&t(na({start:f,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...i===!0?{onBulkUploadFiles:e=>{t(Oc(e))},onBulkUploadProgress:e=>{t(Bc(e))},onBulkUploadSuccess:e=>{t(Mc({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(_c(e))},onConfirmBulkUploadMatch:(e,n,c,m,k)=>{t(Fc(e,n,c,m,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Dc())},onSetBulkUploadResultsTab:e=>{t(wc(e))},onSetBulkUploadCompletedSubTab:e=>{t(Rc(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Dn({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(xc())},onSearchTransactionsForManualMatch:(e,n)=>{t(zn(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=r.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(zn(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ac(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Ec())},onFetchBulkUploadBatches:e=>{t(ea(e))},onFetchMoreBatchDetails:()=>{t(vc())},onResetBulkUploadSort:()=>{t(Dn({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(hc())},onSearchTextChanged:e=>{const n=r.currentSelectedView,c=r.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Pt({selectedTab:c,uiState:{searchString:e}})),O!=null&&f!=null&&t(be(c,{start:f,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=r.selectedTransactionCategorizationTab;t(pc({filters:e,selectedTab:n}))},onRefresh:()=>{a.trackExpenseAutomationTabAnalytics(!0),t(mc())},onClose:()=>{p==="reconciliation"&&E!=null&&t(Rn({selectedAccountId:void 0})),h("../")},onBack:()=>{p==="reconciliation"&&E!=null&&t(Rn({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(uc(e))},onSaveReconciliationReview:e=>{t(dc(e))},onUpdateStep:e=>{const{selectedPeriod:n}=r,c=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:r.currentSelectedView}}),t(ta(e))},handleLogOutClick:()=>{const e=Z(l.state?.pathnameStackToGoBack,l.pathname);h("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:m,accruedExpensesAccount:k}=n,P=vt(_.prepaidExpensesAccountList,c.selectedOptions),F=vt(_.fixedAssetsAccountList,m.selectedOptions),z=vt(_.accruedExpensesAccountList,k.selectedOptions),H={selectedPrepaidExpensesAccountIds:P.map((X=>X.accountId)),selectedFixedAssetsAccountIds:F.map((X=>X.accountId)),selectedAccruedExpensesAccountIds:z.map((X=>X.accountId))};t(rc({data:H}))},onSaveJeAccountSettingsClick:()=>{t(lc())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:m,scheduleClass:k,scheduleExpenseCategory:P,vendor:F}=n,{allAccountList:z,allClassList:H,allDepreciationAccountList:X}=r.jeSchedules,oe=x.entityAutoCompleteView.vendor.length>0?x.entityAutoCompleteView.vendor.find((L=>L.id===F?.selectedOption)):void 0,te={id:oe?.zeniId??F?.selectedOption??"",name:oe?.name??F?.defaultOptions.find((L=>L.value===F?.selectedOption))?.label??"",logo:oe?.logo},ue=P?.selectedOption!=null?z.find((L=>L.qboId===P.selectedOption)):void 0,A=k?.selectedOption!=null?H.find((L=>L.classId===k.selectedOption)):void 0,$=m?.selectedOption!=null?X.find((L=>L.qboId===m.selectedOption)):void 0;t(ic({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:ue?.accountId,updatedClassId:A?.classId,updatedAccumulatedDepreciationCategoryID:$?.accountId,updatedVendor:{id:te.id,name:te.name}}}))},onRevertJeSchedule(e,n,c,m,k){t(cc(e,n,c,m,k))},ignoreRecommendedJeSchedule(e,n,c,m){t(sc(e,n,c,m))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Pn({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(ct("common"))},onCancelAutoComplete:()=>{t(ct("common"))}},onPostJESchedule(e,n){t(oc({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ac())},onViewTransaction(e){if(a.tenantEmailDomain==null)return;const n=wi(e,a.tenantEmailDomain),c=Z(a.location.state?.pathnameStackToGoBack,`${a.location.pathname}${a.location.search}`);a.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"je_schedules"}})},onSearchBaseTransaction(e){t(nc({query:e,scheduleType:R==="prepaid_expenses"?"prepaid_expenses":"fixed_assets"}))},onNewScheduleFormChange(e,n){const c=Ft(e)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets";t(xn({scheduleType:c,localData:n}))},onOpenMatchNewModal(){t(tc())},onIgnoreMatchSuggestion(e,n,c){t(ec(e,n,c))},onCloseMatchNewModal(){t(Zs())},onClearMatchNewModal(){t(Qs())},onSearchMatchTransactions(e,n){t(Ks(e,n))},onSearchMatchAccruals(e,n){t(Xs(e,n))},onMatchAndReverse(e){t(Hs(e.transactionId,e.transactionIntegrationId,e.transactionType,e.lineIds,e.transactionSyncToken,e.accrualIds,!0))},onUpdateActualMatchingUIState(e){t(Ws(e))},onUndoReversal(e,n){t(Ys(e,n))},onSaveSchedule(e,n){const c=e==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",{allAccountList:m,allDepreciationAccountList:k}=r.jeSchedules,P=n.selectedAccount!=null?m.find((z=>z.qboId===n.selectedAccount)):void 0,F=n.selectedAccumulatedDepreciationCategory!=null?k.find((z=>z.qboId===n.selectedAccumulatedDepreciationCategory)):void 0;t(xn({scheduleType:c,localData:{...n,selectedAccount:P?.accountId,selectedAccumulatedDepreciationCategory:F?.accountId}})),t(Js({scheduleType:c}))},onCreateAccruedSchedule(e){const n="accrued_expenses";t(zs()),t(Ls()),t(Gs({scheduleType:n,localData:e,selectedJeScheduleDetailId:void 0})),t(Ns({scheduleType:n})),t(qs(n,void 0))},onCreateOneTimeAccrual(e){t($s(e))},handleJeScheduleClick:(e,n,c)=>{if((function(k,P){return P!=="accrued_expenses"})(0,c)&&t(Qn({selectedJEScheduleKey:n})),b!=null&&pa(c))return void b(e,c,n);const m=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:m,message:"expenseAutomation",origin:"je_schedules"}})},onOneTimeAccrualFeedback:(e,n,c,m)=>{t(n!=="revert"?js(e,c,m):Vs(e,c,m))},onOneTimeAccrualClick:e=>{if(b!=null)return void b(e,"one_time_accrual");const n=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../../vendors/schedules/one_time_accrual/details/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"je_schedules"}})},onOpenMatch:e=>{a.openMatchPanel?.(e)},onOpenBill(e){if(a.tenantEmailDomain==null)return;const n=bi(e,a.tenantEmailDomain,a.location);a.navigate(n.pathname,{state:n.state})},improveMonthEndInsightsUsingZeniGPTClick:e=>{v!=null&&t(Us(e,v.companyId,v.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:u,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Os())},onOpenFileAttachmentSnackBar:()=>{t(Rt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Bs(e))},onUpdateFileAttachment:e=>{t(Ms({files:e}))},previewMonthEndReport:(e,n,c,m,k)=>{v!=null&&t(An(e,v.companyId,n,!0,c,m,{agentInsightEdits:k,tenantId:v.tenantId}))},saveMonthEndReport:(e,n,c,m,k)=>{v!=null&&t(An(e,v.companyId,n,!1,c,m,{agentInsightEdits:k,tenantId:v.tenantId}))},onEditMonthEndInsightsClick:D,sendMonthEndReport:e=>{const n=l.state?.referrer,{selectedPeriod:c,auditSummary:m}=r;v!=null&&m?.auditScorePercentage!=null&&(t(_s(v.companyId,e,v.tenantId)),ee.trackInsightsEmailPage(c.month,c.year,!1,"draft",m.auditScorePercentage,aa().format(ha.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{const c=r.transactionView.uiState.searchString??"",m=r.transactionView.transactions,k=m.findIndex((z=>z.id===e)),P=c.length>0?{resultPosition:k>=0?k+1:void 0,resultsCount:m.length,searchTerm:c}:void 0;if(a.openTransactionPanel)return void a.openTransactionPanel(e,n,P);const F=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:F,message:"expenseAutomation",origin:"transaction_categorization",searchContext:P}})},setLocalDataForCategoryAndClass:(e,n,c,m,k,P,F,z,H,X,oe,te)=>{t(Fs(e,n,c,m,C,k,P,F,z,H,X,oe,te))},onCancelAutoComplete:()=>{t(ct("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(vn({scrollPosition:e}))},onUpdateTab:e=>{a.closeSidePanel?.(),O!=null&&f!=null&&(t(be(e,{start:f,end:O},!1,!1)),t(Ds(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{a.closeSidePanel?.(),O!=null&&f!=null&&(t(ws(e)),t(be("autoCategorized",{start:f,end:O},!1,!1)))},onTransactionGroupChange:e=>{a.closeSidePanel?.(),O!=null&&f!=null&&(t(Rs(e)),t(be(a.expenseAutomationViewSelector.selectedTransactionCategorizationTab,{start:f,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Pt({selectedTab:e,uiState:n})),O!=null&&f!=null&&t(be(e,{start:f,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Pt({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,m,k,P)=>{O!=null&&f!=null&&t(be(e,{start:f,end:O},!0,c,n,m,k,P))},resetTransactionCategorizationLocalData:(e,n,c,m,k,P,F)=>{t(xs(e,n,c,m,F??null,k,P,!1)),Ii(t,n.map(String))},updateSelectedVendorForTransaction:(e,n,c,m,k)=>{t(En({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:m,uncategorizedAccounts:C,updatedVendor:k,isAccountingClassesEnabled:I}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const m=l.state?.referrer;e==="autoCategorized"?ee.trackTransactionsAutoCategorisedPage(y.month,y.year,r.transactionView.totalCountByTab.autoCategorized,n.length,!1,m??null):ee.trackTransactionsReviewPage(y.month,y.year,r.transactionView.totalCountByTab.review,n.length,!1,m??null),t(As(e,n,c)),gi(n.map(String))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Es({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,m,k,P)=>{const{transactionId:F,transaction:z,lineIds:H}=n;P!=null&&t(Ps({transactionId:F,customerUpdates:P})),t(vs({selectedTab:m,transactionId:F.id,lineId:H[0],selectedTransaction:z,uncategorizedAccounts:C,updatedCustomer:P,selectedEntity:k,isAccountingClassesEnabled:I})),k!=null&&t(Dt({entity:k,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:m,isFetchCOT:d}))},onFetchRecommendationsForEntityCategorization:(e,n,c,m,k,P)=>{const{transactionId:F,transaction:z,lineIds:H}=n;P!=null&&(t(bs({transactionId:F,vendorUpdates:{name:P.name,id:P.id?P.id:void 0}})),t(Ts({vendorId:P.id?P.id:void 0,localData:{vendorName:P.name,vendorId:P.id?P.id:void 0}}))),P?.id?(t(En({selectedTab:m,transactionId:F.id,lineId:H[0],selectedTransaction:z,uncategorizedAccounts:C,updatedVendor:P,selectedEntity:k,isAccountingClassesEnabled:I})),k!=null&&t(Dt({entity:k,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:m,isFetchCOT:d}))):t(ys({selectedTab:m,transactionId:F.id,lineId:H[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(rt(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(rt(y,!0,!1,null,!1,!1))},markAsReview:(e,n,c,m)=>{ee.trackFluxAnalysisReviewed(c.month,c.year,m??!1,e),t(ks(n,e,c,m??!1))},onUpdateFluxAnalysisUIState:e=>{t(Cs(e))},updateOperatingExpensesIdsForReview:e=>{t(Is({operatingExpenseIds:e,selectedPeriod:y}))},redirectToVendorDetailPage:e=>{if(a.tenantEmailDomain!=null){const n=Ri(e.id,e.qboId,a.tenantEmailDomain),c=Z(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(gs({sectionId:e,selectedPeriod:y}))},onFetchReimbursementView:(e,n,c)=>{t(rt(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(y,e))},onViewReportClicked:e=>{const n=a.tenantEmailDomain,c=p,m=`${y.month}-${y.year}`;if(n==null||c==null)return;const k=Z(l.state?.pathnameStackToGoBack,l.pathname),P=ra({tenantEmailDomain:n,selectedTab:c,accountId:e,period:m});P!=null&&h(P,{state:{pathnameStackToGoBack:k}})},setOpenDrawerClicked:e=>{t(ut({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Hn("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=v?.companyId;c!=null&&(t(Xn(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Kn({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(ut({selectedDrawerAccountId:e})),t(it({accountId:e,selectedPeriod:y,localData:{accountSource:"bank_statement"}})),t(lt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(y,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(fs({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Ss({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(hs({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{a.closeSidePanel?.(),t(ps({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const m=e.vendor?.id;c&&m!=null&&t(us(m)),t(ms({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(a.openTransactionPanel)return void a.openTransactionPanel(e,wt("bill"));const n=Z(l.state?.pathnameStackToGoBack,l.pathname);h(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{h(-1)},onReconListPageScroll:e=>{t(vn({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Pn({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(ct("common"))},onReconNodeCollapseToggled:(e,n)=>{t(ds({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Yn({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Wn({accountId:e}))}}}),((t,a,S)=>{const{isMissingReceiptsBulkUploadEnabled:I,...d}=S;return(function(i,l,x){return{...i,...l,...x,onUploadTransactionReceipt:(r,v,R,C,h)=>{l.onUploadTransactionReceipt(r,v,R,C,h,i.authParams)}}})(t,a,d)}))(li(ri)),Et="newScheduleMode",At="newScheduleType",Ki=Gi(yi((function(t){const a=t.displayName??t.name??"Component",S=oa.memo(t),I=d=>{const i=Se(),l=(function(){const b=Se(),u=B((y=>Fe(y).reconciliation.selectedDrawerAccountId));return{isOpen:u!=null,selectedAccountId:u,openPanel:o.useCallback((y=>{b(ut({selectedDrawerAccountId:y}))}),[b]),closePanel:o.useCallback((()=>{b(ut({selectedDrawerAccountId:void 0}))}),[b])}})(),x=B((b=>Fe(b).reconciliation)),r=B((b=>ye(b))),v=o.useCallback(((b,u)=>{i(Hn("expense_automation_reconcile",b,u))}),[i]),R=o.useCallback(((b,u)=>{const y=r?.companyId;y!=null&&(i(Xn(b,y,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",u)),i(Kn({accountId:u,connectionInProgress:!0})))}),[i,r?.companyId]),C=o.useMemo((()=>{if(l.isOpen&&l.selectedAccountId!=null)return T.jsx(Ui,{reconciliation:x,selectedDrawerAccountId:l.selectedAccountId,onClose:l.closePanel,onFetchLinkTokenClick:v,onEstablishConnectionClick:R})}),[l.isOpen,l.selectedAccountId,l.closePanel,x,v,R]),h=o.useMemo((()=>({reconPanelContent:C,reconSidePanelIsOpen:l.isOpen,closeReconSidePanel:l.closePanel})),[C,l.isOpen,l.closePanel]),{useFeatureGate:g}=qe(),{isFeatureEnabled:D}=g(K.isReconV3Enabled),U=o.useContext(Bn),V=o.useMemo((()=>l.isOpen?D===!0?{selectedItemId:l.selectedAccountId}:{closePanel:l.closePanel,selectedItemId:l.selectedAccountId}:U),[l.isOpen,l.closePanel,l.selectedAccountId,U,D]);return T.jsx(Bn.Provider,{value:V,children:T.jsx(S,{...d,...h})})};return I.displayName=`withReconSidePanel(${a})`,I})(Oi((({closeMatchSidePanel:t,closeReconSidePanel:a,closeSidePanel:S,matchPanelContent:I,isMatchPanelOpen:d,matchPanelMatchId:i,openMatchPanel:l,openTransactionPanel:x,panelContent:r,reconPanelContent:v,reconSidePanelIsOpen:R,isSchedulePanelOpen:C,closeSchedulePanel:h,openSchedulePanel:g,schedulePanelContent:D,schedulePendingDiscardConfirmation:U,sidePanelIsFullView:V,sidePanelIsOpen:b})=>{const{isAiCfoOpen:u,setIsAiCfoOpen:y}=Hc(),p=Xc(),{isOpen:E}=Kc(),_=_e(),j=fe(),f=Se(),{isAiCfoAccessEnabled:O,onAskAiCfoClick:e}=Ut({mobileExploreReferrer:"Transaction categorization"}),n=o.useCallback((()=>{d===!0&&t?.(),b===!0&&V!==!0&&S?.()}),[t,S,d,V,b]),c=B(jo);o.useEffect((()=>{c!=null&&(i===c&&n(),f($o()))}),[c,n,f,i]);const m=B(zo);o.useEffect((()=>{m!=null&&(i===m&&n(),f(Lo()))}),[m,n,f,i]);const{areTenantIdsInSync:k}=sa(),P=Ji(),F=Qc(),[z,H]=o.useState(!1),[X,oe]=qn(),te=o.useCallback((s=>{oe((M=>{const W=new URLSearchParams(M);return s==null?(W.delete(Et),W.delete(At),W):(W.set(Et,s.scheduleDetailsMode),W.set(At,s.scheduleType),W)}),{replace:!0})}),[oe]),[ue,A]=o.useState(void 0),$=o.useCallback(((s,M,W)=>{const Y=Ft(s);A(Y),te({scheduleDetailsMode:M,scheduleType:s}),f(bn({scheduleType:Y==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:W}))}),[f,te]),L=o.useMemo((()=>{const s=X.get(Et),M=X.get(At);return s!=null&&M!=null?{scheduleDetailsMode:s,scheduleType:M}:void 0}),[X]),ge=o.useCallback((s=>{te(s),s!=null&&f(bn({scheduleType:Ft(s.scheduleType)==="prepaid_expenses"?"prepaid_expenses":"fixed_assets",shouldResetEnteredData:!0}))}),[f,te]),Ye=B((s=>kn(s))),q=B((s=>ye(s))),[pt,Be]=o.useState(!1),[We,Pe]=o.useState(!1),[He,Xe]=o.useState([]),[se,me]=o.useState(null),ce=o.useCallback((()=>{me(null)}),[]),Oe=se?.contentType==="activity"?se.detail.transactionId:void 0,w=o.useCallback((s=>{s!=null?(u&&y(!1),p(),n(),me({contentType:"activity",detail:{transactionId:s}})):me((M=>M?.contentType==="activity"?null:M))}),[n,u,p,y]),Q=o.useCallback((s=>{u&&y(!1),p(),n(),me({contentType:"transfer",detail:s})}),[n,u,p,y]),ae=o.useCallback((()=>{p(),ce(),n(),e()}),[n,ce,e,p]),ve=o.useRef(u);o.useEffect((()=>{u===!0&&ve.current===!1&&(p(),ce(),n()),ve.current=u}),[n,ce,u,p]);const Ee=o.useRef(E);o.useEffect((()=>{E===!0&&Ee.current===!1&&(u&&y(!1),ce(),d===!0&&t?.(),b===!0&&V!==!0&&S?.()),Ee.current=E}),[ce,t,S,E,u,d,y,V,b]);const Ke=b===!0&&V!==!0||d===!0,jt=o.useRef(Ke);o.useEffect((()=>{Ke&&!jt.current&&(u&&y(!1),p(),ce()),jt.current=Ke}),[ce,u,Ke,p,y]);const[$t,Sa]=o.useState(!1),zt=o.useRef(!1),{selectedTab:fa}=Te(),{tenantEmailDomain:ht}=Te(),[St,Lt]=o.useState(j.state?.message==="comingFromTransactionDetail"),Gt=j.state?.message==="comingFromOverview",ga=Zc(),ft=Je.getSignedInUser(),{useFeatureGate:de}=qe(),{isFeatureEnabled:Nt}=de(K.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Ue}=de(K.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:gt}=de(K.isTransactionActivityEnabled),{isFeatureEnabled:Ie}=de(K.isAccrualEnabled),{isFeatureEnabled:qt}=de(K.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:Ia}=de(K.isProjectsTransactionsEnabled),{isFeatureEnabled:Ca}=de(K.isReconV3Enabled),{isFeatureEnabled:ka}=de(K.isReconReportEnabled),ba=o.useCallback((s=>{const M=wt(s.transactionType??(s.view==="reconciliation"?"bill":"expense")),W=Z(j.state?.pathnameStackToGoBack,j.pathname),Y=new URLSearchParams({view:"full"});s.threadId!=null&&Y.set("thread_id",s.threadId),s.entityType!=null&&Y.set("entity_type",s.entityType),_(`/${ht}/transaction/${encodeURIComponent(M)}/${s.transactionId??s.entityId}?${Y.toString()}`,{state:{pathnameStackToGoBack:W,message:"expenseAutomation"}})}),[_,ht,j.state,j.pathname]),Ta=B((s=>Go(s,"common"))),J=B((s=>Fe(s))),{categoryOptions:ya,paymentAccountNames:Pa}=B((s=>No(s.accountState))),va=B((s=>qo(s.classState))),{monthEndCloseChecksView:ne,currentSelectedView:G,selectedPeriod:N,selectedTransactionCategorizationTab:It,currentSelectedViewBackgroundRefreshFetchState:Ea,currentSelectedViewFetchState:pe,jeSchedules:Ct,reconciliation:Jt}=J;pi(G==="transaction_categorization");const Aa=J.transactionView.saveStatus.fetchState,Qe=J.transactionView.transactions,Yt=o.useRef(Qe);Yt.current=Qe;const Wt=B((s=>s.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Ht=B((s=>s.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),Xt=o.useRef(Wt);Xt.current=Wt;const Kt=o.useRef(Ht);Kt.current=Ht;const Ze=B((s=>{const M=s.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab;return M!=null?s.expenseAutomationTransactionsViewState?.transactionCategorizationView?.[M]?.filters:void 0})),Qt=o.useRef("");o.useEffect((()=>{if(G!=="transaction_categorization")return;const s=J.transactionView.uiState.searchString??"";if(pe.fetchState!=="Completed"||s.length===0||s===Qt.current)return;Qt.current=s;const M=Ze!=null?ei(Ze):0,W=Ze?.categories.filter((Y=>Y.values.length>0&&String(Y.values[0]??"").trim()!=="")).map((Y=>`${Y.field}:${Y.values.join(",")}`))??[];ee.trackAiCloseTransactionSearch({filtersApplied:W,hasResults:Qe.length>0,isFiltered:M>0,resultsCount:Qe.length,searchTerm:s,searchType:"free_text"})}),[G,pe.fetchState,J.transactionView.uiState.searchString,J.transactionView.transactions,Ze]);const he=hi(Aa,(()=>{const s=[],M=Kt.current,W=Xt.current,Y=W!=null&&M!=null?W[M]:void 0;if(Y?.transactionReviewLocalDataById!=null)for(const xe of Object.values(Y.transactionReviewLocalDataById)){const ie=xe?.transactionReviewLocalData?.lineItemById;if(ie!=null)for(const kt of Object.values(ie)){const Le=kt?.account;Le?.accountId!=null&&s.push(Le.accountId)}}const Ae=Yt.current;for(const xe of Ae)for(const ie of xe.lines??[])"account"in ie&&ie.account?.accountId!=null&&s.push(ie.account.accountId);return s}));o.useEffect((()=>{G==="transaction_categorization"&&b!==!0||w(void 0)}),[G,w,b]),o.useEffect((()=>{R===!0&&a?.()}),[G,Jt.selectedAccountId]);const xa=J.transactionView.selectedTransactionCategorizationCompletedSubTab,Ra=J.transactionView.selectedTransactionGroup,et=`${It}|${xa}|${Ra}`,tt=o.useRef(null),Zt=o.useRef(null);o.useEffect((()=>{tt.current!==null?tt.current!==et&&(tt.current=et,G==="transaction_categorization"&&ce()):tt.current=et}),[ce,G,et]);const wa=B((s=>Oe==null?void 0:Jo(s.transactionState,Oe))),Ce=wa?.qboId,en=B((s=>Ce==null?void 0:Yo(s,Ce)));o.useEffect((()=>{Ce!=null&&f(Wo(Ce))}),[f,Ce]);const{createTransferEntryStatus:tn,creditCardTransferAccountsList:nn,transferAccounts:an}=J.transactionView,on=o.useCallback((s=>Si(f,s)),[f]),sn=o.useMemo((()=>G!=="transaction_categorization"||se==null?null:se.contentType==="activity"?gt===!0?T.jsx(ti,{activityLogView:en,qboId:Ce,onClose:()=>me(null),selectedTransactionId:se.detail.transactionId,isQuickViewCardStyle:!0},String(se.detail.transactionId)):null:se.contentType==="transfer"?T.jsx(ni,{createTransferEntryStatus:tn,creditCardTransferAccountsList:nn,transaction:se.detail,transferAccounts:an,onClose:()=>me(null),onCreateTransfer:on,isQuickViewCardStyle:!0},String(se.detail.transactionId)):null),[G,se,gt,en,Ce,tn,nn,an,on]),Da=sn!=null,{selectedAccountId:Ve}=Jt,cn=dt(Ct.accountSettingsView.saveState.fetchState),Fa=B((s=>Ho(s.accountState,s.accountListState,"accountList"))),_a=B((s=>Xo(s))),je=da(fa)??G,Ma=B((s=>s.entityAutoCompleteState.autoCompleteText.common));if(ca({isDataReady:pe.fetchState==="Completed"}),ft==null)throw Error("Can't access expense automation screen without signing in...");const ln=Zn(N),$e=mt(ln.start),ze=mt(ln.end);if($e==null||ze==null)throw Error(`Invalid start - ${$e} and end - ${ze} period from given ${N}`);const Ba=o.useCallback((()=>{Be(!1)}),[]),Oa=o.useCallback((()=>{Pe(!0)}),[]),Ua=o.useCallback((s=>{Xe(s),Pe(!1)}),[]),Va=o.useCallback((()=>{Xe([])}),[]),nt=J.missingReceipts.bulkUpload.phase,rn=J.missingReceipts.bulkUpload.currentBatchId;o.useEffect((()=>{Ue===!0&&G==="missing_receipts"&&nt==="matching"&&rn!=null&&f(ea({cacheOverride:!0}))}),[Ue,G,nt,rn,f]);const dn=ft?.userId,ja=N.month,$a=N.year,un=q?.tenantId;o.useEffect((()=>{G==="missing_receipts"&&Ue!==!1&&nt==="idle"&&dn!=null&&un!=null&&f(Ko())}),[G,Ue,nt,dn,un,ja,$a,f]),o.useEffect((()=>{Ye.newVendorState?.vendorDetailLocalData?.vendorName!=null?H(!0):H(!1)}),[Ye.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect((()=>{je!=null&&G!==je&&f(ta(je))}),[je]),o.useEffect((()=>{$t===!1&&pe.fetchState==="Completed"&&k&&(Sa(!0),f(Tn(!1,!1,Ie===!0)))}),[$t,pe,k,Ie]),o.useEffect((()=>{const s={month:N.month,year:N.year},M=Zt.current;Zt.current=s,M===null||M.month===s.month&&M.year===s.year||!Gt&&k&&(f(Tn(!1,!1,Ie===!0)),f(re(N,Ve,!1,!1)))}),[N.month,N.year,k,Ie]);const at=o.useCallback(((s=!1,M=!1)=>{const W={start:$e,end:ze};switch(G){case"transaction_categorization":f(be(It,W,s,!St,void 0,void 0,M)),Lt(!1);break;case"flux_analysis":f(rt(N,s,M,null));break;case"month_end_insights":if(M===!1){const Y=new Date(N.year,N.month,0),Ae=Zo(Y.toDateString()).format(ha.analytics.YYYYDashMMDashDDFormat);f(es(!0,q.companyId,q.tenantId,Ae)),f(ts(q.companyId,q.tenantId))}break;case"je_schedules":f(Qo(W,M,Ie===!0));break;case"missing_receipts":f(na(W,{amount:75,currencyCode:"USD",currencySymbol:"$"},s,M));break;default:f(re(N,Ve,s,M))}}),[G,$e,ze,q.companyId,q.tenantId,It,N,Ve,St,Lt,Ie]),za=o.useCallback((()=>{at(!0,!0)}),[at]);o.useEffect((()=>{G===je&&pe.fetchState==="Not-Started"&&k&&at(!0)}),[pe,$e,ze,q.companyId,q.tenantId,k]),o.useEffect((()=>{Gt||St||zt.current||Ea.fetchState==="In-Progress"||pe.fetchState!=="Completed"||(zt.current=!0,at(!0,!0))}),[]),o.useEffect((()=>{ne.fetchState!=="In-Progress"&&ne.fetchState!=="Completed"&&ne.fetchState!=="Error"&&q?.tenantId!=null&&f(De({tenantId:q.tenantId,period:N,refreshViewInBackground:!1}))}),[ne.fetchState,q?.tenantId]),o.useEffect((()=>{ne.fetchState!=="Completed"||!k||(ne.monthEndCloseChecks?.monthEndCloseCheckList.some((s=>s.id==="reconciliation"))??!1)&&J.reconciliation.fetchStatus.fetchState==="Not-Started"&&f(re(N,void 0,!1,!1))}),[ne.fetchState,k,N.month,N.year,J.reconciliation.fetchStatus.fetchState,f]),o.useEffect((()=>{J.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?Be(!0):Be(!1)}),[J.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect((()=>{J.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&k&&(f(De({tenantId:q.tenantId,period:N,refreshViewInBackground:!0})),f(ns({companyId:q.companyId})),_("../"))}),[J.monthEndInsights?.sendMonthEndReportStatus?.fetchState,q.tenantId,N,q.companyId,k]),o.useEffect((()=>{const s=setInterval((()=>{ne.fetchState!=="In-Progress"&&ne.fetchState==="Completed"&&f(De({tenantId:q.tenantId,period:N,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(s)}),[ne.fetchState,q.tenantId,N,f]),o.useEffect((()=>{const s=setInterval((()=>{G==="reconciliation"&&Ve==null&&J.reconciliation.fetchStatus.fetchState==="Completed"&&J.reconciliation.refreshStatus.fetchState!=="In-Progress"&&f(re(N,void 0,!0,!0))}),3e5);return()=>clearInterval(s)}),[G,f,J.reconciliation.fetchStatus.fetchState,J.reconciliation.refreshStatus.fetchState,re,Ve,N]);const La=On(),{isFeatureEnabled:Ga}=de(K.isRecommendationFeedbackEnabled),mn=ai(),{onRecommendationSelection:pn,popup:Na}=fi({isEnabled:Ga}),qa=o.useMemo((()=>({...mn,onRecommendationSelection:pn})),[mn,pn]);o.useEffect((()=>{const s=(ne.monthEndCloseChecks?.monthEndCloseCheckList.find((M=>M.id==="month_end_insights"))?.isDisabled??!1)&&!Nt;G!=="month_end_insights"||!s&&ne.monthEndCloseChecks?.reportEmailSentDate==null||_("../")}),[G,ne.monthEndCloseChecks]);const Ja=R===!0?v:r,Ya=R===!0||b===!0,Wa=R===!0?a:S,Ha=R!==!0&&V;o.useEffect((()=>{cn==="In-Progress"&&Ct.accountSettingsView.saveState.fetchState==="Completed"&&f(yn())}),[cn,Ct.accountSettingsView.saveState.fetchState,yn]);const{transactionId:hn,onSaveVendor:Xa,onSaveSuccess:Ka,onCancel:Qa,vendorViewDetails:Za}=(({expenseAutomationViewSelector:s,closeDrawerHandler:M,currentSelectedView:W})=>{const Y=Se();let Ae,xe,ie;const kt=On(),Le=s.transactionView;let Sn=()=>{};const{transactions:eo,selectedTransactionId:Re,selectedTransactionLineId:ot,transactionLocalData:to}=Le;if(W==="transaction_categorization"){const bt=to.find((ke=>ke.transactionId===Re)),le=eo.find((ke=>ke.id===Re)),fn=ot!=null?bt?.transactionReviewLocalData?.lineItemById[ot]:void 0,gn=fn?.account;xe=fn?.class?.classId,Ae=["Uncategorized Income","Uncategorized Expense"].includes(gn?.accountName??"")?void 0:gn?.accountId;const ao=xi(Re,le?.typeOfTransaction);le!=null&&ao&&(ie={id:Re,type:wt(le.typeOfTransaction)}),Sn=()=>{if(Re!=null&&ot!=null&&le!=null){const ke=Le.transactionLocalData.find((st=>st.transactionId===Re))?.transactionReviewLocalData;if(ke!=null&&le.lines!=null&&le.lines.length>0){const st=ke.lineItemById[ot];let Tt=ke.selectedEntity;if(Vo(le)||(Tt=st.selectedEntityLine),Tt!=null){const oo=Tt,so={transactionId:{id:le.id,type:le.type},transaction:le,lineIds:le.lines.map((co=>co.id))??[]};Y(Dt({entity:oo,amount:st.amount.amount,transactionDetails:so,flowType:"categorization",selectedTab:s.selectedTransactionCategorizationTab,isFetchCOT:kt}))}}}}}const no=B((bt=>kn(bt,void 0,Ae,xe)));return{transactionId:ie,onSaveVendor:()=>{Y(Uo(ie,void 0,!1,!0))},onSaveSuccess:Sn,onCancel:()=>{ie!=null&&Y(Mo({transactionId:ie})),Y(Bo()),Y(Oo()),M()},vendorViewDetails:no}})({expenseAutomationViewSelector:J,closeDrawerHandler:()=>{H(!1)},currentSelectedView:G});return ga?.loggedInUserRoleMap==null?ne.fetchState==="Error"?T.jsx(oi,{onGoHome:()=>_("../",{replace:!0}),onReload:()=>window.location.reload()}):T.jsx(ia,{fetchState:"In-Progress"}):T.jsxs(T.Fragment,{children:[T.jsx(Di,{isOpen:We,drawerLeftMargin:new si(0,0,300,650),onClose:()=>{Pe(!1)},children:T.jsx(Qi,{onClick:s=>s.stopPropagation(),children:T.jsx(Ni,{companyId:q.companyId,closeCustomerRequestDrawer:()=>Pe(!1),addCustomerRequest:Ua,resetCustomerRequest:Va})})}),hn!=null&&z&&T.jsx(Ci,{isOpen:z,transactionId:hn,onSaveVendor:Xa,onSaveSuccess:Ka,onCancel:Qa,vendorViewDetails:Za}),T.jsx(ci,{toolkit:qa,children:T.jsx(Xi,{events:[],eventCallback:(s,M,W)=>{},navigate:_,location:j,themeState:F,categoryOptions:ya,classesForFilters:va,accountsForFilters:Pa,vendorSearchAutoCompleteData:{autoCompleteText:Ma,entityAutoCompleteView:Ta},expenseAutomationViewSelector:J,isMissingReceiptsBulkUploadEnabled:Ue,monthEndInsightsPreviewMode:pt,monthEndInsightsCustomerRequestData:He,isRealtimeInsightsFeatureEnabled:Nt,isCreateTransferEntryFromExpenseEnabled:qt,isAccountingClassesEnabled:_a,isProjectsTransactionsEnabled:Ia,isCOTEnabled:La,currentTenant:q,companyId:q.companyId,signedInUser:ft,isTransactionActivityEnabled:gt,isRightPanelOpen:Da,rightSidePanel:sn,onOpenTransferRightPanel:qt===!0?Q:void 0,uncategorizedAccounts:Fa,newScheduleActiveType:ue,isAccrualEnabled:Ie,newScheduleSelection:L,onNewScheduleSelectionChange:ge,onScheduleTypeChange:$,onNewScheduleSaved:za,onClickCustomerRequest:Oa,handleEditClick:Ba,tenantEmailDomain:ht,trackExpenseAutomationTabAnalytics:P,setActivityLogTransactionId:w,closeMatchSidePanel:t,closeSidePanel:Wa,openTransactionPanel:x,closeSchedulePanel:h,openSchedulePanel:g,openMatchPanel:l,sidePanelIsOpen:Ya,sidePanelIsFullView:Ha,panelContent:Ja,isAiCfoAccessEnabled:O,onAskAiCfoClick:ae,isReconReportEnabled:ka===!0,isReconV3Enabled:Ca,onExpenseAutomationCommentingThreadClick:ba,sidePanelListPercent:R===!0?66:void 0,isMatchPanelOpen:d,isSchedulePanelOpen:C,matchPanelContent:I,schedulePanelContent:D,schedulePendingDiscardConfirmation:U})}),Na,he.showPopup&&he.popupType!=null&&T.jsx(ii,{popupType:he.popupType,currencySymbol:he.currencySymbol,accountId:he.popupAccountId??"",accountName:he.popupAccountName??"",onSubmit:he.handleSubmit,onDismiss:he.handleDismiss})]})}))))),Qi=Me(zc)`
|
|
35
|
-
display: flex;
|
|
36
|
-
min-height: 100%;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
`;async function Zi({authParams:t,endpoint:a,fileType:S,report:I}){const d=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json","zeni-user-id":t.userId,"zeni-tenant-id":t.tenantId,"zeni-session-id":t.sessionId},body:JSON.stringify({report:I,file_type:S,locale_id:"en-US"})});if(!d.ok)throw new Error(`Reconciliation report download failed: ${d.statusText}`);const i=S==="pdf"?"Reconciliation_Report.pdf":"Reconciliation_Report.xlsx",l=(function(x,r){return x==null?r:/filename="?([^"]+)"?/i.exec(x)?.[1]??r})(d.headers.get("Content-Disposition"),i);(function(x,r){const v=new Blob([x]),R=URL.createObjectURL(v),C=document.createElement("a");C.href=R,C.download=r,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(R)})(await d.arrayBuffer(),l)}const el=new Set(["reconciled","reconciled_on_qbo"]),{dateFormat:{analytics:{MMSlashDDSlashYYYYFormat:Ln}}}=la.getLocalizedStrings();function we(t){return`${t.month}-${t.year}`}function Gn(t){if(!Bt(t))return;const[a,S]=t.split("-"),I=Number(a),d=Number(S);return Number.isNaN(I)||Number.isNaN(d)?void 0:{month:$c(I),year:d}}function Nn(t){const a=aa().set("year",t.year).set("month",t.month-1).startOf("month"),S=a.endOf("month");return`${a.format(Ln)} – ${S.format(Ln)}`}function tl(){const{tenantEmailDomain:t,selectedTab:a}=Te(),[S,I]=qn(),d=_e(),i=fe(),l=Se(),x=Ut({mobileExploreReferrer:"reconciliation_report"}),[r,v]=o.useState("Not-Started"),[R,C]=o.useState(void 0),h=S.get("accountId")??void 0,g=S.get("period")??void 0,D=B((A=>ye(A))),U=B((A=>Fe(A))),V=B((A=>Jn(A,D.tenantId))),b=B((A=>Vc(A))),u=U.reconciliation.fetchStatus.fetchState,y=U.reconciliation.accountReconciliationsByAccountID,p=U.reconciliation.monthYearPeriod,E=o.useMemo((()=>g!=null?Gn(g):void 0),[g]),_=o.useMemo((()=>{const A=(V.monthEndCloseChecks?.historicMonthYear??[]).map((L=>({periodId:we(L),label:Nn(L)})));if(E==null)return A;const $=we(E);return A.some((L=>L.periodId===$))?A:[{periodId:$,label:Nn(E)},...A]}),[V.monthEndCloseChecks?.historicMonthYear,E]),j=E!=null&&p.month===E.month&&p.year===E.year,f=o.useMemo((()=>{const A=Object.values(y).filter((L=>{return ge=L.accountReconEntity.reconciliationStatus?.code,ge!=null&&el.has(ge);var ge})).map((L=>({accountId:L.accountReconEntity.account.accountId,label:_t(L)})));if(h==null||A.some((L=>L.accountId===h)))return A;const $=y[h];return[{accountId:h,label:$!=null?_t($):h},...A]}),[h,y]),O=o.useMemo((()=>{if(h!=null&&j===!0)return y[h]?.accountReconEntity.reconciliationId}),[h,y,j]),e=E!=null?Fn(E):void 0,n=e!=null&&b[e]!=null&&b[e].accountIDs.length>0,c=E!=null&&(j!==!0||u==="In-Progress"||n!==!0&&u!=="Completed"&&u!=="Error"),m=c!==!0&&j===!0&&O==null&&(h!=null||f.length===0),k=B((A=>O!=null?jc(A,O):void 0)),P=o.useCallback((A=>{const $=new URLSearchParams;A.accountId!=null&&A.accountId!==""&&$.set("accountId",A.accountId),Bt(A.period)&&$.set("period",A.period),I($,{replace:!0})}),[I]);o.useEffect((()=>{const A=E??p;D.tenantId!=null&&A!=null&&V.fetchState!=="In-Progress"&&V.fetchState!=="Completed"&&V.fetchState!=="Error"&&l(De({tenantId:D.tenantId,period:A,refreshViewInBackground:!1}))}),[D.tenantId,l,V.fetchState,E,p]),o.useEffect((()=>{E!=null&&j!==!0&&l(xt(D.tenantId,E))}),[D.tenantId,l,E,j]),o.useEffect((()=>{if(E==null||j!==!0||u==="In-Progress")return;const A=Fn(E),$=b[A];!($!=null&&$.accountIDs.length>0)&&l(re(E,void 0,!0,!1))}),[l,u,b,E,j]),o.useEffect((()=>{E!=null&&j===!0&&f.length!==0&&h==null&&P({accountId:f[0].accountId,period:we(E)})}),[h,f,E,P,j]),o.useEffect((()=>{O!=null&&l(_n(O))}),[l,O]);const F=o.useCallback((()=>{const A=ui(i.state?.pathnameStackToGoBack),$=g??(p!=null?we(p):void 0),L=Vt({tenantEmailDomain:t,selectedTab:a,selectedPeriod:$})??`/${t??""}/month_end_close_checks/review`;d(A.poppedPathname??L,{state:{pathnameStackToGoBack:A.newStack}})}),[i.state,d,g,p,a,t]),z=o.useCallback((()=>{O!=null&&l(_n(O,!0))}),[l,O]),H=o.useCallback((A=>{if(k?.report==null||R!=null)return;const $=Je.getSignedInUser();C(A),v("In-Progress"),Zi({endpoint:`${Mt}/reconciliation_report`,fileType:A,report:k.report,authParams:{userId:$?.userId??"",sessionId:$?.zeniSessionId??"",tenantId:D.tenantId}}).then((()=>{v("Completed")})).catch((()=>{v("Error")})).finally((()=>{C(void 0)}))}),[D.tenantId,R,k?.report]),X=o.useCallback((A=>{E!=null&&P({accountId:A,period:we(E)})}),[E,P]),oe=o.useCallback((A=>{const $=Gn(A);$!=null&&(l(xt(D.tenantId,$)),l(re($,void 0,!0,!1)),P({accountId:h,period:A}))}),[h,D.tenantId,l,P]);if(g==null||!Bt(g)||E==null)return T.jsx(Ot,{});const te=h??f[0]?.accountId??k?.report?.account.accountId??"",ue=c?"In-Progress":m===!0?"Completed":k?.fetchState??"Not-Started";return T.jsx(mi,{accountOptions:f,periodOptions:_,selectedAccountId:te,selectedPeriodId:we(E),fetchState:ue,isReportNotFound:m,report:k?.report,downloadingFileType:R,downloadState:r,onAccountChange:X,onPeriodChange:oe,onBackClick:F,onDownloadClick:H,onRetry:z,onAskAiCfoClick:x.isAiCfoAccessEnabled===!0?x.onAskAiCfoClick:void 0})}function nl(){const t=fe(),{selectedTab:a,tenantEmailDomain:S}=Te(),I=B((l=>ye(l))),d=B((l=>l.expenseAutomationViewState.selectedPeriodByTenantId[I.tenantId]));if(da(a)==null)return T.jsx(Ot,{});const i=Vt({tenantEmailDomain:S,selectedTab:a,selectedPeriod:d!=null?`${d.month}-${d.year}`:void 0});return i==null?null:T.jsx(ro,{to:i,replace:!0,state:t.state})}function Fl(){return T.jsxs(lo,{children:[T.jsx(Ge,{index:!0,element:T.jsx(Fi,{})}),T.jsx(Ge,{path:"/:selectedTab/report",element:T.jsx(tl,{})}),T.jsx(Ge,{path:"/:selectedTab/:selectedPeriod/*",element:T.jsx(Ki,{})}),T.jsx(Ge,{path:"/:selectedTab",element:T.jsx(nl,{})}),T.jsx(Ge,{path:"*",element:T.jsx(Ot,{})})]})}export{Fl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BlNqAXG4.js";import{a as r}from"./sentry-oO1cMYln.js";import{au as i,av as b,r as f,a2 as l}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import p from"./NotFoundScreen-C9HgOUVr.js";import{h as m,g as u}from"./core-Dx-yNdOO.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]="3e0b62bd-24c2-4dc7-beeb-ffec556cb516",e._sentryDebugIdIdentifier="sentry-dbid-3e0b62bd-24c2-4dc7-beeb-ffec556cb516")}catch{}})();const _=()=>{const e=m(),t=u(),a=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),c=r.useCallback((()=>{(()=>{const n=l(t.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(t.pathname);return o!=null?s.jsx(b,{menuItem:f(o),onDemoClick:a,onGoBack:c}):s.jsx(p,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./sentry-oO1cMYln.js";import{u as l,h as f,g as m}from"./core-Dx-yNdOO.js";import{i0 as p,V9 as g,Va as _}from"./zeni-epic-state-DU8p9Pr6.js";import{u as b,L as h,z as y}from"./index-BN_JNPW3.js";import"./liveblocks-BlNqAXG4.js";import"./recharts-DkhthbKK.js";import"./mui-DicWBIpH.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="08d1d706-c31a-4dea-b2e7-fe1e6b7cc6ef",e._sentryDebugIdIdentifier="sentry-dbid-08d1d706-c31a-4dea-b2e7-fe1e6b7cc6ef")}catch{}})();function V(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:u}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BlNqAXG4.js";import{a as g}from"./sentry-oO1cMYln.js";import{u as F,g as _,h as w,t as M,j as l,N as T}from"./core-Dx-yNdOO.js";import{z as r,G as V,K as P,h as A,M as N,W,Y as R,O as Y}from"./index-BN_JNPW3.js";import{fI as $,Ux as G,U_ as K,UR as q,gl as B,gn as H,UW as J,gY as Q,dk as X,U$ as Z,V0 as ee}from"./zeni-epic-state-DU8p9Pr6.js";import{u as te,n as ne}from"./mui-DicWBIpH.js";import{u as se}from"./useDeviceId-CLaYnGNC.js";import{f as ie}from"./analyticsHelper-Bjsf9R5q.js";import{t as ae}from"./getLocaleForTenant-CCedhKv9.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="5e0ebebe-5878-4242-b30d-f34087b79bd7",t._sentryDebugIdIdentifier="sentry-dbid-5e0ebebe-5878-4242-b30d-f34087b79bd7")}catch{}})();const U=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Ue(){const t=F(),i=_(),f=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),b=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>$(e))),h=l((e=>G(e))),D=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&U(n,p)&&a!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(K(n,a,m)))}),[n,p,t,a,m,s?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(q(h.tenantsInOrder),s.zeniSessionId),B(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(J("Completed")),V.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,h.tenantsInOrder),Q().then((()=>{const e=Y();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",X(o.productSettings))}),2e3))}),[I,S,y,s,o,h,v,i.state,t]);const E=g.useCallback((()=>{f("/signin/auth")}),[f]),O=g.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(Z(a,c,d))}),[a,d,t,c]),j=g.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,a,c,d))}),[a,n,t,c,d]);if(b==="Completed"&&d!=null)return u.jsx(W,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:O,onVerifyOtp:j,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!U(n,p)||m==null||b==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||b==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{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{Ue as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as B}from"./liveblocks-BlNqAXG4.js";import{a as f}from"./sentry-oO1cMYln.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-Dx-yNdOO.js";import{fI as ne,Uy as Me,Uz as se,gc as xe,fH as Ne,UI as Pe,UB as Re,UC as Ve,q3 as Le,gp as je,UF as b,UK as Oe,UL as X,gq as qe,UM as ze,ED as Ze,h5 as He,cW as We,UN as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-DU8p9Pr6.js";import{w as Xe,i as Qe,k as ea,q as aa,c as ta,e as na,u as sa,$ as c,f as oa,o as ia,z as ra,d as da,j as ca,X as la,s as ua,l as fa,n as Q,L as ma,C as ha,D as ba,p as S,h as ee,x as pa,J as ae,A as ga,B as Sa}from"./index-BN_JNPW3.js";import{D as ka}from"./mui-DicWBIpH.js";import{u as Ea}from"./InboxNotificationsProvider-Db8GSYr5.js";import{u as Ca}from"./useTaskManagerAccess-Ces4QXd0.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="75fa13e9-9466-4f14-8ba2-8a199b7eef38",l._sentryDebugIdIdentifier="sentry-dbid-75fa13e9-9466-4f14-8ba2-8a199b7eef38")}catch{}})();const Ta=Xe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Ue(),D=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));f.useEffect((()=>{C&&T&&!m&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,m]);const _=t((e=>e.tenantState)),fe=t((e=>_.fetchState==="Completed"?je(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>b(e).totalUnreadCount)),Ce=t((e=>b(e).reducedFetchCountState)),R=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:j,isLoading:O,isFetchingMore:q,hasFetchedAll:z,fetchMore:Te}=Ea();f.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(O===!1&&q===!1&&z===!0)if(o?.companyId!=null&&j!=null){const e=`dashboard_${o.companyId}`;U(j.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[O,q,z]),f.useEffect((()=>{C&&E&&!m&&L.fetchState==="Not-Started"&&D.tenantId!=null&&r(Oe("task_manager","dashboard"))}),[C,E,m,L.fetchState,D.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(X({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(X({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:Ee},Z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>Z?.tenantId!=null?qe(e,Z.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&h.push("rewards_card"),P===!1&&h.push("expense_automation_card");const W=t((e=>ze(e,h).fetchState)),Y=t((e=>Ze(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!A&&!M?void 0:"disabled",we=f.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,_e=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,E),J=da(),Fe=J&&ca(a);return B.jsx(ka,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:_.currentTenantId??"",tenants:_.fetchState==="Completed"?fe:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:Q(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:_e,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";Q(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const De=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${De}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Da=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Qe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Da as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-BlNqAXG4.js";import{h as r,l as i}from"./core-Dx-yNdOO.js";import{ak as n}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import"./sentry-oO1cMYln.js";import"./zeni-epic-state-DU8p9Pr6.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as mt,b as lt,o as ft,j as B}from"./liveblocks-BlNqAXG4.js";import ut from"./NotFoundScreen-C9HgOUVr.js";import{a as k}from"./sentry-oO1cMYln.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as J}from"./core-Dx-yNdOO.js";import{cB as It,UB as Q,fI as X,h5 as Tt,UF as b,a1B as Y,UL as m,Uz as y,AO as F,GB as Ct,a1C as At,Uy as yt,UN as Et,AT as _t,a1D as $,br as j,gk as x,AX as K,a1E as Bt,cN as Nt,cG as wt}from"./zeni-epic-state-DU8p9Pr6.js";import{ao as xt,c as Ut,q as vt,$ as Dt,aq as Gt,dI as Rt,p as N,dJ as Pt,w as Mt,dK as $t,i as jt,a2 as Ft}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{u as Lt}from"./useTaskManagerAccess-Ces4QXd0.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="2f1ec81e-d876-4e74-96b7-f6e0ea15ff90",t._sentryDebugIdIdentifier="sentry-dbid-2f1ec81e-d876-4e74-96b7-f6e0ea15ff90")}catch{}})();const qt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),zt=St((function(t,l){const n=Q(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=N(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=N(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(K("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],j())));let i=`/${h}/${r[1]}`;const T=N(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Nt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(y(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(Y(a,s));const d=`../${a}`,r=N(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Bt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(K("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt($t)),Ot=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),a=S((e=>Q(e))),s=S((e=>X(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),L=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),G=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:R,fetchMore:ot}=mt(),{threads:q,isLoading:z,fetchMore:O,isFetchingMore:W,hasFetchedAll:H}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(Y(c)),c==null){const e=`../${L}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=E||R===!0||C!==!0||E||R===!0||C!==!0;k.useEffect((()=>{P&&G!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||G!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,G]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&z===!1&&w!=null&&q!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=q.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(W||H===!0||O==null||O(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,R,W,C,H,z,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(jt(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return B.jsx(zt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return B.jsxs(bt,{children:[B.jsx(J,{path:"/:selectedTab",element:B.jsx(Ot,{})}),B.jsx(J,{path:"*",element:B.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-BlNqAXG4.js";import{a as r}from"./sentry-oO1cMYln.js";import{u as A,g as j,j as o,N as C}from"./core-Dx-yNdOO.js";import{Vc as P,fI as V,gp as x,Vd as z,Ve as D,Vf as M,Vg as R,pW as k,TT as L}from"./zeni-epic-state-DU8p9Pr6.js";import{z as h,af as I}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="3b1edae8-81bf-47df-9158-a93ead79df37",n._sentryDebugIdIdentifier="sentry-dbid-3b1edae8-81bf-47df-9158-a93ead79df37")}catch{}})();function ee(){const n=A(),a=j(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),b=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const T=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=v??T;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,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(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BlNqAXG4.js";import{h as G,u as Y,g as z,i as H,j as d,l as J,n as K,o as S}from"./core-Dx-yNdOO.js";import{fI as v,Az as R,vc as Q,W4 as M,v7 as T,bq as X,c0 as Z,v8 as ee,W5 as ae,VO as C,ek as te,Es as se,W6 as oe,ER as re,e0 as ne,d$ as ce}from"./zeni-epic-state-DU8p9Pr6.js";import{ag as ie,z as le,ao as de,aq as me,V as fe,a6 as pe,h as q,aB as ue,p as he,q as ge,$ as Fe}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import Ie from"./NotFoundScreen-C9HgOUVr.js";import{F as be}from"./FeaturePreviewScreen-ocxt03Zk.js";import{a as g}from"./sentry-oO1cMYln.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{u as Ce}from"./useInitialThreadRequest-J-yGGXi5.js";import{t as Te}from"./routePaths-P47RCoW6.js";import{M as ye}from"./MobileAppDrawer-D9_9MdJz.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.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]="421ace36-92e7-4e32-9930-37fcb2df5007",s._sentryDebugIdIdentifier="sentry-dbid-421ace36-92e7-4e32-9930-37fcb2df5007")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((function(s){const e=ae(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:q}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(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=te(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 u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,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("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=g.useState(!1),[m,A]=g.useState(!1),F=le.getSignedInUser(),x=d((t=>v(t))),w=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:$}=Se({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!m){A(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,k?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(a(M(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,I]);const E=fe(),B=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),_=Ce(x?.companyId,{clearParams:l&&m}),[N,V]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:q,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:N,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:w,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:B,isAiCfoAccessEnabled:W,onAskAiCfoClick:$,initialOpenThreadRequest:_,onClickMenuIcon:()=>{L(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=ge(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BlNqAXG4.js";import{W0 as re,fI as N,m3 as _,e0 as Y,d$ as le,SS as Q,Vp as de,Di as Pe,W1 as J,D7 as je,Ds as Le,Dm as ce,Db as pe,Dq as ve,Dn as Te,W2 as ue,sx as Ae,g9 as Ve,gG as Re,W3 as H,Df as me,De as ge,Dv as Fe,c9 as Oe}from"./zeni-epic-state-DU8p9Pr6.js";import{_ as fe,q as X,$ as W,z as G,f as he,H as Ce,ad as ye,ax as be,ay as Ze,a9 as Se,E as F,ae as De,G as K,az as Be,ao as Ue,aq as $e,a6 as ze,h as we,M as He,p as We,aA as _e,V as Ge}from"./index-BN_JNPW3.js";import{D as xe,n as M,S as Ie}from"./mui-DicWBIpH.js";import ae from"./NotFoundScreen-C9HgOUVr.js";import{a as d}from"./sentry-oO1cMYln.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-Dx-yNdOO.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{M as Ye}from"./MobileAppDrawer-D9_9MdJz.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.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]="cdf1c8dd-b6c7-4d66-82f3-99c1d73b801f",e._sentryDebugIdIdentifier="sentry-dbid-cdf1c8dd-b6c7-4d66-82f3-99c1d73b801f")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>_(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(W.isDebitCardFeatureEnabled),P=Y(I,p),v=le(p),T=Q(p),B=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{O===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(W.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),y=!L||V,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,ke=M(De.H6Regular)`
|
|
6
|
-
margin-top: ${F.sp7};
|
|
7
|
-
padding-left: ${F.sp8};
|
|
8
|
-
padding-right: ${F.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ee=M(De.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${F.sp8};
|
|
14
|
-
padding-right: ${F.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${F.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,Z]=d.useState(!1),[k,S]=d.useState(!1),D=g((o=>re(o))),r=g((o=>N(o))),p=g((o=>_(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(W.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),v=Q(r),T=de(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(J())},C=()=>{O===!0?S(!0):w()},A={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(W.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:V}=Ce(r?.tenantId),y=!L||V,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),Z(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return d.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Be,{...s})]})})},ta=M(Ie)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Je((function(e,t){const c=ue(e),n=G.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(e),analytics:we}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(_e);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),b=G.getSignedInUser(),h=g((s=>N(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:O}=m(W.isDebitCardFeatureEnabled),Z=g((s=>_(s))),k=!Y(O,h)&&Z,S=Q(h),D=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=d.useState(!1),[x,I]=d.useState(!1),[P,v]=d.useState(!1),[T,B]=d.useState("off"),[U,w]=d.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ne({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Ve(s.userState,s.userRoleState,s.userListViewState,"manager"))),V=g((s=>Re(s))),y=h?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),v(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:V,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=We(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ge();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BlNqAXG4.js";import E from"./NotFoundScreen-C9HgOUVr.js";import{a as r}from"./sentry-oO1cMYln.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as F,o as h}from"./core-Dx-yNdOO.js";import{fI as O,a1F as b,bo as B,bn as N,iP as V,gk as q}from"./zeni-epic-state-DU8p9Pr6.js";import{k as L,z as I,aq as $,dL as G}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{M as J}from"./MobileAppDrawer-D9_9MdJz.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.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]="322f80e2-1fa6-42d6-aa2e-e220a0e35907",e._sentryDebugIdIdentifier="sentry-dbid-322f80e2-1fa6-42d6-aa2e-e220a0e35907")}catch{}})();const K=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)}}}))(G),Q=()=>{const e=_(),t=v(),c=L(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({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"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(F,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-BlNqAXG4.js";import Z from"./NotFoundScreen-C9HgOUVr.js";import{a as p}from"./sentry-oO1cMYln.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as g}from"./core-Dx-yNdOO.js";import{fI as E,ZJ as h,Z$ as R,Oe as U,Oa as L,Od as f,O3 as N,_o as $,O7 as J,Og as K}from"./zeni-epic-state-DU8p9Pr6.js";import{z as B,w as T,c8 as q,n as _,bR as F,c9 as G}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import{u as H,R as x}from"./ReimbursementApprovalRuleDetailScreen-C5VRjOUn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2f6e9a04-4a4b-4306-b2ef-cea536b898c5",e._sentryDebugIdIdentifier="sentry-dbid-2f6e9a04-4a4b-4306-b2ef-cea536b898c5")}catch{}})();const j="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(q)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),b=u((r=>R(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(r,y,I)=>{r.endsWith(j)&&I.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=O((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(T(G)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?o.jsx(Y,{isLoading:n}):o.jsx(P,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));H();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(J(!1,!0)))}),[v,b,e,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return o.jsxs(z,{children:[o.jsx(g,{path:"/",element:o.jsx(X,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-BlNqAXG4.js";import{a as f}from"./sentry-oO1cMYln.js";import{u as O,j as g,h as x,g as C,i as V,l as k}from"./core-Dx-yNdOO.js";import{mv as Z,Z$ as w,ZJ as U,O6 as j,Oj as B,Oe as A,Of as E,_0 as N,fI as z,Od as J}from"./zeni-epic-state-DU8p9Pr6.js";import{z as F,a5 as P,b$ as K,n as $,bR as W,c0 as G}from"./index-BN_JNPW3.js";import{u as q}from"./mui-DicWBIpH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="ead6fcea-b78c-4684-9d21-33f94f6cfd7e",e._sentryDebugIdIdentifier="sentry-dbid-ead6fcea-b78c-4684-9d21-33f94f6cfd7e")}catch{}})();function H(){const e=O(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const M=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const I=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=d.actors.selectedNonUsers.map((m=>{const y=(R=m.value,N(R)==null);var R;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(b);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(K);function Q(){const e=x(),s=O(),t=C(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=q(),r=g((n=>w(n))),l=g((n=>U(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(j(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return N(e)==null}const X=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const R=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];R==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):R==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const _=y.action??"require_approval";m.push({action:_,actors:D,operator:D.length>1?_==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=S?.selection.selectedOptions??[];if(b.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(J(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=x(),s=O(),t=C(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=q(),r=g((n=>w(n))),l=g((n=>U(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(j(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BlNqAXG4.js";import{u as ne,j as k,h as J,g as Q,i as se,N as M,l as Y,q as lt,n as mt,o as E}from"./core-Dx-yNdOO.js";import{fI as V,Oa as ct,$u as be,c9 as ge,Ng as je,me as dt,Nv as me,Nu as ce,$v as ut,bn as he,gZ as Fe,$w as pt,Xr as bt,m3 as Ue,Xs as Re,Xt as gt,kR as ht,Zv as ft,l4 as St,N4 as It,CA as yt,kY as vt,NR as Le,$x as Ne,$y as ke,$z as At,$A as Rt,$B as kt,NB as Ce,la as Ct,ZE as wt,Nt as Et,Ne as xt,$C as Bt,Nd as Tt,$D as Dt,Nl as we,NF as $t,NE as jt,NA as Ft,$E as Pe,SS as Ut,bo as Lt,No as Nt,O7 as Pt,$F as Mt,$G as _t,NN as Ot,NK as Ee,Y$ as Zt,Nb as zt,$H as Me,OA as xe,OI as Gt,$I as Vt,$J as K,$K as Ht,$L as _e,$M as Wt,$N as Oe,$O as Ze,NZ as de,bv as qt,bL as fe,cN as Se,e0 as ze,d$ as Ge,$P as Kt,gk as Xt,Zc as Qt,$Q as Jt,$R as Ve,Zg as Yt,Z$ as en,$S as tn,_o as nn,OF as Be,OE as an,$T as sn,$U as on,$V as rn,$W as ln,$X as mn,ZK as cn,Ov as dn,Oz as un,bq as pn,bK as bn,cH as gn,cv as hn,bu as fn,US as Sn,db as In,de as yn,dd as vn,cG as An}from"./zeni-epic-state-DU8p9Pr6.js";import{bR as Rn,k as He,_ as We,q as ie,$,z as U,cQ as qe,a6 as oe,h as C,aQ as Te,E as D,ac as ae,ad as kn,G as Ke,cR as Cn,p as X,aq as Xe,cS as wn,V as re,cT as En,ao as xn,a9 as Bn,a5 as Ie,M as Qe,w as Tn,bz as Dn,at as $n,ag as jn,cU as Fn,f as Un}from"./index-BN_JNPW3.js";import{n as _,S as Ln,u as Je}from"./mui-DicWBIpH.js";import ue from"./NotFoundScreen-C9HgOUVr.js";import{S as De}from"./SetupPagesScreen-CxoDK6yX.js";import{F as Ye}from"./FeaturePreviewScreen-ocxt03Zk.js";import{a as f}from"./sentry-oO1cMYln.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BOks8lHg.js";import{u as et}from"./useInitialThreadRequest-J-yGGXi5.js";import{D as Nn}from"./DrawerScreen-g7gMvOCC.js";import{M as tt}from"./MobileAppDrawer-D9_9MdJz.js";import{F as Pn}from"./ScreenRoutes-BXmr-cb0.js";import{R as Mn}from"./ReimbursementApprovalRoutes-C4rWwmOK.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.js";import"./BusinessVerificationPageScreen-B2MzrRz9.js";import"./routePaths-P47RCoW6.js";import"./analyticsHelper-Bjsf9R5q.js";import"./InboxNotificationsProvider-Db8GSYr5.js";import"./useTaskManagerAccess-Ces4QXd0.js";import"./getLocaleForTenant-CCedhKv9.js";import"./ReimbursementApprovalRuleDetailScreen-C5VRjOUn.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]="ce6c23a1-608f-4957-93a7-6e732e2869c1",e._sentryDebugIdIdentifier="sentry-dbid-ce6c23a1-608f-4957-93a7-6e732e2869c1")}catch{}})();const nt=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ke.getLocalizedStrings(),On=Y((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=U.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=U.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(jt())},clearRemiSaveStatus:()=>{e($t("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(xt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Et({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Rt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(ke({}));const i=nt(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}}))(Cn);function $e(){const e=J(),t=ne(),n=Q(),{reimbursementId:r}=se(),c=He(),d=We(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l($.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l($.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:x}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=Q().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[v,w]=f.useState(!1),h=U.getSignedInUser(),A=k((p=>V(p))),g=k((p=>be(p,r))),L=et(A?.companyId,{clearParams:g.fetchState==="Completed"}),j=ge(A?.userRole??[]);(function(){const p=ne(),N=k((P=>V(P))),O=N?.tenantId,{isApprovalRulesV3Enabled:H,isLoading:Z}=Rn(O),W=k((P=>P.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||W==="Not-Started"&&p(ct(!0,!1,!1,H))}),[O,Z,H,W,p])})(),f.useEffect((()=>{(T&&!v||B&&!v&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(je(!1,b,y,r)))}));const F=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||j&&g.billStatus==="rejected"||j===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(zn,{}):null,m&&d!=="small"?s.jsx(Gn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:A?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:A?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:A,reimbursementId:r,themeState:c,uncategorizedAccounts:F,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:x})})]})}const Zn=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,zn=_.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${kn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Gn=_.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Vn=_.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Hn=_.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${D.sp2} ${D.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${D.sp4};
|
|
49
|
-
height: ${D.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=_.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=Y((function(e,t){const n=Pe(e,t.reimbursementId),r=U.getSignedInUser(),c=he(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Mt(n.remiActivities,_t(t.currentTenant),r));const i=ge(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Ue(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Ne());const a=nt(o),i=X(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Ee(n,a.type,"")):e(Ee(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=X(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{C.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?C.trackReimbursementCancelAndDeleteReimbursement(n):C.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(wn);function Kn(){const e=J(),t=ne(),n=Q(),r=n.hash.substring(1),c=He(),{reimbursementId:d}=se(),m=U.getSignedInUser(),o=k((R=>V(R))),a=k((R=>Pe(R,d??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=et(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=ye({mobileExploreReferrer:"Reimbursement Details"});Xe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=ie(),{isFeatureEnabled:x}=u($.isLimitedCategoryForReimbursement),[I,B]=f.useState(!1),[T,v]=f.useState(!1),[w,h]=f.useState(!1),{isFeatureEnabled:A}=u($.isShowDeletedReimbursementsFeatureEnabled),g=k((R=>be(R,d??""))),L=Ut(o),j=Lt(o.userRole),F=a.fetchState;if(f.useEffect((()=>{I||d==null?I==1&&F==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(d,!1,A)))}),[I,d,t,F]),f.useEffect((()=>{A&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&L===!1?h(!1):h(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(j||a.allApprovers.find((R=>R.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,j,o.isZeni,L,m]),f.useEffect((()=>{T||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(v(!0),t(je(!1,x,A,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[T,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(qe,{}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{analytics:C,onLoad:R=>(p=>{d!=null&&p.trackReimbursementReimbursementDetails(d)})(R)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:A,location:n,navigate:e,isRealTimeApprovalEnabled:w,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Xn=Y((function(e,t){return{remisReviewView:Me(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(K())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(xe("approved",r??""));break;case"reject":e(xe("rejected",r??""))}}}}))(En);function Qn({tenantEmailDomain:e}){const t=J(),n=k((m=>m.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=k((m=>Me(m))),c=re(),d=c?.loggedInUserRole?.includes("admin")===!0;return f.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Xn,{navigate:t,analytics:C,isAdmin:d,tenantEmailDomain:e})}const G=Yt(),at="bulk-operation-update",pe="reimbursement-approval-rule-update",{spendManagement:Jn,common:le}=Ke.getLocalizedStrings(),Yn=Jn.reimbursement.bulkActions,ea=_.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=Y((function(e,t){const n=Ze(e,G,t.isBulkActionEnabled);let r=n.allSubTabs;const c=U.getSignedInUser(),d=he(c),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const b=n.fetchState,y=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:d,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:C,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:G,spendManagementEndPoint:`${$n}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(K()),e(_e(o))},onSubtabChange:o=>{e(K()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=sa(m,o,a),l=X(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=aa(m),a=X(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;C?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=X(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(mn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(ln(o))},onFiltersChange:o=>{e(rn({filters:o})),o.categories.every((a=>a.field!=null&&a.values?.length!==0))&&C.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&C.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(de(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(sn(o))},removeAllTransactionsFromBulkActionList:()=>{e(K())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(an(o,a??""));break;case"send_for_approval":e(Be("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Be("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(pe)&&e(nn(!1))},onEventReceived:o=>{o===at&&e(tn())}}}))(Tn(Dn));function na(){const e=J(),t=ne(),n=Q(),r=n.state,c=We(),[d,m]=f.useState(null),o=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Ht(r.tab.toString());S!=null?t(_e(S)):console.log("Warning:Not a valid remiListTab");const z=Wt(r.subTab.toString());z!=null?t(Oe(z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(K())}}),[]);const{useFeatureGate:a}=ie(),{isFeatureEnabled:i}=a($.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a($.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a($.isReimbursementBulkActionEnabled),y=U.getSignedInUser(),u=k((S=>V(S))),[x,I]=f.useState(!1),[B,T]=f.useState(!1),v=re(),w=v?.loggedInUserRole?.includes("admin")===!0,h=k((S=>Ze(S,G,b))),{areTenantIdsInSync:A}=xn(),g=h.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:j}=ye({mobileExploreReferrer:"Reimbursement List"});if(Xe({isDataReady:g==="Completed"}),f.useEffect((()=>{!B&&A&&(T(!0),t(de(G,!0,l,!1,!0)))}),[B,G,t,A]),y==null)throw Error("Can't access address page without signing in...");const F=!!u?.userRole&&qt(u),R=fe(v?.loggedInUserRoleMap),p=Se(v?.loggedInUserRoleMap),N=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,O=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,H=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,Z=k((S=>Fe(S.companyState,u.companyId))),W=Z?.company.featuresActivationInfo.connectedAccountProvider,P=S=>{I(S)},{isFeatureEnabled:st}=a($.isDebitCardFeatureEnabled),it=ze(st,u),ot=Ge(u),{remisProcessed:ee,remisProcessing:ve}=k((S=>Kt(S)));f.useEffect((()=>{ee===ve&&d!=null&&(t(Xt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:ee>1?le.texts.reports2:Yn.report},{variableName:"_has_",variableValue:ee>1?le.texts.have:le.texts.has},{variableName:"_action_",variableValue:Qt(d)}]})),t(Jt()),setTimeout((()=>{t(de(G,!0,l,!1,!0,!0))}),3e3),m(null))}),[ee,ve]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${at}`,`private-encrypted-${u.companyId}.${pe}`]:[],eventCallback:(S,z,Ae)=>{S.endsWith(pe)?Ae.onReimbursementApprovalRulesEventReceived?.(S):z.entity_type==="reimbursement"&&(m(z.operation_type),Ae.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(Ye,{}):O&&(!F||R)||p&&N?s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(oe,{analytics:C,onLoad:S=>(z=>z.trackPageLoaded(Qe.Event.reimbursementHome))(S)}):null,s.jsx(tt,{isAppContentDrawerOpen:x,handleDrawerToggle:P}),s.jsxs(ea,{windowSize:c,children:[s.jsx(Nn,{isOpen:o,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(K())},children:s.jsx(ia,{onClick:S=>S.stopPropagation(),children:s.jsx(Qn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:G,isAdmin:w,isEmployee:F,entity:"reimbursement",onClickMenuIcon:()=>{P(!0)},createdByUserList:h.createdByUserList,createdByUserListFetchState:h.createdByUserListFetchState,isDownloadEnabled:h.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:b,bulkSubmissionLimit:h.remiBulkSubmissionLimit,bulkSubmissionFetchState:h.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:j,...rt})]})]}):H&&R?s.jsx(M,{to:"../setup"}):v!=null&&Ve(u,v.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(Ie,{fetchState:"In-Progress"}):s.jsx(ue,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=_(Ln)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,oa=Y((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:C,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Fn),ra=()=>{const e=jn(),t=J(),n=Q(),{tenantEmailDomain:r}=se(),c=Je(),[d,m]=f.useState(!1),o=k((w=>V(w))),a=U.getSignedInUserTenant(r)?.companyId??o.companyId,i=U.getSignedInUser(),l=o.userRoleId,b=!!o.userRole?.includes("reimbursements_user"),y=re(),u=fe(y?.loggedInUserRoleMap),x=Se(y?.loggedInUserRoleMap),I=!!o.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!o.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,v=w=>{m(w)};if(i==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&x&&I?s.jsx(M,{to:"../../../reimbursements"}):T&&u?s.jsx(M,{to:"../../reimbursements/setup"}):o.companyReimbursementInfo&&!T||o.userReimbursementInfo&&x&&I===!1?s.jsxs(s.Fragment,{children:[s.jsx(oe,{analytics:C,onLoad:w=>(h=>h.trackPageLoaded(Qe.Event.reimbursementPromoPage))(w)}),s.jsx(tt,{isAppContentDrawerOpen:d,handleDrawerToggle:v}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:o.userReimbursementInfo,userRoleId:l,isEmployee:b,onClickMenuIcon:()=>{v(!0)}})]}):s.jsx(Ie,{fetchState:"In-Progress",style:{backgroundColor:c.colors.grey5}})};function Ma(){const e=k((P=>V(P))),t=re(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Je(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ie(),{isFeatureEnabled:o}=m($.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m($.isDebitCardFeatureEnabled),i=ze(a,e),l=Ge(e),b=e?.userRole!=null&&pn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,I=fe(t?.loggedInUserRoleMap),B=x&&I,T=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,v=T&&hn(t?.loggedInUserRoleMap),w=Un(e,o,a)&&!b,h=w&&fn(t?.loggedInUserRoleMap),A=Sn(t?.loggedInUserRoleMap),g=In(t?.loggedInUserRoleMap),L=yn(t?.loggedInUserRoleMap),j=T&&g,F=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&L,R=vn(t?.loggedInUserRoleMap),p=An(t?.loggedInUserRoleMap),N=Se(t?.loggedInUserRoleMap),O=w&&R,{tenantEmailDomain:H}=se(),Z=Q(),W=n===!0&&(I||N&&d);return s.jsxs(mt,{children:[Z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(De,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:h,isUserHasOnlyCardAccess:A,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(De,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:h,isUserHasOnlyCardAccess:A,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ra,{})}),s.jsx(E,{path:"approval-rules/*",element:B?s.jsx(Mn,{}):s.jsx(Pn,{showZeniAccountRoute:j,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:N,showTreasuryRoute:F,isTenantBankingOnly:i,showChargeCardRoute:O,tenantEmailDomain:H??""})}),W&&s.jsx(E,{path:"*",element:s.jsx(na,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Ye,{})}),t!=null&&Ve(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(M,{to:"../promo"})}),c&&I&&s.jsx(E,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):Z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx($e,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx($e,{})}),s.jsx(E,{path:"*",element:s.jsx(ue,{})})]}):s.jsx(E,{path:"*",element:s.jsx(Ie,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${D.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(ue,{})})]})}export{Ma as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BlNqAXG4.js";import{z as b,a6 as I,h as d,M as N,e1 as S,q as k,$ as C}from"./index-BN_JNPW3.js";import"./mui-DicWBIpH.js";import g from"./NotFoundScreen-C9HgOUVr.js";import{a as c}from"./sentry-oO1cMYln.js";import{u as D,j as h,h as F,g as L,l as T,n as U,o as f,N as y}from"./core-Dx-yNdOO.js";import{fI as _,a2G as j,a2H as p,Ei as P,q3 as V,a2I as q,Eg as G}from"./zeni-epic-state-DU8p9Pr6.js";import"./recharts-DkhthbKK.js";import"./analytics-DOu6Ih_Z.js";import"./plaid-BW55_XuJ.js";import"./dnd-DfkYz8Zm.js";import"./stripe-cKAAJElX.js";import"./lottie-CICLPim-.js";import"./lexical-CeKyhyV8.js";import"./pdf-BwuxCG-0.js";import"./utils-vB0Nm3XK.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]="e5601642-71b4-4297-b9a5-e74bfc93f987",e._sentryDebugIdIdentifier="sentry-dbid-e5601642-71b4-4297-b9a5-e74bfc93f987")}catch{}})();const z=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(G())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(S),H=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),w=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:d,onLoad:o=>(v=>v.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(z,{navigate:l,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|