@zeniai/web-app-ui 5.0.94-dev → 5.0.94-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-HF97OiuD.js → AddressRoutes-C4ikWgPo.js} +1 -1
- package/dist/assets/{AddressScreen-D79PPd-o.js → AddressScreen-BNN0XhH8.js} +1 -1
- package/dist/assets/{AiCfoScreen-CrvwqXvB.js → AiCfoScreen-Bg9ijLCA.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CHeXH92D.js → BillPayApprovalRoutes-BpV8hV9h.js} +1 -1
- package/dist/assets/{BillPayRoutes-BTV6oUW7.js → BillPayRoutes-BnNnXg6p.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-COhCODO3.js → BusinessVerificationPageScreen-fGxnzjnu.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-jlodpUTF.js → ChargeCardRoutes-Cxl-Dfno.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-oolpa5Ca.js → CompanyPassportScreen-6oghFs5-.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CmfFicXn.js → ConnectionAuthScreen-rIEFWD8p.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-dJPDlAs9.js → CustomerOnboardingAuthScreen-BYdpJPsr.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-Dc6Ovlz3.js → CustomerOnboardingRoutes-52j6GlB4.js} +1 -1
- package/dist/assets/{DashboardRoutes-BU1BeRRW.js → DashboardRoutes-BdO71Zfj.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Ch-_hudk.js → DefaultTenantHome-ChuSwEZz.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C4hZPJdB.js → DomesticWireDetailScreen-DT1-4XE1.js} +1 -1
- package/dist/assets/{DrawerScreen-Dhr1itui.js → DrawerScreen-ueiFgeV8.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DtAVASvN.js → EntityDetailRoutes-BDYJNo-V.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Dt21PcAV.js → ExpenseAutomationRoutes-BGsp6tOc.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-1ynGY-A8.js → FeaturePreviewScreen-C2KS_KpA.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DI3niet7.js → HubSpotOAuthCallbackScreen-BtWyS7u5.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CcECDB6W.js → MagicLinkRoutes-CiL3RYaJ.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-C-0tiAXs.js → MagicLinkSignInScreen-GKE3oNCV.js} +1 -1
- package/dist/assets/{MobileAppDrawer-D38LtL34.js → MobileAppDrawer-DFwRXpE0.js} +1 -1
- package/dist/assets/{NotFoundScreen-Dz0534r9.js → NotFoundScreen-C4a6Q5Lb.js} +1 -1
- package/dist/assets/{NotificationRoutes-B-vlIUTm.js → NotificationRoutes-TuKcUgWz.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CbMZbxsS.js → OAuthConsentScreen-ChC9fP6N.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-Z2m1-YQn.js → PandLWithForecastRoutes-CU7PJY2i.js} +1 -1
- package/dist/assets/{PeopleRoutes-B-Kt1ScJ.js → PeopleRoutes-CeW1yv_N.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BzPr2Nnu.js → PerformanceRoutes-COmcQAYA.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DiKCakpQ.js → QBOConnectionScreen-CNoF2iT1.js} +1 -1
- package/dist/assets/{ReferralListScreen-kpr6aOuh.js → ReferralListScreen-BaQmHM5w.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Det6cqdB.js → ReimbursementApprovalRoutes-mwgyiXL7.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js → ReimbursementApprovalRuleDetailScreen-DI_WfNSZ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DTIV_kcP.js → ReimbursementRoutes-B57Ww3xn.js} +1 -1
- package/dist/assets/{ReportsRoutes-3VuypKeW.js → ReportsRoutes-HX8_E7zU.js} +1 -1
- package/dist/assets/{RewardsRoutes-B2QW-eU5.js → RewardsRoutes-CszUbBSt.js} +1 -1
- package/dist/assets/{ScreenRoutes-0jsh5TOL.js → ScreenRoutes-BXmEXdCM.js} +2 -2
- package/dist/assets/{SettingsRoutes-BihUnYT-.js → SettingsRoutes-CvryzcuN.js} +1 -1
- package/dist/assets/{SetupPagesScreen-rBBoQAuI.js → SetupPagesScreen-Bap8l3lK.js} +1 -1
- package/dist/assets/{SignInScreen-DyfaUAWP.js → SignInScreen-C1Bdz5-O.js} +1 -1
- package/dist/assets/{SignOutScreen-B4hTTXUy.js → SignOutScreen-DjrE-8HT.js} +1 -1
- package/dist/assets/{TaskListScreen-B7mkcqsp.js → TaskListScreen-BgQVLwxs.js} +1 -1
- package/dist/assets/{TaskRoutes-BIYOSzTN.js → TaskRoutes-DmrwyMwf.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BCR0Vehv.js → TransactionDetailRoutes-BtJNx8FU.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Hfy201z1.js → TransactionDetailScreen-ZjUg5MTR.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Cbfw3Mig.js → TransactionListRoutes-CpUzH2wx.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Nis2HK0P.js → TreasuryRoutes-DGZRuDr3.js} +1 -1
- package/dist/assets/{VendorsRoutes-D8Pby__-.js → VendorsRoutes-BmMfshWa.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CQq7U1h7.js → WiseConfirmationScreen-CAo6wnNv.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DXX67VtM.js → ZeniAccountRoutes-Dt7DM9ni.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-B4C2kMj5.js → ZeniAccountStatementScreen-pkvytZBY.js} +1 -1
- package/dist/assets/{analyticsHelper-DrdSzHTB.js → analyticsHelper-BTp5Ghm5.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DL4YoPxV.js → getLocaleForTenant-zP94FwPU.js} +1 -1
- package/dist/assets/{index-DrTnWXwv.js → index-B-v2HYWQ.js} +5 -5
- package/dist/assets/{routePaths-B-3pox1f.js → routePaths-DPqSbEW8.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C7uJDZF1.js → useAiCfoDashboardSuggestedQuestionsChips-B_ZCAUsA.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BxaFyJbc.js → useAskAiCfoHostNavButtonProps-h3l_262v.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D-JPWLWk.js → useInitialThreadRequest-DZ6IEgJ5.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CMaq9uFn.js → withTransactionSidePanel-CklFSvII.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-D6iO1SmY.js";import{a as g}from"./sentry-DJeJwz74.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-D-NK-UK9.js";import{z as r,m as M,O as P,d as V,c as A,e as N,i as Q,T as R,g as W}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-D6iO1SmY.js";import{a as g}from"./sentry-DJeJwz74.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-D-NK-UK9.js";import{z as r,m as M,O as P,d as V,c as A,e as N,i as Q,T as R,g as W}from"./index-B-v2HYWQ.js";import{eQ as $,Jl as q,Jv as B,Jm as G,eU as H,fm as K,Jr as X,fL as Y,cT as Z,Jw as ee,Jx as te}from"./zeni-epic-state-22WFBgK9.js";import{n as ne}from"./mui-DqRlPgPp.js";import{u as se}from"./useDeviceId-CYAkkrZp.js";import{f as ae}from"./analyticsHelper-BTp5Ghm5.js";import{t as ie}from"./getLocaleForTenant-zP94FwPU.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="608bea5e-2875-4116-8c77-d8e6b2fbdd2a",t._sentryDebugIdIdentifier="sentry-dbid-608bea5e-2875-4116-8c77-d8e6b2fbdd2a")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=w(),f=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=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=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,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(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[I,S,y,s,o,b,v,a.state,t]);const O=g.useCallback(()=>{f("/signin/auth")},[f]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(Q,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:O});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(!x(n,p)||m==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-D6iO1SmY.js";import{a as c}from"./sentry-DJeJwz74.js";import{h as pe,g as s,i as qe,u as Ke,l as ea,k as R}from"./core-D-NK-UK9.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as ba,cJ as pa,fh as ha,cO as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-22WFBgK9.js";import{a6 as Ia,a7 as Ta,s as wa,w as _a,z as k,n as Aa,a8 as Fa,X as Da,v as va,u as $a,I as r,a9 as Ba,aa as Ga,k as Pa,a as Ra,ab as Ma,a2 as Na,ac as Ua,ad as Va,ae as fe,af as me,L as xa,ag as Oa,ah as be,c as M,r as _,a0 as La,ai as N,aj as ja}from"./index-
|
|
1
|
+
import{j as U}from"./liveblocks-D6iO1SmY.js";import{a as c}from"./sentry-DJeJwz74.js";import{h as pe,g as s,i as qe,u as Ke,l as ea,k as R}from"./core-D-NK-UK9.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as ba,cJ as pa,fh as ha,cO as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-22WFBgK9.js";import{a6 as Ia,a7 as Ta,s as wa,w as _a,z as k,n as Aa,a8 as Fa,X as Da,v as va,u as $a,I as r,a9 as Ba,aa as Ga,k as Pa,a as Ra,ab as Ma,a2 as Na,ac as Ua,ad as Va,ae as fe,af as me,L as xa,ag as Oa,ah as be,c as M,r as _,a0 as La,ai as N,aj as ja}from"./index-B-v2HYWQ.js";import{D as za}from"./mui-DqRlPgPp.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]="e4bbe494-9b36-4f09-8a93-6d0a59918b9e",m._sentryDebugIdIdentifier="sentry-dbid-e4bbe494-9b36-4f09-8a93-6d0a59918b9e")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Ke(),C=wa(),o=ea(),V=ta(),b=pe(),{useFeatureGate:i}=_a(),x=k.getSignedInUser(),A=na(x),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),L=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,j]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled: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"&&b(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:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),W=Q||J&&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:Pe}=i(r.isTaskManagerCustomerUserAccessEnabled),Re=A||!A&&Pe,Me=n.company!=null&&la(n.company),w=Ge&&Me,Ne=s(e=>g(e).totalUnreadCount),Ue=s(e=>g(e).reducedFetchCountState),X=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ve=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:xe}=Ga();c.useEffect(()=>{const e=setTimeout(()=>xe?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;j(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ve.fetchState==="Not-Started"&&V.tenantId!=null&&b(ca("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||b(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(b(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),b(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Ue,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"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Le=Pa(),oe=s(e=>fa(e,S,h,Q,J,w).fetchState),ie=s(e=>ma(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=c.useMemo(()=>ba(n.userRole),[n.userRole]),Ye=pa(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ra(),Je=re&&Ma(t),de=Sa(Le?.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]),[Qe,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const We=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Xe=Ua(We);return U.jsx(za,{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:U.jsx(Va,{signedInUser:x,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?_e:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:we,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:w,treasuryYieldPercentage:Xe,isTreasuryPopupVisible:Qe,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:W&&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 M.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(La(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,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&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 P=ja(e.type);be(e.type)?(L!=null&&b(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(xa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Oa(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(b(ka(e.tenantId)),b(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Je,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{b(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Re,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=pe(),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 U.jsx(Ya,{...m,...t})};export{qa as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D6iO1SmY.js";import{l as r,n}from"./core-D-NK-UK9.js";import{Q as i}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-D6iO1SmY.js";import{l as r,n}from"./core-D-NK-UK9.js";import{Q as i}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import"./sentry-DJeJwz74.js";import"./zeni-epic-state-22WFBgK9.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="a2ae25d7-9a32-4991-980a-ee1458238305",o._sentryDebugIdIdentifier="sentry-dbid-a2ae25d7-9a32-4991-980a-ee1458238305")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-D6iO1SmY.js";import lt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-D6iO1SmY.js";import lt from"./NotFoundScreen-C4a6Q5Lb.js";import{a as k}from"./sentry-DJeJwz74.js";import{l as ft,u as ut,i as ht,h as pt,g as S,n as kt,o as gt,p as Z}from"./core-D-NK-UK9.js";import{cr as St,e$ as J,eQ as Y,fe as bt,f6 as b,PS as K,fa as d,e_ as y,q_ as M,wl as It,PT as Ct,eZ as Tt,fh as yt,r3 as _t,PU as $,bq as F,gQ as x,r7 as H,PV as At,cC as Et,cw as Nt}from"./zeni-epic-state-22WFBgK9.js";import{Y as wt,z as Bt,w as xt,I as Pt,_ as Rt,cy as Ut,r as N,a6 as Dt,cz as vt,a7 as Gt,q as $t}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="3b4d4e73-1780-4bb9-a813-e5b1fa7b6c93",t._sentryDebugIdIdentifier="sentry-dbid-3b4d4e73-1780-4bb9-a813-e5b1fa7b6c93")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Y(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:w,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(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(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(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).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=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>J(e)),o=S(e=>Y(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),X=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:Q,isFetchingMore:L,hasFetchedAll:W}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{X.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const G=q.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(L||W===!0||Q==null||Q(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,W,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(Z,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(Z,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as A,u as J,g as o,N as C}from"./core-D-NK-UK9.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-22WFBgK9.js";import{z as h,J as I}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-D6iO1SmY.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as A,u as J,g as o,N as C}from"./core-D-NK-UK9.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-22WFBgK9.js";import{z as h,J as I}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="b524ebe1-52fb-4452-bb39-8cbbef0577c0",n._sentryDebugIdIdentifier="sentry-dbid-b524ebe1-52fb-4452-bb39-8cbbef0577c0")}catch{}})();function ee(){const n=A(),s=J(),{params:t,error:i}=r.useMemo(()=>M(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),c=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);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]),u=v??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(R(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-Z2m1-YQn.js → PandLWithForecastRoutes-CU7PJY2i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-D6iO1SmY.js";import{l as V,h as z,u as H,i as Q,g as d,n as Z,o as J,p as I}from"./core-D-NK-UK9.js";import{eQ as U,qO as P,qm as X,Kg as v,qh as T,bv as ee,bn as ae,bT as te,qi as se,Kh as oe,K2 as C,dE as re,ui as ne,Ki as ce,uF as ie,eY as le,eW as de}from"./zeni-epic-state-22WFBgK9.js";import{z as me,Y as fe,_ as pe,k as ue,w as q,I as w,H as he,c as M,ao as ge,r as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-D6iO1SmY.js";import{l as V,h as z,u as H,i as Q,g as d,n as Z,o as J,p as I}from"./core-D-NK-UK9.js";import{eQ as U,qO as P,qm as X,Kg as v,qh as T,bv as ee,bn as ae,bT as te,qi as se,Kh as oe,K2 as C,dE as re,ui as ne,Ki as ce,uF as ie,eY as le,eW as de}from"./zeni-epic-state-22WFBgK9.js";import{z as me,Y as fe,_ as pe,k as ue,w as q,I as w,H as he,c as M,ao as ge,r as Fe}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import be from"./NotFoundScreen-C4a6Q5Lb.js";import{F as Ie}from"./FeaturePreviewScreen-C2KS_KpA.js";import{a as g}from"./sentry-DJeJwz74.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import{u as Te}from"./useInitialThreadRequest-DZ6IEgJ5.js";import{t as Se}from"./routePaths-DPqSbEW8.js";import{M as ye}from"./MobileAppDrawer-DFwRXpE0.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="cbb7ed07-c6c7-4363-81cd-394092b20a5c",s._sentryDebugIdIdentifier="sentry-dbid-cbb7ed07-c6c7-4363-81cd-394092b20a5c")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=Z(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(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=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function R(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=Q(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),$=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,j,O)=>j!=null?f.forecasts.findIndex(b=>b.id===j):O!=null?f.forecasts.findIndex(b=>b.id===O):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,P,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=q(),{isFeatureEnabled:E}=N(w.isReportsCommentingEnabled),Y=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=g.useState(!1),L=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:$,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:W,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d(c=>U(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{Kb as te,eQ as q,jD as H,eY as J,eW as ne,HD as Q,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as K,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-22WFBgK9.js";import{n as pe,w as X,I as E,z,a9 as ue,D as me,ak as ge,al as Re,A as he,o as R,G as fe,O as Ce,am as Oe,Y as Ve,_ as Ue,H as Be,c as be,e as Ze,r as $e,an as Ke,k as _e}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{Kb as te,eQ as q,jD as H,eY as J,eW as ne,HD as Q,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as K,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-22WFBgK9.js";import{n as pe,w as X,I as E,z,a9 as ue,D as me,ak as ge,al as Re,A as he,o as R,G as fe,O as Ce,am as Oe,Y as Ve,_ as Ue,H as Be,c as be,e as Ze,r as $e,an as Ke,k as _e}from"./index-B-v2HYWQ.js";import{D as ye,n as W,S as we}from"./mui-DqRlPgPp.js";import ae from"./NotFoundScreen-C4a6Q5Lb.js";import{a as r}from"./sentry-DJeJwz74.js";import{h as ee,i as Ge,g as m,l as He,u as ze,n as We,o as se,p as $}from"./core-D-NK-UK9.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import{M as Me}from"./MobileAppDrawer-DFwRXpE0.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="72c85aaf-6ac1-4024-9a83-dd37b8ae68db",a._sentryDebugIdIdentifier="sentry-dbid-72c85aaf-6ac1-4024-9a83-dd37b8ae68db")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>q(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=J(k,u),L=ne(u),T=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Je,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Je=W(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import E from"./NotFoundScreen-C4a6Q5Lb.js";import{a as r}from"./sentry-DJeJwz74.js";import{l as _,u as v,g as p,i as M,h as P,N as U,n as z,o as O,p as h}from"./core-D-NK-UK9.js";import{eQ as B,PW as b,bo as F,bn as N,hk as Q,gQ as V}from"./zeni-epic-state-22WFBgK9.js";import{s as W,z as I,_ as $,cA as q}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import{M as H}from"./MobileAppDrawer-DFwRXpE0.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="9c5c4b4c-965e-434a-9c94-123f3ecd3c0d",e._sentryDebugIdIdentifier="sentry-dbid-9c5c4b4c-965e-434a-9c94-123f3ecd3c0d")}catch{}})();const J=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),K=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,T)=>{f(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-D6iO1SmY.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DJeJwz74.js";import{L as dt,bT as Tc,eQ as Ac,Jl as Rc,JP as kl,c2 as Tl,fm as Al,fn as Rl}from"./zeni-epic-state-22WFBgK9.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-CGva6Exy.js";import{r as un}from"./empty-DH2H1-Nx.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CNmHIzRc.js";import{r as Gl}from"./index-DCy8xCNa.js";import{r as zl}from"./index-AU1I47Je.js";import{l as Zl,u as Hl,h as Vl,g as En,n as Yl}from"./core-D-NK-UK9.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,h as Ql,c as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-D6iO1SmY.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DJeJwz74.js";import{L as dt,bT as Tc,eQ as Ac,Jl as Rc,JP as kl,c2 as Tl,fm as Al,fn as Rl}from"./zeni-epic-state-22WFBgK9.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-CGva6Exy.js";import{r as un}from"./empty-DH2H1-Nx.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CNmHIzRc.js";import{r as Gl}from"./index-DCy8xCNa.js";import{r as zl}from"./index-AU1I47Je.js";import{l as Zl,u as Hl,h as Vl,g as En,n as Yl}from"./core-D-NK-UK9.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,h as Ql,c as tf}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import{d as Pe}from"./decodeURIComponentSafe-C48GZJfu.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]="c11f6e6b-d349-4566-9326-021171e3ea74",t._sentryDebugIdIdentifier="sentry-dbid-c11f6e6b-d349-4566-9326-021171e3ea74")}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-D6iO1SmY.js";import{a as o}from"./sentry-DJeJwz74.js";import{g as f,l as B,h as L,u as M,n as V}from"./core-D-NK-UK9.js";import{m as F,n as N,z as R,b7 as W,A as U,Y as $,_ as z,H as G,c as l,e as Q,a6 as Y,b8 as q}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{a as o}from"./sentry-DJeJwz74.js";import{g as f,l as B,h as L,u as M,n as V}from"./core-D-NK-UK9.js";import{m as F,n as N,z as R,b7 as W,A as U,Y as $,_ as z,H as G,c as l,e as Q,a6 as Y,b8 as q}from"./index-B-v2HYWQ.js";import{f0 as J,eQ as K,MG as I,MH as X,u8 as Z,t_ as g,f2 as ee,bO as re,u3 as ae,MI as ne}from"./zeni-epic-state-22WFBgK9.js";import{D as te,e as se,n as oe,S as ie}from"./mui-DqRlPgPp.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import{M as de}from"./MobileAppDrawer-DFwRXpE0.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]="379d7849-cf5d-4e9d-bf7e-c558be62c336",e._sentryDebugIdIdentifier="sentry-dbid-379d7849-cf5d-4e9d-bf7e-c558be62c336")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:r})=>{const a=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{r(!0)},u=f(d=>J(d));return s.jsx(te,{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(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-D6iO1SmY.js";import j from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-D6iO1SmY.js";import j from"./NotFoundScreen-C4a6Q5Lb.js";import{a as p}from"./sentry-DJeJwz74.js";import{l as C,u as I,h as A,g as c,N as D,n as E,o as k,p as u}from"./core-D-NK-UK9.js";import{eQ as T,NA as b,NQ as S,D5 as V,Ce as N,D4 as m,CX as O,O4 as U}from"./zeni-epic-state-22WFBgK9.js";import{m as _,z as $,x as Q,a6 as W,bO as z,af as B}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import{R as g}from"./ReimbursementApprovalRuleDetailScreen-DI_WfNSZ.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]="cc124702-c039-44e3-94a3-514e2c423203",e._sentryDebugIdIdentifier="sentry-dbid-cc124702-c039-44e3-94a3-514e2c423203")}catch{}})();const d="reimbursement-approval-rule-update",P=E(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{B(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(O(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(W(z)),X=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),h=c(n=>n.remiSetupApproverViewState.fetchState),o=c(n=>T(n)),w=_(),i=c(n=>b(n)),v=c(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(V())},[v]),p.useEffect(()=>{l||h!=="Not-Started"||(s(!0),a(N(!0)))},[l,h,a]),$.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,q,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(Q,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...x})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(X,{})}),t.jsx(u,{path:"/new",element:t.jsx(g,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(g,{})}),t.jsx(u,{path:"*",element:t.jsx(j,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-D6iO1SmY.js";import{a as y}from"./sentry-DJeJwz74.js";import{l as A,h as w,u as T,i as U,g as b,n as E}from"./core-D-NK-UK9.js";import{NQ as D,NA as C,C_ as x,D7 as _,D5 as S,D6 as h,NR as B}from"./zeni-epic-state-22WFBgK9.js";import{z as k,m as N,x as V,bF as F,af as O}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-D6iO1SmY.js";import{a as y}from"./sentry-DJeJwz74.js";import{l as A,h as w,u as T,i as U,g as b,n as E}from"./core-D-NK-UK9.js";import{NQ as D,NA as C,C_ as x,D7 as _,D5 as S,D6 as h,NR as B}from"./zeni-epic-state-22WFBgK9.js";import{z as k,m as N,x as V,bF as F,af as O}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.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]="9f65aa7c-7c1a-4414-b3e7-c89d4ad2b115",e._sentryDebugIdIdentifier="sentry-dbid-9f65aa7c-7c1a-4414-b3e7-c89d4ad2b115")}catch{}})();function $(e){return B(e)==null}const j=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const c=p=>{const v=[];return p.forEach(u=>{const R=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=!!$(d.value);return{type:f?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!f}}),m=R.concat(I);v.push({action:u.stepType.selectedOption,actors:m,operator:m.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps: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("../")}}})(F);function H(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=N(),r=b(p=>D(p)),i=b(p=>C(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(j,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{H as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D6iO1SmY.js";import{l as K,h as re,u as Z,i as Y,g as E,N as M,n as Q,k as mt,o as ct,p as k}from"./core-D-NK-UK9.js";import{eQ as V,O5 as le,c2 as me,C9 as Be,jO as dt,Cm as ne,Cl as ae,O6 as ut,bn as ce,fM as Te,O7 as pt,Ks as bt,jD as De,Kt as Se,Ku as gt,iy as ht,Nm as ft,iN as St,BZ as It,sM as yt,iF as Rt,CJ as je,O8 as Fe,O9 as Ct,Oa as At,Ob as vt,Oc as kt,Od as Et,Ct as Ie,iT as wt,Nv as xt,Cn as Bt,C7 as Tt,Oe as Dt,C6 as jt,Of as Ft,Cf as ye,Cx as Ut,Cw as Lt,Cs as Ot,Og as Ue,HD as Pt,bo as $t,Ci as Mt,C$ as Nt,Oh as _t,Oi as zt,CF as Gt,CC as Re,MR as Ht,C4 as Zt,Oj as Le,Do as Ce,Dw as Vt,Ok as Wt,Ol as G,Om as Kt,On as Oe,Oo as Qt,Op as Pe,Oq as $e,CR as se,bt as qt,bG as de,cC as ue,eY as Me,eW as Ne,Or as Jt,gQ as Yt,N2 as Xt,Os as en,Ot as _e,N6 as tn,NQ as nn,Ou as an,O4 as sn,Dt as Ae,Ds as on,Ov as rn,Ow as ln,Ox as mn,Oy as cn,Oz as dn,NB as un,Dj as pn,Dn as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jn as yn,cM as Rn,cO as Cn,cN as An,cw as vn}from"./zeni-epic-state-22WFBgK9.js";import{s as ze,n as Ge,w as X,I as A,z as P,bP as He,H as ee,c as v,aH as ve,o as j,at as J,D as kn,O as Ze,bQ as En,r as H,_ as Ve,bR as wn,k as te,bS as xn,Y as Bn,A as Tn,x as pe,e as We,a6 as Dn,bg as jn,a1 as Fn,m as Ke,bT as Un,a9 as Ln}from"./index-DrTnWXwv.js";import{n as N,S as On}from"./mui-DqRlPgPp.js";import ie from"./NotFoundScreen-Dz0534r9.js";import{S as ke}from"./SetupPagesScreen-rBBoQAuI.js";import{F as Qe}from"./FeaturePreviewScreen-1ynGY-A8.js";import{a as f}from"./sentry-DJeJwz74.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BxaFyJbc.js";import{u as qe}from"./useInitialThreadRequest-D-JPWLWk.js";import{D as Pn}from"./DrawerScreen-Dhr1itui.js";import{M as Je}from"./MobileAppDrawer-D38LtL34.js";import{R as $n}from"./ReimbursementApprovalRoutes-Det6cqdB.js";import{FallBackRoute as Mn}from"./ScreenRoutes-0jsh5TOL.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./analyticsHelper-DrdSzHTB.js";import"./routePaths-B-3pox1f.js";import"./BusinessVerificationPageScreen-COhCODO3.js";import"./ReimbursementApprovalRuleDetailScreen-DpJeZp5O.js";import"./getLocaleForTenant-DL4YoPxV.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]="327bd970-7489-422a-a351-e1301415c468",e._sentryDebugIdIdentifier="sentry-dbid-327bd970-7489-422a-a351-e1301415c468")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Nn=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}}}=Ze.getLocalizedStrings(),_n=Q(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:`${J.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(Ot(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(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Ye(o),l=H(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=K(),t=re(),n=Z(),{reimbursementId:r}=Y(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(A.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(A.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!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(He,{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(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.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(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.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(_n,{initialOpenThreadRequest:O??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=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-D6iO1SmY.js";import{l as K,h as re,u as Z,i as Y,g as E,N as M,n as Q,k as mt,o as ct,p as k}from"./core-D-NK-UK9.js";import{eQ as V,O5 as le,c2 as me,C9 as Be,jO as dt,Cm as ne,Cl as ae,O6 as ut,bn as ce,fM as Te,O7 as pt,Ks as bt,jD as De,Kt as Se,Ku as gt,iy as ht,Nm as ft,iN as St,BZ as It,sM as yt,iF as Rt,CJ as je,O8 as Fe,O9 as Ct,Oa as At,Ob as vt,Oc as kt,Od as Et,Ct as Ie,iT as wt,Nv as xt,Cn as Bt,C7 as Tt,Oe as Dt,C6 as jt,Of as Ft,Cf as ye,Cx as Ut,Cw as Lt,Cs as Ot,Og as Ue,HD as Pt,bo as $t,Ci as Mt,C$ as Nt,Oh as _t,Oi as zt,CF as Gt,CC as Re,MR as Ht,C4 as Zt,Oj as Le,Do as Ce,Dw as Vt,Ok as Wt,Ol as G,Om as Kt,On as Oe,Oo as Qt,Op as Pe,Oq as $e,CR as se,bt as qt,bG as de,cC as ue,eY as Me,eW as Ne,Or as Jt,gQ as Yt,N2 as Xt,Os as en,Ot as _e,N6 as tn,NQ as nn,Ou as an,O4 as sn,Dt as Ae,Ds as on,Ov as rn,Ow as ln,Ox as mn,Oy as cn,Oz as dn,NB as un,Dj as pn,Dn as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jn as yn,cM as Rn,cO as Cn,cN as An,cw as vn}from"./zeni-epic-state-22WFBgK9.js";import{s as ze,n as Ge,w as X,I as A,z as P,bP as He,H as ee,c as v,aH as ve,o as j,at as J,D as kn,O as Ze,bQ as En,r as H,_ as Ve,bR as wn,k as te,bS as xn,Y as Bn,A as Tn,x as pe,e as We,a6 as Dn,bg as jn,a1 as Fn,m as Ke,bT as Un,a9 as Ln}from"./index-B-v2HYWQ.js";import{n as N,S as On}from"./mui-DqRlPgPp.js";import ie from"./NotFoundScreen-C4a6Q5Lb.js";import{S as ke}from"./SetupPagesScreen-Bap8l3lK.js";import{F as Qe}from"./FeaturePreviewScreen-C2KS_KpA.js";import{a as f}from"./sentry-DJeJwz74.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import{u as qe}from"./useInitialThreadRequest-DZ6IEgJ5.js";import{D as Pn}from"./DrawerScreen-ueiFgeV8.js";import{M as Je}from"./MobileAppDrawer-DFwRXpE0.js";import{R as $n}from"./ReimbursementApprovalRoutes-mwgyiXL7.js";import{FallBackRoute as Mn}from"./ScreenRoutes-BXmEXdCM.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./analyticsHelper-BTp5Ghm5.js";import"./routePaths-DPqSbEW8.js";import"./BusinessVerificationPageScreen-fGxnzjnu.js";import"./ReimbursementApprovalRuleDetailScreen-DI_WfNSZ.js";import"./getLocaleForTenant-zP94FwPU.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]="327bd970-7489-422a-a351-e1301415c468",e._sentryDebugIdIdentifier="sentry-dbid-327bd970-7489-422a-a351-e1301415c468")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Nn=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}}}=Ze.getLocalizedStrings(),_n=Q(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:`${J.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(Ot(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(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(Ct());const i=Ye(o),l=H(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=K(),t=re(),n=Z(),{reimbursementId:r}=Y(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(A.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(A.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(A.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=Z().pathname,D=w.includes("edit"),C=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=P.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),O=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(C&&!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(He,{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(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.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(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${J.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(_n,{initialOpenThreadRequest:O??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=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-D6iO1SmY.js";import{u as J,l as ye,h as ge,i as Ce,g as d,n as Ie,o as we,p as Y}from"./core-D-NK-UK9.js";import{eQ as L,fc as I,JQ as Se,jD as Q,py as W,qg as O,jr as Te,iv as Re,tM as X,ql as Fe,bv as Oe,JR as Ae,bn as ke,uN as De,JS as Ee,JT as je,tE as Pe,JU as G,JV as Le,JW as Me,JX as Be,JY as ve,JZ as w,J_ as A,J$ as k,K0 as H,K1 as D,K2 as E,dE as Ve,ut as Ue,uh as K,ui as N,uz as xe,um as $,uF as ze,K3 as Je,K4 as Ye,K5 as Ge,K6 as He,K7 as Ke,eY as Ne,eW as $e}from"./zeni-epic-state-22WFBgK9.js";import{R as qe,U as Ze,V as Qe,X as We,n as Xe,w as ee,I as j,z as ae,Y as ea,k as aa,a as sa,Z as ta,_ as oa,H as na,c as P,e as ra,r as se,$ as ia,a0 as la,a1 as ca}from"./index-DrTnWXwv.js";import"./mui-DqRlPgPp.js";import da from"./NotFoundScreen-Dz0534r9.js";import{F as pa}from"./FeaturePreviewScreen-1ynGY-A8.js";import{a as _}from"./sentry-DJeJwz74.js";import{u as fa}from"./useInitialThreadRequest-D-JPWLWk.js";import{t as q,a as Z,b as ma}from"./routePaths-B-3pox1f.js";import{M as ua}from"./MobileAppDrawer-D38LtL34.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="f37e0c5c-ffbe-4b83-90ca-1396d4819c43",e._sentryDebugIdIdentifier="sentry-dbid-f37e0c5c-ffbe-4b83-90ca-1396d4819c43")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(Ge()),e(He()),e(Ke())},ba=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ca}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Je(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(K(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(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(G({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(K(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(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(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Z(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(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(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ia);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Xe(),u=la(f),a=ye(),s=ge(),t=J(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>I(n).fetchState),re=d(n=>Se(n)),{areTenantIdsInSync:h}=ea(),T=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Q(n)),R=d(n=>W(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),F=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(O(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(X());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,F,h,V,R]);const U=aa(),ce=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=sa(),me=ta();return function(n){const{isDataReady:ue}=n,{pathname:_e}=J(),z=qe(_e??"")==="reports",he=Ze(ue),be=_.useMemo(()=>z?_a:void 0,[z]);Qe({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(na,{analytics:P,onLoad:n=>n.trackPageLoaded(ra.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:c,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(pa,{}):p.jsxs(we,{children:[p.jsx(Y,{path:"/",element:p.jsx(ya,{})}),p.jsx(Y,{path:"*",element:p.jsx(da,{})})]})}export{Ua as default};
|
|
1
|
+
import{j as p}from"./liveblocks-D6iO1SmY.js";import{u as J,l as ye,h as ge,i as Ce,g as d,n as Ie,o as we,p as Y}from"./core-D-NK-UK9.js";import{eQ as L,fc as I,JQ as Se,jD as Q,py as W,qg as O,jr as Te,iv as Re,tM as X,ql as Fe,bv as Oe,JR as Ae,bn as ke,uN as De,JS as Ee,JT as je,tE as Pe,JU as G,JV as Le,JW as Me,JX as Be,JY as ve,JZ as w,J_ as A,J$ as k,K0 as H,K1 as D,K2 as E,dE as Ve,ut as Ue,uh as K,ui as N,uz as xe,um as $,uF as ze,K3 as Je,K4 as Ye,K5 as Ge,K6 as He,K7 as Ke,eY as Ne,eW as $e}from"./zeni-epic-state-22WFBgK9.js";import{R as qe,U as Ze,V as Qe,X as We,n as Xe,w as ee,I as j,z as ae,Y as ea,k as aa,a as sa,Z as ta,_ as oa,H as na,c as P,e as ra,r as se,$ as ia,a0 as la,a1 as ca}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import da from"./NotFoundScreen-C4a6Q5Lb.js";import{F as pa}from"./FeaturePreviewScreen-C2KS_KpA.js";import{a as _}from"./sentry-DJeJwz74.js";import{u as fa}from"./useInitialThreadRequest-DZ6IEgJ5.js";import{t as q,a as Z,b as ma}from"./routePaths-DPqSbEW8.js";import{M as ua}from"./MobileAppDrawer-DFwRXpE0.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.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]="f37e0c5c-ffbe-4b83-90ca-1396d4819c43",e._sentryDebugIdIdentifier="sentry-dbid-f37e0c5c-ffbe-4b83-90ca-1396d4819c43")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ha=e=>{e(Ye()),e(Ge()),e(He()),e(Ke())},ba=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ca}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Je(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(K(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(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(G({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(K(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(N(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(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Z(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(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(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(G({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ia);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Xe(),u=la(f),a=ye(),s=ge(),t=J(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>I(n).fetchState),re=d(n=>Se(n)),{areTenantIdsInSync:h}=ea(),T=d(n=>n.financeStatementState.selectedReportId),V=d(n=>Q(n)),R=d(n=>W(n)),ie=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),F=d(n=>I(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(O(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!M&&C==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))},[i,M,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(X());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,F,h,V,R]);const U=aa(),ce=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=sa(),me=ta();return function(n){const{isDataReady:ue}=n,{pathname:_e}=J(),z=qe(_e??"")==="reports",he=Ze(ue),be=_.useMemo(()=>z?_a:void 0,[z]);Qe({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),oa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(na,{analytics:P,onLoad:n=>n.trackPageLoaded(ra.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:c,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(pa,{}):p.jsxs(we,{children:[p.jsx(Y,{path:"/",element:p.jsx(ya,{})}),p.jsx(Y,{path:"*",element:p.jsx(da,{})})]})}export{Ua as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D6iO1SmY.js";import{w as x,z as j,aN as y,H as E,c as p,e as F,cK as L,I as P}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-D6iO1SmY.js";import{w as x,z as j,aN as y,H as E,c as p,e as F,cK as L,I as P}from"./index-B-v2HYWQ.js";import"./mui-DqRlPgPp.js";import m from"./NotFoundScreen-C4a6Q5Lb.js";import{a as u}from"./sentry-DJeJwz74.js";import{h as T,g as b,l as V,u as A,n as Q,o as R,p as f}from"./core-D-NK-UK9.js";import{eQ as U,Qt as C,Nf as z,Qu as _,u8 as Y,f2 as G,Qv as H,u6 as K}from"./zeni-epic-state-22WFBgK9.js";import{R as w}from"./ReferralListScreen-BaQmHM5w.js";import"./recharts-Dt8dM4EI.js";import"./analytics-NZ6ROu06.js";import"./plaid-BzyOi-ir.js";import"./dnd-C49i2BE4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BWZi4J-8.js";import"./lexical-Bp-0qESw.js";import"./pdf-BpZ3cLIj.js";import"./utils-CGva6Exy.js";import"./useAskAiCfoHostNavButtonProps-h3l_262v.js";import"./MobileAppDrawer-DFwRXpE0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="430848cb-a5a4-43ac-a38c-2e4b2536925c",a._sentryDebugIdIdentifier="sentry-dbid-430848cb-a5a4-43ac-a38c-2e4b2536925c")}catch{}})();const O=Q(function(a,t){const n=C(a);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(a,t){const{navigate:n}=t,i=j.getSignedInUser();return{onDismissClick:()=>{a(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(K())},onUpdateInviteFormLocalData:s=>{a(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(L),q=()=>{const a=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>U(o)),c=V(),v=A(),{useDynamicConfig:g}=x(),d=j.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),N=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=z(k);u.useEffect(()=>{a(_()),r?.rewardsLastViewedTime==null&&i===!1&&(a(Y()),s(!0))},[]),u.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[l.fetchState,a]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[l.fetchState==="Completed"?e.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,e.jsx(O,{navigate:c,location:v,currentTenant:r,companyName:I,userName:N,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fa(){const{useFeatureGate:a}=x(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(f,{path:"/",element:t?e.jsx(w,{}):e.jsx(m,{})}),e.jsx(f,{path:"how-it-works",element:t?e.jsx(w,{isReferralDrawerOpen:!0}):e.jsx(m,{})}),e.jsx(f,{path:"refer/*",element:t?e.jsx(q,{}):e.jsx(m,{})}),e.jsx(f,{path:"*",element:e.jsx(m,{})})]})}export{fa as default};
|