@zeniai/web-app-ui 5.3.62-qa → 5.3.63-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-Br9WdaHc.js → AccountMappingScreen-BRZHYOUR.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-DIn78iaK.js → ActualMatchingMatchDetailScreen-CT_TfQgQ.js} +1 -1
- package/dist/assets/AddressRoutes-CisWqyoC.js +1 -0
- package/dist/assets/{AddressScreen-ChRwBMyD.js → AddressScreen-CrINuapd.js} +1 -1
- package/dist/assets/{AiCfoScreen-BoGQRrg3.js → AiCfoScreen-BXw0LDjo.js} +1 -1
- package/dist/assets/{AppDrawer-DbFNEZx2.js → AppDrawer-DZIMVdFc.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Ct7bUe2K.js → BillPayApprovalRoutes-Dp_PkbIk.js} +1 -1
- package/dist/assets/{BillPayRoutes-B9u5uZwl.js → BillPayRoutes-CUUjBefv.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-e_hf599B.js → BusinessVerificationPageScreen-DFamYzxa.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-DX5yBLLe.js → CardsAiCfoScreen-Cx5KkOYw.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C0BDIoz6.js → ChargeCardRoutes-DzIBuJeY.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BlEcfU7b.js → CompanyPassportScreen-CENbDnLW.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DXkk-oNs.js → ConnectionAuthScreen-DTyZxcME.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-zLmHJyqv.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CYJxOgEd.js → CustomerOnboardingRoutes-CjmJGGJm.js} +1 -1
- package/dist/assets/{DashboardRoutes-g9OAwtyP.js → DashboardRoutes-ByHBLKcB.js} +1 -1
- package/dist/assets/{DefaultTenantHome-8TPWmCiF.js → DefaultTenantHome-Dm9FOXup.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DjZA-xGp.js → DomesticWireDetailScreen-086WQWRB.js} +1 -1
- package/dist/assets/{DrawerScreen-D1drFQnx.js → DrawerScreen-B5BqRZEJ.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BecZC3rR.js → EntityDetailRoutes-BuN3sXNp.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CoBNGWYF.js → ExpenseAutomationRoutes-Ce3IicTe.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BOIyRrPg.js → FeaturePreviewScreen-D54Nwanb.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CjBFKEJv.js → HubSpotOAuthCallbackScreen-BRUwb2B6.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-DcarX1j5.js → InboxNotificationsProvider-x0fdv66l.js} +1 -1
- package/dist/assets/InvoicingRoutes-IQsFojD0.js +2 -0
- package/dist/assets/{MagicLinkRoutes-BJpvsEO6.js → MagicLinkRoutes-C5BKMtwW.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CZf88rgm.js → MagicLinkSignInScreen-9LYlxmop.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BzxL_djZ.js → MobileAppDrawer-DX2JnkbM.js} +1 -1
- package/dist/assets/NotFoundScreen-CtgFRYZy.js +1 -0
- package/dist/assets/{NotificationRoutes-BFU33ioz.js → NotificationRoutes-DICT3yoM.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DWoFdp0W.js → OAuthConsentScreen-BmiLDdxn.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CMfowbmP.js → PandLWithForecastRoutes-DAq9XRB1.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-DVDDW9Xr.js → PaymentLinkScreen-Cz1wlNqO.js} +1 -1
- package/dist/assets/{PeopleRoutes-Cd8MqER4.js → PeopleRoutes-DgYtveDU.js} +1 -1
- package/dist/assets/{PerformanceRoutes-E86W1j7a.js → PerformanceRoutes-B6iTINLg.js} +1 -1
- package/dist/assets/{Preview-Dxr01VGI.js → Preview-Dz6yJNce.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Os4Qkt_2.js → QBOConnectionScreen-D8eeXRWb.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BUfIlnAM.js → ReimbursementApprovalRoutes-CE6y6IwA.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Si973dRZ.js → ReimbursementApprovalRuleDetailScreen-BT_O_PEv.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B2UGt9Xo.js → ReimbursementRoutes-BmOT-3C-.js} +1 -1
- package/dist/assets/{ReportsRoutes-URtyqRNi.js → ReportsRoutes-CqUKv9Uh.js} +1 -1
- package/dist/assets/{RewardsRoutes-xF2koJkH.js → RewardsRoutes-D5CR9NnI.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-dZQw9m0s.js → ScheduleDetailsPrepaidExpensesScreen-CLEogplJ.js} +1 -1
- package/dist/assets/{ScreenRoutes-DivUQ8Cf.js → ScreenRoutes-xDjhbdP1.js} +2 -2
- package/dist/assets/{SettingsRoutes-DySQSZO0.js → SettingsRoutes-QcMcR-j3.js} +1 -1
- package/dist/assets/{SetupPagesScreen-Ctwh4sou.js → SetupPagesScreen-fuvb0IYd.js} +1 -1
- package/dist/assets/{SignInScreen-CMjQX-Bq.js → SignInScreen-ekGlkjLH.js} +1 -1
- package/dist/assets/{SignOutScreen-DiORNgD0.js → SignOutScreen-9NJIr2hr.js} +1 -1
- package/dist/assets/{TaskListScreen-2YfVihcw.js → TaskListScreen-C2urPjKT.js} +1 -1
- package/dist/assets/{TaskRoutes-ClUIKKHH.js → TaskRoutes-BuzkCbPW.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-D99Yv6kv.js +1 -0
- package/dist/assets/{TransactionDetailScreen-DG9WnSFK.js → TransactionDetailScreen-CQr1YyP0.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DJGbjFDn.js → TransactionListRoutes-BTidVr9Z.js} +1 -1
- package/dist/assets/{TreasuryRoutes-qpLhCja3.js → TreasuryRoutes-CbD79DO8.js} +1 -1
- package/dist/assets/{VendorsRoutes-ry-2tBPT.js → VendorsRoutes-CCYu89Uf.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-FC1WiW4f.js → WiseConfirmationScreen-B0HeU8Sh.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CnC3I2P3.js → ZeniAccountRoutes-CoRmS3Mc.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BkDHVJBF.js → ZeniAccountStatementScreen-BnpFJ5jB.js} +1 -1
- package/dist/assets/{accountMappingHelper-DpfYWNe6.js → accountMappingHelper-tmyjt9rr.js} +1 -1
- package/dist/assets/{analytics-CiEh1qKr.js → analytics-C3e3An3a.js} +1 -1
- package/dist/assets/{analyticsHelper-CyJSZC50.js → analyticsHelper-BEL0ra9X.js} +1 -1
- package/dist/assets/{core-Caq7Zbsp.js → core-CHD8T-IM.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DmjyT4t5.js → decodeURIComponentSafe-p_nrn8Pg.js} +1 -1
- package/dist/assets/{dnd-DwckO6rX.js → dnd-Dwi6R-ey.js} +1 -1
- package/dist/assets/{empty-Dl3LsHNf.js → empty-CZC5CrVC.js} +1 -1
- package/dist/assets/{empty-CviwvzhB.js → empty-CeRjDJvl.js} +1 -1
- package/dist/assets/{emptyVideoElement-0ADxBh21.js → emptyVideoElement-BQ5qxpg6.js} +1 -1
- package/dist/assets/{epic-DqqOk9a9.js → epic-BW8jUHg5.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-B83Qa5Jl.js → expenseAutomationHelper-kGR6VZFG.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CqonawWC.js → getLocaleForTenant-D-or0iZO.js} +1 -1
- package/dist/assets/{index-BsIiLcaT.js → index-BMy5YH8G.js} +1 -1
- package/dist/assets/{index-Bi5Vnzzf.js → index-BVHBHjSe.js} +1 -1
- package/dist/assets/{index-DZj1fENq.js → index-C1KaIuMT.js} +1 -1
- package/dist/assets/{index-BggnOuo1.js → index-CKiMoeFX.js} +1 -1
- package/dist/assets/{index-BFK4rLhv.js → index-DKH4PK2B.js} +10 -11
- package/dist/assets/{index-BLBexBOn.js → index-XRUedCJ0.js} +1 -1
- package/dist/assets/{index-De1Gw5gW.js → index-w09kaOHP.js} +1 -1
- package/dist/assets/{index-B3LhL1WI.js → index-yiW1aZfy.js} +2 -2
- package/dist/assets/{lexical-mmp2B1vq.js → lexical-CMNdypK6.js} +1 -1
- package/dist/assets/{liveblocks-CIxx6Ub6.js → liveblocks-e6rGc1UF.js} +1 -1
- package/dist/assets/{lottie-CrKh4Q_r.js → lottie-B778bt56.js} +1 -1
- package/dist/assets/{mui-DI0hUuFr.js → mui-NTaF3UaY.js} +1 -1
- package/dist/assets/{pathToGoBack-Ch5lrOj1.js → pathToGoBack-3T3qt1CN.js} +1 -1
- package/dist/assets/{pdf-BlhN83fm.js → pdf-Bx92ZlM_.js} +3 -3
- package/dist/assets/{pdf-lib-WBpN-CHj.js → pdf-lib-CSbJ_JNk.js} +1 -1
- package/dist/assets/{plaid-CXvI7t9H.js → plaid-DdTo7m1-.js} +1 -1
- package/dist/assets/{pusher-BZAjVztW.js → pusher-TnSBrmnt.js} +1 -1
- package/dist/assets/{react-BsygV86H.js → react-B75Gnqob.js} +1 -1
- package/dist/assets/{react-BHfk4QRe.js → react-BRi8TcMI.js} +1 -1
- package/dist/assets/{react-tooGqts4.js → react-Ba46BK4D.js} +1 -1
- package/dist/assets/{react-rmAoHvXj.js → react-COkaiBQo.js} +1 -1
- package/dist/assets/{react-BqA23JAy.js → react-Ci1ltUcy.js} +1 -1
- package/dist/assets/{react-XoZ7aD8C.js → react-DJOUavGZ.js} +1 -1
- package/dist/assets/{recharts-DKmpCGIA.js → recharts-C6xUtcdL.js} +1 -1
- package/dist/assets/{routePaths-BpLibSFl.js → routePaths-CGyE-cU7.js} +1 -1
- package/dist/assets/{sentry-BCPOyc0G.js → sentry-DsyKtMW2.js} +1 -1
- package/dist/assets/{stripSplatSuffix-Dmnnw5Oe.js → stripSplatSuffix-CKrdD9MQ.js} +1 -1
- package/dist/assets/{url-CdxI2rEH.js → url-ClJewK9Y.js} +1 -1
- package/dist/assets/{url-JduagIhH.js → url-Zl9uXQ4e.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-DuLHKjLq.js → useActualMatchingMatchDetail-Cc17Q5Tv.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BZ908ypV.js → useAiCfoDashboardSuggestedQuestionsChips-CHbHmZzx.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-0MZcMlGZ.js → useAskAiCfoHostNavButtonProps-BcCbRGDK.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BxJ5Xbwu.js → useChargeCardPusherEvents-BWi4_PP5.js} +1 -1
- package/dist/assets/{useDeviceId-2NJBbYPM.js → useDeviceId-VsdzmSZI.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BgnlRFeW.js → useEmailConnectResultRefresh-ClXdZp-6.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DCnYqu0o.js → useInitialThreadRequest-DDr_z_RH.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-DR584Qqx.js → useTaskManagerAccess-CUv6a62x.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BwxBoB_w.js → useTaskManagerPusherEvents-DCIopLVZ.js} +1 -1
- package/dist/assets/{utils-rX2IEvjD.js → utils-CCA3F0sZ.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BaNmmFC5.js → withTransactionSidePanel-B_xgLNm6.js} +1 -1
- package/dist/assets/{zeni-epic-state-DROyxOLw.js → zeni-epic-state-BO3zdDfL.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-Bs2su6QC.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-AEs3yg3Y.js +0 -1
- package/dist/assets/InvoicingRoutes-BF9bJVNE.js +0 -2
- package/dist/assets/NotFoundScreen-CQm7D9go.js +0 -1
- package/dist/assets/TransactionDetailRoutes-FefIagFG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as _}from"./liveblocks-
|
|
1
|
+
import{j as _}from"./liveblocks-e6rGc1UF.js";import{a as m}from"./sentry-DsyKtMW2.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as F}from"./core-CHD8T-IM.js";import{fF as ne,T_ as Ue,T$ as se,g9 as Ne,fE as xe,U8 as Pe,U1 as Re,U2 as Ve,p$ as Le,gm as Oe,U5 as h,Ua as je,Ub as J,gn as Ze,Uc as ze,Eb as He,h1 as qe,cV as Ye,Ud as Ke,g8 as Qe,go as We}from"./zeni-epic-state-BO3zdDfL.js";import{w as Je,i as Xe,F as ea,N as aa,c as ta,e as na,u as sa,f as c,g as oa,Q as ia,z as ra,d as da,n as ca,o as la,s as ua,q as ma,r as X,L as fa,D as ba,H as ha,p as S,k as ee,y as pa,K as ae,B as ga,C as Sa}from"./index-DKH4PK2B.js";import{D as Ea}from"./mui-NTaF3UaY.js";import{u as ka}from"./InboxNotificationsProvider-x0fdv66l.js";import{u as Ca}from"./useTaskManagerAccess-CUv6a62x.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="abe252d7-08e3-4a24-93c8-2bd04d638f9b",l._sentryDebugIdIdentifier="sentry-dbid-abe252d7-08e3-4a24-93c8-2bd04d638f9b")}catch{}})();const Ta=Je((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Me(),B=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:k}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>xe(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,M]=m.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,U=F("/:tenantEmailDomain/reports")!==null,f=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),x=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));m.useEffect((()=>{C&&T&&!f&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,f]);const D=t((e=>e.tenantState)),me=t((e=>D.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:be}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:he}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),Ee=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",ke=t((e=>h(e).totalUnreadCount)),Ce=t((e=>h(e).reducedFetchCountState)),R=t((e=>h(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>h(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>h(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>h(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:j,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Te}=ka();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;M(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[j,Z,z]),m.useEffect((()=>{C&&k&&!f&&L.fetchState==="Not-Started"&&B.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,k,f,L.fetchState,B.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(J({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(J({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},H=s!=null?ra.getSignedInUserTenant(s):null,q=t((e=>H?.tenantId!=null?Ze(e,H.tenantId):void 0)),b=[];fe===!1&&b.push("accounts_payable_aging"),be===!1&&b.push("accounts_receivable_aging"),b.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&b.push("rewards_card"),P===!1&&b.push("expense_automation_card");const Y=t((e=>ze(e,b).fetchState)),K=t((e=>He(e).fetchState)),ye=A&&(Y==="Completed"||Y==="Error")||U&&(K==="Completed"||K==="Error")||!A&&!U?void 0:"disabled",we=m.useMemo((()=>qe(o.userRole)),[o.userRole]),Ae=Ye(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&x.fetchState==="Completed"&&Ke(x.notificationSettings,p.userEmail,N,o,k),Q=da(),Fe=Q&&ca(a);return _.jsx(Ea,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?me:q!=null?[q]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:Q,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),W=e.type,_e=ae(W)&&W!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),_e&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=ga(e.type);Sa(e.type)?(G!=null&&r(We()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ba({dispatch:r,navigate:n,pathToNavigate:ha(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{E.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Qe({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:he,isTaskManagerAccessEnabled:k,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((E=>ne(E))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(E,n)=>{Xe(n)&&Ue(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ta,{...l,...a})};export{Ba as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-e6rGc1UF.js";import{h as r,l as n}from"./core-CHD8T-IM.js";import{an as i}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import"./sentry-DsyKtMW2.js";import"./zeni-epic-state-BO3zdDfL.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.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]="3be885cb-07f5-4896-9ae7-ddcb5a1e09f4",o._sentryDebugIdIdentifier="sentry-dbid-3be885cb-07f5-4896-9ae7-ddcb5a1e09f4")}catch{}})();const a=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-
|
|
1
|
+
import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-e6rGc1UF.js";import ut from"./NotFoundScreen-CtgFRYZy.js";import{a as k}from"./sentry-DsyKtMW2.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as Y}from"./core-CHD8T-IM.js";import{cA as It,U1 as J,fF as K,h1 as Tt,U5 as S,a0$ as Q,Ub as m,T$ as y,Ar as j,G8 as Ct,a10 as At,T_ as yt,Ud as Et,Aw as _t,a11 as $,br as F,gh as x,AA as z,a12 as Nt,cM as wt,cF as Bt}from"./zeni-epic-state-BO3zdDfL.js";import{ar as xt,c as Ut,N as vt,f as Dt,at as Rt,dL as Gt,p as w,dM as Pt,w as Mt,dN as $t,i as Ft,a5 as jt}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-BcCbRGDK.js";import{u as Lt}from"./useTaskManagerAccess-CUv6a62x.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="6ef0b39a-6948-4438-8d28-e0fb0fcfeaf3",t._sentryDebugIdIdentifier="sentry-dbid-6ef0b39a-6948-4438-8d28-e0fb0fcfeaf3")}catch{}})();const Wt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),qt=bt((function(t,l){const n=J(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=K(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=w(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=w(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(z("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t($([a],F())));let i=`/${h}/${r[1]}`;const T=w(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!wt(g)&&(i="not-found"),r[1].startsWith("bill")&&!Bt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(y(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(Q(a,s));const d=`../${a}`,r=w(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(z("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Wt(o,I).then((()=>{t($(o,F())),t(m({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((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=w(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Mt($t)),Ht=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),a=b((e=>J(e))),s=b((e=>K(e))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((e=>S(e).notificationDetailsByTab.tasks.fetchState)),L=b((e=>S(e).currentTab)),D=b((e=>S(e).currentSubTab)),tt=b((e=>S(e).notificationDetailsByTab.comments.fetchCountState)),R=b((e=>S(e).notificationDetailsByTab.comments.fetchState)),et=b((e=>S(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=b((e=>S(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:B,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:W,isLoading:q,fetchMore:H,isFetchingMore:O,hasFetchedAll:X}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(Q(c)),c==null){const e=`../${L}`,p=w(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&B!=null){const e=`dashboard_${s.companyId}`,p=B.filter((A=>A.roomId===e&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const P=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect((()=>{P&&R!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||R!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,R]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&q===!1&&B!=null&&W!=null){const e=`dashboard_${s.companyId}`,p=B.filter((u=>u.roomId===e)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=W.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(O||X===!0||H==null||H(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,O,C,X,q,B?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(qt,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(St,{children:[N.jsx(Y,{path:"/:selectedTab",element:N.jsx(Ht,{})}),N.jsx(Y,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-e6rGc1UF.js";import{a as r}from"./sentry-DsyKtMW2.js";import{u as j,g as A,j as o,N as C}from"./core-CHD8T-IM.js";import{UE as P,fF as x,gm as z,UF as D,UG as M,UH as R,UI as F,pS as k,Tj as L}from"./zeni-epic-state-BO3zdDfL.js";import{z as h,ai as I}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="e3455a42-91d2-4bba-97a0-8d29f99e4003",n._sentryDebugIdIdentifier="sentry-dbid-e3455a42-91d2-4bba-97a0-8d29f99e4003")}catch{}})();function ee(){const n=j(),a=A(),{params:t,error:i}=r.useMemo((()=>P(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o((e=>x(e))),l=o((e=>z(e))),d=o((e=>e.tenantState.fetchState)),y=o(D),b=o(M),u=o(R),[S,U]=r.useState(null),[v,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(F())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[m?.tenantId,l]),c=S??_;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:U,approveError:v??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(L(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(C,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-CMfowbmP.js → PandLWithForecastRoutes-DAq9XRB1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-e6rGc1UF.js";import{h as Y,u as G,g as z,i as Z,j as d,l as H,n as J,o as S}from"./core-CHD8T-IM.js";import{fF as v,Ac as R,v5 as K,Vw as w,v0 as C,bq as Q,b$ as X,v1 as ee,Vx as ae,Ve as y,ei as te,E0 as se,Vy as oe,Eo as re,d_ as ne,dZ as ce}from"./zeni-epic-state-BO3zdDfL.js";import{aj as ie,z as le,ar as de,at as me,W as fe,a9 as pe,k as M,aE as ue,p as he,N as Fe,f as ge}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import Ie from"./NotFoundScreen-CtgFRYZy.js";import{F as be}from"./FeaturePreviewScreen-D54Nwanb.js";import{a as F}from"./sentry-DsyKtMW2.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-BcCbRGDK.js";import{u as ye}from"./useInitialThreadRequest-DDr_z_RH.js";import{t as Ce}from"./routePaths-CGyE-cU7.js";import{M as Te}from"./MobileAppDrawer-DX2JnkbM.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";import"./InboxNotificationsProvider-x0fdv66l.js";import"./useTaskManagerAccess-CUv6a62x.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]="169971b6-c4e3-4c7e-9097-347b2a2891e2",s._sentryDebugIdIdentifier="sentry-dbid-169971b6-c4e3-4c7e-9097-347b2a2891e2")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(C(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ce(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(y({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=Y(),a=G(),o=z(),{forecastId:r,tenantEmailDomain:c}=Z(),[p,u]=F.useState(!1),[m,x]=F.useState(!1),g=le.getSignedInUser(),A=d((t=>v(t))),_=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:V}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(K());else if(l&&!m){x(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&I&&a(C(i.forecasts[t].id))}}),[p,u,a,l,i,m,x,R,C,I]);const E=fe(),B=E?.loggedInUserRole!=null&&Q(E.loggedInUserRole),$=ye(A?.companyId,{clearParams:l&&m}),[q,W]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const L=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:q,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:X(h.toString()),hasTransactionAccess:B,isAiCfoAccessEnabled:N,onAskAiCfoClick:V,initialOpenThreadRequest:$,onClickMenuIcon:()=>{L(!0)}})]})}function Ze(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(J,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-e6rGc1UF.js";import{a as p}from"./sentry-DsyKtMW2.js";import{I as d,J as r,aa as m,ae as f,af as h}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import{i as y}from"./core-CHD8T-IM.js";import"./zeni-epic-state-BO3zdDfL.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.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]="66bdd2db-a060-4670-9d3a-ab2391de9900",e._sentryDebugIdIdentifier="sentry-dbid-66bdd2db-a060-4670-9d3a-ab2391de9900")}catch{}})();const g=d("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-e6rGc1UF.js";import{Vs as re,fF as N,l$ as G,d_ as Y,dZ as le,Sj as J,UR as de,CX as Pe,Vt as q,CM as je,D5 as Le,C$ as ce,CQ as pe,D3 as ve,D0 as Te,Vu as ue,sq as Ve,g6 as Ae,gD as Fe,Vv as _,CU as me,CT as ge,D8 as Re,c8 as Oe}from"./zeni-epic-state-BO3zdDfL.js";import{a2 as fe,N as Q,f as H,z as W,g as Ce,X as he,ag as ye,aA as be,aB as Ue,ac as Se,J as R,ah as De,G as K,aC as Ze,ar as Be,at as $e,a9 as ze,k as we,U as _e,p as He,aD as Ge,W as We}from"./index-DKH4PK2B.js";import{D as xe,n as M,S as Ie}from"./mui-NTaF3UaY.js";import ae from"./NotFoundScreen-CtgFRYZy.js";import{a as d}from"./sentry-DsyKtMW2.js";import{u as ee,i as Ke,j as g,h as Me,g as Xe,l as qe,n as se,o as z}from"./core-CHD8T-IM.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-BcCbRGDK.js";import{M as Ye}from"./MobileAppDrawer-DX2JnkbM.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";import"./InboxNotificationsProvider-x0fdv66l.js";import"./useTaskManagerAccess-CUv6a62x.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]="478a7d7d-443d-42a5-a23e-46d071ebc950",e._sentryDebugIdIdentifier="sentry-dbid-478a7d7d-443d-42a5-a23e-46d071ebc950")}catch{}})();const Je={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,U]=d.useState(!1),[k,S]=d.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:x}=Q(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),v=le(p),T=J(p),Z=de(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(q()),b()},V=()=>{O===!0?S(!0):h()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),U(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ue,{...s})]})})},ea=M(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-e6rGc1UF.js";import E from"./NotFoundScreen-CtgFRYZy.js";import{a as r}from"./sentry-DsyKtMW2.js";import{h as _,g as v,j as p,i as M,u as U,N as F,l as O,n as P,o as h}from"./core-CHD8T-IM.js";import{fF as z,a13 as b,bo as B,bn as N,iL as V,gh as L}from"./zeni-epic-state-BO3zdDfL.js";import{F as $,z as I,at as q,dO as G}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BcCbRGDK.js";import{M as J}from"./MobileAppDrawer-DX2JnkbM.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";import"./InboxNotificationsProvider-x0fdv66l.js";import"./useTaskManagerAccess-CUv6a62x.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]="aa4ffff6-daf5-4e24-934a-87cc938f85fb",e._sentryDebugIdIdentifier="sentry-dbid-aa4ffff6-daf5-4e24-934a-87cc938f85fb")}catch{}})();const K=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)}}}))(G),Q=()=>{const e=_(),t=v(),c=$(),o=p((a=>z(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const l=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,f=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&l.current&&(u(L({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),l.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||f(a,i,!0),l.current=!0}),[n?.fetchState,f]),j=r.useCallback(((a,i)=>{f(a,i,!1)}),[f]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(F,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(P,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-DsyKtMW2.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-
|
|
1
|
+
import{j as _l}from"./liveblocks-e6rGc1UF.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-DsyKtMW2.js";import{L as ge,b$ as xc,fF as kc,TZ as Tc,UP as jl,c8 as xl}from"./zeni-epic-state-BO3zdDfL.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-CCA3F0sZ.js";import{r as cn}from"./empty-CeRjDJvl.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-CSbJ_JNk.js";import{a as Ye,r as Fl}from"./index-BVHBHjSe.js";import{r as Ul}from"./index-CKiMoeFX.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-CHD8T-IM.js";import{u as Zl,z as Rc,L as Hl,al as Vl,am as Yl,_ as Wl,D as Kl}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import{d as It}from"./decodeURIComponentSafe-p_nrn8Pg.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]="3b42dba9-524b-4666-9073-b3bfeebc6cc1",e._sentryDebugIdIdentifier="sentry-dbid-3b42dba9-524b-4666-9073-b3bfeebc6cc1")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(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 i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.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 t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=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},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={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(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-e6rGc1UF.js";import Z from"./NotFoundScreen-CtgFRYZy.js";import{a as p}from"./sentry-DsyKtMW2.js";import{h as C,g as D,u as N,j as u,N as V,l as k,n as z,o as g}from"./core-CHD8T-IM.js";import{fF as E,Z9 as h,Zq as w,NK as U,NG as L,NJ as f,Nz as B,ZP as $,ND as K,NM as q}from"./zeni-epic-state-BO3zdDfL.js";import{z as T,w as O,cb as F,r as W,bU as G,cc as J}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import{u as M,R as x}from"./ReimbursementApprovalRuleDetailScreen-BT_O_PEv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b88c8676-d308-4b56-a795-a3ebeba46cb3",e._sentryDebugIdIdentifier="sentry-dbid-b88c8676-d308-4b56-a795-a3ebeba46cb3")}catch{}})();const j="reimbursement-approval-rule-update",P=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e($(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(O(F)),H=({isLoading:e})=>{const s=C(),n=D(),a=N(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),b=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),S=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{S?.updateStatus.fetchState==="Completed"&&a(U())}),[S]),p.useEffect((()=>{t||b!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=k((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e($(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))(O(J)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(H,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=D(),a=N(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[b,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),S=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));M();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||S!=="Not-Started"||e||(R(!0),a(K(!1,!0)))}),[v,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(b||(c(!0),a(f())),s("./new"))}),[b,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-e6rGc1UF.js";import{a as f}from"./sentry-DsyKtMW2.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-CHD8T-IM.js";import{mr as Z,Zq as w,Z9 as C,NC as k,NP as B,NK as A,NL as E,Zr as j,fF as K,NJ as z}from"./zeni-epic-state-BO3zdDfL.js";import{z as F,E as P,a8 as q,c2 as J,r as L,bU as W,c3 as G}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f37d9c8e-168f-4b2c-9df9-801a6f38d2f1",e._sentryDebugIdIdentifier="sentry-dbid-f37d9c8e-168f-4b2c-9df9-801a6f38d2f1")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const M=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=L(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const R=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=d.actors.selectedNonUsers.map((m=>{const y=(I=m.value,j(I)==null);var I;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(J);function Q(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>w(n))),l=g((n=>C(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=L(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,$=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=$.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>K(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>w(n))),l=g((n=>C(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CIxx6Ub6.js";import{u as ne,j as k,h as X,g as K,i as se,N as P,l as Q,q as lt,n as mt,o as E}from"./core-Caq7Zbsp.js";import{fF as V,NG as ct,_U as be,c8 as ge,MM as Ue,ma as dt,M$ as me,M_ as ce,_V as ut,bn as he,gV as $e,_W as pt,WT as bt,l$ as Fe,WU as Ae,WV as gt,kN as ht,YX as ft,l0 as St,MA as It,Cd as yt,kU as Rt,Nl as Le,_X as Me,_Y as ke,_Z as vt,__ as At,_$ as kt,N5 as Ce,l6 as Ct,Z4 as wt,MZ as Et,MK as xt,$0 as Bt,MJ as Tt,$1 as Dt,MR as we,N9 as jt,N8 as Ut,N4 as $t,$2 as _e,Sj as Ft,bo as Lt,MU as Mt,ND as _t,$3 as Pt,$4 as Nt,Nh as Ot,Ne as Ee,Yr as Zt,MH as Gt,$5 as Pe,O4 as xe,Oc as zt,$6 as Vt,$7 as Y,$8 as Wt,$9 as Ne,$a as Ht,$b as Oe,$c as Ze,Nt as de,bu as qt,bK as fe,cM as Se,d_ as Ge,dZ as ze,$d as Yt,gh as Jt,YE as Kt,$e as Xt,$f as Ve,YI as Qt,Zq as en,$g as tn,ZP as nn,O9 as Be,O8 as an,$h as sn,$i as on,$j as rn,$k as ln,$l as mn,Za as cn,N$ as dn,O3 as un,bq as pn,bJ as bn,cG as gn,cu as hn,bt as fn,Ui as Sn,da as In,dd as yn,dc as Rn,cF as vn}from"./zeni-epic-state-DROyxOLw.js";import{bU as An,F as We,a2 as He,N as ie,f as j,z as F,cT as qe,a9 as oe,k as C,aT as Te,J as D,af as ae,ag as kn,G as Ye,cU as Cn,p as J,at as Je,cV as wn,W as re,cW as En,ar as xn,ac as Bn,a8 as Ie,U as Ke,w as Tn,bC as Dn,aw as jn,aj as Un,E as Xe,cX as $n,g as Fn}from"./index-BFK4rLhv.js";import{n as N,S as Ln}from"./mui-DI0hUuFr.js";import ue from"./NotFoundScreen-CQm7D9go.js";import{S as De}from"./SetupPagesScreen-Ctwh4sou.js";import{F as Qe}from"./FeaturePreviewScreen-BOIyRrPg.js";import{a as f}from"./sentry-BCPOyc0G.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-0MZcMlGZ.js";import{u as et}from"./useInitialThreadRequest-DCnYqu0o.js";import{D as Mn}from"./DrawerScreen-D1drFQnx.js";import{M as tt}from"./MobileAppDrawer-BzxL_djZ.js";import{F as _n}from"./ScreenRoutes-DivUQ8Cf.js";import{R as Pn}from"./ReimbursementApprovalRoutes-BUfIlnAM.js";import"./recharts-DKmpCGIA.js";import"./analytics-CiEh1qKr.js";import"./plaid-CXvI7t9H.js";import"./dnd-DwckO6rX.js";import"./stripe-cKAAJElX.js";import"./lottie-CrKh4Q_r.js";import"./lexical-mmp2B1vq.js";import"./pdf-BlhN83fm.js";import"./utils-rX2IEvjD.js";import"./BusinessVerificationPageScreen-e_hf599B.js";import"./routePaths-BpLibSFl.js";import"./analyticsHelper-CyJSZC50.js";import"./InboxNotificationsProvider-DcarX1j5.js";import"./useTaskManagerAccess-DR584Qqx.js";import"./getLocaleForTenant-CqonawWC.js";import"./ReimbursementApprovalRuleDetailScreen-Si973dRZ.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]="ef2dc073-3297-4707-98b1-5bf46a89cf84",e._sentryDebugIdIdentifier="sentry-dbid-ef2dc073-3297-4707-98b1-5bf46a89cf84")}catch{}})();const nt=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"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ye.getLocalizedStrings(),On=Q((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=$e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(xt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Et({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(ke({}));const i=nt(o),l=J(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(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(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=X(),t=ne(),n=K(),{reimbursementId:r}=se(),c=We(),d=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:x}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=K().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[R,w]=f.useState(!1),h=F.getSignedInUser(),v=k((p=>V(p))),g=k((p=>be(p,r))),L=et(v?.companyId,{clearParams:g.fetchState==="Completed"}),U=ge(v?.userRole??[]);(function(){const p=ne(),M=k((_=>V(_))),O=M?.tenantId,{isApprovalRulesV3Enabled:W,isLoading:Z}=An(O),H=k((_=>_.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||H==="Not-Started"&&p(ct(!0,!1,!1,W))}),[O,Z,W,H,p])})(),f.useEffect((()=>{(T&&!R||B&&!R&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(Ue(!1,b,y,r)))}));const $=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={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(P,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(M=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Gn,{}):null,m&&d!=="small"?s.jsx(zn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:v,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:x})})]})}const Zn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-e6rGc1UF.js";import{u as ne,j as k,h as X,g as K,i as se,N as P,l as Q,q as lt,n as mt,o as E}from"./core-CHD8T-IM.js";import{fF as V,NG as ct,_U as be,c8 as ge,MM as Ue,ma as dt,M$ as me,M_ as ce,_V as ut,bn as he,gV as $e,_W as pt,WT as bt,l$ as Fe,WU as Ae,WV as gt,kN as ht,YX as ft,l0 as St,MA as It,Cd as yt,kU as Rt,Nl as Le,_X as Me,_Y as ke,_Z as vt,__ as At,_$ as kt,N5 as Ce,l6 as Ct,Z4 as wt,MZ as Et,MK as xt,$0 as Bt,MJ as Tt,$1 as Dt,MR as we,N9 as jt,N8 as Ut,N4 as $t,$2 as _e,Sj as Ft,bo as Lt,MU as Mt,ND as _t,$3 as Pt,$4 as Nt,Nh as Ot,Ne as Ee,Yr as Zt,MH as Gt,$5 as Pe,O4 as xe,Oc as zt,$6 as Vt,$7 as Y,$8 as Wt,$9 as Ne,$a as Ht,$b as Oe,$c as Ze,Nt as de,bu as qt,bK as fe,cM as Se,d_ as Ge,dZ as ze,$d as Yt,gh as Jt,YE as Kt,$e as Xt,$f as Ve,YI as Qt,Zq as en,$g as tn,ZP as nn,O9 as Be,O8 as an,$h as sn,$i as on,$j as rn,$k as ln,$l as mn,Za as cn,N$ as dn,O3 as un,bq as pn,bJ as bn,cG as gn,cu as hn,bt as fn,Ui as Sn,da as In,dd as yn,dc as Rn,cF as vn}from"./zeni-epic-state-BO3zdDfL.js";import{bU as An,F as We,a2 as He,N as ie,f as j,z as F,cT as qe,a9 as oe,k as C,aT as Te,J as D,af as ae,ag as kn,G as Ye,cU as Cn,p as J,at as Je,cV as wn,W as re,cW as En,ar as xn,ac as Bn,a8 as Ie,U as Ke,w as Tn,bC as Dn,aw as jn,aj as Un,E as Xe,cX as $n,g as Fn}from"./index-DKH4PK2B.js";import{n as N,S as Ln}from"./mui-NTaF3UaY.js";import ue from"./NotFoundScreen-CtgFRYZy.js";import{S as De}from"./SetupPagesScreen-fuvb0IYd.js";import{F as Qe}from"./FeaturePreviewScreen-D54Nwanb.js";import{a as f}from"./sentry-DsyKtMW2.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BcCbRGDK.js";import{u as et}from"./useInitialThreadRequest-DDr_z_RH.js";import{D as Mn}from"./DrawerScreen-B5BqRZEJ.js";import{M as tt}from"./MobileAppDrawer-DX2JnkbM.js";import{F as _n}from"./ScreenRoutes-xDjhbdP1.js";import{R as Pn}from"./ReimbursementApprovalRoutes-CE6y6IwA.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";import"./BusinessVerificationPageScreen-DFamYzxa.js";import"./routePaths-CGyE-cU7.js";import"./analyticsHelper-BEL0ra9X.js";import"./InboxNotificationsProvider-x0fdv66l.js";import"./useTaskManagerAccess-CUv6a62x.js";import"./getLocaleForTenant-D-or0iZO.js";import"./ReimbursementApprovalRuleDetailScreen-BT_O_PEv.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]="ef2dc073-3297-4707-98b1-5bf46a89cf84",e._sentryDebugIdIdentifier="sentry-dbid-ef2dc073-3297-4707-98b1-5bf46a89cf84")}catch{}})();const nt=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"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ye.getLocalizedStrings(),On=Q((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=$e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(xt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Et({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(ke({}));const i=nt(o),l=J(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(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(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=X(),t=ne(),n=K(),{reimbursementId:r}=se(),c=We(),d=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:x}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=K().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[R,w]=f.useState(!1),h=F.getSignedInUser(),v=k((p=>V(p))),g=k((p=>be(p,r))),L=et(v?.companyId,{clearParams:g.fetchState==="Completed"}),U=ge(v?.userRole??[]);(function(){const p=ne(),M=k((_=>V(_))),O=M?.tenantId,{isApprovalRulesV3Enabled:W,isLoading:Z}=An(O),H=k((_=>_.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||Z||H==="Not-Started"&&p(ct(!0,!1,!1,W))}),[O,Z,W,H,p])})(),f.useEffect((()=>{(T&&!R||B&&!R&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(Ue(!1,b,y,r)))}));const $=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={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(P,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(M=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Gn,{}):null,m&&d!=="small"?s.jsx(zn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:v?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:v,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:x})})]})}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-CIxx6Ub6.js";import{g as K,h as Ve,u as Fe,i as Oe,j as d,l as De,n as Ae,o as X}from"./core-Caq7Zbsp.js";import{fF as N,Eb as R,UQ as Pe,l$ as ne,ua as re,u$ as D,lG as Ee,lP as A,lH as P,kK as E,kB as U,kA as Ue,Dj as le,v4 as Le,bq as Me,UR as Be,bn as ve,Ey as xe,US as ze,UT as Ge,ci as g,Dc as He,UU as J,UV as Ye,UW as $e,UX as Ne,UY as qe,UZ as Ze,U_ as Qe,U$ as We,V0 as Ke,V1 as Xe,V2 as Je,V3 as ea,V4 as aa,V5 as j,V6 as L,V7 as M,V8 as B,V9 as v,Va as x,Vb as z,Vc as G,Vd as H,Ve as Y,ei as sa,Ec as ta,D$ as ee,E0 as ae,Ei as oa,E4 as se,Eo as na,Vf as ra,Vg as la,Vh as ca,Vi as ia,Vj as da,Vk as pa,Vl as _a,Vm as fa,Vn as ma,Vo as ua,d_ as ba,dZ as ha}from"./zeni-epic-state-DROyxOLw.js";import{ao as ya,ap as wa,aq as Ca,a as Sa,a2 as ga,N as ce,f as ie,z as de,ar as Ia,W as Ra,d as Ta,as as ja,at as ka,a9 as Va,k as $,U as Fa,y as Oa,p as pe,au as Da,av as Aa,aw as Pa}from"./index-BFK4rLhv.js";import"./mui-DI0hUuFr.js";import Ea from"./NotFoundScreen-CQm7D9go.js";import{F as Ua}from"./FeaturePreviewScreen-BOIyRrPg.js";import{a as u}from"./sentry-BCPOyc0G.js";import{u as La}from"./useInitialThreadRequest-DCnYqu0o.js";import{t as te,a as oe,b as Ma}from"./routePaths-BpLibSFl.js";import{M as Ba}from"./MobileAppDrawer-BzxL_djZ.js";import"./recharts-DKmpCGIA.js";import"./analytics-CiEh1qKr.js";import"./plaid-CXvI7t9H.js";import"./dnd-DwckO6rX.js";import"./stripe-cKAAJElX.js";import"./lottie-CrKh4Q_r.js";import"./lexical-mmp2B1vq.js";import"./pdf-BlhN83fm.js";import"./utils-rX2IEvjD.js";import"./InboxNotificationsProvider-DcarX1j5.js";import"./useTaskManagerAccess-DR584Qqx.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]="6832ca69-7f0a-41e3-99a1-4c0e782ca029",e._sentryDebugIdIdentifier="sentry-dbid-6832ca69-7f0a-41e3-99a1-4c0e782ca029")}catch{}})();const va=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(L({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=N(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Be(m);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,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:$,isZeniUser:ve(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(J({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(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(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(L({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(L({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(We({viewMode:a})),e(Ke({viewMode:a}))):r?(e(Xe({viewMode:a})),e(Je({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e(qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ye({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(Ne({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(J({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?U():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):U(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=Ve(),s=Fe(),t=K(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[q,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const V=d((n=>N(n))),fe=V.masterTOSInfo?.isMasterTOSAccepted??!1,me=V.company?.companyInfo.firstMonthOfFY??1,ue=La(V?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Pe(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!q&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,q,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Le(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Ue(h.timeframe));break;case"balance_sheet_by_classes":T&&s(U());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ee(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&Me(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),Q=n=>{Se(n)},ge=Ta(),Ie=ja();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=K(),W=ya(Te??"")==="reports",je=wa(Re),ke=u.useMemo((()=>W?va:void 0),[W]);Ca({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Va,{analytics:$,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Ba,{isAppContentDrawerOpen:Ce,handleDrawerToggle:Q}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:Q,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>N(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(Ua,{}):p.jsxs(Ae,{children:[p.jsx(X,{path:"/",element:p.jsx(Ga,{})}),p.jsx(X,{path:"*",element:p.jsx(Ea,{})})]})}export{ps as default};
|
|
1
|
+
import{j as p}from"./liveblocks-e6rGc1UF.js";import{g as K,h as Ve,u as Fe,i as Oe,j as d,l as De,n as Ae,o as X}from"./core-CHD8T-IM.js";import{fF as N,Eb as R,UQ as Pe,l$ as ne,ua as re,u$ as D,lG as Ee,lP as A,lH as P,kK as E,kB as U,kA as Ue,Dj as le,v4 as Le,bq as Me,UR as Be,bn as ve,Ey as xe,US as ze,UT as Ge,ci as g,Dc as He,UU as J,UV as Ye,UW as $e,UX as Ne,UY as qe,UZ as Ze,U_ as Qe,U$ as We,V0 as Ke,V1 as Xe,V2 as Je,V3 as ea,V4 as aa,V5 as j,V6 as L,V7 as M,V8 as B,V9 as v,Va as x,Vb as z,Vc as G,Vd as H,Ve as Y,ei as sa,Ec as ta,D$ as ee,E0 as ae,Ei as oa,E4 as se,Eo as na,Vf as ra,Vg as la,Vh as ca,Vi as ia,Vj as da,Vk as pa,Vl as _a,Vm as fa,Vn as ma,Vo as ua,d_ as ba,dZ as ha}from"./zeni-epic-state-BO3zdDfL.js";import{ao as ya,ap as wa,aq as Ca,a as Sa,a2 as ga,N as ce,f as ie,z as de,ar as Ia,W as Ra,d as Ta,as as ja,at as ka,a9 as Va,k as $,U as Fa,y as Oa,p as pe,au as Da,av as Aa,aw as Pa}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import Ea from"./NotFoundScreen-CtgFRYZy.js";import{F as Ua}from"./FeaturePreviewScreen-D54Nwanb.js";import{a as u}from"./sentry-DsyKtMW2.js";import{u as La}from"./useInitialThreadRequest-DDr_z_RH.js";import{t as te,a as oe,b as Ma}from"./routePaths-CGyE-cU7.js";import{M as Ba}from"./MobileAppDrawer-DX2JnkbM.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.js";import"./InboxNotificationsProvider-x0fdv66l.js";import"./useTaskManagerAccess-CUv6a62x.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]="6832ca69-7f0a-41e3-99a1-4c0e782ca029",e._sentryDebugIdIdentifier="sentry-dbid-6832ca69-7f0a-41e3-99a1-4c0e782ca029")}catch{}})();const va=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(L({resetLeftScroll:!0})),e(B({resetLeftScroll:!0})),e(M({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ua())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=N(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Be(m);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,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:$,isZeniUser:ve(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(I(a)||g(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(J({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(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(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ma(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(v({scrollPosition:s}));break;case"cash_flow_by_classes":e(B({scrollPosition:s}));break;case"cash_flow_by_projects":e(M({scrollPosition:s}));break;case"cash_flow":e(L({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(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(L({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=g(t);l?(e(We({viewMode:a})),e(Ke({viewMode:a}))):r?(e(Xe({viewMode:a})),e(Je({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{g(o.selectedReportID)?e(qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{g(o.selectedReportID)?e(Ye({projectsToFilterOut:a})):I(o.selectedReportID)?e($e({projectsToFilterOut:a})):e(Ne({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(J({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=g(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?U():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):U(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=ga(),m=Aa(_),a=Ve(),s=Fe(),t=K(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=u.useState(!1),[q,_e]=u.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const V=d((n=>N(n))),fe=V.masterTOSInfo?.isMasterTOSAccepted??!1,me=V.company?.companyInfo.firstMonthOfFY??1,ue=La(V?.companyId),C=d((n=>R(n).fetchState)),be=d((n=>Pe(n))),{areTenantIdsInSync:b}=Ia(),F=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>ne(n))),S=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!q&&C==="Completed"&&b&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,q,C,b]),u.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Le(h.timeframe));break;case"profit_and_loss_by_projects":S&&s(le());break;case"balance_sheet":s(Ue(h.timeframe));break;case"balance_sheet_by_classes":T&&s(U());break;case"balance_sheet_by_projects":S&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":S&&s(A());break;case"cash_flow":s(Ee(h.timeframe))}}),[c,F,O,b,T,S]);const Z=Ra(),we=Z?.loggedInUserRole!=null&&Me(Z?.loggedInUserRole)!==!0,[Ce,Se]=u.useState(!1),Q=n=>{Se(n)},ge=Ta(),Ie=ja();return(function(n){const{isDataReady:Re}=n,{pathname:Te}=K(),W=ya(Te??"")==="reports",je=wa(Re),ke=u.useMemo((()=>W?va:void 0),[W]);Ca({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Va,{analytics:$,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Ba,{isAppContentDrawerOpen:Ce,handleDrawerToggle:Q}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:$,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:S,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:Q,reportsResyncFetchState:be.reportsResyncFetchState,isAiCfoAccessEnabled:Ie&&ge&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:ue})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>N(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ba(_,e),a=ha(e);return m===!0||a===!0?p.jsx(Ua,{}):p.jsxs(Ae,{children:[p.jsx(X,{path:"/",element:p.jsx(Ga,{})}),p.jsx(X,{path:"*",element:p.jsx(Ea,{})})]})}export{ps as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-e6rGc1UF.js";import{z as w,a9 as v,k as u,U as k,e3 as D,N as E,f as I}from"./index-DKH4PK2B.js";import"./mui-NTaF3UaY.js";import g from"./NotFoundScreen-CtgFRYZy.js";import{a as m}from"./sentry-DsyKtMW2.js";import{u as C,j as h,h as F,g as L,l as U,n as T,o as d,N as y}from"./core-CHD8T-IM.js";import{fF as _,a1$ as j,a20 as p,DS as P,p$ as V,a21 as $,DQ as z}from"./zeni-epic-state-BO3zdDfL.js";import"./recharts-C6xUtcdL.js";import"./analytics-C3e3An3a.js";import"./plaid-DdTo7m1-.js";import"./dnd-Dwi6R-ey.js";import"./stripe-cKAAJElX.js";import"./lottie-B778bt56.js";import"./lexical-CMNdypK6.js";import"./pdf-Bx92ZlM_.js";import"./utils-CCA3F0sZ.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]="ac2589e5-c046-4299-9f97-e5c0dc4daab3",e._sentryDebugIdIdentifier="sentry-dbid-ac2589e5-c046-4299-9f97-e5c0dc4daab3")}catch{}})();const G=U((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e($({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(D),Q=()=>{const e=C(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>_(o))),c=F(),x=L(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),b=f?.firstName!=null?f.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(v,{analytics:u,onLoad:o=>(S=>S.trackPageLoaded(k.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:N,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=E(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(Q,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as y}from"./liveblocks-
|
|
1
|
+
import{j as y}from"./liveblocks-e6rGc1UF.js";import{a as A}from"./sentry-DsyKtMW2.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-CHD8T-IM.js";import{WO as Fe,WP as Ve,l$ as ae,su as Me,sG as Ge,sW as $e,sU as Re,sX as Ke,sZ as Ue,WQ as We,fF as K,VN as pe,WR as Se,g_ as ne,cB as se,cC as le,Fg as ve,WS as Ce,Fk as Ye,gO as ce,sx as ze,t6 as qe,dD as Ze,dC as Xe,T9 as fe,Fe as He,F8 as Qe,WT as De,F0 as et,E$ as tt,EW as at,F5 as nt,Fl as st,WU as W,WV as ge,F1 as lt,VO as oe,FB as Ae,Fu as Ie,WW as xe,sA as Te,Fo as Be,Fm as Le,WX as we,FI as Je,FF as be,Fp as je,FH as _e}from"./zeni-epic-state-BO3zdDfL.js";import{a5 as de,aZ as ie,a_ as ct,z as ot,l as dt,a8 as it,a9 as ue,k as N,aw as ut,a$ as rt,p as V,G as ke,F as ye,b0 as ht,b1 as mt,b2 as pt}from"./index-DKH4PK2B.js";import{n as re}from"./mui-NTaF3UaY.js";import{p as St}from"./pathToGoBack-3T3qt1CN.js";import X from"./NotFoundScreen-CtgFRYZy.js";import{c as M}from"./routePaths-CGyE-cU7.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]="e99e984d-4440-4056-b91e-8fdaca330e16",e._sentryDebugIdIdentifier="sentry-dbid-e99e984d-4440-4056-b91e-8fdaca330e16")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(X,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(We({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|