@zeniai/web-app-ui 5.1.85-dev → 5.1.86-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-CYnGGpGr.js +1 -0
- package/dist/assets/AddressScreen-Cgf_DSfy.js +9 -0
- package/dist/assets/{AiCfoScreen-D2GxwJyN.js → AiCfoScreen-DK7jWO5l.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Csh9SPnU.js → BillPayApprovalRoutes-Bufqh5bf.js} +1 -1
- package/dist/assets/{BillPayRoutes-Dg9I-63-.js → BillPayRoutes-DQrVntHX.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-BLuK4dS7.js → BusinessVerificationPageScreen-BVO4LcOB.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-D8ZPE13M.js → CardsAiCfoScreen-BPq182YL.js} +1 -1
- package/dist/assets/ChargeCardRoutes--1Cz6d6F.js +71 -0
- package/dist/assets/CompanyPassportScreen-Cr6_STQF.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-C8nHjroP.js → ConnectionAuthScreen-DPDyawJA.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CwgXB2Ot.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Dk5stUMd.js → CustomerOnboardingRoutes-DBUibBfl.js} +4 -4
- package/dist/assets/{DashboardRoutes-B2SXqHam.js → DashboardRoutes-CWiRUKmL.js} +3 -3
- package/dist/assets/{DefaultTenantHome-DDzJzPvG.js → DefaultTenantHome-Q8Gr6wzz.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Bg4bD2vf.js +18 -0
- package/dist/assets/DrawerScreen-ESB0V3An.js +1 -0
- package/dist/assets/EntityDetailRoutes-BgIcnD30.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-B0EQq9x4.js → ExpenseAutomationRoutes-DRdJk7UH.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-CPre8DhJ.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DiHy3hck.js → HubSpotOAuthCallbackScreen-D1vja8MF.js} +1 -1
- package/dist/assets/MagicLinkRoutes-50BdhE1X.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-oln-_jh3.js +12 -0
- package/dist/assets/{MobileAppDrawer-ChAhLGZE.js → MobileAppDrawer-CNkPd-0r.js} +1 -1
- package/dist/assets/NotFoundScreen-C4hj38o6.js +1 -0
- package/dist/assets/NotificationRoutes-CDTyM5yC.js +1 -0
- package/dist/assets/{OAuthConsentScreen-_yz0BOYy.js → OAuthConsentScreen-Bfra_k87.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-CgJVRO_P.js +1 -0
- package/dist/assets/PeopleRoutes-DsSKCjjc.js +22 -0
- package/dist/assets/PerformanceRoutes-5mjMtnxs.js +1 -0
- package/dist/assets/{Preview-D29JeEmY.js → Preview-ng4_PqRv.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CwZNkZEW.js → QBOConnectionScreen-B3-UhwG_.js} +1 -1
- package/dist/assets/ReferralListScreen-Dt6a-ZaL.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-DAVTSD8z.js → ReimbursementApprovalRoutes-DJ6r8--7.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtUn349v.js → ReimbursementApprovalRuleDetailScreen-CGou3dCd.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BYbEE0sN.js → ReimbursementRoutes-C1KqmlyM.js} +6 -6
- package/dist/assets/ReportsRoutes-BTVnfyaM.js +1 -0
- package/dist/assets/RewardsRoutes-DdOKhqcE.js +1 -0
- package/dist/assets/ScreenRoutes-CR7u1SOQ.js +2 -0
- package/dist/assets/SettingsRoutes-ZI-PRowa.js +57 -0
- package/dist/assets/{SetupPagesScreen-Drdx2Cz2.js → SetupPagesScreen-CnFtaoyZ.js} +5 -5
- package/dist/assets/{SignInScreen-HaZFyYNm.js → SignInScreen-BoQaZMzp.js} +1 -1
- package/dist/assets/SignOutScreen-BWN6fg9F.js +9 -0
- package/dist/assets/{TaskListScreen-B2sNWFUZ.js → TaskListScreen-wwlTbcpO.js} +2 -2
- package/dist/assets/TaskRoutes-BZfNRRg-.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-BBXGE-Zw.js → TransactionDetailRoutes-75MHva3P.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-D7m7OZhn.js → TransactionDetailScreen-BdRaLDX3.js} +2 -2
- package/dist/assets/{TransactionListRoutes-C8nLf9Ob.js → TransactionListRoutes-BK2uV7qm.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CAqMFzPt.js → TreasuryRoutes-JT_IY3Gx.js} +6 -6
- package/dist/assets/{VendorsRoutes-kgQCFQez.js → VendorsRoutes-BS6JrHkM.js} +19 -19
- package/dist/assets/{WiseConfirmationScreen-Dj8vTbGW.js → WiseConfirmationScreen-CrmCNnnU.js} +2 -2
- package/dist/assets/{ZeniAccountRoutes-B85icQ0n.js → ZeniAccountRoutes-BPiHmqg-.js} +7 -7
- package/dist/assets/ZeniAccountStatementScreen-DxgFXxRD.js +9 -0
- package/dist/assets/{accountMappingHelper-B3v4RMhl.js → accountMappingHelper-COLWfB1U.js} +1 -1
- package/dist/assets/{analytics-7PXXxPIN.js → analytics-dJ9Vu0DH.js} +1 -1
- package/dist/assets/{analyticsHelper-Ce6ZNBVM.js → analyticsHelper-B2nQzr20.js} +1 -1
- package/dist/assets/{core-BDPZcSG4.js → core-Ca6G0voE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BR3AOxh5.js → decodeURIComponentSafe-BMcEUj25.js} +1 -1
- package/dist/assets/{dnd-fU8QmJ8U.js → dnd-Be5WoH8E.js} +1 -1
- package/dist/assets/{empty-DridEUN5.js → empty-DHGdIlcJ.js} +1 -1
- package/dist/assets/{empty-CM59KsLF.js → empty-uy3M1msm.js} +1 -1
- package/dist/assets/{emptyVideoElement--ZfOaFPu.js → emptyVideoElement-IUbgWLFZ.js} +1 -1
- package/dist/assets/{epic-D7C6_Y7q.js → epic-DoVGgmyH.js} +1 -1
- package/dist/assets/getLocaleForTenant-DVEihZ-H.js +1 -0
- package/dist/assets/{index-BZG4Ai-c.js → index-BMVCuDFR.js} +1 -1
- package/dist/assets/{index-DA1h5kq3.js → index-Ck8HU4ZH.js} +1 -1
- package/dist/assets/{index-DNm9oOTV.js → index-D3FowIif.js} +1 -1
- package/dist/assets/{index-B1tuor_E.js → index-DD9OmSLj.js} +14116 -14020
- package/dist/assets/{index-CAEfbAkM.js → index-Dcmv7y8l.js} +1 -1
- package/dist/assets/{index-TPK5ayqQ.js → index-Dpm9OcRr.js} +1 -1
- package/dist/assets/{index-BEZZznbS.js → index-Vw1oLCxE.js} +2 -2
- package/dist/assets/{index-BAkEFBVP.js → index-sd36C9hC.js} +1 -1
- package/dist/assets/{lexical-_D-pPLdL.js → lexical-DTpvAJin.js} +1 -1
- package/dist/assets/{liveblocks-B2nLBm11.js → liveblocks-4PIBJMyE.js} +1 -1
- package/dist/assets/{lottie--jYlW6ya.js → lottie-B7am_Gp2.js} +1 -1
- package/dist/assets/{mui-HaM5aBuG.js → mui-BI3ZId9r.js} +1 -1
- package/dist/assets/{pathToGoBack-Bp5QCbKd.js → pathToGoBack-CrG50xVP.js} +1 -1
- package/dist/assets/{pdf-CbrAe2yy.js → pdf-DUHWpwzW.js} +3 -3
- package/dist/assets/{pdf-lib-CHfVanCJ.js → pdf-lib-DyNMbFeB.js} +1 -1
- package/dist/assets/{plaid-DuKDxXr2.js → plaid-BFzM5Kog.js} +1 -1
- package/dist/assets/{pusher-p1571_5u.js → pusher-BmnXBdoc.js} +1 -1
- package/dist/assets/{react-DZP7sDw7.js → react-BOWfROr3.js} +1 -1
- package/dist/assets/{react-Di2JdnAu.js → react-CZFZzs7c.js} +1 -1
- package/dist/assets/{react-BvU2rtwe.js → react-CffrEBOp.js} +1 -1
- package/dist/assets/{react-BzGU_BeP.js → react-DM-Vx6Nk.js} +1 -1
- package/dist/assets/{react-CXLD6oJa.js → react-DMQWnTjk.js} +1 -1
- package/dist/assets/{react-D7-m9gXP.js → react-Wm4oo8rw.js} +1 -1
- package/dist/assets/{recharts-srrgu-jp.js → recharts-D6NnjcYi.js} +1 -1
- package/dist/assets/{routePaths-DbVBNvPC.js → routePaths-BumbtdKN.js} +1 -1
- package/dist/assets/{sentry-CLlo3TXi.js → sentry-CXcgkCeA.js} +1 -1
- package/dist/assets/{url-DqIeqdCZ.js → url-DVO5HPAn.js} +1 -1
- package/dist/assets/{url-ky0ROLAQ.js → url-DsqsNUWn.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DQzT3CdB.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CSLK93Wz.js +1 -0
- package/dist/assets/useCashManagementBanner-BNEI8i2V.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CtFgCR2P.js +1 -0
- package/dist/assets/{useDeviceId-CQ3pf2OT.js → useDeviceId-BbYF3u-l.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-7EeCPqR2.js → useEmailConnectResultRefresh-CMs316dl.js} +1 -1
- package/dist/assets/useInitialThreadRequest-B6-oXb8Z.js +1 -0
- package/dist/assets/{utils-BPOASmy-.js → utils-DFP_hVXq.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DKz4VB48.js → withTransactionSidePanel-iSi7Lgwj.js} +3 -3
- package/dist/assets/{zeni-epic-state-pQFlpfOQ.js → zeni-epic-state-BIxjj87B.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-DpMeCgDh.js +0 -1
- package/dist/assets/AddressScreen-jEbIVhK3.js +0 -9
- package/dist/assets/ChargeCardRoutes-CyGButQm.js +0 -71
- package/dist/assets/CompanyPassportScreen--SPdIRlf.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C6uz2GLr.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DDaUfwcf.js +0 -18
- package/dist/assets/DrawerScreen-DZ4DkgHO.js +0 -1
- package/dist/assets/EntityDetailRoutes-CFPPv2Q-.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Dgm-EaRp.js +0 -1
- package/dist/assets/MagicLinkRoutes-CPrGkntv.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BHI5Ju3h.js +0 -12
- package/dist/assets/NotFoundScreen-By2F-w6l.js +0 -1
- package/dist/assets/NotificationRoutes-0mjOYLwF.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CSm9JBFf.js +0 -1
- package/dist/assets/PeopleRoutes-DF4Scn5d.js +0 -22
- package/dist/assets/PerformanceRoutes-C0h70RAc.js +0 -1
- package/dist/assets/ReferralListScreen-C3Yy7aIK.js +0 -5
- package/dist/assets/ReportsRoutes-Cb8uSh4z.js +0 -1
- package/dist/assets/RewardsRoutes-BqWi3Rha.js +0 -1
- package/dist/assets/ScreenRoutes-CFWhfVwu.js +0 -2
- package/dist/assets/SettingsRoutes-Dqo8Gg1_.js +0 -57
- package/dist/assets/SignOutScreen-DGQ597Ur.js +0 -9
- package/dist/assets/TaskRoutes-DqlemW4d.js +0 -9
- package/dist/assets/ZeniAccountStatementScreen-CPK7RprH.js +0 -9
- package/dist/assets/getLocaleForTenant-5gC9KZpR.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-Dpypv2iO.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CtdOXC4O.js +0 -1
- package/dist/assets/useCashManagementBanner-DTfbqox_.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-BSAOVtAf.js +0 -1
- package/dist/assets/useInitialThreadRequest-DaoYHqyn.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-B2nLBm11.js";import lt from"./NotFoundScreen-By2F-w6l.js";import{a as k}from"./sentry-CLlo3TXi.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-BDPZcSG4.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SW as Z,fR as d,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as Q,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-pQFlpfOQ.js";import{Y as xt,z as Bt,V as wt,Q as Rt,$ as Gt,cW as Ut,r as N,a8 as Dt,cX as vt,a9 as Pt,q as Ft}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="df86a155-e453-47dd-aff4-60670b02b372",t._sentryDebugIdIdentifier="sentry-dbid-df86a155-e453-47dd-aff4-60670b02b372")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:X,isFetchingMore:L,hasFetchedAll:q}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||q===!0||X==null||X(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,q,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-B2nLBm11.js";import{h as z,u as Q,g as H,i as K,j as d,n as X,o as Z,p as I}from"./core-BDPZcSG4.js";import{eX as v,sc as M,rM as J,MP as O,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-pQFlpfOQ.js";import{z as me,Y as fe,$ as pe,k as ue,V as U,Q as $,v as he,d as w,ao as ge,r as Fe}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import be from"./NotFoundScreen-By2F-w6l.js";import{F as Ie}from"./FeaturePreviewScreen-Dgm-EaRp.js";import{a as g}from"./sentry-CLlo3TXi.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{u as Se}from"./useInitialThreadRequest-DaoYHqyn.js";import{t as Te}from"./routePaths-DbVBNvPC.js";import{M as ye}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="15da770d-2e40-4329-8fc5-dfe0db042a11",s._sentryDebugIdIdentifier="sentry-dbid-15da770d-2e40-4329-8fc5-dfe0db042a11")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=Q(),a=H(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),B=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(J());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,M,S,F]);const D=ue(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:N,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(i=>v(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import{ML as te,eX as q,kx as z,fE as Q,fC as ne,Kd as X,Mp as oe,uO as ke,MM as N,uD as Ie,uY as Ee,uS as ie,uH as re,uW as Pe,uT as je,MN as le,wD as Le,fo as ve,ge as Te,MO as $,uL as ce,uK as de,u$ as Ae,c6 as Oe}from"./zeni-epic-state-pQFlpfOQ.js";import{K as pe,V as J,Q as M,z as G,i as ue,D as me,ak as ge,al as Fe,x as fe,o as O,E as he,a as Ce,am as Re,Y as Ve,$ as Ze,v as Be,d as ye,f as Ue,r as $e,an as Me,k as Ke}from"./index-B1tuor_E.js";import{D as be,n as H,S as Se}from"./mui-HaM5aBuG.js";import ae from"./NotFoundScreen-By2F-w6l.js";import{a as r}from"./sentry-CLlo3TXi.js";import{u as ee,i as _e,j as m,h as ze,g as Ge,n as He,o as se,p as U}from"./core-BDPZcSG4.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as Ye}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="e72bddc0-04ce-4a7d-9eb8-7e54df460601",a._sentryDebugIdIdentifier="sentry-dbid-e72bddc0-04ce-4a7d-9eb8-7e54df460601")}catch{}})();const Ne={overlayWidth:new fe(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[k,b]=r.useState(!1),{userId:S}=_e(),c=m(e=>te(e)),d=m(e=>q(e)),I=m(e=>z(e)),{useFeatureGate:D}=J(),{isFeatureEnabled:x}=D(M.isDebitCardFeatureEnabled),E=Q(x,d),L=ne(d),v=X(d),V=oe(d),Z=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!E&&I&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{u(N()),y()},T=()=>{F===!0?b(!0):h()},B=l.companyView?.controllers?.map(e=>e.user),p=!!d.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(M.isChargeCardFeatureEnabled),j=ue(d,P,x),A=d.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={peopleDetails:c,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:I,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:h,onDeleteUser:e=>{u(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{u(ie({peopleLocalData:e})),R(!0)},onSaveClick:()=>{u(g==="zeni_only"?Ie(a):Ee(v))},onCloseClick:T,isLoading:w||c.person==null},i={onOkClick:()=>{b(!1),h()},onCancelClick:()=>{b(!1)}};return r.useEffect(()=>{w===!1&&S!=null&&u(ke(S))},[w,S]),r.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&h()},[c.updatePersonState.fetchState]),s.jsx(be,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:T,children:s.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[k===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Fe,{...C})]})})},Qe=H(Se)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,we=H(he.H6Regular)`
|
|
6
|
-
margin-top: ${O.sp7};
|
|
7
|
-
padding-left: ${O.sp8};
|
|
8
|
-
padding-right: ${O.sp8};
|
|
9
|
-
color: ${a=>a.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,De=H(he.LargeRegularSp)`
|
|
12
|
-
color: ${a=>a.theme.colors.hero};
|
|
13
|
-
padding-left: ${O.sp8};
|
|
14
|
-
padding-right: ${O.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${O.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Xe={overlayWidth:new fe(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[k,b]=r.useState(!1),S=m(i=>te(i)),c=m(i=>q(i)),d=m(i=>z(i)),{useFeatureGate:I}=J(),{isFeatureEnabled:D}=I(M.isDebitCardFeatureEnabled),x=Q(D,c),E=ne(c),L=X(c),v=oe(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!x&&d&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),u(N())},h=()=>{F===!0?b(!0):w()},T={onOkClick:()=>{b(!1),w()},onCancelClick:()=>{b(!1)}},B=l.companyView?.controllers.map(i=>i.user),p=!!c.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=I(M.isChargeCardFeatureEnabled),j=ue(c,P,D),A=c.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{u(ie({peopleLocalData:i})),R(!0)},onResetClick:w,onSaveClick:()=>{u(g==="zeni_only"?Pe(a):je())},onCloseClick:h,peopleDetails:S,isAccountingClassesEnabled:d,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:x,isCardsOnlyTenant:E,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(be,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:h,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[k===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:T}):null,s.jsx(Re,{...C})]})})},ea=H(Se)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,aa=He(function(a,t){const l=le(a),n=G.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:ye}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Ae(o))},onReloadPeople:()=>{a(ce()),a(de(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})(Me);function Y({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=Ge(),{areTenantIdsInSync:o}=Ve(),y=G.getSignedInUser(),f=m(e=>q(e)),{useFeatureGate:u}=J(),{isFeatureEnabled:F}=u(M.isDebitCardFeatureEnabled),R=m(e=>z(e)),k=!Q(F,f)&&R,b=X(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[d,I]=r.useState(!1),[D,x]=r.useState(!1),[E,L]=r.useState(!1),[v,V]=r.useState("off"),[Z,w]=r.useState(!1),h=e=>{w(e)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),p=m(e=>le(e));Ze({isDataReady:p.fetchState==="Completed"});const P=m(e=>Le(e.classState,e.classListState)),j=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=f?.companyId;r.useEffect(()=>{d&&v===p.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),I(!0),n(ce()))},[d,y,S,n,p.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(de(C,k))},[C,k,o]),r.useEffect(()=>{x(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{x(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Be,{analytics:ye,onLoad:e=>e.trackPageLoaded(Ue.Event.members)}):null,D===!0?s.jsx(Je,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,E===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,s.jsx(Ye,{isAppContentDrawerOpen:Z,handleDrawerToggle:h}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:f.isZeni,isZeniTenant:b,peopleUIState:p.uiState,companyId:C,shouldFetchClasses:k,classList:P,managersView:j,peopleView:p,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n($({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${c}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Oe(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(U,{path:"/",element:s.jsx(Y,{})}),s.jsx(U,{path:"new",element:s.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),s.jsx(U,{path:":userId/edit",element:s.jsx(Y,{isEditPeopleDrawerOpen:!0})}),s.jsx(U,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(U,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import E from"./NotFoundScreen-By2F-w6l.js";import{a as r}from"./sentry-CLlo3TXi.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-BDPZcSG4.js";import{eX as B,S_ as b,bq as F,bn as N,ie as V,fz as $}from"./zeni-epic-state-pQFlpfOQ.js";import{T as q,z as I,$ as X,cY as Y}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as H}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="b80a0df7-e0a0-4dae-a2ed-67770246cc70",e._sentryDebugIdIdentifier="sentry-dbid-b80a0df7-e0a0-4dae-a2ed-67770246cc70")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(z,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import{a as o}from"./sentry-CLlo3TXi.js";import{j as f,h as L,u as V,g as F,n as N}from"./core-BDPZcSG4.js";import{y as W,K as _,z as P,bf as $,x as K,Y as M,$ as U,v as z,d as l,f as X,a8 as Y,bg as q}from"./index-B1tuor_E.js";import{fI as G,eX as J,Pm as R,Pn as Q,vH as Z,vx as g,fK as ee,bS as ae,vC as re,Po as ne}from"./zeni-epic-state-pQFlpfOQ.js";import{D as te,e as se,n as oe,S as ie}from"./mui-HaM5aBuG.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as ce}from"./MobileAppDrawer-ChAhLGZE.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]="c61048ca-6456-42d2-9b4c-bd88c7580a25",e._sentryDebugIdIdentifier="sentry-dbid-c61048ca-6456-42d2-9b4c-bd88c7580a25")}catch{}})();const de={overlayWidth:new K(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>G(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=N(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Y(q));function ye({isReferralDrawerOpen:e}){const a=L(),r=V(),n=F(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=P.getSignedInUser(),h=f(t=>J(t)),v=f(t=>R(t)),m=v.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),b=Q([v,p]),{areTenantIdsInSync:d}=M();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});U({isDataReady:b===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{ye as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-B2nLBm11.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-BDPZcSG4.js";import{eX as v,fT as w,Mo as Te,kx as K,qR as W,rG as k,kl as Re,jp as Me,vb as J,rL as Oe,bs as ke,Mp as Ae,bn as Fe,wk as De,Mq as Ee,Mr as je,v3 as Pe,Ms as Y,Mt as ve,Mu as Le,Mv as Be,Mw as Ve,Mx as I,My as A,Mz as F,MA as N,MB as D,MC as E,dK as Ue,w0 as xe,vQ as q,vR as $,w6 as ze,vV as Q,wc as Ge,MD as He,ME as Ye,MF as Ne,MG as qe,MH as $e,fE as Qe,fC as Ze}from"./zeni-epic-state-pQFlpfOQ.js";import{R as Xe,U as Ke,W as We,X as Je,K as ea,V as ee,Q as j,z as ae,Y as aa,k as sa,c as ta,Z as oa,$ as na,v as ra,d as P,f as ia,a0 as la,r as se,a1 as ca,a2 as da,a3 as pa}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import fa from"./NotFoundScreen-By2F-w6l.js";import{F as ma}from"./FeaturePreviewScreen-Dgm-EaRp.js";import{a as _}from"./sentry-CLlo3TXi.js";import{u as ua}from"./useInitialThreadRequest-DaoYHqyn.js";import{t as Z,a as X,b as _a}from"./routePaths-DbVBNvPC.js";import{M as ha}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="2b760c4b-b465-4f98-9dcc-71fea4b98a85",e._sentryDebugIdIdentifier="sentry-dbid-2b760c4b-b465-4f98-9dcc-71fea4b98a85")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},Ca=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return X(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?X(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(J())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Je(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),g=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>K(n)),M=d(n=>W(n)),le=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(k(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&g==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))},[i,L,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(J());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&ke(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Xe(he??"")==="reports",be=Ke(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);We({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Qe(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-B2nLBm11.js";import{V as x,z as w,aR as b,v as I,d as p,f as F,d7 as P,Q as T}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import m from"./NotFoundScreen-By2F-w6l.js";import{a as f}from"./sentry-CLlo3TXi.js";import{u as L,j as y,h as V,g as R,n as A,o as U,p as u}from"./core-BDPZcSG4.js";import{eX as z,TC as C,PX as X,TD as v,vH as Y,fK as G,TE as H,vF as K}from"./zeni-epic-state-pQFlpfOQ.js";import{R as j}from"./ReferralListScreen-C3Yy7aIK.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import"./MobileAppDrawer-ChAhLGZE.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4bfb90aa-0e45-4aab-93f6-6f7d188415ee",a._sentryDebugIdIdentifier="sentry-dbid-4bfb90aa-0e45-4aab-93f6-6f7d188415ee")}catch{}})();const O=A(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{a(v()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(K())},onUpdateInviteFormLocalData:s=>{a(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Q=()=>{const a=L(),[t,n]=f.useState(!1),[i,s]=f.useState(!1),r=y(o=>z(o)),c=V(),D=R(),{useDynamicConfig:g}=x(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=y(o=>C(o)),_=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:k}=g(b.zeniAccountsConfig),N=X(k);f.useEffect(()=>{a(v()),r?.rewardsLastViewedTime==null&&i===!1&&(a(Y()),s(!0))},[]),f.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(O,{navigate:c,location:D,currentTenant:r,companyName:S,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function ua(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(T.isReferralFeatureEnabled);return e.jsxs(U,{children:[e.jsx(u,{path:"/",element:t?e.jsx(j,{}):e.jsx(m,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(Q,{}):e.jsx(m,{})}),e.jsx(u,{path:"*",element:e.jsx(m,{})})]})}export{ua as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-B2SXqHam.js","assets/sentry-CLlo3TXi.js","assets/core-BDPZcSG4.js","assets/zeni-epic-state-pQFlpfOQ.js","assets/index-B1tuor_E.js","assets/mui-HaM5aBuG.js","assets/analytics-7PXXxPIN.js","assets/utils-BPOASmy-.js","assets/withTransactionSidePanel-DKz4VB48.js","assets/useAskAiCfoHostNavButtonProps-CtdOXC4O.js","assets/TransactionDetailScreen-D7m7OZhn.js","assets/decodeURIComponentSafe-BR3AOxh5.js","assets/routePaths-DbVBNvPC.js","assets/NotFoundScreen-By2F-w6l.js","assets/useInitialThreadRequest-DaoYHqyn.js","assets/analyticsHelper-Ce6ZNBVM.js","assets/CompanyPassportScreen--SPdIRlf.js","assets/MobileAppDrawer-ChAhLGZE.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Dpypv2iO.js","assets/FeaturePreviewScreen-Dgm-EaRp.js","assets/ReferralListScreen-C3Yy7aIK.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-Dg9I-63-.js","assets/AddressScreen-jEbIVhK3.js","assets/DomesticWireDetailScreen-DDaUfwcf.js","assets/DrawerScreen-DZ4DkgHO.js","assets/SetupPagesScreen-Drdx2Cz2.js","assets/BusinessVerificationPageScreen-BLuK4dS7.js","assets/BillPayApprovalRoutes-Csh9SPnU.js","assets/ReimbursementApprovalRuleDetailScreen-CtUn349v.js","assets/getLocaleForTenant-5gC9KZpR.js","assets/ReimbursementRoutes-BYbEE0sN.js","assets/ReimbursementApprovalRoutes-DAVTSD8z.js","assets/TransactionListRoutes-C8nLf9Ob.js","assets/ZeniAccountStatementScreen-CPK7RprH.js","assets/SettingsRoutes-Dqo8Gg1_.js","assets/accountMappingHelper-B3v4RMhl.js","assets/useEmailConnectResultRefresh-7EeCPqR2.js","assets/QBOConnectionScreen-CwZNkZEW.js","assets/empty-CM59KsLF.js","assets/index-CAEfbAkM.js","assets/url-DqIeqdCZ.js","assets/index-DNm9oOTV.js","assets/ReportsRoutes-Cb8uSh4z.js","assets/ChargeCardRoutes-CyGButQm.js","assets/useChargeCardPusherEvents-BSAOVtAf.js","assets/PeopleRoutes-DF4Scn5d.js","assets/ExpenseAutomationRoutes-B0EQq9x4.js","assets/TreasuryRoutes-CAqMFzPt.js","assets/useCashManagementBanner-DTfbqox_.js","assets/VendorsRoutes-kgQCFQez.js","assets/pathToGoBack-Bp5QCbKd.js","assets/ZeniAccountRoutes-B85icQ0n.js","assets/AddressRoutes-DpMeCgDh.js","assets/PandLWithForecastRoutes-CSm9JBFf.js","assets/CustomerOnboardingRoutes-Dk5stUMd.js","assets/TransactionDetailRoutes-BBXGE-Zw.js","assets/EntityDetailRoutes-CFPPv2Q-.js","assets/NotificationRoutes-0mjOYLwF.js","assets/PerformanceRoutes-C0h70RAc.js","assets/RewardsRoutes-BqWi3Rha.js","assets/TaskRoutes-DqlemW4d.js","assets/TaskListScreen-B2sNWFUZ.js","assets/AiCfoScreen-D2GxwJyN.js","assets/CardsAiCfoScreen-D8ZPE13M.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as t,bn as rs,eX as is,fE as ls,fC as us,gk as cs,fr as ds,cU as pe,cA as ms,fU as _s,cs as hs,bE as Es,bo as ps,fY as Rs,v as xs,LW as gs,bs as Is,LX as js,bK as Ts,bJ as As,bt as bs,co as Ds,LY as fs,LZ as ys,cQ as Cs,cT as vs,cS as Us,cz as Os,cG as ws,o9 as Re,fA as xe,gu as Ps,g0 as ge,gr as Ie,gs as je,g1 as Ls}from"./zeni-epic-state-pQFlpfOQ.js";import{j as e}from"./liveblocks-B2nLBm11.js";import{a as w}from"./sentry-CLlo3TXi.js";import{u as Fs,h as ks,i as Hs,g as Bs,j as z,l as Te,N as u,o as Vs,p as a}from"./core-BDPZcSG4.js";import{y as Ss,u as Ns,z as D,V as Zs,c as Ms,O as zs,Q as G,i as Gs,k as $s,L,a as Ae,t as _,P as Ys,d as K,l}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{f as be}from"./analyticsHelper-Ce6ZNBVM.js";import{t as Ws}from"./getLocaleForTenant-5gC9KZpR.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="35b75b9a-502c-473e-b161-36a3091ba82c",o._sentryDebugIdIdentifier="sentry-dbid-35b75b9a-502c-473e-b161-36a3091ba82c")}catch{}})();const qs={dashboard:()=>t(()=>import("./DashboardRoutes-B2SXqHam.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>t(()=>import("./BillPayRoutes-Dg9I-63-.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>t(()=>import("./ReimbursementRoutes-BYbEE0sN.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>t(()=>import("./TransactionListRoutes-C8nLf9Ob.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>t(()=>import("./SettingsRoutes-Dqo8Gg1_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21])),reports:()=>t(()=>import("./ReportsRoutes-Cb8uSh4z.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>t(()=>import("./ChargeCardRoutes-CyGButQm.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21])),people:()=>t(()=>import("./PeopleRoutes-DF4Scn5d.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>t(()=>import("./ExpenseAutomationRoutes-B0EQq9x4.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>t(()=>import("./TreasuryRoutes-CAqMFzPt.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21])),vendors:()=>t(()=>import("./VendorsRoutes-kgQCFQez.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21])),zeniAccounts:()=>t(()=>import("./ZeniAccountRoutes-B85icQ0n.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},Xs=l(()=>t(()=>import("./ReportsRoutes-Cb8uSh4z.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,13,19,14,12,17,21]))),Js=l(()=>t(()=>import("./AddressRoutes-DpMeCgDh.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,21]))),Ks=l(()=>t(()=>import("./PeopleRoutes-DF4Scn5d.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,9,17,21]))),et=l(()=>t(()=>import("./PandLWithForecastRoutes-CSm9JBFf.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),st=l(()=>t(()=>import("./CustomerOnboardingRoutes-Dk5stUMd.js"),__vite__mapDeps([55,1,2,3,23,4,5,6,7,13,38,39,40,41,42,11,37,45,21]))),tt=l(()=>t(()=>import("./VendorsRoutes-kgQCFQez.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,23,13,19,12,51,9,17,25,36,21]))),nt=l(()=>t(()=>import("./TransactionDetailRoutes-BBXGE-Zw.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,10,9,11,12,21]))),De=l(()=>t(()=>import("./EntityDetailRoutes-CFPPv2Q-.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,11,8,9,10,12,21]))),at=l(()=>t(()=>import("./DashboardRoutes-B2SXqHam.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),fe=l(()=>t(()=>import("./BillPayRoutes-Dg9I-63-.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ot=l(()=>t(()=>import("./SettingsRoutes-Dqo8Gg1_.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,42,11,28,29,32,21]))),ye=l(()=>t(()=>import("./ReimbursementRoutes-BYbEE0sN.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),rt=l(()=>t(()=>import("./ZeniAccountRoutes-B85icQ0n.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,49,13,26,17,15,12,27,19,24,23,9,34,21]))),it=l(()=>t(()=>import("./TreasuryRoutes-CAqMFzPt.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,49,19,21]))),lt=l(()=>t(()=>import("./TransactionListRoutes-C8nLf9Ob.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ut=l(()=>t(()=>import("./ChargeCardRoutes-CyGButQm.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,45,23,21]))),ct=l(()=>t(()=>import("./NotificationRoutes-0mjOYLwF.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,21]))),dt=l(()=>t(()=>import("./PerformanceRoutes-C0h70RAc.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,9,17,21]))),mt=l(()=>t(()=>import("./ExpenseAutomationRoutes-B0EQq9x4.js"),__vite__mapDeps([47,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),_t=l(()=>t(()=>import("./RewardsRoutes-BqWi3Rha.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,13,20,9,17,21]))),ht=l(()=>t(()=>import("./TaskRoutes-DqlemW4d.js"),__vite__mapDeps([61,1,2,3,13,4,5,6,7,14,17,62,9,21]))),Et=l(()=>t(()=>import("./AiCfoScreen-D2GxwJyN.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,18,51,21]))),Ce=l(()=>t(()=>import("./CardsAiCfoScreen-D8ZPE13M.js"),__vite__mapDeps([64,1,2,3,4,5,6,7,21]))),y=l(()=>t(()=>import("./NotFoundScreen-By2F-w6l.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),pt=l(()=>t(()=>import("./TaskListScreen-B2sNWFUZ.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,9,17,21])));function Ht({setTenantEmailDomain:o}){const T=Fs(),B=ks(),{tenantEmailDomain:r}=Hs(),F=Ss().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Ns(),v=D.getSignedInUserTenant(r)?.tenantId,I=D.getSignedInUser(),se=rs(I),$=Bs(),[V,Pe]=w.useState(!1),i=z(n=>is(n)),{useFeatureGate:N}=Zs(),Z=Ms(),te=zs(),Le=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z(n=>n.tenantState.fetchState),j=z(n=>n.tenantState.activeTenantFetchState.fetchState),h=j==="Completed"||A==="Completed"?ls(ne,i):void 0,Q=j==="Completed"||A==="Completed"?us(i):void 0,He=Gs(i,ke,ne),{isFeatureEnabled:Be}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:X}=N(G.isAiCfoFileUploadEnabled),Y=z(n=>cs(n));if(r!=null){const n=D.getSignedInUserTenant(r);I!=null&&n!=null&&be(I,i,F)}const M={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=ds(),E=$s(),Ve=i.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Se=ms(E?.loggedInUserRoleMap),oe=w.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ne=z(n=>M.tenantId!=null?_s(n,M.tenantId):void 0);w.useEffect(()=>{U(L.TENANT_FETCHING),o(r)},[r]),w.useEffect(()=>{if(J!=null&&v!=null){const n=J.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const c=hs(Number(b[0])),s=Number(b[1]),d=Es(`01-${c<10?`0${c}`:c}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=ps();d.isAfter(S,"month")===!1?T(Rs(v,{month:c,year:s})):B("./month_end_close_checks/review")}}}},[J,v]),w.useEffect(()=>{V||(Pe(!0),U(L.TENANT_FETCHING)),oe.current?oe.current=!1:!xs(ae,M)&&D.isSignedIn()&&(U(L.TENANT_FETCHING),function(n,b,c,s){if(xe(b?.userId,b?.zeniSessionId,n.tenantId),c(Ps(!0)),c(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const d=D.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ws(s)),d?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}n.userId!=null?K.identify(n.userId,{tenant_id:n.tenantId}):K.resetUserIdentity()}(M,I,T,Ne))},[M,ae,I,T,D]),w.useEffect(()=>{D.isSignedIn()&&(U(L.TENANT_FETCHING),function(n,b,c,s,d,S,H){if(c==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&d?.zeniSessionId!=null,ns=c==null||c.tenantId!==s,as=c!=null&&c.excludedResources==null,os=c!=null&&c.externalConnections==null;if(W&&ns){H(ge(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(d?.userId,d?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(d.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(d.userId,s)))}else W&&as&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(d.userId,s))),W&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(d.userId,s)));if(W){K.identify(d.userId,{tenant_id:s});const q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(L.TENANT_FETCHING),H(Ls(d.userId,s,d.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(d.userId,d.zeniSessionId)))}}(A,j,i,v,I,U,T))},[v,j]),w.useEffect(()=>{D.isSignedIn()&&A==="Completed"&&Y.tenantsBaseInOrder.length>0&&(k(L.TENANT_FETCHING),D.saveSignedInUserTenants(gs(Y.tenantsBaseInOrder)),I!=null&&be(I,i,F,void 0,Y.tenantsBaseInOrder))},[Y,A,i,I]),w.useEffect(()=>{j==="In-Progress"&&U(L.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(L.TENANT_FETCHING),k(L.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())},[j,A,v,V]);const ie=w.useRef(!1);w.useEffect(()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const c=s=>{if(s>=n.length)return;const d=n[s],S=qs[d];S!=null?S().then(()=>ee(()=>c(s+1))).catch(()=>ee(()=>c(s+1))):c(s+1)};ee(()=>c(0))},b)}())},[j,V]);const O=i?.userRole!=null&&Is(i?.userRole),{isFeatureEnabled:Ze}=N(G.isReferralFeatureEnabled),Me=i?.userRole!=null&&i.userRole.includes("charge_card_user"),ze=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),P=i?.userRole!=null&&pe(i.userRole),le=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,ue=He&&!O,Ge=js(E?.loggedInUserRoleMap),$e=i.externalConnections?.accounting[0]?.isValid,ce=i.company?.companyOnboardingInfo.isOnboardingCompleted,de=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=de&&Ts(E?.loggedInUserRoleMap),_e=Le&&!O,Ye=Fe&&!O,We=le&&As(E?.loggedInUserRoleMap),qe=ue&&bs(E?.loggedInUserRoleMap),Qe=_e&&Ds(E?.loggedInUserRoleMap),Xe=fs(E?.loggedInUserRoleMap),Je=ys(E?.loggedInUserRoleMap),Ke=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),p=Os(E?.loggedInUserRoleMap),R=ws(E?.loggedInUserRoleMap),he=le&&p,Ee=de&&R,x=_e&&Ke,g=Ye&&es,m=ue&&ss,ts=i.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Se===!0||Ge===!0||Xe===!0||Je===!0;return D.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(ce===!0||se&&!re)&&$e===!1&&h===!1&&Q===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||ce!==!1||re||se?V&&i?.userRole&&h!=null&&Q!=null&&r!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Vs,{children:e.jsxs(a,{element:e.jsx(Ys,{}),children:[e.jsx(a,{path:"/",element:e.jsx(Rt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(at,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(Xs,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"people/*",element:ts||P?e.jsx(Ks,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(et,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(st,{})}),e.jsx(a,{path:"transaction/*",element:P&&O===!1||Me||ze?e.jsx(nt,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"transactions/*",element:P&&O===!1?e.jsx(lt,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"customer/*",element:P&&O===!1?e.jsx(De,{entityType:"customer"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"vendor/*",element:P&&O===!1?e.jsx(De,{entityType:"vendor"}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"tasks",element:e.jsx(pt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"address/*",element:We||me||Qe||qe?e.jsx(Js,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(rt,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(it,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(dt,{}):e.jsx(we,{tenantEmailDomain:r})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&O===!1?e.jsx(mt,{}):e.jsx(we,{tenantEmailDomain:r})}),e.jsx(a,{path:"notifications/*",element:e.jsx(ct,{})}),e.jsx(a,{path:"vendors/*",element:Ve?e.jsx(tt,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(fe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(fe,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(ye,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(ye,{}):e.jsx(f,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(a,{path:"settings/*",element:Be?e.jsx(ot,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(ut,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(_t,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Et,{isFileUploadEnabled:X}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):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 Rt=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:r,showTreasuryRoute:F,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(F)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):F?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},f=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:r,isTenantBankingOnly:F,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(F===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(r)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(Oe,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):r?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(Oe,{tenantEmailDomain:C}):T?e.jsx(gt,{tenantEmailDomain:C}):B?e.jsx(xt,{tenantEmailDomain:C}):e.jsx(y,{})},xt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),gt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{f as FallBackRoute,Ht as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-B2nLBm11.js";import{a as d}from"./sentry-CLlo3TXi.js";import{h as L,g as $,u as _,j as b,s as ce,n as Q,i as Z,o as W,p as k}from"./core-BDPZcSG4.js";import{bn as je,eX as D,gp as De,m$ as le,Of as Me,hF as fe,O6 as Te,qR as Ue,kx as he,mX as _e,hH as Fe,O8 as Be,O7 as Re,Qy as Oe,zi as Ve,EL as ze,Q7 as Le,Qg as Ne,c6 as ne,cL as $e,cM as Qe,bs as Ze,M7 as Ge,xK as He,Qz as Ke,Ha as Xe,Er as qe,Ei as be,Ef as Ye,xO as Se,El as ye,Eo as Ce,Eu as te,ub as ae,xN as Je,k9 as q,kc as Ie,QA as We,ld as en,y1 as nn,M_ as tn,M$ as an,k7 as on,QB as sn,ka as cn,rj as ln,MV as rn,MW as dn,rn as un,hq as pn,Mf as J,hi as re,hf as gn,hn as mn,Mg as fn,x_ as hn,QC as bn,QD as Sn,EI as yn,fC as Ae,fE as Ee,QE as Cn,gd as In,Mp as An,xZ as de,gi as ue,gh as En,xY as xn,gg as vn,gf as kn,QF as wn,fH as xe,QG as Pn,QH as jn,y4 as Dn,xX as pe,QI as Mn,fX as Tn,xU as Un,bZ as _n,c5 as Fn,c4 as Bn,b_ as Rn,c2 as On,c1 as Vn,c0 as zn,c3 as Ln,b$ as Nn}from"./zeni-epic-state-pQFlpfOQ.js";import{V as Y,Q as O,z as j,af as ve,bS as $n,d as G,f as Qn,bD as Zn,k as H,B as oe,bT as Gn,i as ke,bU as Hn,aq as Kn,m as we,bV as Xn,bW as qn,bX as Yn,Y as Jn,bY as Wn,r as et,bZ as nt}from"./index-B1tuor_E.js";import{n as V}from"./mui-HaM5aBuG.js";import{M as R}from"./MobileAppDrawer-ChAhLGZE.js";import{a as K,g as X,m as tt}from"./accountMappingHelper-B3v4RMhl.js";import{t as at,A as ot}from"./AddressScreen-jEbIVhK3.js";import N from"./NotFoundScreen-By2F-w6l.js";import{g as st}from"./analyticsHelper-Ce6ZNBVM.js";import{B as it}from"./BusinessVerificationPageScreen-BLuK4dS7.js";import{C as ct}from"./CompanyPassportScreen--SPdIRlf.js";import{u as lt,a as rt}from"./useEmailConnectResultRefresh-7EeCPqR2.js";import{q as ge}from"./QBOConnectionScreen-CwZNkZEW.js";import{B as dt}from"./BillPayApprovalRoutes-Csh9SPnU.js";import{R as ut}from"./ReimbursementApprovalRoutes-DAVTSD8z.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./routePaths-DbVBNvPC.js";import"./empty-CM59KsLF.js";import"./pdf-lib-CHfVanCJ.js";import"./index-CAEfbAkM.js";import"./url-DqIeqdCZ.js";import"./index-DNm9oOTV.js";import"./decodeURIComponentSafe-BR3AOxh5.js";import"./ReimbursementApprovalRuleDetailScreen-CtUn349v.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]="f3039931-882a-41ff-b34b-067d04b6341f",e._sentryDebugIdIdentifier="sentry-dbid-f3039931-882a-41ff-b34b-067d04b6341f")}catch{}})();const pt=V.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,gt=Q(function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:he(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Ue(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:a.isCapitalizationFeatureEnabled,capitalizableAccounts:a.capitalizableAccounts,accountNamesById:a.accountNamesById,capitalizableAccountOverrides:a.capitalizableAccountOverrides,isCapitalizationThresholdSaving:a.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:a.onSaveCapitalizationAccountThreshold}},function(e,a){const{navigate:s,location:c,isFiling1099FeatureEnabled:l}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:i,reimbursementsAccountSection:u,vendorsAccountSection:p,filing1099Section:m}=n,{incomeAccount:y,expenseAccount:g}=t,{billPayAccount:r}=i,{reimbursementsAccount:h}=u,{prepaidExpensesAccount:A,fixedAssetsAccount:w,accruedExpensesAccount:x}=p,{bankAccount:f,expenseCategory1099:I}=m,E=K(a.accountMappingView.incomeAccountList,y.selectedOption),F=K(a.accountMappingView.expenseAccountList,g.selectedOption),B=K(a.accountMappingView.billPayAccountList,r.selectedOption),M=K(a.accountMappingView.reimbursementsAccountList,h.selectedOption),z=X(a.accountMappingView.prepaidExpensesAccountList,A.selectedOptions),S=X(a.accountMappingView.fixedAssetsAccountList,w.selectedOptions),T=X(a.accountMappingView.accruedExpensesAccountList,x.selectedOptions),C=X(a.accountMappingView.bankAccounts1099FilingAccountList,f.selectedOptions),v=tt(a.accountMappingView.expenseAccounts1099FilingAccountList,I),U={selectedIncomeAccountId:E?.accountId,selectedExpenseAccountId:F?.accountId,selectedBillPayAccountId:B?.accountId,selectedReimbursementsAccountId:M?.accountId,selectedPrepaidExpensesAccountIds:z.map(P=>P.accountId),selectedFixedAssetsAccountIds:S.map(P=>P.accountId),selectedAccruedExpensesAccountIds:T.map(P=>P.accountId),selectedBankAccounts1099FilingAccountIds:C.map(P=>P.accountId),selectedExpenseAccounts1099FilingAccountIds:v};e(Re({data:U}))},onBackClick:()=>{ve(c)===!1?(s("../../dashboard"),e(Be())):e(fe())},onSaveClick:()=>{e(Fe()),l&&G.track(Qn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(_e(a.currentTenant.companyId,n))}}})($n),mt=()=>{const e=L(),a=$(),s=_(),{useFeatureGate:c,useDynamicConfig:l}=Y(),{isFeatureEnabled:n}=c(O.isFiling1099FeatureEnabled),{isFeatureEnabled:t}=c(O.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:i,isDynamicConfigLoading:u}=l("transaction_categorization_config"),p=!u&&i?.capitalization_enabled===!0,m=j.getSignedInUser(),y=je(m),g=b(C=>D(C)),{capitalizableAccounts:r,capitalizableAccountOverrides:h,isCapitalizationThresholdSaving:A,currencySymbol:w}=b(C=>{const v=C.tenantState.currentTenantId,U=v!=null?C.tenantState.tenantsById[v]:void 0,P=De(C.companyState,g.companyId);return{capitalizableAccounts:U?.capitalizableAccounts??null,capitalizableAccountOverrides:U?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:C.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:P?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),x=d.useCallback((C,v)=>{s(le(g.companyId,C,v))},[s,g.companyId]),f=d.useCallback(C=>{const v={...h??{}},U=Object.entries(C);for(const[se,ie]of U)ie===null?delete v[se]:v[se]=ie;const[P,Pe]=U[0]??[];P!=null&&s(le(g.companyId,P,Pe,void 0,Object.keys(v).length>0?v:null))},[s,g.companyId,h]),I=b(C=>Me(C.accountState),ce),E=d.useMemo(()=>{const C={};for(const v of I)v.accountId!=null&&v.accountName!=null&&(C[v.accountId]=v.accountName);return C},[I]),[F,B]=d.useState(!1),[M,z]=d.useState(!1);d.useEffect(()=>{F===!1&&(s(fe()),B(!0))},[F]);const S=b(C=>Te(C)),T=C=>{z(C)};return o.jsxs(pt,{children:[o.jsx(R,{isAppContentDrawerOpen:M,handleDrawerToggle:T}),o.jsx(gt,{currentTenant:g,navigate:e,accountMappingView:S,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:t,isCapitalizationFeatureEnabled:p,capitalizableAccounts:r,accountNamesById:E,capitalizableAccountOverrides:h,currencySymbol:w,isCapitalizationThresholdSaving:A,onSaveCapitalizationAccountThreshold:x,onSaveCapitalizationAccountThresholds:f,location:a,isSettings:ve(a),onClickMenuIcon:()=>T(!0)})]})},ft=V.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,ht=Q(function(e,a){const s=D(e),c=Le(e),l=Ne(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(ne(s?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:l,analytics:G}},function(e,a){const{navigate:s,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Gn),bt=()=>{const e=L(),a=$(),s=_(),{tenantEmailDomain:c}=Z(),[l,n]=d.useState(!1),[t,i]=d.useState(!1),[u,p]=d.useState(!1),m=b(I=>D(I)),y=b(I=>I.billPaySetupApproverViewState.fetchState),g=b(I=>I.remiSetupApproverViewState.fetchState),r=b(I=>Oe(I)),{isApprovalRulesV3Enabled:h,isLoading:A}=Zn(m?.tenantId),w=m.companyId??j.getSignedInUserTenant(c)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const x=H();d.useEffect(()=>{u||y!=="Not-Started"||A||(p(!0),s(Ve(!0,!0,h)))},[u,y,A,h,s]),d.useEffect(()=>{t||g!=="Not-Started"||A||(i(!0),s(ze(!0,!1,!1,h)))},[t,g,A,h,s]);const f=I=>{n(I)};return x?.loggedInUserRoleMap!=null?o.jsxs(ft,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:f}),o.jsx(ht,{navigate:e,location:a,companyId:w,currentTenant:m,roleMap:x.loggedInUserRoleMap,onClickMenuIcon:()=>{f(!0)}})]}):o.jsx(oe,{fetchState:r.fetchState})},St=V.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,yt=Q(function(e,a){const{companyId:s,isZeniAccountEnabled:c,isChargeCardEnabled:l,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:i}=a,u=D(e);return{bankSetupView:Ke(e,s,n,t,c,l,i),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:G}},function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t,i)=>{e(ae(t,n,i))},onEstablishConnectionClick:(n,t,i)=>{e(te(n,l,t,i))},onUpdatePaymentAccountStatus:(n,t,i,u,p)=>{e(Ce(n,t,p,u,i))},onUpdatePaymentAccountLoginStatus:(n,t,i,u)=>{e(ye(!1,n,u,i,t))},onEstablishConnectionSuccess:(n,t)=>{e(Se(t,n))},onUpdateAccountClick:(n,t,i,u,p)=>{e(p==="paymentAccount"?be(n,t,i,u):Ye(u,n,t))},onUpdatePrimaryFundingAccount:(n,t,i)=>{e(qe(l,t,n,i))},onRemoveConnection:n=>{e(Xe(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Hn),Ct=()=>{const e=L(),a=$(),s=_(),{tenantEmailDomain:c}=Z(),l=H(),{useFeatureGate:n}=Y(),{isFeatureEnabled:t}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=n(O.isDebitCardFeatureEnabled),[u,p]=d.useState(!1),[m,y]=d.useState(!1),g=b(M=>D(M)),r=b(M=>M.settingsViewState.bankConnection.fetchState),h=$e(g,l?.loggedInUserRoleMap),A=Qe(g,l?.loggedInUserRoleMap),w=g?.userRole!=null&&Ze(g.userRole),x=!!g.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!w,f=g.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!w,I=ke(g,t,i),E=Ge(g,l?.loggedInUserRoleMap)&&I,F=g.companyId??j.getSignedInUserTenant(c)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect(()=>{m||r==="Completed"||(y(!0),s(He(!1)))},[m,s,r]);const B=M=>{p(M)};return h||x||A||E?o.jsxs(St,{children:[o.jsx(R,{isAppContentDrawerOpen:u,handleDrawerToggle:B}),o.jsx(yt,{navigate:e,location:a,companyId:F,currentTenant:g,roleMap:l.loggedInUserRoleMap,isBillPayEnabled:h,isRemiEnabled:A,isZeniAccountEnabled:x,isChargeCardEnabled:E,isTreasuryEnabled:f,onClickMenuIcon:()=>{B(!0)}})]}):o.jsx(N,{})},It=V.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,At=Q(function(e,a){const{companyId:s}=a,c=D(e),l=a.roleMap.bill_pay_admin,n=We(e,s),{uiState:t}=n,i=(ne(c?.userRole??[])||l)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:we.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:i,analytics:G}},function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t)=>{e(ae("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(te(n,l,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(Se("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,i)=>{e(Ce(n,t,"billing","billing_setup",i))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(ye(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(be(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ie(n))},handleConfirmCardSetupIntent:n=>{e(cn(n))},updateCardPaymentModalState:n=>{e(sn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,i)=>{e(on(n,t,i))},handleFetchPaymentSources:()=>{e(q())},resetCardPaymentViewState:()=>{e(an())},handleResetCardPaymentErrorStatuses:()=>{e(tn())},onBillingAddressSave:n=>{e(nn(n))},onAddressEditHandler:n=>{if(n!=null){const t=at(n);e(en({addressType:"subscription_billing_address",addressToCreate:t}))}}}})(Xn),Et=()=>{const e=L(),a=$(),s=_(),{tenantEmailDomain:c}=Z(),[l,n]=d.useState(!1),[t,i]=d.useState(!1),[u,p]=d.useState(!1),m=b(f=>D(f)),y=b(f=>f.cardPaymentViewState),g=b(f=>f.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),r=Kn(y.addCardPaymentSourceStatus.fetchState),h=y.addCardPaymentSourceStatus.fetchState,A=m.companyId??j.getSignedInUserTenant(c)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=H();d.useEffect(()=>{A!=null&&s(Je(A,!1))},[A,s]),d.useEffect(()=>{t||(i(!0),s(q()))},[t,s]),d.useEffect(()=>{u||(Ie(["card"]),p(!0))},[u]),d.useEffect(()=>{r==="In-Progress"&&h==="Completed"&&s(q())},[r,h]);const x=f=>{n(f)};return w?.loggedInUserRoleMap!=null?o.jsxs(It,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:x}),o.jsx(At,{navigate:e,location:a,companyId:A,currentTenant:m,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{x(!0)},googleAPIKey:we.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},ee="external_integrations",xt=Q(function(e){const a=dn(e,ee);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(a.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,a){const{navigate:s,integrationsView:c,signedInUserEmail:l,tenantEmailDomain:n,tenantId:t}=a;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{ge.init("/connection/auth",n),ge.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(hn())},onSaveChargeBeeCredentials:(i,u)=>{const p=c.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;p!=null&&e(mn(t,p,J("revenue"),fn("chargebee"),{api_key:i,site:u}))},onConnectHubSpot:(i,u)=>{const p=c.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(p!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:i,client_secret:u,connection_id:p,redirect_uri:m,tenant_id:t}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(i)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(i,u)=>{e(gn(t,i,J(u)))},onConnectGmail:()=>{e(re(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(re(t,"outlook",window.location.href))},onSaveConnectorCredentials:i=>{e(pn(t,J("payments"),i))},onNotifyMe:i=>{G.trackIntegrationsNotifyMeClicked("Settings",i),e(un(ee,i,l))}}})(qn),vt=()=>{const e=L(),a=_(),{tenantEmailDomain:s}=Z();lt();const[c,l]=d.useState(!1),n=b(f=>f.tenantState.fetchState),t=b(f=>D(f)),i=t.companyId??j.getSignedInUserTenant(s)?.companyId,u=j.getSignedInUser(),p=H(),m=ne(t.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");d.useEffect(()=>{a(ln(ee))},[a]);const[y,g]=d.useState(!1);d.useEffect(()=>{y||(g(!0),a(q()))},[y,a]);const r=f=>{l(f)},h=b(f=>rn(f,i)),A=b(f=>f.plaidAccountViewState.external_account.plaidConnectionDetails),{plaidAccounts:w,onAddPlaidAccount:x}=rt({companyId:i??t.companyId});return p?.loggedInUserRoleMap!=null?o.jsxs(kt,{children:[o.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:r}),o.jsx(xt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:m,integrationsView:h,signedInUserEmail:u.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??s??"",tenantId:t.tenantId,saveChargeBeeState:h.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:h.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:h.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:h.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:h.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(h.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([f,I])=>[f,I?.message])),deleteConnectionState:h.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:h.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:w,onAddPlaidAccount:x,plaidConnectionDetails:A})]}):o.jsx(oe,{fetchState:n})},kt=V.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,wt=V.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,Pt=()=>{const e=_(),{tenantEmailDomain:a}=Z(),[s,c]=d.useState(!1),l=b(r=>D(r)).companyId??j.getSignedInUserTenant(a)?.companyId,n=j.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=b(r=>bn(r,n.userId)),i=b(r=>Sn(r,l,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=i,p=r=>{c(r)},m=d.useCallback(r=>{e(ae("user_reimbursement_account",r))},[]),y=d.useCallback(r=>{e(te(r,l,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);d.useEffect(()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(yn(n.userId))},[n.userId,t.fetchState]);const g=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return o.jsxs(wt,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:p}),o.jsx(Yn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:t,onFetchLinkTokenClick:m,onEstablishConnectionClick:y,onClickMenuIcon:()=>{p(!0)}})]})},jt=V.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,me=({appContent:e})=>{const a=_(),s=L(),c=$(),[l,n]=d.useState(!1),t=b(S=>D(S)),{tenantEmailDomain:i}=t,u=t.companyId??j.getSignedInUserTenant(i)?.companyId;if(j.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:p}=Y(),m=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:y}=p(O.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=p(O.isDebitCardFeatureEnabled),r=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=b(S=>he(S)),A=Ae(t),w=Ee(g,t),x=!w&&h,f=ke(t,y,g),{areTenantIdsInSync:I}=Jn();d.useEffect(()=>{I&&a(Cn(u,x))},[u,a,x,I]);const E=b(S=>In(S,x)),F=E.fetchState==="Not-Started"||E.fetchState==="In-Progress"||u==null,B=An(t),M=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,z=S=>{n(S)};return o.jsxs(jt,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:z}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(Wn,{myProfileView:E,isAccountingClassesEnabled:h,isReimbursementDisabled:M===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:f===!1,isTreasuryDisabled:r===!1,isLiteRoleDisabled:B===!1,onClickMenuIcon:()=>{z(!0)},isLoading:F,isBankingOnlyTenant:w,isCardsOnlyTenant:A,onAddressClick:S=>{const T=function(v,U){let P=`/${v}/settings/my_profile`;return P=P.concat(`/new/${U}`),P}(i,S),C=et(c.state?.pathnameStackToGoBack,c.pathname);s(T,{state:{pathnameStackToGoBack:C}})},onGetOtp:S=>{const T={...E.myProfileLocalData,phone:S};a(de({localData:T})),a(kn(S,"MyProfile"))},onResendOtp:S=>{a(vn(S,"MyProfile"))},onCancelClick:()=>{a(xn())},onSaveClick:()=>{a(ue("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},onVerifyOtp:(S,T)=>{a(En(S,T,"MyProfile"))},onVerifyOtpSuccess:S=>{S!=null&&j.saveZeniOtpToken(S),a(ue("MyProfile",E.myProfileLocalData.phone,E.myProfileLocalData.otpChallenge,E.myProfileLocalData.dateOfBirth,E.addressData?.addressToCreate))},updateMyProfileLocalData:S=>{a(de({localData:S}))}})]})};function Dt(){const e=_(),a=b(r=>D(r)).companyId,s=b(r=>wn(r)),c=b(r=>xe(r)),l=j.getSignedInUser(),[n,t]=d.useState(!1),i=d.useCallback(r=>{t(r)},[]),u=d.useCallback(r=>{e(Pn(r))},[]),p=d.useCallback(()=>{l?.userEmail!=null&&e(jn({loggedInUserEmail:l.userEmail}))},[l?.userEmail]),m=d.useCallback(()=>{e(Dn())},[]);if(l==null)throw Error("Can't access Notification Settings page without signing in...");const y=d.useCallback(()=>{const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,a))},[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=d.useCallback(()=>{e(Mn())},[]);return d.useEffect(()=>{if(c.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,a))}},[s.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:i}),o.jsx(nt,{notificationSettingsView:s,onFormDataChange:u,onCancel:p,onSave:m,onClickMenuIcon:()=>{i(!0)},signedInUser:l,onRefresh:y,resetUpdateStatus:g})]})}function pa(e){const[a,s]=d.useState(!1),c=b(r=>xe(r)),l=b(r=>D(r)),n=H(),t=j.getSignedInUser(),i=_(),{useFeatureGate:u}=Y(),{isFeatureEnabled:p}=u(O.isDebitCardFeatureEnabled),m=t?.userEmail==null||c.fetchState!=="Completed"||Tn(c.notificationSettings,t.userEmail,p,l);d.useEffect(()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(s(!0),i(Un()))},[c.fetchState,a]);const y=Ee(p,l),g=Ae(l);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||m!==!0?_n(l)?o.jsxs(W,{children:[Fn(n?.loggedInUserRole??[],p,l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"accounting/*",element:o.jsx(mt,{})}),Bn(n?.loggedInUserRole??[],p,l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"approval_rules/*",element:o.jsx(Mt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Rn(l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"my_bank_connections",element:o.jsx(Pt,{})}),On(l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"bank_connections",element:o.jsx(Ct,{})}),Vn(l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"business_verification",element:o.jsx(it,{productType:y?"zeni_accounts":g?"charge_cards":st(l,n?.loggedInUserRoleMap)})}),zn(n?.loggedInUserRole??[],l,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"company_details",element:o.jsx(ct,{})}),Ln(n?.loggedInUserRole??[],l)&&o.jsx(k,{path:"billing",element:o.jsx(Et,{})}),Nn(n?.loggedInUserRole??[],p,l)&&o.jsx(k,{path:"integrations",element:o.jsx(vt,{})}),o.jsx(k,{path:"my_profile/new/:addressType",element:o.jsx(me,{appContent:o.jsx(ot,{isSubPage:!1})})}),o.jsx(k,{path:"my_profile",element:o.jsx(me,{})}),m&&o.jsx(k,{path:"notifications",element:o.jsx(Dt,{})}),o.jsx(k,{path:"*",element:o.jsx(N,{})})]}):o.jsx(W,{children:o.jsx(k,{path:"*",element:o.jsx(N,{})})}):null}function Mt(e){return o.jsxs(W,{children:[o.jsx(k,{path:"/",element:o.jsx(bt,{})}),o.jsx(k,{path:"bills/approval-rules/*",element:o.jsx(dt,{})}),o.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(ut,{}):o.jsx(N,{})}),o.jsx(k,{path:"*",element:o.jsx(N,{})})]})}export{pa as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-B2nLBm11.js";import{a as i}from"./sentry-CLlo3TXi.js";import{u as l,g as d,N as u}from"./core-BDPZcSG4.js";import{z as n,d as a,f as m,B as p}from"./index-B1tuor_E.js";import{gt as g,Mh as y}from"./zeni-epic-state-pQFlpfOQ.js";import{n as h}from"./mui-HaM5aBuG.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="fe707e62-0a2e-4158-85c5-1a82cf006359",e._sentryDebugIdIdentifier="sentry-dbid-fe707e62-0a2e-4158-85c5-1a82cf006359")}catch{}})();function M(){const e=l(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect(()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}},[o,e]),o?s.jsx(b,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const b=h.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,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-B2nLBm11.js";import se from"./NotFoundScreen-By2F-w6l.js";import{a as c}from"./sentry-CLlo3TXi.js";import{h as H,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-BDPZcSG4.js";import{I5 as Z,I8 as le,I2 as de,eX as M,TF as X,Im as Q,H$ as pe,IS as ue,IL as ke,TG as W,TH as N,HX as me,HU as ge,rC as fe,rq as he,l5 as Ie,Ig as Se,TI as Te,Ix as be,Iu as Ee,Ib as Ce,Ir as Ge,Iq as De}from"./zeni-epic-state-pQFlpfOQ.js";import{z as G,d8 as xe,T as ye,V as je,Q as b,q as Y,r as w,v as ve,d as V,f as we,d9 as Re,m as z,at as Fe}from"./index-B1tuor_E.js";import{n as Ue}from"./mui-HaM5aBuG.js";import{u as Be}from"./useInitialThreadRequest-DaoYHqyn.js";import{M as Le}from"./MobileAppDrawer-ChAhLGZE.js";import Pe from"./TaskListScreen-B2sNWFUZ.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./useAskAiCfoHostNavButtonProps-CtdOXC4O.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]="69760635-d9c9-483c-a769-c72d6cd53577",e._sentryDebugIdIdentifier="sentry-dbid-69760635-d9c9-483c-a769-c72d6cd53577")}catch{}})();function $e(){const e=H(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[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 A,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=M(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=X(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${z.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=S,_=Object.values(S)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${z.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=Y(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(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(Q(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=H(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>M(i)),k=Be(l?.companyId),{useFeatureGate:a}=je(),{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,J]=c.useState(!1),[F,K]=c.useState(!1),[U,ee]=c.useState(!1),[B,y]=c.useState(!1),T=c.useRef(!1),C=f(i=>i.taskListState.updateTasksFetchState.fetchState),L=f(i=>X(i)),P=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(J(!0),t(Q(!1,r)))},[p,t]),c.useEffect(()=>{F||L.fetchState==="Completed"||(K(!0),t(pe()))},[F,t,L.fetchState]),c.useEffect(()=>{U||P==="Completed"||(ee(!0),t(ue()))},[U,t,P]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,C,l,s,e]);const $=f(i=>W(i,r)),j=$.fetchState,q=G.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Le,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(qe,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Ue.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(v,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Pe,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(v,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-B2nLBm11.js";import{a as f}from"./sentry-CLlo3TXi.js";import{h as x,u as B,g as L,i as $,j as p}from"./core-BDPZcSG4.js";import{Lc as s,Lb as j,RA as v,eX as C,RB as T}from"./zeni-epic-state-pQFlpfOQ.js";import{K as z,at as g,y as D,z as E,B as P,ch as N,q as U}from"./index-B1tuor_E.js";import{n as _}from"./mui-HaM5aBuG.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]="8304c96c-21cb-4c75-8935-ad08091abfdd",e._sentryDebugIdIdentifier="sentry-dbid-8304c96c-21cb-4c75-8935-ad08091abfdd")}catch{}})();const A=_.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
|
-
`;function X(){const e=x(),n=B(),d=z(),l=L();let{accountId:a}=$(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=f.useState(!1),h=D();f.useEffect(()=>{u||(y(!0),n(j(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),b=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>C(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(A,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:m})})}export{X as Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import"./sentry-CLlo3TXi.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]="263710e7-3895-494f-a77c-27896ac645ee",e._sentryDebugIdIdentifier="sentry-dbid-263710e7-3895-494f-a77c-27896ac645ee")}catch{}})();function l(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{l as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bh as a}from"./index-B1tuor_E.js";import"./sentry-CLlo3TXi.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]="a7cfa72e-b6e5-4250-9ea1-1e17e404f5ac",e._sentryDebugIdIdentifier="sentry-dbid-a7cfa72e-b6e5-4250-9ea1-1e17e404f5ac")}catch{}})();function t(){return a("dashboard")}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./sentry-CLlo3TXi.js";import{h as u,g,i as h,j as S}from"./core-BDPZcSG4.js";import{eX as y}from"./zeni-epic-state-pQFlpfOQ.js";import{X as k,K as C,c as A,Z as T,a0 as I,r as w,a2 as D}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.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]="7d6d9601-e009-449a-8a16-0b1f027dcfc9",e._sentryDebugIdIdentifier="sentry-dbid-7d6d9601-e009-449a-8a16-0b1f027dcfc9")}catch{}})();function j(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),n=u(),o=g(),{tenantEmailDomain:s}=h(),c=C(),f=D(c),l=A(),p=T(),m=S(a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0),d=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&l&&!r,onAskAiCfoClick:b.useCallback(()=>{if(s!=null)if(d)if(f){const a=w(o.state?.pathnameStackToGoBack,o.pathname);n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else I({location:o,navigate:n,mergeState:{referrer:t}})},[d,f,o,t,n,i,s])}}export{j as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./sentry-CLlo3TXi.js";import{u,h as m,i as l,j as o}from"./core-BDPZcSG4.js";import{V as p,Q as c}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{Rl as g,Rd as h,Bp as y}from"./zeni-epic-state-pQFlpfOQ.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]="b31bf07e-7677-4bf3-9ed1-6f9e3f5bdd16",e._sentryDebugIdIdentifier="sentry-dbid-b31bf07e-7677-4bf3-9ed1-6f9e3f5bdd16")}catch{}})();function C(){const e=u(),a=m(),{tenantEmailDomain:s}=l(),{useFeatureGate:d}=p(),{isFeatureEnabled:t}=d(c.isCashManagementFeatureEnabled),r=o(f=>g(f)),i=o(f=>h(f)),n=r.banner.fetchState;if(b.useEffect(()=>{t===!0&&n!=="Completed"&&n!=="In-Progress"&&e(y(!1))},[e,t,n]),t===!0)return{banner:r.banner,bufferAmount:i.formData.bufferAmount,onSetUpAutoSweepClick:()=>{a(`/${s}/checking/cash_management/auto_sweep`,{state:{fromCashManagement:!0}})}}}export{C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-CLlo3TXi.js";import{ay as _,az as m}from"./index-B1tuor_E.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]="89b1177d-f7f6-4b55-96a9-f884fa6b0d54",e._sentryDebugIdIdentifier="sentry-dbid-89b1177d-f7f6-4b55-96a9-f884fa6b0d54")}catch{}})();const v=e=>{const{events:n,onEvent:d,onSubscribed:h}=e,c=_(),y=r.useRef(d),p=r.useRef(h),g=r.useRef(0);r.useEffect(()=>{y.current=d},[d]),r.useEffect(()=>{p.current=h},[h]);const E=r.useMemo(()=>[...n].sort().join("|"),[n]);r.useEffect(()=>{if(c==null||n.length===0)return;const o=[],i=new Set,w=()=>{if(p.current==null)return;const t=Date.now();t-g.current<5e3||(g.current=t,p.current())};return n.forEach(t=>{const[u,f]=m(t);if(f==="")return;const b=c.channel(u),a=l=>{y.current(f,l)};let s;if(b?.subscribed===!0)s=b,s.bind(f,a),i.has(u)||(i.add(u),w()),o.push(()=>{b.unbind(f,a)});else{if(s=b??c.subscribe(u),s.bind(f,a),!i.has(u)){i.add(u);const l=()=>{w()};s.bind("pusher:subscription_succeeded",l),o.push(()=>{s.unbind("pusher:subscription_succeeded",l)})}o.push(()=>{s.unbind(f,a)})}}),()=>{o.forEach(t=>t())}},[c,E])};export{v as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./sentry-CLlo3TXi.js";import{t as o}from"./core-BDPZcSG4.js";import{a7 as l}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.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]="8a2af699-dc19-45dc-8ef9-b225261c12d1",e._sentryDebugIdIdentifier="sentry-dbid-8a2af699-dc19-45dc-8ef9-b225261c12d1")}catch{}})();function m(e,a){const{clearParams:d=!0}=a??{},[t,s]=o(),[i,c]=n.useState(),f=n.useRef(!1),u=n.useRef(!1);return n.useEffect(()=>{if(f.current||e==null||!(t.has("thread_id")||t.has("entity_type")))return;const r=l(t,e);r!=null&&(c(r),f.current=!0)},[t,e]),n.useEffect(()=>{if(!f.current||u.current||!d||!(t.has("thread_id")||t.has("entity_type")))return;const r=new URLSearchParams(t);r.delete("thread_id"),r.delete("entity_type"),s(r,{replace:!0}),u.current=!0},[t,s,d]),i}export{m as u};
|