@zeniai/web-app-ui 5.1.76-prod → 5.1.76-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-ZS1rVxYe.js +1 -0
- package/dist/assets/{AddressScreen-DLTJPBtB.js → AddressScreen-BUTfoqVU.js} +1 -1
- package/dist/assets/{AiCfoScreen-CIW6Rkrd.js → AiCfoScreen-BzpHh1NI.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BvMuz4fH.js → BillPayApprovalRoutes-BlBr-Pa_.js} +1 -1
- package/dist/assets/{BillPayRoutes-DCoEJWAC.js → BillPayRoutes-ClbMaK26.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BXKB7X5s.js → BusinessVerificationPageScreen-Cl8oXTwg.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CSwlWrZ1.js → ChargeCardRoutes-Dty7fFkf.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BLsZ8Uuy.js → CompanyPassportScreen-D3FPR-Qo.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B13ytSR6.js → ConnectionAuthScreen-BgM-EvOD.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-D1nj-yCN.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Bb0R8e9B.js → CustomerOnboardingRoutes-CvSaPcYJ.js} +1 -1
- package/dist/assets/{DashboardRoutes-Xszs783p.js → DashboardRoutes-IvQbF0p5.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Ckgm6fYm.js → DefaultTenantHome-BDYLNaqp.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-R5H3Lj3F.js → DomesticWireDetailScreen-2D8uEzGS.js} +1 -1
- package/dist/assets/{DrawerScreen-C1-3TQnN.js → DrawerScreen-BJ9U_AyW.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BklwOWcC.js → EntityDetailRoutes-CqcMNyXA.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CkJkhfFq.js → ExpenseAutomationRoutes-d-FhPPBr.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DeAByMab.js → FeaturePreviewScreen-BRif0RC-.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-tj9Ftuv9.js → HubSpotOAuthCallbackScreen-NVwKuO2U.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DuELPviL.js → MagicLinkRoutes-GeMpatbi.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CRn0-bwq.js → MagicLinkSignInScreen-BXPx6ksg.js} +1 -1
- package/dist/assets/{MobileAppDrawer-C6MRZ7yW.js → MobileAppDrawer-BpqQJOt0.js} +1 -1
- package/dist/assets/NotFoundScreen-D6Lk-Xx8.js +1 -0
- package/dist/assets/{NotificationRoutes-CJQORxml.js → NotificationRoutes-DAaLYP16.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BBkfTgiS.js → OAuthConsentScreen-BAYK5t47.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DC7TR9_4.js → PandLWithForecastRoutes-m34ge8VY.js} +1 -1
- package/dist/assets/{PeopleRoutes-csHlQp5o.js → PeopleRoutes-CKpCGN6J.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BzTXPXqo.js → PerformanceRoutes-Bg1k1jyB.js} +1 -1
- package/dist/assets/{Preview-Cw7jL1Lj.js → Preview-C1-82nYG.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-YQRuxVuF.js → QBOConnectionScreen-CbpqcU_N.js} +1 -1
- package/dist/assets/{ReferralListScreen-jCzCZDWf.js → ReferralListScreen-BEpm9VKl.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-YTWZ_f_x.js → ReimbursementApprovalRoutes-B3F2FHuK.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DqNByTW4.js → ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CKT5CdX2.js → ReimbursementRoutes-ChEJPAQh.js} +1 -1
- package/dist/assets/{ReportsRoutes-BBHE4Oo-.js → ReportsRoutes-BF-qA0qu.js} +1 -1
- package/dist/assets/{RewardsRoutes-BuxVlZVs.js → RewardsRoutes-C5Chcvbk.js} +1 -1
- package/dist/assets/{ScreenRoutes-CGfFu7WV.js → ScreenRoutes-DjL85WV2.js} +2 -2
- package/dist/assets/{SettingsRoutes-CZbvgGLZ.js → SettingsRoutes-nye6Prnj.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DhoJ2EKU.js → SetupPagesScreen-3PXMmMdF.js} +1 -1
- package/dist/assets/{SignInScreen-C8GQD2TL.js → SignInScreen-BL4rDn0j.js} +1 -1
- package/dist/assets/{SignOutScreen-BDPFv8fh.js → SignOutScreen-BsM-tb4L.js} +1 -1
- package/dist/assets/{TaskListScreen-BAOvGtza.js → TaskListScreen-DWO4uefn.js} +1 -1
- package/dist/assets/{TaskRoutes-BO5cvZoD.js → TaskRoutes-Dn9l47zA.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-7L3zeSND.js → TransactionDetailRoutes-D3TX9qDh.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DY5IcfRV.js → TransactionDetailScreen-Cqi8jdTb.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Bgj6-3fA.js → TransactionListRoutes-BHAgKBjq.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BVhGqN6W.js → TreasuryRoutes-CnwThTn3.js} +1 -1
- package/dist/assets/{VendorsRoutes-BnxlBevs.js → VendorsRoutes-bYzT2YYR.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CnaVF5HH.js → WiseConfirmationScreen-Bg3y3bh-.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DNooyVe8.js → ZeniAccountRoutes-BAi7pBEZ.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CyycwdN8.js → ZeniAccountStatementScreen-Cb60FSVQ.js} +1 -1
- package/dist/assets/{accountMappingHelper-C2f8hGo7.js → accountMappingHelper-DB6fTWzq.js} +1 -1
- package/dist/assets/{analytics-BYlEHy--.js → analytics-CGnNJ1B3.js} +1 -1
- package/dist/assets/{analyticsHelper-Cw9lxNal.js → analyticsHelper-CSJ-Oqa_.js} +1 -1
- package/dist/assets/{core-CvVQwh-G.js → core-BQch-SEa.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-C_ttRntx.js → decodeURIComponentSafe-BlZKyc9K.js} +1 -1
- package/dist/assets/{dnd-DNR-B7xM.js → dnd-DtFKtvlf.js} +1 -1
- package/dist/assets/{empty-CqdRwXT0.js → empty-CnUVdn1j.js} +1 -1
- package/dist/assets/{empty-BINoIGGW.js → empty-DBOryUxv.js} +1 -1
- package/dist/assets/{emptyVideoElement-C5q-nSLE.js → emptyVideoElement-CMOPMd9b.js} +1 -1
- package/dist/assets/{epic-C5jlPncF.js → epic-Cn810zkq.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BKpCR6Mg.js → getLocaleForTenant-DDy24EaJ.js} +1 -1
- package/dist/assets/{index-LzTRB_X0.js → index-B7xMX0uC.js} +7 -7
- package/dist/assets/{index-CBYzZDpo.js → index-BDydFdLA.js} +1 -1
- package/dist/assets/{index-DkXdrecr.js → index-BJcfizgW.js} +1 -1
- package/dist/assets/{index-CyWCR990.js → index-BKzmRWFJ.js} +2 -2
- package/dist/assets/{index-CFH22x4t.js → index-C75IsDSW.js} +1 -1
- package/dist/assets/{index-H3w7aQmk.js → index-CdbMVgUL.js} +1 -1
- package/dist/assets/{index-iPhf2_13.js → index-CjwtZFvv.js} +1 -1
- package/dist/assets/{index-6ei8cz0C.js → index-DZkdTIsz.js} +1 -1
- package/dist/assets/{lexical-DEMTOP18.js → lexical-BBRytn_R.js} +1 -1
- package/dist/assets/{liveblocks-OUACL7Sm.js → liveblocks-Bi6jUyhM.js} +1 -1
- package/dist/assets/{lottie-CtoJzpCG.js → lottie-CB8QpQmy.js} +1 -1
- package/dist/assets/{mui-B_sWk5no.js → mui-D4v6d6vq.js} +1 -1
- package/dist/assets/{pathToGoBack-CJrDL_Y4.js → pathToGoBack-iBZHU0oy.js} +1 -1
- package/dist/assets/{pdf-Bd_BBdKz.js → pdf-BNQvW5mJ.js} +3 -3
- package/dist/assets/{pdf-lib-B6zbzfIK.js → pdf-lib-BkMwujYN.js} +1 -1
- package/dist/assets/{plaid-BeX18ubU.js → plaid-DWupRB-M.js} +1 -1
- package/dist/assets/{pusher-aLhruJgZ.js → pusher-Dkp2Jrxx.js} +1 -1
- package/dist/assets/{react-BvotTNj-.js → react-4loJCMRC.js} +1 -1
- package/dist/assets/{react-T1MP5N4W.js → react-BnoWjI1_.js} +1 -1
- package/dist/assets/{react-BGSmuuzy.js → react-CZ9x9aZs.js} +1 -1
- package/dist/assets/{react-D3Ygj9wO.js → react-CtfVTLhb.js} +1 -1
- package/dist/assets/{react-CVqp8PAx.js → react-D6_PfBEK.js} +1 -1
- package/dist/assets/{react-zqzsPGgA.js → react-DZeesIBx.js} +1 -1
- package/dist/assets/{recharts-ScPc1hFQ.js → recharts-6oV2OwTy.js} +1 -1
- package/dist/assets/{routePaths-CCOmiobh.js → routePaths-Db_F8Q8U.js} +1 -1
- package/dist/assets/{sentry-COtwFETz.js → sentry-DwScFzsh.js} +1 -1
- package/dist/assets/{url-DgoPdzhF.js → url-CA34r-nZ.js} +1 -1
- package/dist/assets/{url-sMzMgETT.js → url-uJs8N0Ig.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js → useAiCfoDashboardSuggestedQuestionsChips-BVDwvQd1.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CT6wQzQG.js → useAskAiCfoHostNavButtonProps-CqmbctLX.js} +1 -1
- package/dist/assets/{useDeviceId-FKP5CkBV.js → useDeviceId-B2Yksaa2.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BRMmNSgV.js → useInitialThreadRequest-BDy3pY5w.js} +1 -1
- package/dist/assets/{utils-B-68Nh7i.js → utils-Dwr2wQrV.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CNv0kM7W.js → withTransactionSidePanel-NhbBttSf.js} +1 -1
- package/dist/assets/{zeni-epic-state-CECAZYIg.js → zeni-epic-state-DxVQhBoO.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-CQEm5psH.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-bHMRpQpq.js +0 -1
- package/dist/assets/NotFoundScreen-BXgaohYF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-BQch-SEa.js";import{Kd as k,Ke as v,Kf as K,Aa as A,zY as T,Kg as B,Kh as oe,Ki as se,A0 as ie,eZ as $,A7 as le,A4 as de}from"./zeni-epic-state-DxVQhBoO.js";import{X as x,o as d,H as re,d as j,j as G,O as ce,p as me,W as pe,q as M,a as ue,G as he,V as ge,K as xe,m as fe,r as we,B as be,s as Se,R as ye,S as ke,v as ve,w as je,Q as $e}from"./index-B7xMX0uC.js";import{n as m}from"./mui-D4v6d6vq.js";import f from"./NotFoundScreen-D6Lk-Xx8.js";import{a as I}from"./sentry-DwScFzsh.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="413bf6d9-d7d9-4541-8909-c573d06f8616",e._sentryDebugIdIdentifier="sentry-dbid-413bf6d9-d7d9-4541-8909-c573d06f8616")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-Bi6jUyhM.js";import{a as g}from"./sentry-DwScFzsh.js";import{u as O,g as _,h as w,s as M,j as l,N as T}from"./core-BQch-SEa.js";import{z as r,m as P,D as V,e as A,d as K,f as N,n as J,R,g as $}from"./index-B7xMX0uC.js";import{eS as q,J_ as W,K8 as Z,J$ as B,eZ as G,fq as H,K4 as Q,fO as X,cT as Y,K9 as ee,Ka as te}from"./zeni-epic-state-DxVQhBoO.js";import{n as ne}from"./mui-D4v6d6vq.js";import{u as se}from"./useDeviceId-B2Yksaa2.js";import{f as ae}from"./analyticsHelper-CSJ-Oqa_.js";import{t as ie}from"./getLocaleForTenant-DDy24EaJ.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var 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]="ee6bfb78-6883-43b7-89cc-ba4de8c58348",t._sentryDebugIdIdentifier="sentry-dbid-ee6bfb78-6883-43b7-89cc-ba4de8c58348")}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),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),b=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>q(e)),h=l(e=>W(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(Z(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(h.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,h.tenantsInOrder),X().then(()=>{const e=$();e!=null&&A(e)}),setTimeout(()=>{K.trackLogin(N.Event.loginSuccess,"email",Y(o.productSettings))},2e3))},[I,S,y,s,o,h,v,a.state,t]);const U=g.useCallback(()=>{m("/signin/auth")},[m]),j=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(b==="Completed"&&d!=null)return u.jsx(J,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(I==="In-Progress"&&S==="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||b==="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??"")||b==="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
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-
|
|
1
|
+
import{j as N}from"./liveblocks-Bi6jUyhM.js";import{a as c}from"./sentry-DwScFzsh.js";import{u as me,j as n,i as Ze,g as Ke,h as Je,l as M}from"./core-BQch-SEa.js";import{eS as pe,f2 as Qe,f3 as be,eW as Xe,bn as ea,eR as aa,f4 as ta,f5 as na,f7 as sa,fa as oa,fj as ia,fb as g,fd as ra,fe as le,fh as da,ff as la,fg as ca,fi as ua,cI as fa,fl as ma,cO as pa,eV as ba,fq as ha,fr as Sa,fp as ga}from"./zeni-epic-state-DxVQhBoO.js";import{a8 as Ea,a9 as ka,K as Ca,a as ya,z as k,r as Ia,u as Ta,G as r,i as wa,k as Aa,aa as _a,I as Fa,c as Da,ab as va,a4 as $a,ac as Ba,ad as xa,ae as ce,af as ue,L as Ma,ag as Pa,ah as fe,d as P,a0 as Ra,q as A,ai as R,aj as Na}from"./index-B7xMX0uC.js";import{D as Va}from"./mui-D4v6d6vq.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="3d6b241d-2ca0-4648-aad6-1eea095d2d27",f._sentryDebugIdIdentifier="sentry-dbid-3d6b241d-2ca0-4648-aad6-1eea095d2d27")}catch{}})();const Ua=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=Ke(),C=Ca(),o=Je(),V=Xe(),m=me(),{useFeatureGate:i}=ya(),U=k.getSignedInUser(),G=ea(U),s=n(e=>pe(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[_,L]=c.useState(void 0),F=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:q}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,q),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=k.getSignedInUser(),v=n(e=>e.tenantState),Ce=n(e=>v.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),W=Aa(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=G||!G&&$e,xe=s.company!=null&&ia(s.company),w=ve&&xe,Me=n(e=>g(e).totalUnreadCount),Pe=n(e=>g(e).reducedFetchCountState),Z=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:J,isLoading:Q,isFetchingMore:X,hasFetchedAll:ee,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(Q===!1&&X===!1&&ee===!0)if(s?.companyId!=null&&J!=null){const e=`dashboard_${s.companyId}`;L(J.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[Q,X,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:_},"comments")))},[_,$.fetchState]);const Ve={fetchStatus:Pe,count:Me},ae=t!=null?k.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ue=Fa(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),Ge=F&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!F&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),je=fa(Oe),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&H.fetchState==="Completed"&&ma(H.notificationSettings,h.userEmail,q,s),oe=Da(),Ye=oe&&va(a),ie=pa(Ue?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!k.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[qe,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const He=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Ba(He);return N.jsx(Va,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(xa,{signedInUser:U,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ce:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:Ge,isSettings:ue(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:We,isTreasuryPopupVisible:qe,isNotificationsTabVisible:ze,notificationCountDetails:Ve,isExpenseAutomationEnabledForUser:W,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=Z===0&&K>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=Z===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!he)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Na(e.type);fe(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Se(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let p=`/${encodeURIComponent(u)}/`;const x=R(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Pa(l)?p+="settings/my_profile":fe(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;P.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:F,updateCurrentChatSessionId:e=>{m(ba({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),qa=f=>{const d=me(),t=n(C=>pe(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Qe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Ua,{...f,...a})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-Bi6jUyhM.js";import{h as r,n}from"./core-BQch-SEa.js";import{J as i}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import"./sentry-DwScFzsh.js";import"./zeni-epic-state-DxVQhBoO.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="c14b3791-f16a-4778-9ced-7f24e565014e",o._sentryDebugIdIdentifier="sentry-dbid-c14b3791-f16a-4778-9ced-7f24e565014e")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-Bi6jUyhM.js";import lt from"./NotFoundScreen-D6Lk-Xx8.js";import{a as k}from"./sentry-DwScFzsh.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as Y}from"./core-BQch-SEa.js";import{cq as St,f4 as J,eS as X,fi as bt,fb as b,QC as K,fe as d,f3 as y,ry as M,wX as It,QD as Ct,f2 as Tt,fl as yt,rD as Et,QE as F,bo as $,gW as x,rH as H,QF as _t,cB as At,cv as Nt}from"./zeni-epic-state-DxVQhBoO.js";import{Y as Bt,z as wt,a as xt,G as Dt,$ as Rt,cD as vt,q as N,a8 as Gt,cE as Ut,a9 as Pt,p as Ft}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="ce87d1de-d184-49ab-a06b-a6b4a21b1898",t._sentryDebugIdIdentifier="sentry-dbid-ce87d1de-d184-49ab-a06b-a6b4a21b1898")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Gt(Ut)),Qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,D]=k.useState(!1),a=S(e=>J(e)),o=S(e=>X(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),Q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=ct(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(Q!==i&&i!=null&&s(K(i)),i==null){const e=`../${Q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(E===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[E,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(D(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(E===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),_=p.map(f=>f.id),it=p.map(f=>{const P=V.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,G,W,C,z,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",T,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(Y,{path:"/:selectedTab",element:A.jsx(Qt,{})}),A.jsx(Y,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-Bi6jUyhM.js";import{a as r}from"./sentry-DwScFzsh.js";import{u as j,g as A,j as o,N as C}from"./core-BQch-SEa.js";import{Kn as K,eS as P,fa as x,Ko as z,Kp as D,Kq as M,Kr as R,nh as k,Jj as q}from"./zeni-epic-state-DxVQhBoO.js";import{z as h,F as I}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="8cb80d5f-cc86-49d9-aa5f-123259309107",n._sentryDebugIdIdentifier="sentry-dbid-8cb80d5f-cc86-49d9-aa5f-123259309107")}catch{}})();function ee(){const n=j(),s=A(),{params:t,error:i}=r.useMemo(()=>K(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),S=o(D),c=o(M),[v,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[f?.tenantId,l]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(q(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-DC7TR9_4.js → PandLWithForecastRoutes-m34ge8VY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-Bi6jUyhM.js";import{h as K,u as z,g as H,i as X,j as d,n as Z,o as J,p as I}from"./core-BQch-SEa.js";import{eS as O,rm as P,qW as Q,KV as v,qR as S,bs as ee,bn as ae,bT as te,qS as se,KW as oe,KH as C,dF as re,uU as ne,KX as ie,vf as ce,f1 as le,e$ as de}from"./zeni-epic-state-DxVQhBoO.js";import{z as me,Y as fe,$ as pe,I as ue,a as $,G as q,s as he,d as M,ao as Fe,q as ge}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import be from"./NotFoundScreen-D6Lk-Xx8.js";import{F as Ie}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as F}from"./sentry-DwScFzsh.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{u as Se}from"./useInitialThreadRequest-BDy3pY5w.js";import{t as Te}from"./routePaths-Db_F8Q8U.js";import{M as ye}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="e58a14a0-401c-4b82-94fa-ec5943a102dd",s._sentryDebugIdIdentifier="sentry-dbid-e58a14a0-401c-4b82-94fa-ec5943a102dd")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=Z(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(Fe);function U(){const s=K(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=X(),[i,p]=F.useState(!1),[m,u]=F.useState(!1),h=me.getSignedInUser(),y=d(t=>O(t)),w=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!i&&g)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&g&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,g]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=$(),{isFeatureEnabled:j}=N(q.isReportsCommentingEnabled),V=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,_]=F.useState(!1),E=t=>{_(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:G,onAskAiCfoClick:W,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:V,onClickMenuIcon:()=>{E(!0)}})]})}function _e(){const s=d(i=>O(i)),{useFeatureGate:e}=$(),{isFeatureEnabled:a}=e(q.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{_e as PandLWithForecastRoutes,_e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{KQ as te,eS as Y,jJ as z,f1 as q,e$ as ne,Ig as Q,Ku as oe,tR as Ee,KR as N,tF as ke,t$ as Ie,tV as ie,tJ as re,tZ as Pe,tW as je,KS as le,vG as Te,KT as Le,fE as ve,KU as K,tO as de,tM as ce,u2 as Fe,c1 as Re}from"./zeni-epic-state-DxVQhBoO.js";import{X as pe,a as X,G as E,z as H,i as ue,x as me,ak as ge,al as Ae,w as he,o as A,y as fe,D as Ce,am as Oe,Y as Ve,$ as Ue,s as $e,d as be,f as Ze,q as Be,an as Ke,I as Ge}from"./index-B7xMX0uC.js";import{D as ye,n as M,S as we}from"./mui-D4v6d6vq.js";import ae from"./NotFoundScreen-D6Lk-Xx8.js";import{a as r}from"./sentry-DwScFzsh.js";import{u as ee,i as _e,j as m,h as ze,g as He,n as Me,o as se,p as B}from"./core-BQch-SEa.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as Je}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="c65a4845-9392-41b8-81ed-3735d4891b0d",a._sentryDebugIdIdentifier="sentry-dbid-c65a4845-9392-41b8-81ed-3735d4891b0d")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=_e(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),v=Q(u),U=oe(u),$=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:$===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},qe=M(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-Bi6jUyhM.js";import E from"./NotFoundScreen-D6Lk-Xx8.js";import{a as r}from"./sentry-DwScFzsh.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as q,o as z,p as h}from"./core-BQch-SEa.js";import{eS as F,QG as b,bq as B,bn as N,hq as O,gW as V}from"./zeni-epic-state-DxVQhBoO.js";import{K as $,z as I,$ as G,cF as K}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as W}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0892b943-623c-4102-a7b0-158e00820c64",e._sentryDebugIdIdentifier="sentry-dbid-0892b943-623c-4102-a7b0-158e00820c64")}catch{}})();const H=q(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(K),J=()=>{const e=_(),t=v(),c=$(),o=p(a=>F(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),g=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback((a,i,T)=>{g(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(g(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),f=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=Q({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:S,handleDrawerToggle:f}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${u}/dashboard`,replace:!0})};function fe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-DwScFzsh.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-Bi6jUyhM.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DwScFzsh.js";import{L as dt,bT as Tc,eS as Ac,J_ as Rc,Ks as kl,c1 as Tl,fq as Al,fr as Rl}from"./zeni-epic-state-DxVQhBoO.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-Dwr2wQrV.js";import{r as un}from"./empty-CnUVdn1j.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BkMwujYN.js";import{r as Gl}from"./index-BJcfizgW.js";import{r as zl}from"./index-DZkdTIsz.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BQch-SEa.js";import{u as Kl,z as Pc,L as Wl,_ as Jl,E as Xl,j as Ql,d as tf}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{d as Pe}from"./decodeURIComponentSafe-BlZKyc9K.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="2330c33d-6af3-44c3-bb50-78fffb1b0dc4",t._sentryDebugIdIdentifier="sentry-dbid-2330c33d-6af3-44c3-bb50-78fffb1b0dc4")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{a as o}from"./sentry-DwScFzsh.js";import{j as f,h as H,u as L,g as N,n as V}from"./core-BQch-SEa.js";import{m as M,X as W,z as R,bb as _,w as $,Y as U,$ as z,s as K,d as l,f as Y,a8 as q,bc as X}from"./index-B7xMX0uC.js";import{f5 as G,eS as J,Nj as P,Nk as Q,uK as Z,uA as g,f7 as ee,bO as ae,uF as re,Nl as ne}from"./zeni-epic-state-DxVQhBoO.js";import{D as te,e as se,n as oe,S as ie}from"./mui-D4v6d6vq.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{M as ce}from"./MobileAppDrawer-BpqQJOt0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="1ffaa19e-f523-4d97-bbce-cba35bc56040",e._sentryDebugIdIdentifier="sentry-dbid-1ffaa19e-f523-4d97-bbce-cba35bc56040")}catch{}})();const de={overlayWidth:new $(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>G(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-Bi6jUyhM.js";import R from"./NotFoundScreen-D6Lk-Xx8.js";import{a as p}from"./sentry-DwScFzsh.js";import{h as I,g as C,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-BQch-SEa.js";import{eS as O,Od as S,Ot as g,DH as T,CQ as V,DG as d,Dx as U,OJ as _}from"./zeni-epic-state-DxVQhBoO.js";import{m as $,z as B,B as N,a8 as W,bS as z,af as G}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="6ec646bb-8ab6-4151-829e-59b9f94dd863",e._sentryDebugIdIdentifier="sentry-dbid-6ec646bb-8ab6-4151-829e-59b9f94dd863")}catch{}})();const m="reimbursement-approval-rule-update",H=E(function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:g(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{G(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(d(s)),a(`./${s}/edit`)):(e(d()),a("./new"))}}})(W(z)),J=()=>{const e=I(),r=C(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>O(n)),w=$(),i=u(n=>S(n)),h=u(n=>g(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(V(!0)))},[l,b,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(d())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,P,x)=>{n.endsWith(m)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(N,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(J,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-Bi6jUyhM.js";import{a as y}from"./sentry-DwScFzsh.js";import{h as A,u as w,g as T,i as U,j as b,n as E}from"./core-BQch-SEa.js";import{Ot as D,Od as C,DA as x,DJ as _,DH as S,DI as h,Ou as B}from"./zeni-epic-state-DxVQhBoO.js";import{z as O,m as k,B as V,bJ as j,af as F}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="236b2454-9329-48a3-9357-d75245c3ed9e",e._sentryDebugIdIdentifier="sentry-dbid-236b2454-9329-48a3-9357-d75245c3ed9e")}catch{}})();function $(e){return B(e)==null}const N=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const f=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:c.stepType.selectedOption,actors:m,operator:m.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function G(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=O.getSignedInUser(),l=k(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(N,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-OUACL7Sm.js";import{h as q,u as me,g as V,i as Y,j as w,N as M,n as J,l as mt,o as ct,p as E}from"./core-CvVQwh-G.js";import{eS as W,OK as ce,c1 as de,CL as Te,jU as dt,CY as se,CX as ie,OL as ut,bn as ue,fP as je,OM as pt,L5 as bt,jJ as Fe,L6 as ye,L7 as gt,iE as ht,N$ as ft,iT as St,Cz as It,td as yt,iL as Rt,Dj as Ue,ON as Le,OO as At,OP as kt,OQ as vt,OR as Ct,OS as Et,D3 as Re,iZ as wt,O8 as xt,CZ as Bt,CJ as Dt,OT as Tt,CI as jt,OU as Ft,CR as Ae,D7 as Ut,D6 as Lt,D2 as Pt,OV as Pe,Ig as $t,bq as Ot,CU as Mt,DB as _t,OW as Nt,OX as zt,Df as Gt,Dc as ke,Nu as Zt,CG as Ht,OY as $e,D_ as ve,E6 as Vt,OZ as Wt,O_ as Z,O$ as qt,P0 as Oe,P1 as Jt,P2 as Me,P3 as _e,Dr as oe,bu as Kt,bG as pe,cB as be,f1 as Ne,e$ as ze,P4 as Xt,gW as Yt,NH as Qt,P5 as en,P6 as Ge,NL as tn,Ot as nn,P7 as an,OJ as sn,E3 as Ce,E2 as on,P8 as rn,P9 as ln,Pa as mn,Pb as cn,Pc as dn,Oe as un,DV as pn,DZ as bn,bs as gn,bF as hn,cw as fn,ck as Sn,bt as In,K0 as yn,cL as Rn,cO as An,cN as kn,cv as vn}from"./zeni-epic-state-CECAZYIg.js";import{K as Ze,X as He,a as Q,G as k,z as O,bT as Ve,s as ee,d as v,aH as Ee,o as j,at as X,x as Cn,D as We,bU as En,q as H,$ as qe,bV as wn,I as te,bW as xn,Y as Bn,w as Dn,B as ge,f as Je,a8 as Tn,bk as jn,a3 as Fn,m as Ke,bX as Un,i as Ln}from"./index-LzTRB_X0.js";import{n as _,S as Pn}from"./mui-B_sWk5no.js";import re from"./NotFoundScreen-BXgaohYF.js";import{S as we}from"./SetupPagesScreen-DhoJ2EKU.js";import{F as Xe}from"./FeaturePreviewScreen-DeAByMab.js";import{a as f}from"./sentry-COtwFETz.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{u as Ye}from"./useInitialThreadRequest-BRMmNSgV.js";import{D as $n}from"./DrawerScreen-C1-3TQnN.js";import{M as Qe}from"./MobileAppDrawer-C6MRZ7yW.js";import{R as On}from"./ReimbursementApprovalRoutes-YTWZ_f_x.js";import{FallBackRoute as Mn}from"./ScreenRoutes-CGfFu7WV.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./analyticsHelper-Cw9lxNal.js";import"./routePaths-CCOmiobh.js";import"./BusinessVerificationPageScreen-BXKB7X5s.js";import"./ReimbursementApprovalRuleDetailScreen-DqNByTW4.js";import"./getLocaleForTenant-BKpCR6Mg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="29b61985-6ba8-4963-816f-417e453ba52b",e._sentryDebugIdIdentifier="sentry-dbid-29b61985-6ba8-4963-816f-417e453ba52b")}catch{}})();const et=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=We.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=O.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=je(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const D=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:D,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=O.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Ue(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ye("common"))},onCancelAutoComplete:()=>{e(ye("common"))}}}})(En);function xe(){const e=q(),t=me(),n=V(),{reimbursementId:r}=Y(),d=Ze(),c=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:D,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=V().pathname,T=x.includes("edit"),A=x.includes("reimbursement/new"),[F,B]=f.useState(!1),C=O.getSignedInUser(),I=w(p=>W(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!F||T&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Te(!1,b,R,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(G=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&G.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:D,onAskAiCfoClick:u})})]})}const zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-Bi6jUyhM.js";import{h as q,u as me,g as V,i as Y,j as w,N as M,n as J,l as mt,o as ct,p as E}from"./core-BQch-SEa.js";import{eS as W,OK as ce,c1 as de,CL as Te,jU as dt,CY as se,CX as ie,OL as ut,bn as ue,fP as je,OM as pt,L5 as bt,jJ as Fe,L6 as ye,L7 as gt,iE as ht,N$ as ft,iT as St,Cz as It,td as yt,iL as Rt,Dj as Ue,ON as Le,OO as At,OP as kt,OQ as vt,OR as Ct,OS as Et,D3 as Re,iZ as wt,O8 as xt,CZ as Bt,CJ as Dt,OT as Tt,CI as jt,OU as Ft,CR as Ae,D7 as Ut,D6 as Lt,D2 as Pt,OV as Pe,Ig as $t,bq as Ot,CU as Mt,DB as _t,OW as Nt,OX as zt,Df as Gt,Dc as ke,Nu as Zt,CG as Ht,OY as $e,D_ as ve,E6 as Vt,OZ as Wt,O_ as Z,O$ as qt,P0 as Oe,P1 as Jt,P2 as Me,P3 as _e,Dr as oe,bu as Kt,bG as pe,cB as be,f1 as Ne,e$ as ze,P4 as Xt,gW as Yt,NH as Qt,P5 as en,P6 as Ge,NL as tn,Ot as nn,P7 as an,OJ as sn,E3 as Ce,E2 as on,P8 as rn,P9 as ln,Pa as mn,Pb as cn,Pc as dn,Oe as un,DV as pn,DZ as bn,bs as gn,bF as hn,cw as fn,ck as Sn,bt as In,K0 as yn,cL as Rn,cO as An,cN as kn,cv as vn}from"./zeni-epic-state-DxVQhBoO.js";import{K as Ze,X as He,a as Q,G as k,z as O,bT as Ve,s as ee,d as v,aH as Ee,o as j,at as X,x as Cn,D as We,bU as En,q as H,$ as qe,bV as wn,I as te,bW as xn,Y as Bn,w as Dn,B as ge,f as Je,a8 as Tn,bk as jn,a3 as Fn,m as Ke,bX as Un,i as Ln}from"./index-B7xMX0uC.js";import{n as _,S as Pn}from"./mui-D4v6d6vq.js";import re from"./NotFoundScreen-D6Lk-Xx8.js";import{S as we}from"./SetupPagesScreen-3PXMmMdF.js";import{F as Xe}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as f}from"./sentry-DwScFzsh.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import{u as Ye}from"./useInitialThreadRequest-BDy3pY5w.js";import{D as $n}from"./DrawerScreen-BJ9U_AyW.js";import{M as Qe}from"./MobileAppDrawer-BpqQJOt0.js";import{R as On}from"./ReimbursementApprovalRoutes-B3F2FHuK.js";import{FallBackRoute as Mn}from"./ScreenRoutes-DjL85WV2.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";import"./analyticsHelper-CSJ-Oqa_.js";import"./routePaths-Db_F8Q8U.js";import"./BusinessVerificationPageScreen-Cl8oXTwg.js";import"./ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js";import"./getLocaleForTenant-DDy24EaJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="29b61985-6ba8-4963-816f-417e453ba52b",e._sentryDebugIdIdentifier="sentry-dbid-29b61985-6ba8-4963-816f-417e453ba52b")}catch{}})();const et=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=We.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=O.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=je(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const D=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:D,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=O.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Ue(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ye("common"))},onCancelAutoComplete:()=>{e(ye("common"))}}}})(En);function xe(){const e=q(),t=me(),n=V(),{reimbursementId:r}=Y(),d=Ze(),c=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Q(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:D,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=V().pathname,T=x.includes("edit"),A=x.includes("reimbursement/new"),[F,B]=f.useState(!1),C=O.getSignedInUser(),I=w(p=>W(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!F||T&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Te(!1,b,R,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(G=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&G.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:D,onAskAiCfoClick:u})})]})}const zn=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-OUACL7Sm.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as G}from"./core-CvVQwh-G.js";import{eS as L,fg as I,Kt as Te,jJ as Q,p$ as X,qQ as F,jx as Re,iB as Oe,ue as W,qV as Ae,bs as Fe,Ku as ke,bn as De,vn as je,Kv as Ee,Kw as Pe,u6 as Me,Kx as Y,Ky as Le,Kz as ve,KA as Be,KB as Ke,KC as S,KD as k,KE as D,KF as H,KG as j,KH as E,dF as Ue,v3 as Ve,uT as N,uU as $,v9 as xe,uY as q,vf as ze,KI as Ge,KJ as Ye,KK as He,KL as Ne,KM as $e,f1 as qe,e$ as Ze}from"./zeni-epic-state-CECAZYIg.js";import{M as Je,N as Qe,T as Xe,U as We,X as ea,a as ee,G as P,z as ae,Y as aa,I as sa,c as ta,Z as oa,$ as na,s as ra,d as M,f as ia,a0 as la,q as se,a1 as ca,a2 as da,a3 as pa}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import fa from"./NotFoundScreen-BXgaohYF.js";import{F as ma}from"./FeaturePreviewScreen-DeAByMab.js";import{a as _}from"./sentry-COtwFETz.js";import{u as ua}from"./useInitialThreadRequest-BRMmNSgV.js";import{t as Z,a as J,b as _a}from"./routePaths-CCOmiobh.js";import{M as ha}from"./MobileAppDrawer-C6MRZ7yW.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ddcd76b3-99a2-4b2d-b1f9-483c19bf816d",e._sentryDebugIdIdentifier="sentry-dbid-ddcd76b3-99a2-4b2d-b1f9-483c19bf816d")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e(Ne()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(W())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>L(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),K=d(n=>Q(n)),O=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),A=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(W());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,K,O]);const U=sa(),de=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),V=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Je(he??"")==="reports",be=Qe(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:V}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=qe(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
1
|
+
import{j as p}from"./liveblocks-Bi6jUyhM.js";import{g as z,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as G}from"./core-BQch-SEa.js";import{eS as L,fg as I,Kt as Te,jJ as Q,p$ as X,qQ as F,jx as Re,iB as Oe,ue as W,qV as Ae,bs as Fe,Ku as ke,bn as De,vn as je,Kv as Ee,Kw as Pe,u6 as Me,Kx as Y,Ky as Le,Kz as ve,KA as Be,KB as Ke,KC as S,KD as k,KE as D,KF as H,KG as j,KH as E,dF as Ue,v3 as Ve,uT as N,uU as $,v9 as xe,uY as q,vf as ze,KI as Ge,KJ as Ye,KK as He,KL as Ne,KM as $e,f1 as qe,e$ as Ze}from"./zeni-epic-state-DxVQhBoO.js";import{M as Je,N as Qe,T as Xe,U as We,X as ea,a as ee,G as P,z as ae,Y as aa,I as sa,c as ta,Z as oa,$ as na,s as ra,d as M,f as ia,a0 as la,q as se,a1 as ca,a2 as da,a3 as pa}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import fa from"./NotFoundScreen-D6Lk-Xx8.js";import{F as ma}from"./FeaturePreviewScreen-BRif0RC-.js";import{a as _}from"./sentry-DwScFzsh.js";import{u as ua}from"./useInitialThreadRequest-BDy3pY5w.js";import{t as Z,a as J,b as _a}from"./routePaths-Db_F8Q8U.js";import{M as ha}from"./MobileAppDrawer-BpqQJOt0.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="ddcd76b3-99a2-4b2d-b1f9-483c19bf816d",e._sentryDebugIdIdentifier="sentry-dbid-ddcd76b3-99a2-4b2d-b1f9-483c19bf816d")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e(Ne()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=ke(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return J(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(k({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ke({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(W())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>L(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),K=d(n=>Q(n)),O=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),A=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(F(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(W());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,A,h,K,O]);const U=sa(),de=U?.loggedInUserRole!=null&&Fe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),V=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Je(he??"")==="reports",be=Qe(_e),ye=_.useMemo(()=>x?ba:void 0,[x]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:V}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:K,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=qe(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-Bi6jUyhM.js";import{a as x,z as w,aN as y,s as E,d as p,f as F,cQ as R,G as L}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import l from"./NotFoundScreen-D6Lk-Xx8.js";import{a as d}from"./sentry-DwScFzsh.js";import{u as P,j as b,h as T,g as U,n as V,o as z,p as u}from"./core-BQch-SEa.js";import{eS as A,Ri as C,NU as G,Rj as _,uK as Y,f7 as K,Rk as O,uI as Q}from"./zeni-epic-state-DxVQhBoO.js";import{R as j}from"./ReferralListScreen-BEpm9VKl.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";import"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import"./MobileAppDrawer-BpqQJOt0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="91b1e5ea-ac3d-4711-989a-02ab9edc168d",a._sentryDebugIdIdentifier="sentry-dbid-91b1e5ea-ac3d-4711-989a-02ab9edc168d")}catch{}})();const q=V(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{a(_()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(Q())},onUpdateInviteFormLocalData:s=>{a(O({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(R),B=()=>{const a=P(),[t,n]=d.useState(!1),[o,s]=d.useState(!1),r=b(i=>A(i)),c=T(),k=U(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),N=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),v=G(S);d.useEffect(()=>{a(_()),r?.rewardsLastViewedTime==null&&o===!1&&(a(Y()),s(!0))},[]),d.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),a(K(!0)))},[m.fetchState,a]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[m.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:i=>(I=>I.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,e.jsx(q,{navigate:c,location:k,currentTenant:r,companyName:D,userName:N,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:v.maxAnnualPercentageYield})]})};function ua(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(L.isReferralFeatureEnabled);return e.jsxs(z,{children:[e.jsx(u,{path:"/",element:t?e.jsx(j,{}):e.jsx(l,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(l,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(l,{})}),e.jsx(u,{path:"*",element:e.jsx(l,{})})]})}export{ua as default};
|