@zeniai/web-app-ui 5.0.65-qa → 5.0.66-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-Z_0xwUva.js +1 -0
- package/dist/assets/AddressScreen-CA-Gsfg_.js +9 -0
- package/dist/assets/AiCfoScreen-B8tKz6im.js +11 -0
- package/dist/assets/BillPayApprovalRoutes-cZrxmRVi.js +1 -0
- package/dist/assets/{BillPayRoutes-BrOZ07Ei.js → BillPayRoutes-BSv85mj1.js} +17 -17
- package/dist/assets/{BusinessVerificationPageScreen-CQpVjRjR.js → BusinessVerificationPageScreen-b1DUtUq7.js} +2 -2
- package/dist/assets/ChargeCardRoutes-CSo3zEv0.js +71 -0
- package/dist/assets/CompanyPassportScreen-CMvD2Pw-.js +1 -0
- package/dist/assets/ConnectionAuthScreen-DHWnLfNi.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DFMRKVPC.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BVZy4r84.js → CustomerOnboardingRoutes-xYLCb5gp.js} +4 -4
- package/dist/assets/{DashboardRoutes-BvkAL8st.js → DashboardRoutes-DLxXDELv.js} +3 -3
- package/dist/assets/DefaultTenantHome-5g8KZ_Nm.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-eVqaxWwu.js +18 -0
- package/dist/assets/DrawerScreen-CZb8Zr0k.js +1 -0
- package/dist/assets/EntityDetailRoutes-Cp-nQ4Gv.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-BoCxhH8a.js → ExpenseAutomationRoutes-CK25nqkn.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-D-HbB8OC.js +1 -0
- package/dist/assets/MagicLinkRoutes-CUlFd0Ed.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Bk5PiU9H.js +12 -0
- package/dist/assets/MobileAppDrawer-DMlFiXXu.js +1 -0
- package/dist/assets/NotFoundScreen-CQ9leNp5.js +1 -0
- package/dist/assets/{NotificationRoutes-CHXW3ip6.js → NotificationRoutes-B90jTW-r.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BtQW7Crl.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-WGkhgInY.js +1 -0
- package/dist/assets/PeopleRoutes-D-KAkFFb.js +22 -0
- package/dist/assets/PerformanceRoutes-Cx0t3myq.js +1 -0
- package/dist/assets/{Preview-EpKFa1SZ.js → Preview-BHNHm504.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CmOBvomD.js → QBOConnectionScreen-p-5BgC1y.js} +1 -1
- package/dist/assets/ReferralListScreen-Bo4wGu3u.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-CdN2A2XN.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-bJbzuz6k.js → ReimbursementApprovalRuleDetailScreen-wD16rnKd.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DHAEN3ZY.js → ReimbursementRoutes-0obNps4e.js} +8 -8
- package/dist/assets/ReportsRoutes-D2BVmCDE.js +1 -0
- package/dist/assets/RewardsRoutes-Bx3Xfjaz.js +1 -0
- package/dist/assets/ScreenRoutes-CKzlkFrS.js +2 -0
- package/dist/assets/{SettingsRoutes-75OP1ywb.js → SettingsRoutes-Bz-bKZSZ.js} +7 -7
- package/dist/assets/{SetupPagesScreen-BvABA4oV.js → SetupPagesScreen-DyblnAl0.js} +5 -5
- package/dist/assets/SignInScreen-B-scNyIK.js +1 -0
- package/dist/assets/SignOutScreen-DRQi0OiJ.js +9 -0
- package/dist/assets/TaskListScreen-AF6TN3N3.js +9 -0
- package/dist/assets/TaskRoutes-DNn1AHcK.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C73ERZEQ.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DTxQe0TM.js → TransactionDetailScreen-CxhtGb5H.js} +2 -2
- package/dist/assets/TransactionListRoutes-RJF1A64K.js +1 -0
- package/dist/assets/{TreasuryRoutes-DVDGcuUq.js → TreasuryRoutes-CSVwgxJf.js} +6 -6
- package/dist/assets/{VendorsRoutes-fs1ql-9B.js → VendorsRoutes-DshL1tkX.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-12t_C7S5.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BgtpOsMK.js → ZeniAccountRoutes-CXtuIR5k.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen-Dby_CD6R.js +9 -0
- package/dist/assets/{accountMappingHelper-C61p9k0R.js → accountMappingHelper-BHhQdza1.js} +1 -1
- package/dist/assets/{analytics-87aUO2A0.js → analytics-DQCQhWLc.js} +1 -1
- package/dist/assets/{analyticsHelper-CwroxLVU.js → analyticsHelper-CFqteM8q.js} +1 -1
- package/dist/assets/{core-C1D_J1Tm.js → core-j0LqCeu3.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DU65qRFr.js → decodeURIComponentSafe-DFYfbcv3.js} +1 -1
- package/dist/assets/{dnd-D2GUyFnB.js → dnd-DAo38rm8.js} +1 -1
- package/dist/assets/{empty-sYgfsPuY.js → empty-CK9odIeO.js} +1 -1
- package/dist/assets/empty-Ca3lmO0X.js +1 -0
- package/dist/assets/{emptyVideoElement-DEPvT3eg.js → emptyVideoElement-C-uPKIxs.js} +1 -1
- package/dist/assets/epic-DSNvXFJG.js +2 -0
- package/dist/assets/getLocaleForTenant-z7__8okF.js +1 -0
- package/dist/assets/{index-CIYliqOt.js → index-4NAZbGj1.js} +1 -1
- package/dist/assets/{index-CQro8vC7.js → index-71d39Q7D.js} +2 -2
- package/dist/assets/index-B2tWZgTJ.js +1 -0
- package/dist/assets/{index-DMaAvz9E.js → index-BX6ANtNh.js} +1 -1
- package/dist/assets/{index-DivBM1Ub.js → index-CW5fjsxv.js} +17310 -15834
- package/dist/assets/{index-D_etFzmU.js → index-CZgerGBH.js} +1 -1
- package/dist/assets/index-cC6roLBs.js +1 -0
- package/dist/assets/{lexical-D0EV8wLh.js → lexical-D-QBA09y.js} +1 -1
- package/dist/assets/{liveblocks-uNyEitSP.js → liveblocks-C3aHR2ug.js} +1 -1
- package/dist/assets/{lottie-D71IK4aH.js → lottie-CAFVLjo0.js} +1 -1
- package/dist/assets/{mui-Bl9HwrRv.js → mui-D78cc8iD.js} +1 -1
- package/dist/assets/{pathToGoBack-BS6hc56i.js → pathToGoBack-Dzva26FJ.js} +1 -1
- package/dist/assets/{pdf-Bp6Iehm8.js → pdf-C20YOa73.js} +3 -3
- package/dist/assets/{pdf-lib-Bs8DTePl.js → pdf-lib-bl9YSMz9.js} +1 -1
- package/dist/assets/{plaid-qfPCSwi4.js → plaid-DsDYZOgp.js} +1 -1
- package/dist/assets/{pusher-BdK3-yK7.js → pusher-l3ERSdYl.js} +1 -1
- package/dist/assets/{react-DkuuBLqG.js → react-9NHYx8CN.js} +1 -1
- package/dist/assets/{react-43KZmiL8.js → react-Cf73dofS.js} +1 -1
- package/dist/assets/{react-ChNrFDUd.js → react-CslKeU46.js} +1 -1
- package/dist/assets/{react-DSsk8Q4w.js → react-DJWA5bIH.js} +1 -1
- package/dist/assets/{react-Q_rYRpC6.js → react-YfQWR1Yb.js} +1 -1
- package/dist/assets/{react-BkOMTSid.js → react-oAtqdYpb.js} +1 -1
- package/dist/assets/{recharts-B3ReBiRu.js → recharts-B0MOj05b.js} +1 -1
- package/dist/assets/{routePaths-BLYSnXgw.js → routePaths-rtKSzfbn.js} +1 -1
- package/dist/assets/{sentry-DkoJdbiW.js → sentry-cQZrhfVh.js} +1 -1
- package/dist/assets/url-BbfnqyeH.js +1 -0
- package/dist/assets/{url-BsgtzK-J.js → url-Oh4YprMm.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-_kNwa3Tv.js +1 -0
- package/dist/assets/{useDeviceId-BDI3hZsc.js → useDeviceId-CE3ipTvl.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-qhAGi-cw.js +1 -0
- package/dist/assets/useInitialThreadRequest-CDFp11ui.js +1 -0
- package/dist/assets/{utils-Dw--aDPP.js → utils-BBuNXoTI.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CaH_VfNh.js → withTransactionSidePanel-BWfGFazD.js} +2 -2
- package/dist/assets/zeni-epic-state-DiQZjsue.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Dr1v_Sud.js +0 -1
- package/dist/assets/AddressScreen-CKtYRww-.js +0 -9
- package/dist/assets/AiCfoScreen-Cebz6UA6.js +0 -11
- package/dist/assets/BillPayApprovalRoutes-C5AoMYfc.js +0 -1
- package/dist/assets/ChargeCardRoutes-Pd2uN0ew.js +0 -71
- package/dist/assets/CompanyPassportScreen-DgkCpaOl.js +0 -1
- package/dist/assets/ConnectionAuthScreen-ik8aK8sR.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Bj2KB9KI.js +0 -1
- package/dist/assets/DefaultTenantHome-BgYjFEW-.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-B1OUbADT.js +0 -18
- package/dist/assets/DrawerScreen-Bfr6DJZF.js +0 -1
- package/dist/assets/EntityDetailRoutes-XANY_96Q.js +0 -1
- package/dist/assets/FeaturePreviewScreen-CVAJ3dJp.js +0 -1
- package/dist/assets/MagicLinkRoutes-CC0hFgvb.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BIAYZ7Gn.js +0 -12
- package/dist/assets/MobileAppDrawer-D4h5JdAm.js +0 -1
- package/dist/assets/NotFoundScreen-DtzClrNV.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-v9qf6MIV.js +0 -1
- package/dist/assets/PeopleRoutes-CA00gwvb.js +0 -22
- package/dist/assets/PerformanceRoutes-Dxl37sCI.js +0 -1
- package/dist/assets/ReferralListScreen-Cbl9-QoF.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-8QNxXWIW.js +0 -1
- package/dist/assets/ReportsRoutes-Bc3ZiSZw.js +0 -1
- package/dist/assets/RewardsRoutes-0nvz_85Q.js +0 -1
- package/dist/assets/ScreenRoutes-BsyQBGdD.js +0 -2
- package/dist/assets/SignInScreen-DZdqwtK-.js +0 -1
- package/dist/assets/SignOutScreen-3VvJNA3b.js +0 -9
- package/dist/assets/TaskListScreen-749ZfOYL.js +0 -9
- package/dist/assets/TaskRoutes-77nF0njj.js +0 -9
- package/dist/assets/TransactionDetailRoutes-CFGf3-Do.js +0 -1
- package/dist/assets/TransactionListRoutes-BO9rH2Kv.js +0 -1
- package/dist/assets/WiseConfirmationScreen-Dc08Ngp8.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-CiOqII9w.js +0 -9
- package/dist/assets/empty-B6sVHl7p.js +0 -1
- package/dist/assets/epic-99vwOB_L.js +0 -2
- package/dist/assets/getLocaleForTenant-M6IdYirk.js +0 -1
- package/dist/assets/index-Co5VS1MD.js +0 -1
- package/dist/assets/index-D2qnbHpC.js +0 -1
- package/dist/assets/url-B8Y4m-q-.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BiomgfPI.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js +0 -1
- package/dist/assets/useInitialThreadRequest-CUi5RNDv.js +0 -1
- package/dist/assets/zeni-epic-state-B_OPwxNR.js +0 -14
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-uNyEitSP.js";import{a as g}from"./sentry-DkoJdbiW.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-C1D_J1Tm.js";import{z as r,h as P,D as V,d as A,c as N,e as q,k as G,I as R,g as W}from"./index-DivBM1Ub.js";import{eN as $,Ii as B,Is as H,Ij as J,eO as K,fh as Q,Io as X,fG as Y,cS as Z,It as ee,Iu as te}from"./zeni-epic-state-B_OPwxNR.js";import{n as ne}from"./mui-Bl9HwrRv.js";import{u as se}from"./useDeviceId-BDI3hZsc.js";import{f as ae}from"./analyticsHelper-CwroxLVU.js";import{t as ie}from"./getLocaleForTenant-M6IdYirk.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="bc4ea456-e862-49a1-bcdb-f043476450fb",t._sentryDebugIdIdentifier="sentry-dbid-bc4ea456-e862-49a1-bcdb-f043476450fb")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
z-index: 9999;
|
|
11
|
-
background-color: ${t=>t.theme.colors.background};
|
|
12
|
-
`;export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-uNyEitSP.js";import{a as c}from"./sentry-DkoJdbiW.js";import{h as pe,g as s,l as Je,u as Ke,j as Qe,i as R}from"./core-C1D_J1Tm.js";import{eN as he,eU as ea,eV as Se,eP as aa,bn as ta,f2 as na,eW as sa,eX as oa,eZ as ia,f0 as ra,fa as da,f1 as g,f4 as la,f5 as ue,f8 as ca,f6 as ua,f7 as fa,f9 as ma,cH as ba,fc as pa,cN as ha,bv as Sa,eM as ga,fh as Ea,fi as ka,fg as Ca}from"./zeni-epic-state-B_OPwxNR.js";import{a1 as ya,a2 as Ia,A as Ta,p as wa,z as k,a3 as _a,M as Aa,a4 as Fa,u as Da,m as r,a5 as va,a6 as $a,j as Ba,a as Ma,a7 as Pa,Y as Ra,a8 as xa,a9 as Na,aa as fe,ab as me,L as Ua,ac as Va,ad as be,c as x,y as _,ae as N,af as Ga}from"./index-DivBM1Ub.js";import{D as Oa}from"./mui-Bl9HwrRv.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f8e318d7-9d1c-421b-aa77-1334701ab894",f._sentryDebugIdIdentifier="sentry-dbid-f8e318d7-9d1c-421b-aa77-1334701ab894")}catch{}})();const ja=ya(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=Je(),t=Ke(),C=Ta(),o=Qe(),V=aa(),m=pe(),{useFeatureGate:i}=wa(),G=k.getSignedInUser(),A=ta(G),n=s(e=>he(e)),ge=_a(),Ee=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:ke}=Aa(),O=s(e=>na(e)),j=O.uiState.currentChatSessionId,y=Fa(),{setLoading:Ce}=Da(),[F,L]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ye}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ie=va(n,ye,H),{isFeatureEnabled:Te}=i(r.isSettingsFeatureEnabled),Z=s(e=>sa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>oa(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(ia(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?ra(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:_e}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ae}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||W&&A,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Be}=i(r.isTreasuryEnabled),{isFeatureEnabled:Me}=i(r.isTaskManagerCustomerUserAccessEnabled),Pe=A||!A&&Me,Re=n.company!=null&&da(n.company),w=Be&&Re,xe=s(e=>g(e).totalUnreadCount),Ne=s(e=>g(e).reducedFetchCountState),J=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=$a();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&Q!=null){const e=`dashboard_${n.companyId}`;L(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&V.tenantId!=null&&m(la("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ge={fetchStatus:Ne,count:xe},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ca(e,ne.tenantId):void 0),S=[];_e===!1&&S.push("accounts_payable_aging"),Ae===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Oe=Ba(),oe=s(e=>ua(e,S,h,X,W,w).fetchState),ie=s(e=>fa(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Le=c.useMemo(()=>ma(n.userRole),[n.userRole]),ze=ba(Le),Ye=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&Z.fetchState==="Completed"&&pa(Z.notificationSettings,h.userEmail,H,n),re=Ma(),Ze=re&&Pa(t),de=ha(Oe?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Ra(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[We,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Xe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,qe=xa(Xe);return U.jsx(Oa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Na,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:Te,isVendorsTabVisible:ze,isZeniAccountEnabled:Y,isChargeCardEnabled:Ie,isTreasuryEnabled:w,treasuryYieldPercentage:qe,isTreasuryPopupVisible:We,isNotificationsTabVisible:He,notificationCountDetails:Ge,isExpenseAutomationEnabledForUser:q&&Sa(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ye,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(t)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const b=_(t.state?.pathnameStackToGoBack,t.pathname);return x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),Ee?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}}):void(ge?ke(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&x.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const b=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ga(e.type);be(e.type)?(j!=null&&m(Ca()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{Ce(Ua.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Va(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(Ea(e.tenantId)),m(ka(h.userId,e.tenantId,h.zeniSessionId)));const b=e;x.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ze,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ga({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:Pe,thanksGivingAnimationEnabled:De,christmasAnimationEnabled:ve,newYearAnimationEnabled:$e})})}),Xa=f=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ia(o)&&ea(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(ja,{...f,...t})};export{Xa as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-uNyEitSP.js";import{j as r,k as i}from"./core-C1D_J1Tm.js";import{X as n}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import"./sentry-DkoJdbiW.js";import"./zeni-epic-state-B_OPwxNR.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="08a1fb90-c2ee-45d3-8148-a56dffb2c13c",o._sentryDebugIdIdentifier="sentry-dbid-08a1fb90-c2ee-45d3-8148-a56dffb2c13c")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-uNyEitSP.js";import{j as W,h as z,u as K,l as Z,g as d,k as H,n as Q,o as I}from"./core-C1D_J1Tm.js";import{eN as U,qe as O,pO as X,J7 as v,pJ as T,bv as ee,bn as ae,bR as te,pK as se,J8 as oe,IU as C,dB as re,tB as ne,J9 as ie,tY as ce,eT as le,eR as de}from"./zeni-epic-state-B_OPwxNR.js";import{z as me,N as fe,j as pe,p as M,m as w,C as ue,c as $,ak as he,y as ge}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import Fe from"./NotFoundScreen-DtzClrNV.js";import{F as be}from"./FeaturePreviewScreen-CVAJ3dJp.js";import{a as g}from"./sentry-DkoJdbiW.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{u as Te}from"./useInitialThreadRequest-CUi5RNDv.js";import{t as ye}from"./routePaths-BLYSnXgw.js";import{M as Se}from"./MobileAppDrawer-D4h5JdAm.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="8ed25f6c-32d1-4150-9815-f2399bfd671b",s._sentryDebugIdIdentifier="sentry-dbid-8ed25f6c-32d1-4150-9815-f2399bfd671b")}catch{}})();const y=(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=H(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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(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=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function P(){const s=W(),e=z(),a=K(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),S=d(t=>U(t)),B=S.company?.companyInfo.firstMonthOfFY??1,c=d(t=>O(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();Ce({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:q}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),y(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,O,T,F]);const D=pe(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=M(),{isFeatureEnabled:j}=_(w.isReportsCommentingEnabled),G=Te(j?S?.companyId:void 0,{clearParams:l&&m}),[J,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Se,{isAppContentDrawerOpen:J,handleDrawerToggle:E}),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:q,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function We(){const s=d(i=>U(i)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Q,{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(Fe,{})})]})}export{We as PandLWithForecastRoutes,We as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-uNyEitSP.js";import{J2 as te,eN as q,jq as z,eT as Y,eR as ne,GD as Q,IH as oe,sJ as Ee,J3 as M,sx as ke,sS as Ie,sM as ie,sB as re,sQ as Pe,sN as je,J4 as le,un as Te,J5 as Le,fw as ve,J6 as G,sG as de,sE as ce,sV as Fe,c0 as Re}from"./zeni-epic-state-B_OPwxNR.js";import{r as pe,p as X,m as E,z as K,a5 as ue,H as me,ag as ge,ah as Ae,F as he,o as A,J as fe,D as Ce,ai as Oe,N as Ve,C as Ue,c as be,e as Be,y as Ze,aj as $e,j as Ge}from"./index-DivBM1Ub.js";import{D as ye,n as W,S as we}from"./mui-Bl9HwrRv.js";import se from"./NotFoundScreen-DtzClrNV.js";import{a as r}from"./sentry-DkoJdbiW.js";import{h as ee,l as Je,g as m,j as He,u as ze,k as Ke,n as ae,o as $}from"./core-C1D_J1Tm.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{M as _e}from"./MobileAppDrawer-D4h5JdAm.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="db480121-dd2d-42d7-8413-a22f5660e17a",s._sentryDebugIdIdentifier="sentry-dbid-db480121-dd2d-42d7-8413-a22f5660e17a")}catch{}})();const Me={overlayWidth:new he(100,100,48)},J=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:D}=Je(),d=m(e=>te(e)),u=m(e=>q(e)),S=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&S&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(M()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:S,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&D!=null&&p(Ee(D))},[x,D]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Me.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(De,{children:J.discardTitle}),descriptionComponent:a.jsx(Se,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:i,isEditPopup:!0}):null,a.jsx(Ae,{...b})]})})},Ye=W(we)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,De=W(fe.H6Regular)`
|
|
6
|
-
margin-top: ${A.sp7};
|
|
7
|
-
padding-left: ${A.sp8};
|
|
8
|
-
padding-right: ${A.sp8};
|
|
9
|
-
color: ${s=>s.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Se=W(fe.LargeRegularSp)`
|
|
12
|
-
color: ${s=>s.theme.colors.hero};
|
|
13
|
-
padding-left: ${A.sp8};
|
|
14
|
-
padding-right: ${A.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${A.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,Qe={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),D=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>z(i)),{useFeatureGate:S}=X(),{isFeatureEnabled:f}=S(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),L=Q(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(M())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=S(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=S(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:R}=S(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(s):je())},onCloseClick:C,peopleDetails:D,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{D.invitePersonState.fetchState==="Completed"&&(y(),p(M()))},[D.invitePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(es,{onClick:i=>i.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(De,{children:H.discardTitle}),descriptionComponent:a.jsx(Se,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,a.jsx(Oe,{...b})]})})},es=W(we)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,ss=Ke(function(s,t){const l=le(s),n=K.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(s),analytics:be}},function(s,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{s(re(o,y))},onResendInvite:o=>{s(Fe(o))},onReloadPeople:()=>{s(de()),s(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{s(G({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{s(G({searchText:o}))}}}})($e);function _({isInvitePeopleDrawerOpen:s,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=K.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Y(O,h)&&V,w=Q(h),D=h?.tenantId,{tenantEmailDomain:d}=h,[u,S]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ne({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),S(!0),n(de()))},[u,y,D,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(s!=null&&s===!0),L(t!=null&&t===!0&&t)},[s,t]),r.useEffect(()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return a.jsxs(a.Fragment,{children:[c.fetchState==="Completed"?a.jsx(Ue,{analytics:be,onLoad:e=>e.trackPageLoaded(Be.Event.members)}):null,f===!0?a.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?a.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,a.jsx(_e,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(ss,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,N)=>{n(G({sortKey:e,sortOrder:N}))},onRowClick:e=>{const N=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ze(g.state?.pathnameStackToGoBack,g.pathname);l(N,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function Ds(){const s=Ge();return Re(s?.loggedInUserRole??[])?a.jsxs(ae,{children:[a.jsx($,{path:"/",element:a.jsx(_,{})}),a.jsx($,{path:"new",element:a.jsx(_,{isInvitePeopleDrawerOpen:!0})}),a.jsx($,{path:":userId/edit",element:a.jsx(_,{isEditPeopleDrawerOpen:!0})}),a.jsx($,{path:"*",element:a.jsx(se,{})})]}):a.jsx(ae,{children:a.jsx($,{path:"*",element:a.jsx(se,{})})})}export{Ds as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import E from"./NotFoundScreen-DtzClrNV.js";import{a as r}from"./sentry-DkoJdbiW.js";import{j as _,u as v,g as p,l as M,h as U,N as O,k as P,n as z,o as h}from"./core-C1D_J1Tm.js";import{eN as N,OJ as b,bo as B,bn as F,h6 as V,gC as J}from"./zeni-epic-state-B_OPwxNR.js";import{A as $,z as I,ct as q}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as H}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{M as K}from"./MobileAppDrawer-D4h5JdAm.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="4803c174-80c6-4711-b8d0-f0950ab9ccd6",e._sentryDebugIdIdentifier="sentry-dbid-4803c174-80c6-4711-b8d0-f0950ab9ccd6")}catch{}})();const L=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)}}})(q),Q=()=>{const e=_(),t=v(),c=$(),o=p(a=>N(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),[w,C]=r.useState(!1),S=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=S||k||x,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(J({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=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return H({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${f}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import{a as o}from"./sentry-DkoJdbiW.js";import{g as f,j as H,h as V,u as F,k as N}from"./core-C1D_J1Tm.js";import{h as M,r as W,z as R,b3 as _,F as z,N as U,C as $,c as l,e as X,a1 as Z,b4 as Q}from"./index-DivBM1Ub.js";import{eX as q,eN as G,Lx as P,Ly as J,tr as K,th as g,eZ as Y,bM as ee,tm as ae,Lz as re}from"./zeni-epic-state-B_OPwxNR.js";import{D as ne,e as te,n as se,S as oe}from"./mui-Bl9HwrRv.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{M as de}from"./MobileAppDrawer-D4h5JdAm.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]="25ad5403-b525-42a8-bec6-3a401b18bb98",e._sentryDebugIdIdentifier="sentry-dbid-25ad5403-b525-42a8-bec6-3a401b18bb98")}catch{}})();const ce={overlayWidth:new z(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,I="refer-and-earn-status-update",we=N(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ee([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(re({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(ae(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))}}})(Z(Q));function Se({isReferralDrawerOpen:e}){const a=H(),r=V(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,b]=o.useState(!1),w=R.getSignedInUser(),h=f(t=>G(t)),C=f(t=>P(t)),m=C.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=J([C,p]),{areTenantIdsInSync:c}=U();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(K()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&c&&(u(!0),r(g(!0)))},[m,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),r(Y(!0)))},[p,r,c]),o.useEffect(()=>{b(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:L,onAskAiCfoClick:O}=ie({mobileExploreReferrer:"Rewards"});le({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-${w.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx($,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{b(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:L,onAskAiCfoClick:O,...T})]})}export{Se as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-uNyEitSP.js";import R from"./NotFoundScreen-DtzClrNV.js";import{a as p}from"./sentry-DkoJdbiW.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as m}from"./core-C1D_J1Tm.js";import{eN as T,Mr as g,MH as S,Co as V,Bx as U,Cn as c,Ce as _,MW as B}from"./zeni-epic-state-B_OPwxNR.js";import{h as M,z as N,B as W,a1 as $,bJ as O,ab as z}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-bJbzuz6k.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="1f9eb911-6547-46a8-a97e-ee26388f2160",e._sentryDebugIdIdentifier="sentry-dbid-1f9eb911-6547-46a8-a97e-ee26388f2160")}catch{}})();const f="reimbursement-approval-rule-update",H=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(_(s))},onEditRuleClick:s=>{s!=null?(e(c(s)),a(`./${s}/edit`)):(e(c()),a("./new"))}}})($(O)),J=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=M(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(U(!0)))},[l,b,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(c())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(n,P,x)=>{n.endsWith(f)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(m,{path:"/",element:t.jsx(J,{})}),t.jsx(m,{path:"/new",element:t.jsx(v,{})}),t.jsx(m,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(m,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-uNyEitSP.js";import{u as G,j as Ie,h as ye,l as Ce,g as d,k as ge,n as Se,o as N}from"./core-C1D_J1Tm.js";import{eN as M,f7 as g,IF as we,jq as J,IG as W,pI as O,je as Re,ih as Te,t5 as X,pN as Fe,bv as Oe,IH as Ae,bn as ke,u4 as De,II as je,IJ as Ee,sZ as Pe,IK as Y,IL as Me,IM as Le,IN as Be,IO as ve,IP as S,IQ as A,IR as k,IS as H,IT as D,IU as j,dB as Ue,tM as Ve,tA as q,tB as $,tS as xe,tF as Z,tY as ze,IV as Ge,IW as Ne,IX as Ye,IY as He,IZ as qe,eT as $e,eR as Ze}from"./zeni-epic-state-B_OPwxNR.js";import{K as Qe,M as Ke,r as Je,p as ee,m as E,z as ae,N as We,j as Xe,a as ea,C as aa,c as P,e as sa,y as se,Q as ta,R as oa,U as na}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import ra from"./NotFoundScreen-DtzClrNV.js";import{F as ia}from"./FeaturePreviewScreen-CVAJ3dJp.js";import{a as _}from"./sentry-DkoJdbiW.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{u as fa}from"./useInitialThreadRequest-CUi5RNDv.js";import{t as Q,a as K}from"./routePaths-BLYSnXgw.js";import{M as ma}from"./MobileAppDrawer-D4h5JdAm.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="9963dcf0-9354-47a7-850f-b28ee727fcea",e._sentryDebugIdIdentifier="sentry-dbid-9963dcf0-9354-47a7-850f-b28ee727fcea")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},_a=e=>{e(Ne()),e(Ye()),e(He()),e(qe())},ha=ge(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(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:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&I(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(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({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(j({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(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({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",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=Je(),u=oa(f),a=Ie(),s=ye(),t=G(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,y]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>M(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=We(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>J(n)),T=d(n=>W(n)),ie=d(n=>g(n).isCompareModeOn),b=d(n=>g(n).filter),F=d(n=>g(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(O(l.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(X());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,F,h,U,T]);const V=Xe(),ce=V?.loggedInUserRole!=null&&Oe(V?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=G(),z=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>z?ua:void 0,[z]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Va(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=$e(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(N,{path:"/",element:p.jsx(ba,{})}),p.jsx(N,{path:"*",element:p.jsx(ra,{})})]})}export{Va as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-uNyEitSP.js";import{p as j,z as w,aJ as b,C as I,c as p,e as F,cD as P,m as L}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import l from"./NotFoundScreen-DtzClrNV.js";import{a as f}from"./sentry-DkoJdbiW.js";import{h as T,g as y,j as V,u as A,k as R,n as U,o as u}from"./core-C1D_J1Tm.js";import{eN as z,Pg as C,M6 as Y,Ph as D,tr as G,eZ as J,Pi as M,tp as O}from"./zeni-epic-state-B_OPwxNR.js";import{R as x}from"./ReferralListScreen-Cbl9-QoF.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import"./MobileAppDrawer-D4h5JdAm.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]="b36aef46-8b00-4295-a87d-6efb47f0dbaf",e._sentryDebugIdIdentifier="sentry-dbid-b36aef46-8b00-4295-a87d-6efb47f0dbaf")}catch{}})();const Z=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(D()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=y(i=>z(i)),c=V(),k=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),v=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:_}=g(b.zeniAccountsConfig),N=Y(_);f.useEffect(()=>{e(D()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(J(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:k,currentTenant:r,companyName:S,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BvkAL8st.js","assets/sentry-DkoJdbiW.js","assets/core-C1D_J1Tm.js","assets/zeni-epic-state-B_OPwxNR.js","assets/index-DivBM1Ub.js","assets/mui-Bl9HwrRv.js","assets/analytics-87aUO2A0.js","assets/utils-Dw--aDPP.js","assets/withTransactionSidePanel-CaH_VfNh.js","assets/useAskAiCfoHostNavButtonProps-BiomgfPI.js","assets/useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js","assets/TransactionDetailScreen-DTxQe0TM.js","assets/decodeURIComponentSafe-DU65qRFr.js","assets/routePaths-BLYSnXgw.js","assets/NotFoundScreen-DtzClrNV.js","assets/analyticsHelper-CwroxLVU.js","assets/CompanyPassportScreen-DgkCpaOl.js","assets/MobileAppDrawer-D4h5JdAm.js","assets/FeaturePreviewScreen-CVAJ3dJp.js","assets/ReferralListScreen-Cbl9-QoF.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-BrOZ07Ei.js","assets/AddressScreen-CKtYRww-.js","assets/DomesticWireDetailScreen-B1OUbADT.js","assets/useInitialThreadRequest-CUi5RNDv.js","assets/DrawerScreen-Bfr6DJZF.js","assets/SetupPagesScreen-BvABA4oV.js","assets/BusinessVerificationPageScreen-CQpVjRjR.js","assets/BillPayApprovalRoutes-C5AoMYfc.js","assets/ReimbursementApprovalRuleDetailScreen-bJbzuz6k.js","assets/getLocaleForTenant-M6IdYirk.js","assets/ReimbursementRoutes-DHAEN3ZY.js","assets/ReimbursementApprovalRoutes-8QNxXWIW.js","assets/TransactionListRoutes-BO9rH2Kv.js","assets/ZeniAccountStatementScreen-CiOqII9w.js","assets/SettingsRoutes-75OP1ywb.js","assets/accountMappingHelper-C61p9k0R.js","assets/QBOConnectionScreen-CmOBvomD.js","assets/empty-sYgfsPuY.js","assets/index-DMaAvz9E.js","assets/url-BsgtzK-J.js","assets/index-D2qnbHpC.js","assets/ReportsRoutes-Bc3ZiSZw.js","assets/ChargeCardRoutes-Pd2uN0ew.js","assets/PeopleRoutes-CA00gwvb.js","assets/ExpenseAutomationRoutes-BoCxhH8a.js","assets/TreasuryRoutes-DVDGcuUq.js","assets/VendorsRoutes-fs1ql-9B.js","assets/pathToGoBack-BS6hc56i.js","assets/ZeniAccountRoutes-BgtpOsMK.js","assets/AddressRoutes-Dr1v_Sud.js","assets/PandLWithForecastRoutes-v9qf6MIV.js","assets/CustomerOnboardingRoutes-BVZy4r84.js","assets/TransactionDetailRoutes-CFGf3-Do.js","assets/EntityDetailRoutes-XANY_96Q.js","assets/NotificationRoutes-CHXW3ip6.js","assets/PerformanceRoutes-Dxl37sCI.js","assets/RewardsRoutes-0nvz_85Q.js","assets/TaskRoutes-77nF0njj.js","assets/TaskListScreen-749ZfOYL.js","assets/AiCfoScreen-Cebz6UA6.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ij as hs,bv as js,Ik as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as fs,Il as ys,Im as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-B_OPwxNR.js";import{j as e}from"./liveblocks-uNyEitSP.js";import{a as v}from"./sentry-DkoJdbiW.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-C1D_J1Tm.js";import{h as ws,u as zs,z as R,p as Gs,a as $s,O as Ys,m as L,j as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{f as je}from"./analyticsHelper-CwroxLVU.js";import{t as Js}from"./getLocaleForTenant-M6IdYirk.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="c04f543e-1f90-4d94-95bf-ad1642f68357",i._sentryDebugIdIdentifier="sentry-dbid-c04f543e-1f90-4d94-95bf-ad1642f68357")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-BvkAL8st.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-BrOZ07Ei.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-DHAEN3ZY.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-BO9rH2Kv.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-75OP1ywb.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-Bc3ZiSZw.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-Pd2uN0ew.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-CA00gwvb.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BoCxhH8a.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-DVDGcuUq.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-fs1ql-9B.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BgtpOsMK.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-Bc3ZiSZw.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-Dr1v_Sud.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-CA00gwvb.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-v9qf6MIV.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BVZy4r84.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-fs1ql-9B.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-CFGf3-Do.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-XANY_96Q.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-BvkAL8st.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-BrOZ07Ei.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-75OP1ywb.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-DHAEN3ZY.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-BgtpOsMK.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-DVDGcuUq.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-BO9rH2Kv.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-Pd2uN0ew.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-CHXW3ip6.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-Dxl37sCI.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-BoCxhH8a.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-0nvz_85Q.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-77nF0njj.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-Cebz6UA6.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),f=l(()=>n(()=>import("./NotFoundScreen-DtzClrNV.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-749ZfOYL.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),fe=Ys(),{isFeatureEnabled:ye}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||ye&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),y(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,y,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&y(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&fs(A?.loggedInUserRoleMap),Qe=ys(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:fe?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(f,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-uNyEitSP.js";import{a as u,b as T,q as A}from"./sentry-DkoJdbiW.js";import{h as D,j as z,g as c,u as j,N as M,k as O}from"./core-C1D_J1Tm.js";import{u as F,z as s,h as P,c as E,D as N,d as _,e as q,f as B,g as V,q as $,i as v}from"./index-DivBM1Ub.js";import{eN as G,Ii as J,Ij as R,eO as W,fh as H,Io as K,fG as Q,cS as X,Ip as b,Iq as Y,Ir as Z,bR as y}from"./zeni-epic-state-B_OPwxNR.js";import"./mui-Bl9HwrRv.js";import{u as ee}from"./useDeviceId-BDI3hZsc.js";import{f as te}from"./analyticsHelper-CwroxLVU.js";import{t as ne}from"./getLocaleForTenant-M6IdYirk.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="abf853f6-dac6-4303-8787-f0785e8c4317",t._sentryDebugIdIdentifier="sentry-dbid-abf853f6-dac6-4303-8787-f0785e8c4317")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>G(e)),S=c(e=>J(e)),m=j(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),Q().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(q.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(B,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import{a}from"./sentry-DkoJdbiW.js";import{h as u,u as m,j as p,N as g}from"./core-C1D_J1Tm.js";import{z as f,B as y,t as h,c,e as b}from"./index-DivBM1Ub.js";import{fL as I,fM as x,IE as j}from"./zeni-epic-state-B_OPwxNR.js";import{n as w}from"./mui-Bl9HwrRv.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="38c009b5-9ee0-4300-8561-865e5a3f8303",e._sentryDebugIdIdentifier="sentry-dbid-38c009b5-9ee0-4300-8561-865e5a3f8303")}catch{}})();function $(){const e=u(),t=m(),i=p(),n=a.useRef(!1),l=f.isSignedIn(),r=t.state?.message==="logout",o=r||l;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{f.clearAll(),e(I()),e(x(!1)),j(),h.reset(),c.trackLogout(b.Event.logoutSuccess),c.resetUserIdentity()}catch(d){console.error("Error during sign out:",d)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(E,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const E=w.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{$ as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-uNyEitSP.js";import{a as T}from"./sentry-DkoJdbiW.js";import{j as x,h as A,u as j,g as G,l as N,k as R}from"./core-C1D_J1Tm.js";import{z as $,p as v,m as K,C as U,c as _,e as z,cF as M,y as f,w as O}from"./index-DivBM1Ub.js";import{eN as V,Pn as B,Fs as C,Po as L,Pj as W,ET as S,Pp as q,EX as I,Ew as X,Ft as w,Pq as b,gC as H,Fi as J,Fn as Q,Fa as Y,F8 as Z,Fo as aa,F5 as ta,Pr as ea,Ps as sa,Pt as oa,Pu as u,e9 as na,Pv as la,Pw as ra}from"./zeni-epic-state-B_OPwxNR.js";import{n as ia}from"./mui-Bl9HwrRv.js";import{u as ca}from"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import{c as ka}from"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import{M as pa}from"./MobileAppDrawer-D4h5JdAm.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="246952e8-1104-4429-80fc-8ef9b560707f",t._sentryDebugIdIdentifier="sentry-dbid-246952e8-1104-4429-80fc-8ef9b560707f")}catch{}})();const ua=ia.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: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,da=R(function(t,e){const o=B(t,e.isTaskTemplatesEnabled),{taskGroupId:c}=e,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(c))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:W(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=c,{groupByKey:d}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ma(r,a),k=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{t(C(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=y(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(b({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(oa({filters:a}))},onSearchTextChanged:a=>{t(sa({searchText:a}))},onReloadCards:()=>{t(C(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=O(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(ea({localData:a}))},resetLocalData:()=>{t(L({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(ta(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(Z(e.localData.selectedTaskIds,a,aa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(Y(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=Ta(d,a);t(S({taskDetailLocalData:s}));const k=y(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(Q(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(J(a,s))},onTimeSpentUpdate:(a,s)=>{t(w({task:a,updates:s}))},onShowToast:a=>{t(H(a))},onGroupByFilterChange:a=>{t(b({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(w({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=y(r,e.localData.defaultTaskGroupId),k=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(M);function ja(){const t=x(),e=A(),o=j(),c=$.getSignedInUser(),n=G(i=>V(i)),{taskGroupId:l}=N(),{useFeatureGate:r}=v(),{isFeatureEnabled:d}=r(K.isTaskTemplatesEnabled),[a,s]=T.useState(!1),[k,g]=T.useState(!1),h=G(i=>B(i,d)),D=G(i=>i.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:E,onAskAiCfoClick:F}=ca({mobileExploreReferrer:"Task Checklist"});if(ka({isDataReady:m==="Completed"}),T.useEffect(()=>{a||(s(!0),e(C(!1,d)))},[a,e]),T.useEffect(()=>{m==="Completed"&&e(L({taskGroupById:D.taskGroupById}))},[m,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return p.jsxs(p.Fragment,{children:[m==="Completed"?p.jsx(U,{analytics:_,onLoad:i=>(P=>P.trackPageLoaded(z.Event.taskListPage))(i)}):null,p.jsxs(ua,{children:[p.jsx(pa,{isAppContentDrawerOpen:k,handleDrawerToggle:i=>{g(i)}}),p.jsx(da,{location:o,navigate:t,currentTenant:n,taskGroupId:l,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:d,taskListFetchState:m,isAiCfoAccessEnabled:E,onAskAiCfoClick:F})]})]})}const ma=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,y=(t,e)=>`/${t}/tasks/new/${e}`,Ta=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=na(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=la(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=ra(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{ja as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-uNyEitSP.js";import z from"./NotFoundScreen-DtzClrNV.js";import{a as d}from"./sentry-DkoJdbiW.js";import{j as A,h as V,u as _,l as $,g as k,N as R,k as O,n as q,o as u}from"./core-C1D_J1Tm.js";import{A as J,z as w,y as C,C as M,c as D,e as H,cE as Q,i as Z,ap as K,w as W}from"./index-DivBM1Ub.js";import{eN as b,Pj as G,EP as P,ED as X,Ff as Y,Pk as v,Pl as ee,Ez as ae,Ew as te,pE as se,ps as ne,j_ as oe,EJ as ie,Pm as re,EG as le,EU as ce,ET as me}from"./zeni-epic-state-B_OPwxNR.js";import{n as de}from"./mui-Bl9HwrRv.js";import{u as pe}from"./useInitialThreadRequest-CUi5RNDv.js";import{M as ue}from"./MobileAppDrawer-D4h5JdAm.js";import fe from"./TaskListScreen-749ZfOYL.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.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]="b32032b0-dc34-4c0f-93e0-eef8463fa78f",e._sentryDebugIdIdentifier="sentry-dbid-b32032b0-dc34-4c0f-93e0-eef8463fa78f")}catch{}})();const ke=O(function(e,t){const{location:n,taskGroupId:l}=t,m=v(e,t.taskId),c=b(e),i=l!=null?ee(e.taskGroupState,l):void 0,p=w.getSignedInUser(),a=c.tenantId,r={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:a??""},f=G(e);return{taskDetailSelectorView:m,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:K.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:f,taskGroupName:l!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(e,t){const{taskId:n,navigate:l,currentTenant:m,location:c,taskGroupId:i}=t,{tenantEmailDomain:p}=m;return{onSaveChangesToLocalStore:a=>{e(me({taskDetailLocalData:a,taskId:n}))},onSaveDetailClick:()=>{e(ce(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&e(le(t.taskId))},onDismissClick:()=>{if(c.state?.message==="triggerBackClick"){const a=W(c.state?.pathnameStackToGoBack),r=a.poppedPathname??"../../dashboard";l(r,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=B(p),r=C(c.state?.pathnameStackToGoBack,c.pathname);l(a,{state:{pathnameStackToGoBack:r}})}e(re({taskId:n}))},onDeleteTaskClick:()=>{e(ie(n))},updateFilesEntity:a=>{e(oe({files:a}))},onDeleteFile:a=>{e(ne(a))},onEditFileName:(a,r)=>{e(se(a,r.split(".")[0]))},onReloadTaskDetailPage:()=>{e(P(!1,n))},onCreateTagClick:a=>{e(te(a,n))},onDeleteTagClick:a=>{e(ae(a,n))}}})(Q);function I(){const e=A(),t=V(),n=_(),l=J(),{taskId:m,taskGroupId:c}=$(),i=k(o=>b(o)),p=pe(i?.companyId),[a,r]=d.useState(!1),[f,F]=d.useState(!1),[S,L]=d.useState(!1),[x,N]=d.useState(!1),y=k(o=>G(o)),E=k(o=>o.taskGroupViewState.fetchState);d.useEffect(()=>{f||(F(!0),t(P(!1,m)))},[f,t]),d.useEffect(()=>{S||y.fetchState==="Completed"||(L(!0),t(X()))},[S,t,y.fetchState]),d.useEffect(()=>{x||E==="Completed"||(N(!0),t(Y()))},[x,t,E]);const T=k(o=>v(o,m)),g=T.fetchState,j=w.getSignedInUser();if(j==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&T.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=C(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(R,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(M,{analytics:D,onLoad:o=>(h=>h.trackPageLoaded(H.Event.taskDetailPage))(o)}):null,s.jsxs(ge,{children:[s.jsx(ue,{isAppContentDrawerOpen:a,handleDrawerToggle:o=>{r(o)}}),s.jsx(ke,{analytics:D,currentTenant:i,handleZeniLogoClick:()=>{l.toggle()},initialOpenThreadRequest:p,location:n,loggedInUser:j,navigate:e,taskGroupId:c,taskId:m,taskDetailFetchState:g})]})]})}const ge=de.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
|
-
`,B=e=>`/${e}/tasks`;function Ae(){return s.jsxs(q,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(fe,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(z,{})})]})}export{Ae as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-uNyEitSP.js";import i from"./NotFoundScreen-DtzClrNV.js";import{T as r}from"./TransactionDetailScreen-DTxQe0TM.js";import"./sentry-DkoJdbiW.js";import{n as d,o as e}from"./core-C1D_J1Tm.js";import"./zeni-epic-state-B_OPwxNR.js";import"./recharts-B3ReBiRu.js";import"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.js";import"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import"./decodeURIComponentSafe-DU65qRFr.js";import"./routePaths-BLYSnXgw.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-uNyEitSP.js";import{j as J,u as w,h as U,l as H,g as j,N as C,k as Q,n as Ae,o as b}from"./core-C1D_J1Tm.js";import{eN as R,iP as T,NO as W,Gq as ue,bq as ie,NP as he,jq as X,JS as Z,NQ as se,NR as Se,bC as x,Gn as me,NS as ke,NT as re,NU as Ie,NV as pe,NW as be,NX as ve,NY as de,HD as Ye,bn as xe}from"./zeni-epic-state-B_OPwxNR.js";import{D as K,c as M,c6 as ee,y as _,w as te,p as fe,m as q,N as Pe,z as Ee}from"./index-DivBM1Ub.js";import"./mui-Bl9HwrRv.js";import{a as y}from"./sentry-DkoJdbiW.js";import{w as ae}from"./withTransactionSidePanel-CaH_VfNh.js";import{p as ne,b as ce}from"./routePaths-BLYSnXgw.js";import{u as Le}from"./utils-Dw--aDPP.js";import{d as L}from"./decodeURIComponentSafe-DU65qRFr.js";import{Z as je}from"./ZeniAccountStatementScreen-CiOqII9w.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./useAskAiCfoHostNavButtonProps-BiomgfPI.js";import"./useFetchSuggestedQuestionsWhenReady-CoFb7qD6.js";import"./TransactionDetailScreen-DTxQe0TM.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="fa8c14d8-3e77-4ef5-8338-591df008ab7e",a._sentryDebugIdIdentifier="sentry-dbid-fa8c14d8-3e77-4ef5-8338-591df008ab7e")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Le(a),Ce=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:Z(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=K.getLocalizedStrings(),s=N(e.selectedAccount.tranListType),r=Oe(t,n,c,s,e.bookCloseDate);M.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:N(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=J(),t=w(),n=U(),c=t.pathname.split("/").find(d=>ze.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=K.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=Me(o),S="month",k=j(d=>R(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Be(o,D,k.bookCloseDate),[P,B]=y.useState(!1),[Y,O]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:W(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!P&&l!=null){B(!0),M.trackTransactionList(void 0,void 0,void 0,l.title);const d=N(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[P,l,n]);let E=l;return l!=null&&Y!=null&&(E={...l,period:Y}),c==null||E==null?i.jsx(C,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:E,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>O(d),...a})}),Me=a=>{let e="",t="",n="";const c=K.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Be=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Oe=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Z(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=J(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=H(),D=L(s??""),g=L(r??""),v=L(p??""),P=L(k??""),B=j(f=>Se(f.transactionListState,g,D,v)),[Y,O]=y.useState(!1),[l,E]=y.useState(void 0),d=j(f=>R(f)),$=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=Ne(D,g,v,A,h,S,P);if(m){const f={startDate:x(h,"YYYY-MM-DD"),endDate:x(S,"YYYY-MM-DD")},V=_e(B?.dateRange,f);u={accountId:g,accountType:W(D),classId:v,title:P,timeframe:A,period:V}}y.useEffect(()=>{Y||u==null||(O(!0),M.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[Y,u,c]);let z=u;u!=null&&l!=null&&(z={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&z!=null?i.jsx(Fe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:f=>E(f),...e}):i.jsx(C,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&s!=null,_e=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),we=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Z(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:X(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),M.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ve(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=H(),D=L(s??""),g=L(r??""),v=L(S??""),P=!(k!=null&&k==="exclude_subaccounts"),B=j(I=>Ie(I.transactionListState,g,D)),[Y,O]=y.useState(!1),[l,E]=y.useState(void 0),d=j(I=>R(I)),$=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const z=Re(D,g,p,A,h,v);if(z){const I={startDate:x(A,"YYYY-MM-DD"),endDate:x(h,"YYYY-MM-DD")},ye=$e(B?.dateRange,I);m={accountId:g,accountType:W(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(q.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();y.useEffect(()=>{!Y&&m!=null&&oe&&(O(!0),M.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,P)))},[Y,m,c,oe]);const ge=[s,r,p,A,h,S].filter(I=>I!=null);return z&&F!=null?i.jsx(we,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:I=>E(I),...e}):i.jsx(C,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Re=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,$e=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ve=a=>`/${a}/transactions/${Ye}/statements`;function pt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(q.isExpenseAutomationEnabled),o=j(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[j(p=>R(p)).tenantId],{isFeatureEnabled:s}=n(q.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(b,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(b,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(b,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/uncategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(b,{path:"/miscategorized-expense/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/missing-receipts/*",element:r?i.jsx(C,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(b,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-uNyEitSP.js";import{a as l}from"./sentry-DkoJdbiW.js";import{q as u,h,g as y,N as I}from"./core-C1D_J1Tm.js";import{ID as w,eO as b,yY as x}from"./zeni-epic-state-B_OPwxNR.js";import{z as f,B as j,H as S,J as D}from"./index-DivBM1Ub.js";import{n as g}from"./mui-Bl9HwrRv.js";import"./recharts-B3ReBiRu.js";import"./analytics-87aUO2A0.js";import"./plaid-qfPCSwi4.js";import"./dnd-D2GUyFnB.js";import"./stripe-DMRn4zHo.js";import"./lottie-D71IK4aH.js";import"./lexical-D0EV8wLh.js";import"./pdf-Bp6Iehm8.js";import"./utils-Dw--aDPP.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]="216a2de9-eda4-4721-8652-c4a3e58414d8",e._sentryDebugIdIdentifier="sentry-dbid-216a2de9-eda4-4721-8652-c4a3e58414d8")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,c]=l.useState(!1),a=h(),i=y(m=>w(m)),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),l.useEffect(()=>{n||(c(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=g(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{R as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-uNyEitSP.js";import{a as f}from"./sentry-DkoJdbiW.js";import{j as x,h as B,u as C,l as N,g as p}from"./core-C1D_J1Tm.js";import{HD as s,HC as $,NJ as j,eN as v,NK as D}from"./zeni-epic-state-B_OPwxNR.js";import{r as T,ap as g,h as z,z as E,B as L,b_ as P,w as _}from"./index-DivBM1Ub.js";import{n as U}from"./mui-Bl9HwrRv.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]="be63a18a-829c-4b0c-93aa-15c5d8d5ab47",e._sentryDebugIdIdentifier="sentry-dbid-be63a18a-829c-4b0c-93aa-15c5d8d5ab47")}catch{}})();const G=U.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 Z(){const e=x(),n=B(),d=T(),l=C();let{accountId:a}=N(),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,b]=f.useState(!1),h=z();f.useEffect(()=>{u||(b(!0),n($(a??"",!1)))},[u,n]);const o=p(t=>j(t,a??"")),y=()=>{const t=_(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>v(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=D(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(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:m})})}export{Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i}from"./sentry-DkoJdbiW.js";import{r as a}from"./empty-sYgfsPuY.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]="48da1753-b6d9-4542-88c8-c24b4de62ac0",e._sentryDebugIdIdentifier="sentry-dbid-48da1753-b6d9-4542-88c8-c24b4de62ac0")}catch{}})();function s(e,t){for(var o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const d=Object.getOwnPropertyDescriptor(r,n);d&&Object.defineProperty(e,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var f=a();const l=s({__proto__:null,default:i(f)},[f]);export{l as e};
|