@zeniai/web-app-ui 5.0.54-prod → 5.0.54-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-Ct3N3W-B.js +1 -0
- package/dist/assets/{AddressScreen-B-AD_DEl.js → AddressScreen-ChjeKEBH.js} +1 -1
- package/dist/assets/{AiCfoScreen-CitBE3H-.js → AiCfoScreen-Bn1ZDZwq.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-97belWvM.js → BillPayApprovalRoutes-DrVfWwhS.js} +1 -1
- package/dist/assets/{BillPayRoutes-CrF5DGeF.js → BillPayRoutes-BjdJSzTb.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Klzui3Ay.js → BusinessVerificationPageScreen-AcNcSrfm.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CTV6XVqo.js → ChargeCardRoutes-BZ-GpRol.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CPxUiJ6G.js → CompanyPassportScreen--lpPP9CU.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CZMWWdk9.js → ConnectionAuthScreen-HswO-C2z.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-GS886dgA.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DJGHQLX_.js → CustomerOnboardingRoutes-BsfNG_4M.js} +1 -1
- package/dist/assets/{DashboardRoutes-5IYx4gJB.js → DashboardRoutes-C4CcYbYI.js} +1 -1
- package/dist/assets/{DefaultTenantHome-ULtjl18X.js → DefaultTenantHome-G20Laxjh.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Bd7KvtsM.js → DomesticWireDetailScreen-ChnkS-X_.js} +1 -1
- package/dist/assets/{DrawerScreen-B_RZnVqT.js → DrawerScreen-CeA1faKQ.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-dxOu1Hf3.js → EntityDetailRoutes-CR2Mdgzj.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-C8Ay3B61.js → ExpenseAutomationRoutes-B566g1Vp.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BDfm50zt.js → FeaturePreviewScreen-CCmVMubZ.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CQb9y1lK.js → MagicLinkRoutes-BTJQzdvS.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-C_dIjFCy.js → MagicLinkSignInScreen-Bt05nG5m.js} +1 -1
- package/dist/assets/{MobileAppDrawer-B3HfC0JN.js → MobileAppDrawer-C7qAXiy5.js} +1 -1
- package/dist/assets/NotFoundScreen-C3kD1egL.js +1 -0
- package/dist/assets/{NotificationRoutes-DwHr5EyY.js → NotificationRoutes-BL6Ye5sk.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CHmdjBmk.js → PandLWithForecastRoutes-Do8X3aTE.js} +1 -1
- package/dist/assets/{PeopleRoutes-B_tlRT8m.js → PeopleRoutes-hAxuAtgj.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DvrpuYDP.js → PerformanceRoutes-CoYX1bLH.js} +1 -1
- package/dist/assets/{Preview-CnWvV76v.js → Preview-Dd1RgxSx.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-emOuNpzS.js → QBOConnectionScreen-CwcXMmNE.js} +1 -1
- package/dist/assets/{ReferralListScreen-y5ajTEA5.js → ReferralListScreen-ChBnSKTx.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-D9uECzRU.js → ReimbursementApprovalRoutes-CifzxX44.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BlgmeQtP.js → ReimbursementApprovalRuleDetailScreen-BoCrHkhT.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DLUiNzD5.js → ReimbursementRoutes-BhSlMM0p.js} +1 -1
- package/dist/assets/{ReportsRoutes-C4wGGusk.js → ReportsRoutes-R-2ogc4m.js} +1 -1
- package/dist/assets/{RewardsRoutes-CrlGPx4r.js → RewardsRoutes-DfIrbqL5.js} +1 -1
- package/dist/assets/{ScreenRoutes-CtoYHwrw.js → ScreenRoutes-BeF5_NIp.js} +2 -2
- package/dist/assets/{SettingsRoutes-BdRQ_Y4f.js → SettingsRoutes-BWvITHR2.js} +1 -1
- package/dist/assets/{SetupPagesScreen-AVggUp_5.js → SetupPagesScreen-JUPsQ0S4.js} +1 -1
- package/dist/assets/{SignInScreen-B8atLOJn.js → SignInScreen-u7i70eJz.js} +1 -1
- package/dist/assets/{SignOutScreen-9Lu_zGRi.js → SignOutScreen-CHQKEgxw.js} +1 -1
- package/dist/assets/{TaskListScreen-CgABR7QN.js → TaskListScreen-CMvx-0XC.js} +1 -1
- package/dist/assets/{TaskRoutes-D_nyBAKX.js → TaskRoutes-DHBPZIrq.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-BPCCZduy.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CJewbyMB.js → TransactionDetailScreen-B-hqlTRL.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Bx5iFIs_.js → TransactionListRoutes-CtcO3OOT.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BQmeQuBt.js → TreasuryRoutes-KBaLMYzC.js} +1 -1
- package/dist/assets/{VendorsRoutes-Vhwrfw0b.js → VendorsRoutes-DQ6Ab1QZ.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CdivA-gW.js → WiseConfirmationScreen-D789SzxE.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BALd8eWD.js → ZeniAccountRoutes-DXq3JSQF.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CYkuvQ0b.js → ZeniAccountStatementScreen-K6t_uhF6.js} +1 -1
- package/dist/assets/{accountMappingHelper-BBhjUYgQ.js → accountMappingHelper-Bcmi4v71.js} +1 -1
- package/dist/assets/{analytics-D_5Z3Bft.js → analytics-zC4vJBLG.js} +1 -1
- package/dist/assets/{analyticsHelper-DyuXeTen.js → analyticsHelper-CYuyeE-z.js} +1 -1
- package/dist/assets/{core-B4p4VAKV.js → core-sRr8O2Ja.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DYdEPub3.js → decodeURIComponentSafe-DfA0P9Xn.js} +1 -1
- package/dist/assets/{dnd-2RJYpz-H.js → dnd-CZEKCPsp.js} +1 -1
- package/dist/assets/{empty-CPQtDJj3.js → empty-CA_4wgdA.js} +1 -1
- package/dist/assets/{empty-DAvdfDyF.js → empty-CwKXvn2c.js} +1 -1
- package/dist/assets/{emptyVideoElement-Dj1mKiqb.js → emptyVideoElement-SkqYxom1.js} +1 -1
- package/dist/assets/{epic-CaeJH8v4.js → epic-C5JPN_0a.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DhWTlpsv.js → getLocaleForTenant-CUETA9qT.js} +1 -1
- package/dist/assets/{index-BK5GEtz5.js → index-B53H88q7.js} +1 -1
- package/dist/assets/{index-DYV4bUyQ.js → index-B8scoeQA.js} +7 -7
- package/dist/assets/{index-BKc2EIMy.js → index-BWlUPwOb.js} +1 -1
- package/dist/assets/{index-DCmf1vNn.js → index-BnBIcb2M.js} +1 -1
- package/dist/assets/{index-DJCl9Rcj.js → index-CkGuUxlY.js} +1 -1
- package/dist/assets/{index-CIB6r-91.js → index-Cu-Qhunl.js} +2 -2
- package/dist/assets/{index-Fu0XGoyo.js → index-DatNfK53.js} +1 -1
- package/dist/assets/{lexical-DaSYsDzE.js → lexical-CtDGfH8b.js} +1 -1
- package/dist/assets/{liveblocks-BHFBttZH.js → liveblocks-XXI3_E1y.js} +1 -1
- package/dist/assets/{lottie-B6BwA9Yv.js → lottie-CbW-xVFB.js} +1 -1
- package/dist/assets/{mui-DXgGaTBw.js → mui-CL-iXERd.js} +1 -1
- package/dist/assets/{pathToGoBack-caXqY2F0.js → pathToGoBack-DHgKJexU.js} +1 -1
- package/dist/assets/{pdf-CUWjg6CX.js → pdf-BVi8zWaH.js} +3 -3
- package/dist/assets/{pdf-lib-DUKjn0X-.js → pdf-lib-Dkp2Hlcw.js} +1 -1
- package/dist/assets/{plaid-DA0irZU8.js → plaid-BUQgPXGQ.js} +1 -1
- package/dist/assets/{pusher-C1hu3AiJ.js → pusher-DAE3v-KB.js} +1 -1
- package/dist/assets/{react-dU9yTGRs.js → react-Bsc5-Np9.js} +1 -1
- package/dist/assets/{react-CkRN94qv.js → react-C8RqDmaV.js} +1 -1
- package/dist/assets/{react-DBOdo0Go.js → react-CMgbSfhl.js} +1 -1
- package/dist/assets/{react-Bv9WlXDA.js → react-CdSc8RjC.js} +1 -1
- package/dist/assets/{react-Bew-HHQZ.js → react-D4LK66mF.js} +1 -1
- package/dist/assets/{react-BwmDmR1Q.js → react-DQEvqRaf.js} +1 -1
- package/dist/assets/{recharts-B76Il_DX.js → recharts-z_5Sq5F0.js} +1 -1
- package/dist/assets/{routePaths-MPc-kidK.js → routePaths-0yQK7ZVo.js} +1 -1
- package/dist/assets/{sentry-BX-72dHr.js → sentry-DrlL61Aq.js} +1 -1
- package/dist/assets/{url-ijuzzWTi.js → url-CnXg07em.js} +1 -1
- package/dist/assets/{url-u0_y88C4.js → url-D3wKu-Ai.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DHVw5NsC.js → useAskAiCfoHostNavButtonProps-Bt4hMVmk.js} +1 -1
- package/dist/assets/{useDeviceId-gE4dosO7.js → useDeviceId-D2RgNqNP.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-B0XJlg5L.js → useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DT-JjJGy.js → useInitialThreadRequest-oa3yZUCF.js} +1 -1
- package/dist/assets/{utils-CxE_gCmS.js → utils-DCRx3jP7.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DC1a4qVn.js → withTransactionSidePanel-CiVcMng7.js} +1 -1
- package/dist/assets/{zeni-epic-state-BEVUvW5L.js → zeni-epic-state-BlOBva0w.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-C8vcaV5i.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Ba7aKJnn.js +0 -1
- package/dist/assets/NotFoundScreen-DPKM8ZjP.js +0 -1
- package/dist/assets/TransactionDetailRoutes-Bm5nQ103.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-
|
|
1
|
+
import{j as U}from"./liveblocks-XXI3_E1y.js";import{a as c}from"./sentry-DrlL61Aq.js";import{h as pe,g as t,l as We,u as Xe,j as qe,i as M}from"./core-sRr8O2Ja.js";import{eN as he,eU as Je,eV as Se,eP as Ke,bn as Qe,f2 as ea,eW as aa,eX as ta,eZ 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,cH as ua,fc as fa,cN as ma,bv as ba,eM as pa,fh as ha,fi as Sa,fg as ga}from"./zeni-epic-state-BlOBva0w.js";import{a1 as Ea,a2 as ka,x as Ca,a as ya,z as k,a3 as Ia,u as Ta,p as r,a4 as wa,a5 as Aa,A as Fa,c as _a,a6 as Da,Y as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Ga,ab as xa,ac as be,d as R,s as A,ad as N,ae as Ma}from"./index-B8scoeQA.js";import{D as Ra}from"./mui-CL-iXERd.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="9a1b3699-87a7-4130-940a-424fae808f6e",f._sentryDebugIdIdentifier="sentry-dbid-9a1b3699-87a7-4130-940a-424fae808f6e")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=We(),a=Xe(),C=Ca(),o=qe(),V=Ke(),m=pe(),{useFeatureGate:i}=ya(),P=k.getSignedInUser(),F=Qe(P),s=t(e=>he(e)),L=t(e=>ea(e)),j=L.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,H),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),Z=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||W&&F,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=F||!F&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Ge=t(e=>g(e).totalUnreadCount),xe=t(e=>g(e).reducedFetchCountState),J=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Re}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&Q!=null){const e=`dashboard_${s.companyId}`;O(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:xe,count:Ge},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(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"),q===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=t(e=>da(e,S,h,X,W,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Pe=c.useMemo(()=>ca(s.userRole),[s.userRole]),Le=ua(Pe),je=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&Z.fetchState==="Completed"&&fa(Z.notificationSettings,h.userEmail,H,s),re=_a(),ze=re&&Da(a),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[Ye,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const He=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ze=$a(He);return U.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:P,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:Le,isZeniAccountEnabled:Y,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:Ze,isTreasuryPopupVisible:Ye,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:je,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=A(a.state?.pathnameStackToGoBack,a.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Ma(e.type);be(e.type)?(j!=null&&m(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ga.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":xa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...a})};export{za as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-XXI3_E1y.js";import{j as r,k as i}from"./core-sRr8O2Ja.js";import{W as n}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import"./sentry-DrlL61Aq.js";import"./zeni-epic-state-BlOBva0w.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="fe0dc2e3-d6a3-4690-8e18-122b6c1ede12",o._sentryDebugIdIdentifier="sentry-dbid-fe0dc2e3-d6a3-4690-8e18-122b6c1ede12")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(d,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-
|
|
1
|
+
import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-XXI3_E1y.js";import ut from"./NotFoundScreen-C3kD1egL.js";import{a as k}from"./sentry-DrlL61Aq.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 L}from"./core-sRr8O2Ja.js";import{cp as It,eW as K,eN as Q,f9 as Ct,f1 as b,OG as X,f5 as d,eV as A,qr as $,vF as Tt,OH as At,eU as yt,fc as Et,qw as _t,OI as F,bq as M,gC as x,qA as H,OJ as Nt,cA as Bt,cu as wt}from"./zeni-epic-state-BlOBva0w.js";import{M as xt,z as Rt,a as Ut,p as vt,K as Dt,cq as Gt,s as N,a1 as Pt,cr as Ft,a2 as Mt,r as $t}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="04897a73-d274-4dac-8726-9b4c6e1be9fb",t._sentryDebugIdIdentifier="sentry-dbid-04897a73-d274-4dac-8726-9b4c6e1be9fb")}catch{}})();const qt=(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)})}),Vt=St(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(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(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],M())));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(X(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($("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],M())))})).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")),qt(s,B).then(()=>{t(F(s,M())),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=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ft)),Wt=()=>{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=>Q(e)),{useFeatureGate:m}=Ut(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Dt(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=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:q,isLoading:V,fetchMore:W,isFetchingMore:z,hasFetchedAll:J}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(X(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($("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&&V===!1&&w!=null&&q!=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=q.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||J===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,D,z,C,J,V,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Mt(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($("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(Vt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(L,{path:"/:selectedTab",element:_.jsx(Wt,{})}),_.jsx(L,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
|
package/dist/assets/{PandLWithForecastRoutes-CHmdjBmk.js → PandLWithForecastRoutes-Do8X3aTE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-XXI3_E1y.js";import{j as K,h as Z,u as H,l as Q,g as d,k as X,n as ee,o as C}from"./core-sRr8O2Ja.js";import{eN as M,qf as v,pP as ae,J8 as $,pK as y,bv as te,bn as se,bR as oe,pL as re,J9 as ne,IV as T,dB as ie,tC as ce,Ja as le,tZ as de,eT as me,eR as fe}from"./zeni-epic-state-BlOBva0w.js";import{K as pe,z as ue,M as he,A as ge,a as w,p as N,y as Fe,d as B,aj as be,s as Ie}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import Ce from"./NotFoundScreen-C3kD1egL.js";import{F as Te}from"./FeaturePreviewScreen-CCmVMubZ.js";import{a as h}from"./sentry-DrlL61Aq.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{c as Ae}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{u as Se}from"./useInitialThreadRequest-oa3yZUCF.js";import{t as ke}from"./routePaths-0yQK7ZVo.js";import{M as xe}from"./MobileAppDrawer-C7qAXiy5.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="604d62c1-c027-45ce-a8a6-2bca61ff094b",s._sentryDebugIdIdentifier="sentry-dbid-604d62c1-c027-45ce-a8a6-2bca61ff094b")}catch{}})();const A=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!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:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(y(e)),A(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const g=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const f=ke(a.tenantEmailDomain,e.accountId,e.accountType,g,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(T({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(be);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=K(),o=Z(),r=H(),{forecastId:i,tenantEmailDomain:g}=Q(),[f,p]=h.useState(!1),[F,S]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),q=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>x.pandLByForecastID[t]!=null&&re(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=he();Ae({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:_}=ye({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&b)p(!0),l||o(ae());else if(l&&!F){S(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(I=>I.id===R):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o($(c.forecasts[t].id,t)),A(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&A(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&b&&o(y(c.forecasts[t].id))}},[f,p,o,l,c,F,S,v,y,b]);const L=ge(),V=L?.loggedInUserRole!=null&&te(L.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:E}=W(N.isReportsCommentingEnabled),Y=Se(E?k?.companyId:void 0,{clearParams:l&&F}),[J,z]=h.useState(!1),O=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(xe,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:q,tenantEmailDomain:g,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Ze(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(N.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Te,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-XXI3_E1y.js";import{J3 as oe,eN as X,jq as H,eT as Q,eR as ie,GE as Y,II as re,sK as ke,J4 as q,sy as Pe,sT as je,sN as le,sC as de,sR as Te,sO as Le,J5 as ce,uo as ve,J6 as Fe,fw as Ae,J7 as K,sH as pe,sF as ue,sW as Oe,c0 as Re}from"./zeni-epic-state-BlOBva0w.js";import{q as me,a as ee,p as E,z as W,a4 as ge,G as fe,af as he,ag as Ve,E as Ce,o as A,I as be,D as ye,ah as Ue,M as Be,K as Ze,y as $e,d as we,f as Ge,s as Ke,ai as _e,A as ze}from"./index-B8scoeQA.js";import{D as Se,n as M,S as De}from"./mui-CL-iXERd.js";import te from"./NotFoundScreen-C3kD1egL.js";import{a as l}from"./sentry-DrlL61Aq.js";import{h as se,l as He,g,j as We,u as Me,k as Je,n as ne,o as G}from"./core-sRr8O2Ja.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{M as Xe}from"./MobileAppDrawer-C7qAXiy5.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="d8cf1fcc-628d-48ab-8b77-3a3dccfb09ac",e._sentryDebugIdIdentifier="sentry-dbid-d8cf1fcc-628d-48ab-8b77-3a3dccfb09ac")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},_=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=He(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>H(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=Q(I,m),L=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(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(q()),y()},F=()=>{O===!0?w(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="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:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:_.discardTitle}),descriptionComponent:s.jsx(Ee,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=M(De)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-XXI3_E1y.js";import _ from"./NotFoundScreen-C3kD1egL.js";import{a as o}from"./sentry-DrlL61Aq.js";import{j as v,u as M,g,l as U,h as P,N as z,k as K,n as N,o as h}from"./core-sRr8O2Ja.js";import{eN as V,OK as b,bo as B,bn as F,h6 as H,gC as $}from"./zeni-epic-state-BlOBva0w.js";import{x as q,z as C,K as G,cs as J}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{M as W}from"./MobileAppDrawer-C7qAXiy5.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="ac16838f-0848-46a0-ae93-1d095a9ad3b0",e._sentryDebugIdIdentifier="sentry-dbid-ac16838f-0848-46a0-ae93-1d095a9ad3b0")}catch{}})();const X=K(function(e){const t=C.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:r,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),r=g(a=>V(a)),{aggregatedReportViewState:n}=g(a=>b(a)),{tenantEmailDomain:m}=U(),p=P(),l=C.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=o.useRef(!1),[I,S]=o.useState(!1),k=B(r?.userRole??[]),w=r?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),A=k||w||x,d=o.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);o.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=o.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),y=o.useCallback((a,i)=>{d(a,i,!1)},[d]),u=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:I,handleDrawerToggle:u}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:r,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:y,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ce(){return s.jsxs(N,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-DrlL61Aq.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-XXI3_E1y.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DrlL61Aq.js";import{L as dt,bR as Tc,eN as Ac,Ij as Rc,I$ as kl,c0 as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-BlOBva0w.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-DCRx3jP7.js";import{r as un}from"./empty-CwKXvn2c.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Dkp2Hlcw.js";import{r as Gl}from"./index-B53H88q7.js";import{r as zl}from"./index-DatNfK53.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-sRr8O2Ja.js";import{u as Kl,z as Pc,L as Wl,U as Jl,V as Xl,j as Ql,d as tf}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import{d as Pe}from"./decodeURIComponentSafe-DfA0P9Xn.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]="5e424db1-bbc4-4f6d-9d32-4300082e8b74",t._sentryDebugIdIdentifier="sentry-dbid-5e424db1-bbc4-4f6d-9d32-4300082e8b74")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-XXI3_E1y.js";import{a as o}from"./sentry-DrlL61Aq.js";import{g as f,j as N,h as V,u as W,k as F}from"./core-sRr8O2Ja.js";import{h as _,q as z,z as R,b2 as U,E as $,M as q,K,y as X,d as l,f as Z,a1 as G,b3 as Q}from"./index-B8scoeQA.js";import{eX as J,eN as Y,Ly as I,Lz as ee,ts as ae,ti as g,eZ as re,bM as ne,tn as se,LA as te}from"./zeni-epic-state-BlOBva0w.js";import{D as oe,e as ie,n as le,S as de}from"./mui-CL-iXERd.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{M as ue}from"./MobileAppDrawer-C7qAXiy5.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]="36eff736-a15d-46dc-a53f-1bb4f45e6812",e._sentryDebugIdIdentifier="sentry-dbid-36eff736-a15d-46dc-a53f-1bb4f45e6812")}catch{}})();const pe={overlayWidth:new $(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=z();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>J(d));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:d=>d.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-XXI3_E1y.js";import R from"./NotFoundScreen-C3kD1egL.js";import{a as p}from"./sentry-DrlL61Aq.js";import{j as x,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-sRr8O2Ja.js";import{eN as T,Ms as g,MI as S,Cp as V,By as U,Co as m,Cf as _,MX as B}from"./zeni-epic-state-BlOBva0w.js";import{h as M,z as N,B as $,a1 as O,bI as W,aa as z}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-BoCrHkhT.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]="8bc8b1a8-d9d0-4e15-9f9e-06a5f43b4c3b",e._sentryDebugIdIdentifier="sentry-dbid-8bc8b1a8-d9d0-4e15-9f9e-06a5f43b4c3b")}catch{}})();const d="reimbursement-approval-rule-update",P=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(_(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),X=()=>{const e=x(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),b=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>T(s)),w=M(),i=u(s=>g(s)),h=u(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(U(!0)))},[l,b,a]),N.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,q,I)=>{s.endsWith(d)&&I.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($,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(X,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-XXI3_E1y.js";import{a as y}from"./sentry-DrlL61Aq.js";import{j as w,h as A,u as C,l as T,g as b,k as U}from"./core-sRr8O2Ja.js";import{MI as R,Ms as E,Ci as x,Cr as _,Cp as S,Cq as h,MJ as B}from"./zeni-epic-state-BlOBva0w.js";import{z as k,h as V,B as j,bz as F,aa as O}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.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]="f365dc0b-f143-456b-a827-b32eaa25d66f",e._sentryDebugIdIdentifier="sentry-dbid-f365dc0b-f143-456b-a827-b32eaa25d66f")}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 f=[];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 m=!!$(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=D.concat(I);f.push({action:c.stepType.selectedOption,actors:v,operator:v.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};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 G(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),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{G as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BHFBttZH.js";import{j as J,h as me,u as V,l as Y,g as B,N as _,k as K,i as ut,n as pt,o as E}from"./core-B4p4VAKV.js";import{eN as q,MY as ce,c0 as de,Bt as De,jB as bt,BG as se,BF as ie,MZ as gt,bn as ue,fH as Fe,M_ as ht,Jk as ft,jq as Ue,Jl as Re,Jm as St,ik as It,Me as At,iA as Rt,Bh as yt,s6 as Ct,is as kt,C1 as Le,M$ as Ne,N0 as vt,N1 as Et,N2 as Bt,N3 as wt,N4 as xt,BN as ye,iG as Tt,Mn as jt,BH as Dt,Br as Ft,N5 as Ut,Bq as Lt,N6 as Nt,Bz as Ce,BR as Mt,BQ as Pt,BM as $t,N7 as Me,GE as _t,bo as Ot,BC as Gt,Cj as zt,N8 as Ht,N9 as Zt,BZ as Wt,BW as ke,LJ as Vt,Bo as qt,Na as Pe,CI as ve,CQ as Jt,Nb as Kt,Nc as Z,Nd as Qt,Ne as $e,Nf as Xt,Ng as _e,Nh as Oe,C9 as oe,bt as Yt,bE as pe,cA as be,eT as Ge,eR as ze,Ni as en,gC as tn,LW as nn,Nj as an,Nk as He,L_ as sn,MI as on,Nl as rn,MX as ln,CN as Ee,CM as mn,Nm as cn,Nn as dn,No as un,Np as pn,Nq as bn,Mt as gn,CD as hn,CH as fn,bv as Sn,bD as In,cv as An,cj as Rn,bs as yn,Il as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-BEVUvW5L.js";import{x as Ze,q as We,a as ee,p as k,K as ge,z as P,bJ as Ve,y as te,d as v,aC as Be,o as F,ao as X,G as wn,D as qe,bK as xn,s as W,bL as Tn,A as ne,bM as jn,M as Dn,E as Fn,B as he,f as Je,a1 as Un,ba as Ln,R as Nn,h as Ke,bN as Mn,a4 as Pn}from"./index-DYV4bUyQ.js";import{n as O,S as $n}from"./mui-DXgGaTBw.js";import re from"./NotFoundScreen-DPKM8ZjP.js";import{S as we}from"./SetupPagesScreen-AVggUp_5.js";import{F as Qe}from"./FeaturePreviewScreen-BDfm50zt.js";import{a as h}from"./sentry-BX-72dHr.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-DHVw5NsC.js";import{u as Xe}from"./useInitialThreadRequest-DT-JjJGy.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-B0XJlg5L.js";import{D as _n}from"./DrawerScreen-B_RZnVqT.js";import{M as et}from"./MobileAppDrawer-B3HfC0JN.js";import{R as On}from"./ReimbursementApprovalRoutes-D9uECzRU.js";import{FallBackRoute as Gn}from"./ScreenRoutes-CtoYHwrw.js";import"./recharts-B76Il_DX.js";import"./analytics-D_5Z3Bft.js";import"./plaid-DA0irZU8.js";import"./dnd-2RJYpz-H.js";import"./stripe-DMRn4zHo.js";import"./lottie-B6BwA9Yv.js";import"./lexical-DaSYsDzE.js";import"./pdf-CUWjg6CX.js";import"./utils-CxE_gCmS.js";import"./analyticsHelper-DyuXeTen.js";import"./routePaths-MPc-kidK.js";import"./BusinessVerificationPageScreen-Klzui3Ay.js";import"./ReimbursementApprovalRuleDetailScreen-BlgmeQtP.js";import"./getLocaleForTenant-DhWTlpsv.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]="22dbc8d6-1821-4474-bc22-760bdbc9cbaf",e._sentryDebugIdIdentifier="sentry-dbid-22dbc8d6-1821-4474-bc22-760bdbc9cbaf")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let A=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(A=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.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:A,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({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(Ne()),e(vt());const i=tt(o),l=W(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(yt(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(At())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=V(),{reimbursementId:r}=Y(),c=Ze(),d=We(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:R}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:R,mobileExploreReferrer:"Reimbursement Details"}),C=V().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Xe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,A,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(_,{to:y}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Wn,{}):null,m&&d!=="small"?s.jsx(Vn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=O.div`
|
|
1
|
+
import{j as s}from"./liveblocks-XXI3_E1y.js";import{j as J,h as me,u as V,l as Y,g as B,N as _,k as K,i as ut,n as pt,o as E}from"./core-sRr8O2Ja.js";import{eN as q,MY as ce,c0 as de,Bt as De,jB as bt,BG as se,BF as ie,MZ as gt,bn as ue,fH as Fe,M_ as ht,Jk as ft,jq as Ue,Jl as Re,Jm as St,ik as It,Me as At,iA as Rt,Bh as yt,s6 as Ct,is as kt,C1 as Le,M$ as Ne,N0 as vt,N1 as Et,N2 as Bt,N3 as wt,N4 as xt,BN as ye,iG as Tt,Mn as jt,BH as Dt,Br as Ft,N5 as Ut,Bq as Lt,N6 as Nt,Bz as Ce,BR as Mt,BQ as Pt,BM as $t,N7 as Me,GE as _t,bo as Ot,BC as Gt,Cj as zt,N8 as Ht,N9 as Zt,BZ as Wt,BW as ke,LJ as Vt,Bo as qt,Na as Pe,CI as ve,CQ as Jt,Nb as Kt,Nc as Z,Nd as Qt,Ne as $e,Nf as Xt,Ng as _e,Nh as Oe,C9 as oe,bt as Yt,bE as pe,cA as be,eT as Ge,eR as ze,Ni as en,gC as tn,LW as nn,Nj as an,Nk as He,L_ as sn,MI as on,Nl as rn,MX as ln,CN as Ee,CM as mn,Nm as cn,Nn as dn,No as un,Np as pn,Nq as bn,Mt as gn,CD as hn,CH as fn,bv as Sn,bD as In,cv as An,cj as Rn,bs as yn,Il as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-BlOBva0w.js";import{x as Ze,q as We,a as ee,p as k,K as ge,z as P,bJ as Ve,y as te,d as v,aC as Be,o as F,ao as X,G as wn,D as qe,bK as xn,s as W,bL as Tn,A as ne,bM as jn,M as Dn,E as Fn,B as he,f as Je,a1 as Un,ba as Ln,R as Nn,h as Ke,bN as Mn,a4 as Pn}from"./index-B8scoeQA.js";import{n as O,S as $n}from"./mui-CL-iXERd.js";import re from"./NotFoundScreen-C3kD1egL.js";import{S as we}from"./SetupPagesScreen-JUPsQ0S4.js";import{F as Qe}from"./FeaturePreviewScreen-CCmVMubZ.js";import{a as h}from"./sentry-DrlL61Aq.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import{u as Xe}from"./useInitialThreadRequest-oa3yZUCF.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{D as _n}from"./DrawerScreen-CeA1faKQ.js";import{M as et}from"./MobileAppDrawer-C7qAXiy5.js";import{R as On}from"./ReimbursementApprovalRoutes-CifzxX44.js";import{FallBackRoute as Gn}from"./ScreenRoutes-BeF5_NIp.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.js";import"./analyticsHelper-CYuyeE-z.js";import"./routePaths-0yQK7ZVo.js";import"./BusinessVerificationPageScreen-AcNcSrfm.js";import"./ReimbursementApprovalRuleDetailScreen-BoCrHkhT.js";import"./getLocaleForTenant-CUETA9qT.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]="22dbc8d6-1821-4474-bc22-760bdbc9cbaf",e._sentryDebugIdIdentifier="sentry-dbid-22dbc8d6-1821-4474-bc22-760bdbc9cbaf")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let A=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(A=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.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:A,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({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(Ne()),e(vt());const i=tt(o),l=W(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(yt(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(At())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=V(),{reimbursementId:r}=Y(),c=Ze(),d=We(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:R}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:R,mobileExploreReferrer:"Reimbursement Details"}),C=V().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Xe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,A,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(_,{to:y}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Wn,{}):null,m&&d!=="small"?s.jsx(Vn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-BHFBttZH.js";import{u as G,j as be,h as ye,l as Ie,g as d,k as Ce,n as ge,o as N}from"./core-B4p4VAKV.js";import{eN as L,f7 as g,IG as Se,jq as Q,IH as W,pJ as A,je as we,ih as Re,t2 as Te,pO as Oe,bv as Ae,II as Fe,bn as ke,u5 as De,IJ as Ee,IK as Pe,s_ as je,t6 as Le,IL as H,IM as Me,IN as Be,IO as ve,IP as Ue,IQ as S,IR as F,IS as k,IT as Y,IU as D,IV as E,dB as Ve,tN as xe,tB as q,tC as $,tT as ze,tG as Z,tZ as Ge,IW as Ne,IX as He,IY as Ye,IZ as qe,I_ as $e,eT as Ze,eR as Je}from"./zeni-epic-state-BEVUvW5L.js";import{J as Ke,K as Qe,q as We,a as X,p as P,z as ee,M as Xe,A as ea,c as aa,y as sa,d as j,f as ta,s as ae,N as oa,O as na,R as ra}from"./index-DYV4bUyQ.js";import"./mui-DXgGaTBw.js";import ia from"./NotFoundScreen-DPKM8ZjP.js";import{F as la}from"./FeaturePreviewScreen-BDfm50zt.js";import{a as h}from"./sentry-BX-72dHr.js";import{u as ca,a as da,b as pa,c as fa}from"./useFetchSuggestedQuestionsWhenReady-B0XJlg5L.js";import{u as ma}from"./useInitialThreadRequest-DT-JjJGy.js";import{t as J,a as K}from"./routePaths-MPc-kidK.js";import{M as ua}from"./MobileAppDrawer-B3HfC0JN.js";import"./recharts-B76Il_DX.js";import"./analytics-D_5Z3Bft.js";import"./plaid-DA0irZU8.js";import"./dnd-2RJYpz-H.js";import"./stripe-DMRn4zHo.js";import"./lottie-B6BwA9Yv.js";import"./lexical-DaSYsDzE.js";import"./pdf-CUWjg6CX.js";import"./utils-CxE_gCmS.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]="0e8445e8-b52d-4bb1-8538-fb8359a32fb0",e._sentryDebugIdIdentifier="sentry-dbid-0e8445e8-b52d-4bb1-8538-fb8359a32fb0")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ha=e=>{e(He()),e(Ye()),e(qe()),e($e())},ba=Ce(function(e){const o=ee.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Fe(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,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:j,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ra}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ne(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(I=>I!=="this_period_vs_same_period_last_year"&&I!=="this_period_vs_same_period_last_year_percent"&&I!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1: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=Ve(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 J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=ae(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(je()),o.isAccountingProjectsEnabled&&e(Le())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(oa);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=na(f),a=be(),s=ye(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:c}=X(),{isFeatureEnabled:m}=c(P.isReportsHorizontalClassLayoutSwitchEnabled),l=ee.getSignedInUser(),[i,I]=h.useState(!1),[M,se]=h.useState(!1),{isFeatureEnabled:B}=c(P.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),te=v.company?.companyInfo.firstMonthOfFY??1,oe=ma(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),ne=d(n=>Se(n)),{areTenantIdsInSync:b}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Q(n)),T=d(n=>W(n)),re=d(n=>g(n).isCompareModeOn),_=d(n=>g(n).filter),O=d(n=>g(n).selectedReportAndTimeframeFetchState),ie=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(I(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!M&&C==="Completed"&&b&&(s(A(l.userId,!1,!0,!1)),se(!0))},[i,M,C,b]),h.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(_.timeframe));break;case"profit_and_loss_by_projects":T&&s(Te(_.timeframe));break;case"balance_sheet":s(Re(_.timeframe));break;case"cash_flow":s(we(_.timeframe))}},[i,R,O,b,U,T]);const V=ea(),le=V?.loggedInUserRole!=null&&Ae(V?.loggedInUserRole)!==!0,[ce,de]=h.useState(!1),x=n=>{de(n)},pe=aa(),fe=pa();return function(n){const{isDataReady:me}=n,{pathname:ue}=G(),z=Ke(ue??"")==="reports",_e=ca(me),he=h.useMemo(()=>z?_a:void 0,[z]);da({canFetchSuggestedQuestions:_e,pageContexts:he})}({isDataReady:C==="Completed"}),fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(sa,{analytics:j,onLoad:n=>n.trackPageLoaded(ta.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:ce,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:te,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ie,selectedReportID:R,analytics:j,filter:_,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:re,hasTransactionAccess:le,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ne.reportsResyncFetchState,isAiCfoAccessEnabled:fe&&pe&&!e,onAskAiCfoClick:()=>{if(u){const n=ae(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:oe})]})}const w=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 xa(){const e=d(s=>L(s)),{useFeatureGate:o}=X(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(e);return u===!0||a===!0?p.jsx(la,{}):p.jsxs(ge,{children:[p.jsx(N,{path:"/",element:p.jsx(ya,{})}),p.jsx(N,{path:"*",element:p.jsx(ia,{})})]})}export{xa as default};
|
|
1
|
+
import{j as p}from"./liveblocks-XXI3_E1y.js";import{u as G,j as be,h as ye,l as Ie,g as d,k as Ce,n as ge,o as N}from"./core-sRr8O2Ja.js";import{eN as L,f7 as g,IG as Se,jq as Q,IH as W,pJ as A,je as we,ih as Re,t2 as Te,pO as Oe,bv as Ae,II as Fe,bn as ke,u5 as De,IJ as Ee,IK as Pe,s_ as je,t6 as Le,IL as H,IM as Me,IN as Be,IO as ve,IP as Ue,IQ as S,IR as F,IS as k,IT as Y,IU as D,IV as E,dB as Ve,tN as xe,tB as q,tC as $,tT as ze,tG as Z,tZ as Ge,IW as Ne,IX as He,IY as Ye,IZ as qe,I_ as $e,eT as Ze,eR as Je}from"./zeni-epic-state-BlOBva0w.js";import{J as Ke,K as Qe,q as We,a as X,p as P,z as ee,M as Xe,A as ea,c as aa,y as sa,d as j,f as ta,s as ae,N as oa,O as na,R as ra}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import ia from"./NotFoundScreen-C3kD1egL.js";import{F as la}from"./FeaturePreviewScreen-CCmVMubZ.js";import{a as h}from"./sentry-DrlL61Aq.js";import{u as ca,a as da,b as pa,c as fa}from"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import{u as ma}from"./useInitialThreadRequest-oa3yZUCF.js";import{t as J,a as K}from"./routePaths-0yQK7ZVo.js";import{M as ua}from"./MobileAppDrawer-C7qAXiy5.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="0e8445e8-b52d-4bb1-8538-fb8359a32fb0",e._sentryDebugIdIdentifier="sentry-dbid-0e8445e8-b52d-4bb1-8538-fb8359a32fb0")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ha=e=>{e(He()),e(Ye()),e(qe()),e($e())},ba=Ce(function(e){const o=ee.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Fe(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,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:j,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ra}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ne(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(I=>I!=="this_period_vs_same_period_last_year"&&I!=="this_period_vs_same_period_last_year_percent"&&I!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1: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=Ve(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 J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=ae(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(je()),o.isAccountingProjectsEnabled&&e(Le())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(oa);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=na(f),a=be(),s=ye(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:c}=X(),{isFeatureEnabled:m}=c(P.isReportsHorizontalClassLayoutSwitchEnabled),l=ee.getSignedInUser(),[i,I]=h.useState(!1),[M,se]=h.useState(!1),{isFeatureEnabled:B}=c(P.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),te=v.company?.companyInfo.firstMonthOfFY??1,oe=ma(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),ne=d(n=>Se(n)),{areTenantIdsInSync:b}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Q(n)),T=d(n=>W(n)),re=d(n=>g(n).isCompareModeOn),_=d(n=>g(n).filter),O=d(n=>g(n).selectedReportAndTimeframeFetchState),ie=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(I(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!M&&C==="Completed"&&b&&(s(A(l.userId,!1,!0,!1)),se(!0))},[i,M,C,b]),h.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(_.timeframe));break;case"profit_and_loss_by_projects":T&&s(Te(_.timeframe));break;case"balance_sheet":s(Re(_.timeframe));break;case"cash_flow":s(we(_.timeframe))}},[i,R,O,b,U,T]);const V=ea(),le=V?.loggedInUserRole!=null&&Ae(V?.loggedInUserRole)!==!0,[ce,de]=h.useState(!1),x=n=>{de(n)},pe=aa(),fe=pa();return function(n){const{isDataReady:me}=n,{pathname:ue}=G(),z=Ke(ue??"")==="reports",_e=ca(me),he=h.useMemo(()=>z?_a:void 0,[z]);da({canFetchSuggestedQuestions:_e,pageContexts:he})}({isDataReady:C==="Completed"}),fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(sa,{analytics:j,onLoad:n=>n.trackPageLoaded(ta.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:ce,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:te,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ie,selectedReportID:R,analytics:j,filter:_,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:re,hasTransactionAccess:le,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ne.reportsResyncFetchState,isAiCfoAccessEnabled:fe&&pe&&!e,onAskAiCfoClick:()=>{if(u){const n=ae(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:oe})]})}const w=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 xa(){const e=d(s=>L(s)),{useFeatureGate:o}=X(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(e);return u===!0||a===!0?p.jsx(la,{}):p.jsxs(ge,{children:[p.jsx(N,{path:"/",element:p.jsx(ya,{})}),p.jsx(N,{path:"*",element:p.jsx(ia,{})})]})}export{xa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-XXI3_E1y.js";import{a as x,z as w,aI as y,y as E,d as p,f as F,cC as P,p as L}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import l from"./NotFoundScreen-C3kD1egL.js";import{a as f}from"./sentry-DrlL61Aq.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as d}from"./core-sRr8O2Ja.js";import{eN as z,Ph as C,M7 as Y,Pi as k,ts as q,eZ as G,Pj as M,tq as O}from"./zeni-epic-state-BlOBva0w.js";import{R as j}from"./ReferralListScreen-ChBnSKTx.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.js";import"./useAskAiCfoHostNavButtonProps-Bt4hMVmk.js";import"./useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js";import"./MobileAppDrawer-C7qAXiy5.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]="0856ebf0-c8ad-427e-9914-4a9ff405edc8",e._sentryDebugIdIdentifier="sentry-dbid-0856ebf0-c8ad-427e-9914-4a9ff405edc8")}catch{}})();const Z=R(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(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=V(),v=A(),{useDynamicConfig:g}=x(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),_=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),I=Y(D);f.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(q()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:v,currentTenant:r,companyName:N,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(j,{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{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ik as hs,bv as js,Il as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as ys,Im as fs,In as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-BEVUvW5L.js";import{j as e}from"./liveblocks-BHFBttZH.js";import{a as v}from"./sentry-BX-72dHr.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-B4p4VAKV.js";import{h as ws,u as zs,z as R,a as Gs,c as $s,H as Ys,p as L,A as qs,L as B,D as he,t as _,P as Ws,d as X,l}from"./index-DYV4bUyQ.js";import"./mui-DXgGaTBw.js";import{f as je}from"./analyticsHelper-DyuXeTen.js";import{t as Js}from"./getLocaleForTenant-DhWTlpsv.js";import"./recharts-B76Il_DX.js";import"./analytics-D_5Z3Bft.js";import"./plaid-DA0irZU8.js";import"./dnd-2RJYpz-H.js";import"./stripe-DMRn4zHo.js";import"./lottie-B6BwA9Yv.js";import"./lexical-DaSYsDzE.js";import"./pdf-CUWjg6CX.js";import"./utils-CxE_gCmS.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]="5ab4eff7-9e9a-4e5d-9895-a8986e08f752",i._sentryDebugIdIdentifier="sentry-dbid-5ab4eff7-9e9a-4e5d-9895-a8986e08f752")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-5IYx4gJB.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:()=>n(()=>import("./BillPayRoutes-CrF5DGeF.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:()=>n(()=>import("./ReimbursementRoutes-DLUiNzD5.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-Bx5iFIs_.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-BdRQ_Y4f.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-C4wGGusk.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CTV6XVqo.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-B_tlRT8m.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-C8Ay3B61.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BQmeQuBt.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-Vhwrfw0b.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BALd8eWD.js"),__vite__mapDeps([49,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(()=>n(()=>import("./ReportsRoutes-C4wGGusk.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-C8vcaV5i.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-B_tlRT8m.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-CHmdjBmk.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-DJGHQLX_.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-Vhwrfw0b.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-Bm5nQ103.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-dxOu1Hf3.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-5IYx4gJB.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(()=>n(()=>import("./BillPayRoutes-CrF5DGeF.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]))),ln=l(()=>n(()=>import("./SettingsRoutes-BdRQ_Y4f.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-DLUiNzD5.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-BALd8eWD.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BQmeQuBt.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-Bx5iFIs_.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-CTV6XVqo.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-DwHr5EyY.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-DvrpuYDP.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-C8Ay3B61.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-CrlGPx4r.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-D_nyBAKX.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-CitBE3H-.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-DPKM8ZjP.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-CgABR7QN.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),ye=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(a=>a.tenantState.fetchState),E=z(a=>a.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(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.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(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.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 q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,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"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[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),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(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=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==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(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):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:as||F?e.jsx(sn,{}):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(nn,{}):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(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):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(mn,{}):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(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):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(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),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(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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 Tn=({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(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-C4CcYbYI.js","assets/sentry-DrlL61Aq.js","assets/core-sRr8O2Ja.js","assets/zeni-epic-state-BlOBva0w.js","assets/index-B8scoeQA.js","assets/mui-CL-iXERd.js","assets/analytics-zC4vJBLG.js","assets/utils-DCRx3jP7.js","assets/withTransactionSidePanel-CiVcMng7.js","assets/useAskAiCfoHostNavButtonProps-Bt4hMVmk.js","assets/useFetchSuggestedQuestionsWhenReady-B6OFe2QI.js","assets/TransactionDetailScreen-B-hqlTRL.js","assets/decodeURIComponentSafe-DfA0P9Xn.js","assets/routePaths-0yQK7ZVo.js","assets/NotFoundScreen-C3kD1egL.js","assets/analyticsHelper-CYuyeE-z.js","assets/CompanyPassportScreen--lpPP9CU.js","assets/MobileAppDrawer-C7qAXiy5.js","assets/FeaturePreviewScreen-CCmVMubZ.js","assets/ReferralListScreen-ChBnSKTx.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-BjdJSzTb.js","assets/AddressScreen-ChjeKEBH.js","assets/DomesticWireDetailScreen-ChnkS-X_.js","assets/useInitialThreadRequest-oa3yZUCF.js","assets/DrawerScreen-CeA1faKQ.js","assets/SetupPagesScreen-JUPsQ0S4.js","assets/BusinessVerificationPageScreen-AcNcSrfm.js","assets/BillPayApprovalRoutes-DrVfWwhS.js","assets/ReimbursementApprovalRuleDetailScreen-BoCrHkhT.js","assets/getLocaleForTenant-CUETA9qT.js","assets/ReimbursementRoutes-BhSlMM0p.js","assets/ReimbursementApprovalRoutes-CifzxX44.js","assets/TransactionListRoutes-CtcO3OOT.js","assets/ZeniAccountStatementScreen-K6t_uhF6.js","assets/SettingsRoutes-BWvITHR2.js","assets/accountMappingHelper-Bcmi4v71.js","assets/QBOConnectionScreen-CwcXMmNE.js","assets/empty-CwKXvn2c.js","assets/index-B53H88q7.js","assets/url-CnXg07em.js","assets/index-DatNfK53.js","assets/ReportsRoutes-R-2ogc4m.js","assets/ChargeCardRoutes-BZ-GpRol.js","assets/PeopleRoutes-hAxuAtgj.js","assets/ExpenseAutomationRoutes-B566g1Vp.js","assets/TreasuryRoutes-KBaLMYzC.js","assets/VendorsRoutes-DQ6Ab1QZ.js","assets/pathToGoBack-DHgKJexU.js","assets/ZeniAccountRoutes-DXq3JSQF.js","assets/AddressRoutes-Ct3N3W-B.js","assets/PandLWithForecastRoutes-Do8X3aTE.js","assets/CustomerOnboardingRoutes-BsfNG_4M.js","assets/TransactionDetailRoutes-BPCCZduy.js","assets/EntityDetailRoutes-CR2Mdgzj.js","assets/NotificationRoutes-BL6Ye5sk.js","assets/PerformanceRoutes-CoYX1bLH.js","assets/RewardsRoutes-DfIrbqL5.js","assets/TaskRoutes-DHBPZIrq.js","assets/TaskListScreen-CMvx-0XC.js","assets/AiCfoScreen-Bn1ZDZwq.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ik as hs,bv as js,Il as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as ys,Im as fs,In as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-BlOBva0w.js";import{j as e}from"./liveblocks-XXI3_E1y.js";import{a as v}from"./sentry-DrlL61Aq.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-sRr8O2Ja.js";import{h as ws,u as zs,z as R,a as Gs,c as $s,H as Ys,p as L,A as qs,L as B,D as he,t as _,P as Ws,d as X,l}from"./index-B8scoeQA.js";import"./mui-CL-iXERd.js";import{f as je}from"./analyticsHelper-CYuyeE-z.js";import{t as Js}from"./getLocaleForTenant-CUETA9qT.js";import"./recharts-z_5Sq5F0.js";import"./analytics-zC4vJBLG.js";import"./plaid-BUQgPXGQ.js";import"./dnd-CZEKCPsp.js";import"./stripe-DMRn4zHo.js";import"./lottie-CbW-xVFB.js";import"./lexical-CtDGfH8b.js";import"./pdf-BVi8zWaH.js";import"./utils-DCRx3jP7.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]="5ab4eff7-9e9a-4e5d-9895-a8986e08f752",i._sentryDebugIdIdentifier="sentry-dbid-5ab4eff7-9e9a-4e5d-9895-a8986e08f752")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-C4CcYbYI.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:()=>n(()=>import("./BillPayRoutes-BjdJSzTb.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:()=>n(()=>import("./ReimbursementRoutes-BhSlMM0p.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-CtcO3OOT.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-BWvITHR2.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-R-2ogc4m.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BZ-GpRol.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-hAxuAtgj.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-B566g1Vp.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-KBaLMYzC.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DQ6Ab1QZ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DXq3JSQF.js"),__vite__mapDeps([49,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(()=>n(()=>import("./ReportsRoutes-R-2ogc4m.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-Ct3N3W-B.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-hAxuAtgj.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-Do8X3aTE.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BsfNG_4M.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DQ6Ab1QZ.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-BPCCZduy.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CR2Mdgzj.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-C4CcYbYI.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(()=>n(()=>import("./BillPayRoutes-BjdJSzTb.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]))),ln=l(()=>n(()=>import("./SettingsRoutes-BWvITHR2.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-BhSlMM0p.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-DXq3JSQF.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-KBaLMYzC.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-CtcO3OOT.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BZ-GpRol.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-BL6Ye5sk.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-CoYX1bLH.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-B566g1Vp.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-DfIrbqL5.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-DHBPZIrq.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-Bn1ZDZwq.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-C3kD1egL.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-CMvx-0XC.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),ye=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(a=>a.tenantState.fetchState),E=z(a=>a.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(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.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(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.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 q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,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"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[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),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(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=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==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(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):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:as||F?e.jsx(sn,{}):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(nn,{}):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(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):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(mn,{}):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(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):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(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),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(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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 Tn=({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(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|