@zeniai/web-app-ui 5.0.83-dev → 5.0.83-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-JvTiiWK5.js → AddressRoutes-CWhsyRK1.js} +1 -1
- package/dist/assets/{AddressScreen-DT0Q15o7.js → AddressScreen-VrcMQjiD.js} +1 -1
- package/dist/assets/{AiCfoScreen-v5CVNL3j.js → AiCfoScreen-DEUFQGrJ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BVQZfKuM.js → BillPayApprovalRoutes-Bto_8DlZ.js} +1 -1
- package/dist/assets/{BillPayRoutes-BnuP6nVO.js → BillPayRoutes-CM8hJk1L.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CdptLI3O.js → BusinessVerificationPageScreen-aX8WAJEu.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-D3SdjHvX.js → ChargeCardRoutes-bFbVJcJ3.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BSC4O5TV.js → CompanyPassportScreen-2BatYHL7.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Dr1IfznG.js → ConnectionAuthScreen-B2ntqz66.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-YfK_o0qz.js → CustomerOnboardingAuthScreen-AYY31Mbm.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-BXabGwpN.js → CustomerOnboardingRoutes-Qc9BWmGL.js} +1 -1
- package/dist/assets/{DashboardRoutes-CvNojOn1.js → DashboardRoutes-B2MHI9aq.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BkycKg61.js → DefaultTenantHome-Z9AqTWY6.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-cxTAfHcb.js → DomesticWireDetailScreen-wgKBNuTX.js} +1 -1
- package/dist/assets/{DrawerScreen-C7_25xjY.js → DrawerScreen-CD89PYIf.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CQUv4fcU.js → EntityDetailRoutes-DY6s5vdx.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DMlkcAnN.js → ExpenseAutomationRoutes-CSoEa0_v.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-C38iY35s.js → FeaturePreviewScreen-ClFmJj0F.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-453Cbbtd.js → HubSpotOAuthCallbackScreen-Bv0Dplnr.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CyBHzAa4.js → MagicLinkRoutes-Iy5unnpW.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-DUAV5Zdq.js → MagicLinkSignInScreen-BT8J4zZB.js} +1 -1
- package/dist/assets/{MobileAppDrawer-B5ryN7bV.js → MobileAppDrawer-e8XeuLFm.js} +1 -1
- package/dist/assets/{NotFoundScreen-CiYbMRBm.js → NotFoundScreen-Bky0x63m.js} +1 -1
- package/dist/assets/{NotificationRoutes-DVeyMkq-.js → NotificationRoutes-BebVEMiU.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-_8k8Mx_3.js → OAuthConsentScreen-D5F3V9z0.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-C2_HmJpg.js → PandLWithForecastRoutes-B8DWi2uL.js} +1 -1
- package/dist/assets/{PeopleRoutes-BP3GsUae.js → PeopleRoutes-C_Z9cC8z.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Do9BajCP.js → PerformanceRoutes-loPr71_u.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-D3T_HW3H.js → QBOConnectionScreen-CZ1MGgEp.js} +1 -1
- package/dist/assets/{ReferralListScreen-BIW3RLSW.js → ReferralListScreen-CT69aUhD.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-v95q9aWZ.js → ReimbursementApprovalRoutes-cun-DBmT.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DxQnj1Nr.js → ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-_EXm0KMO.js → ReimbursementRoutes-BlJI16jt.js} +1 -1
- package/dist/assets/{ReportsRoutes-C1AXA5Bz.js → ReportsRoutes-C8V-XsK0.js} +1 -1
- package/dist/assets/{RewardsRoutes-GXGSL_JR.js → RewardsRoutes-BHmDW7as.js} +1 -1
- package/dist/assets/{ScreenRoutes-BFCvivVX.js → ScreenRoutes-zKgwm72u.js} +2 -2
- package/dist/assets/{SettingsRoutes-DtVKDqWM.js → SettingsRoutes-e_2YajK9.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BbHEiKJR.js → SetupPagesScreen-DqRLJPMB.js} +1 -1
- package/dist/assets/{SignInScreen-DsOYu6LX.js → SignInScreen-Cog1Vtto.js} +1 -1
- package/dist/assets/{SignOutScreen-BLqW2pDa.js → SignOutScreen-ZO39xI3M.js} +1 -1
- package/dist/assets/{TaskListScreen-BBtnIRpq.js → TaskListScreen-A3idk1NZ.js} +1 -1
- package/dist/assets/{TaskRoutes-D8Wkm19g.js → TaskRoutes-NoT_X70G.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-l-T5k5a_.js → TransactionDetailRoutes-CVrjMcax.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DBF06PeT.js → TransactionDetailScreen-DIB74eML.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BocCKVMK.js → TransactionListRoutes-FL8BD3WO.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B9p98adV.js → TreasuryRoutes-CTNKrHTc.js} +1 -1
- package/dist/assets/{VendorsRoutes-D5Vv_W7I.js → VendorsRoutes-BpeSS5jb.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Br0VqiWX.js → WiseConfirmationScreen-CXqsKsLQ.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-D4wfXaC9.js → ZeniAccountRoutes-D5ItrMUC.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-C83btU9G.js → ZeniAccountStatementScreen-CFbM7j61.js} +1 -1
- package/dist/assets/{analyticsHelper-CRpkSjLL.js → analyticsHelper-lTEhuqth.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D68g9mo1.js → getLocaleForTenant-BgJ-_j4h.js} +1 -1
- package/dist/assets/{index-DnoGJKuR.js → index-BA1kjk_c.js} +5 -5
- package/dist/assets/{routePaths-DBUEUOgS.js → routePaths-CRbFlZJW.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-D1ncSYVo.js → useAskAiCfoHostNavButtonProps-BtmGLJlN.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js → useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CPdwuo-t.js → useInitialThreadRequest-D05iPKhd.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-75BTvZCV.js → withTransactionSidePanel-C4l2rQhD.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-Cjqg1XsV.js";import{a as g}from"./sentry-DTwqiEdO.js";import{h as J,u as O,j as _,q as w,g as l,N as T}from"./core-B1Jz41nC.js";import{z as r,m as M,D as P,e as V,d as A,f as N,i as R,B as q,g as B}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-Cjqg1XsV.js";import{a as g}from"./sentry-DTwqiEdO.js";import{h as J,u as O,j as _,q as w,g as l,N as T}from"./core-B1Jz41nC.js";import{z as r,m as M,D as P,e as V,d as A,f as N,i as R,B as q,g as B}from"./index-BA1kjk_c.js";import{eQ as Q,Jb as W,Jl as $,Jc as G,eR as H,fk as K,Jh as X,fJ as Y,cU as Z,Jm as ee,Jn as te}from"./zeni-epic-state-CFJ-5drS.js";import{n as ne}from"./mui-DSSmRxLI.js";import{u as se}from"./useDeviceId-DOSS9iCb.js";import{f as ae}from"./analyticsHelper-lTEhuqth.js";import{t as ie}from"./getLocaleForTenant-BgJ-_j4h.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="6b47ac97-2899-4405-980c-774a8d5663ad",t._sentryDebugIdIdentifier="sentry-dbid-6b47ac97-2899-4405-980c-774a8d5663ad")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=J(),a=O(),f=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Q(e)),k=l(e=>W(e)),E=r.getSignedInUser(),v=M().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(k.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,k.tenantsInOrder),Y().then(()=>{const e=B();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const U=g.useCallback(()=>{f("/signin/auth")},[f]),j=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||m==null||I==="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??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as P}from"./liveblocks-Cjqg1XsV.js";import{a as c}from"./sentry-DTwqiEdO.js";import{h as be,g as s,l as Xe,u as Ke,j as ea,i as M}from"./core-B1Jz41nC.js";import{eQ as he,eX as aa,eY as Se,eS as ta,bn as na,f5 as sa,eZ as oa,e_ as ia,f0 as ra,f3 as da,fd as la,f4 as g,f7 as ca,f8 as ue,fb as ua,f9 as fa,fa as ma,fc as pa,cJ as ba,ff as ha,cP as Sa,bv as ga,eP as Ea,fk as ka,fl as Ca,fj as ya}from"./zeni-epic-state-CFJ-5drS.js";import{a3 as Ia,a4 as Ta,r as _a,y as wa,z as k,Z as Aa,a5 as Fa,Q as Da,s as va,u as $a,S as r,a6 as Ba,a7 as Ga,c as xa,a as Ma,a8 as Ra,Y as Na,a9 as Pa,aa as Ua,ab as fe,ac as me,L as Va,ad as Oa,ae as pe,d as R,q as w,W as ja,af as N,ag as La}from"./index-
|
|
1
|
+
import{j as P}from"./liveblocks-Cjqg1XsV.js";import{a as c}from"./sentry-DTwqiEdO.js";import{h as be,g as s,l as Xe,u as Ke,j as ea,i as M}from"./core-B1Jz41nC.js";import{eQ as he,eX as aa,eY as Se,eS as ta,bn as na,f5 as sa,eZ as oa,e_ as ia,f0 as ra,f3 as da,fd as la,f4 as g,f7 as ca,f8 as ue,fb as ua,f9 as fa,fa as ma,fc as pa,cJ as ba,ff as ha,cP as Sa,bv as ga,eP as Ea,fk as ka,fl as Ca,fj as ya}from"./zeni-epic-state-CFJ-5drS.js";import{a3 as Ia,a4 as Ta,r as _a,y as wa,z as k,Z as Aa,a5 as Fa,Q as Da,s as va,u as $a,S as r,a6 as Ba,a7 as Ga,c as xa,a as Ma,a8 as Ra,Y as Na,a9 as Pa,aa as Ua,ab as fe,ac as me,L as Va,ad as Oa,ae as pe,d as R,q as w,W as ja,af as N,ag as La}from"./index-BA1kjk_c.js";import{D as Ya}from"./mui-DSSmRxLI.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]="0d86dd5c-e265-4867-9221-cca1f0237752",m._sentryDebugIdIdentifier="sentry-dbid-0d86dd5c-e265-4867-9221-cca1f0237752")}catch{}})();const za=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=Xe(),t=Ke(),C=_a(),o=ea(),U=ta(),p=be(),{useFeatureGate:i}=wa(),V=k.getSignedInUser(),A=na(V),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),j=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,Y=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:z}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:_e}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&p(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabledV2),q=W||Q&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:xe}=i(r.isTaskManagerCustomerUserAccessEnabled),Me=A||!A&&xe,Re=n.company!=null&&la(n.company),_=Ge&&Re,Ne=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),J=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),X=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=Ga();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&K!=null){const e=`dashboard_${n.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&U.tenantId!=null&&p(ca("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||p(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(p(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),p(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Pe,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),z===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const je=xa(),oe=s(e=>fa(e,S,h,W,Q,_).fetchState),ie=s(e=>ma(e).fetchState),Le=D&&(oe==="Completed"||oe==="Error")||Y&&(ie==="Completed"||ie==="Error")||!D&&!Y?void 0:"disabled",Ye=c.useMemo(()=>pa(n.userRole),[n.userRole]),ze=ba(Ye),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ma(),Qe=re&&Ra(t),de=Sa(je?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>_&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[_,de,le,t.pathname,a]),[We,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Je=Pa(qe);return P.jsx(Ya,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:P.jsx(Ua,{signedInUser:V,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Le,isSettings:me(t),isSettingsFeatureEnabled:_e,isVendorsTabVisible:ze,isZeniAccountEnabled:z,isChargeCardEnabled:Te,isTreasuryEnabled:_,treasuryYieldPercentage:Je,isTreasuryPopupVisible:We,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:q&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&X>0?"notifications/comments":"notifications/tasks";me(t)&&(e=J===0&&X>0?"../../notifications/comments":"../../notifications/tasks");const u=w(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(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=w(t.state?.pathnameStackToGoBack,t.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(ja(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=w(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=La(e.type);pe(e.type)?(j!=null&&p(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Oa(l)?b+="settings/my_profile":pe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(p(ka(e.tenantId)),p(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;R.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Qe,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{p(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Me,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),Xa=m=>{const d=be(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return P.jsx(za,{...m,...t})};export{Xa as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-Cjqg1XsV.js";import{j as i,k as n}from"./core-B1Jz41nC.js";import{N as e}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-Cjqg1XsV.js";import{j as i,k as n}from"./core-B1Jz41nC.js";import{N as e}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import"./sentry-DTwqiEdO.js";import"./zeni-epic-state-CFJ-5drS.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="0c8dcb74-2c7d-426d-b2f0-d04ad191873a",o._sentryDebugIdIdentifier="sentry-dbid-0c8dcb74-2c7d-426d-b2f0-d04ad191873a")}catch{}})();const d=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function h(){const o=i();return r.jsx(d,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as lt,j as A}from"./liveblocks-Cjqg1XsV.js";import dt from"./NotFoundScreen-
|
|
1
|
+
import{l as ct,a as mt,m as lt,j as A}from"./liveblocks-Cjqg1XsV.js";import dt from"./NotFoundScreen-Bky0x63m.js";import{a as k}from"./sentry-DTwqiEdO.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as Q}from"./core-B1Jz41nC.js";import{cr as St,eZ as X,eQ as H,fc as bt,f4 as b,PG as Y,f8 as l,eY as y,qX as M,wg as It,PH as Ct,eX as Tt,ff as yt,r0 as Et,PI as $,bq as F,gO as x,r4 as W,PJ as _t,cC as At,cw as Nt}from"./zeni-epic-state-CFJ-5drS.js";import{T as wt,z as Bt,y as xt,S as Pt,ct as Rt,q as N,a3 as Dt,cu as vt,a4 as Gt,p as Ut}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as Ft}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="6f001a73-402b-499a-8018-be913f04fcfe",t._sentryDebugIdIdentifier="sentry-dbid-6f001a73-402b-499a-8018-be913f04fcfe")}catch{}})();const Mt=(t,d)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{d(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,d){const n=X(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=d,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,d){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:w,fetchMoreCommentsNotifications:P}=d;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(W("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")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(l(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Y(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(W("task_manager",m,c)):(t(l({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(r),t($([r],F())))})).then(()=>{t(l({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(l({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(l({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(l({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then(()=>{t($(s,F())),t(l({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(l({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ut(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(),d=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=>X(e)),o=S(e=>H(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ft({isDataReady:!0});const Z=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),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),D=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:B,isLoading:E,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:J,isFetchingMore:L,hasFetchedAll:O}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Y(i)),i==null){const e=`../${V}`,p=N(d.state?.pathnameStackToGoBack,d.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(l({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(E===!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(l({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[E,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=E||v===!0||C!==!0||E||v===!0||C!==!0;k.useEffect(()=>{G&&D!=="In-Progress"?s(l({fetchState:"In-Progress",error:void 0},"comments")):G||D!=="In-Progress"||s(l({fetchState:"Completed",error:void 0},"comments"))},[G,D]),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(E===!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),_=p.map(f=>f.id),it=p.map(f=>{const U=q.find(rt=>rt.id===f.threadId);return U!=null?{inboxNotification:{...f,threadId:U.id},thread:U}:(L||O===!0||J==null||J(),null)}).filter(f=>f!=null);s(l({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,v,L,C,O,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 _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",T,_,!0))}}}},nt=lt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:h,externalNotificationsUnreadCount:tt,location:d,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return A.jsxs(gt,{children:[A.jsx(Q,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(Q,{path:"*",element:A.jsx(dt,{})})]})}export{ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-Cjqg1XsV.js";import{a as r}from"./sentry-DTwqiEdO.js";import{h as T,u as C,g as o,N as D}from"./core-B1Jz41nC.js";import{JA as J,eQ as P,f3 as j,JB as x,JC as z,JD as M,JE as R,mS as k,Iw as L}from"./zeni-epic-state-CFJ-5drS.js";import{z as h,K as I}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-Cjqg1XsV.js";import{a as r}from"./sentry-DTwqiEdO.js";import{h as T,u as C,g as o,N as D}from"./core-B1Jz41nC.js";import{JA as J,eQ as P,f3 as j,JB as x,JC as z,JD as M,JE as R,mS as k,Iw as L}from"./zeni-epic-state-CFJ-5drS.js";import{z as h,K as I}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="4008888b-bb46-4859-abce-911369b21d97",n._sentryDebugIdIdentifier="sentry-dbid-4008888b-bb46-4859-abce-911369b21d97")}catch{}})();function ee(){const n=T(),s=C(),{params:t,error:i}=r.useMemo(()=>J(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),u=o(M),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(R())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))},[p,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(A=>A.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(L(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(D,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-C2_HmJpg.js → PandLWithForecastRoutes-B8DWi2uL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-Cjqg1XsV.js";import{j as Y,h as z,u as J,l as Q,g as d,k as Z,n as H,o as I}from"./core-B1Jz41nC.js";import{eQ as v,qL as R,qj as X,K7 as O,qe as T,bv as ee,bn as ae,bT as te,qf as se,K8 as oe,JV as C,dE as re,ud as ne,K9 as ie,uA as ce,eW as le,eU as de}from"./zeni-epic-state-CFJ-5drS.js";import{z as me,T as fe,c as pe,y as q,S as M,x as ue,d as $,al as he,q as ge}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-Cjqg1XsV.js";import{j as Y,h as z,u as J,l as Q,g as d,k as Z,n as H,o as I}from"./core-B1Jz41nC.js";import{eQ as v,qL as R,qj as X,K7 as O,qe as T,bv as ee,bn as ae,bT as te,qf as se,K8 as oe,JV as C,dE as re,ud as ne,K9 as ie,uA as ce,eW as le,eU as de}from"./zeni-epic-state-CFJ-5drS.js";import{z as me,T as fe,c as pe,y as q,S as M,x as ue,d as $,al as he,q as ge}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import Fe from"./NotFoundScreen-Bky0x63m.js";import{F as be}from"./FeaturePreviewScreen-ClFmJj0F.js";import{a as g}from"./sentry-DTwqiEdO.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{u as Te}from"./useInitialThreadRequest-D05iPKhd.js";import{t as Se}from"./routePaths-CRbFlZJW.js";import{M as ye}from"./MobileAppDrawer-e8XeuLFm.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="7d283999-7f91-4bc1-a7a8-b98eea7d497f",s._sentryDebugIdIdentifier="sentry-dbid-7d283999-7f91-4bc1-a7a8-b98eea7d497f")}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:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function U(){const s=Y(),e=z(),a=J(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),w=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(b=>b.id===L):P!=null?f.forecasts.findIndex(b=>b.id===P):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,R,T,F]);const D=pe(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=q(),{isFeatureEnabled:j}=_(M.isReportsCommentingEnabled),G=Te(j?y?.companyId:void 0,{clearParams:l&&m}),[K,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:K,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ye(){const s=d(i=>v(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(H,{children:[n.jsx(I,{path:"/",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{Ye as PandLWithForecastRoutes,Ye as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cjqg1XsV.js";import{K2 as te,eQ as N,jC as G,eW as Y,eU as ne,Ht as q,JI as oe,tl as Ee,K3 as J,t9 as ke,tu as Ie,to as ie,td as re,ts as Pe,tp as je,K4 as le,u$ as Te,K5 as Le,fz as ve,K6 as K,ti as de,tg as ce,tx as Fe,c2 as Ae}from"./zeni-epic-state-CFJ-5drS.js";import{Z as pe,y as X,S as E,z as M,a6 as ue,H as me,ah as ge,ai as Re,G as he,o as R,I as fe,D as Ce,aj as Oe,T as Ve,x as Ue,d as be,f as Ze,q as Be,ak as $e,c as Ke}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-Cjqg1XsV.js";import{K2 as te,eQ as N,jC as G,eW as Y,eU as ne,Ht as q,JI as oe,tl as Ee,K3 as J,t9 as ke,tu as Ie,to as ie,td as re,ts as Pe,tp as je,K4 as le,u$ as Te,K5 as Le,fz as ve,K6 as K,ti as de,tg as ce,tx as Fe,c2 as Ae}from"./zeni-epic-state-CFJ-5drS.js";import{Z as pe,y as X,S as E,z as M,a6 as ue,H as me,ah as ge,ai as Re,G as he,o as R,I as fe,D as Ce,aj as Oe,T as Ve,x as Ue,d as be,f as Ze,q as Be,ak as $e,c as Ke}from"./index-BA1kjk_c.js";import{D as ye,n as W,S as we}from"./mui-DSSmRxLI.js";import ae from"./NotFoundScreen-Bky0x63m.js";import{a as r}from"./sentry-DTwqiEdO.js";import{h as ee,l as He,g as m,j as ze,u as Ge,k as Me,n as se,o as $}from"./core-B1Jz41nC.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as _e}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{M as Qe}from"./MobileAppDrawer-e8XeuLFm.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="3f87c74c-817c-4eab-be32-c35ed4c7ea48",a._sentryDebugIdIdentifier="sentry-dbid-3f87c74c-817c-4eab-be32-c35ed4c7ea48")}catch{}})();const Je={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Ne=({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}=He(),d=m(e=>te(e)),u=m(e=>N(e)),D=m(e=>G(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=q(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(M.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(J()),y()},F=()=>{O===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!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(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Ye=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-Cjqg1XsV.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-Cjqg1XsV.js";import E from"./NotFoundScreen-Bky0x63m.js";import{a as r}from"./sentry-DTwqiEdO.js";import{j as _,u as v,g as p,l as M,h as P,N as U,k as O,n as z,o as h}from"./core-B1Jz41nC.js";import{eQ as B,PK as b,bo as F,bn as N,hi as V,gO as K}from"./zeni-epic-state-CFJ-5drS.js";import{r as Q,z as I,cv as $}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as G}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{M as H}from"./MobileAppDrawer-e8XeuLFm.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="e815959e-6ef1-4e2b-963c-494684e6135b",e._sentryDebugIdIdentifier="sentry-dbid-e815959e-6ef1-4e2b-963c-494684e6135b")}catch{}})();const J=O(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)}}})($),L=()=>{const e=_(),t=v(),c=Q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=S||k||x,l=r.useCallback((a,i,T)=>{f(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(K({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0},[n?.fetchState,l]),j=r.useCallback((a,i)=>{l(a,i,!1)},[l]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return G({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:d,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-Cjqg1XsV.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DTwqiEdO.js";import{L as dt,bT as Tc,eQ as Ac,Jb as Rc,JF as kl,c2 as Tl,fk as Al,fl as Rl}from"./zeni-epic-state-CFJ-5drS.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-CCEyXo02.js";import{r as un}from"./empty-oTLwTSll.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DFDlNXnV.js";import{r as Gl}from"./index-C6t5Pm8y.js";import{r as zl}from"./index-B90Cr8bv.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-B1Jz41nC.js";import{u as Kl,z as Pc,L as Wl,R as Jl,M as Xl,h as Ql,d as tf}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-Cjqg1XsV.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DTwqiEdO.js";import{L as dt,bT as Tc,eQ as Ac,Jb as Rc,JF as kl,c2 as Tl,fk as Al,fl as Rl}from"./zeni-epic-state-CFJ-5drS.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-CCEyXo02.js";import{r as un}from"./empty-oTLwTSll.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DFDlNXnV.js";import{r as Gl}from"./index-C6t5Pm8y.js";import{r as zl}from"./index-B90Cr8bv.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-B1Jz41nC.js";import{u as Kl,z as Pc,L as Wl,R as Jl,M as Xl,h as Ql,d as tf}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import{d as Pe}from"./decodeURIComponentSafe-HQbzOYEL.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]="eb811dc2-1e3e-4826-9dc5-e56677be5c62",t._sentryDebugIdIdentifier="sentry-dbid-eb811dc2-1e3e-4826-9dc5-e56677be5c62")}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-Cjqg1XsV.js";import{a as o}from"./sentry-DTwqiEdO.js";import{g as f,j as H,h as L,u as M,k as V}from"./core-B1Jz41nC.js";import{m as W,Z as F,z as R,b3 as z,G as N,T as U,x as $,d as l,f as G,a3 as Q,b4 as Z}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-Cjqg1XsV.js";import{a as o}from"./sentry-DTwqiEdO.js";import{g as f,j as H,h as L,u as M,k as V}from"./core-B1Jz41nC.js";import{m as W,Z as F,z as R,b3 as z,G as N,T as U,x as $,d as l,f as G,a3 as Q,b4 as Z}from"./index-BA1kjk_c.js";import{e_ as q,eQ as J,Mx as P,My as K,u3 as X,tV as g,f0 as Y,bO as ee,t_ as ae,Mz as re}from"./zeni-epic-state-CFJ-5drS.js";import{D as ne,e as te,n as se,S as oe}from"./mui-DSSmRxLI.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{M as de}from"./MobileAppDrawer-e8XeuLFm.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]="28893e3e-60c1-476e-9a9a-b6828316ba89",e._sentryDebugIdIdentifier="sentry-dbid-28893e3e-60c1-476e-9a9a-b6828316ba89")}catch{}})();const ce={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=F();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(z,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-Cjqg1XsV.js";import x from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-Cjqg1XsV.js";import x from"./NotFoundScreen-Bky0x63m.js";import{a as p}from"./sentry-DTwqiEdO.js";import{j as C,u as I,h as A,g as l,N as E,k as D,n as k,o as u}from"./core-B1Jz41nC.js";import{eQ as N,Nr as g,NH as S,D0 as T,C9 as V,C$ as m,CS as U,NX as _}from"./zeni-epic-state-CFJ-5drS.js";import{m as $,z as O,v as W,a3 as z,bJ as B,ac as H}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import{R as h}from"./ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.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]="16c99b4c-4ce2-4b66-af53-19cdc2803875",e._sentryDebugIdIdentifier="sentry-dbid-16c99b4c-4ce2-4b66-af53-19cdc2803875")}catch{}})();const d="reimbursement-approval-rule-update",J=D(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:c}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{H(c)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(z(B)),P=()=>{const e=C(),r=I(),a=A(),[c,s]=p.useState(!1),[f,y]=p.useState(!1),b=l(n=>n.remiSetupApproverViewState.fetchState),o=l(n=>N(n)),w=$(),i=l(n=>g(n)),v=l(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&a(T())},[v]),p.useEffect(()=>{c||b!=="Not-Started"||(s(!0),a(V(!0)))},[c,b,a]),O.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 j={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(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(J,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(u,{path:"/",element:t.jsx(P,{})}),t.jsx(u,{path:"/new",element:t.jsx(h,{})}),t.jsx(u,{path:"/:approvalRuleId/edit",element:t.jsx(h,{})}),t.jsx(u,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{j as A,h as w,u as T,l as U,g as b,k as E}from"./core-B1Jz41nC.js";import{NH as D,Nr as C,CV as x,D2 as _,D0 as S,D1 as h,NI as k}from"./zeni-epic-state-CFJ-5drS.js";import{z as B,m as V,v as N,bA as j,ac as F}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-Cjqg1XsV.js";import{a as f}from"./sentry-DTwqiEdO.js";import{j as A,h as w,u as T,l as U,g as b,k as E}from"./core-B1Jz41nC.js";import{NH as D,Nr as C,CV as x,D2 as _,D0 as S,D1 as h,NI as k}from"./zeni-epic-state-CFJ-5drS.js";import{z as B,m as V,v as N,bA as j,ac as F}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.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]="9fac66b1-7cff-4591-afa5-f0293bf2f432",e._sentryDebugIdIdentifier="sentry-dbid-9fac66b1-7cff-4591-afa5-f0293bf2f432")}catch{}})();function O(e){return k(e)==null}const $=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const y=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!O(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=R.concat(I);y.push({action:c.stepType.selectedOption,actors:v,operator:v.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),y};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function J(){const e=A(),a=w(),t=T(),{approvalRuleId:s}=U(),n=B.getSignedInUser(),l=V(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=f.useState(!1);if(f.useEffect(()=>{o||(u(!0),a(x(!0)))}),f.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(N,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{J as R,O as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Cjqg1XsV.js";import{j as K,h as re,u as Z,l as Q,g as E,N as M,k as q,i as mt,n as ct,o as k}from"./core-B1Jz41nC.js";import{eQ as V,NY as le,c2 as me,C4 as Be,jN as dt,Ch as ne,Cg as ae,NZ as ut,bn as ce,fK as Te,N_ as pt,Kj as bt,jC as De,Kk as Se,Kl as gt,ix as ht,Nd as ft,iM as St,BU as It,sJ as yt,iE as Rt,CE as je,N$ as Fe,O0 as Ct,O1 as At,O2 as vt,O3 as kt,O4 as Et,Co as Ie,iS as wt,Nm as xt,Ci as Bt,C2 as Tt,O5 as Dt,C1 as jt,O6 as Ft,Ca as ye,Cs as Ut,Cr as Lt,Cn as Ot,O7 as Ue,Ht as Pt,bo as $t,Cd as Mt,CW as Nt,O8 as _t,O9 as zt,CA as Gt,Cx as Re,MI as Ht,B$ as Zt,Oa as Le,Dj as Ce,Dr as Vt,Ob as Wt,Oc as G,Od as Kt,Oe,Of as qt,Og as Pe,Oh as $e,CM as se,bt as Jt,bG as de,cC as ue,eW as Me,eU as Ne,Oi as Xt,gO as Qt,MV as Yt,Oj as en,Ok as _e,MZ as tn,NH as nn,Ol as an,NX as sn,Do as Ae,Dn as on,Om as rn,On as ln,Oo as mn,Op as cn,Oq as dn,Ns as un,De as pn,Di as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jd as yn,cN as Rn,cP as Cn,cO as An,cw as vn}from"./zeni-epic-state-CFJ-5drS.js";import{r as ze,Z as Ge,y as Y,S as A,z as P,bK as He,x as ee,d as v,aE as ve,o as j,aq as X,H as kn,D as Ze,bL as En,q as H,bM as wn,c as te,bN as xn,T as Bn,G as Tn,v as pe,f as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-DnoGJKuR.js";import{n as N,S as On}from"./mui-DSSmRxLI.js";import ie from"./NotFoundScreen-CiYbMRBm.js";import{S as ke}from"./SetupPagesScreen-BbHEiKJR.js";import{F as Ke}from"./FeaturePreviewScreen-C38iY35s.js";import{a as f}from"./sentry-DTwqiEdO.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-D1ncSYVo.js";import{u as qe}from"./useInitialThreadRequest-CPdwuo-t.js";import{c as Je}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{D as Pn}from"./DrawerScreen-C7_25xjY.js";import{M as Xe}from"./MobileAppDrawer-B5ryN7bV.js";import{R as $n}from"./ReimbursementApprovalRoutes-v95q9aWZ.js";import{FallBackRoute as Mn}from"./ScreenRoutes-BFCvivVX.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./analyticsHelper-CRpkSjLL.js";import"./routePaths-DBUEUOgS.js";import"./BusinessVerificationPageScreen-CdptLI3O.js";import"./ReimbursementApprovalRuleDetailScreen-DxQnj1Nr.js";import"./getLocaleForTenant-D68g9mo1.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]="ecbf7660-c59d-4632-9730-570deec4f9c2",e._sentryDebugIdIdentifier="sentry-dbid-ecbf7660-c59d-4632-9730-570deec4f9c2")}catch{}})();const Qe=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:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(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=Qe(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}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(_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-Cjqg1XsV.js";import{j as K,h as re,u as Z,l as Q,g as E,N as M,k as q,i as mt,n as ct,o as k}from"./core-B1Jz41nC.js";import{eQ as V,NY as le,c2 as me,C4 as Be,jN as dt,Ch as ne,Cg as ae,NZ as ut,bn as ce,fK as Te,N_ as pt,Kj as bt,jC as De,Kk as Se,Kl as gt,ix as ht,Nd as ft,iM as St,BU as It,sJ as yt,iE as Rt,CE as je,N$ as Fe,O0 as Ct,O1 as At,O2 as vt,O3 as kt,O4 as Et,Co as Ie,iS as wt,Nm as xt,Ci as Bt,C2 as Tt,O5 as Dt,C1 as jt,O6 as Ft,Ca as ye,Cs as Ut,Cr as Lt,Cn as Ot,O7 as Ue,Ht as Pt,bo as $t,Cd as Mt,CW as Nt,O8 as _t,O9 as zt,CA as Gt,Cx as Re,MI as Ht,B$ as Zt,Oa as Le,Dj as Ce,Dr as Vt,Ob as Wt,Oc as G,Od as Kt,Oe,Of as qt,Og as Pe,Oh as $e,CM as se,bt as Jt,bG as de,cC as ue,eW as Me,eU as Ne,Oi as Xt,gO as Qt,MV as Yt,Oj as en,Ok as _e,MZ as tn,NH as nn,Ol as an,NX as sn,Do as Ae,Dn as on,Om as rn,On as ln,Oo as mn,Op as cn,Oq as dn,Ns as un,De as pn,Di as bn,bv as gn,bF as hn,cx as fn,cl as Sn,bs as In,Jd as yn,cN as Rn,cP as Cn,cO as An,cw as vn}from"./zeni-epic-state-CFJ-5drS.js";import{r as ze,Z as Ge,y as Y,S as A,z as P,bK as He,x as ee,d as v,aE as ve,o as j,aq as X,H as kn,D as Ze,bL as En,q as H,bM as wn,c as te,bN as xn,T as Bn,G as Tn,v as pe,f as Ve,a3 as Dn,bb as jn,X as Fn,m as We,bO as Un,a6 as Ln}from"./index-BA1kjk_c.js";import{n as N,S as On}from"./mui-DSSmRxLI.js";import ie from"./NotFoundScreen-Bky0x63m.js";import{S as ke}from"./SetupPagesScreen-DqRLJPMB.js";import{F as Ke}from"./FeaturePreviewScreen-ClFmJj0F.js";import{a as f}from"./sentry-DTwqiEdO.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import{u as qe}from"./useInitialThreadRequest-D05iPKhd.js";import{c as Je}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{D as Pn}from"./DrawerScreen-CD89PYIf.js";import{M as Xe}from"./MobileAppDrawer-e8XeuLFm.js";import{R as $n}from"./ReimbursementApprovalRoutes-cun-DBmT.js";import{FallBackRoute as Mn}from"./ScreenRoutes-zKgwm72u.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./analyticsHelper-lTEhuqth.js";import"./routePaths-CRbFlZJW.js";import"./BusinessVerificationPageScreen-aX8WAJEu.js";import"./ReimbursementApprovalRuleDetailScreen-Dd8W-jsp.js";import"./getLocaleForTenant-BgJ-_j4h.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]="ecbf7660-c59d-4632-9730-570deec4f9c2",e._sentryDebugIdIdentifier="sentry-dbid-ecbf7660-c59d-4632-9730-570deec4f9c2")}catch{}})();const Qe=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:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(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=Qe(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}=Q(),d=ze(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=Y(),{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:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(_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-Cjqg1XsV.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as Ie,o as G}from"./core-B1Jz41nC.js";import{eQ as L,fa as S,JG as we,jC as Z,JH as X,qd as A,jq as Te,iu as Re,tJ as K,qi as Oe,bv as Ae,JI as Fe,bn as ke,uI as De,JJ as Ee,JK as je,tB as Pe,JL as H,JM as Le,JN as Me,JO as Je,JP as Be,JQ as I,JR as F,JS as k,JT as Y,JU as D,JV as E,dE as Ue,uo as ve,uc as q,ud as N,uu as Ve,uh as $,uA as xe,JW as ze,JX as Ge,JY as He,JZ as Ye,J_ as qe,eW as Ne,eU as $e}from"./zeni-epic-state-CFJ-5drS.js";import{O as Qe,Q as We,Z as Ze,y as ee,S as j,z as ae,T as Xe,c as Ke,a as ea,x as aa,d as P,f as sa,q as se,U as ta,W as oa,X as na}from"./index-DnoGJKuR.js";import"./mui-DSSmRxLI.js";import ra from"./NotFoundScreen-CiYbMRBm.js";import{F as ia}from"./FeaturePreviewScreen-C38iY35s.js";import{a as _}from"./sentry-DTwqiEdO.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-BD5FIrcH.js";import{u as fa}from"./useInitialThreadRequest-CPdwuo-t.js";import{t as Q,a as W}from"./routePaths-DBUEUOgS.js";import{M as ma}from"./MobileAppDrawer-B5ryN7bV.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="7400682d-381b-4561-afee-78974fcd509d",e._sentryDebugIdIdentifier="sentry-dbid-7400682d-381b-4561-afee-78974fcd509d")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(He()),e(Ye()),e(qe())},ha=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=S(e),r=Fe(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:Z(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(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(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(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(ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Je({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Ze(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:J}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=d(n=>L(n)),oe=B.company?.companyInfo.firstMonthOfFY??1,ne=fa(J?B?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Z(n)),R=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),O=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(A(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,O,h,U,R]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Ae(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:J,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Ie,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
|
|
1
|
+
import{j as p}from"./liveblocks-Cjqg1XsV.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as Ie,o as G}from"./core-B1Jz41nC.js";import{eQ as L,fa as S,JG as we,jC as Z,JH as X,qd as A,jq as Te,iu as Re,tJ as K,qi as Oe,bv as Ae,JI as Fe,bn as ke,uI as De,JJ as Ee,JK as je,tB as Pe,JL as H,JM as Le,JN as Me,JO as Je,JP as Be,JQ as I,JR as F,JS as k,JT as Y,JU as D,JV as E,dE as Ue,uo as ve,uc as q,ud as N,uu as Ve,uh as $,uA as xe,JW as ze,JX as Ge,JY as He,JZ as Ye,J_ as qe,eW as Ne,eU as $e}from"./zeni-epic-state-CFJ-5drS.js";import{O as Qe,Q as We,Z as Ze,y as ee,S as j,z as ae,T as Xe,c as Ke,a as ea,x as aa,d as P,f as sa,q as se,U as ta,W as oa,X as na}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import ra from"./NotFoundScreen-Bky0x63m.js";import{F as ia}from"./FeaturePreviewScreen-ClFmJj0F.js";import{a as _}from"./sentry-DTwqiEdO.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import{u as fa}from"./useInitialThreadRequest-D05iPKhd.js";import{t as Q,a as W}from"./routePaths-CRbFlZJW.js";import{M as ma}from"./MobileAppDrawer-e8XeuLFm.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.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]="7400682d-381b-4561-afee-78974fcd509d",e._sentryDebugIdIdentifier="sentry-dbid-7400682d-381b-4561-afee-78974fcd509d")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(He()),e(Ye()),e(qe())},ha=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=S(e),r=Fe(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:Z(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e(N(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(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(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e($(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(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(ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Je({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{_a(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=Ze(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(j.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:J}=c(j.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const B=d(n=>L(n)),oe=B.company?.companyInfo.firstMonthOfFY??1,ne=fa(J?B?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=Xe(),T=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Z(n)),R=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),O=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(A(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(T){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":R&&s(K());break;case"balance_sheet":s(Re(b.timeframe));break;case"cash_flow":s(Te(b.timeframe))}},[i,T,O,h,U,R]);const v=Ke(),ce=v?.loggedInUserRole!=null&&Ae(v?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:T,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:R,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:J,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function va(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ne(f,e),a=$e(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Ie,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{va as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-Cjqg1XsV.js";import{y as w,z as b,aK as y,x as I,d as p,f as F,cF as L,S as P}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-Cjqg1XsV.js";import{y as w,z as b,aK as y,x as I,d as p,f as F,cF as L,S as P}from"./index-BA1kjk_c.js";import"./mui-DSSmRxLI.js";import l from"./NotFoundScreen-Bky0x63m.js";import{a as f}from"./sentry-DTwqiEdO.js";import{h as T,g as x,j as V,u as A,k as Q,n as R,o as u}from"./core-B1Jz41nC.js";import{eQ as U,Qh as C,N6 as z,Qi as k,u3 as Y,f0 as G,Qj as K,u1 as O}from"./zeni-epic-state-CFJ-5drS.js";import{R as j}from"./ReferralListScreen-CT69aUhD.js";import"./recharts-DW5j2-RD.js";import"./analytics-B134UjSL.js";import"./plaid-H6p_O3yl.js";import"./dnd-DumzdahX.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-v1nIzb.js";import"./lexical-DsIUchFW.js";import"./pdf-SAu_SEbF.js";import"./utils-CCEyXo02.js";import"./useAskAiCfoHostNavButtonProps-BtmGLJlN.js";import"./useFetchSuggestedQuestionsWhenReady-B8aqOZNy.js";import"./MobileAppDrawer-e8XeuLFm.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]="1a5f5df6-43a1-4137-9ca6-6ccf2a2f51c9",a._sentryDebugIdIdentifier="sentry-dbid-1a5f5df6-43a1-4137-9ca6-6ccf2a2f51c9")}catch{}})();const q=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,o=b.getSignedInUser();return{onDismissClick:()=>{a(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}a(O())},onUpdateInviteFormLocalData:s=>{a(K({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(L),B=()=>{const a=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=x(i=>U(i)),c=V(),v=A(),{useDynamicConfig:g}=w(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=x(i=>C(i)),D=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:S}=g(y.zeniAccountsConfig),_=z(S);f.useEffect(()=>{a(k()),r?.rewardsLastViewedTime==null&&o===!1&&(a(Y()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),a(G(!0)))},[m.fetchState,a]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return e.jsxs(e.Fragment,{children:[m.fetchState==="Completed"?e.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,e.jsx(q,{navigate:c,location:v,currentTenant:r,companyName:N,userName:D,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:_.maxAnnualPercentageYield})]})};function da(){const{useFeatureGate:a}=w(),{isFeatureEnabled:t}=a(P.isReferralFeatureEnabled);return e.jsxs(R,{children:[e.jsx(u,{path:"/",element:t?e.jsx(j,{}):e.jsx(l,{})}),e.jsx(u,{path:"how-it-works",element:t?e.jsx(j,{isReferralDrawerOpen:!0}):e.jsx(l,{})}),e.jsx(u,{path:"refer/*",element:t?e.jsx(B,{}):e.jsx(l,{})}),e.jsx(u,{path:"*",element:e.jsx(l,{})})]})}export{da as default};
|