@zeniai/web-app-ui 5.1.76-qa → 5.1.77-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DgtM3nxS.js +1 -0
- package/dist/assets/AddressScreen-BNnoxI42.js +9 -0
- package/dist/assets/AiCfoScreen-CfF5p-2L.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-DZPEV8jE.js +1 -0
- package/dist/assets/BillPayRoutes-Cj3rPF7j.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen--z9oIuUu.js +9 -0
- package/dist/assets/CardsAiCfoScreen-DNag4rPx.js +14 -0
- package/dist/assets/ChargeCardRoutes-BD5wy1XM.js +71 -0
- package/dist/assets/{CompanyPassportScreen-D3FPR-Qo.js → CompanyPassportScreen-bzkzFMdg.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-Dfi17Hh2.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DClXD2_x.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-Cv0uxL5k.js +30 -0
- package/dist/assets/{DashboardRoutes-IvQbF0p5.js → DashboardRoutes-Dveel7PM.js} +4 -4
- package/dist/assets/DefaultTenantHome-BtVpxYc1.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-lYOXV3jg.js +18 -0
- package/dist/assets/DrawerScreen-Bn7fJuoP.js +1 -0
- package/dist/assets/EntityDetailRoutes-DG2HbUDs.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C_cBFDYx.js +25 -0
- package/dist/assets/FeaturePreviewScreen-WDFKDhR6.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-dpBPyj0d.js +1 -0
- package/dist/assets/{MagicLinkRoutes-GeMpatbi.js → MagicLinkRoutes-D0IIGCiK.js} +20 -20
- package/dist/assets/MagicLinkSignInScreen-YW9ZqePv.js +12 -0
- package/dist/assets/MobileAppDrawer-eFjjhgJh.js +1 -0
- package/dist/assets/NotFoundScreen-6qASDiQT.js +1 -0
- package/dist/assets/{NotificationRoutes-DAaLYP16.js → NotificationRoutes-CMH_9nag.js} +1 -1
- package/dist/assets/OAuthConsentScreen-CJxsBNoU.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-DFI-6LXP.js +1 -0
- package/dist/assets/PeopleRoutes-CQe5mT0Q.js +22 -0
- package/dist/assets/PerformanceRoutes-C2kO5CvR.js +1 -0
- package/dist/assets/{Preview-C1-82nYG.js → Preview-C-vmj6G_.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CbpqcU_N.js → QBOConnectionScreen-VPR245Vs.js} +1 -1
- package/dist/assets/ReferralListScreen-DuTA8ZNx.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-DKDcC83F.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-C7g9vUNM.js +1 -0
- package/dist/assets/ReimbursementRoutes-DT6ULuDS.js +68 -0
- package/dist/assets/ReportsRoutes-UEATkQRA.js +1 -0
- package/dist/assets/RewardsRoutes-CDs_o_bR.js +1 -0
- package/dist/assets/ScreenRoutes-7YrD1RCk.js +2 -0
- package/dist/assets/SettingsRoutes-BILGacxq.js +57 -0
- package/dist/assets/SetupPagesScreen-BMNyy9c9.js +29 -0
- package/dist/assets/SignInScreen-CmRE9PCe.js +1 -0
- package/dist/assets/SignOutScreen-DRSiKmWQ.js +9 -0
- package/dist/assets/TaskListScreen-svrYmHZ7.js +9 -0
- package/dist/assets/TaskRoutes-Dn0uto0H.js +9 -0
- package/dist/assets/TransactionDetailRoutes-CB__3R_j.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Cqi8jdTb.js → TransactionDetailScreen-DxYq4JVW.js} +2 -2
- package/dist/assets/TransactionListRoutes-0JWLB9MV.js +1 -0
- package/dist/assets/TreasuryRoutes-C7KBazk5.js +37 -0
- package/dist/assets/{VendorsRoutes-bYzT2YYR.js → VendorsRoutes-vdMn6WBc.js} +19 -19
- package/dist/assets/WiseConfirmationScreen-DLbtxnuL.js +12 -0
- package/dist/assets/ZeniAccountRoutes-C9zOReRG.js +73 -0
- package/dist/assets/ZeniAccountStatementScreen-DW7NA-BZ.js +9 -0
- package/dist/assets/{accountMappingHelper-DB6fTWzq.js → accountMappingHelper-talErUKy.js} +1 -1
- package/dist/assets/{analytics-CGnNJ1B3.js → analytics-ChMmdjNV.js} +1 -1
- package/dist/assets/{analyticsHelper-CSJ-Oqa_.js → analyticsHelper-D_xPTvv0.js} +1 -1
- package/dist/assets/{core-BQch-SEa.js → core-BoNEfvLs.js} +5 -5
- package/dist/assets/{decodeURIComponentSafe-BlZKyc9K.js → decodeURIComponentSafe-v7XwPgPo.js} +1 -1
- package/dist/assets/dnd-DvJtEb2B.js +6 -0
- package/dist/assets/{empty-CnUVdn1j.js → empty-b5TFvQkm.js} +1 -1
- package/dist/assets/{index-CjwtZFvv.js → empty-dNqnyFZ3.js} +1 -1
- package/dist/assets/{emptyVideoElement-CMOPMd9b.js → emptyVideoElement-CHUUTLZE.js} +1 -1
- package/dist/assets/epic-DBs37iOr.js +2 -0
- package/dist/assets/{getLocaleForTenant-DDy24EaJ.js → getLocaleForTenant-DOJkec7u.js} +1 -1
- package/dist/assets/{index-B7xMX0uC.js → index-BTYYfZaH.js} +34161 -28660
- package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
- package/dist/assets/index-BvFLIInY.js +1 -0
- package/dist/assets/{index-BKzmRWFJ.js → index-CJO1bhSt.js} +2 -2
- package/dist/assets/index-DM4yT559.js +1 -0
- package/dist/assets/{index-CdbMVgUL.js → index-DcWwIWd7.js} +1 -1
- package/dist/assets/{index-BJcfizgW.js → index-HOeFcz85.js} +1 -1
- package/dist/assets/{index-BDydFdLA.js → index-VwB1TFIZ.js} +1 -1
- package/dist/assets/{index-C75IsDSW.js → index-drCPF-LE.js} +1 -1
- package/dist/assets/{lexical-BBRytn_R.js → lexical-D_KbwLmW.js} +1 -1
- package/dist/assets/{liveblocks-Bi6jUyhM.js → liveblocks-CsaY8yYO.js} +1 -1
- package/dist/assets/{lottie-CB8QpQmy.js → lottie-DbDVmnvZ.js} +1 -1
- package/dist/assets/{mui-D4v6d6vq.js → mui-CblpH0Ha.js} +1 -1
- package/dist/assets/{pathToGoBack-iBZHU0oy.js → pathToGoBack-j1V7r3Mn.js} +1 -1
- package/dist/assets/{pdf-BNQvW5mJ.js → pdf-D2egRSjc.js} +3 -3
- package/dist/assets/{pdf-lib-BkMwujYN.js → pdf-lib-DMbxzmyG.js} +1 -1
- package/dist/assets/{plaid-DWupRB-M.js → plaid-74upgTWR.js} +1 -1
- package/dist/assets/{pusher-Dkp2Jrxx.js → pusher-CjiDlk8e.js} +1 -1
- package/dist/assets/{react-CZ9x9aZs.js → react-B9xrzEYj.js} +1 -1
- package/dist/assets/{react-4loJCMRC.js → react-Bdgrv6d7.js} +1 -1
- package/dist/assets/{react-DZeesIBx.js → react-Dvg14ilb.js} +1 -1
- package/dist/assets/{react-BnoWjI1_.js → react-lDmXKsDH.js} +1 -1
- package/dist/assets/{react-CtfVTLhb.js → react-otWFcO3Y.js} +1 -1
- package/dist/assets/{react-D6_PfBEK.js → react-sFkWW8vV.js} +1 -1
- package/dist/assets/{recharts-6oV2OwTy.js → recharts-NoTYHO1X.js} +3 -3
- package/dist/assets/{routePaths-Db_F8Q8U.js → routePaths-DxhKVAQu.js} +1 -1
- package/dist/assets/{sentry-DwScFzsh.js → sentry-BUYxAJ0R.js} +1 -1
- package/dist/assets/{url-uJs8N0Ig.js → url-5YtRx5NC.js} +1 -1
- package/dist/assets/{url-CA34r-nZ.js → url-SyvMap6d.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BWYRRRl-.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CBG7z3tT.js +1 -0
- package/dist/assets/useCashManagementBanner-DO-traME.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-C5IaHrcj.js +1 -0
- package/dist/assets/{useDeviceId-B2Yksaa2.js → useDeviceId-LzGT5z98.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-BOI-L6Xh.js +1 -0
- package/dist/assets/useInitialThreadRequest-BoQP-jON.js +1 -0
- package/dist/assets/{utils-Dwr2wQrV.js → utils-D-CJm-xs.js} +2 -2
- package/dist/assets/{withTransactionSidePanel-NhbBttSf.js → withTransactionSidePanel-IQKxlXVX.js} +4 -4
- package/dist/assets/zeni-epic-state-DcOrwCh7.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/AddressRoutes-ZS1rVxYe.js +0 -1
- package/dist/assets/AddressScreen-BUTfoqVU.js +0 -9
- package/dist/assets/AiCfoScreen-BzpHh1NI.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-BlBr-Pa_.js +0 -1
- package/dist/assets/BillPayRoutes-ClbMaK26.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-Cl8oXTwg.js +0 -9
- package/dist/assets/ChargeCardRoutes-Dty7fFkf.js +0 -71
- package/dist/assets/ConnectionAuthScreen-BgM-EvOD.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-D1nj-yCN.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-CvSaPcYJ.js +0 -23
- package/dist/assets/DefaultTenantHome-BDYLNaqp.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-2D8uEzGS.js +0 -18
- package/dist/assets/DrawerScreen-BJ9U_AyW.js +0 -1
- package/dist/assets/EntityDetailRoutes-CqcMNyXA.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-d-FhPPBr.js +0 -25
- package/dist/assets/FeaturePreviewScreen-BRif0RC-.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-NVwKuO2U.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-BXPx6ksg.js +0 -12
- package/dist/assets/MobileAppDrawer-BpqQJOt0.js +0 -1
- package/dist/assets/NotFoundScreen-D6Lk-Xx8.js +0 -1
- package/dist/assets/OAuthConsentScreen-BAYK5t47.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-m34ge8VY.js +0 -1
- package/dist/assets/PeopleRoutes-CKpCGN6J.js +0 -22
- package/dist/assets/PerformanceRoutes-Bg1k1jyB.js +0 -1
- package/dist/assets/ReferralListScreen-BEpm9VKl.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-B3F2FHuK.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js +0 -1
- package/dist/assets/ReimbursementRoutes-ChEJPAQh.js +0 -68
- package/dist/assets/ReportsRoutes-BF-qA0qu.js +0 -1
- package/dist/assets/RewardsRoutes-C5Chcvbk.js +0 -1
- package/dist/assets/ScreenRoutes-DjL85WV2.js +0 -2
- package/dist/assets/SettingsRoutes-nye6Prnj.js +0 -57
- package/dist/assets/SetupPagesScreen-3PXMmMdF.js +0 -29
- package/dist/assets/SignInScreen-BL4rDn0j.js +0 -1
- package/dist/assets/SignOutScreen-BsM-tb4L.js +0 -9
- package/dist/assets/TaskListScreen-DWO4uefn.js +0 -9
- package/dist/assets/TaskRoutes-Dn9l47zA.js +0 -9
- package/dist/assets/TransactionDetailRoutes-D3TX9qDh.js +0 -1
- package/dist/assets/TransactionListRoutes-BHAgKBjq.js +0 -1
- package/dist/assets/TreasuryRoutes-CnwThTn3.js +0 -37
- package/dist/assets/WiseConfirmationScreen-Bg3y3bh-.js +0 -12
- package/dist/assets/ZeniAccountRoutes-BAi7pBEZ.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-Cb60FSVQ.js +0 -9
- package/dist/assets/dnd-DtFKtvlf.js +0 -6
- package/dist/assets/empty-DBOryUxv.js +0 -1
- package/dist/assets/epic-Cn810zkq.js +0 -2
- package/dist/assets/index-DZkdTIsz.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BVDwvQd1.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CqmbctLX.js +0 -1
- package/dist/assets/useInitialThreadRequest-BDy3pY5w.js +0 -1
- package/dist/assets/zeni-epic-state-DxVQhBoO.js +0 -13
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-Bi6jUyhM.js";import{a as c}from"./sentry-DwScFzsh.js";import{u as me,j as n,i as Ze,g as Ke,h as Je,l as M}from"./core-BQch-SEa.js";import{eS as pe,f2 as Qe,f3 as be,eW as Xe,bn as ea,eR as aa,f4 as ta,f5 as na,f7 as sa,fa as oa,fj as ia,fb as g,fd as ra,fe as le,fh as da,ff as la,fg as ca,fi as ua,cI as fa,fl as ma,cO as pa,eV as ba,fq as ha,fr as Sa,fp as ga}from"./zeni-epic-state-DxVQhBoO.js";import{a8 as Ea,a9 as ka,K as Ca,a as ya,z as k,r as Ia,u as Ta,G as r,i as wa,k as Aa,aa as _a,I as Fa,c as Da,ab as va,a4 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ma,ag as Pa,ah as fe,d as P,a0 as Ra,q as A,ai as R,aj as Na}from"./index-B7xMX0uC.js";import{D as Va}from"./mui-D4v6d6vq.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]="3d6b241d-2ca0-4648-aad6-1eea095d2d27",f._sentryDebugIdIdentifier="sentry-dbid-3d6b241d-2ca0-4648-aad6-1eea095d2d27")}catch{}})();const Ua=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=Ke(),C=Ca(),o=Je(),V=Xe(),m=me(),{useFeatureGate:i}=ya(),U=k.getSignedInUser(),G=ea(U),s=n(e=>pe(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[_,L]=c.useState(void 0),F=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:q}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,q),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=k.getSignedInUser(),v=n(e=>e.tenantState),Ce=n(e=>v.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),W=Aa(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=G||!G&&$e,xe=s.company!=null&&ia(s.company),w=ve&&xe,Me=n(e=>g(e).totalUnreadCount),Pe=n(e=>g(e).reducedFetchCountState),Z=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:J,isLoading:Q,isFetchingMore:X,hasFetchedAll:ee,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(Q===!1&&X===!1&&ee===!0)if(s?.companyId!=null&&J!=null){const e=`dashboard_${s.companyId}`;L(J.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[Q,X,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))},[_,$.fetchState]);const Ve={fetchStatus:Pe,count:Me},ae=t!=null?k.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ue=Fa(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),Ge=F&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!F&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),je=fa(Oe),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,q,s),oe=Da(),Ye=oe&&va(a),ie=pa(Ue?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!k.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[qe,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const He=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Ba(He);return N.jsx(Va,{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:N.jsx(xa,{signedInUser:U,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ce:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:Ge,isSettings:ue(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:qe,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:W,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=Z===0&&K>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=Z===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),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!he)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);fe(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Se(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let p=`/${encodeURIComponent(u)}/`;const x=R(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":fe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:F,updateCurrentChatSessionId:e=>{m(ba({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),qa=f=>{const d=me(),t=n(C=>pe(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Qe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Ua,{...f,...a})};export{qa as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Bi6jUyhM.js";import{h as r,n}from"./core-BQch-SEa.js";import{J as i}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import"./sentry-DwScFzsh.js";import"./zeni-epic-state-DxVQhBoO.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.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]="c14b3791-f16a-4778-9ced-7f24e565014e",o._sentryDebugIdIdentifier="sentry-dbid-c14b3791-f16a-4778-9ced-7f24e565014e")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-Bi6jUyhM.js";import{a as r}from"./sentry-DwScFzsh.js";import{u as j,g as A,j as o,N as C}from"./core-BQch-SEa.js";import{Kn as K,eS as P,fa as x,Ko as z,Kp as D,Kq as M,Kr as R,nh as k,Jj as q}from"./zeni-epic-state-DxVQhBoO.js";import{z as h,F as I}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="8cb80d5f-cc86-49d9-aa5f-123259309107",n._sentryDebugIdIdentifier="sentry-dbid-8cb80d5f-cc86-49d9-aa5f-123259309107")}catch{}})();function ee(){const n=j(),s=A(),{params:t,error:i}=r.useMemo(()=>K(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),S=o(D),c=o(M),[v,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[f?.tenantId,l]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(q(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Bi6jUyhM.js";import{h as K,u as z,g as H,i as X,j as d,n as Z,o as J,p as I}from"./core-BQch-SEa.js";import{eS as O,rm as P,qW as Q,KV as v,qR as S,bs as ee,bn as ae,bT as te,qS as se,KW as oe,KH as C,dF as re,uU as ne,KX as ie,vf as ce,f1 as le,e$ as de}from"./zeni-epic-state-DxVQhBoO.js";import{z as me,Y as fe,$ as pe,I as ue,a as $,G as q,s as he,d as M,ao as Fe,q as ge}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import be from"./NotFoundScreen-D6Lk-Xx8.js";import{F as Ie}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as F}from"./sentry-DwScFzsh.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{u as Se}from"./useInitialThreadRequest-BDy3pY5w.js";import{t as Te}from"./routePaths-Db_F8Q8U.js";import{M as ye}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="e58a14a0-401c-4b82-94fa-ec5943a102dd",s._sentryDebugIdIdentifier="sentry-dbid-e58a14a0-401c-4b82-94fa-ec5943a102dd")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=Z(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(Fe);function U(){const s=K(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=X(),[i,p]=F.useState(!1),[m,u]=F.useState(!1),h=me.getSignedInUser(),y=d(t=>O(t)),w=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!i&&g)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&g&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,g]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=$(),{isFeatureEnabled:j}=N(q.isReportsCommentingEnabled),V=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,_]=F.useState(!1),E=t=>{_(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:G,onAskAiCfoClick:W,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:V,onClickMenuIcon:()=>{E(!0)}})]})}function _e(){const s=d(i=>O(i)),{useFeatureGate:e}=$(),{isFeatureEnabled:a}=e(q.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{_e as PandLWithForecastRoutes,_e as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{KQ as te,eS as Y,jJ as z,f1 as q,e$ as ne,Ig as Q,Ku as oe,tR as Ee,KR as N,tF as ke,t$ as Ie,tV as ie,tJ as re,tZ as Pe,tW as je,KS as le,vG as Te,KT as Le,fE as ve,KU as K,tO as de,tM as ce,u2 as Fe,c1 as Re}from"./zeni-epic-state-DxVQhBoO.js";import{X as pe,a as X,G as E,z as H,i as ue,x as me,ak as ge,al as Ae,w as he,o as A,y as fe,D as Ce,am as Oe,Y as Ve,$ as Ue,s as $e,d as be,f as Ze,q as Be,an as Ke,I as Ge}from"./index-B7xMX0uC.js";import{D as ye,n as M,S as we}from"./mui-D4v6d6vq.js";import ae from"./NotFoundScreen-D6Lk-Xx8.js";import{a as r}from"./sentry-DwScFzsh.js";import{u as ee,i as _e,j as m,h as ze,g as He,n as Me,o as se,p as B}from"./core-BQch-SEa.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as Je}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c65a4845-9392-41b8-81ed-3735d4891b0d",a._sentryDebugIdIdentifier="sentry-dbid-c65a4845-9392-41b8-81ed-3735d4891b0d")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=_e(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),v=Q(u),U=oe(u),$=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:$===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},qe=M(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,Se=M(fe.H6Regular)`
|
|
6
|
-
margin-top: ${A.sp7};
|
|
7
|
-
padding-left: ${A.sp8};
|
|
8
|
-
padding-right: ${A.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=M(fe.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${A.sp8};
|
|
14
|
-
padding-right: ${A.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${A.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Y(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),L=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,$=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:$};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=Me(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function J({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Y(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!q(O,h)&&V,w=Q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[$,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx($e,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Je,{isAppContentDrawerOpen:$,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(K({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Be(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=Ge();return Re(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(B,{path:"/",element:s.jsx(J,{})}),s.jsx(B,{path:"new",element:s.jsx(J,{isInvitePeopleDrawerOpen:!0})}),s.jsx(B,{path:":userId/edit",element:s.jsx(J,{isEditPeopleDrawerOpen:!0})}),s.jsx(B,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(B,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Bi6jUyhM.js";import E from"./NotFoundScreen-D6Lk-Xx8.js";import{a as r}from"./sentry-DwScFzsh.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as q,o as z,p as h}from"./core-BQch-SEa.js";import{eS as F,QG as b,bq as B,bn as N,hq as O,gW as V}from"./zeni-epic-state-DxVQhBoO.js";import{K as $,z as I,$ as G,cF as K}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as W}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.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]="0892b943-623c-4102-a7b0-158e00820c64",e._sentryDebugIdIdentifier="sentry-dbid-0892b943-623c-4102-a7b0-158e00820c64")}catch{}})();const H=q(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(K),J=()=>{const e=_(),t=v(),c=$(),o=p(a=>F(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),g=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,T)=>{g(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(g(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),f=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=Q({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:S,handleDrawerToggle:f}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function fe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{fe as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{a as o}from"./sentry-DwScFzsh.js";import{j as f,h as H,u as L,g as N,n as V}from"./core-BQch-SEa.js";import{m as M,X as W,z as R,bb as _,w as $,Y as U,$ as z,s as K,d as l,f as Y,a8 as q,bc as X}from"./index-B7xMX0uC.js";import{f5 as G,eS as J,Nj as P,Nk as Q,uK as Z,uA as g,f7 as ee,bO as ae,uF as re,Nl as ne}from"./zeni-epic-state-DxVQhBoO.js";import{D as te,e as se,n as oe,S as ie}from"./mui-D4v6d6vq.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as ce}from"./MobileAppDrawer-BpqQJOt0.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]="1ffaa19e-f523-4d97-bbce-cba35bc56040",e._sentryDebugIdIdentifier="sentry-dbid-1ffaa19e-f523-4d97-bbce-cba35bc56040")}catch{}})();const de={overlayWidth:new $(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>G(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=V(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(q(X));function Se({isReferralDrawerOpen:e}){const a=H(),r=L(),n=N(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,b]=o.useState(!1),w=R.getSignedInUser(),h=f(t=>J(t)),C=f(t=>P(t)),m=C.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=Q([C,p]),{areTenantIdsInSync:d}=U();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{b(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),S=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,v,F)=>{F.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(K,{analytics:l,onLoad:t=>(v=>{w!=null&&v.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:S}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{b(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{Se as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Bi6jUyhM.js";import R from"./NotFoundScreen-D6Lk-Xx8.js";import{a as p}from"./sentry-DwScFzsh.js";import{h as I,g as C,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-BQch-SEa.js";import{eS as O,Od as S,Ot as g,DH as T,CQ as V,DG as d,Dx as U,OJ as _}from"./zeni-epic-state-DxVQhBoO.js";import{m as $,z as B,B as N,a8 as W,bS as z,af as G}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-BDsrYfnH.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]="6ec646bb-8ab6-4151-829e-59b9f94dd863",e._sentryDebugIdIdentifier="sentry-dbid-6ec646bb-8ab6-4151-829e-59b9f94dd863")}catch{}})();const m="reimbursement-approval-rule-update",H=E(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:g(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{G(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(d(s)),a(`./${s}/edit`)):(e(d()),a("./new"))}}})(W(z)),J=()=>{const e=I(),r=C(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>O(n)),w=$(),i=u(n=>S(n)),h=u(n=>g(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(d())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,P,x)=>{n.endsWith(m)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(J,{})}),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 +0,0 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-Bi6jUyhM.js";import{a as y}from"./sentry-DwScFzsh.js";import{h as A,u as w,g as T,i as U,j as b,n as E}from"./core-BQch-SEa.js";import{Ot as D,Od as C,DA as x,DJ as _,DH as S,DI as h,Ou as B}from"./zeni-epic-state-DxVQhBoO.js";import{z as O,m as k,B as V,bJ as j,af as F}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.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]="236b2454-9329-48a3-9357-d75245c3ed9e",e._sentryDebugIdIdentifier="sentry-dbid-236b2454-9329-48a3-9357-d75245c3ed9e")}catch{}})();function $(e){return B(e)==null}const N=E(function(e,a){const t=D(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=F(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function G(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=O.getSignedInUser(),l=k(),r=b(p=>D(p)),i=b(p=>C(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(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(N,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,$ as i};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{h as q,u as me,g as V,i as Y,j as w,N as M,n as J,l as mt,o as ct,p as E}from"./core-BQch-SEa.js";import{eS as W,OK as ce,c1 as de,CL as Te,jU as dt,CY as se,CX as ie,OL as ut,bn as ue,fP as je,OM as pt,L5 as bt,jJ as Fe,L6 as ye,L7 as gt,iE as ht,N$ as ft,iT as St,Cz as It,td as yt,iL as Rt,Dj as Ue,ON as Le,OO as At,OP as kt,OQ as vt,OR as Ct,OS as Et,D3 as Re,iZ as wt,O8 as xt,CZ as Bt,CJ as Dt,OT as Tt,CI as jt,OU as Ft,CR as Ae,D7 as Ut,D6 as Lt,D2 as Pt,OV as Pe,Ig as $t,bq as Ot,CU as Mt,DB as _t,OW as Nt,OX as zt,Df as Gt,Dc as ke,Nu as Zt,CG as Ht,OY as $e,D_ as ve,E6 as Vt,OZ as Wt,O_ as Z,O$ as qt,P0 as Oe,P1 as Jt,P2 as Me,P3 as _e,Dr as oe,bu as Kt,bG as pe,cB as be,f1 as Ne,e$ as ze,P4 as Xt,gW as Yt,NH as Qt,P5 as en,P6 as Ge,NL as tn,Ot as nn,P7 as an,OJ as sn,E3 as Ce,E2 as on,P8 as rn,P9 as ln,Pa as mn,Pb as cn,Pc as dn,Oe as un,DV as pn,DZ as bn,bs as gn,bF as hn,cw as fn,ck as Sn,bt as In,K0 as yn,cL as Rn,cO as An,cN as kn,cv as vn}from"./zeni-epic-state-DxVQhBoO.js";import{K as Ze,X as He,a as Q,G as k,z as O,bT as Ve,s as ee,d as v,aH as Ee,o as j,at as X,x as Cn,D as We,bU as En,q as H,$ as qe,bV as wn,I as te,bW as xn,Y as Bn,w as Dn,B as ge,f as Je,a8 as Tn,bk as jn,a3 as Fn,m as Ke,bX as Un,i as Ln}from"./index-B7xMX0uC.js";import{n as _,S as Pn}from"./mui-D4v6d6vq.js";import re from"./NotFoundScreen-D6Lk-Xx8.js";import{S as we}from"./SetupPagesScreen-3PXMmMdF.js";import{F as Xe}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as f}from"./sentry-DwScFzsh.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{u as Ye}from"./useInitialThreadRequest-BDy3pY5w.js";import{D as $n}from"./DrawerScreen-BJ9U_AyW.js";import{M as Qe}from"./MobileAppDrawer-BpqQJOt0.js";import{R as On}from"./ReimbursementApprovalRoutes-B3F2FHuK.js";import{FallBackRoute as Mn}from"./ScreenRoutes-DjL85WV2.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";import"./analyticsHelper-CSJ-Oqa_.js";import"./routePaths-Db_F8Q8U.js";import"./BusinessVerificationPageScreen-Cl8oXTwg.js";import"./ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js";import"./getLocaleForTenant-DDy24EaJ.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]="29b61985-6ba8-4963-816f-417e453ba52b",e._sentryDebugIdIdentifier="sentry-dbid-29b61985-6ba8-4963-816f-417e453ba52b")}catch{}})();const et=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=We.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=O.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=je(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const D=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:D,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=O.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Ue(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ye("common"))},onCancelAutoComplete:()=>{e(ye("common"))}}}})(En);function xe(){const e=q(),t=me(),n=V(),{reimbursementId:r}=Y(),d=Ze(),c=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:D,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=V().pathname,T=x.includes("edit"),A=x.includes("reimbursement/new"),[F,B]=f.useState(!1),C=O.getSignedInUser(),I=w(p=>W(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!F||T&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Te(!1,b,R,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(G=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&G.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:D,onAskAiCfoClick:u})})]})}const zn=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
6
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,Gn=_.div`
|
|
8
|
-
position: fixed;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
background-color: ${Cn.overlayBackgroundBlack};
|
|
14
|
-
z-index: 5;
|
|
15
|
-
`,Zn=_.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
width: 42%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
z-index: 6;
|
|
22
|
-
display: flex;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
`,Hn=_.div`
|
|
26
|
-
position: fixed;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
right: 0;
|
|
30
|
-
bottom: 0;
|
|
31
|
-
z-index: 11;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,Vn=_.button`
|
|
37
|
-
align-self: flex-end;
|
|
38
|
-
background: none;
|
|
39
|
-
border: none;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: ${j.sp2} ${j.sp3};
|
|
42
|
-
line-height: 1;
|
|
43
|
-
color: ${e=>e.theme.colors.hero};
|
|
44
|
-
&:hover {
|
|
45
|
-
color: ${e=>e.theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
svg {
|
|
48
|
-
width: ${j.sp4};
|
|
49
|
-
height: ${j.sp4};
|
|
50
|
-
}
|
|
51
|
-
`,Wn=_.div`
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: column;
|
|
54
|
-
width: 100%;
|
|
55
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=J(function(e,t){const n=Pe(e,t.reimbursementId),r=O.getSignedInUser(),d=ue(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Nt(n.remiActivities,zt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Le());const a=et(o),i=H(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ke(n,a.type,"")):e(ke(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=H(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Ue(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Jn(){const e=q(),t=me(),n=V(),r=n.hash.substring(1),d=Ze(),{reimbursementId:c}=Y(),m=O.getSignedInUser(),o=w(y=>W(y)),a=w(y=>Pe(y,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ye(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=he({mobileExploreReferrer:"Reimbursement Details"});qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=Q(),{isFeatureEnabled:D}=h(k.isLimitedCategoryForReimbursement),[u,x]=f.useState(!1),[T,A]=f.useState(!1),[F,B]=f.useState(!1),{isFeatureEnabled:C}=h(k.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(k.isShowDeletedReimbursementsFeatureEnabled),g=w(y=>ce(y,c??"")),L=$t(o),P=Ot(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(x(!0),t(Mt(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&L===!1?B(!1):B(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(P||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,P,o.isZeni,L,m]),f.useEffect(()=>{T||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(Te(!1,D,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(_t(!1,!0,!0,a.lastUpdatedByUserId)))},[T,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(M,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Ve,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:y=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(y)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:C,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:R})]})}const Kn=J(function(e,t){return{remisReviewView:$e(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(Z())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(ve("approved",r??""));break;case"reject":e(ve("rejected",r??""))}}}})(xn);function Xn(){const e=q(),t=w(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(c=>$e(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Kn,{navigate:e,analytics:v,isAdmin:d})}const z=tn(),tt="bulk-operation-update",le="reimbursement-approval-rule-update",{spendManagement:Yn,common:Be}=We.getLocalizedStrings(),De=Yn.reimbursement.bulkActions,Qn=_.div`
|
|
57
|
-
display: flex;
|
|
58
|
-
min-height: 100%;
|
|
59
|
-
width: 100%;
|
|
60
|
-
flex: 1 1 auto;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
align-items: center;
|
|
63
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=J(function(e,t){const n=_e(e,z,t.isBulkActionEnabled);let r=n.allSubTabs;const d=O.getSignedInUser(),c=ue(d),m=e.tenantState.currentTenantId,o=W(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,R=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:z,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:R.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e(Oe(o))},onSubtabChange:o=>{e(Z()),e(Me(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=H(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=H(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=H(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(Ce("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ce("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(sn(!1))},onEventReceived:o=>{o===tt&&e(an())}}})(Tn(jn));function ta(){const e=q(),t=me(),n=V(),r=n.state,d=He(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=qt(r.tab.toString());S!=null?t(Oe(S)):console.log("Warning:Not a valid remiListTab");const N=Jt(r.subTab.toString());N!=null?t(Me(N)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(Z())}},[]);const{useFeatureGate:a}=Q(),{isFeatureEnabled:i}=a(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(k.isBillPayCommentingEnabled),{isFeatureEnabled:R}=a(k.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(k.isReimbursementBulkActionEnabled),D=O.getSignedInUser(),u=w(S=>W(S)),[x,T]=f.useState(!1),[A,F]=f.useState(!1),B=te(),C=B?.loggedInUserRole?.includes("admin")===!0,I=w(S=>_e(S,z,h)),{areTenantIdsInSync:g}=Bn(),L=I.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:$}=he({mobileExploreReferrer:"Reimbursement List"});if(qe({isDataReady:L==="Completed"}),f.useEffect(()=>{!A&&g&&(F(!0),t(oe(z,!0,l,!1,!0)))},[A,z,t,g]),D==null)throw Error("Can't access address page without signing in...");const y=!!u?.userRole&&Kt(u),p=pe(B?.loggedInUserRoleMap),G=be(B?.loggedInUserRoleMap),ne=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,ae=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=w(S=>je(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,fe=S=>{T(S)},{isFeatureEnabled:it}=a(k.isDebitCardFeatureEnabled),ot=Ne(it,u),rt=ze(u),{remisProcessed:K,remisProcessing:Se}=w(S=>Xt(S));f.useEffect(()=>{K===Se&&c!=null&&(t(Yt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:K>1?De.reports:De.report},{variableName:"_has_",variableValue:K>1?Be.texts.have:Be.texts.has},{variableName:"_action_",variableValue:Qt(c)}]})),t(en()),setTimeout(()=>{t(oe(z,!0,l,!1,!0,!0))},3e3),m(null))},[K,Se]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${tt}`,`private-encrypted-${u.companyId}.${le}`]:[],eventCallback:(S,N,Ie)=>{S.endsWith(le)?Ie.onReimbursementApprovalRulesEventReceived?.(S):N.entity_type==="reimbursement"&&(m(N.operation_type),Ie.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Xe,{}):ae&&(!y||p)||G&&ne?s.jsxs(s.Fragment,{children:[L==="Completed"?s.jsx(ee,{analytics:v,onLoad:S=>(N=>N.trackPageLoaded(Je.Event.reimbursementHome))(S)}):null,s.jsx(Qe,{isAppContentDrawerOpen:x,handleDrawerToggle:fe}),s.jsxs(Qn,{windowSize:d,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Dn(0,0,300,600),onClose:()=>{e("./"),t(Z())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Xn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:R,location:n,navigate:e,currentTenant:u,period:z,isAdmin:C,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{fe(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:P,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(M,{to:"../setup"}):B!=null&&Ge(u,B.loggedInUserRoleMap)?s.jsx(M,{to:"../promo"}):s.jsx(ge,{fetchState:"In-Progress"}):s.jsx(re,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=_(Pn)`
|
|
65
|
-
display: flex;
|
|
66
|
-
min-height: 100%;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
`,ia=J(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=q(),t=V(),{tenantEmailDomain:n}=Y(),r=Ke(),[d,c]=f.useState(!1),m=w(A=>W(A)),o=O.getSignedInUserTenant(n)?.companyId??m.companyId,a=O.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),R=pe(b?.loggedInUserRoleMap),h=be(b?.loggedInUserRoleMap),D=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,x=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,T=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&D?s.jsx(M,{to:"../../../reimbursements"}):x&&R?s.jsx(M,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!x||m.userReimbursementInfo&&h&&D===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:v,onLoad:A=>(F=>F.trackPageLoaded(Je.Event.reimbursementPromoPage))(A)}),s.jsx(Qe,{isAppContentDrawerOpen:d,handleDrawerToggle:T}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{T(!0)}})]}):s.jsx(ge,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=w(ae=>W(ae)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=Q(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=Ne(a,e),l=ze(e),b=e?.userRole!=null&&gn(e?.userRole),R=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),D=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=pe(t?.loggedInUserRoleMap),x=D&&u,{isFeatureEnabled:T}=m(k.isDepositAccountsFeatureEnabled),A=T&&!b&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b,B=F&&In(t?.loggedInUserRoleMap),C=yn(t?.loggedInUserRoleMap),I=Rn(t?.loggedInUserRoleMap),g=An(t?.loggedInUserRoleMap),L=kn(t?.loggedInUserRoleMap),P=vn(t?.loggedInUserRoleMap),$=be(t?.loggedInUserRoleMap),y=F&&L,{tenantEmailDomain:p}=Y(),G=V(),ne=n===!0&&(u||$&&c);return s.jsxs(ct,{children:[G.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(we,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:C,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(we,{isBillPayAdminLevelAccess:R,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:C,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(oa,{})}),s.jsx(E,{path:"approval-rules/*",element:x?s.jsx(On,{}):s.jsx(Mn,{isUserHasZeniAccountsAccess:I,isUserHasBillPayAccess:P,isUserHasReimbursementAccess:$,isUserHasTreasuryAccess:g,isTenantBankingOnly:i,showChargeCardRoute:y,tenantEmailDomain:p??""})}),ne&&s.jsx(E,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Xe,{})}),t!=null&&Ge(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(M,{to:"../promo"})}),d&&u&&s.jsx(E,{path:"*",element:s.jsx(M,{to:"../setup"})})]}):G.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(xe,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Jn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(xe,{})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]}):s.jsx(E,{path:"*",element:s.jsx(ge,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]})}export{Pa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-Bi6jUyhM.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as G}from"./core-BQch-SEa.js";import{eS as L,fg as I,Kt as Te,jJ as Q,p$ as X,qQ as F,jx as Re,iB as Oe,ue as W,qV as Ae,bs as Fe,Ku as ke,bn as De,vn as je,Kv as Ee,Kw as Pe,u6 as Me,Kx as Y,Ky as Le,Kz as ve,KA as Be,KB as Ke,KC as S,KD as k,KE as D,KF as H,KG as j,KH as E,dF as Ue,v3 as Ve,uT as N,uU as $,v9 as xe,uY as q,vf as ze,KI as Ge,KJ as Ye,KK as He,KL as Ne,KM as $e,f1 as qe,e$ as Ze}from"./zeni-epic-state-DxVQhBoO.js";import{M as Je,N as Qe,T as Xe,U as We,X as ea,a as ee,G as P,z as ae,Y as aa,I as sa,c as ta,Z as oa,$ as na,s as ra,d as M,f as ia,a0 as la,q as se,a1 as ca,a2 as da,a3 as pa}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import fa from"./NotFoundScreen-D6Lk-Xx8.js";import{F as ma}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as _}from"./sentry-DwScFzsh.js";import{u as ua}from"./useInitialThreadRequest-BDy3pY5w.js";import{t as Z,a as J,b as _a}from"./routePaths-Db_F8Q8U.js";import{M as ha}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.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]="ddcd76b3-99a2-4b2d-b1f9-483c19bf816d",e._sentryDebugIdIdentifier="sentry-dbid-ddcd76b3-99a2-4b2d-b1f9-483c19bf816d")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e(Ne()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(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:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.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(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(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(Ve({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,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{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(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({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(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(W())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>L(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),K=d(n=>Q(n)),O=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),A=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(W());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,K,O]);const U=sa(),de=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),V=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Je(he??"")==="reports",be=Qe(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:V}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}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}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=qe(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Bi6jUyhM.js";import{a as x,z as w,aN as y,s as E,d as p,f as F,cQ as R,G as L}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import l from"./NotFoundScreen-D6Lk-Xx8.js";import{a as d}from"./sentry-DwScFzsh.js";import{u as P,j as b,h as T,g as U,n as V,o as z,p as u}from"./core-BQch-SEa.js";import{eS as A,Ri as C,NU as G,Rj as _,uK as Y,f7 as K,Rk as O,uI as Q}from"./zeni-epic-state-DxVQhBoO.js";import{R as j}from"./ReferralListScreen-BEpm9VKl.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";import"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import"./MobileAppDrawer-BpqQJOt0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="91b1e5ea-ac3d-4711-989a-02ab9edc168d",a._sentryDebugIdIdentifier="sentry-dbid-91b1e5ea-ac3d-4711-989a-02ab9edc168d")}catch{}})();const q=V(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{a(_()),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)}a(Q())},onUpdateInviteFormLocalData:s=>{a(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(R),B=()=>{const a=P(),[t,n]=d.useState(!1),[o,s]=d.useState(!1),r=b(i=>A(i)),c=T(),k=U(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),N=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),v=G(S);d.useEffect(()=>{a(_()),r?.rewardsLastViewedTime==null&&o===!1&&(a(Y()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),a(K(!0)))},[m.fetchState,a]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[m.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:i=>(I=>I.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,e.jsx(q,{navigate:c,location:k,currentTenant:r,companyName:D,userName:N,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:v.maxAnnualPercentageYield})]})};function ua(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(L.isReferralFeatureEnabled);return e.jsxs(z,{children:[e.jsx(u,{path:"/",element:t?e.jsx(j,{}):e.jsx(l,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(l,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(l,{})}),e.jsx(u,{path:"*",element:e.jsx(l,{})})]})}export{ua as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-IvQbF0p5.js","assets/sentry-DwScFzsh.js","assets/core-BQch-SEa.js","assets/zeni-epic-state-DxVQhBoO.js","assets/index-B7xMX0uC.js","assets/mui-D4v6d6vq.js","assets/analytics-CGnNJ1B3.js","assets/utils-Dwr2wQrV.js","assets/withTransactionSidePanel-NhbBttSf.js","assets/useAskAiCfoHostNavButtonProps-CqmbctLX.js","assets/TransactionDetailScreen-Cqi8jdTb.js","assets/decodeURIComponentSafe-BlZKyc9K.js","assets/routePaths-Db_F8Q8U.js","assets/NotFoundScreen-D6Lk-Xx8.js","assets/useInitialThreadRequest-BDy3pY5w.js","assets/analyticsHelper-CSJ-Oqa_.js","assets/CompanyPassportScreen-D3FPR-Qo.js","assets/MobileAppDrawer-BpqQJOt0.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BVDwvQd1.js","assets/FeaturePreviewScreen-BRif0RC-.js","assets/ReferralListScreen-BEpm9VKl.js","assets/index-R6GjjTB3.css","assets/BillPayRoutes-ClbMaK26.js","assets/AddressScreen-BUTfoqVU.js","assets/DomesticWireDetailScreen-2D8uEzGS.js","assets/DrawerScreen-BJ9U_AyW.js","assets/SetupPagesScreen-3PXMmMdF.js","assets/BusinessVerificationPageScreen-Cl8oXTwg.js","assets/BillPayApprovalRoutes-BlBr-Pa_.js","assets/ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js","assets/getLocaleForTenant-DDy24EaJ.js","assets/ReimbursementRoutes-ChEJPAQh.js","assets/ReimbursementApprovalRoutes-B3F2FHuK.js","assets/TransactionListRoutes-BHAgKBjq.js","assets/ZeniAccountStatementScreen-Cb60FSVQ.js","assets/SettingsRoutes-nye6Prnj.js","assets/accountMappingHelper-DB6fTWzq.js","assets/QBOConnectionScreen-CbpqcU_N.js","assets/empty-CnUVdn1j.js","assets/index-BJcfizgW.js","assets/url-CA34r-nZ.js","assets/index-DZkdTIsz.js","assets/ReportsRoutes-BF-qA0qu.js","assets/ChargeCardRoutes-Dty7fFkf.js","assets/PeopleRoutes-CKpCGN6J.js","assets/ExpenseAutomationRoutes-d-FhPPBr.js","assets/TreasuryRoutes-CnwThTn3.js","assets/VendorsRoutes-bYzT2YYR.js","assets/pathToGoBack-iBZHU0oy.js","assets/ZeniAccountRoutes-BAi7pBEZ.js","assets/AddressRoutes-ZS1rVxYe.js","assets/PandLWithForecastRoutes-m34ge8VY.js","assets/CustomerOnboardingRoutes-CvSaPcYJ.js","assets/TransactionDetailRoutes-D3TX9qDh.js","assets/EntityDetailRoutes-CqcMNyXA.js","assets/NotificationRoutes-DAaLYP16.js","assets/PerformanceRoutes-Bg1k1jyB.js","assets/RewardsRoutes-C5Chcvbk.js","assets/TaskRoutes-Dn9l47zA.js","assets/TaskListScreen-DWO4uefn.js","assets/AiCfoScreen-BzpHh1NI.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as as,eS as ts,f1 as rs,e$ as is,fK as os,eW as ls,cP as pe,cw as cs,fh as ds,co as us,bE as ms,bo as _s,fm as Es,v as ps,J$ as As,bs as hs,K0 as Is,bG as gs,fj as xs,bF as Ts,bt as js,ck as Rs,K1 as Us,K2 as Ds,cL as fs,cO as ys,cN as bs,cv as Cs,cB as Hs,nh as Ae,eZ as he,fU as vs,fq as Ie,fR as ge,fS as xe,fr as Os}from"./zeni-epic-state-DxVQhBoO.js";import{j as e}from"./liveblocks-Bi6jUyhM.js";import{a as v}from"./sentry-DwScFzsh.js";import{u as Ps,h as Fs,i as Ls,g as ks,j as G,l as Te,N as c,o as Bs,p as t}from"./core-BQch-SEa.js";import{m as Ss,u as Vs,z as D,a as Ns,c as ws,k as Zs,G as B,i as Ms,I as Gs,L as F,D as je,t as m,P as $s,d as Q,l}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{f as Re}from"./analyticsHelper-CSJ-Oqa_.js";import{t as zs}from"./getLocaleForTenant-DDy24EaJ.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new r.Error().stack;j&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[j]="f78a06f7-83cb-4529-8d73-29c684387af9",r._sentryDebugIdIdentifier="sentry-dbid-f78a06f7-83cb-4529-8d73-29c684387af9")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-IvQbF0p5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-ClbMaK26.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-ChEJPAQh.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-BHAgKBjq.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-nye6Prnj.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-BF-qA0qu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-Dty7fFkf.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-CKpCGN6J.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-d-FhPPBr.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-CnwThTn3.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-bYzT2YYR.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BAi7pBEZ.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ws=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],X=r=>{"requestIdleCallback"in window?requestIdleCallback(r):setTimeout(r,100)},Ys=l(()=>n(()=>import("./ReportsRoutes-BF-qA0qu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),qs=l(()=>n(()=>import("./AddressRoutes-ZS1rVxYe.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),Js=l(()=>n(()=>import("./PeopleRoutes-CKpCGN6J.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),Qs=l(()=>n(()=>import("./PandLWithForecastRoutes-m34ge8VY.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),Xs=l(()=>n(()=>import("./CustomerOnboardingRoutes-CvSaPcYJ.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),en=l(()=>n(()=>import("./VendorsRoutes-bYzT2YYR.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),sn=l(()=>n(()=>import("./TransactionDetailRoutes-D3TX9qDh.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CqcMNyXA.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),nn=l(()=>n(()=>import("./DashboardRoutes-IvQbF0p5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),De=l(()=>n(()=>import("./BillPayRoutes-ClbMaK26.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),an=l(()=>n(()=>import("./SettingsRoutes-nye6Prnj.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),fe=l(()=>n(()=>import("./ReimbursementRoutes-ChEJPAQh.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),tn=l(()=>n(()=>import("./ZeniAccountRoutes-BAi7pBEZ.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),rn=l(()=>n(()=>import("./TreasuryRoutes-CnwThTn3.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),on=l(()=>n(()=>import("./TransactionListRoutes-BHAgKBjq.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ln=l(()=>n(()=>import("./ChargeCardRoutes-Dty7fFkf.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),cn=l(()=>n(()=>import("./NotificationRoutes-DAaLYP16.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),dn=l(()=>n(()=>import("./PerformanceRoutes-Bg1k1jyB.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),un=l(()=>n(()=>import("./ExpenseAutomationRoutes-d-FhPPBr.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),mn=l(()=>n(()=>import("./RewardsRoutes-C5Chcvbk.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),_n=l(()=>n(()=>import("./TaskRoutes-Dn9l47zA.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),En=l(()=>n(()=>import("./AiCfoScreen-BzpHh1NI.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),b=l(()=>n(()=>import("./NotFoundScreen-D6Lk-Xx8.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),pn=l(()=>n(()=>import("./TaskListScreen-DWO4uefn.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function Vn({setTenantEmailDomain:r}){const j=Ps(),S=Fs(),{tenantEmailDomain:o}=Ls(),V=Ss().mode,{setLoading:C,clearAllLoading:O,clearLoading:N}=Vs(),y=D.getSignedInUserTenant(o)?.tenantId,x=D.getSignedInUser(),ee=as(x),$=ks(),[w,be]=v.useState(!1),i=G(a=>ts(a)),{useFeatureGate:L}=Ns(),Y=ws(),se=Zs(),{isFeatureEnabled:Ce}=L(B.isDepositAccountsFeatureEnabled),{isFeatureEnabled:He}=L(B.isTreasuryEnabled),{isFeatureEnabled:ve}=L(B.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=L(B.isDebitCardFeatureEnabled),R=G(a=>a.tenantState.fetchState),T=G(a=>a.tenantState.activeTenantFetchState.fetchState),_=T==="Completed"||R==="Completed"?rs(ne,i):void 0,q=T==="Completed"||R==="Completed"?is(i):void 0,Oe=Ms(i,ve,ne),{isFeatureEnabled:Pe}=L(B.isSettingsFeatureEnabled),{isFeatureEnabled:Fe}=L(B.isAiCfoFileUploadEnabled),z=G(a=>os(a));if(o!=null){const a=D.getSignedInUserTenant(o);x!=null&&a!=null&&Re(x,i,V)}const M={tenantId:y,userId:x?.userId,sessionId:x?.zeniSessionId},ae=ls(),E=Gs(),Le=i.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),ke=cs(E?.loggedInUserRoleMap),te=v.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Be=G(a=>M.tenantId!=null?ds(a,M.tenantId):void 0);v.useEffect(()=>{C(F.TENANT_FETCHING),r(o)},[o]),v.useEffect(()=>{if(J!=null&&y!=null){const a=J.params.selectedPeriod;if(a!=null){const U=a.split("-");if(U.length===2){const d=us(Number(U[0])),s=Number(U[1]),u=ms(`01-${d<10?`0${d}`:d}-${s}`,je.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),Z=_s();u.isAfter(Z,"month")===!1?j(Es(y,{month:d,year:s})):S("./month_end_close_checks/review")}}}},[J,y]),v.useEffect(()=>{w||(be(!0),C(F.TENANT_FETCHING)),te.current?te.current=!1:!ps(ae,M)&&D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s){if(he(U?.userId,U?.zeniSessionId,a.tenantId),d(vs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&m.clearTenant(a.tenantId),a.tenantId!=null){const u=D.getSignedInUserTenantWithId(a.tenantId);s&&je.updateAppLocaleID(zs(s)),u?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(u?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(M,x,j,Be))},[M,ae,x,j,D]),v.useEffect(()=>{D.isSignedIn()&&(C(F.TENANT_FETCHING),function(a,U,d,s,u,Z,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const K=s!=null&&u?.zeniSessionId!=null,es=d==null||d.tenantId!==s,ss=d!=null&&d.excludedResources==null,ns=d!=null&&d.externalConnections==null;if(K&&es){k(Ie(s));const W=D.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),he(u?.userId,u?.zeniSessionId,s),m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)))}else K&&ss&&m.shouldFetchExcludedResources(s)&&(m.markExcludedResourcesFetchStarted(s),k(ge(u.userId,s))),K&&ns&&m.shouldFetchConnections(s)&&(m.markConnectionsFetchStarted(s),k(xe(u.userId,s)));if(K){Q.identify(u.userId,{tenant_id:s});const W=s==null||s!=null&&(U==="Completed"||U==="Error");a==="Completed"||U!=="Not-Started"&&U!=="Error"||s==null||!m.shouldFetchActiveTenant(s)||(m.markActiveTenantFetchStarted(s),Z(F.TENANT_FETCHING),k(Os(u.userId,s,u.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&m.shouldFetchAllTenants()&&(m.markAllTenantsFetchStarted(),k(Ae(u.userId,u.zeniSessionId)))}}(R,T,i,y,x,C,j))},[y,T]),v.useEffect(()=>{D.isSignedIn()&&R==="Completed"&&z.tenantsBaseInOrder.length>0&&(N(F.TENANT_FETCHING),D.saveSignedInUserTenants(As(z.tenantsBaseInOrder)),x!=null&&Re(x,i,V,void 0,z.tenantsBaseInOrder))},[z,R,i,x]),v.useEffect(()=>{T==="In-Progress"&&C(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&y!=null?(O(),m.markActiveTenantFetchCompleted(y)):T==="Error"&&y!=null&&(m.markActiveTenantFetchFailed(y),N(F.TENANT_FETCHING),N(F.TENANT_SWITCHING))),R!=="Completed"&&R!=="Error"||(R==="Completed"?m.markAllTenantsFetchCompleted():R==="Error"&&m.markAllTenantsFetchFailed())},[T,R,y,w]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&T==="Completed"&&w&&(ie.current=!0,function(a=Ws,U=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const u=a[s],Z=Ks[u];Z!=null?Z().then(()=>X(()=>d(s+1))).catch(()=>X(()=>d(s+1))):d(s+1)};X(()=>d(0))},U)}())},[T,w]);const H=i?.userRole!=null&&hs(i?.userRole),{isFeatureEnabled:Se}=L(B.isReferralFeatureEnabled),Ve=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Ne=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&pe(i.userRole),oe=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!H,le=Oe&&!H,we=Is(E?.loggedInUserRoleMap),Ze=i.externalConnections?.accounting[0]?.isValid,ce=i.company?.companyOnboardingInfo.isOnboardingCompleted,de=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!H,ue=de&&gs(E?.loggedInUserRoleMap),me=Ce&&!H,Me=i.company!=null&&xs(i.company),Ge=He&&Me===!0&&!H,$e=oe&&Ts(E?.loggedInUserRoleMap),ze=le&&js(E?.loggedInUserRoleMap),Ke=me&&Rs(E?.loggedInUserRoleMap),We=Us(E?.loggedInUserRoleMap),Ye=Ds(E?.loggedInUserRoleMap),p=fs(E?.loggedInUserRoleMap),A=ys(E?.loggedInUserRoleMap),qe=bs(E?.loggedInUserRoleMap),h=Cs(E?.loggedInUserRoleMap),I=Hs(E?.loggedInUserRoleMap),_e=oe&&h,Ee=de&&I,Je=me&&p,Qe=Ge&&A,g=le&&qe,Xe=i.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||ke===!0||we===!0||We===!0||Ye===!0;return D.isSignedIn()?y==null?R==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(x!=null&&R!=="In-Progress"&&j(Ae(x.userId,x.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||R==="Completed"?(ce===!0||ee&&!re)&&Ze===!1&&_===!1&&q===!1?(r(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!w||ce!==!1||re||ee?w&&i?.userRole&&_!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Bs,{children:e.jsxs(t,{element:e.jsx($s,{}),children:[e.jsx(t,{path:"/",element:e.jsx(An,{isDashboardAccess:P,isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,isTenantCardsOnly:q,showChargeCardRoute:g})}),e.jsx(t,{path:"dashboard/*",element:P?e.jsx(nn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:P?e.jsx(Ys,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:Xe||P?e.jsx(Js,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:P?e.jsx(Qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(Xs,{})}),e.jsx(t,{path:"transaction/*",element:P&&H===!1||Ve||Ne?e.jsx(sn,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:P&&H===!1?e.jsx(on,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:P&&H===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isTenantBankingOnly:_,isUserHasTreasuryAccess:A,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:P&&H===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(pn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"address/*",element:$e||ue||Ke||ze?e.jsx(qs,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:Je?e.jsx(tn,{}):e.jsx(b,{})}),e.jsx(t,{path:"treasury/*",element:Qe?e.jsx(rn,{}):e.jsx(b,{})}),e.jsx(t,{path:"performance",element:se===!0?e.jsx(dn,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:se===!0&&H===!1?e.jsx(un,{}):e.jsx(ye,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(cn,{})}),e.jsx(t,{path:"vendors/*",element:Le?e.jsx(en,{}):e.jsx(b,{})}),e.jsx(t,{path:"bill/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:_e?e.jsx(De,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(fe,{}):e.jsx(f,{isUserHasZeniAccountsAccess:p,isUserHasBillPayAccess:h,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:A,isTenantBankingOnly:_,showChargeCardRoute:g,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Pe?e.jsx(an,{hasAdminLevelAccess:ue}):e.jsx(b,{})}),e.jsx(t,{path:"cards/*",element:g?e.jsx(ln,{}):e.jsx(b,{})}),e.jsx(t,{path:"rewards/*",element:Se?e.jsx(mn,{}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/",element:Y?e.jsx(c,{to:"explore"}):e.jsx(b,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Y?e.jsx(En,{isFileUploadEnabled:Fe}):e.jsx(b,{})}),e.jsx(t,{path:"*",element:e.jsx(b,{})})]})}):null:(r(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),r(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const An=({isDashboardAccess:r,isUserHasZeniAccountsAccess:j,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:V,isTenantBankingOnly:C,isTenantCardsOnly:O,showChargeCardRoute:N})=>C===!0&&j?e.jsx(c,{to:"checking"}):O===!0&&N?e.jsx(c,{to:"cards"}):r?e.jsx(c,{to:"dashboard"}):j?e.jsx(c,{to:"checking"}):V?e.jsx(c,{to:"treasury"}):N?e.jsx(c,{to:"cards"}):S?e.jsx(c,{to:"bills"}):o?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),f=({isUserHasZeniAccountsAccess:r,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:o,isTenantBankingOnly:V,showChargeCardRoute:C,tenantEmailDomain:O})=>V===!0||r?e.jsx(xn,{tenantEmailDomain:O}):o?e.jsx(gn,{tenantEmailDomain:O}):C?e.jsx(Tn,{tenantEmailDomain:O}):j?e.jsx(In,{tenantEmailDomain:O}):S?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(b,{}),hn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/reimbursements`}),In=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/bills`}),gn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/treasury`}),xn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/checking`}),Tn=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/cards`}),ye=({tenantEmailDomain:r})=>e.jsx(c,{to:`/${r}/dashboard`});export{f as FallBackRoute,Vn as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-Bi6jUyhM.js";import{a as p}from"./sentry-DwScFzsh.js";import{h as z,g as $,u as F,j as f,t as ce,n as K,i as G,o as Y,p as E}from"./core-BQch-SEa.js";import{bn as ke,eS as P,fP as Pe,m6 as le,Md as De,gQ as me,M4 as Me,p$ as Ue,jJ as fe,m2 as Oe,gS as Te,M6 as _e,M5 as Fe,Ov as Re,yl as Be,CQ as Ve,O4 as ze,Od as Le,c1 as ne,cG as Ne,cH as $e,Kb as Ke,Ow as Ge,Kc as He,wN as qe,Ox as Qe,Fc as Ze,Cw as Je,Cn as he,Ck as Xe,wR as be,Cq as Se,Ct as Ce,Cz as te,td as ae,wQ as Ye,jl as W,jo as ye,Oy as We,kp as en,x4 as nn,K$ as tn,L0 as an,jj as on,Oz as sn,jm as cn,qt as ln,OA as rn,OB as dn,qx as un,gA as pn,Kk as X,gp as gn,gw as mn,Kl as fn,x1 as hn,OC as bn,OD as Sn,CN as Cn,e$ as Ie,f1 as xe,OE as yn,fD as In,Ku as xn,x0 as re,fI as de,fH as En,w$ as An,fG as wn,fF as vn,OF as jn,f4 as Ee,OG as kn,OH as Pn,x7 as Dn,w_ as ue,OI as Mn,fl as Un,wX as On,bU as Tn,c0 as _n,b$ as Fn,bV as Rn,bZ as Bn,bY as Vn,bX as zn,b_ as Ln,bW as Nn}from"./zeni-epic-state-DxVQhBoO.js";import{a as Z,G as _,z as v,af as Ae,bK as $n,d as J,f as Kn,I as H,B as oe,bL as Gn,i as we,bM as Hn,aq as qn,j as ve,bN as Qn,bO as Zn,bP as Jn,Y as Xn,bQ as Yn,q as Wn,bR as et}from"./index-B7xMX0uC.js";import{n as B}from"./mui-D4v6d6vq.js";import{M as R}from"./MobileAppDrawer-BpqQJOt0.js";import{a as q,g as Q,m as nt}from"./accountMappingHelper-DB6fTWzq.js";import{t as tt,A as at}from"./AddressScreen-BUTfoqVU.js";import N from"./NotFoundScreen-D6Lk-Xx8.js";import{g as ot}from"./analyticsHelper-CSJ-Oqa_.js";import{B as st}from"./BusinessVerificationPageScreen-Cl8oXTwg.js";import{C as it}from"./CompanyPassportScreen-D3FPR-Qo.js";import{q as pe}from"./QBOConnectionScreen-CbpqcU_N.js";import{B as ct}from"./BillPayApprovalRoutes-BlBr-Pa_.js";import{R as lt}from"./ReimbursementApprovalRoutes-B3F2FHuK.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";import"./routePaths-Db_F8Q8U.js";import"./empty-CnUVdn1j.js";import"./pdf-lib-BkMwujYN.js";import"./index-BJcfizgW.js";import"./url-CA34r-nZ.js";import"./index-DZkdTIsz.js";import"./decodeURIComponentSafe-BlZKyc9K.js";import"./ReimbursementApprovalRuleDetailScreen-BDsrYfnH.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]="cd54ce84-8259-418e-a9c3-915ac141dee6",e._sentryDebugIdIdentifier="sentry-dbid-cd54ce84-8259-418e-a9c3-915ac141dee6")}catch{}})();const rt=B.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,dt=K(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:fe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ue(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizableAccountOverrides:t.capitalizableAccountOverrides,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:t.onSaveCapitalizationAccountThreshold}},function(e,t){const{navigate:s,location:l,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:r,reimbursementsAccountSection:u,vendorsAccountSection:g,filing1099Section:m}=n,{incomeAccount:b,expenseAccount:d}=a,{billPayAccount:c}=r,{reimbursementsAccount:y}=u,{prepaidExpensesAccount:A,fixedAssetsAccount:j,accruedExpensesAccount:C}=g,{bankAccount:k,expenseCategory1099:M}=m,I=q(t.accountMappingView.incomeAccountList,b.selectedOption),O=q(t.accountMappingView.expenseAccountList,d.selectedOption),D=q(t.accountMappingView.billPayAccountList,c.selectedOption),L=q(t.accountMappingView.reimbursementsAccountList,y.selectedOption),V=Q(t.accountMappingView.prepaidExpensesAccountList,A.selectedOptions),h=Q(t.accountMappingView.fixedAssetsAccountList,j.selectedOptions),U=Q(t.accountMappingView.accruedExpensesAccountList,C.selectedOptions),S=Q(t.accountMappingView.bankAccounts1099FilingAccountList,k.selectedOptions),x=nt(t.accountMappingView.expenseAccounts1099FilingAccountList,M),T={selectedIncomeAccountId:I?.accountId,selectedExpenseAccountId:O?.accountId,selectedBillPayAccountId:D?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:V.map(w=>w.accountId),selectedFixedAssetsAccountIds:h.map(w=>w.accountId),selectedAccruedExpensesAccountIds:U.map(w=>w.accountId),selectedBankAccounts1099FilingAccountIds:S.map(w=>w.accountId),selectedExpenseAccounts1099FilingAccountIds:x};e(Fe({data:T}))},onBackClick:()=>{Ae(l)===!1?(s("../../dashboard"),e(_e())):e(me())},onSaveClick:()=>{e(Te()),i&&J.track(Kn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Oe(t.currentTenant.companyId,n))}}})($n),ut=()=>{const e=z(),t=$(),s=F(),{useFeatureGate:l,useDynamicConfig:i}=Z(),{isFeatureEnabled:n}=l(_.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=l(_.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:r,isDynamicConfigLoading:u}=i("transaction_categorization_config"),g=!u&&r?.capitalization_enabled===!0,m=v.getSignedInUser(),b=ke(m),d=f(S=>P(S)),{capitalizableAccounts:c,capitalizableAccountOverrides:y,isCapitalizationThresholdSaving:A,currencySymbol:j}=f(S=>{const x=S.tenantState.currentTenantId,T=x!=null?S.tenantState.tenantsById[x]:void 0,w=Pe(S.companyState,d.companyId);return{capitalizableAccounts:T?.capitalizableAccounts??null,capitalizableAccountOverrides:T?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:S.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:w?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),C=p.useCallback((S,x)=>{s(le(d.companyId,S,x))},[s,d.companyId]),k=p.useCallback(S=>{const x={...y??{}},T=Object.entries(S);for(const[se,ie]of T)ie===null?delete x[se]:x[se]=ie;const[w,je]=T[0]??[];w!=null&&s(le(d.companyId,w,je,void 0,Object.keys(x).length>0?x:null))},[s,d.companyId,y]),M=f(S=>De(S.accountState),ce),I=p.useMemo(()=>{const S={};for(const x of M)x.accountId!=null&&x.accountName!=null&&(S[x.accountId]=x.accountName);return S},[M]),[O,D]=p.useState(!1),[L,V]=p.useState(!1);p.useEffect(()=>{O===!1&&(s(me()),D(!0))},[O]);const h=f(S=>Me(S)),U=S=>{V(S)};return o.jsxs(rt,{children:[o.jsx(R,{isAppContentDrawerOpen:L,handleDrawerToggle:U}),o.jsx(dt,{currentTenant:d,navigate:e,accountMappingView:h,isFiling1099FeatureEnabled:n&&b,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:g,capitalizableAccounts:c,accountNamesById:I,capitalizableAccountOverrides:y,currencySymbol:j,isCapitalizationThresholdSaving:A,onSaveCapitalizationAccountThreshold:C,onSaveCapitalizationAccountThresholds:k,location:t,isSettings:Ae(t),onClickMenuIcon:()=>U(!0)})]})},pt=B.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,gt=K(function(e,t){const s=P(e),l=ze(e),i=Le(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ne(s?.userRole??[])||n)&&"readonly",billpayApprovalView:l,remiApproverView:i,analytics:J}},function(e,t){const{navigate:s,currentTenant:l}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Gn),mt=()=>{const e=z(),t=$(),s=F(),{tenantEmailDomain:l}=G(),[i,n]=p.useState(!1),[a,r]=p.useState(!1),[u,g]=p.useState(!1),m=f(C=>P(C)),b=f(C=>C.billPaySetupApproverViewState.fetchState),d=f(C=>C.remiSetupApproverViewState.fetchState),c=f(C=>Re(C)),y=m.companyId??v.getSignedInUserTenant(l)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const A=H();p.useEffect(()=>{u||b!=="Not-Started"||(g(!0),s(Be(!0)))},[u,b,s]),p.useEffect(()=>{a||d!=="Not-Started"||(r(!0),s(Ve(!0)))},[a,d,s]);const j=C=>{n(C)};return A?.loggedInUserRoleMap!=null?o.jsxs(pt,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:j}),o.jsx(gt,{navigate:e,location:t,companyId:y,currentTenant:m,roleMap:A.loggedInUserRoleMap,onClickMenuIcon:()=>{j(!0)}})]}):o.jsx(oe,{fetchState:c.fetchState})},ft=B.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,ht=K(function(e,t){const{companyId:s,isZeniAccountEnabled:l,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:r}=t,u=P(e);return{bankSetupView:Qe(e,s,n,a,l,i,r),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:J}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,r)=>{e(ae(a,n,r))},onEstablishConnectionClick:(n,a,r)=>{e(te(n,i,a,r))},onUpdatePaymentAccountStatus:(n,a,r,u,g)=>{e(Ce(n,a,g,u,r))},onUpdatePaymentAccountLoginStatus:(n,a,r,u)=>{e(Se(!1,n,u,r,a))},onEstablishConnectionSuccess:(n,a)=>{e(be(a,n))},onUpdateAccountClick:(n,a,r,u,g)=>{e(g==="paymentAccount"?he(n,a,r,u):Xe(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,r)=>{e(Je(i,a,n,r))},onRemoveConnection:n=>{e(Ze(n))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Hn),bt=()=>{const e=z(),t=$(),s=F(),{tenantEmailDomain:l}=G(),i=H(),{useFeatureGate:n}=Z(),{isFeatureEnabled:a}=n(_.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=n(_.isDebitCardFeatureEnabled),[u,g]=p.useState(!1),[m,b]=p.useState(!1),d=f(D=>P(D)),c=f(D=>D.settingsViewState.bankConnection.fetchState),y=Ne(d,i?.loggedInUserRoleMap),A=$e(d,i?.loggedInUserRoleMap),j=Ke(d,i?.loggedInUserRoleMap),C=Ge(d,i?.loggedInUserRoleMap),k=we(d,a,r),M=He(d,i?.loggedInUserRoleMap)&&k,I=d.companyId??v.getSignedInUserTenant(l)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");p.useEffect(()=>{m||c==="Completed"||(b(!0),s(qe(!1)))},[m,s,c]);const O=D=>{g(D)};return y||j||A||M?o.jsxs(ft,{children:[o.jsx(R,{isAppContentDrawerOpen:u,handleDrawerToggle:O}),o.jsx(ht,{navigate:e,location:t,companyId:I,currentTenant:d,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:y,isRemiEnabled:A,isZeniAccountEnabled:j,isChargeCardEnabled:M,isTreasuryEnabled:C,onClickMenuIcon:()=>{O(!0)}})]}):o.jsx(N,{})},St=B.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,Ct=K(function(e,t){const{companyId:s}=t,l=P(e),i=t.roleMap.bill_pay_admin,n=We(e,s),{uiState:a}=n,r=(ne(l?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:ve.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:l.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,analytics:J}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(ae("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(te(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(be("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,r)=>{e(Ce(n,a,"billing","billing_setup",r))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(Se(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(he(n,a,"billing","billing_setup"))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(ye(n))},handleConfirmCardSetupIntent:n=>{e(cn(n))},updateCardPaymentModalState:n=>{e(sn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,r)=>{e(on(n,a,r))},handleFetchPaymentSources:()=>{e(W())},resetCardPaymentViewState:()=>{e(an())},handleResetCardPaymentErrorStatuses:()=>{e(tn())},onBillingAddressSave:n=>{e(nn(n))},onAddressEditHandler:n=>{if(n!=null){const a=tt(n);e(en({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Qn),yt=()=>{const e=z(),t=$(),s=F(),{tenantEmailDomain:l}=G(),[i,n]=p.useState(!1),[a,r]=p.useState(!1),[u,g]=p.useState(!1),m=f(k=>P(k)),b=f(k=>k.cardPaymentViewState),d=f(k=>k.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),c=qn(b.addCardPaymentSourceStatus.fetchState),y=b.addCardPaymentSourceStatus.fetchState,A=m.companyId??v.getSignedInUserTenant(l)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const j=H();p.useEffect(()=>{A!=null&&s(Ye(A,!1))},[A,s]),p.useEffect(()=>{a||(r(!0),s(W()))},[a,s]),p.useEffect(()=>{u||(ye(["card"]),g(!0))},[u]),p.useEffect(()=>{c==="In-Progress"&&y==="Completed"&&s(W())},[c,y]);const C=k=>{n(k)};return j?.loggedInUserRoleMap!=null?o.jsxs(St,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:C}),o.jsx(Ct,{navigate:e,location:t,companyId:A,currentTenant:m,roleMap:j.loggedInUserRoleMap,onClickMenuIcon:()=>{C(!0)},googleAPIKey:ve.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:d})},ee="external_integrations",It=K(function(e){const t=dn(e,ee);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:l,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{pe.init("/connection/auth",n),pe.handleClick()},onRefreshClick:()=>{l.integrations.refreshQBO.fetchState!=="In-Progress"&&e(hn())},onSaveChargeBeeCredentials:(r,u)=>{const g=l.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;g!=null&&e(mn(a,g,X("revenue"),fn("chargebee"),{api_key:r,site:u}))},onConnectHubSpot:(r,u)=>{const g=l.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(g!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:u,connection_id:g,redirect_uri:m,tenant_id:a}));const b="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent(b)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(r,u)=>{e(gn(a,r,X(u)))},onSaveConnectorCredentials:r=>{e(pn(a,X("payments"),r))},onNotifyMe:r=>{e(un(ee,r,i))}}})(Zn),xt=()=>{const e=z(),t=F(),{tenantEmailDomain:s}=G(),[l,i]=p.useState(!1),n=f(c=>c.tenantState.fetchState),a=f(c=>P(c)),r=a.companyId??v.getSignedInUserTenant(s)?.companyId,u=v.getSignedInUser(),g=H(),m=ne(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");p.useEffect(()=>{t(ln(ee))},[t]);const b=c=>{i(c)},d=f(c=>rn(c,r));return g?.loggedInUserRoleMap!=null?o.jsxs(Et,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:b}),o.jsx(It,{navigate:e,onClickMenuIcon:()=>{b(!0)},isAdmin:m,integrationsView:d,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:d.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:d.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:d.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:d.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:d.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(d.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([c,y])=>[c,y?.message])),deleteConnectionState:d.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:d.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress"})]}):o.jsx(oe,{fetchState:n})},Et=B.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,At=B.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,wt=()=>{const e=F(),{tenantEmailDomain:t}=G(),[s,l]=p.useState(!1),i=f(c=>P(c)).companyId??v.getSignedInUserTenant(t)?.companyId,n=v.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=f(c=>bn(c,n.userId)),r=f(c=>Sn(c,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=r,g=c=>{l(c)},m=p.useCallback(c=>{e(ae("user_reimbursement_account",c))},[]),b=p.useCallback(c=>{e(te(c,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);p.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(Cn(n.userId))},[n.userId,a.fetchState]);const d=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(At,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:g}),o.jsx(Jn,{plaidConnectionDetails:u,isLoading:d,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:b,onClickMenuIcon:()=>{g(!0)}})]})},vt=B.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,ge=({appContent:e})=>{const t=F(),s=z(),l=$(),[i,n]=p.useState(!1),a=f(h=>P(h)),{tenantEmailDomain:r}=a,u=a.companyId??v.getSignedInUserTenant(r)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:g}=Z(),{isFeatureEnabled:m}=g(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=g(_.isChargeCardFeatureEnabled),{isFeatureEnabled:d}=g(_.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=g(_.isTreasuryEnabled),y=f(h=>fe(h)),A=Ie(a),j=xe(d,a),C=!j&&y,k=we(a,b,d),{areTenantIdsInSync:M}=Xn();p.useEffect(()=>{M&&t(yn(u,C))},[u,t,C,M]);const I=f(h=>In(h,C)),O=I.fetchState==="Not-Started"||I.fetchState==="In-Progress"||u==null,D=xn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,V=h=>{n(h)};return o.jsxs(vt,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:V}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(Yn,{myProfileView:I,isAccountingClassesEnabled:y,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:k===!1,isTreasuryDisabled:c===!1,isLiteRoleDisabled:D===!1,onClickMenuIcon:()=>{V(!0)},isLoading:O,isBankingOnlyTenant:j,isCardsOnlyTenant:A,onAddressClick:h=>{const U=function(x,T){let w=`/${x}/settings/my_profile`;return w=w.concat(`/new/${T}`),w}(r,h),S=Wn(l.state?.pathnameStackToGoBack,l.pathname);s(U,{state:{pathnameStackToGoBack:S}})},onGetOtp:h=>{const U={...I.myProfileLocalData,phone:h};t(re({localData:U})),t(vn(h,"MyProfile"))},onResendOtp:h=>{t(wn(h,"MyProfile"))},onCancelClick:()=>{t(An())},onSaveClick:()=>{t(de("MyProfile",I.myProfileLocalData.phone,I.myProfileLocalData.otpChallenge,I.myProfileLocalData.dateOfBirth,I.addressData?.addressToCreate))},onVerifyOtp:(h,U)=>{t(En(h,U,"MyProfile"))},onVerifyOtpSuccess:h=>{h!=null&&v.saveZeniOtpToken(h),t(de("MyProfile",I.myProfileLocalData.phone,I.myProfileLocalData.otpChallenge,I.myProfileLocalData.dateOfBirth,I.addressData?.addressToCreate))},updateMyProfileLocalData:h=>{t(re({localData:h}))}})]})};function jt(){const e=F(),t=f(c=>P(c)).companyId,s=f(c=>jn(c)),l=f(c=>Ee(c)),i=v.getSignedInUser(),[n,a]=p.useState(!1),r=p.useCallback(c=>{a(c)},[]),u=p.useCallback(c=>{e(kn(c))},[]),g=p.useCallback(()=>{i?.userEmail!=null&&e(Pn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=p.useCallback(()=>{e(Dn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const b=p.useCallback(()=>{const c=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ue(c,t))},[t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled]),d=p.useCallback(()=>{e(Mn())},[]);return p.useEffect(()=>{if(l.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const c=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ue(c,t))}},[s.fetchState,t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled,l.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:r}),o.jsx(et,{notificationSettingsView:s,onFormDataChange:u,onCancel:g,onSave:m,onClickMenuIcon:()=>{r(!0)},signedInUser:i,onRefresh:b,resetUpdateStatus:d})]})}function la(e){const[t,s]=p.useState(!1),l=f(c=>Ee(c)),i=f(c=>P(c)),n=H(),a=v.getSignedInUser(),r=F(),{useFeatureGate:u}=Z(),{isFeatureEnabled:g}=u(_.isDebitCardFeatureEnabled),m=a?.userEmail==null||l.fetchState!=="Completed"||Un(l.notificationSettings,a.userEmail,g,i);p.useEffect(()=>{l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&t===!1&&(s(!0),r(On()))},[l.fetchState,t]);const b=xe(g,i),d=Ie(i);return l.fetchState!=="In-Progress"&&l.fetchState!=="Not-Started"||m!==!0?Tn(i)?o.jsxs(Y,{children:[_n(n?.loggedInUserRole??[],g,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"accounting/*",element:o.jsx(ut,{})}),Fn(n?.loggedInUserRole??[],g,i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"approval_rules/*",element:o.jsx(kt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Rn(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"my_bank_connections",element:o.jsx(wt,{})}),Bn(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"bank_connections",element:o.jsx(bt,{})}),Vn(i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"business_verification",element:o.jsx(st,{productType:b?"zeni_accounts":d?"charge_cards":ot(i,n?.loggedInUserRoleMap)})}),zn(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(E,{path:"company_details",element:o.jsx(it,{})}),Ln(n?.loggedInUserRole??[],i)&&o.jsx(E,{path:"billing",element:o.jsx(yt,{})}),Nn(n?.loggedInUserRole??[],g,i)&&o.jsx(E,{path:"integrations",element:o.jsx(xt,{})}),o.jsx(E,{path:"my_profile/new/:addressType",element:o.jsx(ge,{appContent:o.jsx(at,{isSubPage:!1})})}),o.jsx(E,{path:"my_profile",element:o.jsx(ge,{})}),m&&o.jsx(E,{path:"notifications",element:o.jsx(jt,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]}):o.jsx(Y,{children:o.jsx(E,{path:"*",element:o.jsx(N,{})})}):null}function kt(e){return o.jsxs(Y,{children:[o.jsx(E,{path:"/",element:o.jsx(mt,{})}),o.jsx(E,{path:"bills/approval-rules/*",element:o.jsx(ct,{})}),o.jsx(E,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(lt,{}):o.jsx(N,{})}),o.jsx(E,{path:"*",element:o.jsx(N,{})})]})}export{la as default};
|