@zeniai/web-app-ui 5.3.99-dev → 5.4.0-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-Cwa6Sncr.js → AccountMappingScreen-C2C4zH5m.js} +2 -2
- package/dist/assets/ActualMatchingMatchDetailScreen-uOouLTdJ.js +1 -0
- package/dist/assets/AddressRoutes-rRGgOalD.js +1 -0
- package/dist/assets/AddressScreen-m3xjJnea.js +9 -0
- package/dist/assets/{AiCfoScreen-DNDihu3K.js → AiCfoScreen-CapxKjog.js} +4 -4
- package/dist/assets/{AppDrawer-Cupbn6L3.js → AppDrawer-8pMWOJ6_.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-sOvVtkKV.js → BillPayApprovalRoutes-DHrHu0Vd.js} +1 -1
- package/dist/assets/{BillPayRoutes-DAZ2LiAE.js → BillPayRoutes-pA7W43p9.js} +8 -8
- package/dist/assets/{BusinessVerificationPageScreen-CpAzjlh5.js → BusinessVerificationPageScreen-CtZemYag.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-BP02_M1s.js → CardsAiCfoScreen-CMNlQI95.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Ba3x5MoU.js → ChargeCardRoutes-D3pF0G97.js} +8 -8
- package/dist/assets/CompanyPassportScreen-BQpmcQ9U.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-CDQ0Sa51.js → ConnectionAuthScreen-CaZ_FsHQ.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-kVruoIT4.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-B3teunq3.js → CustomerOnboardingRoutes-5tz4dVmf.js} +3 -3
- package/dist/assets/DashboardRoutes-DnXtUEp9.js +20 -0
- package/dist/assets/{DefaultTenantHome-DNm_mIU1.js → DefaultTenantHome-xfJBvDAt.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CR7En0dd.js +18 -0
- package/dist/assets/{DrawerScreen-B5Qgxoe2.js → DrawerScreen-ag8W0HpS.js} +1 -1
- package/dist/assets/EntityDetailRoutes-DgXKepCX.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-Ce113KIS.js → ExpenseAutomationRoutes-B-RYUofn.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-D6sPZICH.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-B12KbAGI.js → HubSpotOAuthCallbackScreen-CDvqq7oI.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-Bz8aI0zf.js → InboxNotificationsProvider-BtoJ02lN.js} +1 -1
- package/dist/assets/{InvoicingRoutes-IUj-CS51.js → InvoicingRoutes-bRz4oZZc.js} +2 -2
- package/dist/assets/{MagicLinkRoutes-6bWvZ6Ex.js → MagicLinkRoutes-CEyzdF5O.js} +7 -7
- package/dist/assets/MagicLinkSignInScreen-CDt7xxj6.js +12 -0
- package/dist/assets/{MobileAppDrawer-D4DOSbVQ.js → MobileAppDrawer-BARzU42a.js} +1 -1
- package/dist/assets/NotFoundScreen-uCGBbZwh.js +1 -0
- package/dist/assets/{NotificationRoutes-BV6tu0jZ.js → NotificationRoutes-maJX0R_S.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BKzEKwhD.js → OAuthConsentScreen-nqq5hyfJ.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-D1Sv6kLK.js +1 -0
- package/dist/assets/{PaymentLinkScreen-DVW3u8lI.js → PaymentLinkScreen-LmTg1rem.js} +5 -5
- package/dist/assets/PeopleRoutes-BHzXjkBZ.js +22 -0
- package/dist/assets/PerformanceRoutes-B1l3pErz.js +1 -0
- package/dist/assets/{Preview-DSYEA-qi.js → Preview-DRH5kKjM.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BbOyxErb.js → QBOConnectionScreen-CqWSY6LC.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CixN0rww.js → ReimbursementApprovalRoutes-DcjJFXQG.js} +1 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-DCZ84ubG.js +1 -0
- package/dist/assets/{ReimbursementRoutes-B2FNn_0P.js → ReimbursementRoutes-DikZesCB.js} +4 -4
- package/dist/assets/ReportsRoutes-CoPpS7-w.js +1 -0
- package/dist/assets/RewardsRoutes-cMcZkOWr.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DHpH5oJw.js → ScheduleDetailsPrepaidExpensesScreen-YYBFbyPw.js} +4 -4
- package/dist/assets/ScreenRoutes-A1gS3VAs.js +2 -0
- package/dist/assets/{SettingsRoutes-6-0ys-s5.js → SettingsRoutes-EBJwmVpF.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BbFcVR26.js → SetupPagesScreen-CI7udgmS.js} +5 -5
- package/dist/assets/{SignInScreen-mTQjLuAc.js → SignInScreen-DEvF9RGV.js} +1 -1
- package/dist/assets/SignOutScreen-CQk_gjZl.js +9 -0
- package/dist/assets/{TaskListScreen-CW5lbYvD.js → TaskListScreen-B2LnV-iF.js} +2 -2
- package/dist/assets/{TaskRoutes-ssEkwrEi.js → TaskRoutes-D5x3QKKo.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-zecsTEam.js +1 -0
- package/dist/assets/{TransactionDetailScreen-B1no9UdL.js → TransactionDetailScreen-ndvlC0Ay.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DCMjmg_J.js → TransactionListRoutes-XmQRJsk5.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BUhJHYkV.js → TreasuryRoutes-C_94CQ25.js} +5 -5
- package/dist/assets/{VendorsRoutes-C1J2HapW.js → VendorsRoutes-B1jvtxlx.js} +7 -7
- package/dist/assets/{WiseConfirmationScreen-DgUBxs8P.js → WiseConfirmationScreen-DJGg6WFL.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-C4aExMdo.js → ZeniAccountRoutes-BYcuK486.js} +7 -7
- package/dist/assets/ZeniAccountStatementScreen-2DoKolB8.js +9 -0
- package/dist/assets/{accountMappingHelper-CvrKmWxH.js → accountMappingHelper-DIK6ipdq.js} +1 -1
- package/dist/assets/{analytics-DbFSqIth.js → analytics-C1w-0aDX.js} +1 -1
- package/dist/assets/{analyticsHelper-drNlDujn.js → analyticsHelper-8TNWPlLJ.js} +1 -1
- package/dist/assets/{core-C9Jt3gNb.js → core-DQmS6IoY.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Cr8jQXNX.js → decodeURIComponentSafe-CW6B5n7w.js} +1 -1
- package/dist/assets/{dnd-KhFMfpEU.js → dnd-BkAObQW8.js} +1 -1
- package/dist/assets/{empty-DDPaROCO.js → empty-BqcDmrkU.js} +1 -1
- package/dist/assets/{empty-D0s_5kET.js → empty-Dk8_qsQc.js} +1 -1
- package/dist/assets/{emptyVideoElement-LvEbv-wS.js → emptyVideoElement-scIS7v-h.js} +1 -1
- package/dist/assets/{epic-Ds-UlHfx.js → epic-CH-INQ2b.js} +2 -2
- package/dist/assets/{expenseAutomationHelper-D-1MzDTJ.js → expenseAutomationHelper-DSEcmXke.js} +1 -1
- package/dist/assets/{getLocaleForTenant-7mVUFLO-.js → getLocaleForTenant-BlxT1lJh.js} +1 -1
- package/dist/assets/{index-JIbs7_F9.js → index-B-1gKi6p.js} +2 -2
- package/dist/assets/{index-C0qnV65V.js → index-Bych-lqD.js} +1 -1
- package/dist/assets/{index-Xo8KkzkM.js → index-C-lkNrkt.js} +1 -1
- package/dist/assets/{index-CIoiM__n.js → index-CT9iHjgk.js} +1 -1
- package/dist/assets/{index-DmFy--fV.js → index-DRMe8rkL.js} +16212 -16152
- package/dist/assets/{index-B3Xhbg9K.js → index-DW-MdAfq.js} +1 -1
- package/dist/assets/{index-ByO3g4MC.js → index-gxRUPuVr.js} +1 -1
- package/dist/assets/{index-CFbnVkgh.js → index-ktN_K7CH.js} +1 -1
- package/dist/assets/{lexical-CpBrNOz8.js → lexical-DDHrbB2s.js} +1 -1
- package/dist/assets/{liveblocks-Bym0XjRt.js → liveblocks-ClXFfXis.js} +1 -1
- package/dist/assets/{lottie-CvA92JCl.js → lottie-Dxiqblcp.js} +1 -1
- package/dist/assets/{mui-BsgiBiT9.js → mui-3IbG8WRT.js} +1 -1
- package/dist/assets/{pathToGoBack-CMP2hETE.js → pathToGoBack-BzG2fNwf.js} +1 -1
- package/dist/assets/{pdf-O569E9WB.js → pdf-CbQClC4y.js} +3 -3
- package/dist/assets/{pdf-lib-CRTLGVrP.js → pdf-lib-RrzsEOvg.js} +1 -1
- package/dist/assets/{plaid-C8X6T_ms.js → plaid-DHBKfVUI.js} +1 -1
- package/dist/assets/{pusher-CudE88Nt.js → pusher-Dmr6luFq.js} +1 -1
- package/dist/assets/{react-C2Rb5fzR.js → react-1RWP7ld6.js} +1 -1
- package/dist/assets/{react-DvRjMeo2.js → react-B6qQOksS.js} +1 -1
- package/dist/assets/{react-LkPios_L.js → react-BGruhT7s.js} +1 -1
- package/dist/assets/{react-D5axG0I8.js → react-BNg2N8ca.js} +1 -1
- package/dist/assets/{react-DE5Goxu8.js → react-C0F-_pol.js} +1 -1
- package/dist/assets/{react-eTtPELPj.js → react-D1TGDgR7.js} +1 -1
- package/dist/assets/{recharts-GCccddBO.js → recharts-DAXcVNlo.js} +1 -1
- package/dist/assets/reportTimeframe-DJr-1zgz.js +1 -0
- package/dist/assets/{routePaths-DQh6iYo4.js → routePaths-GcjDd0g-.js} +1 -1
- package/dist/assets/{sentry-CoKtZcTW.js → sentry-Bywn7nUR.js} +1 -1
- package/dist/assets/{stripSplatSuffix-B7IfcJr8.js → stripSplatSuffix-Dk1DHu0d.js} +1 -1
- package/dist/assets/{url-llYM4lhi.js → url-DKd4WT89.js} +1 -1
- package/dist/assets/{url-BXei0vv_.js → url-DNpBzH31.js} +1 -1
- package/dist/assets/useActualMatchingMatchDetail-BKwMmdkF.js +1 -0
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-3GfaqAPj.js → useAiCfoDashboardSuggestedQuestionsChips-C4ZjPX57.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CE3uD8e1.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-JxJnisR-.js → useChargeCardPusherEvents-D5Ew5R7P.js} +1 -1
- package/dist/assets/{useDeviceId-Cf3xan56.js → useDeviceId-YxBfbetZ.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-C3pdShKs.js +1 -0
- package/dist/assets/{useEnsureVendorListLoaded-YOFp3iHN.js → useEnsureVendorListLoaded-hsg4Ceo6.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DA5FMzag.js → useInitialThreadRequest-DUk51gK6.js} +1 -1
- package/dist/assets/useTaskManagerAccess-Da7yNvhn.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-CcIRdnMY.js → useTaskManagerPusherEvents-blotLPdC.js} +1 -1
- package/dist/assets/{utils-CNqTTzSx.js → utils-Dt9Z_-ao.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BOIdrs8l.js → withTransactionSidePanel-BAnqT2Vl.js} +2 -2
- package/dist/assets/{zeni-epic-state-OTisIlmp.js → zeni-epic-state-BZdgF4nr.js} +7 -7
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/ActualMatchingMatchDetailScreen-JAoGrJi3.js +0 -1
- package/dist/assets/AddressRoutes-D0QZxsbK.js +0 -1
- package/dist/assets/AddressScreen-hby_CR8D.js +0 -9
- package/dist/assets/CompanyPassportScreen-B7KOuZR_.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CzX3lGuD.js +0 -1
- package/dist/assets/DashboardRoutes-DnxyUY7k.js +0 -20
- package/dist/assets/DomesticWireDetailScreen-Cb0F3Rod.js +0 -18
- package/dist/assets/EntityDetailRoutes--Mqqoc0l.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Bu-JxAVw.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-kYQNLgBh.js +0 -12
- package/dist/assets/NotFoundScreen-D92eiixV.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CcRkLhpt.js +0 -1
- package/dist/assets/PeopleRoutes-DPu9dF6W.js +0 -22
- package/dist/assets/PerformanceRoutes-D8D-QN7a.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-XsqK1nGV.js +0 -1
- package/dist/assets/ReportsRoutes-CJrunnvK.js +0 -1
- package/dist/assets/RewardsRoutes-8HmabMf6.js +0 -1
- package/dist/assets/ScreenRoutes-DAK3aVc9.js +0 -2
- package/dist/assets/SignOutScreen-C7lCXdn2.js +0 -9
- package/dist/assets/TransactionDetailRoutes-DBqh72Ke.js +0 -1
- package/dist/assets/ZeniAccountStatementScreen-Vi4F2dbO.js +0 -9
- package/dist/assets/useActualMatchingMatchDetail-CN5JVNal.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CgHJ-iCU.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-Dv9IT8_0.js +0 -1
- package/dist/assets/useTaskManagerAccess-CpacCRSq.js +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-ClXFfXis.js";import{a as g}from"./sentry-Bywn7nUR.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-DQmS6IoY.js";import{z as r,G as M,O as P,k as A,R as N,Y as R,Z as Y,T as G}from"./index-DRMe8rkL.js";import{fI as J,UJ as W,Va as Z,V1 as $,gl as q,gn as B,V6 as H,gY as K,dl as Q,Vb as X,Vc as ee}from"./zeni-epic-state-BZdgF4nr.js";import{u as te,n as ne}from"./mui-3IbG8WRT.js";import{u as ae}from"./useDeviceId-YxBfbetZ.js";import{f as se}from"./analyticsHelper-8TNWPlLJ.js";import{t as ie}from"./getLocaleForTenant-BlxT1lJh.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="a8441cb6-9dc3-4ea0-a9b8-c99d60f88d63",t._sentryDebugIdIdentifier="sentry-dbid-a8441cb6-9dc3-4ea0-a9b8-c99d60f88d63")}catch{}})();const C=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function Ce(){const t=F(),s=O(),f=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),a=l((e=>e.tenantState.loggedInUser)),o=l((e=>J(e))),b=l((e=>W(e))),E=r.getSignedInUser(),v=te().mode;g.useEffect((()=>{a?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(Z(n,i,m)))}),[n,p,t,i,m,a?.zeniSessionId]),g.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants($(b.tenantsInOrder),a.zeniSessionId),q(a.userId,a.zeniSessionId,o.tenantId),t(B(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(H("Completed")),M.updateAppLocaleID(ie(o)),se(a,o,v,void 0,b.tenantsInOrder),K().then((()=>{const e=G();e!=null&&P(e)})),setTimeout((()=>{A.trackLogin(N.Event.loginSuccess,"email",Q(o.productSettings))}),2e3))}),[I,S,y,a,o,b,v,s.state,t]);const V=g.useCallback((()=>{f("/signin/auth")}),[f]),U=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(X(i,c,d))}),[i,d,t,c]),j=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(ee(e,i,c,d))}),[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:V});if(I==="In-Progress"&&S==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!C(n,p)||m==null||h==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(Y,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as D}from"./liveblocks-ClXFfXis.js";import{a as f}from"./sentry-Bywn7nUR.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-DQmS6IoY.js";import{fI as ne,UK as Me,UL as se,gc as Ne,fH as xe,UU as Re,UN as Pe,UO as Ve,q3 as Le,gp as Oe,UR as h,UW as je,UX as Q,gq as Ze,UY as qe,ED as ze,h5 as He,cX as Ye,UZ as We,gb as Xe,gr as Ke}from"./zeni-epic-state-BZdgF4nr.js";import{w as Qe,i as Je,Q as ea,c as aa,d as ta,f as na,u as sa,F as c,g as oa,h as ia,z as ra,e as da,l as ca,s as la,r as ua,n as fa,o as J,L as ma,D as ba,E as ha,p as S,k as ee,y as pa,I as ae,B as ga,C as Sa}from"./index-DRMe8rkL.js";import{D as Ea}from"./mui-3IbG8WRT.js";import{u as ka}from"./InboxNotificationsProvider-BtoJ02lN.js";import{u as Ca}from"./useTaskManagerAccess-Da7yNvhn.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]="1b65bac6-30ab-4643-b619-ef303fcfbcac",l._sentryDebugIdIdentifier="sentry-dbid-1b65bac6-30ab-4643-b619-ef303fcfbcac")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),E=ea(),n=Ue(),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(Re),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,m=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=>Pe(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));f.useEffect((()=>{C&&T&&!m&&v.fetchState==="Not-Started"&&r(Le(!0))}),[C,T,v.fetchState,m]);const _=t((e=>e.tenantState)),fe=t((e=>_.fetchState==="Completed"?Oe(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:be}=d(c.isArAgingFeatureEnabled),R=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)),P=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:q,fetchMore:Te}=ka();f.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(j===!1&&Z===!1&&q===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;U(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,Z,q]),f.useEffect((()=>{C&&k&&!m&&L.fetchState==="Not-Started"&&B.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,k,m,L.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:ke},z=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>z?.tenantId!=null?Ze(e,z.tenantId):void 0)),b=[];me===!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"),R===!1&&b.push("expense_automation_card");const Y=t((e=>qe(e,b).fetchState)),W=t((e=>ze(e).fetchState)),ye=A&&(Y==="Completed"||Y==="Error")||M&&(W==="Completed"||W==="Error")||!A&&!M?void 0:"disabled",we=f.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=Ye(we),ve=o?.rewardsLastViewedTime==null,_e=p?.userEmail!=null&&x.fetchState==="Completed"&&We(x.notificationSettings,p.userEmail,N,o,k),X=da(),Fe=X&&ca(a);return D.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:D.jsx(la,{signedInUser:p,currentTenantId:_.currentTenantId??"",tenants:_.fetchState==="Completed"?fe:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:J(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:Ee,isNotificationsTabVisible:_e,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:X,onNotificationIconClick:()=>{i(!1);let e=P===0&&V>0?"notifications/comments":"notifications/tasks";J(a)&&(e=P===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),K=e.type,De=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),De&&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(Ke()),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(ma.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(Xe({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)=>{Je(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return D.jsx(Ta,{...l,...a})};export{Ba as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-ClXFfXis.js";import{h as r,l as i}from"./core-DQmS6IoY.js";import{ak as n}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import"./sentry-Bywn7nUR.js";import"./zeni-epic-state-BZdgF4nr.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.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]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);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-ClXFfXis.js";import ut from"./NotFoundScreen-uCGBbZwh.js";import{a as k}from"./sentry-Bywn7nUR.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as O}from"./core-DQmS6IoY.js";import{cC as It,UN as z,fI as J,h5 as Tt,UR as b,a1V as Y,UX as m,UL as y,AO as j,GB as Ct,a1W as At,UK as yt,UZ as Et,AT as _t,a1X as F,br as $,gk as x,AX as Z,a1Y as Nt,cO as Bt,cH as wt}from"./zeni-epic-state-BZdgF4nr.js";import{ao as xt,d as Ut,c as Rt,F as vt,aq as Dt,dK as Gt,p as B,dL as Pt,w as Mt,dM as Ft,i as $t,a2 as jt}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-CE3uD8e1.js";import{u as Lt}from"./useTaskManagerAccess-Da7yNvhn.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.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]="8c090258-6aad-46dd-81aa-5870443c6671",t._sentryDebugIdIdentifier="sentry-dbid-8c090258-6aad-46dd-81aa-5870443c6671")}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)}))})),Xt=St((function(t,l){const n=z(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=J(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:R}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(Z("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t(F([e],$())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(Y(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="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(F([i],$())))}))).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:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Wt(o,I).then((()=>{t(F(o,$())),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 e=jt(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt(Ft)),qt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,R]=k.useState(!1),e=S((a=>z(a))),s=S((a=>J(a))),{useFeatureGate:d}=Rt(),{isFeatureEnabled:r}=d(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Q=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=S((a=>b(a).notificationDetailsByTab.tasks.fetchState)),L=S((a=>b(a).currentTab)),v=S((a=>b(a).currentSubTab)),tt=S((a=>b(a).notificationDetailsByTab.comments.fetchCountState)),D=S((a=>b(a).notificationDetailsByTab.comments.fetchState)),at=S((a=>b(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((a=>b(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:W,isLoading:X,fetchMore:q,isFetchingMore:H,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(Y(c)),c==null){const a=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{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&&w!=null){const a=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===a&&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 a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect((()=>{P&&D!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||D!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,D]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(R(!0),o(Ct()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&X===!1&&w!=null&&W!=null){const a=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===a)).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}:(H||K===!0||q==null||q(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,G,H,C,K,X,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if($t(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];v==="all"?_.push("read","unread"):v!=="mentions"&&_.push(v),o(j("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(Xt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function ma(){return N.jsxs(bt,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(qt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-ClXFfXis.js";import{a as r}from"./sentry-Bywn7nUR.js";import{u as A,g as j,j as o,N as C}from"./core-DQmS6IoY.js";import{Vo as P,fI as V,gp as x,Vp as z,Vq as D,Vr as M,Vs as R,pW as k,U3 as q}from"./zeni-epic-state-BZdgF4nr.js";import{z as h,af as I}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="d3120e44-789c-44be-92b5-34098fd7c41c",n._sentryDebugIdIdentifier="sentry-dbid-d3120e44-789c-44be-92b5-34098fd7c41c")}catch{}})();function ee(){const n=A(),s=j(),{params:t,error:i}=r.useMemo((()=>P(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>V(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),b=o(D),c=o(M),[v,S]=r.useState(null),[E,U]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(q(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{U("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-ClXFfXis.js";import{h as G,u as Y,g as z,i as H,j as d,l as J,n as K,o as S}from"./core-DQmS6IoY.js";import{fI as v,Az as O,vc as Q,Wh as w,v7 as T,bq as X,c1 as Z,v8 as ee,Wi as ae,V_ as C,ek as te,Es as se,Wj as oe,ER as re,e1 as ne,e0 as ce}from"./zeni-epic-state-BZdgF4nr.js";import{ag as ie,z as le,ao as de,aq as me,V as fe,a6 as pe,k as M,aB as ue,p as he,c as Fe,F as ge}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import Ie from"./NotFoundScreen-uCGBbZwh.js";import{F as be}from"./FeaturePreviewScreen-D6sPZICH.js";import{a as F}from"./sentry-Bywn7nUR.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CE3uD8e1.js";import{u as Ce}from"./useInitialThreadRequest-DUk51gK6.js";import{t as Te}from"./routePaths-GcjDd0g-.js";import{M as ye}from"./MobileAppDrawer-BARzU42a.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";import"./InboxNotificationsProvider-BtoJ02lN.js";import"./useTaskManagerAccess-Da7yNvhn.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]="93aad9c7-93e6-4352-a87e-dcfa7b851432",s._sentryDebugIdIdentifier="sentry-dbid-93aad9c7-93e6-4352-a87e-dcfa7b851432")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((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(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({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=Te(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(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=G(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=H(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=le.getSignedInUser(),k=d((t=>v(t))),q=k.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>x.pandLByForecastID[t]!=null&&ee(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:B}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!m){A(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):R!=null?f.forecasts.findIndex((b=>b.id===R)):f.forecasts.length>0?0:-1)(i,r,D?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,O,T,I]);const E=fe(),W=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),N=Ce(k?.companyId,{clearParams:l&&m}),[V,$]=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=>{$(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:W,isAiCfoAccessEnabled:_,onAskAiCfoClick:B,initialOpenThreadRequest:N,onClickMenuIcon:()=>{L(!0)}})]})}function He(){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(K,{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{He as default};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-ClXFfXis.js";import{a as p}from"./sentry-Bywn7nUR.js";import{H as a,a7 as u,ab as f,ac as h}from"./index-DRMe8rkL.js";import{s as c}from"./mui-3IbG8WRT.js";import{i as y}from"./core-DQmS6IoY.js";import"./zeni-epic-state-BZdgF4nr.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.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]="4e512d53-3495-4744-9907-d08633789fa6",e._sentryDebugIdIdentifier="sentry-dbid-4e512d53-3495-4744-9907-d08633789fa6")}catch{}})();const g=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
5
5
|
min-height: 100vh;
|
|
6
6
|
background-color: ${e=>e.theme.colors.grey4};
|
|
7
|
-
`,
|
|
7
|
+
`,k=c("header")`
|
|
8
8
|
flex-shrink: 0;
|
|
9
9
|
padding: ${a.sp3} ${a.sp4};
|
|
10
|
-
`,
|
|
10
|
+
`,b=c(u)`
|
|
11
11
|
width: ${a.sp4};
|
|
12
12
|
height: ${a.sp4};
|
|
13
13
|
color: ${e=>e.theme.colors.brandColorJade};
|
|
14
|
-
`,x=
|
|
14
|
+
`,x=c("main")`
|
|
15
15
|
display: flex;
|
|
16
16
|
flex: 1 1 auto;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
padding: ${a.sp4};
|
|
21
|
-
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(
|
|
21
|
+
`;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(k,{children:r.jsx(b,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,m){const l=await fetch(`${o}${n}`,{body:JSON.stringify(m),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-ClXFfXis.js";import{Wd as re,fI as Y,m3 as G,e1 as N,e0 as le,T2 as Q,VB as de,Di as Pe,We as J,D7 as je,Ds as Le,Dm as ce,Db as pe,Dq as ve,Dn as Te,Wf as ue,sx as Ae,g9 as Re,gG as Ve,Wg as H,Df as me,De as ge,Dv as Fe,ca as Oe}from"./zeni-epic-state-BZdgF4nr.js";import{$ as fe,c as X,F as W,z as _,g as he,M as Ce,ad as ye,ax as be,ay as Be,a9 as De,H as F,ae as Se,G as K,az as Ze,ao as Ue,aq as $e,a6 as ze,k as we,R as He,p as We,aA as Ge,V as _e}from"./index-DRMe8rkL.js";import{D as xe,n as M,S as Ie}from"./mui-3IbG8WRT.js";import ae from"./NotFoundScreen-uCGBbZwh.js";import{a as d}from"./sentry-Bywn7nUR.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-DQmS6IoY.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-CE3uD8e1.js";import{M as Ne}from"./MobileAppDrawer-BARzU42a.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";import"./InboxNotificationsProvider-BtoJ02lN.js";import"./useTaskManagerAccess-Da7yNvhn.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]="42a3161d-3d66-47a5-adff-5e4cc49c4da8",e._sentryDebugIdIdentifier="sentry-dbid-42a3161d-3d66-47a5-adff-5e4cc49c4da8")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=d.useState(!1),[k,D]=d.useState(!1),{userId:S}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(W.isDebitCardFeatureEnabled),P=N(I,p),v=le(p),T=Q(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{O===!0?D(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(W.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:R}=Ce(p?.tenantId),y=!L||R,V=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:V===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return d.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,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(Be,{...s})]})})},ea=M(Ie)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,ke=M(Se.H6Regular)`
|
|
6
|
+
margin-top: ${F.sp7};
|
|
7
|
+
padding-left: ${F.sp8};
|
|
8
|
+
padding-right: ${F.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Ee=M(Se.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${F.sp8};
|
|
14
|
+
padding-right: ${F.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${F.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,aa={overlayWidth:new De(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=d.useState(!1),[k,D]=d.useState(!1),S=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:x}=E(W.isDebitCardFeatureEnabled),I=N(x,r),P=le(r),v=Q(r),T=de(r),Z=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(J())},C=()=>{O===!0?D(!0):w()},A={onOkClick:()=>{D(!1),w()},onCancelClick:()=>{D(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(W.isChargeCardFeatureEnabled),L=he(r,j,x),{isCardsHidden:R}=Ce(r?.tenantId),y=!L||R,V=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),B(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?ve(e):Te())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:p,isReimbursementDisabled:Z===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:V===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return d.useEffect((()=>{S.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[S.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Ze,{...s})]})})},ta=M(Ie)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,na=Je((function(e,t){const c=ue(e),n=_.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:we}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ue(),b=_.getSignedInUser(),h=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:O}=m(W.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(O,h)&&B,D=Q(h),S=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=d.useState(!1),[x,I]=d.useState(!1),[P,v]=d.useState(!1),[T,Z]=d.useState("off"),[U,w]=d.useState(!1),C=s=>{w(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Re(s.userState,s.userRoleState,s.userListViewState,"manager"))),R=g((s=>Ve(s))),y=h?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),Z(u.uiState.mode),E(!0),n(me()))}),[p,b,S,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),v(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const V=()=>{I(!1),v(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:V,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:R,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:V,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:R,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:D,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=We(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=_e();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-ClXFfXis.js";import E from"./NotFoundScreen-uCGBbZwh.js";import{a as r}from"./sentry-Bywn7nUR.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as N,o as b}from"./core-DQmS6IoY.js";import{fI as O,a1Z as h,bo as B,bn as F,iP as V,gk as q}from"./zeni-epic-state-BZdgF4nr.js";import{Q,z as I,aq as Z,dN as $}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CE3uD8e1.js";import{M as H}from"./MobileAppDrawer-BARzU42a.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";import"./InboxNotificationsProvider-BtoJ02lN.js";import"./useTaskManagerAccess-Da7yNvhn.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]="97accb09-ba13-4a4f-b4f8-cf3568bf8887",e._sentryDebugIdIdentifier="sentry-dbid-97accb09-ba13-4a4f-b4f8-cf3568bf8887")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=M(),u=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(d),y=C||k||x,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(N,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-Bywn7nUR.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-ClXFfXis.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-Bywn7nUR.js";import{L as ge,c1 as xc,fI as kc,UJ as Tc,Vz as jl,ca as xl}from"./zeni-epic-state-BZdgF4nr.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-Dt9Z_-ao.js";import{r as cn}from"./empty-Dk8_qsQc.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-RrzsEOvg.js";import{a as Ye,r as Fl}from"./index-DW-MdAfq.js";import{r as Ul}from"./index-CT9iHjgk.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-DQmS6IoY.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,W as Wl,D as Kl}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import{d as It}from"./decodeURIComponentSafe-CW6B5n7w.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]="26ac844e-86c2-4a80-ba0c-c817c21d7b69",e._sentryDebugIdIdentifier="sentry-dbid-26ac844e-86c2-4a80-ba0c-c817c21d7b69")}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
|
|
1
|
+
import{j as o}from"./liveblocks-ClXFfXis.js";import z from"./NotFoundScreen-uCGBbZwh.js";import{a as p}from"./sentry-Bywn7nUR.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as K,o as g}from"./core-DQmS6IoY.js";import{fI as E,_1 as h,_j as w,Oe as U,Oa as L,Od as f,O3 as N,_I as B,O7 as q,Og as F}from"./zeni-epic-state-BZdgF4nr.js";import{z as T,w as _,ca as G,o as $,bT as H,cb as J}from"./index-DRMe8rkL.js";import"./mui-3IbG8WRT.js";import{u as M}from"./useEnsureVendorListLoaded-hsg4Ceo6.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-DCZ84ubG.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]="21fc4286-f4e5-47b8-8641-4e0ef6d905b7",e._sentryDebugIdIdentifier="sentry-dbid-21fc4286-f4e5-47b8-8641-4e0ef6d905b7")}catch{}})();const j="reimbursement-approval-rule-update",P=O((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(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(_(G)),Q=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>E(r))),d=u((r=>h(r))),b=u((r=>w(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,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:(r,I,y)=>{r.endsWith(j)&&y.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",X=O((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(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(F(t,!0))}}}))(_(J)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=H(e?.tenantId);return s?o.jsx(Z,{isLoading:n}):o.jsx(Q,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),r=u((i=>h(i)));M();const I=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{I?.updateStatus.fetchState==="Completed"&&a(U())}),[I]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(q(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const y={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...y})};function ue(){return o.jsxs(K,{children:[o.jsx(g,{path:"/",element:o.jsx(Y,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(z,{})})]})}export{ue as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as g}from"./liveblocks-ClXFfXis.js";import{a as y}from"./sentry-Bywn7nUR.js";import{h as U,u as x,g as C,i as V,j as R,l as k}from"./core-DQmS6IoY.js";import{_j as _,_1 as O,O6 as j,Oj as B,Oe as A,Of as E,_k as F,fI as K,Od as L}from"./zeni-epic-state-BZdgF4nr.js";import{z as N,a5 as P,c1 as W,o as $,bT as G,c2 as H}from"./index-DRMe8rkL.js";import{u as q}from"./mui-3IbG8WRT.js";import{u as J}from"./useEnsureVendorListLoaded-hsg4Ceo6.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]="c7fe7e09-4208-4e56-915a-ea2ea60e46b5",e._sentryDebugIdIdentifier="sentry-dbid-c7fe7e09-4208-4e56-915a-ea2ea60e46b5")}catch{}})();const M=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=I.concat(b);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,o){const t=_(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,z=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=z.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const T=f.action??"require_approval";m.push({action:T,actors:D,operator:D.length>1?T==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=h?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(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:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(L(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=R((t=>K(t))),{isApprovalRulesV3Enabled:o}=G(e?.tenantId);return o?g.jsx(Y,{}):g.jsx(Q,{})}function Y(){const e=U(),o=x(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(J(),y.useEffect((()=>{a||(d(!0),o(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-Bym0XjRt.js";import{u as ae,j as A,h as J,g as K,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-C9Jt3gNb.js";import{fI as H,Oa as ct,$N as ge,ca as he,Ng as Ue,me as dt,Nv as ce,Nu as de,$O as ut,bn as fe,gZ as Le,$P as pt,XD as bt,m3 as $e,XE as ke,XF as gt,kR as ht,ZO as ft,l4 as St,N4 as It,CA as yt,kY as vt,NR as Ne,$Q as Pe,$R as Ce,$S as Rt,$T as At,$U as kt,NB as we,la as Ct,ZX as wt,Nt as Et,Ne as xt,$V as Bt,Nd as Tt,$W as Dt,Nl as Ee,NF as jt,NE as Ft,NA as Ut,$X as _e,T2 as Lt,bo as $t,No as Nt,O7 as Pt,$Y as _t,$Z as Mt,NN as Ot,NK as xe,Zi as Zt,Nb as zt,$_ as Me,OA as Be,OI as Gt,$$ as Vt,a00 as X,a01 as Ht,a02 as Oe,a03 as Wt,a04 as Ze,a05 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a06 as Xt,gk as Qt,Zv as Kt,a07 as Yt,a08 as He,Zz as Jt,_i as en,a09 as tn,_H as nn,OF as Te,OE as an,a0a as sn,a0b as on,a0c as rn,a0d as ln,a0e as mn,_1 as cn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V2 as Sn,dc as In,df as yn,de as vn,cH as Rn}from"./zeni-epic-state-OTisIlmp.js";import{bT as An,c as We,$ as qe,d as oe,P as U,z as L,cS as Xe,a6 as re,l as E,aQ as De,D as j,ac as se,ad as kn,G as Qe,cT as Cn,p as Q,aq as Ke,cU as wn,V as le,cV as En,ao as xn,a9 as Bn,a5 as ye,Q as Ye,w as Tn,bB as Dn,at as jn,ag as Fn,cW as Un,h as Ln}from"./index-DmFy--fV.js";import{n as P,S as $n,u as Je}from"./mui-BsgiBiT9.js";import pe from"./NotFoundScreen-D92eiixV.js";import{S as je}from"./SetupPagesScreen-BbFcVR26.js";import{F as et}from"./FeaturePreviewScreen-Bu-JxAVw.js";import{a as g}from"./sentry-CoKtZcTW.js";import{u as ve}from"./useAskAiCfoHostNavButtonProps-CgHJ-iCU.js";import{u as tt}from"./useInitialThreadRequest-DA5FMzag.js";import{D as Nn}from"./DrawerScreen-B5Qgxoe2.js";import{M as nt}from"./MobileAppDrawer-D4DOSbVQ.js";import{F as Pn}from"./ScreenRoutes-DAK3aVc9.js";import{R as _n}from"./ReimbursementApprovalRoutes-CixN0rww.js";import"./recharts-GCccddBO.js";import"./analytics-DbFSqIth.js";import"./plaid-C8X6T_ms.js";import"./dnd-KhFMfpEU.js";import"./stripe-cKAAJElX.js";import"./lottie-CvA92JCl.js";import"./lexical-CpBrNOz8.js";import"./pdf-O569E9WB.js";import"./utils-CNqTTzSx.js";import"./BusinessVerificationPageScreen-CpAzjlh5.js";import"./routePaths-DQh6iYo4.js";import"./analyticsHelper-drNlDujn.js";import"./InboxNotificationsProvider-Bz8aI0zf.js";import"./useTaskManagerAccess-CpacCRSq.js";import"./getLocaleForTenant-7mVUFLO-.js";import"./useEnsureVendorListLoaded-YOFp3iHN.js";import"./ReimbursementApprovalRuleDetailScreen-XsqK1nGV.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]="9ed279e5-8471-490d-a70d-897bd77a3e37",e._sentryDebugIdIdentifier="sentry-dbid-9ed279e5-8471-490d-a70d-897bd77a3e37")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(At({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(Rt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=J(),t=ae(),n=K(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=ve({mobileExploreReferrer:"Reimbursement Details"}),B=K().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,v]=g.useState(!1),S=L.getSignedInUser(),w=A((b=>H(b))),h=A((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=A((Y=>H(Y))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=An(O),z=A((Y=>Y.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(v(!0),t(Ue(!1,I,u,r)))}));const R=A((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:R,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-ClXFfXis.js";import{u as ae,j as v,h as J,g as Y,i as ie,N,l as ee,q as lt,n as mt,o as x}from"./core-DQmS6IoY.js";import{fI as H,Oa as ct,$O as ge,ca as he,Ng as Ue,me as dt,Nv as ce,Nu as de,$P as ut,bn as fe,gZ as Le,$Q as pt,XE as bt,m3 as $e,XF as ke,XG as gt,kR as ht,ZP as ft,l4 as St,N4 as It,CA as yt,kY as Rt,NR as Ne,$R as Pe,$S as Ce,$T as At,$U as vt,$V as kt,NB as we,la as Ct,ZY as wt,Nt as Et,Ne as xt,$W as Bt,Nd as Tt,$X as Dt,Nl as Ee,NF as jt,NE as Ft,NA as Ut,$Y as _e,T2 as Lt,bo as $t,No as Nt,O7 as Pt,$Z as _t,$_ as Mt,NN as Ot,NK as xe,Zj as Zt,Nb as zt,$$ as Me,OA as Be,OI as Gt,a00 as Vt,a01 as X,a02 as Ht,a03 as Oe,a04 as Wt,a05 as Ze,a06 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a07 as Xt,gk as Qt,Zw as Yt,a08 as Kt,a09 as He,ZA as Jt,_j as en,a0a as tn,_I as nn,OF as Te,OE as an,a0b as sn,a0c as on,a0d as rn,a0e as ln,a0f as mn,_2 as cn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V2 as Sn,dc as In,df as yn,de as Rn,cH as An}from"./zeni-epic-state-BZdgF4nr.js";import{bT as vn,Q as We,$ as qe,c as oe,F as U,z as L,cS as Xe,a6 as re,k as E,aQ as De,H as j,ac as se,ad as kn,G as Qe,cT as Cn,p as Q,aq as Ye,cU as wn,V as le,cV as En,ao as xn,a9 as Bn,a5 as ye,R as Ke,w as Tn,bB as Dn,at as jn,ag as Fn,cW as Un,g as Ln}from"./index-DRMe8rkL.js";import{n as P,S as $n,u as Je}from"./mui-3IbG8WRT.js";import pe from"./NotFoundScreen-uCGBbZwh.js";import{S as je}from"./SetupPagesScreen-CI7udgmS.js";import{F as et}from"./FeaturePreviewScreen-D6sPZICH.js";import{a as g}from"./sentry-Bywn7nUR.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-CE3uD8e1.js";import{u as tt}from"./useInitialThreadRequest-DUk51gK6.js";import{D as Nn}from"./DrawerScreen-ag8W0HpS.js";import{M as nt}from"./MobileAppDrawer-BARzU42a.js";import{F as Pn}from"./ScreenRoutes-A1gS3VAs.js";import{R as _n}from"./ReimbursementApprovalRoutes-DcjJFXQG.js";import"./recharts-DAXcVNlo.js";import"./analytics-C1w-0aDX.js";import"./plaid-DHBKfVUI.js";import"./dnd-BkAObQW8.js";import"./stripe-cKAAJElX.js";import"./lottie-Dxiqblcp.js";import"./lexical-DDHrbB2s.js";import"./pdf-CbQClC4y.js";import"./utils-Dt9Z_-ao.js";import"./BusinessVerificationPageScreen-CtZemYag.js";import"./routePaths-GcjDd0g-.js";import"./analyticsHelper-8TNWPlLJ.js";import"./InboxNotificationsProvider-BtoJ02lN.js";import"./useTaskManagerAccess-Da7yNvhn.js";import"./getLocaleForTenant-BlxT1lJh.js";import"./useEnsureVendorListLoaded-hsg4Ceo6.js";import"./ReimbursementApprovalRuleDetailScreen-DCZ84ubG.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]="ce5ff8aa-71c8-4346-8279-d34e8f6e016e",e._sentryDebugIdIdentifier="sentry-dbid-ce5ff8aa-71c8-4346-8279-d34e8f6e016e")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=J(),t=ae(),n=Y(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=Y().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=v((K=>H(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:c,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-Bym0XjRt.js";import{u as ae,j as A,h as J,g as K
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,qn=ee((function(e,t){const n=_e(e,t.reimbursementId),r=L.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,Mt(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=Q(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Q(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function Xn(){const e=J(),t=ae(),n=
|
|
56
|
+
`,qn=ee((function(e,t){const n=_e(e,t.reimbursementId),r=L.getSignedInUser(),m=fe(r),c=e.tenantState.currentTenantId,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},i=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=_t(n.remiActivities,Mt(t.currentTenant),r));const o=he(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:d,signedInUser:r,createdBy:i,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:o,showApproveRejectBtns:a,isZeniUser:m,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r;return{onDuplicateLineClick:(a,o)=>window.open(`/${i}/reimbursement/${a}#L${o}`),redirectToReimbursementListScreen:()=>{e(Pe());const a=at(i),o=Q(m.state?.pathnameStackToGoBack,m.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onSaveRealTimeApprovals:a=>{e(zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(xe(n,a.type,"")):e(xe(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Q(m.state?.pathnameStackToGoBack,m.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{E.trackReimbursementDeleteReimbursement(n),e(Ne(n))},cancelAndDeleteReport:a=>{a===!0?E.trackReimbursementCancelAndDeleteReimbursement(n):E.trackReimbursementCancelReimbursement(n),e(Ot(n,a))},handleZeniLogoClick:()=>{d.toggle()}}}))(wn);function Xn(){const e=J(),t=ae(),n=Y(),r=n.hash.substring(1),m=We(),{reimbursementId:c}=ie(),d=L.getSignedInUser(),i=v((A=>H(A))),a=v((A=>_e(A,c??""))),o=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(i?.companyId,{clearParams:a.fetchState==="Completed"&&!o}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:I}=Re({mobileExploreReferrer:"Reimbursement Details"});Ye({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:u}=oe(),{isFeatureEnabled:T}=u(U.isLimitedCategoryForReimbursement),[y,B]=g.useState(!1),[D,k]=g.useState(!1),[C,R]=g.useState(!1),{isFeatureEnabled:S}=u(U.isShowDeletedReimbursementsFeatureEnabled),w=v((A=>ge(A,c??""))),h=Lt(i),$=$t(i.userRole),F=a.fetchState;if(g.useEffect((()=>{y||c==null?y==1&&F==="Error"&&e("page-not-found",{replace:!0}):(B(!0),t(Nt(c,!1,S)))}),[y,c,t,F]),g.useEffect((()=>{S&&a.remiDetails?.isDeleted===!0||i.isZeni===!0&&d?.userEmailDomain==="zeni.ai"&&h===!1?R(!1):R(a.remiActivities[0]?.isRealTimeApprovalEnabled&&($||a.allApprovers.find((A=>A.user.userId===d?.userId))!=null||a.remiDetails?.lastUpdatedBy===d?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,$,i.isZeni,h,d]),g.useEffect((()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||w.fetchState=="Completed"||w.fetchState=="In-Progress"||(k(!0),t(Ue(!1,T,S,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Pt(!1,!0,!0,a.lastUpdatedByUserId)))}),[D,a,c,t]),d==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(N,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&w.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Xe,{}):s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:A=>(_=>{c!=null&&_.trackReimbursementReimbursementDetails(c)})(A)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:C,currentTenant:i,reimbursementId:c??"",themeState:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:I})]})}const Qn=ee((function(e,t){return{remisReviewView:Me(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate(`/${t.tenantEmailDomain}/reimbursements`),e(X())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Gt());break;case"approve":e(Be("approved",r??""));break;case"reject":e(Be("rejected",r??""))}}}}))(En);function Yn({tenantEmailDomain:e}){const t=J(),n=v((d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:r}=v((d=>Me(d))),m=le(),c=m?.loggedInUserRole?.includes("admin")===!0;return g.useEffect((()=>{n!=="Completed"&&r.length!==0||t(`/${e}/reimbursements`)}),[n,r.length,e]),s.jsx(Qn,{navigate:t,analytics:E,isAdmin:c,tenantEmailDomain:e})}const V=Jt(),st="bulk-operation-update",be="reimbursement-approval-rule-update",{spendManagement:Kn,common:me}=Qe.getLocalizedStrings(),Jn=Kn.reimbursement.bulkActions,ea=P.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-Bym0XjRt.js";import{u as ae,j as A,h as J,g as K
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=ee((function(e,t){const n=ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=L.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(X()),e(Oe(i))},onSubtabChange:i=>{e(X()),e(Ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=Q(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=Q(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=Q(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(X())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=J(),t=ae(),n=
|
|
64
|
+
`,ta=ee((function(e,t){const n=ze(e,V,t.isBulkActionEnabled);let r=n.allSubTabs;const m=L.getSignedInUser(),c=fe(m),d=e.tenantState.currentTenantId,i=H(e),a=i?.companyName??"",o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:d??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter((u=>u!=="deleted")));const p=n.fetchState,I=en(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter((u=>u.isDeleted===!1)),isAdmin:t.isAdmin,isZeniUser:c,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:p,botEmail:n.reimbursementBotEmail,analytics:E,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:o,companyName:a,timePeriod:V,spendManagementEndPoint:`${jn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:I.affectedEntityIds}}),(function(e,t){const{navigate:n,currentTenant:r,location:m,period:c}=t,{tenantEmailDomain:d}=r;return{updateTabToState:i=>{e(X()),e(Oe(i))},onSubtabChange:i=>{e(X()),e(Ze(i))},onTransactionClick:(i,a)=>{const o=sa(d,i,a),l=Q(m.state?.pathnameStackToGoBack,m.pathname);n(o,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const i=aa(d),a=Q(m.state?.pathnameStackToGoBack,m.pathname);n(i,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:i}=t.currentTenant;E?.trackReimbursementNewReimbursement();const a=`/${i}/reimbursement/new`,o=Q(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:o}})},onColumnSortConfigChanged:(i,a)=>{e(mn({uiState:{sortKey:i,sortOrder:a},period:t.period}))},onSearchTextChanged:i=>{e(ln(i))},onFiltersChange:i=>{e(rn({filters:i})),i.categories.every((a=>a.field!=null&&a.values?.length!==0))&&E.trackSpendManagmentFilterChange("reimbursement",i.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:i=>{i==="In-Progress"&&E.trackSpendManagementDownloadClick("reimbursement"),e(on({uiState:{downloadState:i}}))},onReloadTransactions:()=>{e(ue(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:i=>{e(sn(i))},removeAllTransactionsFromBulkActionList:()=>{e(X())},onProceedForBulkActionClick:(i,a)=>{switch(i){case"delete":case"cancel":e(an(i,a??""));break;case"send_for_approval":e(Te("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Te("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:i=>{i.endsWith(be)&&e(nn(!1))},onEventReceived:i=>{i===st&&e(tn())}}}))(Tn(Dn));function na(){const e=J(),t=ae(),n=Y(),r=n.state,m=qe(),[c,d]=g.useState(null),i=lt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;g.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const f=Ht(r.tab.toString());f!=null?t(Oe(f)):console.log("Warning:Not a valid remiListTab");const G=Wt(r.subTab.toString());G!=null?t(Ze(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(X())}}),[]);const{useFeatureGate:a}=oe(),{isFeatureEnabled:o}=a(U.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(U.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:p}=a(U.isReimbursementBulkActionEnabled),I=L.getSignedInUser(),u=v((f=>H(f))),[T,y]=g.useState(!1),[B,D]=g.useState(!1),k=le(),C=k?.loggedInUserRole?.includes("admin")===!0,R=v((f=>ze(f,V,p))),{areTenantIdsInSync:S}=xn(),w=R.fetchState,{isAiCfoAccessEnabled:h,onAskAiCfoClick:$}=Re({mobileExploreReferrer:"Reimbursement List"});if(Ye({isDataReady:w==="Completed"}),g.useEffect((()=>{!B&&S&&(D(!0),t(ue(V,!0,l,!1,!0)))}),[B,V,t,S]),I==null)throw Error("Can't access address page without signing in...");const F=!!u?.userRole&&qt(u),A=Se(k?.loggedInUserRoleMap),_=Ie(k?.loggedInUserRoleMap),b=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,M=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,O=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,Z=v((f=>Le(f.companyState,u.companyId))),W=Z?.company.featuresActivationInfo.connectedAccountProvider,z=f=>{y(f)},{isFeatureEnabled:K}=a(U.isDebitCardFeatureEnabled),it=Ge(K,u),ot=Ve(u),{remisProcessed:te,remisProcessing:Ae}=v((f=>Xt(f)));g.useEffect((()=>{te===Ae&&c!=null&&(t(Qt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:te>1?me.texts.reports2:Jn.report},{variableName:"_has_",variableValue:te>1?me.texts.have:me.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(Kt()),setTimeout((()=>{t(ue(V,!0,l,!1,!0,!0))}),3e3),d(null))}),[te,Ae]);const rt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${be}`]:[],eventCallback:(f,G,ve)=>{f.endsWith(be)?ve.onReimbursementApprovalRulesEventReceived?.(f):G.entity_type==="reimbursement"&&(d(G.operation_type),ve.onEventReceived(f))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?it===!0||ot===!0?s.jsx(et,{}):M&&(!F||A)||_&&b?s.jsxs(s.Fragment,{children:[w==="Completed"?s.jsx(re,{analytics:E,onLoad:f=>(G=>G.trackPageLoaded(Ke.Event.reimbursementHome))(f)}):null,s.jsx(nt,{isAppContentDrawerOpen:T,handleDrawerToggle:z}),s.jsxs(ea,{windowSize:m,children:[s.jsx(Nn,{isOpen:i,drawerLeftMargin:new Bn(0,0,300,600),onClose:()=>{e(`/${u.tenantEmailDomain}/reimbursements`),t(X())},children:s.jsx(ia,{onClick:f=>f.stopPropagation(),children:s.jsx(Yn,{tenantEmailDomain:u.tenantEmailDomain})})}),s.jsx(ta,{isShowDeletedBillsEnabled:o,isShowDeletedReimbursementEnabled:l,location:n,navigate:e,currentTenant:u,period:V,isAdmin:C,isEmployee:F,entity:"reimbursement",onClickMenuIcon:()=>{z(!0)},createdByUserList:R.createdByUserList,createdByUserListFetchState:R.createdByUserListFetchState,isDownloadEnabled:R.isDownloadEnabled,connectedAccountProvider:W,isBulkActionEnabled:p,bulkSubmissionLimit:R.remiBulkSubmissionLimit,bulkSubmissionFetchState:R.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:h,onAskAiCfoClick:$,...rt})]})]}):O&&A?s.jsx(N,{to:"../setup"}):k!=null&&He(u,k.loggedInUserRoleMap)?s.jsx(N,{to:"../promo"}):s.jsx(ye,{fetchState:"In-Progress"}):s.jsx(pe,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=P($n)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Un),ra=()=>{const e=Fn(),t=J(),n=
|
|
68
|
+
`,oa=ee((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:cn(e,n),analytics:E,videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}}),(function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(un(n))},onCreateNewRemiButtonClick:()=>{e(dn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Un),ra=()=>{const e=Fn(),t=J(),n=Y(),{tenantEmailDomain:r}=ie(),m=Je(),[c,d]=g.useState(!1),i=v((C=>H(C))),a=L.getSignedInUserTenant(r)?.companyId??i.companyId,o=L.getSignedInUser(),l=i.userRoleId,p=!!i.userRole?.includes("reimbursements_user"),I=le(),u=Se(I?.loggedInUserRoleMap),T=Ie(I?.loggedInUserRoleMap),y=!!i.userReimbursementInfo?.isReimbursementTOSAccepted,B=!!i.companyReimbursementInfo?.info?.isReimbursementEnabled,D=!!i.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,k=C=>{d(C)};if(o==null)throw Error("Can't access reimbursement promo page without signing in...");return B&&T&&y?s.jsx(N,{to:"../../../reimbursements"}):D&&u?s.jsx(N,{to:"../../reimbursements/setup"}):i.companyReimbursementInfo&&!D||i.userReimbursementInfo&&T&&y===!1?s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:E,onLoad:C=>(R=>R.trackPageLoaded(Ke.Event.reimbursementPromoPage))(C)}),s.jsx(nt,{isAppContentDrawerOpen:c,handleDrawerToggle:k}),s.jsx(oa,{companyId:a,navigate:t,meetingUrl:e("reimbursement_promo"),location:n,userReimbursementInfo:i.userReimbursementInfo,userRoleId:l,isEmployee:p,onClickMenuIcon:()=>{k(!0)}})]}):s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})};function Ma(){const e=v((z=>H(z))),t=le(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Je(),m=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:d}=oe(),{isFeatureEnabled:i}=d(U.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=d(U.isDebitCardFeatureEnabled),o=Ge(a,e),l=Ve(e),p=e?.userRole!=null&&pn(e?.userRole),I=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!p)&&bn(t?.loggedInUserRoleMap),u=gn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!p,y=Se(t?.loggedInUserRoleMap),B=T&&y,D=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!p,k=D&&hn(t?.loggedInUserRoleMap),C=Ln(e,i,a)&&!p,R=C&&fn(t?.loggedInUserRoleMap),S=Sn(t?.loggedInUserRoleMap),w=In(t?.loggedInUserRoleMap),h=yn(t?.loggedInUserRoleMap),$=D&&w,F=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!p&&h,A=Rn(t?.loggedInUserRoleMap),_=An(t?.loggedInUserRoleMap),b=Ie(t?.loggedInUserRoleMap),M=C&&A,{tenantEmailDomain:O}=ie(),Z=Y(),W=n===!0&&(y||b&&c);return s.jsxs(mt,{children:[Z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"verification",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"verification"})}),s.jsx(x,{path:"setup",element:s.jsx(je,{isBillPayAdminLevelAccess:I,isUserHasOnlyBillPayAccess:u,isReimbursementAdminLevelAccess:B,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:R,isUserHasOnlyCardAccess:S,productType:"reimbursement",type:"setup"})}),s.jsx(x,{path:"promo",element:s.jsx(ra,{})}),s.jsx(x,{path:"approval-rules/*",element:B?s.jsx(_n,{}):s.jsx(Pn,{showZeniAccountRoute:$,isUserHasBillPayAccess:_,isUserHasReimbursementAccess:b,showTreasuryRoute:F,isTenantBankingOnly:o,showChargeCardRoute:M,tenantEmailDomain:O??""})}),W&&s.jsx(x,{path:"*",element:s.jsx(na,{})}),(o===!0||l===!0)&&s.jsx(x,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../promo"})}),m&&y&&s.jsx(x,{path:"*",element:s.jsx(N,{to:"../setup"})})]}):Z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(x,{path:"new",element:s.jsx(Fe,{})}),s.jsx(x,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(x,{path:":reimbursementId/edit",element:s.jsx(Fe,{})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]}):s.jsx(x,{path:"*",element:s.jsx(ye,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(x,{path:"*",element:s.jsx(pe,{})})]})}export{Ma as default};
|