@zeniai/web-app-ui 5.0.84-next → 5.0.84-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-lDTxn41O.js +1 -0
- package/dist/assets/{AddressScreen-BdTbwDut.js → AddressScreen-Dyt-e5Sw.js} +1 -1
- package/dist/assets/{AiCfoScreen-CsD5gyxi.js → AiCfoScreen-Cdtw_1Zb.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-kXs4Iw-X.js → BillPayApprovalRoutes-DI74Pl1P.js} +1 -1
- package/dist/assets/{BillPayRoutes-CBDzPMwl.js → BillPayRoutes-fIF3GcNQ.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BhCwzVNX.js → BusinessVerificationPageScreen-rhH_ViA7.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CSQvI31U.js → ChargeCardRoutes-DlGkVXkz.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DxsYL2I_.js → CompanyPassportScreen-BHLP39yF.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-0mTcWPG0.js → ConnectionAuthScreen-YCkWtPEM.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BkbGTJ6t.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-XnmH2B6s.js → CustomerOnboardingRoutes-CF-jgfgx.js} +1 -1
- package/dist/assets/{DashboardRoutes-C8wYH_YA.js → DashboardRoutes-Bhtsh3Cg.js} +1 -1
- package/dist/assets/{DefaultTenantHome-C5pJI2Lo.js → DefaultTenantHome-C19lsA0P.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-4LZgH9ie.js → DomesticWireDetailScreen-CBBXnakn.js} +1 -1
- package/dist/assets/{DrawerScreen-B-BpIiB7.js → DrawerScreen-Cey7svvC.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CW7PvDPa.js → EntityDetailRoutes-CkZOmVEE.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-mjRibJdg.js → ExpenseAutomationRoutes-DDamv2b3.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DEXepmA1.js → FeaturePreviewScreen-BUs0X1Nl.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-Ijb6ipto.js → HubSpotOAuthCallbackScreen-DjqbNKmA.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-qOUJbSz5.js → MagicLinkRoutes-BpVzSapZ.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-DrOt2qdG.js → MagicLinkSignInScreen-CDwoh5xe.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BHK8yJfs.js → MobileAppDrawer-DZt5Bg21.js} +1 -1
- package/dist/assets/NotFoundScreen-BI1i4Koo.js +1 -0
- package/dist/assets/{NotificationRoutes-CU1wjSAN.js → NotificationRoutes-BdlmxmI3.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CmA-biZ5.js → OAuthConsentScreen-Ds2JrGUX.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BPx9_LWG.js → PandLWithForecastRoutes-Dt8Fb-dI.js} +1 -1
- package/dist/assets/{PeopleRoutes-dKI-Lfcm.js → PeopleRoutes-B6VjdJ_7.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Ckmm8Zw2.js → PerformanceRoutes-CJQI6k3c.js} +1 -1
- package/dist/assets/{Preview-BtVQPFVc.js → Preview-vy0ThKJV.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CEhvcqiP.js → QBOConnectionScreen-ZOo9grds.js} +1 -1
- package/dist/assets/{ReferralListScreen-v8CvSJKV.js → ReferralListScreen-D54cIUVh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DKasfG0g.js → ReimbursementApprovalRoutes-BgRk4DKh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DOOPQcBp.js → ReimbursementApprovalRuleDetailScreen-PeP1uble.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DHBx5Z8q.js → ReimbursementRoutes-kV7nhQ0O.js} +1 -1
- package/dist/assets/{ReportsRoutes-0915Lg22.js → ReportsRoutes-CBik5eJJ.js} +1 -1
- package/dist/assets/{RewardsRoutes-qEhGhIpt.js → RewardsRoutes-DXDZs_PN.js} +1 -1
- package/dist/assets/{ScreenRoutes-Cf6BLnxe.js → ScreenRoutes-B_Qxu2uj.js} +2 -2
- package/dist/assets/{SettingsRoutes-CR4ou0OA.js → SettingsRoutes-XyBwhYze.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D0MqzyQZ.js → SetupPagesScreen-DsKyawAu.js} +1 -1
- package/dist/assets/{SignInScreen-Bjajd8iM.js → SignInScreen-CvIkMtzz.js} +1 -1
- package/dist/assets/{SignOutScreen-CdzE7Gsd.js → SignOutScreen-3WSCxpjz.js} +1 -1
- package/dist/assets/{TaskListScreen-CgVDM-e4.js → TaskListScreen-DAta-PR0.js} +1 -1
- package/dist/assets/{TaskRoutes-ClS-olWN.js → TaskRoutes-B3ORVF20.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-u9xucaQz.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BkPcTct0.js → TransactionDetailScreen-DVRZvMtX.js} +1 -1
- package/dist/assets/{TransactionListRoutes-wGd3gZl_.js → TransactionListRoutes-Dle9nqfW.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BQwEmAWC.js → TreasuryRoutes-CMFi-bPM.js} +1 -1
- package/dist/assets/{VendorsRoutes-CpM9WlHg.js → VendorsRoutes-ChSZemXg.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-D_kLoPBn.js → WiseConfirmationScreen-DTgB_maV.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DSHIYdD5.js → ZeniAccountRoutes-c1CLrByv.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DFuQu0bl.js → ZeniAccountStatementScreen-D3cHEmjH.js} +1 -1
- package/dist/assets/{accountMappingHelper-rWBaknmF.js → accountMappingHelper-CwMdlrqi.js} +1 -1
- package/dist/assets/{analytics-otXu4U7I.js → analytics-BpS0L595.js} +1 -1
- package/dist/assets/{analyticsHelper-D9LeQd1D.js → analyticsHelper-CpuJeNSE.js} +1 -1
- package/dist/assets/{core-BnUcUCx4.js → core-BBe-_QBz.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-GjhJ40F1.js → decodeURIComponentSafe-Cc6x5HAs.js} +1 -1
- package/dist/assets/{dnd-CVVCAiHP.js → dnd-BFTjjj21.js} +1 -1
- package/dist/assets/{empty-Njxwqkyc.js → empty-CNE73hwg.js} +1 -1
- package/dist/assets/{empty-BitP6n7J.js → empty-D81L0ekk.js} +1 -1
- package/dist/assets/{emptyVideoElement-BjHG4hnA.js → emptyVideoElement-g-1e8yEi.js} +1 -1
- package/dist/assets/{epic-CHFd51rU.js → epic-ougKagB4.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DIhK2jHM.js → getLocaleForTenant-Ce5hBqx6.js} +1 -1
- package/dist/assets/{index-HnMSHJZB.js → index-4IaA8uy5.js} +2 -2
- package/dist/assets/{index-DVIMUqkd.js → index-BWvljkzQ.js} +1 -1
- package/dist/assets/{index-C9RPD0XQ.js → index-C-dwxB1h.js} +1 -1
- package/dist/assets/{index-BhzmIx2h.js → index-CEj8yJ8u.js} +13141 -13141
- package/dist/assets/{index-BO0tlyfW.js → index-CK03iZqw.js} +1 -1
- package/dist/assets/{index-CceyLn_3.js → index-D87tXmnv.js} +1 -1
- package/dist/assets/{index-Dzj4v1TG.js → index-FPyzOmTZ.js} +1 -1
- package/dist/assets/{index-COn-1mFe.js → index-u8Ufwumh.js} +1 -1
- package/dist/assets/{lexical-BGVaoT-2.js → lexical-D5bdSeI9.js} +1 -1
- package/dist/assets/{liveblocks-CfWmBDhA.js → liveblocks-B5FJske4.js} +1 -1
- package/dist/assets/{lottie-mKEiisQw.js → lottie-CRFyZrVt.js} +1 -1
- package/dist/assets/{mui-BhmCpgpY.js → mui-CtxKv_KJ.js} +1 -1
- package/dist/assets/{pathToGoBack-Dnrr8ct_.js → pathToGoBack-q0BEUMC-.js} +1 -1
- package/dist/assets/{pdf-C8aW9JBP.js → pdf-WhS_jXge.js} +4 -4
- package/dist/assets/{pdf-lib-D1eqHSXt.js → pdf-lib-CLZErFCX.js} +1 -1
- package/dist/assets/{plaid-z-SL-Ktw.js → plaid-Bbc2Tvhb.js} +1 -1
- package/dist/assets/{pusher-DC-sMXLg.js → pusher-Daj9ErOa.js} +1 -1
- package/dist/assets/{react-Dfbuyxx8.js → react-Beg4NTaB.js} +1 -1
- package/dist/assets/{react-B7bvvV4V.js → react-CNyb6-at.js} +1 -1
- package/dist/assets/{react-Ck-HMVPl.js → react-CraP4uOi.js} +1 -1
- package/dist/assets/{react-B1GSiPLD.js → react-D1sNebLE.js} +1 -1
- package/dist/assets/{react-VXLEyToT.js → react-DlYkEFWc.js} +1 -1
- package/dist/assets/{react-D3Kcw-jX.js → react-YNOn5qsh.js} +1 -1
- package/dist/assets/{recharts-CwFwTNLw.js → recharts-Cm6gajjf.js} +1 -1
- package/dist/assets/{routePaths-C5SGWUUT.js → routePaths-aPvoEAev.js} +1 -1
- package/dist/assets/{sentry-eW5i7BSz.js → sentry-m8bSareJ.js} +1 -1
- package/dist/assets/{url-COA5Km90.js → url-O1SK7Opc.js} +1 -1
- package/dist/assets/{url-I9d4lsBZ.js → url-uqag3SRL.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BVmrI2ba.js → useAskAiCfoHostNavButtonProps-CcOQZT7p.js} +1 -1
- package/dist/assets/{useDeviceId-DBW0_Kmu.js → useDeviceId-C4LoFhAe.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-CSHGGGqT.js → useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C0EqGUV0.js → useInitialThreadRequest-BPwolmWD.js} +1 -1
- package/dist/assets/{utils-mMbzRt9j.js → utils-Bxlsja9u.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-RuqXxoCN.js → withTransactionSidePanel-CS7Mi091.js} +1 -1
- package/dist/assets/{zeni-epic-state-Fol4969u.js → zeni-epic-state-D_CxYJSW.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-B_avrhG7.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-B8As06bL.js +0 -1
- package/dist/assets/NotFoundScreen-CRViDtTD.js +0 -1
- package/dist/assets/TransactionDetailRoutes-BM8P_l4N.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-B5FJske4.js";import{a as g}from"./sentry-m8bSareJ.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-BBe-_QBz.js";import{z as r,m as P,D as V,f as A,e as J,g as N,H as R,B as q,h as B}from"./index-CEj8yJ8u.js";import{eQ as H,IS as Q,J0 as W,IT as Y,eR as $,fk as G,IY as K,fJ as X,cU as Z,J1 as ee,J2 as te}from"./zeni-epic-state-D_CxYJSW.js";import{n as ne}from"./mui-CtxKv_KJ.js";import{u as se}from"./useDeviceId-C4LoFhAe.js";import{f as ae}from"./analyticsHelper-CpuJeNSE.js";import{t as ie}from"./getLocaleForTenant-Ce5hBqx6.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="2032468d-8272-4175-8a60-6fba06085db1",t._sentryDebugIdIdentifier="sentry-dbid-2032468d-8272-4175-8a60-6fba06085db1")}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),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>H(e)),b=l(e=>Q(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(W(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(Y(b.tenantsInOrder),s.zeniSessionId),$(s.userId,s.zeniSessionId,o.tenantId),t(G(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),X().then(()=>{const e=B();e!=null&&A(e)}),setTimeout(()=>{J.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,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(h==="Completed"&&d!=null)return u.jsx(R,{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||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{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 P}from"./liveblocks-
|
|
1
|
+
import{j as P}from"./liveblocks-B5FJske4.js";import{a as c}from"./sentry-m8bSareJ.js";import{h as be,g as s,l as qe,u as Ke,j as ea,i as M}from"./core-BBe-_QBz.js";import{eQ as he,eX as aa,eY as Se,eS as ta,bn as na,f5 as sa,eZ as oa,e_ as ia,f0 as ra,f3 as da,fd as la,f4 as g,f7 as ca,f8 as ue,fb as ua,f9 as fa,fa as ma,fc as pa,cJ as ba,ff as ha,cP as Sa,bv as ga,eP as Ea,fk as ka,fl as Ca,fj as ya}from"./zeni-epic-state-D_CxYJSW.js";import{a3 as Ia,a4 as Ta,v as wa,y as _a,z as k,Z as Aa,a5 as Fa,T as Da,w as va,u as $a,S as r,a6 as Ba,a7 as Ga,d as xa,a as Ma,a8 as Ra,Y as Na,a9 as Pa,aa as Ua,ab as fe,ac as me,L as Va,ad as Oa,ae as pe,e as R,r as _,W as ja,af as N,ag as La}from"./index-CEj8yJ8u.js";import{D as Ya}from"./mui-CtxKv_KJ.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="e709cffe-d01d-4a4f-adde-9e0dcc01b75a",m._sentryDebugIdIdentifier="sentry-dbid-e709cffe-d01d-4a4f-adde-9e0dcc01b75a")}catch{}})();const za=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Ke(),C=wa(),o=ea(),U=ta(),p=be(),{useFeatureGate:i}=_a(),V=k.getSignedInUser(),A=na(V),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),j=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,Y=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:z}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:we}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&p(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),_e=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabledV2),Q=J||W&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:xe}=i(r.isTaskManagerCustomerUserAccessEnabled),Me=A||!A&&xe,Re=n.company!=null&&la(n.company),w=Ge&&Re,Ne=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),X=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=Ga();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&U.tenantId!=null&&p(ca("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||p(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(p(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),p(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Pe,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),z===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const je=xa(),oe=s(e=>fa(e,S,h,J,W,w).fetchState),ie=s(e=>ma(e).fetchState),Le=D&&(oe==="Completed"||oe==="Error")||Y&&(ie==="Completed"||ie==="Error")||!D&&!Y?void 0:"disabled",Ye=c.useMemo(()=>pa(n.userRole),[n.userRole]),ze=ba(Ye),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ma(),We=re&&Ra(t),de=Sa(je?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[Je,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Pa(Qe);return P.jsx(Ya,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:P.jsx(Ua,{signedInUser:V,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?_e:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Le,isSettings:me(t),isSettingsFeatureEnabled:we,isVendorsTabVisible:ze,isZeniAccountEnabled:z,isChargeCardEnabled:Te,isTreasuryEnabled:w,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:Je,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:Q&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=X===0&&q>0?"notifications/comments":"notifications/tasks";me(t)&&(e=X===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=_(t.state?.pathnameStackToGoBack,t.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(ja(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=La(e.type);pe(e.type)?(j!=null&&p(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Oa(l)?b+="settings/my_profile":pe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(p(ka(e.tenantId)),p(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;R.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:We,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{p(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Me,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=be(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return P.jsx(za,{...m,...t})};export{qa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-B5FJske4.js";import{j as i,k as n}from"./core-BBe-_QBz.js";import{Q as e}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import"./sentry-m8bSareJ.js";import"./zeni-epic-state-D_CxYJSW.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="38433470-5748-45c8-9d22-f3cba6aaf7d5",o._sentryDebugIdIdentifier="sentry-dbid-38433470-5748-45c8-9d22-f3cba6aaf7d5")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function h(){const o=i();return r.jsx(a,{navigate:o})}export{h 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-B5FJske4.js";import lt from"./NotFoundScreen-BI1i4Koo.js";import{a as k}from"./sentry-m8bSareJ.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as X}from"./core-BBe-_QBz.js";import{cr as St,eZ as z,eQ as H,fc as bt,f4 as b,Pl as Z,f8 as d,eY as y,qC as M,vX as It,Pm as Ct,eX as Tt,ff as yt,qH as Et,Pn as $,bq as F,gO as x,qL as Y,Po as _t,cC as At,cw as Nt}from"./zeni-epic-state-D_CxYJSW.js";import{U as Bt,z as wt,y as xt,S as Pt,ct as Rt,r as N,a3 as vt,cu as Dt,a4 as Ut,k as Gt}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{c as Ft}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="a91df91f-4758-4f17-9080-14a6d2ef2992",t._sentryDebugIdIdentifier="sentry-dbid-a91df91f-4758-4f17-9080-14a6d2ef2992")}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=z(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:P}=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(Y("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));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(Z(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 P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Y("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t($([r],F())))})).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($(s,F())),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=Gt(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}})}}})(vt(Dt)),qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,P]=k.useState(!1),a=S(e=>z(e)),o=S(e=>H(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ft({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),K=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=Rt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:V,isLoading:L,fetchMore:W,isFetchingMore:O,hasFetchedAll:Q}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(q!==i&&i!=null&&s(Z(i)),i==null){const e=`../${q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(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||D===!0||C!==!0||E||D===!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&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(E===!1&&L===!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 G=V.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(O||Q===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,D,O,C,Q,L,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ut(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:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return A.jsxs(gt,{children:[A.jsx(X,{path:"/:selectedTab",element:A.jsx(qt,{})}),A.jsx(X,{path:"*",element:A.jsx(lt,{})})]})}export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-B5FJske4.js";import{a as r}from"./sentry-m8bSareJ.js";import{h as A,u as J,g as o,N as j}from"./core-BBe-_QBz.js";import{Jf as x,eQ as C,f3 as P,Jg as z,Jh as D,Ji as M,Jj as R,mx as k,Ib as L}from"./zeni-epic-state-D_CxYJSW.js";import{z as h,J as I}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="f18f55df-3deb-454f-9aac-9f12df325a52",n._sentryDebugIdIdentifier="sentry-dbid-f18f55df-3deb-454f-9aac-9f12df325a52")}catch{}})();function ee(){const n=A(),a=J(),{params:t,error:i}=r.useMemo(()=>x(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o(e=>C(e)),l=o(e=>P(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),u=o(M),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))},[f,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,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(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-BPx9_LWG.js → PandLWithForecastRoutes-Dt8Fb-dI.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-B5FJske4.js";import{j as Q,h as Y,u as z,l as Z,g as d,k as H,n as K,o as I}from"./core-BBe-_QBz.js";import{eQ as R,qq as P,p_ as X,JO as v,pV as S,bv as ee,bn as ae,bT as te,pW as se,JP as oe,JA as C,dE as re,tU as ne,JQ as ce,uf as ie,eW as le,eU as de}from"./zeni-epic-state-D_CxYJSW.js";import{z as me,U as fe,d as pe,y as M,S as $,A as ue,e as w,al as he,r as ge}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import Fe from"./NotFoundScreen-BI1i4Koo.js";import{F as be}from"./FeaturePreviewScreen-BUs0X1Nl.js";import{a as g}from"./sentry-m8bSareJ.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{u as Se}from"./useInitialThreadRequest-BPwolmWD.js";import{t as Te}from"./routePaths-aPvoEAev.js";import{M as ye}from"./MobileAppDrawer-DZt5Bg21.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="ffac67e5-46ee-4714-8d56-4a3b6f717ec7",s._sentryDebugIdIdentifier="sentry-dbid-ffac67e5-46ee-4714-8d56-4a3b6f717ec7")}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})}},Ae=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},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(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(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,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function O(){const s=Q(),e=Y(),a=z(),{forecastId:o,tenantEmailDomain:r}=Z(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>R(t)),W=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),A=d(t=>t.profitAndLossState),k=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:_}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,U)=>L!=null?f.forecasts.findIndex(b=>b.id===L):U!=null?f.forecasts.findIndex(b=>b.id===U):f.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(i.forecasts[t].id,t)),T(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(S(i.forecasts[t].id))}},[c,p,e,l,i,m,u,P,S,F]);const D=pe(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=M(),{isFeatureEnabled:E}=N($.isReportsCommentingEnabled),V=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,J]=g.useState(!1),j=t=>{J(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(Ae,{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:q,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:V,onClickMenuIcon:()=>{j(!0)}})]})}function Qe(){const s=d(c=>R(c)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Qe as PandLWithForecastRoutes,Qe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B5FJske4.js";import{JJ as te,eQ as X,jC as H,eW as Q,eU as ne,H8 as Y,Jn as oe,t0 as Ee,JK as N,sQ as ke,t9 as Ie,t3 as ie,sU as re,t7 as Pe,t4 as je,JL as le,uG as Le,JM as Te,fz as ve,JN as J,sZ as de,sX as ce,tc as Fe,c2 as Ae}from"./zeni-epic-state-D_CxYJSW.js";import{Z as pe,y as q,S as E,z as K,a6 as ue,I as me,ah as ge,ai as Re,F as he,o as R,O as fe,D as Ce,aj as Oe,U as Ve,A as Ue,e as be,g as Ze,r as Be,ak as $e,d as Je}from"./index-CEj8yJ8u.js";import{D as ye,n as M,S as we}from"./mui-CtxKv_KJ.js";import se from"./NotFoundScreen-BI1i4Koo.js";import{a as r}from"./sentry-m8bSareJ.js";import{h as ee,l as ze,g as m,j as Ge,u as He,k as Ke,n as ae,o as $}from"./core-BBe-_QBz.js";import{u as Me}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{c as We}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{M as _e}from"./MobileAppDrawer-DZt5Bg21.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="f206d67c-2207-4f50-8107-ff2542c96009",s._sentryDebugIdIdentifier="sentry-dbid-f206d67c-2207-4f50-8107-ff2542c96009")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>X(e)),D=m(e=>H(e)),{useFeatureGate:f}=q(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),T=ne(u),v=Y(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.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:a.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(Se,{children:z.discardTitle}),descriptionComponent:a.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:i,isEditPopup:!0}):null,a.jsx(Re,{...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-B5FJske4.js";import E from"./NotFoundScreen-BI1i4Koo.js";import{a as r}from"./sentry-m8bSareJ.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-BBe-_QBz.js";import{eQ as B,Pp as b,bo as F,bn as N,hi as V,gO as Q}from"./zeni-epic-state-D_CxYJSW.js";import{v as $,z as I,cv as q}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{c as H}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{M as J}from"./MobileAppDrawer-DZt5Bg21.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="8dfe1d32-bea6-4a02-833c-d7cdf6899d57",e._sentryDebugIdIdentifier="sentry-dbid-8dfe1d32-bea6-4a02-833c-d7cdf6899d57")}catch{}})();const K=O(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),L=()=>{const e=_(),t=v(),d=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=S||k||x,c=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(Q({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"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return H({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-m8bSareJ.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-B5FJske4.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-m8bSareJ.js";import{L as dt,bT as Tc,eQ as Ac,IS as Rc,Jk as kl,c2 as Tl,fk as Al,fl as Rl}from"./zeni-epic-state-D_CxYJSW.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-Bxlsja9u.js";import{r as un}from"./empty-D81L0ekk.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CLZErFCX.js";import{r as Gl}from"./index-D87tXmnv.js";import{r as zl}from"./index-FPyzOmTZ.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-BBe-_QBz.js";import{u as Kl,z as Pc,L as Wl,K as Jl,M as Xl,j as Ql,e as tf}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import{d as Pe}from"./decodeURIComponentSafe-Cc6x5HAs.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]="8d40d024-db4d-4e51-ae03-f9d46a7b3f27",t._sentryDebugIdIdentifier="sentry-dbid-8d40d024-db4d-4e51-ae03-f9d46a7b3f27")}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-B5FJske4.js";import{a as o}from"./sentry-m8bSareJ.js";import{g as f,j as F,h as _,u as H,k as M}from"./core-BBe-_QBz.js";import{m as V,Z as W,z as R,b3 as U,F as N,U as $,A as z,e as l,g as K,a3 as Q,b4 as Z}from"./index-CEj8yJ8u.js";import{e_ as q,eQ as G,Mc as P,Md as J,tK as X,tA as g,f0 as Y,bO as ee,tF as re,Me as ae}from"./zeni-epic-state-D_CxYJSW.js";import{D as ne,e as te,n as se,S as oe}from"./mui-CtxKv_KJ.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{M as de}from"./MobileAppDrawer-DZt5Bg21.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]="f65240db-b59c-4436-be8e-5373be5d0629",e._sentryDebugIdIdentifier="sentry-dbid-f65240db-b59c-4436-be8e-5373be5d0629")}catch{}})();const ce={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=V(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:a.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
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-B5FJske4.js";import R from"./NotFoundScreen-BI1i4Koo.js";import{a as p}from"./sentry-m8bSareJ.js";import{j as C,u as I,h as A,g as l,N as E,k,n as D,o as u}from"./core-BBe-_QBz.js";import{eQ as N,N6 as g,Nm as S,CH as T,BQ as V,CG as m,Cx as U,NC as _}from"./zeni-epic-state-D_CxYJSW.js";import{m as $,z as B,x as O,a3 as Q,bJ as W,ac as z}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-PeP1uble.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]="5b634807-731f-4412-9c63-c94fca0d0cbc",e._sentryDebugIdIdentifier="sentry-dbid-5b634807-731f-4412-9c63-c94fca0d0cbc")}catch{}})();const d="reimbursement-approval-rule-update",G=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:c}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{z(c)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(Q(W)),H=()=>{const e=C(),r=I(),a=A(),[c,s]=p.useState(!1),[f,y]=p.useState(!1),b=l(n=>n.remiSetupApproverViewState.fetchState),o=l(n=>N(n)),w=$(),i=l(n=>g(n)),h=l(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{c||b!=="Not-Started"||(s(!0),a(V(!0)))},[c,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(m())),e("./new"))},[f,i,a]);const x={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,J,j)=>{n.endsWith(d)&&j.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(O,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(G,{currentTenant:o,location:r,navigate:e,...x})};function Z(){return t.jsxs(D,{children:[t.jsx(u,{path:"/",element:t.jsx(H,{})}),t.jsx(u,{path:"/new",element:t.jsx(v,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(u,{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-B5FJske4.js";import{a as y}from"./sentry-m8bSareJ.js";import{j as A,h as w,u as C,l as T,g as b,k as U}from"./core-BBe-_QBz.js";import{Nm as R,N6 as E,CA as x,CJ as _,CH as S,CI as h,Nn as k}from"./zeni-epic-state-D_CxYJSW.js";import{z as B,m as N,x as V,bA as j,ac as F}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.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]="6212639a-fc28-4d90-b500-c41ea2b0c885",e._sentryDebugIdIdentifier="sentry-dbid-6212639a-fc28-4d90-b500-c41ea2b0c885")}catch{}})();function O(e){return k(e)==null}const $=U(function(e,a){const t=R(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 c=p=>{const m=[];return p.forEach(u=>{const D=u.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(d=>{const f=!!O(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),v=D.concat(I);m.push({action:u.stepType.selectedOption,actors:v,operator:v.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),m};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:c(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:c(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=C(),{approvalRuleId:s}=T(),n=B.getSignedInUser(),l=N(),r=b(p=>R(p)),i=b(p=>E(p)),[o,c]=y.useState(!1);if(y.useEffect(()=>{o||(c(!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($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,O as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CfWmBDhA.js";import{j as J,h as re,u as H,l as Q,g as E,N as M,k as K,i as mt,n as ct,o as k}from"./core-BnUcUCx4.js";import{eQ as V,ND as le,c2 as me,BL as Be,jN as dt,BY as ne,BX as ae,NE as ut,bn as ce,fK as Te,NF as pt,J_ as bt,jC as De,J$ as Se,K0 as gt,ix as ht,MU as ft,iM as St,Bz as It,so as yt,iE as Rt,Cj as je,NG as Fe,NH as At,NI as Ct,NJ as vt,NK as kt,NL as Et,C3 as Ie,iS as wt,N1 as xt,BZ as Bt,BJ as Tt,NM as Dt,BI as jt,NN as Ft,BR as ye,C7 as Ut,C6 as Lt,C2 as Nt,NO as Ue,H8 as Pt,bo as $t,BU as Mt,CB as _t,NP as Ot,NQ as zt,Cf as Gt,Cc as Re,Mn as Zt,BG as Ht,NR as Le,C_ as Ae,D6 as Vt,NS as Wt,NT as G,NU as Jt,NV as Ne,NW as Kt,NX as Pe,NY as $e,Cr as se,bt as qt,bG as de,cC as ue,eW as Me,eU as _e,NZ as Xt,gO as Qt,MA as Yt,N_ as en,N$ as Oe,ME as tn,Nm as nn,O0 as an,NC as sn,D3 as Ce,D2 as on,O1 as rn,O2 as ln,O3 as mn,O4 as cn,O5 as dn,N7 as un,CV as pn,CZ as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,IU as yn,cN as Rn,cP as An,cO as Cn,cw as vn}from"./zeni-epic-state-Fol4969u.js";import{v as ze,Z as Ge,y as Y,S as C,z as P,bK as Ze,A as ee,e as v,aE as ve,o as j,aq as X,I as kn,D as He,bL as En,r as Z,bM as wn,d as te,bN as xn,U as Bn,F as Tn,x as pe,g as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-BhzmIx2h.js";import{n as _,S as Nn}from"./mui-BhmCpgpY.js";import ie from"./NotFoundScreen-CRViDtTD.js";import{S as ke}from"./SetupPagesScreen-D0MqzyQZ.js";import{F as Je}from"./FeaturePreviewScreen-DEXepmA1.js";import{a as f}from"./sentry-eW5i7BSz.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BVmrI2ba.js";import{u as Ke}from"./useInitialThreadRequest-C0EqGUV0.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-CSHGGGqT.js";import{D as Pn}from"./DrawerScreen-B-BpIiB7.js";import{M as Xe}from"./MobileAppDrawer-BHK8yJfs.js";import{R as $n}from"./ReimbursementApprovalRoutes-DKasfG0g.js";import{FallBackRoute as Mn}from"./ScreenRoutes-Cf6BLnxe.js";import"./recharts-CwFwTNLw.js";import"./analytics-otXu4U7I.js";import"./plaid-z-SL-Ktw.js";import"./dnd-CVVCAiHP.js";import"./stripe-DMRn4zHo.js";import"./lottie-mKEiisQw.js";import"./lexical-BGVaoT-2.js";import"./pdf-C8aW9JBP.js";import"./utils-mMbzRt9j.js";import"./analyticsHelper-D9LeQd1D.js";import"./routePaths-C5SGWUUT.js";import"./BusinessVerificationPageScreen-BhCwzVNX.js";import"./ReimbursementApprovalRuleDetailScreen-DOOPQcBp.js";import"./getLocaleForTenant-DIhK2jHM.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]="b365c7cc-9473-4f79-8835-7bea9d6ec7c2",e._sentryDebugIdIdentifier="sentry-dbid-b365c7cc-9473-4f79-8835-7bea9d6ec7c2")}catch{}})();const Qe=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:L}}}=He.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(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 T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(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:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(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(ye(!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(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({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(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Ct({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Qe(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(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(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=J(),t=re(),n=H(),{reimbursementId:r}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(C.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,D=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Ke(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==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"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ze,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({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:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({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:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-B5FJske4.js";import{j as J,h as re,u as H,l as Q,g as E,N as M,k as K,i as mt,n as ct,o as k}from"./core-BBe-_QBz.js";import{eQ as V,ND as le,c2 as me,BL as Be,jN as dt,BY as ne,BX as ae,NE as ut,bn as ce,fK as Te,NF as pt,J_ as bt,jC as De,J$ as Se,K0 as gt,ix as ht,MU as ft,iM as St,Bz as It,so as yt,iE as Rt,Cj as je,NG as Fe,NH as At,NI as Ct,NJ as vt,NK as kt,NL as Et,C3 as Ie,iS as wt,N1 as xt,BZ as Bt,BJ as Tt,NM as Dt,BI as jt,NN as Ft,BR as ye,C7 as Ut,C6 as Lt,C2 as Nt,NO as Ue,H8 as Pt,bo as $t,BU as Mt,CB as _t,NP as Ot,NQ as zt,Cf as Gt,Cc as Re,Mn as Zt,BG as Ht,NR as Le,C_ as Ae,D6 as Vt,NS as Wt,NT as G,NU as Jt,NV as Ne,NW as Kt,NX as Pe,NY as $e,Cr as se,bt as qt,bG as de,cC as ue,eW as Me,eU as _e,NZ as Xt,gO as Qt,MA as Yt,N_ as en,N$ as Oe,ME as tn,Nm as nn,O0 as an,NC as sn,D3 as Ce,D2 as on,O1 as rn,O2 as ln,O3 as mn,O4 as cn,O5 as dn,N7 as un,CV as pn,CZ as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,IU as yn,cN as Rn,cP as An,cO as Cn,cw as vn}from"./zeni-epic-state-D_CxYJSW.js";import{v as ze,Z as Ge,y as Y,S as C,z as P,bK as Ze,A as ee,e as v,aE as ve,o as j,aq as X,I as kn,D as He,bL as En,r as Z,bM as wn,d as te,bN as xn,U as Bn,F as Tn,x as pe,g as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-CEj8yJ8u.js";import{n as _,S as Nn}from"./mui-CtxKv_KJ.js";import ie from"./NotFoundScreen-BI1i4Koo.js";import{S as ke}from"./SetupPagesScreen-DsKyawAu.js";import{F as Je}from"./FeaturePreviewScreen-BUs0X1Nl.js";import{a as f}from"./sentry-m8bSareJ.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import{u as Ke}from"./useInitialThreadRequest-BPwolmWD.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{D as Pn}from"./DrawerScreen-Cey7svvC.js";import{M as Xe}from"./MobileAppDrawer-DZt5Bg21.js";import{R as $n}from"./ReimbursementApprovalRoutes-BgRk4DKh.js";import{FallBackRoute as Mn}from"./ScreenRoutes-B_Qxu2uj.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.js";import"./analyticsHelper-CpuJeNSE.js";import"./routePaths-aPvoEAev.js";import"./BusinessVerificationPageScreen-rhH_ViA7.js";import"./ReimbursementApprovalRuleDetailScreen-PeP1uble.js";import"./getLocaleForTenant-Ce5hBqx6.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]="b365c7cc-9473-4f79-8835-7bea9d6ec7c2",e._sentryDebugIdIdentifier="sentry-dbid-b365c7cc-9473-4f79-8835-7bea9d6ec7c2")}catch{}})();const Qe=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:L}}}=He.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(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 T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(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:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(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(ye(!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(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({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(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Ct({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Qe(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(je(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(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=J(),t=re(),n=H(),{reimbursementId:r}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{isFeatureEnabled:b}=l(C.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(C.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(C.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,D=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Ke(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||D&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const $=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==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"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ze,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(Zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({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:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({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:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,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-CfWmBDhA.js";import{u as z,j as ye,h as ge,l as Ce,g as d,k as we,n as Se,o as G}from"./core-BnUcUCx4.js";import{eQ as L,fa as w,Jl as Ie,jC as W,Jm as X,pU as F,jq as Te,iu as Re,to as K,pZ as Ae,bv as Fe,Jn as Oe,bn as ke,un as De,Jo as Ee,Jp as je,tg as Pe,Jq as Y,Jr as Le,Js as Me,Jt as Be,Ju as Je,Jv as S,Jw as O,Jx as k,Jy as H,Jz as D,JA as E,dE as Ue,u3 as ve,tT as N,tU as q,u9 as Ve,tY as $,uf as xe,JB as ze,JC as Ge,JD as Ye,JE as He,JF as Ne,eW as qe,eU as $e}from"./zeni-epic-state-Fol4969u.js";import{R as Ze,T as Qe,Z as We,y as ee,S as j,z as ae,U as Xe,d as Ke,a as ea,A as aa,e as P,g as sa,r as se,V as ta,W as oa,X as na}from"./index-BhzmIx2h.js";import"./mui-BhmCpgpY.js";import ra from"./NotFoundScreen-CRViDtTD.js";import{F as ia}from"./FeaturePreviewScreen-DEXepmA1.js";import{a as _}from"./sentry-eW5i7BSz.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-CSHGGGqT.js";import{u as fa}from"./useInitialThreadRequest-C0EqGUV0.js";import{t as Z,a as Q}from"./routePaths-C5SGWUUT.js";import{M as ma}from"./MobileAppDrawer-BHK8yJfs.js";import"./recharts-CwFwTNLw.js";import"./analytics-otXu4U7I.js";import"./plaid-z-SL-Ktw.js";import"./dnd-CVVCAiHP.js";import"./stripe-DMRn4zHo.js";import"./lottie-mKEiisQw.js";import"./lexical-BGVaoT-2.js";import"./pdf-C8aW9JBP.js";import"./utils-mMbzRt9j.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]="912c9068-2e7c-42f8-b32d-85d43f32810d",e._sentryDebugIdIdentifier="sentry-dbid-912c9068-2e7c-42f8-b32d-85d43f32810d")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(Ye()),e(He()),e(Ne())},ha=we(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=w(e),r=Oe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;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,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>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($({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($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(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(q(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({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(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=ge(),t=z(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?J?.companyId:void 0),C=d(n=>w(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),R=d(n=>X(n)),ie=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),A=d(n=>w(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,A,h,U,R]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Fe(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Ze(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=qe(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
|
|
1
|
+
import{j as p}from"./liveblocks-B5FJske4.js";import{u as z,j as ye,h as ge,l as Ce,g as d,k as we,n as Se,o as G}from"./core-BBe-_QBz.js";import{eQ as L,fa as w,Jl as Ie,jC as W,Jm as X,pU as F,jq as Te,iu as Re,to as K,pZ as Ae,bv as Fe,Jn as Oe,bn as ke,un as De,Jo as Ee,Jp as je,tg as Pe,Jq as Y,Jr as Le,Js as Me,Jt as Be,Ju as Je,Jv as S,Jw as O,Jx as k,Jy as H,Jz as D,JA as E,dE as Ue,u3 as ve,tT as N,tU as q,u9 as Ve,tY as $,uf as xe,JB as ze,JC as Ge,JD as Ye,JE as He,JF as Ne,eW as qe,eU as $e}from"./zeni-epic-state-D_CxYJSW.js";import{R as Ze,T as Qe,Z as We,y as ee,S as j,z as ae,U as Xe,d as Ke,a as ea,A as aa,e as P,g as sa,r as se,V as ta,W as oa,X as na}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import ra from"./NotFoundScreen-BI1i4Koo.js";import{F as ia}from"./FeaturePreviewScreen-BUs0X1Nl.js";import{a as _}from"./sentry-m8bSareJ.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import{u as fa}from"./useInitialThreadRequest-BPwolmWD.js";import{t as Z,a as Q}from"./routePaths-aPvoEAev.js";import{M as ma}from"./MobileAppDrawer-DZt5Bg21.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.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]="912c9068-2e7c-42f8-b32d-85d43f32810d",e._sentryDebugIdIdentifier="sentry-dbid-912c9068-2e7c-42f8-b32d-85d43f32810d")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(O({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(Ye()),e(He()),e(Ne())},ha=we(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=w(e),r=Oe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;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,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>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($({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($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(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(q(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(O({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(O({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(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=ge(),t=z(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?J?.companyId:void 0),C=d(n=>w(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),R=d(n=>X(n)),ie=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),A=d(n=>w(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(F(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(F(l.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,A,h,U,R]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Fe(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Ze(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=qe(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B5FJske4.js";import{y as w,z as j,aK as y,A as E,e as p,g as F,cF as P,S as L}from"./index-CEj8yJ8u.js";import"./mui-CtxKv_KJ.js";import l from"./NotFoundScreen-BI1i4Koo.js";import{a as u}from"./sentry-m8bSareJ.js";import{h as A,g as b,j as T,u as V,k as R,n as U,o as d}from"./core-BBe-_QBz.js";import{eQ as z,PY as C,MN as Y,PZ as _,tK as K,f0 as G,P_ as M,tI as O}from"./zeni-epic-state-D_CxYJSW.js";import{R as x}from"./ReferralListScreen-D54cIUVh.js";import"./recharts-Cm6gajjf.js";import"./analytics-BpS0L595.js";import"./plaid-Bbc2Tvhb.js";import"./dnd-BFTjjj21.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRFyZrVt.js";import"./lexical-D5bdSeI9.js";import"./pdf-WhS_jXge.js";import"./utils-Bxlsja9u.js";import"./useAskAiCfoHostNavButtonProps-CcOQZT7p.js";import"./useFetchSuggestedQuestionsWhenReady-BN9_cxVe.js";import"./MobileAppDrawer-DZt5Bg21.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]="cd130b35-c97e-4573-92ba-5ac437d5a45e",e._sentryDebugIdIdentifier="sentry-dbid-cd130b35-c97e-4573-92ba-5ac437d5a45e")}catch{}})();const Q=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),Z=()=>{const e=A(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=T(),k=V(),{useDynamicConfig:g}=w(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),v=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),S=Y(D);u.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(K()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(Q,{navigate:c,location:k,currentTenant:r,companyName:I,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:S.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=w(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Z,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};
|