@zeniai/web-app-ui 5.0.0-dev → 5.0.0-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-CsjRlbPP.js → AddressRoutes-D2Yn8dXr.js} +1 -1
- package/dist/assets/{AddressScreen-Cud2BdS6.js → AddressScreen-B-90Ns9M.js} +1 -1
- package/dist/assets/{AiCfoScreen-BlJgIDQk.js → AiCfoScreen-BR8PoUmU.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-a0Eum5ly.js → BillPayApprovalRoutes-BeaWY9ga.js} +1 -1
- package/dist/assets/{BillPayRoutes-4WQm4Az3.js → BillPayRoutes-CWbI-3lu.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-ByeCoum9.js → BusinessVerificationPageScreen-B8mXcNLy.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BaWxIhbQ.js → ChargeCardRoutes-Bgdfn44a.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Gd7wTdjI.js → CompanyPassportScreen-BCPm2c8T.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DRIbdRCr.js → ConnectionAuthScreen-BYziEpOR.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-Bo5uU8cG.js → CustomerOnboardingAuthScreen-Dduw6GDH.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-CA_SL4If.js → CustomerOnboardingRoutes-D-_60rGa.js} +1 -1
- package/dist/assets/{DashboardRoutes-BukE-3A1.js → DashboardRoutes-B9_-_tPb.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CJs1Iehr.js → DefaultTenantHome-Cl8vcsiM.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C-F8590D.js → DomesticWireDetailScreen-DCV6HQRp.js} +1 -1
- package/dist/assets/{DrawerScreen-D8_xICtn.js → DrawerScreen-dt2KgJzx.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DUxU9PLN.js → EntityDetailRoutes-CINCnbfR.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CFti2QGS.js → ExpenseAutomationRoutes-D8G_zp8f.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BdQUVLIb.js → FeaturePreviewScreen-C2dbroTQ.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BA19woWo.js → MagicLinkRoutes-CytIPPYS.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-B3D7rk1w.js → MagicLinkSignInScreen-BxPvHLB5.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DVJrG_df.js → MobileAppDrawer-eCdBXSxf.js} +1 -1
- package/dist/assets/{NotFoundScreen-Dw_4aXSt.js → NotFoundScreen-jPpbDlQd.js} +1 -1
- package/dist/assets/{NotificationRoutes-CCiEyTtK.js → NotificationRoutes-CxWKZNsp.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BCE_H3uV.js → PandLWithForecastRoutes-BeER1eMP.js} +1 -1
- package/dist/assets/{PeopleRoutes-DdGI7aN1.js → PeopleRoutes-5oajZHVV.js} +1 -1
- package/dist/assets/{PerformanceRoutes-D1lBptE4.js → PerformanceRoutes-D2L3CFvV.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D4gTLUDW.js → QBOConnectionScreen-B4Rcl2XA.js} +1 -1
- package/dist/assets/{ReferralListScreen-BnWOANU0.js → ReferralListScreen-DHtLnulq.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-C0f3WPnl.js → ReimbursementApprovalRoutes-DdJz0p5l.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DWpP5dnv.js → ReimbursementApprovalRuleDetailScreen-BVKZCEAO.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Bacb4uYZ.js → ReimbursementRoutes--zV8t9-V.js} +1 -1
- package/dist/assets/{ReportsRoutes-u2KAi2M5.js → ReportsRoutes-CRufLdv_.js} +1 -1
- package/dist/assets/{RewardsRoutes-CSkXXFxN.js → RewardsRoutes-CJ6LAavD.js} +1 -1
- package/dist/assets/{ScreenRoutes-_VyWuy4j.js → ScreenRoutes-C36ZBPGp.js} +2 -2
- package/dist/assets/{SettingsRoutes-CvdvJ0Av.js → SettingsRoutes-BZwjpejF.js} +1 -1
- package/dist/assets/{SetupPagesScreen-B82yEDYc.js → SetupPagesScreen-BJy2d6s1.js} +1 -1
- package/dist/assets/{SignInScreen-h4mmFX0V.js → SignInScreen-Cr0sIFcm.js} +1 -1
- package/dist/assets/{SignOutScreen-CTpdoBTV.js → SignOutScreen-sgTWJDGb.js} +1 -1
- package/dist/assets/{TaskListScreen-DhR04r2N.js → TaskListScreen-BpK-8QnW.js} +1 -1
- package/dist/assets/{TaskRoutes-CmYYanF8.js → TaskRoutes-DfQABQLR.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-D1GbcIi5.js → TransactionDetailRoutes-CM3RR8SH.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DvpEF447.js → TransactionDetailScreen-BCiX38jP.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DZAOtZ-c.js → TransactionListRoutes-yuwwha-7.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BOzO02zC.js → TreasuryRoutes-CY_-R9A0.js} +1 -1
- package/dist/assets/{VendorsRoutes-D5PYGwb7.js → VendorsRoutes-k37ZPcgY.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DnV0a0Cv.js → WiseConfirmationScreen-D_U8eXIb.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DSs5E5rA.js → ZeniAccountRoutes-BYcGG-cX.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CBFFWoV4.js → ZeniAccountStatementScreen-DOb1513X.js} +1 -1
- package/dist/assets/{analyticsHelper-ZM4U1wiv.js → analyticsHelper-B-IDLpaZ.js} +1 -1
- package/dist/assets/{getLocaleForTenant-7ntdeZSs.js → getLocaleForTenant-C50EFRQ8.js} +1 -1
- package/dist/assets/{index-DmE4wSNC.js → index-DgzG0i4n.js} +5 -5
- package/dist/assets/{routePaths-BbBoI9fr.js → routePaths-WhbiYSxu.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Djdv5hKX.js → useAskAiCfoHostNavButtonProps-DQFYXydp.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-Cfhk-A1n.js → useFetchSuggestedQuestionsWhenReady-BMFUNkte.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CxCt8-bu.js → useInitialThreadRequest-C88MW4km.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DMUIu-an.js → withTransactionSidePanel-D3gZnvfm.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-CVGPqYnR.js";import{a as c}from"./sentry-vrLJXbkU.js";import{h as pe,g as a,l as We,u as qe,j as Ke,i as x}from"./core-B4ZvHvvY.js";import{eL as he,eT as Je,eU as Se,eN as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as ma,cL as fa,bu as ba,eK as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Da4VO2lv.js";import{a1 as Ea,a2 as ka,F as Ca,Z as ya,z as k,a3 as Ia,u as Ta,i as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,V as va,a7 as $a,a8 as Ba,a9 as me,aa as fe,L as Pa,ab as Ra,ac as be,c as M,q as F,ad as N,ae as xa}from"./index-
|
|
1
|
+
import{j as V}from"./liveblocks-CVGPqYnR.js";import{a as c}from"./sentry-vrLJXbkU.js";import{h as pe,g as a,l as We,u as qe,j as Ke,i as x}from"./core-B4ZvHvvY.js";import{eL as he,eT as Je,eU as Se,eN as Qe,bm as Xe,f2 as ea,eV as aa,eW as ta,eY as na,f0 as sa,fa as oa,f1 as g,f4 as ia,f5 as ue,f8 as ra,f6 as da,f7 as la,f9 as ca,cF as ua,fc as ma,cL as fa,bu as ba,eK as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-Da4VO2lv.js";import{a1 as Ea,a2 as ka,F as Ca,Z as ya,z as k,a3 as Ia,u as Ta,i as r,a4 as wa,a5 as Fa,S as Aa,a as _a,a6 as Da,V as va,a7 as $a,a8 as Ba,a9 as me,aa as fe,L as Pa,ab as Ra,ac as be,c as M,q as F,ad as N,ae as xa}from"./index-DgzG0i4n.js";import{D as Ma}from"./mui-DoY7WfR_.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="a7689274-c5c2-4c3d-8e3a-ac30b42dbc9a",m._sentryDebugIdIdentifier="sentry-dbid-a7689274-c5c2-4c3d-8e3a-ac30b42dbc9a")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),n=qe(),C=Ca(),o=Ke(),U=Qe(),f=pe(),{useFeatureGate:i}=ya(),G=k.getSignedInUser(),A=Xe(G),s=a(e=>he(e)),L=a(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=x("/:tenantEmailDomain/dashboard")!==null,z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Z),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),H=a(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=a(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&f(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=a(e=>e.tenantState),ye=a(e=>$.fetchState==="Completed"?sa(e):[]),E=a(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabledV2),K=q||W&&A,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=A||!A&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Pe=a(e=>g(e).totalUnreadCount),Re=a(e=>g(e).reducedFetchCountState),J=a(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=a(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),xe=a(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=a(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Me}=Fa();c.useEffect(()=>{const e=setTimeout(()=>Me?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;O(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&xe.fetchState==="Not-Started"&&U.tenantId!=null&&f(ia("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||f(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(f(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),f(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Re,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=a(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),K===!1&&S.push("expense_automation_card");const Ve=Aa(),oe=a(e=>da(e,S,h,q,W,w).fetchState),ie=a(e=>la(e).fetchState),Ue=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Ge=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Ge),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,Z,s),re=_a(),ze=re&&Da(n),de=fa(Ve?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&va(n.pathname)!=="treasury",[w,de,le,n.pathname,t]),[Ye,ce]=c.useState(P);c.useEffect(()=>{ce(P())},[P]);const Ze=a(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=$a(Ze);return V.jsx(Ma,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(Ba,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:fe(n),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:He,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:K&&ba(s.userRole)===!1,selectedMenu:me(n),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&Q>0?"notifications/comments":"notifications/tasks";fe(n)&&(e=J===0&&Q>0?"../../notifications/comments":"../../notifications/tasks");const u=F(n.state?.pathnameStackToGoBack,n.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=F(n.state?.pathnameStackToGoBack,n.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=F(n.state?.pathnameStackToGoBack,n.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=F(n.state?.pathnameStackToGoBack,n.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&M.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const R=xa(e.type);be(e.type)?(j!=null&&f(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${R}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{ge(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=me(n);let b=`/${encodeURIComponent(u)}/`;const R=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ra(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":R?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(f(ha(e.tenantId)),f(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;M.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{f(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`)},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:Ae,newYearAnimationEnabled:_e})})}),za=m=>{const d=pe(),t=a(C=>he(C)),n={events:t.userRoleId!=null?[`private-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Na,{...m,...n})};export{za as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-CVGPqYnR.js";import{j as r,k as i}from"./core-B4ZvHvvY.js";import{U as n}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-CVGPqYnR.js";import{j as r,k as i}from"./core-B4ZvHvvY.js";import{U as n}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import"./sentry-vrLJXbkU.js";import"./zeni-epic-state-Da4VO2lv.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.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]="8569e781-4cca-432a-a9cb-bfb8f16b11e6",o._sentryDebugIdIdentifier="sentry-dbid-8569e781-4cca-432a-a9cb-bfb8f16b11e6")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-CVGPqYnR.js";import ut from"./NotFoundScreen-
|
|
1
|
+
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-CVGPqYnR.js";import ut from"./NotFoundScreen-jPpbDlQd.js";import{a as k}from"./sentry-vrLJXbkU.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as Z}from"./core-B4ZvHvvY.js";import{cn as It,eV as K,eL as H,f9 as Ct,f1 as b,Oe as Q,f5 as d,eU as A,q7 as F,vg as Tt,Of as At,eT as yt,fc as Et,qc as _t,Og as M,bp as $,gw as x,qg as z,Oh as Nt,cy as Bt,cs as wt}from"./zeni-epic-state-Da4VO2lv.js";import{M as xt,z as Rt,Z as Ut,i as vt,J as Dt,cn as Gt,q as N,a1 as Pt,co as Mt,a2 as $t,p as Ft}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.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]="9037a9d4-aca2-462c-a09f-4410b5cd3415",t._sentryDebugIdIdentifier="sentry-dbid-9037a9d4-aca2-462c-a09f-4410b5cd3415")}catch{}})();const Vt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),qt=St(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(z("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(M([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(F("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(z("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(M([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Vt(s,B).then(()=>{t(M(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Mt)),Lt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=Rt.getSignedInUser(),[B,R]=k.useState(!1),a=S(e=>K(e)),o=S(e=>H(e)),{useFeatureGate:m}=Ut(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Dt(),{isAiCfoAccessEnabled:X,onAskAiCfoClick:Y}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),U=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:D,fetchMore:nt}=dt(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:J}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(Q(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(F("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||D===!0||C!==!0||y||D===!0||C!==!0;k.useEffect(()=>{G&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,v]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(R(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=V.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||J===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,D,W,C,J,q,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if($t(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];U==="all"?E.push("read","unread"):U!=="mentions"&&E.push(U),s(F("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:X,onAskAiCfoClick:Y,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(Z,{path:"/:selectedTab",element:_.jsx(Lt,{})}),_.jsx(Z,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
|
package/dist/assets/{PandLWithForecastRoutes-BCE_H3uV.js → PandLWithForecastRoutes-BeER1eMP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-CVGPqYnR.js";import{j as J,h as z,u as K,l as X,g as l,k as Z,n as H,o as I}from"./core-B4ZvHvvY.js";import{eL as v,pX as R,pv as ee,II as U,pq as S,bu as ae,bQ as te,pr as se,IJ as oe,It as C,dF as ne,td as re,IK as ie,tA as ce,eS as le,eQ as de}from"./zeni-epic-state-Da4VO2lv.js";import{J as me,z as fe,M as pe,S as ue,Z as M,i as w,s as he,c as $,aj as be,q as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-CVGPqYnR.js";import{j as J,h as z,u as K,l as X,g as l,k as Z,n as H,o as I}from"./core-B4ZvHvvY.js";import{eL as v,pX as R,pv as ee,II as U,pq as S,bu as ae,bQ as te,pr as se,IJ as oe,It as C,dF as ne,td as re,IK as ie,tA as ce,eS as le,eQ as de}from"./zeni-epic-state-Da4VO2lv.js";import{J as me,z as fe,M as pe,S as ue,Z as M,i as w,s as he,c as $,aj as be,q as Fe}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import ge from"./NotFoundScreen-jPpbDlQd.js";import{F as Ie}from"./FeaturePreviewScreen-C2dbroTQ.js";import{a as u}from"./sentry-vrLJXbkU.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as Se}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{t as Ae}from"./routePaths-WhbiYSxu.js";import{M as ye}from"./MobileAppDrawer-eCdBXSxf.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="b4a13926-b4b5-4ccb-9349-03bcfd94e537",s._sentryDebugIdIdentifier="sentry-dbid-b4a13926-b4b5-4ccb-9349-03bcfd94e537")}catch{}})();const A=(s,a,e)=>{s!=a&&(s!=null&&s.length>0?e(`../${a}`,{replace:!0}):e(a,{replace:!0}))},Te=Z(function(s){const a=oe(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(i=>{e[i]=o[i]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:$}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s(U(e,o)),a.isPandLReportFetched(e)||s(S(e)),A(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(ce(e))},onForecastVsActualsCompareToggle:e=>{s(ie(e)),s(C({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(re(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let i,r;const h=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(i=o.balanceTimeFrame,r=ne(o)):o.balanceTimeFrame==="year"?(i="quarter",r={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),r!=null&&i!=null){const f=Ae(a.tenantEmailDomain,e.accountId,e.accountType,h,i,r),p=Fe(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(C({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(C({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(be);function P(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=me(),e=J(),o=z(),i=K(),{forecastId:r,tenantEmailDomain:h}=X(),[f,p]=u.useState(!1),[y,T]=u.useState(!1),b=fe.getSignedInUser(),q=l(t=>v(t)),B=q.company?.companyInfo.firstMonthOfFY??1,c=l(t=>R(t.forecastState,t.forecastListState)),d=l(t=>t.forecastListState.fetchState==="Completed"),k=l(t=>t.profitAndLossState),j=l(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=pe();Se({isDataReady:d});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:_}=Ce({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});u.useEffect(()=>{if(!f&&F)p(!0),d||o(ee());else if(d&&!y){T(!0);const t=((m,E,O)=>E!=null?m.forecasts.findIndex(g=>g.id===E):O!=null?m.forecasts.findIndex(g=>g.id===O):m.forecasts.length>0?0:-1)(c,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(o(U(c.forecasts[t].id,t)),A(r,c.forecasts[t].id,e)):r==null&&t!==-1&&A(void 0,c.forecasts[t].id,e),t!==-1&&!x(c.forecasts[t].id)&&F&&o(S(c.forecasts[t].id))}},[f,p,o,d,c,y,T,R,S,F]);const D=ue(),G=D?.loggedInUserRole!=null&&ae(D.loggedInUserRole),{useFeatureGate:V}=M(),{isFeatureEnabled:W}=V(w.isReportsCommentingEnabled),[Q,Y]=u.useState(!1),L=t=>{Y(t)};return n.jsxs(n.Fragment,{children:[d?n.jsx(he,{analytics:$,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Q,handleDrawerToggle:L}),n.jsx(Te,{firstMonthOfFY:B,tenantEmailDomain:h,forecastIdFromUrlPath:r,navigate:e,location:i,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${b?.firstName}&lastname=${b?.lastName}&email=${b?.userEmail}`),hasTransactionAccess:G,isAiCfoAccessEnabled:N,onAskAiCfoClick:_,isReportsCommentingEnabled:W,onClickMenuIcon:()=>{L(!0)}})]})}function Qe(){const s=l(r=>v(r)),{useFeatureGate:a}=M(),{isFeatureEnabled:e}=a(w.isDebitCardFeatureEnabled),o=le(e,s),i=de(s);return o===!0||i===!0?n.jsx(Ie,{}):n.jsxs(H,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(ge,{})})]})}export{Qe as PandLWithForecastRoutes,Qe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVGPqYnR.js";import{ID as oe,eL as X,j6 as W,eS as J,eQ as ie,Gf as Y,Ij as re,sq as ke,IE as N,se as Pe,sz as je,st as le,si as de,sx as Le,su as Te,IF as ce,t$ as ve,IG as Fe,fw as Ae,IH as G,sn as pe,sl as ue,sC as Oe,b$ as Re}from"./zeni-epic-state-Da4VO2lv.js";import{K as me,Z as ee,i as E,z as K,a4 as ge,C as he,af as fe,ag as Ve,x as Ce,o as A,E as be,D as ye,ah as Ue,M as Ze,J as $e,s as Be,c as we,e as ze,q as Ge,ai as He,S as Me}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-CVGPqYnR.js";import{ID as oe,eL as X,j6 as W,eS as J,eQ as ie,Gf as Y,Ij as re,sq as ke,IE as N,se as Pe,sz as je,st as le,si as de,sx as Le,su as Te,IF as ce,t$ as ve,IG as Fe,fw as Ae,IH as G,sn as pe,sl as ue,sC as Oe,b$ as Re}from"./zeni-epic-state-Da4VO2lv.js";import{K as me,Z as ee,i as E,z as K,a4 as ge,C as he,af as fe,ag as Ve,x as Ce,o as A,E as be,D as ye,ah as Ue,M as Ze,J as $e,s as Be,c as we,e as ze,q as Ge,ai as He,S as Me}from"./index-DgzG0i4n.js";import{D as Se,n as _,S as De}from"./mui-DoY7WfR_.js";import te from"./NotFoundScreen-jPpbDlQd.js";import{a as l}from"./sentry-vrLJXbkU.js";import{h as se,l as We,g,j as Ke,u as _e,k as qe,n as ne,o as z}from"./core-B4ZvHvvY.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{M as Xe}from"./MobileAppDrawer-eCdBXSxf.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.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]="11eefe72-e504-4c58-b25a-e1d3bd6bbd5a",e._sentryDebugIdIdentifier="sentry-dbid-11eefe72-e504-4c58-b25a-e1d3bd6bbd5a")}catch{}})();const Je={overlayWidth:new Ce(100,100,48)},H=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=We(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>W(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=J(I,m),T=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(N()),y()},F=()=>{O===!0?w(!0):b()},Z=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:$}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:B}=C(E.isChargeCardFeatureEnabled),p=ge(m,B,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),L={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:Z,mode:h,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:$===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:H.discardTitle}),descriptionComponent:s.jsx(Ee,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...L})]})})},es=_(De)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVGPqYnR.js";import _ from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-CVGPqYnR.js";import _ from"./NotFoundScreen-jPpbDlQd.js";import{a as r}from"./sentry-vrLJXbkU.js";import{j as v,u as M,g as u,l as U,h as P,N as z,k as F,n as V,o as b}from"./core-B4ZvHvvY.js";import{eL as B,Oi as h,bn as J,bm as N,gO as H,gw as L}from"./zeni-epic-state-Da4VO2lv.js";import{F as $,z as I,J as q,cp as G}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import{u as K}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{M as W}from"./MobileAppDrawer-eCdBXSxf.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.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]="9b7b8a0a-fdab-4fa8-9e39-d3936903b2e6",e._sentryDebugIdIdentifier="sentry-dbid-9b7b8a0a-fdab-4fa8-9e39-d3936903b2e6")}catch{}})();const X=F(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),Y=()=>{const e=v(),t=M(),c=$(),o=u(a=>B(a)),{aggregatedReportViewState:n}=u(a=>h(a)),{tenantEmailDomain:m}=U(),p=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[C,w]=r.useState(!1),S=J(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,A=N(l),D=S||k||A,d=r.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const x=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),y=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=q(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=K({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),D?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:g}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:x,onTimeRangeSelect:y,handleDrawerToggle:g,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return s.jsxs(V,{children:[s.jsx(b,{path:"*",element:s.jsx(Y,{})}),s.jsx(b,{path:"*",element:s.jsx(_,{})})]})}export{Ie as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-CVGPqYnR.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-vrLJXbkU.js";import{B as dt,eL as Tc,HV as Ac,Iz as kl,bQ as Rc,b$ as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-Da4VO2lv.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Dl,n as Yt,o as ue,p as Cl}from"./utils-QMlevttK.js";import{r as un}from"./empty-u93aQEuK.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DK80DJM9.js";import{r as Gl}from"./index-CAShaDN8.js";import{r as zl}from"./index-CWllm9J4.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-B4ZvHvvY.js";import{u as Kl,z as Pc,L as Wl,W as Jl,T as Xl,h as Ql,c as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-CVGPqYnR.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-vrLJXbkU.js";import{B as dt,eL as Tc,HV as Ac,Iz as kl,bQ as Rc,b$ as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-Da4VO2lv.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Dl,n as Yt,o as ue,p as Cl}from"./utils-QMlevttK.js";import{r as un}from"./empty-u93aQEuK.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DK80DJM9.js";import{r as Gl}from"./index-CAShaDN8.js";import{r as zl}from"./index-CWllm9J4.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-B4ZvHvvY.js";import{u as Kl,z as Pc,L as Wl,W as Jl,T as Xl,h as Ql,c as tf}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import{d as Pe}from"./decodeURIComponentSafe-CC7b77eX.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="80ae9bb0-fb33-4c62-9f2a-b01cf6e4199e",t._sentryDebugIdIdentifier="sentry-dbid-80ae9bb0-fb33-4c62-9f2a-b01cf6e4199e")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Dn,Cn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},De={exports:{}},Ce={};function Nc(){if(On)return Ce;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var c,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(u,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(y&&y.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),y&&f(u,y)})(g,h);var d,b=m(g);function g(u,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(u,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function l(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(c===void 0&&(c=ie()),c(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,u,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-u.length,y)===u}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(l(e,"type"));else{var b=function(g,u,y){return typeof y!="number"&&(y=0),!(y+u.length>g.length)&&g.indexOf(u,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(l(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),Ce.codes=n,Ce}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,c(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return l(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function l(k,E,j){return l=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},l.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",u="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CVGPqYnR.js";import{a as o}from"./sentry-vrLJXbkU.js";import{g as f,j as F,h as H,u as W,k as M}from"./core-B4ZvHvvY.js";import{m as N,K as $,z as R,a$ as U,x as z,M as J,J as Y,s as q,c as l,e as G,a1 as K,b0 as Q}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-CVGPqYnR.js";import{a as o}from"./sentry-vrLJXbkU.js";import{g as f,j as F,h as H,u as W,k as M}from"./core-B4ZvHvvY.js";import{m as N,K as $,z as R,a$ as U,x as z,M as J,J as Y,s as q,c as l,e as G,a1 as K,b0 as Q}from"./index-DgzG0i4n.js";import{eW as X,eL as Z,L6 as I,L7 as ee,t3 as ae,sV as g,eY as re,bL as ne,s_ as se,L8 as te}from"./zeni-epic-state-Da4VO2lv.js";import{D as oe,e as ie,n as le,S as ce}from"./mui-DoY7WfR_.js";import{u as de}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{M as ue}from"./MobileAppDrawer-eCdBXSxf.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="80677fec-c79f-4b2c-9975-51afe8ed7168",e._sentryDebugIdIdentifier="sentry-dbid-80677fec-c79f-4b2c-9975-51afe8ed7168")}catch{}})();const pe={overlayWidth:new z(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=N(),n=$();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>X(c));return t.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:t.jsx(ie,{in:e,direction:"left",children:t.jsx(ge,{onClick:c=>c.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(ce)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CVGPqYnR.js";import x from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-CVGPqYnR.js";import x from"./NotFoundScreen-jPpbDlQd.js";import{a as p}from"./sentry-vrLJXbkU.js";import{j as I,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-B4ZvHvvY.js";import{eL as B,M0 as S,Mg as b,C0 as T,B9 as V,B$ as m,BS as U,Mv as _}from"./zeni-epic-state-Da4VO2lv.js";import{m as $,z as M,B as N,a1 as O,bF as W,aa as z}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-BVKZCEAO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="24375af8-cd2e-4c45-8ed2-9f958a017331",e._sentryDebugIdIdentifier="sentry-dbid-24375af8-cd2e-4c45-8ed2-9f958a017331")}catch{}})();const d="reimbursement-approval-rule-update",F=k(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:b(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(U(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),L=()=>{const e=I(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),v=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>B(s)),w=$(),i=u(s=>S(s)),g=u(s=>b(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&a(T())},[g]),p.useEffect(()=>{l||v!=="Not-Started"||(n(!0),a(V(!0)))},[l,v,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,P,R)=>{s.endsWith(d)&&R.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(L,{})}),t.jsx(c,{path:"/new",element:t.jsx(h,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-CVGPqYnR.js";import{a as y}from"./sentry-vrLJXbkU.js";import{j as w,h as A,u as T,l as C,g as b,k as U}from"./core-B4ZvHvvY.js";import{Mg as R,M0 as E,BV as x,C2 as _,C0 as S,C1 as h,Mh as B}from"./zeni-epic-state-Da4VO2lv.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-CVGPqYnR.js";import{a as y}from"./sentry-vrLJXbkU.js";import{j as w,h as A,u as T,l as C,g as b,k as U}from"./core-B4ZvHvvY.js";import{Mg as R,M0 as E,BV as x,C2 as _,C0 as S,C1 as h,Mh as B}from"./zeni-epic-state-Da4VO2lv.js";import{z as k,m as V,B as j,bw as F,aa as O}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="d7e38a42-cdbf-4584-9480-2aead72eba51",e._sentryDebugIdIdentifier="sentry-dbid-d7e38a42-cdbf-4584-9480-2aead72eba51")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=D.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function H(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=C(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CVGPqYnR.js";import{j as J,h as le,u as V,l as Y,g as w,N as _,k as K,i as ut,n as pt,o as B}from"./core-B4ZvHvvY.js";import{eL as W,Mw as me,b$ as ce,B4 as xe,jh as bt,Bh as ae,Bg as se,Mx as gt,bm as de,fF as Te,My as ht,IU as ft,j6 as De,IV as Se,IW as St,h$ as It,LO as yt,ie as Rt,AU as At,rO as vt,i6 as Ct,BE as je,Mz as Fe,MA as kt,MB as Et,MC as Bt,MD as wt,ME as xt,Bo as Ie,il as Tt,LX as Dt,Bi as jt,B2 as Ft,MF as Mt,B1 as Ut,MG as Lt,Ba as ye,Bs as Pt,Br as $t,Bn as _t,MH as Me,Gf as Ot,bn as Nt,Bd as zt,BW as Gt,MI as Ht,MJ as Zt,BA as Vt,Bx as Re,Lh as Wt,A$ as Jt,MK as Ue,Cj as Ae,Cr as Kt,ML as qt,MM as H,MN as Xt,MO as Le,MP as Qt,MQ as Pe,MR as $e,BM as ie,bs as Yt,bD as ue,cy as pe,eS as _e,eQ as Oe,MS as en,gw as tn,Lu as nn,MT as an,MU as Ne,Ly as sn,Mg as on,MV as rn,Mv as ln,Co as ve,Cn as mn,MW as cn,MX as dn,MY as un,MZ as pn,M_ as bn,M1 as gn,Ce as hn,Ci as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,HX as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-Da4VO2lv.js";import{F as ze,K as Ge,Z as ee,i as v,z as P,bG as He,s as te,c as C,aC as Ce,o as M,ao as Q,C as wn,D as Ze,bH as xn,q as Z,J as Ve,bI as Tn,S as ne,bJ as Dn,M as jn,x as Fn,B as be,e as We,a1 as Mn,b7 as Un,R as Ln,m as Je,bK as Pn,a4 as $n}from"./index-DmE4wSNC.js";import{n as O,S as _n}from"./mui-DoY7WfR_.js";import oe from"./NotFoundScreen-Dw_4aXSt.js";import{S as ke}from"./SetupPagesScreen-B82yEDYc.js";import{F as Ke}from"./FeaturePreviewScreen-BdQUVLIb.js";import{a as g}from"./sentry-vrLJXbkU.js";import{u as qe}from"./useInitialThreadRequest-CxCt8-bu.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-Djdv5hKX.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-Cfhk-A1n.js";import{D as On}from"./DrawerScreen-D8_xICtn.js";import{M as Ye}from"./MobileAppDrawer-DVJrG_df.js";import{R as Nn}from"./ReimbursementApprovalRoutes-C0f3WPnl.js";import{FallBackRoute as zn}from"./ScreenRoutes-_VyWuy4j.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";import"./analyticsHelper-ZM4U1wiv.js";import"./routePaths-BbBoI9fr.js";import"./BusinessVerificationPageScreen-ByeCoum9.js";import"./ReimbursementApprovalRuleDetailScreen-DWpP5dnv.js";import"./getLocaleForTenant-7ntdeZSs.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]="85e7c35d-5ddf-42ad-90b4-20d151feb23d",e._sentryDebugIdIdentifier="sentry-dbid-85e7c35d-5ddf-42ad-90b4-20d151feb23d")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Lt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ut(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Mt({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=J(),t=le(),n=V(),{reimbursementId:r}=Y(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),D=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),j=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(D&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(_,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(L=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&L.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:M.sp3,paddingBottom:"15px",paddingLeft:M.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Jn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:M.sp5,paddingRight:M.sp3,paddingBottom:M.sp5,paddingLeft:M.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:j??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=O.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CVGPqYnR.js";import{j as J,h as le,u as V,l as Y,g as w,N as _,k as K,i as ut,n as pt,o as B}from"./core-B4ZvHvvY.js";import{eL as W,Mw as me,b$ as ce,B4 as xe,jh as bt,Bh as ae,Bg as se,Mx as gt,bm as de,fF as Te,My as ht,IU as ft,j6 as De,IV as Se,IW as St,h$ as It,LO as yt,ie as Rt,AU as At,rO as vt,i6 as Ct,BE as je,Mz as Fe,MA as kt,MB as Et,MC as Bt,MD as wt,ME as xt,Bo as Ie,il as Tt,LX as Dt,Bi as jt,B2 as Ft,MF as Mt,B1 as Ut,MG as Lt,Ba as ye,Bs as Pt,Br as $t,Bn as _t,MH as Me,Gf as Ot,bn as Nt,Bd as zt,BW as Gt,MI as Ht,MJ as Zt,BA as Vt,Bx as Re,Lh as Wt,A$ as Jt,MK as Ue,Cj as Ae,Cr as Kt,ML as qt,MM as H,MN as Xt,MO as Le,MP as Qt,MQ as Pe,MR as $e,BM as ie,bs as Yt,bD as ue,cy as pe,eS as _e,eQ as Oe,MS as en,gw as tn,Lu as nn,MT as an,MU as Ne,Ly as sn,Mg as on,MV as rn,Mv as ln,Co as ve,Cn as mn,MW as cn,MX as dn,MY as un,MZ as pn,M_ as bn,M1 as gn,Ce as hn,Ci as fn,bu as Sn,bC as In,ct as yn,cN as Rn,br as An,HX as vn,cJ as Cn,cL as kn,cK as En,cs as Bn}from"./zeni-epic-state-Da4VO2lv.js";import{F as ze,K as Ge,Z as ee,i as v,z as P,bG as He,s as te,c as C,aC as Ce,o as M,ao as Q,C as wn,D as Ze,bH as xn,q as Z,J as Ve,bI as Tn,S as ne,bJ as Dn,M as jn,x as Fn,B as be,e as We,a1 as Mn,b7 as Un,R as Ln,m as Je,bK as Pn,a4 as $n}from"./index-DgzG0i4n.js";import{n as O,S as _n}from"./mui-DoY7WfR_.js";import oe from"./NotFoundScreen-jPpbDlQd.js";import{S as ke}from"./SetupPagesScreen-BJy2d6s1.js";import{F as Ke}from"./FeaturePreviewScreen-C2dbroTQ.js";import{a as g}from"./sentry-vrLJXbkU.js";import{u as qe}from"./useInitialThreadRequest-C88MW4km.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{D as On}from"./DrawerScreen-dt2KgJzx.js";import{M as Ye}from"./MobileAppDrawer-eCdBXSxf.js";import{R as Nn}from"./ReimbursementApprovalRoutes-DdJz0p5l.js";import{FallBackRoute as zn}from"./ScreenRoutes-C36ZBPGp.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";import"./analyticsHelper-B-IDLpaZ.js";import"./routePaths-WhbiYSxu.js";import"./BusinessVerificationPageScreen-B8mXcNLy.js";import"./ReimbursementApprovalRuleDetailScreen-BVKZCEAO.js";import"./getLocaleForTenant-C50EFRQ8.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]="85e7c35d-5ddf-42ad-90b4-20d151feb23d",e._sentryDebugIdIdentifier="sentry-dbid-85e7c35d-5ddf-42ad-90b4-20d151feb23d")}catch{}})();const et=e=>`/${e}/reimbursements`,Gn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ze.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=de(c),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=me(e,t.reimbursementId),p=ht(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,S=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,S=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:ce(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:S,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,p)=>{i!=null&&e(se(i,l,p,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(Pt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Lt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ut(l,i,n))},updateReimbursementType:(i,l,p)=>{e(Mt({reimbursementId:p,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,p)=>{e(Ft({reimbursementId:p,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(jt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Dt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ae({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(kt());const i=et(o),l=Z(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(je(n)))},onSaveBankAccount:()=>{a?.userId&&e(Ct(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(At(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(yt())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(xn);function Ee(){const e=J(),t=le(),n=V(),{reimbursementId:r}=Y(),c=ze(),d=Ge(),[m,o]=g.useState(r==null),[a,i]=g.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:p}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:I}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:S}=l(v.isReimbursementCommentingEnabled),x=V().pathname,R=x.includes("edit"),D=x.includes("reimbursement/new"),[b,k]=g.useState(!1),y=P.getSignedInUser(),T=w(u=>W(u)),f=w(u=>me(u,r)),j=qe(T?.companyId,{clearParams:f.fetchState==="Completed"}),$=ce(T?.userRole??[]);g.useEffect(()=>{(D&&!b||R&&f.fetchState!="Completed"&&f.fetchState!="In-Progress")&&(k(!0),t(xe(!1,p,I,r)))});const A=w(u=>bt(u.accountState,u.accountListState,"reimbursementAccountList"));if(y==null)throw Error("Can't access address page without signing in...");const F={pathname:`../${r}`,search:n.search};return f.isDeleted===!0||f.billStage=="paid"||f.billStage=="scheduled"||f.fetchState=="Not-Started"||$&&f.billStatus==="rejected"||$===!1&&f.billStage==="pending_approval"&&f.billStatus!=="rejected"?s.jsx(_,{to:F}):f.deleteStatus.fetchState==="In-Progress"||f.fetchState!=="Completed"?s.jsx(He,{}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:C,onLoad:u=>(L=>{r!=null&&f.deleteStatus.fetchState!=="Completed"&&L.trackReimbursementEditReimbursement(r)})(u)}),m&&d!=="small"?s.jsx(Vn,{}):null,m&&d!=="small"?s.jsx(Wn,{children:s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:M.sp3,paddingBottom:"15px",paddingLeft:M.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(Jn,{children:[s.jsx(Kn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(Ce,{showAutofill:m,uploadInvoiceEndPoint:`${Q.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:T?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:u=>{u!=null&&t(se(u,a,!0,r,y?.userId))},updateInvoiceUploadFetchState:u=>{t(ae({reimbursementId:r,fetchState:u}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:M.sp5,paddingRight:M.sp3,paddingBottom:M.sp5,paddingLeft:M.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(qn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:j??void 0,isReimbursementCommentingEnabled:S,location:n,navigate:e,currentTenant:T,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i})})]})}const Zn=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CVGPqYnR.js";import{u as V,j as me,h as fe,l as ue,g as f,k as _e,n as he,o as z}from"./core-B4ZvHvvY.js";import{eL as M,f7 as g,Ii as be,pp as F,iW as Ie,hY as ye,pu as Ce,bu as ge,Ij as Se,j6 as we,bm as Re,tI as Te,Ik as Fe,Il as Oe,sG as ke,Im as G,In as Ae,Io as De,Ip as R,Iq as O,Ir as k,Is as A,It as D,dF as Ee,to as Le,tc as Y,td as H,tu as Me,th as N,tA as Be,Iu as Pe,Iv as ve,Iw as xe,Ix as Ue,Iy as je,eS as Ve,eQ as ze}from"./zeni-epic-state-Da4VO2lv.js";import{G as Ge,J as Ye,K as He,Z as Q,i as E,z as Z,M as Ne,S as qe,a as $e,s as Qe,c as L,e as Ze,q as J,N as Je,Q as Ke,R as We}from"./index-DmE4wSNC.js";import"./mui-DoY7WfR_.js";import Xe from"./NotFoundScreen-Dw_4aXSt.js";import{F as ea}from"./FeaturePreviewScreen-BdQUVLIb.js";import{a as _}from"./sentry-vrLJXbkU.js";import{u as aa,a as sa,b as ta,c as oa}from"./useFetchSuggestedQuestionsWhenReady-Cfhk-A1n.js";import{u as na}from"./useInitialThreadRequest-CxCt8-bu.js";import{t as q,a as $}from"./routePaths-BbBoI9fr.js";import{M as ra}from"./MobileAppDrawer-DVJrG_df.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2a3a647d-0882-4c34-b21c-a7bedb72fd40",e._sentryDebugIdIdentifier="sentry-dbid-2a3a647d-0882-4c34-b21c-a7bedb72fd40")}catch{}})();const ia=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},la=e=>{e(ve()),e(xe()),e(Ue()),e(je())},ca=_e(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Se(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:Re(o),showAccountGroups:r===!0,isAccountingClassesEnabled:we(e),currentTenantCompanyName:a,statementEndPoint:`${We}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Pe(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Be(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(H(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(R(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(N(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Me(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(H(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Le({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ee(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return $(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=J(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:T(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(De({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",T(o.selectedReportID)),e(R("profit_and_loss_by_classes"))):(o.analytics?.trackGroupBySwitch("Accounts",T(o.selectedReportID)),e(R("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Ae({classesToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(ke())},onUpdateDisplayOrder:a=>{e(Oe(a))},onUpdateReportFormat:a=>{la(e),e(Fe(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(Te("profit_and_loss_by_classes"))}}})(Je);function da(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ye(),p=He(),u=Ke(p),a=me(),s=fe(),t=V(),{tenantEmailDomain:r}=ue(),{useFeatureGate:c}=Q(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=_.useState(!1),[B,K]=_.useState(!1),{isFeatureEnabled:P}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=f(n=>M(n)),W=v.company?.companyInfo.firstMonthOfFY??1,X=na(P?v?.companyId:void 0),C=f(n=>g(n).fetchState),ee=f(n=>be(n)),{areTenantIdsInSync:h}=Ne(),S=f(n=>n.financeStatementState.selectedReportId),ae=f(n=>g(n).isCompareModeOn),b=f(n=>g(n).filter),w=f(n=>g(n).selectedReportAndTimeframeFetchState),se=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),K(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&w.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(S){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ce(b.timeframe));break;case"balance_sheet":s(ye(b.timeframe));break;case"cash_flow":s(Ie(b.timeframe))}},[i,S,w,h]);const x=qe(),te=x?.loggedInUserRole!=null&&ge(x?.loggedInUserRole)!==!0,[oe,ne]=_.useState(!1),U=n=>{ne(n)},re=$e(),ie=ta();return function(n){const{isDataReady:le}=n,{pathname:ce}=V(),j=Ge(ce??"")==="reports",de=aa(le),pe=_.useMemo(()=>j?ia:void 0,[j]);sa({canFetchSuggestedQuestions:de,pageContexts:pe})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(Qe,{analytics:L,onLoad:n=>n.trackPageLoaded(Ze.Event.reports)}):null,d.jsx(ra,{isAppContentDrawerOpen:oe,handleDrawerToggle:U}),d.jsx(ca,{firstMonthOfFY:W,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:se,selectedReportID:S,analytics:L,filter:b,isCompareModeOn:ae,hasTransactionAccess:te,signedInUser:l,selectedReportAndTimeframeFetchState:w,handleDrawerToggle:U,reportsResyncFetchState:ee.reportsResyncFetchState,isAiCfoAccessEnabled:ie&&re&&!e,onAskAiCfoClick:()=>{if(u){const n=J(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:P,initialOpenThreadRequest:X})]})}const T=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function La(){const e=f(s=>M(s)),{useFeatureGate:o}=Q(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=Ve(p,e),a=ze(e);return u===!0||a===!0?d.jsx(ea,{}):d.jsxs(he,{children:[d.jsx(z,{path:"/",element:d.jsx(da,{})}),d.jsx(z,{path:"*",element:d.jsx(Xe,{})})]})}export{La as default};
|
|
1
|
+
import{j as d}from"./liveblocks-CVGPqYnR.js";import{u as V,j as me,h as fe,l as ue,g as f,k as _e,n as he,o as z}from"./core-B4ZvHvvY.js";import{eL as M,f7 as g,Ii as be,pp as F,iW as Ie,hY as ye,pu as Ce,bu as ge,Ij as Se,j6 as we,bm as Re,tI as Te,Ik as Fe,Il as Oe,sG as ke,Im as G,In as Ae,Io as De,Ip as R,Iq as O,Ir as k,Is as A,It as D,dF as Ee,to as Le,tc as Y,td as H,tu as Me,th as N,tA as Be,Iu as Pe,Iv as ve,Iw as xe,Ix as Ue,Iy as je,eS as Ve,eQ as ze}from"./zeni-epic-state-Da4VO2lv.js";import{G as Ge,J as Ye,K as He,Z as Q,i as E,z as Z,M as Ne,S as qe,a as $e,s as Qe,c as L,e as Ze,q as J,N as Je,Q as Ke,R as We}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import Xe from"./NotFoundScreen-jPpbDlQd.js";import{F as ea}from"./FeaturePreviewScreen-C2dbroTQ.js";import{a as _}from"./sentry-vrLJXbkU.js";import{u as aa,a as sa,b as ta,c as oa}from"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import{u as na}from"./useInitialThreadRequest-C88MW4km.js";import{t as q,a as $}from"./routePaths-WhbiYSxu.js";import{M as ra}from"./MobileAppDrawer-eCdBXSxf.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2a3a647d-0882-4c34-b21c-a7bedb72fd40",e._sentryDebugIdIdentifier="sentry-dbid-2a3a647d-0882-4c34-b21c-a7bedb72fd40")}catch{}})();const ia=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(D({resetLeftScroll:!0})),e(A({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},la=e=>{e(ve()),e(xe()),e(Ue()),e(je())},ca=_e(function(e){const o=Z.getSignedInUser(),p=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:p??""},t=g(e),r=Se(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:L,isZeniUser:Re(o),showAccountGroups:r===!0,isAccountingClassesEnabled:we(e),currentTenantCompanyName:a,statementEndPoint:`${We}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:p,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Pe(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Be(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(Y(o.firstMonthOfFY,r,l.numberOfPeriods<4?4:l.numberOfPeriods,i)),m.length>0&&e(H(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<4?4:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(R(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({numberOfPeriods:4,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(G({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(N(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(Me(o.firstMonthOfFY,a,s<4?4:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(Y(o.firstMonthOfFY,a,t<4?4:t,s)),s.length>0&&e(H(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<4?4:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Le({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<4?4:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ee(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return $(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?$(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=J(o.location.state?.pathnameStackToGoBack,o.location.pathname);p(l,{state:{pathnameStackToGoBack:i,referrer:T(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(D({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(A({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{p("../../")},onUpdateAccountViewMode:a=>{e(De({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",T(o.selectedReportID)),e(R("profit_and_loss_by_classes"))):(o.analytics?.trackGroupBySwitch("Accounts",T(o.selectedReportID)),e(R("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Ae({classesToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{e(ke())},onUpdateDisplayOrder:a=>{e(Oe(a))},onUpdateReportFormat:a=>{la(e),e(Fe(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(Te("profit_and_loss_by_classes"))}}})(Je);function da(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ye(),p=He(),u=Ke(p),a=me(),s=fe(),t=V(),{tenantEmailDomain:r}=ue(),{useFeatureGate:c}=Q(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=Z.getSignedInUser(),[i,y]=_.useState(!1),[B,K]=_.useState(!1),{isFeatureEnabled:P}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=f(n=>M(n)),W=v.company?.companyInfo.firstMonthOfFY??1,X=na(P?v?.companyId:void 0),C=f(n=>g(n).fetchState),ee=f(n=>be(n)),{areTenantIdsInSync:h}=Ne(),S=f(n=>n.financeStatementState.selectedReportId),ae=f(n=>g(n).isCompareModeOn),b=f(n=>g(n).filter),w=f(n=>g(n).selectedReportAndTimeframeFetchState),se=f(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!B&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),K(!0))},[i,B,C,h]),_.useEffect(()=>{if(i&&w.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(S){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ce(b.timeframe));break;case"balance_sheet":s(ye(b.timeframe));break;case"cash_flow":s(Ie(b.timeframe))}},[i,S,w,h]);const x=qe(),te=x?.loggedInUserRole!=null&&ge(x?.loggedInUserRole)!==!0,[oe,ne]=_.useState(!1),U=n=>{ne(n)},re=$e(),ie=ta();return function(n){const{isDataReady:le}=n,{pathname:ce}=V(),j=Ge(ce??"")==="reports",de=aa(le),pe=_.useMemo(()=>j?ia:void 0,[j]);sa({canFetchSuggestedQuestions:de,pageContexts:pe})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),d.jsxs(d.Fragment,{children:[C==="Completed"?d.jsx(Qe,{analytics:L,onLoad:n=>n.trackPageLoaded(Ze.Event.reports)}):null,d.jsx(ra,{isAppContentDrawerOpen:oe,handleDrawerToggle:U}),d.jsx(ca,{firstMonthOfFY:W,tenantEmailDomain:r,location:t,navigate:a,windowSize:p,classViewLayout:se,selectedReportID:S,analytics:L,filter:b,isCompareModeOn:ae,hasTransactionAccess:te,signedInUser:l,selectedReportAndTimeframeFetchState:w,handleDrawerToggle:U,reportsResyncFetchState:ee.reportsResyncFetchState,isAiCfoAccessEnabled:ie&&re&&!e,onAskAiCfoClick:()=>{if(u){const n=J(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:P,initialOpenThreadRequest:X})]})}const T=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function La(){const e=f(s=>M(s)),{useFeatureGate:o}=Q(),{isFeatureEnabled:p}=o(E.isDebitCardFeatureEnabled),u=Ve(p,e),a=ze(e);return u===!0||a===!0?d.jsx(ea,{}):d.jsxs(he,{children:[d.jsx(z,{path:"/",element:d.jsx(da,{})}),d.jsx(z,{path:"*",element:d.jsx(Xe,{})})]})}export{La as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CVGPqYnR.js";import{Z as j,z as w,aI as b,s as E,c as p,e as F,cy as L,i as P}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CVGPqYnR.js";import{Z as j,z as w,aI as b,s as E,c as p,e as F,cy as L,i as P}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import l from"./NotFoundScreen-jPpbDlQd.js";import{a as u}from"./sentry-vrLJXbkU.js";import{h as R,g as y,j as T,u as V,k as O,n as U,o as d}from"./core-B4ZvHvvY.js";import{eL as z,OR as C,LH as A,OS as k,t3 as Y,eY as G,OT as H,t1 as Z}from"./zeni-epic-state-Da4VO2lv.js";import{R as x}from"./ReferralListScreen-DHtLnulq.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";import"./useAskAiCfoHostNavButtonProps-DQFYXydp.js";import"./useFetchSuggestedQuestionsWhenReady-BMFUNkte.js";import"./MobileAppDrawer-eCdBXSxf.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]="1bc3a249-ea55-483b-b70e-a2a60a1671c9",e._sentryDebugIdIdentifier="sentry-dbid-1bc3a249-ea55-483b-b70e-a2a60a1671c9")}catch{}})();const q=O(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(Z())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const e=R(),[t,n]=u.useState(!1),[o,s]=u.useState(!1),r=y(i=>z(i)),c=T(),S=V(),{useDynamicConfig:g}=j(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),_=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:v}=g(b.zeniAccountsConfig),D=A(v);u.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(q,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(P.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as a,bm as os,eL as ls,eS as cs,eQ as ds,eR as ms,fC as us,eN as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,HW as hs,bu as js,HX as Us,bD as Hs,fa as Rs,bC as Ds,br as ys,cN as bs,HY as fs,HZ as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m1 as Ee,eM as pe,H_ as Bs,fh as Ie,fH as ge,fI as xe,fi as ks}from"./zeni-epic-state-Da4VO2lv.js";import{j as e}from"./liveblocks-CVGPqYnR.js";import{a as v}from"./sentry-vrLJXbkU.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-B4ZvHvvY.js";import{m as ws,u as zs,z as R,Z as Gs,a as $s,H as Ys,i as L,S as Ws,L as B,D as he,t as _,P as qs,c as X,l}from"./index-DmE4wSNC.js";import"./mui-DoY7WfR_.js";import{f as je}from"./analyticsHelper-ZM4U1wiv.js";import{t as Js}from"./getLocaleForTenant-7ntdeZSs.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="f01e063e-513c-43c7-97e6-6edc319e967c",i._sentryDebugIdIdentifier="sentry-dbid-f01e063e-513c-43c7-97e6-6edc319e967c")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-BukE-3A1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-4WQm4Az3.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-Bacb4uYZ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-DZAOtZ-c.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-CvdvJ0Av.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-u2KAi2M5.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-BaWxIhbQ.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-DdGI7aN1.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-CFti2QGS.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-BOzO02zC.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-D5PYGwb7.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-DSs5E5rA.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-u2KAi2M5.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-CsjRlbPP.js"),__vite__mapDeps([45,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-DdGI7aN1.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-BCE_H3uV.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,18,9,10,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-CA_SL4If.js"),__vite__mapDeps([47,1,2,3,22,4,5,6,7,14,48,49,50,51,52,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-D5PYGwb7.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-D1GbcIi5.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-DUxU9PLN.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-BukE-3A1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>a(()=>import("./BillPayRoutes-4WQm4Az3.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-CvdvJ0Av.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20]))),Re=l(()=>a(()=>import("./ReimbursementRoutes-Bacb4uYZ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-DSs5E5rA.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-BOzO02zC.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-DZAOtZ-c.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-BaWxIhbQ.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-CCiEyTtK.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-D1lBptE4.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-CFti2QGS.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-CSkXXFxN.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-CmYYanF8.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-BlJgIDQk.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,43,20]))),b=l(()=>a(()=>import("./NotFoundScreen-Dw_4aXSt.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-DhR04r2N.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),y=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,ye]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),be=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=R.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:y,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&y!=null){const n=Q.params.selectedPeriod;if(n!=null){const H=n.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,y]),v.useEffect(()=>{N||(ye(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s){if(pe(H?.userId,H?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=R.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");n==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,y,h,f,U))},[y,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):E==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,y,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&ys(A?.loggedInUserRoleMap),Ke=me&&bs(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?y==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:be?e.jsx(_a,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(b,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,Za as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B9_-_tPb.js","assets/sentry-vrLJXbkU.js","assets/core-B4ZvHvvY.js","assets/zeni-epic-state-Da4VO2lv.js","assets/index-DgzG0i4n.js","assets/mui-DoY7WfR_.js","assets/analytics-BL0geQNn.js","assets/utils-QMlevttK.js","assets/withTransactionSidePanel-D3gZnvfm.js","assets/useAskAiCfoHostNavButtonProps-DQFYXydp.js","assets/useFetchSuggestedQuestionsWhenReady-BMFUNkte.js","assets/TransactionDetailScreen-BCiX38jP.js","assets/decodeURIComponentSafe-CC7b77eX.js","assets/routePaths-WhbiYSxu.js","assets/NotFoundScreen-jPpbDlQd.js","assets/analyticsHelper-B-IDLpaZ.js","assets/CompanyPassportScreen-BCPm2c8T.js","assets/MobileAppDrawer-eCdBXSxf.js","assets/FeaturePreviewScreen-C2dbroTQ.js","assets/ReferralListScreen-DHtLnulq.js","assets/index-D-vub4_t.css","assets/BillPayRoutes-CWbI-3lu.js","assets/AddressScreen-B-90Ns9M.js","assets/DomesticWireDetailScreen-DCV6HQRp.js","assets/useInitialThreadRequest-C88MW4km.js","assets/DrawerScreen-dt2KgJzx.js","assets/SetupPagesScreen-BJy2d6s1.js","assets/BusinessVerificationPageScreen-B8mXcNLy.js","assets/BillPayApprovalRoutes-BeaWY9ga.js","assets/ReimbursementApprovalRuleDetailScreen-BVKZCEAO.js","assets/getLocaleForTenant-C50EFRQ8.js","assets/ReimbursementRoutes--zV8t9-V.js","assets/ReimbursementApprovalRoutes-DdJz0p5l.js","assets/TransactionListRoutes-yuwwha-7.js","assets/ZeniAccountStatementScreen-DOb1513X.js","assets/SettingsRoutes-BZwjpejF.js","assets/accountMappingHelper-GgTLtZGv.js","assets/ReportsRoutes-CRufLdv_.js","assets/ChargeCardRoutes-Bgdfn44a.js","assets/PeopleRoutes-5oajZHVV.js","assets/ExpenseAutomationRoutes-D8G_zp8f.js","assets/TreasuryRoutes-CY_-R9A0.js","assets/VendorsRoutes-k37ZPcgY.js","assets/pathToGoBack-BDUkHX_e.js","assets/ZeniAccountRoutes-BYcGG-cX.js","assets/AddressRoutes-D2Yn8dXr.js","assets/PandLWithForecastRoutes-BeER1eMP.js","assets/CustomerOnboardingRoutes-D-_60rGa.js","assets/QBOConnectionScreen-B4Rcl2XA.js","assets/empty-u93aQEuK.js","assets/index-CAShaDN8.js","assets/url-CcUoq1OV.js","assets/index-CWllm9J4.js","assets/TransactionDetailRoutes-CM3RR8SH.js","assets/EntityDetailRoutes-CINCnbfR.js","assets/NotificationRoutes-CxWKZNsp.js","assets/PerformanceRoutes-D2L3CFvV.js","assets/RewardsRoutes-CJ6LAavD.js","assets/TaskRoutes-DfQABQLR.js","assets/TaskListScreen-BpK-8QnW.js","assets/AiCfoScreen-BR8PoUmU.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bm as os,eL as ls,eS as cs,eQ as ds,eR as ms,fC as us,eN as _s,cM as Ae,ct as As,f8 as Es,cl as ps,bB as Is,bp as gs,fd as xs,v as Ts,HW as hs,bu as js,HX as Us,bD as Hs,fa as Rs,bC as Ds,br as ys,cN as bs,HY as fs,HZ as Cs,cJ as vs,cL as Os,cK as Ps,cs as Fs,cy as Ls,m1 as Ee,eM as pe,H_ as Bs,fh as Ie,fH as ge,fI as xe,fi as ks}from"./zeni-epic-state-Da4VO2lv.js";import{j as e}from"./liveblocks-CVGPqYnR.js";import{a as v}from"./sentry-vrLJXbkU.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-B4ZvHvvY.js";import{m as ws,u as zs,z as R,Z as Gs,a as $s,H as Ys,i as L,S as Ws,L as B,D as he,t as _,P as qs,c as X,l}from"./index-DgzG0i4n.js";import"./mui-DoY7WfR_.js";import{f as je}from"./analyticsHelper-B-IDLpaZ.js";import{t as Js}from"./getLocaleForTenant-C50EFRQ8.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="f01e063e-513c-43c7-97e6-6edc319e967c",i._sentryDebugIdIdentifier="sentry-dbid-f01e063e-513c-43c7-97e6-6edc319e967c")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-B9_-_tPb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>a(()=>import("./BillPayRoutes-CWbI-3lu.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>a(()=>import("./ReimbursementRoutes--zV8t9-V.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20])),transactions:()=>a(()=>import("./TransactionListRoutes-yuwwha-7.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>a(()=>import("./SettingsRoutes-BZwjpejF.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20])),reports:()=>a(()=>import("./ReportsRoutes-CRufLdv_.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-Bgdfn44a.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>a(()=>import("./PeopleRoutes-5oajZHVV.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-D8G_zp8f.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>a(()=>import("./TreasuryRoutes-CY_-R9A0.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>a(()=>import("./VendorsRoutes-k37ZPcgY.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-BYcGG-cX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>a(()=>import("./ReportsRoutes-CRufLdv_.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),ea=l(()=>a(()=>import("./AddressRoutes-D2Yn8dXr.js"),__vite__mapDeps([45,1,2,3,22,4,5,6,7,14,20]))),sa=l(()=>a(()=>import("./PeopleRoutes-5oajZHVV.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,14,9,10,17,20]))),aa=l(()=>a(()=>import("./PandLWithForecastRoutes-BeER1eMP.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,18,9,10,13,17,20]))),na=l(()=>a(()=>import("./CustomerOnboardingRoutes-D-_60rGa.js"),__vite__mapDeps([47,1,2,3,22,4,5,6,7,14,48,49,50,51,52,12,20]))),ta=l(()=>a(()=>import("./VendorsRoutes-k37ZPcgY.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,22,14,18,13,43,9,10,17,25,36,20]))),ia=l(()=>a(()=>import("./TransactionDetailRoutes-CM3RR8SH.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>a(()=>import("./EntityDetailRoutes-CINCnbfR.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),ra=l(()=>a(()=>import("./DashboardRoutes-B9_-_tPb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>a(()=>import("./BillPayRoutes-CWbI-3lu.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),oa=l(()=>a(()=>import("./SettingsRoutes-BZwjpejF.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,28,29,32,20]))),Re=l(()=>a(()=>import("./ReimbursementRoutes--zV8t9-V.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,24,9,10,25,32,29,30,20]))),la=l(()=>a(()=>import("./ZeniAccountRoutes-BYcGG-cX.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),ca=l(()=>a(()=>import("./TreasuryRoutes-CY_-R9A0.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),da=l(()=>a(()=>import("./TransactionListRoutes-yuwwha-7.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),ma=l(()=>a(()=>import("./ChargeCardRoutes-Bgdfn44a.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),ua=l(()=>a(()=>import("./NotificationRoutes-CxWKZNsp.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),_a=l(()=>a(()=>import("./PerformanceRoutes-D2L3CFvV.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),Aa=l(()=>a(()=>import("./ExpenseAutomationRoutes-D8G_zp8f.js"),__vite__mapDeps([40,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),Ea=l(()=>a(()=>import("./RewardsRoutes-CJ6LAavD.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),pa=l(()=>a(()=>import("./TaskRoutes-DfQABQLR.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),Ia=l(()=>a(()=>import("./AiCfoScreen-BR8PoUmU.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,43,20]))),b=l(()=>a(()=>import("./NotFoundScreen-jPpbDlQd.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),ga=l(()=>a(()=>import("./TaskListScreen-BpK-8QnW.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function Za({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),y=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,ye]=v.useState(!1),r=z(n=>ls(n)),{useFeatureGate:P}=Gs(),K=$s(),be=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(n=>n.tenantState.fetchState),E=z(n=>n.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(n=>us(n));if(o!=null){const n=R.getSignedInUserTenant(o);h!=null&&n!=null&&je(h,r,S)}const w={tenantId:y,userId:h?.userId,sessionId:h?.zeniSessionId},ae=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ne=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>w.tenantId!=null?Es(n,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&y!=null){const n=Q.params.selectedPeriod;if(n!=null){const H=n.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,y]),v.useEffect(()=>{N||(ye(!0),f(B.TENANT_FETCHING)),ne.current?ne.current=!1:!Ts(ae,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s){if(pe(H?.userId,H?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=R.getSignedInUserTenantWithId(n.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ae,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(Ie(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(W){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");n==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,y,h,f,U))},[y,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):E==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,y,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(n=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),We=Pe&&Ye===!0&&!C,qe=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&ys(A?.loggedInUserRoleMap),Ke=me&&bs(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=We&&I,as=oe&&g,ns=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?y==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(xa,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(ra,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ns||F?e.jsx(sa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(aa,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(na,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(ia,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(da,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(ga,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(pa,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(ea,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(la,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(ca,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:be?e.jsx(_a,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(Aa,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(ua,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(ta,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(oa,{hasAdminLevelAccess:de}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:as?e.jsx(ma,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(Ea,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(Ia,{isFileUploadEnabled:Ve}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const xa=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Ua,{tenantEmailDomain:O}):S?e.jsx(ja,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(Ta,{tenantEmailDomain:O}):e.jsx(b,{}),Ta=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,Za as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-CVGPqYnR.js";import{a as u}from"./sentry-vrLJXbkU.js";import{j as T,u as R,h as P,g as m,k as _,l as V,n as H,o as C}from"./core-B4ZvHvvY.js";import{bm as ye,eL as k,gp as ie,JT as Ie,j6 as ce,lp as Ce,gr as xe,JV as Ae,JU as Ee,Mi as je,wG as ke,B9 as we,LT as Pe,M0 as ve,b$ as le,cD as Me,cE as De,I7 as Ue,Mj as Te,I8 as Fe,v6 as Re,Mk as _e,Dp as Ve,AR as Be,AI as re,AF as Le,va as de,AL as ue,AO as pe,AU as X,rO as Y,v9 as Oe,iK as W,iN as ge,Ml as Ne,jO as $e,vp as ze,IO as Ge,IP as Ze,iI as Ke,Mm as Je,iL as qe,Mn as Qe,vm as He,Mo as We,Mp as Xe,B6 as Ye,eQ as me,eS as fe,Mq as en,fv as nn,Ij as tn,vl as te,fA as ae,fz as an,vk as sn,fy as on,fx as cn,Mr as ln,eV as he,Ms as rn,Mt as dn,vs as un,vj as se,Mu as pn,fc as gn,vg as mn,bS as fn,b_ as hn,bZ as bn,bT as Sn,bX as yn,bW as In,bV as Cn,bY as xn,bU as An}from"./zeni-epic-state-Da4VO2lv.js";import{Z as ee,i as D,z as x,aa as be,bx as En,c as z,e as jn,S as B,B as ne,by as kn,bz as wn,al as Pn,h as Se,bA as vn,bB as Mn,bC as Dn,a4 as Un,M as Tn,bD as Fn,q as Rn,bE as _n}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-CVGPqYnR.js";import{a as u}from"./sentry-vrLJXbkU.js";import{j as T,u as R,h as P,g as m,k as _,l as V,n as H,o as C}from"./core-B4ZvHvvY.js";import{bm as ye,eL as k,gp as ie,JT as Ie,j6 as ce,lp as Ce,gr as xe,JV as Ae,JU as Ee,Mi as je,wG as ke,B9 as we,LT as Pe,M0 as ve,b$ as le,cD as Me,cE as De,I7 as Ue,Mj as Te,I8 as Fe,v6 as Re,Mk as _e,Dp as Ve,AR as Be,AI as re,AF as Le,va as de,AL as ue,AO as pe,AU as X,rO as Y,v9 as Oe,iK as W,iN as ge,Ml as Ne,jO as $e,vp as ze,IO as Ge,IP as Ze,iI as Ke,Mm as Je,iL as qe,Mn as Qe,vm as He,Mo as We,Mp as Xe,B6 as Ye,eQ as me,eS as fe,Mq as en,fv as nn,Ij as tn,vl as te,fA as ae,fz as an,vk as sn,fy as on,fx as cn,Mr as ln,eV as he,Ms as rn,Mt as dn,vs as un,vj as se,Mu as pn,fc as gn,vg as mn,bS as fn,b_ as hn,bZ as bn,bT as Sn,bX as yn,bW as In,bV as Cn,bY as xn,bU as An}from"./zeni-epic-state-Da4VO2lv.js";import{Z as ee,i as D,z as x,aa as be,bx as En,c as z,e as jn,S as B,B as ne,by as kn,bz as wn,al as Pn,h as Se,bA as vn,bB as Mn,bC as Dn,a4 as Un,M as Tn,bD as Fn,q as Rn,bE as _n}from"./index-DgzG0i4n.js";import{n as U}from"./mui-DoY7WfR_.js";import{M as v}from"./MobileAppDrawer-eCdBXSxf.js";import{a as N,g as $,m as Vn}from"./accountMappingHelper-GgTLtZGv.js";import{t as Bn,A as Ln}from"./AddressScreen-B-90Ns9M.js";import F from"./NotFoundScreen-jPpbDlQd.js";import{g as On}from"./analyticsHelper-B-IDLpaZ.js";import{B as Nn}from"./BusinessVerificationPageScreen-B8mXcNLy.js";import{C as $n}from"./CompanyPassportScreen-BCPm2c8T.js";import{B as zn}from"./BillPayApprovalRoutes-BeaWY9ga.js";import{R as Gn}from"./ReimbursementApprovalRoutes-DdJz0p5l.js";import"./recharts-DNFnaP_v.js";import"./lottie-B5aSI3Li.js";import"./analytics-BL0geQNn.js";import"./plaid-C1RHGEem.js";import"./dnd-B2_m6pRT.js";import"./stripe-DMRn4zHo.js";import"./lexical-DA5yMmPj.js";import"./pdf-ChIJqwGf.js";import"./utils-QMlevttK.js";import"./routePaths-WhbiYSxu.js";import"./ReimbursementApprovalRuleDetailScreen-BVKZCEAO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="5ac58da5-0d96-4880-bd19-5115e0cda99a",e._sentryDebugIdIdentifier="sentry-dbid-5ac58da5-0d96-4880-bd19-5115e0cda99a")}catch{}})();const Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|