@zeniai/web-app-ui 5.2.14-qa → 5.2.15-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DJzFs1TJ.js +1 -0
- package/dist/assets/AddressScreen-Cghsd8AF.js +9 -0
- package/dist/assets/{AiCfoScreen-CXh_Msfw.js → AiCfoScreen-CzUpn_XQ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BtIAcI70.js → BillPayApprovalRoutes-1xHFB4_G.js} +1 -1
- package/dist/assets/{BillPayRoutes-IGbJLx9e.js → BillPayRoutes-CQEZhXWJ.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-YZ8HV6ZO.js → BusinessVerificationPageScreen-CB_FGxY4.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-CtlFalCK.js → CardsAiCfoScreen-3KsnF1t1.js} +3 -3
- package/dist/assets/{ChargeCardRoutes-D5RwKtuA.js → ChargeCardRoutes-O25seQLJ.js} +10 -10
- package/dist/assets/CompanyPassportScreen-QR3t2jCV.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-BC1A1vLv.js → ConnectionAuthScreen-DgMKH21m.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BzSz6YYh.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-cwu-Tdz_.js → CustomerOnboardingRoutes-D3QZqtw-.js} +5 -5
- package/dist/assets/{DashboardRoutes-eo5bBebP.js → DashboardRoutes-BqyD3tS0.js} +1 -1
- package/dist/assets/{DefaultTenantHome-hN6xKUei.js → DefaultTenantHome-Vrs9w3px.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-B3xL-JF2.js → DomesticWireDetailScreen-bKr1naWX.js} +3 -3
- package/dist/assets/{DrawerScreen-D9iKOMtR.js → DrawerScreen-B1WCu8EA.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DWJcyQDq.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-Dwvz_iW2.js → ExpenseAutomationRoutes-PPxq880X.js} +1 -1
- package/dist/assets/FeaturePreviewScreen-BPveJn8E.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-Dfdai8yG.js → HubSpotOAuthCallbackScreen-BXnSQnHv.js} +1 -1
- package/dist/assets/MagicLinkRoutes-BFVdaTa3.js +72 -0
- package/dist/assets/{MagicLinkSignInScreen-DPX4jd-D.js → MagicLinkSignInScreen-DqmsP04r.js} +1 -1
- package/dist/assets/MobileAppDrawer-DqFii0U-.js +1 -0
- package/dist/assets/NotFoundScreen-BEl52fo_.js +1 -0
- package/dist/assets/{NotificationRoutes-1pWXvJma.js → NotificationRoutes-BRKTm1Ne.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BPaiUj7h.js → OAuthConsentScreen-Q0fwJrGA.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-NBWVQC3h.js → PandLWithForecastRoutes-B2EmklfO.js} +1 -1
- package/dist/assets/{PeopleRoutes-CLNbH5xH.js → PeopleRoutes-BYR9_J0o.js} +3 -3
- package/dist/assets/PerformanceRoutes-Dfm_2dgF.js +1 -0
- package/dist/assets/{Preview-Crb4CpIB.js → Preview-Q7E6grqg.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-C74uxhh_.js → QBOConnectionScreen-ibUYeVer.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BPKjFZxh.js → ReimbursementApprovalRoutes-v56rgDew.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BxwMtMxD.js → ReimbursementApprovalRuleDetailScreen-ZZ1ge8yw.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-FFTqDLD2.js → ReimbursementRoutes-DngluHTS.js} +1 -1
- package/dist/assets/{ReportsRoutes-9W0p6Lya.js → ReportsRoutes-CM8Ic-LD.js} +1 -1
- package/dist/assets/RewardsRoutes-C3ldEdqJ.js +1 -0
- package/dist/assets/{ScreenRoutes-nLpBg7A5.js → ScreenRoutes-Cqn5rEvL.js} +2 -2
- package/dist/assets/{SettingsRoutes-Qph7SFpV.js → SettingsRoutes-DP0WHPGX.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BKdx-uAP.js → SetupPagesScreen-CeI_lyzl.js} +5 -5
- package/dist/assets/{SignInScreen-Ci0IgHAA.js → SignInScreen-Ce4sEOOU.js} +1 -1
- package/dist/assets/SignOutScreen-Ca4mPIX6.js +9 -0
- package/dist/assets/{TaskListScreen-D6IETmcD.js → TaskListScreen-BnNQR3xi.js} +2 -2
- package/dist/assets/TaskRoutes-B4QMbkFu.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-jM0nexAU.js → TransactionDetailRoutes-JE1zhf5_.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-fRW89NFJ.js → TransactionDetailScreen-SL2to1sC.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DvFnObzs.js → TransactionListRoutes-CLT0ugHA.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CA5R7Rfo.js → TreasuryRoutes-DGF0Ml1C.js} +4 -4
- package/dist/assets/{VendorsRoutes-D92Qn8lw.js → VendorsRoutes-1x6Cup5r.js} +13 -13
- package/dist/assets/WiseConfirmationScreen-BwZDrWO1.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BHdZYuyZ.js → ZeniAccountRoutes-CQvULhdG.js} +1 -1
- package/dist/assets/ZeniAccountStatementScreen-B7_iH7R_.js +9 -0
- package/dist/assets/{accountMappingHelper-B0l8lAeR.js → accountMappingHelper-C5WHpsgJ.js} +1 -1
- package/dist/assets/{analytics-CO5gayAE.js → analytics-D_NuuF2U.js} +1 -1
- package/dist/assets/analyticsHelper-CY5dpKAo.js +1 -0
- package/dist/assets/{core-DrRun-Wp.js → core-Da6TLrNx.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BqXEXApE.js → decodeURIComponentSafe-B-r3T5bV.js} +1 -1
- package/dist/assets/{dnd-C7lg2kUY.js → dnd-DC_qF3Wr.js} +1 -1
- package/dist/assets/{empty-CcJKsg0A.js → empty-C73kmkO9.js} +1 -1
- package/dist/assets/{empty-BxU8KR-q.js → empty-s0Z9SHTS.js} +1 -1
- package/dist/assets/{emptyVideoElement-Jmh-gus6.js → emptyVideoElement-CUd0nWeJ.js} +1 -1
- package/dist/assets/{epic-CkW-Ur48.js → epic-DAjg0wXj.js} +1 -1
- package/dist/assets/getLocaleForTenant-B28GqiVQ.js +1 -0
- package/dist/assets/{index-T7IByhHr.js → index-COd9LNlP.js} +1 -1
- package/dist/assets/{index-2hIX2kLH.js → index-CWFrIv4j.js} +1 -1
- package/dist/assets/{index-DdvKvtaE.js → index-CsQZjvif.js} +1 -1
- package/dist/assets/{index-cnTKKS-Z.js → index-DAI9X2Zp.js} +2 -2
- package/dist/assets/{index-24dzDu8E.js → index-Di1s4e5m.js} +10593 -10593
- package/dist/assets/{index-BJ6_cpY3.js → index-DykhB8j2.js} +1 -1
- package/dist/assets/{index-4Tf9Bt0i.js → index-XC9zB3-f.js} +1 -1
- package/dist/assets/{index-CfbU7SR1.js → index-b_fXiiPC.js} +1 -1
- package/dist/assets/{lexical-Cceo9d8G.js → lexical-CQoPutFC.js} +1 -1
- package/dist/assets/{liveblocks-0jcT8Dx_.js → liveblocks-C8AAaKDR.js} +1 -1
- package/dist/assets/{lottie-C4eBAM7n.js → lottie-B7_cpoe1.js} +1 -1
- package/dist/assets/{mui-BCzMCgwZ.js → mui-CosLSKUu.js} +1 -1
- package/dist/assets/{pathToGoBack-aFGIF63I.js → pathToGoBack-C_jELk-6.js} +1 -1
- package/dist/assets/{pdf-C1ioMmzA.js → pdf-CQB-J2hc.js} +3 -3
- package/dist/assets/{pdf-lib-gor9sGMc.js → pdf-lib-CscVz5ta.js} +1 -1
- package/dist/assets/{plaid-B0k6aBM1.js → plaid-2mv_ck83.js} +1 -1
- package/dist/assets/{pusher-CnlBFFea.js → pusher-DrRS7JyV.js} +1 -1
- package/dist/assets/{react-COTuHHMD.js → react-B42V2lQZ.js} +1 -1
- package/dist/assets/{react-CPmZ-IlI.js → react-B7r6-bpj.js} +1 -1
- package/dist/assets/{react-CeH9yclr.js → react-BmvpxDDj.js} +1 -1
- package/dist/assets/{react-C6dV2Ihe.js → react-C6MFx27g.js} +1 -1
- package/dist/assets/{react-CbFHkYXj.js → react-DJflHsBg.js} +1 -1
- package/dist/assets/{react-5qcvQnQi.js → react-DTDSsBUn.js} +1 -1
- package/dist/assets/{recharts-BJColP3b.js → recharts-9jMEgSjc.js} +1 -1
- package/dist/assets/{routePaths-Bty2j8lo.js → routePaths-C00xjTzW.js} +1 -1
- package/dist/assets/{sentry-Cix5j_Oe.js → sentry-DfheywaX.js} +1 -1
- package/dist/assets/{url-C58jRUwt.js → url-C-T2kMoW.js} +1 -1
- package/dist/assets/{url-C5XmMoE_.js → url-HWxh2lX9.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-dGXlt22_.js → useAiCfoDashboardSuggestedQuestionsChips-DGxNs-T2.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BLThPlIr.js +1 -0
- package/dist/assets/{useCashManagementBanner-Y_B1najt.js → useCashManagementBanner-B9wkg7e1.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BcvA45YR.js → useChargeCardPusherEvents-BYuDd-Gt.js} +1 -1
- package/dist/assets/{useDeviceId-34Upzybn.js → useDeviceId-COe_GzcU.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-Bp3LBWrf.js → useEmailConnectResultRefresh-BjWNFubI.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D3N5n5MK.js → useInitialThreadRequest-DoJoRClL.js} +1 -1
- package/dist/assets/{utils-CvfvTDv6.js → utils-BykfwIo5.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Cu9CJKJJ.js → withTransactionSidePanel-BZEqEmm2.js} +2 -2
- package/dist/assets/{zeni-epic-state-D1OApLJ3.js → zeni-epic-state-BqRlfhza.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-DpL0AFgf.js +0 -1
- package/dist/assets/AddressScreen-vfbZQ8IJ.js +0 -9
- package/dist/assets/CompanyPassportScreen-CLIUaKnq.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-p0YtWw1K.js +0 -1
- package/dist/assets/EntityDetailRoutes-CiYlohhA.js +0 -1
- package/dist/assets/FeaturePreviewScreen-s3Vp54dP.js +0 -1
- package/dist/assets/MagicLinkRoutes-B9ocY9la.js +0 -72
- package/dist/assets/MobileAppDrawer-zOj9FdCe.js +0 -1
- package/dist/assets/NotFoundScreen-BUTiP4R3.js +0 -1
- package/dist/assets/PerformanceRoutes-BSfxQLbr.js +0 -1
- package/dist/assets/RewardsRoutes-CRlPlndV.js +0 -1
- package/dist/assets/SignOutScreen-X4KjNVza.js +0 -9
- package/dist/assets/TaskRoutes-h0bmRs3S.js +0 -9
- package/dist/assets/WiseConfirmationScreen-tXGY6zhr.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-DyRW5BgC.js +0 -9
- package/dist/assets/analyticsHelper-DFsb6qRL.js +0 -1
- package/dist/assets/getLocaleForTenant-BK33tgnz.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DG7vn-Xl.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as t,bn as ls,eZ as us,fG as ds,fE as cs,go as ms,ft as _s,cW as Ee,cC as hs,fW as Es,cu as ps,bE as xs,bo as Rs,f_ as gs,v as Is,Mi as js,bs as Ts,Mj as As,bK as fs,bJ as ys,bt as Ds,cq as bs,Mk as Cs,Ml as vs,cS as Us,cV as ws,cU as Os,cB as Ps,cI as Fs,oi as pe,fC as xe,gy as Ls,g2 as Re,gv as ge,gw as Ie,g3 as ks}from"./zeni-epic-state-D1OApLJ3.js";import{j as e}from"./liveblocks-0jcT8Dx_.js";import{a as O}from"./sentry-Cix5j_Oe.js";import{u as Bs,h as Hs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-DrRun-Wp.js";import{y as Ms,u as Zs,z as D,A as Gs,a as zs,i as $s,c as z,d as Ws,e as Ys,f as qs,L as F,O as Te,t as _,P as Js,g as X,l}from"./index-24dzDu8E.js";import"./mui-BCzMCgwZ.js";import{f as Ae}from"./analyticsHelper-DFsb6qRL.js";import{t as Ks}from"./getLocaleForTenant-BK33tgnz.js";import"./recharts-BJColP3b.js";import"./analytics-CO5gayAE.js";import"./plaid-B0k6aBM1.js";import"./dnd-C7lg2kUY.js";import"./stripe-cKAAJElX.js";import"./lottie-C4eBAM7n.js";import"./lexical-Cceo9d8G.js";import"./pdf-C1ioMmzA.js";import"./utils-CvfvTDv6.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]="de990157-aa69-4a78-b3f3-e5e50e19d109",o._sentryDebugIdIdentifier="sentry-dbid-de990157-aa69-4a78-b3f3-e5e50e19d109")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-eo5bBebP.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-IGbJLx9e.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-FFTqDLD2.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-DvFnObzs.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-Qph7SFpV.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-9W0p6Lya.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-D5RwKtuA.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-CLNbH5xH.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-Dwvz_iW2.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-CA5R7Rfo.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-D92Qn8lw.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-BHdZYuyZ.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-9W0p6Lya.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-DpL0AFgf.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-CLNbH5xH.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-NBWVQC3h.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-cwu-Tdz_.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-D92Qn8lw.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-jM0nexAU.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),fe=l((()=>t((()=>import("./EntityDetailRoutes-CiYlohhA.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-eo5bBebP.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),ye=l((()=>t((()=>import("./BillPayRoutes-IGbJLx9e.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-Qph7SFpV.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),De=l((()=>t((()=>import("./ReimbursementRoutes-FFTqDLD2.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-BHdZYuyZ.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-CA5R7Rfo.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-DvFnObzs.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-D5RwKtuA.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-1pWXvJma.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-BSfxQLbr.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-Dwvz_iW2.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),pt=l((()=>t((()=>import("./RewardsRoutes-CRlPlndV.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-h0bmRs3S.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),Rt=l((()=>t((()=>import("./AiCfoScreen-CXh_Msfw.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),be=l((()=>t((()=>import("./CardsAiCfoScreen-CtlFalCK.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),C=l((()=>t((()=>import("./NotFoundScreen-BUTiP4R3.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-D6IETmcD.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const T=Bs(),V=Hs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:U,clearAllLoading:v,clearLoading:k}=Zs(),A=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=ls(I),$=Ss(),[B,Oe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Pe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),f=G((n=>n.tenantState.fetchState)),j=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||f==="Completed"?ds(ne,r):void 0,J=j==="Completed"||f==="Completed"?cs(r):void 0,ke=Ws(r,Le,ne),{isCardsHidden:Be}=Ys(r?.tenantId),He=!ke||!!Be,{isFeatureEnabled:Ve}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),W=G((n=>ms(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&Ae(I,r,L)}const Z={tenantId:A,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=hs(E?.loggedInUserRoleMap),oe=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&A!=null){const n=Q.params.selectedPeriod;if(n!=null){const y=n.split("-");if(y.length===2){const d=ps(Number(y[0])),s=Number(y[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=Rs();c.isAfter(S,"month")===!1?T(gs(A,{month:d,year:s})):V("./month_end_close_checks/review")}}}}),[Q,A]),O.useEffect((()=>{B||(Oe(!0),U(F.TENANT_FETCHING))}),[B,Z,ae,I,T,D]),O.useLayoutEffect((()=>{!Is(ae,Z)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,y,d,s){if(xe(y?.userId,y?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Re(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Te.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Me))}),[A]),O.useEffect((()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,y,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(Y&&os){H(Re(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),Y&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(y==="Completed"||y==="Error");n==="Completed"||y!=="Not-Started"&&y!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(pe(c.userId,c.zeniSessionId)))}})(f,j,r,A,I,U,T))}),[A,j]),O.useEffect((()=>{D.isSignedIn()&&f==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&Ae(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,f,r,I]),O.useEffect((()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&A!=null?(v(),_.markActiveTenantFetchCompleted(A)):j==="Error"&&A!=null&&(_.markActiveTenantFetchFailed(A),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[j,f,A,B]);const re=O.useRef(!1);O.useEffect((()=>{!re.current&&j==="Completed"&&B&&(re.current=!0,(function(n=Xs,y=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),y)})())}),[j,B]);const w=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ze}=N(z.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),ie=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,le=!He&&!w,$e=As(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,Ye=r.externalConnections?.fetchState==="Completed",ue=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,ce=de&&fs(E?.loggedInUserRoleMap),me=Pe&&!w,qe=Fe&&!w,Je=ie&&ys(E?.loggedInUserRoleMap),Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=me&&bs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),_e=ie&&p,he=de&&x,R=me&&ss,g=qe&&ts,m=le&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Ne===!0||$e===!0||Xe===!0||es===!0;return D.isSignedIn()?A==null?f==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&f!=="In-Progress"&&T(pe(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||f==="Completed"?(ue===!0||se&&!oe)&&Ye&&We!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!B||ue!==!1||oe||se?B&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||ze?e.jsx(rt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||ce||Qe||Ke?e.jsx(st,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:R?e.jsx(ut,{}):e.jsx(C,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(C,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Se?e.jsx(ot,{}):e.jsx(C,{})}),e.jsx(a,{path:"bill/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Ve?e.jsx(lt,{hasAdminLevelAccess:ce}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(C,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(pt,{}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(Rt,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"*",element:e.jsx(C,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):V?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},b=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:V,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(L===!0){if(o)return e.jsx(ve,{tenantEmailDomain:v});if(i)return e.jsx(Ce,{tenantEmailDomain:v});if(U)return e.jsx(Ue,{tenantEmailDomain:v})}return o?e.jsx(ve,{tenantEmailDomain:v}):i?e.jsx(Ce,{tenantEmailDomain:v}):U?e.jsx(Ue,{tenantEmailDomain:v}):T?e.jsx(Tt,{tenantEmailDomain:v}):V?e.jsx(jt,{tenantEmailDomain:v}):e.jsx(C,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),Ce=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{b as FallBackRoute,St as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BqyD3tS0.js","assets/sentry-DfheywaX.js","assets/core-Da6TLrNx.js","assets/zeni-epic-state-BqRlfhza.js","assets/index-Di1s4e5m.js","assets/mui-CosLSKUu.js","assets/analytics-D_NuuF2U.js","assets/utils-BykfwIo5.js","assets/withTransactionSidePanel-BZEqEmm2.js","assets/useAskAiCfoHostNavButtonProps-BLThPlIr.js","assets/TransactionDetailScreen-SL2to1sC.js","assets/decodeURIComponentSafe-B-r3T5bV.js","assets/routePaths-C00xjTzW.js","assets/NotFoundScreen-BEl52fo_.js","assets/useInitialThreadRequest-DoJoRClL.js","assets/analyticsHelper-CY5dpKAo.js","assets/CompanyPassportScreen-QR3t2jCV.js","assets/MobileAppDrawer-DqFii0U-.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DGxNs-T2.js","assets/FeaturePreviewScreen-BPveJn8E.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-CQEZhXWJ.js","assets/AddressScreen-Cghsd8AF.js","assets/DomesticWireDetailScreen-bKr1naWX.js","assets/DrawerScreen-B1WCu8EA.js","assets/SetupPagesScreen-CeI_lyzl.js","assets/BusinessVerificationPageScreen-CB_FGxY4.js","assets/BillPayApprovalRoutes-1xHFB4_G.js","assets/ReimbursementApprovalRuleDetailScreen-ZZ1ge8yw.js","assets/getLocaleForTenant-B28GqiVQ.js","assets/ReimbursementRoutes-DngluHTS.js","assets/ReimbursementApprovalRoutes-v56rgDew.js","assets/TransactionListRoutes-CLT0ugHA.js","assets/ZeniAccountStatementScreen-B7_iH7R_.js","assets/SettingsRoutes-DP0WHPGX.js","assets/accountMappingHelper-C5WHpsgJ.js","assets/useEmailConnectResultRefresh-BjWNFubI.js","assets/QBOConnectionScreen-ibUYeVer.js","assets/empty-s0Z9SHTS.js","assets/index-DykhB8j2.js","assets/url-C-T2kMoW.js","assets/index-CWFrIv4j.js","assets/ReportsRoutes-CM8Ic-LD.js","assets/ChargeCardRoutes-O25seQLJ.js","assets/useChargeCardPusherEvents-BYuDd-Gt.js","assets/PeopleRoutes-BYR9_J0o.js","assets/ExpenseAutomationRoutes-PPxq880X.js","assets/TreasuryRoutes-DGF0Ml1C.js","assets/useCashManagementBanner-B9wkg7e1.js","assets/VendorsRoutes-1x6Cup5r.js","assets/pathToGoBack-C_jELk-6.js","assets/ZeniAccountRoutes-CQvULhdG.js","assets/AddressRoutes-DJzFs1TJ.js","assets/PandLWithForecastRoutes-B2EmklfO.js","assets/CustomerOnboardingRoutes-D3QZqtw-.js","assets/TransactionDetailRoutes-JE1zhf5_.js","assets/EntityDetailRoutes-DWJcyQDq.js","assets/NotificationRoutes-BRKTm1Ne.js","assets/PerformanceRoutes-Dfm_2dgF.js","assets/RewardsRoutes-C3ldEdqJ.js","assets/TaskRoutes-B4QMbkFu.js","assets/TaskListScreen-BnNQR3xi.js","assets/AiCfoScreen-CzUpn_XQ.js","assets/CardsAiCfoScreen-3KsnF1t1.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t,bn as ls,eZ as us,fG as ds,fE as cs,go as ms,ft as _s,cW as Ee,cC as hs,fW as Es,cu as ps,bE as xs,bo as Rs,f_ as gs,v as Is,Mi as js,bs as Ts,Mj as As,bK as fs,bJ as ys,bt as Ds,cq as bs,Mk as Cs,Ml as vs,cS as ws,cV as Us,cU as Os,cB as Ps,cI as Fs,oi as pe,fC as xe,gy as Ls,g2 as Re,gv as ge,gw as Ie,g3 as ks}from"./zeni-epic-state-BqRlfhza.js";import{j as e}from"./liveblocks-C8AAaKDR.js";import{a as O}from"./sentry-DfheywaX.js";import{u as Bs,h as Hs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-Da6TLrNx.js";import{y as Ms,u as Zs,z as D,A as Gs,a as zs,n as $s,c as z,i as Ws,w as Ys,d as qs,L as F,O as Te,t as _,P as Js,e as X,l}from"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import{f as Ae}from"./analyticsHelper-CY5dpKAo.js";import{t as Ks}from"./getLocaleForTenant-B28GqiVQ.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="bdf3bc32-8b37-42c5-8aa6-d3879563767d",o._sentryDebugIdIdentifier="sentry-dbid-bdf3bc32-8b37-42c5-8aa6-d3879563767d")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-BqyD3tS0.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-CQEZhXWJ.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-DngluHTS.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-CLT0ugHA.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-DP0WHPGX.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-CM8Ic-LD.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-O25seQLJ.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-BYR9_J0o.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-PPxq880X.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-DGF0Ml1C.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-1x6Cup5r.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-CQvULhdG.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-CM8Ic-LD.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-DJzFs1TJ.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-BYR9_J0o.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-B2EmklfO.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-D3QZqtw-.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-1x6Cup5r.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-JE1zhf5_.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),fe=l((()=>t((()=>import("./EntityDetailRoutes-DWJcyQDq.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-BqyD3tS0.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),ye=l((()=>t((()=>import("./BillPayRoutes-CQEZhXWJ.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-DP0WHPGX.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),De=l((()=>t((()=>import("./ReimbursementRoutes-DngluHTS.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-CQvULhdG.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-DGF0Ml1C.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-CLT0ugHA.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-O25seQLJ.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-BRKTm1Ne.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-Dfm_2dgF.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-PPxq880X.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),pt=l((()=>t((()=>import("./RewardsRoutes-C3ldEdqJ.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-B4QMbkFu.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),Rt=l((()=>t((()=>import("./AiCfoScreen-CzUpn_XQ.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),be=l((()=>t((()=>import("./CardsAiCfoScreen-3KsnF1t1.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),C=l((()=>t((()=>import("./NotFoundScreen-BEl52fo_.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-BnNQR3xi.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const T=Bs(),V=Hs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:w,clearAllLoading:v,clearLoading:k}=Zs(),A=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=ls(I),$=Ss(),[B,Oe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Pe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),f=G((n=>n.tenantState.fetchState)),j=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||f==="Completed"?ds(ne,r):void 0,J=j==="Completed"||f==="Completed"?cs(r):void 0,ke=Ws(r,Le,ne),{isCardsHidden:Be}=Ys(r?.tenantId),He=!ke||!!Be,{isFeatureEnabled:Ve}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),W=G((n=>ms(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&Ae(I,r,L)}const Z={tenantId:A,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=hs(E?.loggedInUserRoleMap),oe=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{w(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&A!=null){const n=Q.params.selectedPeriod;if(n!=null){const y=n.split("-");if(y.length===2){const d=ps(Number(y[0])),s=Number(y[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=Rs();c.isAfter(S,"month")===!1?T(gs(A,{month:d,year:s})):V("./month_end_close_checks/review")}}}}),[Q,A]),O.useEffect((()=>{B||(Oe(!0),w(F.TENANT_FETCHING))}),[B,Z,ae,I,T,D]),O.useLayoutEffect((()=>{!Is(ae,Z)&&D.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,y,d,s){if(xe(y?.userId,y?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Re(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Te.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Me))}),[A]),O.useEffect((()=>{D.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,y,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(Y&&os){H(Re(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),Y&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(y==="Completed"||y==="Error");n==="Completed"||y!=="Not-Started"&&y!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(pe(c.userId,c.zeniSessionId)))}})(f,j,r,A,I,w,T))}),[A,j]),O.useEffect((()=>{D.isSignedIn()&&f==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&Ae(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,f,r,I]),O.useEffect((()=>{j==="In-Progress"&&w(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&A!=null?(v(),_.markActiveTenantFetchCompleted(A)):j==="Error"&&A!=null&&(_.markActiveTenantFetchFailed(A),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[j,f,A,B]);const re=O.useRef(!1);O.useEffect((()=>{!re.current&&j==="Completed"&&B&&(re.current=!0,(function(n=Xs,y=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),y)})())}),[j,B]);const U=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ze}=N(z.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),ie=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,le=!He&&!U,$e=As(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,Ye=r.externalConnections?.fetchState==="Completed",ue=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,ce=de&&fs(E?.loggedInUserRoleMap),me=Pe&&!U,qe=Fe&&!U,Je=ie&&ys(E?.loggedInUserRoleMap),Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=me&&bs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=ws(E?.loggedInUserRoleMap),ts=Us(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),_e=ie&&p,he=de&&x,R=me&&ss,g=qe&&ts,m=le&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Ne===!0||$e===!0||Xe===!0||es===!0;return D.isSignedIn()?A==null?f==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&f!=="In-Progress"&&T(pe(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||f==="Completed"?(ue===!0||se&&!oe)&&Ye&&We!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!B||ue!==!1||oe||se?B&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&U===!1||Ge||ze?e.jsx(rt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&U===!1?e.jsx(ct,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&U===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&U===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||ce||Qe||Ke?e.jsx(st,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:R?e.jsx(ut,{}):e.jsx(C,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(C,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&U===!1?e.jsx(Et,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Se?e.jsx(ot,{}):e.jsx(C,{})}),e.jsx(a,{path:"bill/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Ve?e.jsx(lt,{hasAdminLevelAccess:ce}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(C,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(pt,{}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(Rt,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"*",element:e.jsx(C,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:w,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(w===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):V?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},b=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:V,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:w,tenantEmailDomain:v})=>{if(L===!0){if(o)return e.jsx(ve,{tenantEmailDomain:v});if(i)return e.jsx(Ce,{tenantEmailDomain:v});if(w)return e.jsx(we,{tenantEmailDomain:v})}return o?e.jsx(ve,{tenantEmailDomain:v}):i?e.jsx(Ce,{tenantEmailDomain:v}):w?e.jsx(we,{tenantEmailDomain:v}):T?e.jsx(Tt,{tenantEmailDomain:v}):V?e.jsx(jt,{tenantEmailDomain:v}):e.jsx(C,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),Ce=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{b as FallBackRoute,St as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-C8AAaKDR.js";import{a as u}from"./sentry-DfheywaX.js";import{h as L,g as Q,u as U,j as y,s as le,n as G,i as Z,o as ne,p as v}from"./core-Da6TLrNx.js";import{bn as De,eZ as P,gt as Te,n8 as re,OD as Me,hJ as he,Ou as Ue,rb as _e,kG as be,n4 as Fe,hL as Re,Ow as Be,Ov as Oe,QT as Ve,zG as ze,F7 as Le,Qs as Ne,QB as $e,c7 as ae,cN as Qe,cO as Ge,bs as Ze,Mv as He,y6 as Je,QU as Ke,Hy as We,EP as Xe,EG as ye,ED as Ye,ya as Se,EJ as Ce,EM as Ie,ES as oe,uw as se,y9 as qe,ki as X,kl as Ae,QV as en,lm as nn,yp as tn,Nm as an,Nn as on,kg as sn,QW as cn,kj as ln,rF as rn,Nh as dn,Ni as un,rJ as pn,hu as gn,MD as ee,hm as de,hj as mn,hr as fn,ME as hn,ym as bn,QX as yn,QY as Sn,F4 as Cn,fE as Ee,fG as xe,QZ as In,gh as An,MN as En,yl as ue,gm as pe,gl as xn,yk as vn,gk as wn,gj as kn,Q_ as jn,fJ as ve,Q$ as Pn,R0 as Dn,ys as Tn,yj as ge,R1 as Mn,fZ as Un,yg as _n,b_ as Fn,c6 as Rn,c5 as Bn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as $n}from"./zeni-epic-state-BqRlfhza.js";import{A as Y,c as O,z as k,ag as we,bR as Qn,e as H,g as Gn,bC as Zn,d as J,D as ie,bS as Hn,i as ke,w as je,bT as Jn,ar as Kn,k as Pe,bU as Wn,bV as Xn,bW as Yn,Z as qn,bX as et,v as nt,bY as tt}from"./index-Di1s4e5m.js";import{n as V}from"./mui-CosLSKUu.js";import{M as R}from"./MobileAppDrawer-DqFii0U-.js";import{a as K,g as W,m as at}from"./accountMappingHelper-C5WHpsgJ.js";import{t as ot,A as st}from"./AddressScreen-Cghsd8AF.js";import $ from"./NotFoundScreen-BEl52fo_.js";import{g as it}from"./analyticsHelper-CY5dpKAo.js";import{B as ct}from"./BusinessVerificationPageScreen-CB_FGxY4.js";import{C as lt}from"./CompanyPassportScreen-QR3t2jCV.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-BjWNFubI.js";import{q as me}from"./QBOConnectionScreen-ibUYeVer.js";import{B as ut}from"./BillPayApprovalRoutes-1xHFB4_G.js";import{R as pt}from"./ReimbursementApprovalRoutes-v56rgDew.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./routePaths-C00xjTzW.js";import"./empty-s0Z9SHTS.js";import"./pdf-lib-CscVz5ta.js";import"./index-DykhB8j2.js";import"./url-C-T2kMoW.js";import"./index-CWFrIv4j.js";import"./decodeURIComponentSafe-B-r3T5bV.js";import"./ReimbursementApprovalRuleDetailScreen-ZZ1ge8yw.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]="2ec9a3e5-d2ca-4bdd-9b52-57ed608ce169",e._sentryDebugIdIdentifier="sentry-dbid-2ec9a3e5-d2ca-4bdd-9b52-57ed608ce169")}catch{}})();const gt=V.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-C8AAaKDR.js";import{h as X,g as ee,u as ne,i as $,j as v,N as x,n as H,t as en}from"./core-Da6TLrNx.js";import{bJ as nn,cq as Ce,Qg as ye,eZ as V,cC as tn,zW as Q,zG as an,Qs as sn,Qv as on,rY as te,rM as ae,le as ie,u2 as L,Qx as Ie,gl as Ge,gk as $e,gj as He,Qy as cn,A3 as rn,EP as Ae,EG as ke,ED as _e,El as J,EJ as Ee,EM as Pe,ES as ve,uw as Te,gA as un,cx as dn,fG as ln,fE as pn,fF as mn,bt as yn,Qz as fn,Dl as le,DZ as gn,QA as Sn,bK as bn,G6 as pe,F7 as hn,QB as Cn,QC as In,Ga as An,Ge as kn,tX as _n,KE as En,GL as he,HL as me,QD as Pn,QE as vn,QF as Tn,QG as We,QH as wn,N5 as Dn,PI as Un,Nk as On,QI as Ke,Ep as Fn,Nl as Vn,Et as Bn,QJ as Oe,H5 as qe,lm as xn,rP as Je,u4 as jn,bE as Re,ug as Ne,cA as Rn,QK as Ye,fY as Nn,Gt as Ln,Gx as zn,QL as Mn,GO as Le,QM as Zn,QN as Qn,QO as Gn,QP as $n,gt as Hn,Be as Wn,QQ as Kn,Bj as qn,Bi as Jn}from"./zeni-epic-state-BqRlfhza.js";import{d as se,A as oe,c as q,y as we,aS as Y,bC as Xe,z as U,E as ce,e as O,D as De,g as G,bD as Yn,au as re,bE as B,bF as Xn,bG as et,ag as xe,bH as nt,v as ze,av as Me,J as tt,H as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-Di1s4e5m.js";import{a as h}from"./sentry-DfheywaX.js";import{n as Fe,D as rt,S as ut}from"./mui-CosLSKUu.js";import{M as fe}from"./MobileAppDrawer-DqFii0U-.js";import N from"./NotFoundScreen-BEl52fo_.js";import{a as Ze}from"./analyticsHelper-CY5dpKAo.js";import{d as Qe}from"./routePaths-C00xjTzW.js";import{B as Ue}from"./BusinessVerificationPageScreen-CB_FGxY4.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]="6c5ad3dc-bb45-4111-8eb1-dc388a878d5c",e._sentryDebugIdIdentifier="sentry-dbid-6c5ad3dc-bb45-4111-8eb1-dc388a878d5c")}catch{}})();const dt=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as u}from"./liveblocks-0jcT8Dx_.js";import{h as X,g as ee,u as ne,i as
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,lt=H((function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=sn(e),s=U.getSignedInUser(),l=c.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=on(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Q(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,s)=>{e(Te("bill_pay_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"bill_pay","bill_pay_setup",s))},onEstablishConnectionSuccess:()=>{e(Q(a,!0))},onEnableBillPayClick:()=>{e(J(a,"bill_pay"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"bill_pay","bill_pay_setup"):_e("reimbursement_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"bill_pay_setup",n,s))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(rn(a))},onAcceptUpdatedTOSSuccess:()=>{e(Q(a,!0))},onGetOtp:(n,s)=>{e(He(n,"SpendManagementSetup")),s!=null&&e(cn({officerType:s,phone:n}))},onResendOtp:n=>{e($e(n,"SpendManagementSetup"))},onVerifyOtp:(n,s)=>{e(Ge(n,s,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,s)=>{n!=null&&s!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}))(Yn),pt=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),n=nn(c?.loggedInUserRoleMap),s=he(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:i}=oe(),{isFeatureEnabled:r}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(q.isBillPayLocalCurrencyFeatureEnabled),g=we(),{configValue:h}=i(Y.zeniAccountsConfig),I=ye(h),[k,d]=C.useState(!1),S=C.useRef(!1),[y,_]=C.useState(!1),E=v((T=>T.billPaySetupViewState.fetchState)),f=v((T=>V(T))),b=v((T=>T.billPaySetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:D,isLoading:A}=Xe(f?.tenantId),m=f.companyId??U.getSignedInUserTenant(a)?.companyId;if(U.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const P=!!f.companyBillPayInfo?.info?.isBillPayTOSAccepted,j=tn(c?.loggedInUserRoleMap);C.useEffect((()=>{S.current||E!=="Not-Started"||m==null?S.current||E!=="Completed"||m==null||f.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(S.current=!0,t(Q(m,!1,!0))):(S.current=!0,t(Q(m,!0)))}),[E,m,t]),C.useEffect((()=>{y||b!=="Not-Started"||A||(_(!0),t(an(!0,!0,D)))}),[y,b,A,D,t]);const F=T=>{d(T)};if(P===!1||j&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(x,{to:"../promo"});if(P===!0&&c?.loggedInUserRoleMap!=null){const T=R=>R.trackPageLoaded(G.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(ce,{analytics:O,onLoad:R=>T(R)}),u.jsx(fe,{isAppContentDrawerOpen:k,handleDrawerToggle:F}),u.jsx(lt,{navigate:e,location:o,companyId:m,currentTenant:f,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:s,accountsPromoConfig:I,isLocalCurrencyEnabled:p})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}})},Qt=(e,o)=>e!=null&&(function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"})(e)?e:o,Gt=e=>`/${e}/cards`,$t=e=>`/${e}/cards/setup`,Ht=e=>`/${e}/cards/onboard`,Wt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((t=>t.id===o)),qt=(e,o,t)=>!e||!o||t.fetchState==="Completed",mt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Jt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:B(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:B(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:B(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Yt=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:B(a.limit.amount),creditAccountAvailableAmount:B(a.available.amount),creditAccountSpentAmount:B(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:B(c.remainingAmountDue.amount)}:void 0,Xt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map((n=>n.id)),debitAccountName:a.depositAccounts.map((n=>n.accountName)),debitAccountBalance:a.depositAccounts.map((n=>B(n.accountBalance.available.amount))),debitCardsSpend:B(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:B(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:B(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??U.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),gt=H((function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,s=V(e),l=U.getSignedInUser(),i=s.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!s.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:s.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:s,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:i,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:g,businessVerificationStatus:h,isCardPolicyEnabled:I,isUserChargeCardAdmin:k}=o;return{onBusinessVerificationSectionClick:()=>{O.trackCardsVerifyIdentityCompanyDetailsClick(g,p,h?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},...k&&I?{onCardPolicySectionClick:()=>{t("../policy")}}:{},onFetchLinkTokenClick:(d,S)=>{e(Te("charge_card_setup",d,S))},onEstablishConnectionClick:d=>{e(ve(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,S,y)=>{e(Pe(d,S,"charge_cards","charge_card_setup",y))},onUpdatePaymentAccountLoginStatus:(d,S)=>{e(Ee(!1,d,"charge_cards","charge_card_setup",S))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{O.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&s===!0&&i===!1&&r===!1?e(J(a,"charge_cards__debit_cards")):l===!0&&i===!1?e(J(a,"charge_cards")):s===!0&&r===!1&&e(J(a,"debit_cards"))},onUpdateChargeCardClick:(d,S,y)=>{const _=n.allBankAccounts.find((f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)),E=n.allBankAccounts.find((f=>f.accountId===d));O.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:_?.accountName??"",newZeniCashAccount:E?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((f=>f.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((f=>f.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(y==="paymentAccount"?ke(d,S,"charge_cards","charge_card_setup"):_e("charge_card_setup",d,S))},onUpdatePrimaryFundingAccount:(d,S)=>{const y=n.allFundingAccounts.find((f=>f.id===d)),_=n.allFundingAccounts.findIndex((f=>f.id===n.primaryFundingAccount?.id))+1,E=n.allFundingAccounts.findIndex((f=>f.id===d))+1;O.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:B(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:y?.label??"",newPaymentAccountBalance:B(y?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:y?.accType==="depositAccount",oldPaymentAccountPosition:_,newPaymentAccountPosition:E,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(Ae(a,"charge_card_setup",d,S))},onEnableChargeCardSuccess:()=>{e(Sn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,S)=>{e(Ie({officerType:d,fileIds:S}))},onSendForVerificationClick:d=>{l===!0&&s===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):s===!0&&e(L(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ie({files:d}))},onDeleteFile:d=>{e(ae(d))},onEditFileName:(d,S)=>{e(te(d,S.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(gn(a,d))}}}))(Xn),St=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),n=v((z=>V(z))),{useDynamicConfig:s,useFeatureGate:l}=oe(),i=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=s(Y.zeniAccountsConfig),{configValue:p}=s(Y.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:h}=l(q.isDebitCardFeatureEnabled),{isFeatureEnabled:I}=l(q.isChargeCardFeatureEnabled),{isFeatureEnabled:k}=l(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=l(q.isCardPolicyEnabled),S=v((z=>un(z,n.companyId))),y=dn(S.controllers),_=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,E=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,f=ln(h,n),b=yt({isDebitCardFeatureEnabled:h,isBankingOnlyTenant:f}),D=pn(n),A=mn(n),m=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,P=ft({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:I,isBookKeepingTenant:A,isDebitCardProductVisible:b,chargeCardsCreditAccountLimit:m}),j=b&&P===!1,F=b===!1&&P,T=ye(r),R=yn(c?.loggedInUserRoleMap),W=he(c?.loggedInUserRoleMap),[ge,Se]=C.useState(!1),[M,ue]=C.useState(!1),Z=v((z=>z.chargeCardSetupViewState.fetchState)),w=U.getSignedInUserTenant(a)?.companyId??n.companyId,Ve=U.getSignedInUser(),de=z=>{Se(z)},Be=v((z=>fn(z,w)));if(Ve==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect((()=>{M||Z!=="Not-Started"||w==null?M||Z!=="Completed"||w==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(w,!1,!0)):(ue(!0),t(le(w,!0)))}),[M,Z,w,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,K=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,je=mt(P,b,E,_);return be||K?be||K?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{O.trackPageLoaded(G.Event.cardsSetupVisited),O.trackCardsCardSetupView(y,je,i==null?"Cards Setup":i.includes("cards/promo")?"Promo":i.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:ge,handleDrawerToggle:de}),u.jsx(gt,{autoPayThreshold:g,navigate:e,location:o,companyId:w,currentTenant:n,isEarlyPayEnabled:k,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:K,isUserChargeCardAdmin:R,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:j,isCreditCardOnlyEnabled:F,chargeCardSetUpView:Be,isCreditCardProductVisible:P,isDebitCardFeatureEnabled:b,isChargeCardSetupEnabled:_,isDebitCardSetupEnabled:E,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:y,productInformation:je,onClickMenuIcon:()=>{de(!0)},hasZeniAccountsAdminAccess:W,accountsPromoConfig:T})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(x,{to:"../promo"})},bt=Fe.div`
|
|
9
|
+
`,lt=H((function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=sn(e),s=U.getSignedInUser(),l=c.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=on(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Q(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,s)=>{e(Te("bill_pay_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"bill_pay","bill_pay_setup",s))},onEstablishConnectionSuccess:()=>{e(Q(a,!0))},onEnableBillPayClick:()=>{e(J(a,"bill_pay"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"bill_pay","bill_pay_setup"):_e("reimbursement_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"bill_pay_setup",n,s))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(rn(a))},onAcceptUpdatedTOSSuccess:()=>{e(Q(a,!0))},onGetOtp:(n,s)=>{e(He(n,"SpendManagementSetup")),s!=null&&e(cn({officerType:s,phone:n}))},onResendOtp:n=>{e($e(n,"SpendManagementSetup"))},onVerifyOtp:(n,s)=>{e(Ge(n,s,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,s)=>{n!=null&&s!=null&&e(L(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}))(Yn),pt=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),n=nn(c?.loggedInUserRoleMap),s=Ce(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:i}=oe(),{isFeatureEnabled:r}=l(q.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(q.isBillPayLocalCurrencyFeatureEnabled),g=we(),{configValue:C}=i(Y.zeniAccountsConfig),I=ye(C),[k,d]=h.useState(!1),S=h.useRef(!1),[y,_]=h.useState(!1),E=v((T=>T.billPaySetupViewState.fetchState)),f=v((T=>V(T))),b=v((T=>T.billPaySetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:D,isLoading:A}=Xe(f?.tenantId),m=f.companyId??U.getSignedInUserTenant(a)?.companyId;if(U.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const P=!!f.companyBillPayInfo?.info?.isBillPayTOSAccepted,j=tn(c?.loggedInUserRoleMap);h.useEffect((()=>{S.current||E!=="Not-Started"||m==null?S.current||E!=="Completed"||m==null||f.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(S.current=!0,t(Q(m,!1,!0))):(S.current=!0,t(Q(m,!0)))}),[E,m,t]),h.useEffect((()=>{y||b!=="Not-Started"||A||(_(!0),t(an(!0,!0,D)))}),[y,b,A,D,t]);const F=T=>{d(T)};if(P===!1||j&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(x,{to:"../promo"});if(P===!0&&c?.loggedInUserRoleMap!=null){const T=R=>R.trackPageLoaded(G.Event.billPaySetup);return u.jsxs(dt,{children:[u.jsx(ce,{analytics:O,onLoad:R=>T(R)}),u.jsx(fe,{isAppContentDrawerOpen:k,handleDrawerToggle:F}),u.jsx(lt,{navigate:e,location:o,companyId:m,currentTenant:f,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{F(!0)},hasZeniAccountsAdminAccess:s,accountsPromoConfig:I,isLocalCurrencyEnabled:p})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}})},Qt=(e,o)=>e!=null&&(function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"})(e)?e:o,Gt=e=>`/${e}/cards`,$t=e=>`/${e}/cards/setup`,Ht=e=>`/${e}/cards/onboard`,Wt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},Kt=(e,o)=>e.find((t=>t.id===o)),qt=(e,o,t)=>!e||!o||t.fetchState==="Completed",mt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Jt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:B(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:B(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:B(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Yt=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:B(a.limit.amount),creditAccountAvailableAmount:B(a.available.amount),creditAccountSpentAmount:B(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:B(c.remainingAmountDue.amount)}:void 0,Xt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map((n=>n.id)),debitAccountName:a.depositAccounts.map((n=>n.accountName)),debitAccountBalance:a.depositAccounts.map((n=>B(n.accountBalance.available.amount))),debitCardsSpend:B(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map((n=>n.accountStatus))}:void 0,ea=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:B(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:B(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,na=80,ta=80,aa=e=>e.companyId??U.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,yt=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,ft=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),ia=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,sa=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),gt=H((function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,s=V(e),l=U.getSignedInUser(),i=s.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!s.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:s.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:s,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:i,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:g,businessVerificationStatus:C,isCardPolicyEnabled:I,isUserChargeCardAdmin:k}=o;return{onBusinessVerificationSectionClick:()=>{O.trackCardsVerifyIdentityCompanyDetailsClick(g,p,C?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},...k&&I?{onCardPolicySectionClick:()=>{t("../policy")}}:{},onFetchLinkTokenClick:(d,S)=>{e(Te("charge_card_setup",d,S))},onEstablishConnectionClick:d=>{e(ve(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,S,y)=>{e(Pe(d,S,"charge_cards","charge_card_setup",y))},onUpdatePaymentAccountLoginStatus:(d,S)=>{e(Ee(!1,d,"charge_cards","charge_card_setup",S))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{O.trackCardsEnableCardsClick(g,p,"Cards Card Setup"),l===!0&&s===!0&&i===!1&&r===!1?e(J(a,"charge_cards__debit_cards")):l===!0&&i===!1?e(J(a,"charge_cards")):s===!0&&r===!1&&e(J(a,"debit_cards"))},onUpdateChargeCardClick:(d,S,y)=>{const _=n.allBankAccounts.find((f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)),E=n.allBankAccounts.find((f=>f.accountId===d));O.trackCardsZeniCashAccountChangeClick(g,p,{oldZeniCashAccount:_?.accountName??"",newZeniCashAccount:E?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex((f=>f.accountId===n.primaryFundingAccount?.zeniAccountId))+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex((f=>f.accountId===d))+1,numberOfCashAccounts:n.allBankAccounts.length}),e(y==="paymentAccount"?ke(d,S,"charge_cards","charge_card_setup"):_e("charge_card_setup",d,S))},onUpdatePrimaryFundingAccount:(d,S)=>{const y=n.allFundingAccounts.find((f=>f.id===d)),_=n.allFundingAccounts.findIndex((f=>f.id===n.primaryFundingAccount?.id))+1,E=n.allFundingAccounts.findIndex((f=>f.id===d))+1;O.trackCardsPaymentAccountChangeClick(g,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:B(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:y?.label??"",newPaymentAccountBalance:B(y?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:y?.accType==="depositAccount",oldPaymentAccountPosition:_,newPaymentAccountPosition:E,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(Ae(a,"charge_card_setup",d,S))},onEnableChargeCardSuccess:()=>{e(Sn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,S)=>{e(Ie({officerType:d,fileIds:S}))},onSendForVerificationClick:d=>{l===!0&&s===!0?e(L(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(L(a,d,"charge_cards",!0,!0,!0)):s===!0&&e(L(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(ie({files:d}))},onDeleteFile:d=>{e(ae(d))},onEditFileName:(d,S)=>{e(te(d,S.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(gn(a,d))}}}))(Xn),St=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),n=v((z=>V(z))),{useDynamicConfig:s,useFeatureGate:l}=oe(),i=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=s(Y.zeniAccountsConfig),{configValue:p}=s(Y.zeniCardsConfig),g=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:C}=l(q.isDebitCardFeatureEnabled),{isFeatureEnabled:I}=l(q.isChargeCardFeatureEnabled),{isFeatureEnabled:k}=l(q.isEarlyPayFeatureEnabled),{isFeatureEnabled:d}=l(q.isCardPolicyEnabled),S=v((z=>un(z,n.companyId))),y=dn(S.controllers),_=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,E=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,f=ln(C,n),b=yt({isDebitCardFeatureEnabled:C,isBankingOnlyTenant:f}),D=pn(n),A=mn(n),m=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,P=ft({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:I,isBookKeepingTenant:A,isDebitCardProductVisible:b,chargeCardsCreditAccountLimit:m}),j=b&&P===!1,F=b===!1&&P,T=ye(r),R=yn(c?.loggedInUserRoleMap),W=Ce(c?.loggedInUserRoleMap),[ge,Se]=h.useState(!1),[M,ue]=h.useState(!1),Z=v((z=>z.chargeCardSetupViewState.fetchState)),w=U.getSignedInUserTenant(a)?.companyId??n.companyId,Ve=U.getSignedInUser(),de=z=>{Se(z)},Be=v((z=>fn(z,w)));if(Ve==null)throw Error("Can't access charge card setup page without signing in...");h.useEffect((()=>{M||Z!=="Not-Started"||w==null?M||Z!=="Completed"||w==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(w,!1,!0)):(ue(!0),t(le(w,!0)))}),[M,Z,w,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,K=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,je=mt(P,b,E,_);return be||K?be||K?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{O.trackPageLoaded(G.Event.cardsSetupVisited),O.trackCardsCardSetupView(y,je,i==null?"Cards Setup":i.includes("cards/promo")?"Promo":i.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:ge,handleDrawerToggle:de}),u.jsx(gt,{autoPayThreshold:g,navigate:e,location:o,companyId:w,currentTenant:n,isEarlyPayEnabled:k,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:K,isUserChargeCardAdmin:R,isCardPolicyEnabled:d,isDebitCardOnlyEnabled:j,isCreditCardOnlyEnabled:F,chargeCardSetUpView:Be,isCreditCardProductVisible:P,isDebitCardFeatureEnabled:b,isChargeCardSetupEnabled:_,isDebitCardSetupEnabled:E,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:y,productInformation:je,onClickMenuIcon:()=>{de(!0)},hasZeniAccountsAdminAccess:W,accountsPromoConfig:T})]}):u.jsx(De,{fetchState:"Not-Started"}):u.jsx(x,{to:"../promo"})},bt=Fe.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
12
|
width: 100%;
|
|
@@ -14,11 +14,11 @@ import{j as u}from"./liveblocks-0jcT8Dx_.js";import{h as X,g as ee,u as ne,i as
|
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,Ct=H((function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=hn(e),s=In(e,a),l=U.getSignedInUser(),i=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:s,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:s,mileageUnit:l,mileageCurrencyCode:i,mileageCurrencySymbol:r,denomination:p,denominationSymbol:g,mileageAmountInDenomination:h,description:I}=n;e(kn({mileageDetails:{mileageUnitAmount:{amount:s,currencyCode:i,currencySymbol:r},denomination:p,denominationSymbol:g,mileageAmountInDenomination:h,mileageCurrencyCode:i,mileageCurrencySymbol:r,mileageUnit:l,description:I}}))},onSaveMileageClick:n=>{e(An(a)),O.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,s)=>{e(Te("reimbursement_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"reimbursement","reimbursement_setup",s))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(J(a,"reimbursement"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"reimbursement","reimbursement_setup"):_e("reimbursement_setup",n,s))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"reimbursement_setup",n,s))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}))(et),ht=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),{useDynamicConfig:n}=oe(),s=we(),{configValue:l}=n(Y.zeniAccountsConfig),i=ye(l),r=bn(c?.loggedInUserRoleMap),p=he(c?.loggedInUserRoleMap),[g,h]=C.useState(!1),I=C.useRef(!1),[k,d]=C.useState(!1),S=v((m=>m.remiSetupViewState.fetchState)),y=v((m=>V(m))),_=v((m=>m.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:E,isLoading:f}=Xe(y?.tenantId),b=U.getSignedInUserTenant(a)?.companyId??y.companyId,D=U.getSignedInUser(),A=m=>{h(m)};if(D==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect((()=>{I.current||S!=="Not-Started"||b==null?I.current||S!=="Completed"||b==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(I.current=!0,t(pe(b,!1,!0))):(I.current=!0,t(pe(b,!0)))}),[S,b,t]),C.useEffect((()=>{k||_!=="Not-Started"||f||(d(!0),t(Cn(!0,!1,!1,E)))}),[k,_,f,E,t]),y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(x,{to:"../promo"});if(y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=P=>P.trackPageLoaded(G.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(ce,{analytics:O,onLoad:P=>m(P)}),u.jsx(fe,{isAppContentDrawerOpen:g,handleDrawerToggle:A}),u.jsx(Ct,{navigate:e,location:o,companyId:b,currentTenant:y,isUserRemiAdmin:r,onClickMenuIcon:()=>{A(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:i})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})},It=H((function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=Dn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Un(e.companyConfigState),p=On(e.userRoleConfigState),g=a==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:i,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:s}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:i=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:g,companyLegalName:h,companyTaxId:I,companyWebsite:k,companyPhone:d,primaryContactEmail:S,primaryContactName:y,primaryContactUserId:_,primaryContactSyncToken:E,syncToken:f,fileIds:b,incDate:D,typeOfIncorporation:A,stateOfIncorporation:m,sourceOfFunds:P,companySubIndustry:j,countriesOfOperations:F,companySourceOfFunds:T,companySourceOfFundsDescription:R,transactionVolume:W,transactionVolumeDescription:ge,purposeOfAccount:Se,purposeOfAccountDescription:M,regulatedStatus:ue,regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve}=i,de=g?.selectedOption,Be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:de==null||de===""?void 0:de,companyLegalName:h,taxIdOrEIN:I,website:k!=""&&k!=null?Rn(k):void 0,phone:d,syncToken:f,fileIds:b,incDate:D!=null?Re(D?.toString()):D,typeOfIncorporation:A?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:P?.selectedOption??"",companySubIndustry:j?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map((K=>K.length===2?K:Me(K)))??[],companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:R,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:Se?.selectedOption??"",purposeOfAccountDescription:M,regulatedStatus:ue??"",regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve?.selectedOptions??[]},be={userId:_,firstName:y.firstName,lastName:y.lastName,email:S,syncToken:E};e(Ne({companyDetails:Be,primaryContactDetails:be}))},onCompanyOfficerUpdated:i=>{const r=i.map((p=>{const{officerType:g,userId:h,name:I,email:k,nationalityCountryCode:d,ssn:S,dob:y,phone:_,syncToken:E,selectDocument:f,role:b,ownership:D,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:j}=p;let F;return f.selectDocumentType==="driverLicense"?F="driving_license":f.selectDocumentType==="passport"?F="passport":f.selectDocumentType==="stateId"?F="id_document":f.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:g,userId:h,firstName:I.firstName,lastName:I.lastName,email:k,ssn:S,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:_,birthday:y!=null?Re(y?.toString()):y,syncToken:E,titleAtCompany:b.selectedOption,ownershipInCompany:D,documentTypeSelectedForVerification:F,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:j,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Ne({officers:r}))},onSaveDetailsClick:i=>{e(L(t,i,a))},onSendForVerificationClick:i=>{e(L(t,i,a,!0))},onAddressClick:i=>{const r=Qe(l,i),p=ze(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),h={};g.forEach(((I,k)=>{h[k]=I})),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(h).length>0?h:void 0}})},onRegisteredAddressClick:i=>{const r=Qe(l,i),p=ze(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),h=Object.fromEntries(g.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(h).length>0?h:void 0}})},onBackClick:()=>{e(jn({companyId:t})),n("../setup")},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onDeleteFileList:i=>{e(Je(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onGetOtp:i=>{e(He(i,"SpendManagementSetup"))},onResendOtp:i=>{e($e(i,"SpendManagementSetup"))},onVerifyOtp:(i,r)=>{e(Ge(i,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(i,r)=>{e(xn({addressType:i,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:i=>{if(t==null)return;const r=Vn(i.documentType);r!=null&&e(Bn({target:"setup",companyId:t,officerType:i.officerType,fileId:i.fileId,documentType:r}))},onCompanyDocumentUploadedForAutofill:i=>{t!=null&&e(Fn({target:"setup",companyId:t,fileId:i.fileId,documentType:i.documentType}))}}}))(nt),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=X(),c=ee(),n=ne(),[s]=en(),l=s.get("showStepProgress"),i=s.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:g}=$(),h=se(),{useDynamicConfig:I}=oe(),k=we(),{configValue:d}=I(Y.zeniAccountsConfig),S=ye(d),y=v((m=>{switch(e){case"zeni_accounts":return m.zeniAccountSetupViewState.fetchState;case"reimbursement":return m.remiSetupViewState.fetchState;case"charge_cards":return m.chargeCardSetupViewState.fetchState;case"zeni_treasury":return m.treasurySetupViewState.fetchState;default:return m.billPaySetupViewState.fetchState}})),_=v((m=>m.companyConfigState.fetchState)),E=v((m=>m.userRoleConfigState.fetchState)),f=v((m=>V(m))),b=f.companyId??U.getSignedInUserTenant(g)?.companyId;if(C.useEffect((()=>{_==="Not-Started"&&n(_n()),E==="Not-Started"&&n(En(!0))}),[_,E,n]),C.useEffect((()=>{if(!r&&y==="Not-Started"&&b!=null)switch(p(!0),e){case"zeni_accounts":n(me(b,!0));break;case"zeni_treasury":n(Ce(b,!0));break;case"reimbursement":n(pe(b,!0));break;case"charge_cards":n(le(b,!0));break;default:n(Q(b,!0))}}),[r,y,b,n]),U.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let D;switch(e){case"zeni_accounts":D=f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":D=f.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":D=f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":D=f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:D=f.companyBillPayInfo?.info?.isBillPayTOSAccepted}const A=v((m=>{let P;switch(e){case"zeni_accounts":P=wn(m,b);break;case"zeni_treasury":P=We(m,b);break;case"charge_cards":P=Tn(m,b);break;case"reimbursement":P=vn(m,b);break;default:P=Pn(m,b)}return P}));return D===!1?null:A.fetchState==="Completed"&&D===!0&&h?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:m=>(P=>{switch(e){case"zeni_accounts":return P.trackPageLoaded(G.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return P.trackPageLoaded(G.Event.reimbursementBusinessVerification);default:return P.trackPageLoaded(G.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(m)}),u.jsx(It,{businessVerificationDetails:A,navigate:a,location:c,companyId:b,analytics:O,currentTenant:f,productType:e,roleMap:h.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:i!=null,onClickMenuIcon:()=>{},maxInsuredAmount:S.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},kt={overlayWidth:new at(100,100,59)},_t=H((function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),s=U.getSignedInUser(),l=n.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=Ye(e,a),p=We(e,a),g=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",h=Mn(e),I=h.transactions,k=Ke(e),d=h.accountSummary?.totalBalance?.amount,S=I.length===0||d===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:I,transferDetails:k,isFirstTransfer:S,isDisabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:s,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:i=>{e(Gn(i))},onBusinessVerificationSectionClick:(i,r)=>{let p="../verification";i&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(i,r)=>{e(Te("treasury_setup",i,r))},onEstablishConnectionClick:i=>{e(ve(i,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(i,r,p)=>{e(Pe(i,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(i,r)=>{e(Ee(!1,i,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(J(a,"zeni_treasury"))},onUpdateTreasuryClick:(i,r,p)=>{e(p==="paymentAccount"?ke(i,r,"zeni_treasury","treasury_setup"):_e("treasury_setup",i,r))},onUpdatePrimaryFundingAccount:(i,r)=>{e(Ae(a,"treasury_setup",i,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(i,r)=>{e(Ie({officerType:i,fileIds:r}))},onSendForVerificationClick:(i,r)=>{if(e(L(a,i,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;s.trackTreasuryPortfolioConfirm(p.riskScore,Ze(p)),e(Le(!1))}r===!0&&e(qe())},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:i=>{const{sourceOfFunds:r}=i;e(Qn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:i=>{s.trackTreasuryAllocationAction("update",Ze(i)),e(Zn(i))},onConfirmFundAllocation:()=>{e(Le(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Oe())}}}))(it),Et=()=>{const e=X(),o=ee(),t=ne(),a=we(),c=tt(),{tenantEmailDomain:n}=$(),{useDynamicConfig:s}=oe(),l=se(),[i,r]=C.useState(!1),p=he(l?.loggedInUserRoleMap),{configValue:g}=s(Y.zeniAccountsConfig),h=ye(g),[I,k]=C.useState(!1),[d,S]=C.useState(!1),[y,_]=C.useState(!1),[E,f]=C.useState(!1),[b,D]=C.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),m=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),P=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),j=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),F=v((w=>V(w))),T=U.getSignedInUserTenant(n)?.companyId??F.companyId,R=v((w=>Ye(w,T))),W=R.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Se=U.getSignedInUser(),M=w=>{k(w)};if(Se==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect((()=>{d||A!=="Not-Started"||T==null||(S(!0),t(Ce(T,!0,!1)))}),[d,A,T,t]),C.useEffect((()=>{y||m!=="Not-Started"||T==null||(_(!0),t(Nn()))}),[y,m,T,t]),C.useEffect((()=>{E||P!=="Not-Started"||T==null||(f(!0),t(Ln()))}),[E,P,T,t]),C.useEffect((()=>{b||j!=="Not-Started"||T==null||(D(!0),t(zn(!0)))}),[b,j,T,t]);const ue=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,Z=ue==="pending_review"||ue==="verified";return C.useEffect((()=>{i||A!=="Completed"||W||Z||!o.pathname.includes("setup")||r(!0)}),[A,W,Z]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(x,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:I,handleDrawerToggle:M}),u.jsx(rt,{onClose:()=>{t(Oe()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:i?0:250,PaperProps:{style:{width:kt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),e("../setup")}})})}),u.jsx(_t,{navigate:e,location:o,companyId:T,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:h,isAccountsEnabled:ge,isAllocationDone:W,analytics:O,treasurySetupView:R,onClickMenuIcon:()=>{M(!0)},showTreasurySetupOverlay:i,setShowTreasurySetupOverlay:r})]})},Pt=Fe(ut)`
|
|
17
|
+
`,ht=H((function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=Cn(e),s=In(e,a),l=U.getSignedInUser(),i=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},p=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",g=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:s,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:r}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:s,mileageUnit:l,mileageCurrencyCode:i,mileageCurrencySymbol:r,denomination:p,denominationSymbol:g,mileageAmountInDenomination:C,description:I}=n;e(kn({mileageDetails:{mileageUnitAmount:{amount:s,currencyCode:i,currencySymbol:r},denomination:p,denominationSymbol:g,mileageAmountInDenomination:C,mileageCurrencyCode:i,mileageCurrencySymbol:r,mileageUnit:l,description:I}}))},onSaveMileageClick:n=>{e(An(a)),O.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,s)=>{e(Te("reimbursement_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"reimbursement","reimbursement_setup",s))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(J(a,"reimbursement"))},onUpdateAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"reimbursement","reimbursement_setup"):_e("reimbursement_setup",n,s))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"reimbursement_setup",n,s))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}))(et),Ct=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),c=se(),{useDynamicConfig:n}=oe(),s=we(),{configValue:l}=n(Y.zeniAccountsConfig),i=ye(l),r=bn(c?.loggedInUserRoleMap),p=Ce(c?.loggedInUserRoleMap),[g,C]=h.useState(!1),I=h.useRef(!1),[k,d]=h.useState(!1),S=v((m=>m.remiSetupViewState.fetchState)),y=v((m=>V(m))),_=v((m=>m.remiSetupApproverViewState.fetchState)),{isApprovalRulesV3Enabled:E,isLoading:f}=Xe(y?.tenantId),b=U.getSignedInUserTenant(a)?.companyId??y.companyId,D=U.getSignedInUser(),A=m=>{C(m)};if(D==null)throw Error("Can't access reimbursement setup page without signing in...");if(h.useEffect((()=>{I.current||S!=="Not-Started"||b==null?I.current||S!=="Completed"||b==null||y.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(I.current=!0,t(pe(b,!1,!0))):(I.current=!0,t(pe(b,!0)))}),[S,b,t]),h.useEffect((()=>{k||_!=="Not-Started"||f||(d(!0),t(hn(!0,!1,!1,E)))}),[k,_,f,E,t]),y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(x,{to:"../promo"});if(y.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const m=P=>P.trackPageLoaded(G.Event.reimbursementSetup);return u.jsxs(bt,{children:[u.jsx(ce,{analytics:O,onLoad:P=>m(P)}),u.jsx(fe,{isAppContentDrawerOpen:g,handleDrawerToggle:A}),u.jsx(ht,{navigate:e,location:o,companyId:b,currentTenant:y,isUserRemiAdmin:r,onClickMenuIcon:()=>{A(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:i})]})}return u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})},It=H((function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=Dn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Un(e.companyConfigState),p=On(e.userRoleConfigState),g=a==="zeni_treasury"?Ke(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:i,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:g}}),(function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:s}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:i=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:g,companyLegalName:C,companyTaxId:I,companyWebsite:k,companyPhone:d,primaryContactEmail:S,primaryContactName:y,primaryContactUserId:_,primaryContactSyncToken:E,syncToken:f,fileIds:b,incDate:D,typeOfIncorporation:A,stateOfIncorporation:m,sourceOfFunds:P,companySubIndustry:j,countriesOfOperations:F,companySourceOfFunds:T,companySourceOfFundsDescription:R,transactionVolume:W,transactionVolumeDescription:ge,purposeOfAccount:Se,purposeOfAccountDescription:M,regulatedStatus:ue,regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve}=i,de=g?.selectedOption,Be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:de==null||de===""?void 0:de,companyLegalName:C,taxIdOrEIN:I,website:k!=""&&k!=null?Rn(k):void 0,phone:d,syncToken:f,fileIds:b,incDate:D!=null?Re(D?.toString()):D,typeOfIncorporation:A?.selectedOption??"",stateOfIncorporation:m?.selectedOption??"",sourceOfFunds:P?.selectedOption??"",companySubIndustry:j?.selectedOption??"",countriesOfOperations:F?.selectedOptions.map((K=>K.length===2?K:Me(K)))??[],companySourceOfFunds:T?.selectedOption??"",companySourceOfFundsDescription:R,transactionVolume:W?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:Se?.selectedOption??"",purposeOfAccountDescription:M,regulatedStatus:ue??"",regulatedStatusDescription:Z,usNexus:w,usNexusTypes:Ve?.selectedOptions??[]},be={userId:_,firstName:y.firstName,lastName:y.lastName,email:S,syncToken:E};e(Ne({companyDetails:Be,primaryContactDetails:be}))},onCompanyOfficerUpdated:i=>{const r=i.map((p=>{const{officerType:g,userId:C,name:I,email:k,nationalityCountryCode:d,ssn:S,dob:y,phone:_,syncToken:E,selectDocument:f,role:b,ownership:D,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:j}=p;let F;return f.selectDocumentType==="driverLicense"?F="driving_license":f.selectDocumentType==="passport"?F="passport":f.selectDocumentType==="stateId"?F="id_document":f.selectDocumentType==="ssnCard"&&(F="social_security_card"),{officerType:g,userId:C,firstName:I.firstName,lastName:I.lastName,email:k,ssn:S,nationalityCountryCode:d?.selectedOption!=null?Me(d.selectedOption):void 0,phone:_,birthday:y!=null?Re(y?.toString()):y,syncToken:E,titleAtCompany:b.selectedOption,ownershipInCompany:D,documentTypeSelectedForVerification:F,isSelectedForVerification:A,userVerificationStatus:m,treasuryUserVerificationStatus:P,fileIds:j,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}}));e(Ne({officers:r}))},onSaveDetailsClick:i=>{e(L(t,i,a))},onSendForVerificationClick:i=>{e(L(t,i,a,!0))},onAddressClick:i=>{const r=Qe(l,i),p=ze(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),C={};g.forEach(((I,k)=>{C[k]=I})),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(C).length>0?C:void 0}})},onRegisteredAddressClick:i=>{const r=Qe(l,i),p=ze(s.state?.pathnameStackToGoBack,s.pathname),g=new URLSearchParams(s.search),C=Object.fromEntries(g.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(C).length>0?C:void 0}})},onBackClick:()=>{e(jn({companyId:t})),n("../setup")},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onDeleteFileList:i=>{e(Je(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onGetOtp:i=>{e(He(i,"SpendManagementSetup"))},onResendOtp:i=>{e($e(i,"SpendManagementSetup"))},onVerifyOtp:(i,r)=>{e(Ge(i,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(i,r)=>{e(xn({addressType:i,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(qe())},onOverlayClose:()=>{e(Oe())},onIdentityDocumentUploadedForAutofill:i=>{if(t==null)return;const r=Vn(i.documentType);r!=null&&e(Bn({target:"setup",companyId:t,officerType:i.officerType,fileId:i.fileId,documentType:r}))},onCompanyDocumentUploadedForAutofill:i=>{t!=null&&e(Fn({target:"setup",companyId:t,fileId:i.fileId,documentType:i.documentType}))}}}))(nt),At=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=X(),c=ee(),n=ne(),[s]=en(),l=s.get("showStepProgress"),i=s.get("isTransferInitiated"),[r,p]=h.useState(!1),{tenantEmailDomain:g}=$(),C=se(),{useDynamicConfig:I}=oe(),k=we(),{configValue:d}=I(Y.zeniAccountsConfig),S=ye(d),y=v((m=>{switch(e){case"zeni_accounts":return m.zeniAccountSetupViewState.fetchState;case"reimbursement":return m.remiSetupViewState.fetchState;case"charge_cards":return m.chargeCardSetupViewState.fetchState;case"zeni_treasury":return m.treasurySetupViewState.fetchState;default:return m.billPaySetupViewState.fetchState}})),_=v((m=>m.companyConfigState.fetchState)),E=v((m=>m.userRoleConfigState.fetchState)),f=v((m=>V(m))),b=f.companyId??U.getSignedInUserTenant(g)?.companyId;if(h.useEffect((()=>{_==="Not-Started"&&n(_n()),E==="Not-Started"&&n(En(!0))}),[_,E,n]),h.useEffect((()=>{if(!r&&y==="Not-Started"&&b!=null)switch(p(!0),e){case"zeni_accounts":n(me(b,!0));break;case"zeni_treasury":n(he(b,!0));break;case"reimbursement":n(pe(b,!0));break;case"charge_cards":n(le(b,!0));break;default:n(Q(b,!0))}}),[r,y,b,n]),U.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let D;switch(e){case"zeni_accounts":D=f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":D=f.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":D=f.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||f.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":D=f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:D=f.companyBillPayInfo?.info?.isBillPayTOSAccepted}const A=v((m=>{let P;switch(e){case"zeni_accounts":P=wn(m,b);break;case"zeni_treasury":P=We(m,b);break;case"charge_cards":P=Tn(m,b);break;case"reimbursement":P=vn(m,b);break;default:P=Pn(m,b)}return P}));return D===!1?null:A.fetchState==="Completed"&&D===!0&&C?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:m=>(P=>{switch(e){case"zeni_accounts":return P.trackPageLoaded(G.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return P.trackPageLoaded(G.Event.reimbursementBusinessVerification);default:return P.trackPageLoaded(G.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(m)}),u.jsx(It,{businessVerificationDetails:A,navigate:a,location:c,companyId:b,analytics:O,currentTenant:f,productType:e,roleMap:C.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:i!=null,onClickMenuIcon:()=>{},maxInsuredAmount:S.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},kt={overlayWidth:new at(100,100,59)},_t=H((function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),s=U.getSignedInUser(),l=n.tenantId,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:l??""},r=Ye(e,a),p=We(e,a),g=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",C=Mn(e),I=C.transactions,k=Ke(e),d=C.accountSummary?.totalBalance?.amount,S=I.length===0||d===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:I,transferDetails:k,isFirstTransfer:S,isDisabled:g,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:i,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:s,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:i=>{e(Gn(i))},onBusinessVerificationSectionClick:(i,r)=>{let p="../verification";i&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(he(a,!1,!0))},onFetchLinkTokenClick:(i,r)=>{e(Te("treasury_setup",i,r))},onEstablishConnectionClick:i=>{e(ve(i,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(i,r,p)=>{e(Pe(i,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(i,r)=>{e(Ee(!1,i,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(he(a,!0))},onEnableTreasuryClick:()=>{e(J(a,"zeni_treasury"))},onUpdateTreasuryClick:(i,r,p)=>{e(p==="paymentAccount"?ke(i,r,"zeni_treasury","treasury_setup"):_e("treasury_setup",i,r))},onUpdatePrimaryFundingAccount:(i,r)=>{e(Ae(a,"treasury_setup",i,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(i,r)=>{e(Ie({officerType:i,fileIds:r}))},onSendForVerificationClick:(i,r)=>{if(e(L(a,i,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;s.trackTreasuryPortfolioConfirm(p.riskScore,Ze(p)),e(Le(!1))}r===!0&&e(qe())},updateFilesEntity:i=>{e(ie({files:i}))},onDeleteFile:i=>{e(ae(i))},onEditFileName:(i,r)=>{e(te(i,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:i=>{const{sourceOfFunds:r}=i;e(Qn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:i=>{s.trackTreasuryAllocationAction("update",Ze(i)),e(Zn(i))},onConfirmFundAllocation:()=>{e(Le(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Oe())}}}))(it),Et=()=>{const e=X(),o=ee(),t=ne(),a=we(),c=tt(),{tenantEmailDomain:n}=$(),{useDynamicConfig:s}=oe(),l=se(),[i,r]=h.useState(!1),p=Ce(l?.loggedInUserRoleMap),{configValue:g}=s(Y.zeniAccountsConfig),C=ye(g),[I,k]=h.useState(!1),[d,S]=h.useState(!1),[y,_]=h.useState(!1),[E,f]=h.useState(!1),[b,D]=h.useState(!1),A=v((w=>w.treasurySetupViewState.fetchState)),m=v((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),P=v((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),j=v((w=>w.treasuryDetailState.transactionsState?.fetchState)),F=v((w=>V(w))),T=U.getSignedInUserTenant(n)?.companyId??F.companyId,R=v((w=>Ye(w,T))),W=R.isAtomicAccountExists,ge=!!F.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Se=U.getSignedInUser(),M=w=>{k(w)};if(Se==null)throw Error("Can't access treasury setup page without signing in...");h.useEffect((()=>{d||A!=="Not-Started"||T==null||(S(!0),t(he(T,!0,!1)))}),[d,A,T,t]),h.useEffect((()=>{y||m!=="Not-Started"||T==null||(_(!0),t(Nn()))}),[y,m,T,t]),h.useEffect((()=>{E||P!=="Not-Started"||T==null||(f(!0),t(Ln()))}),[E,P,T,t]),h.useEffect((()=>{b||j!=="Not-Started"||T==null||(D(!0),t(zn(!0)))}),[b,j,T,t]);const ue=F.companyTreasuryInfo?.info?.businessVerificationStatus?.code,Z=ue==="pending_review"||ue==="verified";return h.useEffect((()=>{i||A!=="Completed"||W||Z||!o.pathname.includes("setup")||r(!0)}),[A,W,Z]),F.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(x,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:I,handleDrawerToggle:M}),u.jsx(rt,{onClose:()=>{t(Oe()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:i?0:250,PaperProps:{style:{width:kt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(Pt,{onClick:w=>w.stopPropagation(),children:u.jsx(At,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Oe()),e("../setup")}})})}),u.jsx(_t,{navigate:e,location:o,companyId:T,currentTenant:F,isUserZeniAccountsAdmin:p,accountsPromoConfig:C,isAccountsEnabled:ge,isAllocationDone:W,analytics:O,treasurySetupView:R,onClickMenuIcon:()=>{M(!0)},showTreasurySetupOverlay:i,setShowTreasurySetupOverlay:r})]})},Pt=Fe(ut)`
|
|
18
18
|
display: flex;
|
|
19
19
|
min-height: 100%;
|
|
20
20
|
flex-direction: column;
|
|
21
|
-
`,vt=H((function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=$n(e,a),r=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:i,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:l}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,s)=>{e(Te("account_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"zeni_accounts","account_setup",s))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(J(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"zeni_accounts","account_setup"):_e("account_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"account_setup",n,s))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))}}}))(st),Tt=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),{useDynamicConfig:c}=oe(),n=se(),s=
|
|
21
|
+
`,vt=H((function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=U.getSignedInUser(),s=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:s??""},i=$n(e,a),r=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:i,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:O,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:l}}),(function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,s)=>{e(Te("account_setup",n,s))},onEstablishConnectionClick:n=>{e(ve(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,s,l)=>{e(Pe(n,s,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,s)=>{e(Ee(!1,n,"zeni_accounts","account_setup",s))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(J(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,s,l)=>{e(l==="paymentAccount"?ke(n,s,"zeni_accounts","account_setup"):_e("account_setup",n,s))},onUpdatePrimaryFundingAccount:(n,s)=>{e(Ae(a,"account_setup",n,s))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,s)=>{e(Ie({officerType:n,fileIds:s}))},onSendForVerificationClick:n=>{e(L(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(ie({files:n}))},onDeleteFile:n=>{e(ae(n))},onEditFileName:(n,s)=>{e(te(n,s.split(".")[0]))}}}))(st),Tt=()=>{const e=X(),o=ee(),t=ne(),{tenantEmailDomain:a}=$(),{useDynamicConfig:c}=oe(),n=se(),s=Ce(n?.loggedInUserRoleMap),{configValue:l}=c(Y.zeniAccountsConfig),i=ye(l),[r,p]=h.useState(!1),[g,C]=h.useState(!1),I=v((_=>_.zeniAccountSetupViewState.fetchState)),k=v((_=>V(_))),d=U.getSignedInUserTenant(a)?.companyId??k.companyId,S=U.getSignedInUser(),y=_=>{p(_)};if(S==null)throw Error("Can't access zeni bank account setup page without signing in...");if(h.useEffect((()=>{g||I!=="Not-Started"||d==null?g||I!=="Completed"||d==null||k.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(d,!1,!0)):(C(!0),t(me(d,!0)))}),[g,I,d,t]),k.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(x,{to:"../promo"});{const _=E=>E.trackPageLoaded(G.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(ce,{analytics:O,onLoad:E=>_(E)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:y}),u.jsx(vt,{navigate:e,location:o,companyId:d,currentTenant:k,isUserZeniAccountsAdmin:s,accountsPromoConfig:i,onClickMenuIcon:()=>{y(!0)}})]})}},wt=Fe.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
height: 100vh;
|
|
24
24
|
width: 100%;
|
|
@@ -26,4 +26,4 @@ import{j as u}from"./liveblocks-0jcT8Dx_.js";import{h as X,g as ee,u as ne,i as
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
background-color: ${e=>e.theme.colors.grey4};
|
|
29
|
-
`,Dt=H((function(e,o){const t=V(e),a=U.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Kn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:n,analytics:O}}),(function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Jn(a))},onSubmitClick:()=>{e(qn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ie({files:a}))},onDeleteFile:a=>{e(ae(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(te(a,c.split(".")[0]))}}}))(ot),Ut=()=>{const e=X(),o=ee(),t=ne(),[a,c]=
|
|
29
|
+
`,Dt=H((function(e,o){const t=V(e),a=U.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:Kn(e),isReadonly:o.isFormReadonly,filesEndPoint:`${re.fileMicroServiceBaseUrl}`,authParams:n,analytics:O}}),(function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Jn(a))},onSubmitClick:()=>{e(qn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(ie({files:a}))},onDeleteFile:a=>{e(ae(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(te(a,c.split(".")[0]))}}}))(ot),Ut=()=>{const e=X(),o=ee(),t=ne(),[a,c]=h.useState(!1),[n,s]=h.useState(!1),[l,i]=h.useState(!1),{tenantEmailDomain:r}=$(),p=se(),{useFeatureGate:g}=oe(),{isFeatureEnabled:C}=g(q.isBillPayLocalCurrencyFeatureEnabled),I=v((A=>A.internationalWireVerificationState.verificationFormFetchState.fetchState)),k=v((A=>A.billPaySetupViewState.fetchState)),d=v((A=>V(A))),S=we(),y=d.companyId??U.getSignedInUserTenant(r)?.companyId,_=v((A=>Hn(A.companyState,d.companyId))),E=_?.company.companyBillPayInfo.internationalWireOnboardingStatus,f=E?.code==="onboarding_status_not_started"?void 0:"readonly";if(h.useEffect((()=>{a||I!=="Not-Started"||y==null||(c(!0),t(Wn(y)))}),[a,I,y,t]),h.useEffect((()=>{n||k!=="Not-Started"||y==null||(s(!0),t(Q(y,!0)))}),[k,n,y,t]),U.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const b=d.companyBillPayInfo?.info?.isBillPayTOSAccepted,D=A=>{i(A)};return b===!1?u.jsx(x,{to:"../promo"}):b===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(wt,{children:[u.jsx(ce,{analytics:O,onLoad:A=>(m=>m.trackPageLoaded(G.Event.billPayBusinessVerification,void 0))(A)}),xe(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:D}):null,u.jsx(Dt,{navigate:e,location:o,companyId:y,analytics:O,currentTenant:d,roleMap:p.loggedInUserRoleMap,isFormReadonly:f,isLocalCurrencyEnabled:C})]}):u.jsx(De,{fetchState:"In-Progress",style:{backgroundColor:S.colors.grey5}})},Ot=H((function(){return{}}),(function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(he(t,!0,!0));break;default:e(Q(t,!0,!0))}}}}}))(ct((e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:s,isUserHasOnlyCardAccess:l,productType:i,type:r}=e;switch(i){case"bill_pay":switch(r){case"verification":return o?u.jsx(Ue,{productType:i}):t?u.jsx(x,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(Ut,{}):t?u.jsx(x,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(pt,{}):t?u.jsx(x,{to:"../"}):u.jsx(N,{})}case"reimbursement":return r==="verification"?a?u.jsx(Ue,{productType:i}):u.jsx(N,{}):a?u.jsx(Ct,{}):u.jsx(N,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Ue,{productType:"zeni_accounts"}):u.jsx(N,{}):c?u.jsx(Tt,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(Et,{}):u.jsx(N,{});case"charge_cards":return r==="verification"?s?u.jsx(Ue,{productType:"charge_cards"}):l?u.jsx(x,{to:"../"}):u.jsx(N,{}):s?u.jsx(St,{}):l?u.jsx(x,{to:"../"}):u.jsx(N,{})}})));function oa(e){const{tenantEmailDomain:o}=$(),t=v((c=>V(c))).companyId??U.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,s)=>{s.onEventReceived(c)}};if(U.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Ot,{...e,companyId:t,...a})}export{na as A,ta as P,oa as S,Yt as a,ea as b,yt as c,ft as d,mt as e,aa as f,Wt as g,Gt as h,Jt as i,Xt as j,ia as k,qt as l,Kt as m,$t as n,Ht as o,Qt as p,sa as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as f}from"./liveblocks-C8AAaKDR.js";import{a as u,b as M,q as T}from"./sentry-DfheywaX.js";import{u as A,h as z,j as c,g as D,N as O,n as j}from"./core-Da6TLrNx.js";import{u as P,z as s,y as F,e as E,O as _,f as B,g as N,h as Z,j as q,x as V,k as v}from"./index-Di1s4e5m.js";import{eZ as $,Mh as J,Mi as W,fC as G,g2 as H,Mn as K,gs as Q,cZ as R,Mo as b,Mp as X,Mq as Y,bZ as y}from"./zeni-epic-state-BqRlfhza.js";import"./mui-CosLSKUu.js";import{u as ee}from"./useDeviceId-COe_GzcU.js";import{f as te}from"./analyticsHelper-CY5dpKAo.js";import{t as ne}from"./getLocaleForTenant-B28GqiVQ.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="b16200b0-ca68-4a18-a61f-9c083644596f",t._sentryDebugIdIdentifier="sentry-dbid-b16200b0-ca68-4a18-a61f-9c083644596f")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}}))(V),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),L=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>$(e))),I=c((e=>J(e))),m=D(),w=F().mode,x=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[h.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(W(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then((()=>{const e=q();e!=null&&B(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!x,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(Z,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-C8AAaKDR.js";import{a as i}from"./sentry-DfheywaX.js";import{u as c,g as d,N as u}from"./core-Da6TLrNx.js";import{z as a,e as n,g as m,D as g}from"./index-Di1s4e5m.js";import{gx as p,MF as b}from"./zeni-epic-state-BqRlfhza.js";import{n as y}from"./mui-CosLSKUu.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="eea4a052-6f79-4e1a-a6b9-cb3bbe813439",e._sentryDebugIdIdentifier="sentry-dbid-eea4a052-6f79-4e1a-a6b9-cb3bbe813439")}catch{}})();function M(){const e=c(),t=d(),r=i.useRef(!1),f=a.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(p()),b(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),a.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(g,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100vh;
|
|
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
|
+
`;export{M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-C8AAaKDR.js";import{a as G}from"./sentry-DfheywaX.js";import{h as N,u as v,g as K,j as b,i as _,n as z}from"./core-Da6TLrNx.js";import{z as U,A as O,c as p,a0 as W,E as Z,e as q,g as M,dd as V,v as g,r as Q}from"./index-Di1s4e5m.js";import{eZ as H,U8 as F,Jq as E,U9 as R,U4 as X,IO as y,Ua as Y,IW as I,Ig as aa,Jr as S,Ub as B,fB as ea,Jh as ta,Jm as sa,J9 as oa,J7 as w,Jn as na,J4 as ia,Uc as la,Ud as ra,Ue as ca,Uf as ka,Ug as m,ek as da,Uh as ua,Ui as pa}from"./zeni-epic-state-BqRlfhza.js";import{n as ma}from"./mui-CosLSKUu.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import{M as ga}from"./MobileAppDrawer-DqFii0U-.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.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]="40425425-3594-436f-b47f-4c29cc3e3dea",e._sentryDebugIdIdentifier="sentry-dbid-40425425-3594-436f-b47f-4c29cc3e3dea")}catch{}})();const fa=ma.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -6,4 +6,4 @@ import{j as u}from"./liveblocks-0jcT8Dx_.js";import{a as D}from"./sentry-Cix5j_O
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ha=z((function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:
|
|
9
|
+
`,ha=z((function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map((l=>({...l,tasks:l.tasks.filter((a=>a.taskGroupIds.includes(c)))}))).filter((l=>l.tasks.length>0))}:o,d=X(e),i=U.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}}),(function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(E(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(E(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(R({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(y({taskDetailLocalData:s}));const k=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(y({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}}))(V);function ja(){const e=N(),t=v(),o=K(),c=U.getSignedInUser(),n=b((r=>H(r))),{taskGroupId:d}=_(),{useFeatureGate:i}=O(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[x,P]=G.useState(!1),h=b((r=>F(r,l))),D=b((r=>r.taskGroupState)),T=h.fetchState,{isAiCfoAccessEnabled:J,onAskAiCfoClick:j}=Ta({mobileExploreReferrer:"Task Checklist"});if(W({isDataReady:T==="Completed"}),G.useEffect((()=>{t(E(!1,l))}),[n?.tenantId,t,l]),G.useEffect((()=>{T==="Completed"&&t(R({taskGroupById:D.taskGroupById}))}),[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[T==="Completed"?u.jsx(Z,{analytics:q,onLoad:r=>($=>$.trackPageLoaded(M.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:x,handleDrawerToggle:r=>{P(r)}}),u.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:J,onAskAiCfoClick:j})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{ja as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-C8AAaKDR.js";import se from"./NotFoundScreen-BEl52fo_.js";import{a as c}from"./sentry-DfheywaX.js";import{h as _,u as M,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-Da6TLrNx.js";import{It as O,Iw as le,Iq as de,eZ as J,U4 as K,IK as H,In as pe,Je as ue,J7 as ke,U5 as W,U6 as N,Ij as me,Ig as ge,rY as fe,rM as he,le as Ie,IE as Se,U7 as Te,IV as be,IS as Ee,Iz as Ce,IP as Ge,IO as De}from"./zeni-epic-state-BqRlfhza.js";import{z as G,db as xe,$ as je,A as we,c as b,r as X,v,E as ye,e as V,g as ve,dc as Re,k as A,au as Ue}from"./index-Di1s4e5m.js";import{n as Fe}from"./mui-CosLSKUu.js";import{u as Be}from"./useInitialThreadRequest-DoJoRClL.js";import{M as Pe}from"./MobileAppDrawer-DqFii0U-.js";import Le from"./TaskListScreen-BnNQR3xi.js";import"./recharts-9jMEgSjc.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./useAskAiCfoHostNavButtonProps-BLThPlIr.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]="63534585-2484-45e1-a221-0243411a50d1",e._sentryDebugIdIdentifier="sentry-dbid-63534585-2484-45e1-a221-0243411a50d1")}catch{}})();function $e(){const e=_(),t=M(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(O())}),[t]),k=c.useCallback(((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))}),[t]),a=c.useCallback((o=>{t(de({cannedResponseId:o}))}),[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let q,Z=[];const ze=re((function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=J(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=K(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==q&&(q=S,Z=Object.values(S)),Z),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Ue.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((p=>N(e.taskGroupState,p))).filter((p=>p!=null&&!p.isDeleted)).map((p=>({id:p.id,name:p.name,isDefault:p.isDefault})))}}),(function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function y(){const e=_(),t=M(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=f((i=>J(i))),k=Be(l?.companyId),{useFeatureGate:a}=we(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,Y]=c.useState(!1),[U,Q]=c.useState(!1),[F,ee]=c.useState(!1),[B,j]=c.useState(!1),T=c.useRef(!1),C=f((i=>i.taskListState.updateTasksFetchState.fetchState)),P=f((i=>K(i))),L=f((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(Y(!0),t(H(!1,r)))}),[p,t]),c.useEffect((()=>{U||P.fetchState==="Completed"||(Q(!0),t(pe()))}),[U,t,P.fetchState]),c.useEffect((()=>{F||L==="Completed"||(ee(!0),t(ue()))}),[F,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))}),[t,r]);c.useEffect((()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return j(!1),void(T.current=!1);if(C==="Completed"){j(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[B,C,l,s,e]);const $=f((i=>W(i,r))),w=$.fetchState,z=G.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(w==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[w==="Completed"?n.jsx(ye,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Pe,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:w,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Fe.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-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
|
+
`,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(g,{path:"/new",element:n.jsx(y,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
package/dist/assets/{TransactionDetailRoutes-jM0nexAU.js → TransactionDetailRoutes-JE1zhf5_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-C8AAaKDR.js";import i from"./NotFoundScreen-BEl52fo_.js";import{T as r}from"./TransactionDetailScreen-SL2to1sC.js";import"./sentry-DfheywaX.js";import{o as s,p as o}from"./core-Da6TLrNx.js";import"./zeni-epic-state-BqRlfhza.js";import"./recharts-9jMEgSjc.js";import"./index-Di1s4e5m.js";import"./mui-CosLSKUu.js";import"./analytics-D_NuuF2U.js";import"./plaid-2mv_ck83.js";import"./dnd-DC_qF3Wr.js";import"./stripe-cKAAJElX.js";import"./lottie-B7_cpoe1.js";import"./lexical-CQoPutFC.js";import"./pdf-CQB-J2hc.js";import"./utils-BykfwIo5.js";import"./useAskAiCfoHostNavButtonProps-BLThPlIr.js";import"./decodeURIComponentSafe-B-r3T5bV.js";import"./routePaths-C00xjTzW.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|