@zeniai/web-app-ui 5.3.83-dev → 5.3.83-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BlAlbrnx.js → AccountMappingScreen-US2XVxHS.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-BJS18VqA.js → ActualMatchingMatchDetailScreen-CIWPn1Y6.js} +1 -1
- package/dist/assets/{AddressRoutes-CjGixOCb.js → AddressRoutes-Bc244OpL.js} +1 -1
- package/dist/assets/{AddressScreen-BaUyC6hl.js → AddressScreen-D6cv_M67.js} +1 -1
- package/dist/assets/{AiCfoScreen-C2aGObgH.js → AiCfoScreen-B5-4LiJc.js} +1 -1
- package/dist/assets/{AppDrawer-B_sqYgfu.js → AppDrawer-DTnf9CFV.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BdAzyIqn.js → BillPayApprovalRoutes-DmDSGeDR.js} +1 -1
- package/dist/assets/{BillPayRoutes-zkvSlLIB.js → BillPayRoutes-DOtQLf2H.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DNhcrJIG.js → BusinessVerificationPageScreen-LkGxRSTs.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-C6zY5aHa.js → CardsAiCfoScreen-DMWgyqr4.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CUIv6Ff9.js → ChargeCardRoutes-0xaYBK7a.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-2YfwMC3n.js → CompanyPassportScreen-CCGN8XdD.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Dbf96wBm.js → ConnectionAuthScreen-B4ZsVkss.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-CsgeY_a3.js → CustomerOnboardingAuthScreen-8djGWQzD.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-CmTSBCfZ.js → CustomerOnboardingRoutes-BUPPuViZ.js} +1 -1
- package/dist/assets/{DashboardRoutes-ePaa6RzM.js → DashboardRoutes-DMjkbJKm.js} +1 -1
- package/dist/assets/{DefaultTenantHome-GxNyS_7I.js → DefaultTenantHome-ccHioZuC.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DGTecQgJ.js → DomesticWireDetailScreen-C0ktkm9X.js} +1 -1
- package/dist/assets/{DrawerScreen-Ac2BNHGU.js → DrawerScreen-iwe9vo8N.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-By8U2MA9.js → EntityDetailRoutes-BkUIJeVW.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CbAy6bRF.js → ExpenseAutomationRoutes-inQz41D4.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-WONNYPz2.js → FeaturePreviewScreen-X-JDJxdp.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CFlvNlLf.js → HubSpotOAuthCallbackScreen-CYYMDVs4.js} +1 -1
- package/dist/assets/{InvoicingRoutes-7QJOc7_T.js → InvoicingRoutes-YIPTztGo.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BibsnD1q.js → MagicLinkRoutes-DCjdmJsu.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BpOShVw6.js → MagicLinkSignInScreen-DIHfTzR_.js} +1 -1
- package/dist/assets/{MobileAppDrawer-l8XzezC6.js → MobileAppDrawer-DbZpT3WI.js} +1 -1
- package/dist/assets/{NotFoundScreen-azJwEf6u.js → NotFoundScreen-D9bcBk9H.js} +1 -1
- package/dist/assets/{NotificationRoutes-C4m7rB7l.js → NotificationRoutes-BzMEu6Wm.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CuXtenPv.js → OAuthConsentScreen-CK67H2gL.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-FHrcpjWT.js → PandLWithForecastRoutes-DOamJ_Fj.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-BSk9RfvR.js → PaymentLinkScreen-eQl1XPPA.js} +1 -1
- package/dist/assets/{PeopleRoutes-BxrX1JFh.js → PeopleRoutes-RAr7GTqt.js} +1 -1
- package/dist/assets/{PerformanceRoutes-u7jsxKOk.js → PerformanceRoutes-BlaxgxAu.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BSw99hss.js → QBOConnectionScreen-DUhvVruv.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Q1SCHF1l.js → ReimbursementApprovalRoutes-siKEt4P5.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DILlSzn2.js → ReimbursementApprovalRuleDetailScreen-LTuYNlBh.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-6xzsoOoQ.js → ReimbursementRoutes-VvEa2eeW.js} +1 -1
- package/dist/assets/{ReportsRoutes-BOEFIFhM.js → ReportsRoutes-C2d97Zc4.js} +1 -1
- package/dist/assets/{RewardsRoutes-DJDgplhQ.js → RewardsRoutes-CD8Bg_Li.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-5-GevFMn.js → ScheduleDetailsPrepaidExpensesScreen-RqztnMI8.js} +1 -1
- package/dist/assets/{ScreenRoutes-C3N1CK9B.js → ScreenRoutes-rMyVJ0Wa.js} +2 -2
- package/dist/assets/{SettingsRoutes-DFwRhTG0.js → SettingsRoutes-D-DVCxRY.js} +1 -1
- package/dist/assets/{SetupPagesScreen-Bwcyn81K.js → SetupPagesScreen-BeL32jvE.js} +1 -1
- package/dist/assets/{SignInScreen-VNP75F_z.js → SignInScreen-ir027M2w.js} +1 -1
- package/dist/assets/{SignOutScreen-DqT1J3CH.js → SignOutScreen-Dh2r2ma7.js} +1 -1
- package/dist/assets/{TaskListScreen-vhycpFEZ.js → TaskListScreen-bWUpRp3D.js} +1 -1
- package/dist/assets/{TaskRoutes-B6-8g-HW.js → TaskRoutes-Lle5AHhb.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-BHcGo7KC.js → TransactionDetailRoutes-SxiOJJwM.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-CuKBIwpF.js → TransactionDetailScreen-C1bVEOAX.js} +1 -1
- package/dist/assets/{TransactionListRoutes-D-MmK7A2.js → TransactionListRoutes-Bmw678LX.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Pqnpfg2v.js → TreasuryRoutes-M8WR0qHE.js} +1 -1
- package/dist/assets/{VendorsRoutes-CNNCASwJ.js → VendorsRoutes-DJp0syoy.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Q6839g40.js → WiseConfirmationScreen-Fy_GbEXJ.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-5EIDUyAv.js → ZeniAccountRoutes-Bt_zuUh-.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DEVWrSPx.js → ZeniAccountStatementScreen-Bu1Mm_37.js} +1 -1
- package/dist/assets/{analyticsHelper-D3Z95hnv.js → analyticsHelper-D5T9Pp0r.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CZcWFJHh.js → getLocaleForTenant-D6brqFOn.js} +1 -1
- package/dist/assets/{index-BvMe6BwU.js → index-DvOt4VS9.js} +5 -5
- package/dist/assets/{routePaths-CehqSbwZ.js → routePaths-of7B18Ze.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-hr4zSrCe.js → useActualMatchingMatchDetail-YT3I0Lzu.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C5O_5leW.js → useAiCfoDashboardSuggestedQuestionsChips-Dm2nLAVE.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js → useAskAiCfoHostNavButtonProps-DqbLwjuM.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-C3NE2ZHP.js → useChargeCardPusherEvents-DIzup14w.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-Bv3uwquX.js → useEmailConnectResultRefresh-CaTrYS8H.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BCD3tBzH.js → useInitialThreadRequest-B8hjmQPb.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BRPFjPMD.js → useTaskManagerAccess-CsQUeQX-.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-6s-T5fU4.js → useTaskManagerPusherEvents-DPwaoExz.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C47wmMlX.js → withTransactionSidePanel-dWI8TaQe.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-QExkfWwX.js";import{a as p}from"./sentry-oILOkT84.js";import{H as a,a7 as u,ab as f,ac as h}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-QExkfWwX.js";import{a as p}from"./sentry-oILOkT84.js";import{H as a,a7 as u,ab as f,ac as h}from"./index-DvOt4VS9.js";import{s as c}from"./mui-DA_IUYGW.js";import{i as y}from"./core-C9JgQJB4.js";import"./zeni-epic-state-DLEY0NmH.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.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%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-QExkfWwX.js";import{VS as re,fI as Y,m3 as _,e0 as N,d$ as le,SJ as Q,Vf as ce,Df as Pe,VT as J,D4 as je,Dp as Le,Dj as de,D8 as pe,Dn as Te,Dk as ve,VU as ue,sx as Ve,g9 as Ae,gG as Fe,VV as H,Dc as me,Db as ge,Ds as Re,c9 as Oe}from"./zeni-epic-state-DLEY0NmH.js";import{$ as fe,W as X,A as G,z as W,f as he,M as Ce,ad as be,ax as ye,ay as Ze,a9 as Se,H as R,ae as De,G as K,az as Ue,ao as Be,aq as $e,a6 as ze,j as we,Q as He,p as Ge,aA as _e,V as We}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-QExkfWwX.js";import{VS as re,fI as Y,m3 as _,e0 as N,d$ as le,SJ as Q,Vf as ce,Df as Pe,VT as J,D4 as je,Dp as Le,Dj as de,D8 as pe,Dn as Te,Dk as ve,VU as ue,sx as Ve,g9 as Ae,gG as Fe,VV as H,Dc as me,Db as ge,Ds as Re,c9 as Oe}from"./zeni-epic-state-DLEY0NmH.js";import{$ as fe,W as X,A as G,z as W,f as he,M as Ce,ad as be,ax as ye,ay as Ze,a9 as Se,H as R,ae as De,G as K,az as Ue,ao as Be,aq as $e,a6 as ze,j as we,Q as He,p as Ge,aA as _e,V as We}from"./index-DvOt4VS9.js";import{D as xe,n as M,S as Ie}from"./mui-DA_IUYGW.js";import ae from"./NotFoundScreen-D9bcBk9H.js";import{a as c}from"./sentry-oILOkT84.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-C9JgQJB4.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import{M as Ne}from"./MobileAppDrawer-DbZpT3WI.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.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]="ec700f0f-cb51-496a-9e00-08b93127088b",e._sentryDebugIdIdentifier="sentry-dbid-ec700f0f-cb51-496a-9e00-08b93127088b")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>_(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(G.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),U=ce(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),y()},V=()=>{O===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(G.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:A}=Ce(p?.tenantId),b=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.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:be.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(ye,{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(Ze,{...s})]})})},ea=M(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QExkfWwX.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-QExkfWwX.js";import E from"./NotFoundScreen-D9bcBk9H.js";import{a as r}from"./sentry-oILOkT84.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-C9JgQJB4.js";import{fI as B,a1v as b,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-DLEY0NmH.js";import{K,z as I,aq as L,dL as $}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import{M as H}from"./MobileAppDrawer-DbZpT3WI.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.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]="c3d925b8-dd50-4135-8202-8a211846685e",e._sentryDebugIdIdentifier="sentry-dbid-c3d925b8-dd50-4135-8202-8a211846685e")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),Q=()=>{const e=_(),t=v(),d=K(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:u}=M(),g=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback(((a,i,T)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(g(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),f=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:f}),s.jsx(J,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-QExkfWwX.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-oILOkT84.js";import{L as ge,c0 as xc,fI as kc,Un as Tc,Vd as jl,c9 as xl}from"./zeni-epic-state-DLEY0NmH.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-A5fkS8h7.js";import{r as cn}from"./empty-Bn6LwN65.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-C9IVGH9O.js";import{a as Ye,r as Fl}from"./index-B2whCLRz.js";import{r as Ul}from"./index-BuFdtVKe.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-C9JgQJB4.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,X as Wl,C as Kl}from"./index-
|
|
1
|
+
import{j as _l}from"./liveblocks-QExkfWwX.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-oILOkT84.js";import{L as ge,c0 as xc,fI as kc,Un as Tc,Vd as jl,c9 as xl}from"./zeni-epic-state-DLEY0NmH.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-A5fkS8h7.js";import{r as cn}from"./empty-Bn6LwN65.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-C9IVGH9O.js";import{a as Ye,r as Fl}from"./index-B2whCLRz.js";import{r as Ul}from"./index-BuFdtVKe.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-C9JgQJB4.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,X as Wl,C as Kl}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import{d as It}from"./decodeURIComponentSafe-CYuijBUP.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]="3fbcac5a-d193-4038-8051-4e02bb794931",e._sentryDebugIdIdentifier="sentry-dbid-3fbcac5a-d193-4038-8051-4e02bb794931")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-QExkfWwX.js";import z from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-QExkfWwX.js";import z from"./NotFoundScreen-D9bcBk9H.js";import{a as p}from"./sentry-oILOkT84.js";import{h as C,g as D,u as V,j as u,N as k,l as N,n as Z,o as g}from"./core-C9JgQJB4.js";import{fI as E,Zz as h,ZR as R,O5 as O,O1 as U,O4 as f,NW as L,_e as B,N_ as K,O7 as q}from"./zeni-epic-state-DLEY0NmH.js";import{z as T,w as _,c8 as F,n as $,bR as G,c9 as H}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import{u as J,R as x}from"./ReimbursementApprovalRuleDetailScreen-LTuYNlBh.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]="0f8bd650-d672-495e-938e-416622570cab",e._sentryDebugIdIdentifier="sentry-dbid-0f8bd650-d672-495e-938e-416622570cab")}catch{}})();const j="reimbursement-approval-rule-update",M=N((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(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(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(_(F)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(O())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(U(!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||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",Q=N((function(e){const s=h(e),n=R(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(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))(_(H)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=G(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(P,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=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))),o=u((i=>h(i)));J();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(O())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(U(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(K(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={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?r.jsx(k,{to:"../../promo"}):r.jsx(Q,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(Z,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(z,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-QExkfWwX.js";import{a as f}from"./sentry-oILOkT84.js";import{u as O,j as g,h as C,g as _,i as V,l as k}from"./core-C9JgQJB4.js";import{mv as L,ZR as w,Zz as U,NZ as B,Oa as j,O5 as A,O6 as E,ZS as N,fI as z,O4 as K}from"./zeni-epic-state-DLEY0NmH.js";import{z as F,a5 as P,b$ as W,n as $,bR as G,c0 as H}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-QExkfWwX.js";import{a as f}from"./sentry-oILOkT84.js";import{u as O,j as g,h as C,g as _,i as V,l as k}from"./core-C9JgQJB4.js";import{mv as L,ZR as w,Zz as U,NZ as B,Oa as j,O5 as A,O6 as E,ZS as N,fI as z,O4 as K}from"./zeni-epic-state-DLEY0NmH.js";import{z as F,a5 as P,b$ as W,n as $,bR as G,c0 as H}from"./index-DvOt4VS9.js";import{u as Z}from"./mui-DA_IUYGW.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]="b3c147e0-f44a-4d92-9d05-fae9aadb523a",e._sentryDebugIdIdentifier="sentry-dbid-b3c147e0-f44a-4d92-9d05-fae9aadb523a")}catch{}})();function J(){const e=O(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const M=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];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 y=(R=m.value,N(R)==null);var R;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(b);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps: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("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=C(),s=O(),t=_(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=Z(),r=g((n=>w(n))),l=g((n=>U(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return N(e)==null}const X=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const R=y.actorKind?.selectedOption,q=y.selectedRole?.selectedNonUsers??[];let D=[];R==="role"?D=q.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):R==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,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=S?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria: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("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=G(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=C(),s=O(),t=_(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=Z(),r=g((n=>w(n))),l=g((n=>U(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,J as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QExkfWwX.js";import{u as ne,j as k,h as J,g as X,i as se,N as M,l as Y,q as lt,n as mt,o as x}from"./core-C9JgQJB4.js";import{fI as H,O1 as ct,$k as be,c9 as ge,N7 as $e,me as dt,Nm as me,Nl as ce,$l as ut,bn as he,gZ as Ue,$m as pt,Xh as bt,m3 as Fe,Xi as Ae,Xj as gt,kR as ht,Zl as ft,l4 as St,MX as It,Cx as yt,kY as vt,NI as Le,$n as Ne,$o as ke,$p as Rt,$q as At,$r as kt,Ns as Ce,la as Ct,Zu as wt,Nk as xt,N5 as Et,$s as Bt,N4 as Tt,$t as Dt,Nc as we,Nw as jt,Nv as $t,Nr as Ut,$u as Pe,SJ as Ft,bo as Lt,Nf as Nt,N_ as Pt,$v as Mt,$w as _t,NE as Ot,NB as xe,YR as zt,N2 as Zt,$x as Me,Or as Ee,Oz as Gt,$y as Ht,$z as K,$A as Vt,$B as _e,$C as Wt,$D as Oe,$E as ze,NQ as de,bv as qt,bL as fe,cN as Se,e0 as Ze,d$ as Ge,$F as Kt,gk as Qt,Z2 as Xt,$G as Jt,$H as He,Z6 as Yt,ZR as en,$I as tn,_e as nn,Ow as Be,Ov as an,$J as sn,$K as on,$L as rn,$M as ln,$N as mn,ZA as cn,Om as dn,Oq as un,bq as pn,bK as bn,cH as gn,cv as hn,bu as fn,UI as Sn,db as In,de as yn,dd as vn,cG as Rn}from"./zeni-epic-state-DLEY0NmH.js";import{bR as An,K as Ve,$ as We,W as ie,A as j,z as F,cQ as qe,a6 as oe,j as C,aQ as Te,H as D,ac as ae,ad as kn,G as Ke,cR as Cn,p as Q,aq as Qe,cS as wn,V as re,cT as xn,ao as En,a9 as Bn,a5 as Ie,Q as Xe,w as Tn,bz as Dn,at as jn,ag as $n,cU as Un,f as Fn}from"./index-BvMe6BwU.js";import{n as _,S as Ln,u as Je}from"./mui-DA_IUYGW.js";import ue from"./NotFoundScreen-azJwEf6u.js";import{S as De}from"./SetupPagesScreen-Bwcyn81K.js";import{F as Ye}from"./FeaturePreviewScreen-WONNYPz2.js";import{a as f}from"./sentry-oILOkT84.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-BCWJ7jlQ.js";import{u as et}from"./useInitialThreadRequest-BCD3tBzH.js";import{D as Nn}from"./DrawerScreen-Ac2BNHGU.js";import{M as tt}from"./MobileAppDrawer-l8XzezC6.js";import{F as Pn}from"./ScreenRoutes-C3N1CK9B.js";import{R as Mn}from"./ReimbursementApprovalRoutes-Q1SCHF1l.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./BusinessVerificationPageScreen-DNhcrJIG.js";import"./routePaths-CehqSbwZ.js";import"./analyticsHelper-D3Z95hnv.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-BRPFjPMD.js";import"./getLocaleForTenant-CZcWFJHh.js";import"./ReimbursementApprovalRuleDetailScreen-DILlSzn2.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]="a3dabf22-0fa1-423d-a959-04746bfddffb",e._sentryDebugIdIdentifier="sentry-dbid-a3dabf22-0fa1-423d-a959-04746bfddffb")}catch{}})();const nt=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ke.getLocalizedStrings(),On=Y((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const E=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:E,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Et({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Rt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(ke({}));const i=nt(o),l=Q(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=J(),t=ne(),n=X(),{reimbursementId:r}=se(),c=Ve(),d=We(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:E}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=X().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[v,w]=f.useState(!1),h=F.getSignedInUser(),R=k((p=>H(p))),g=k((p=>be(p,r))),L=et(R?.companyId,{clearParams:g.fetchState==="Completed"}),$=ge(R?.userRole??[]);(function(){const p=ne(),N=k((P=>H(P))),O=N?.tenantId,{isApprovalRulesV3Enabled:V,isLoading:z}=An(O),W=k((P=>P.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||z||W==="Not-Started"&&p(ct(!0,!1,!1,V))}),[O,z,V,W,p])})(),f.useEffect((()=>{(T&&!v||B&&!v&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t($e(!1,b,y,r)))}));const U=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Gn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:c,uncategorizedAccounts:U,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:E})})]})}const zn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-QExkfWwX.js";import{u as ne,j as k,h as J,g as X,i as se,N as M,l as Y,q as lt,n as mt,o as x}from"./core-C9JgQJB4.js";import{fI as H,O1 as ct,$k as be,c9 as ge,N7 as $e,me as dt,Nm as me,Nl as ce,$l as ut,bn as he,gZ as Ue,$m as pt,Xh as bt,m3 as Fe,Xi as Ae,Xj as gt,kR as ht,Zl as ft,l4 as St,MX as It,Cx as yt,kY as vt,NI as Le,$n as Ne,$o as ke,$p as Rt,$q as At,$r as kt,Ns as Ce,la as Ct,Zu as wt,Nk as xt,N5 as Et,$s as Bt,N4 as Tt,$t as Dt,Nc as we,Nw as jt,Nv as $t,Nr as Ut,$u as Pe,SJ as Ft,bo as Lt,Nf as Nt,N_ as Pt,$v as Mt,$w as _t,NE as Ot,NB as xe,YR as zt,N2 as Zt,$x as Me,Or as Ee,Oz as Gt,$y as Ht,$z as K,$A as Vt,$B as _e,$C as Wt,$D as Oe,$E as ze,NQ as de,bv as qt,bL as fe,cN as Se,e0 as Ze,d$ as Ge,$F as Kt,gk as Qt,Z2 as Xt,$G as Jt,$H as He,Z6 as Yt,ZR as en,$I as tn,_e as nn,Ow as Be,Ov as an,$J as sn,$K as on,$L as rn,$M as ln,$N as mn,ZA as cn,Om as dn,Oq as un,bq as pn,bK as bn,cH as gn,cv as hn,bu as fn,UI as Sn,db as In,de as yn,dd as vn,cG as Rn}from"./zeni-epic-state-DLEY0NmH.js";import{bR as An,K as Ve,$ as We,W as ie,A as j,z as F,cQ as qe,a6 as oe,j as C,aQ as Te,H as D,ac as ae,ad as kn,G as Ke,cR as Cn,p as Q,aq as Qe,cS as wn,V as re,cT as xn,ao as En,a9 as Bn,a5 as Ie,Q as Xe,w as Tn,bz as Dn,at as jn,ag as $n,cU as Un,f as Fn}from"./index-DvOt4VS9.js";import{n as _,S as Ln,u as Je}from"./mui-DA_IUYGW.js";import ue from"./NotFoundScreen-D9bcBk9H.js";import{S as De}from"./SetupPagesScreen-BeL32jvE.js";import{F as Ye}from"./FeaturePreviewScreen-X-JDJxdp.js";import{a as f}from"./sentry-oILOkT84.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-DqbLwjuM.js";import{u as et}from"./useInitialThreadRequest-B8hjmQPb.js";import{D as Nn}from"./DrawerScreen-iwe9vo8N.js";import{M as tt}from"./MobileAppDrawer-DbZpT3WI.js";import{F as Pn}from"./ScreenRoutes-rMyVJ0Wa.js";import{R as Mn}from"./ReimbursementApprovalRoutes-siKEt4P5.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./BusinessVerificationPageScreen-LkGxRSTs.js";import"./routePaths-of7B18Ze.js";import"./analyticsHelper-D5T9Pp0r.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.js";import"./getLocaleForTenant-D6brqFOn.js";import"./ReimbursementApprovalRuleDetailScreen-LTuYNlBh.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]="a3dabf22-0fa1-423d-a959-04746bfddffb",e._sentryDebugIdIdentifier="sentry-dbid-a3dabf22-0fa1-423d-a959-04746bfddffb")}catch{}})();const nt=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:te}}}=Ke.getLocalizedStrings(),On=Y((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=F.getSignedInUser(),d=he(c),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=be(e,t.reimbursementId),b=pt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const E=e.entityAutoCompleteState?.autoCompleteText?.common,I=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:E,entityAutoCompleteView:I},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:ge(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Fe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=F.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ce(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(we(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e($t())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(we(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Tt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Bt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Et({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ce(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Ct(i))},submitRemiDetails:()=>{e(Ce("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(ke({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(me({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(kt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Rt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(ke({}));const i=nt(o),l=Q(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Ae("common"))},onCancelAutoComplete:()=>{e(Ae("common"))}}}}))(Cn);function je(){const e=J(),t=ne(),n=X(),{reimbursementId:r}=se(),c=Ve(),d=We(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ie(),{isFeatureEnabled:b}=l(j.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(j.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:u,onAskAiCfoClick:E}=ye({mobileExploreReferrer:"Reimbursement Details"}),I=X().pathname,B=I.includes("edit"),T=I.includes("reimbursement/new"),[v,w]=f.useState(!1),h=F.getSignedInUser(),R=k((p=>H(p))),g=k((p=>be(p,r))),L=et(R?.companyId,{clearParams:g.fetchState==="Completed"}),$=ge(R?.userRole??[]);(function(){const p=ne(),N=k((P=>H(P))),O=N?.tenantId,{isApprovalRulesV3Enabled:V,isLoading:z}=An(O),W=k((P=>P.remiSetupApproverViewState.fetchState));f.useEffect((()=>{O==null||z||W==="Not-Started"&&p(ct(!0,!1,!1,V))}),[O,z,V,W,p])})(),f.useEffect((()=>{(T&&!v||B&&!v&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t($e(!1,b,y,r)))}));const U=k((p=>dt(p.accountState,p.accountListState,"reimbursementAccountList")));if(h==null)throw Error("Can't access address page without signing in...");const A={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||$&&g.billStatus==="rejected"||$===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(M,{to:A}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:d,children:[s.jsx(oe,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Gn,{children:s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Hn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(Te,{showAutofill:m,uploadInvoiceEndPoint:`${ae.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ce(p,a,!0,r,h?.userId))},updateInvoiceUploadFetchState:p=>{t(me({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:q.upload,single:te.dropReceipt.single,or:q.texts.or,multiple:te.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:d,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:c,uncategorizedAccounts:U,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:u,onAskAiCfoClick:E})})]})}const zn=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-QExkfWwX.js";import{g as J,h as ke,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-C9JgQJB4.js";import{fI as q,Ev as R,Ve as Ee,m3 as ne,uh as re,v6 as D,lK as Pe,lT as A,lL as E,kO as P,kF as L,kE as Le,DD as le,vb as Me,bq as Be,Vf as ve,bn as Ue,ES as xe,Vg as ze,Vh as Ge,cj as S,Dw as He,Vi as X,Vj as Ye,Vk as Ne,Vl as qe,Vm as $e,Vn as Ke,Vo as Qe,Vp as Ze,Vq as Je,Vr as We,Vs as Xe,Vt as ea,Vu as aa,Vv as T,Vw as M,Vx as B,Vy as v,Vz as U,VA as x,VB as z,VC as G,VD as H,VE as Y,ek as sa,Ew as ta,Ej as ee,Ek as ae,EC as oa,Eo as se,EI as na,VF as ra,VG as la,VH as ca,VI as ia,VJ as da,VK as pa,VL as _a,VM as fa,VN as ma,VO as ba,e0 as ua,d$ as ha}from"./zeni-epic-state-DLEY0NmH.js";import{al as ya,am as wa,an as Ca,a as Ia,$ as Sa,W as ce,A as ie,z as de,ao as ga,V as Ra,d as Va,ap as Ta,aq as ja,a6 as ka,j as N,Q as Fa,s as Oa,p as pe,ar as Da,as as Aa,at as Ea}from"./index-BvMe6BwU.js";import"./mui-DA_IUYGW.js";import Pa from"./NotFoundScreen-azJwEf6u.js";import{F as La}from"./FeaturePreviewScreen-WONNYPz2.js";import{a as b}from"./sentry-oILOkT84.js";import{u as Ma}from"./useInitialThreadRequest-BCD3tBzH.js";import{t as te,a as oe,b as Ba}from"./routePaths-CehqSbwZ.js";import{M as va}from"./MobileAppDrawer-l8XzezC6.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-BRPFjPMD.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]="6290ac36-53d9-412b-9024-bb9ee958f05d",e._sentryDebugIdIdentifier="sentry-dbid-6290ac36-53d9-412b-9024-bb9ee958f05d")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],g=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(T(a)),(g(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=g(t),l=S(t);l?(e(Ze({viewMode:a})),e(Je({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(T(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(T(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(T(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e($e({classesToFilterOut:a})):g(o.selectedReportID)?e(Ke({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(Ye({projectsToFilterOut:a})):g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=g(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?E():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?P():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):E(!0):P(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ia(),_=Sa(),m=Aa(_),a=ke(),s=Fe(),t=J(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=b.useState(!1),[$,_e]=b.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>q(n))),fe=k.masterTOSInfo?.isMasterTOSAccepted??!1,me=k.company?.companyInfo.firstMonthOfFY??1,be=Ma(k?.companyId),C=d((n=>R(n).fetchState)),ue=d((n=>Ee(n))),{areTenantIdsInSync:u}=ga(),F=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>ne(n))),I=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!$&&C==="Completed"&&u&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,u]),b.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":I&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":V&&s(L());break;case"balance_sheet_by_projects":I&&s(P());break;case"cash_flow_by_classes":V&&s(E());break;case"cash_flow_by_projects":I&&s(A());break;case"cash_flow":s(Pe(h.timeframe))}}),[c,F,O,u,V,I]);const K=Ra(),we=K?.loggedInUserRole!=null&&Be(K?.loggedInUserRole)!==!0,[Ce,Ie]=b.useState(!1),Q=n=>{Ie(n)},Se=Va(),ge=Ta();return(function(n){const{isDataReady:Re}=n,{pathname:Ve}=J(),Z=ya(Ve??"")==="reports",Te=wa(Re),je=b.useMemo((()=>Z?Ua:void 0),[Z]);Ca({canFetchSuggestedQuestions:Te,pageContexts:je})})({isDataReady:C==="Completed"}),ja({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ka,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Ce,handleDrawerToggle:Q}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:N,filter:h,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:I,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:Q,reportsResyncFetchState:ue.reportsResyncFetchState,isAiCfoAccessEnabled:ge&&Se&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ua(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Pa,{})})]})}export{ps as default};
|
|
1
|
+
import{j as p}from"./liveblocks-QExkfWwX.js";import{g as J,h as ke,u as Fe,i as Oe,j as d,l as De,n as Ae,o as W}from"./core-C9JgQJB4.js";import{fI as q,Ev as R,Ve as Ee,m3 as ne,uh as re,v6 as D,lK as Pe,lT as A,lL as E,kO as P,kF as L,kE as Le,DD as le,vb as Me,bq as Be,Vf as ve,bn as Ue,ES as xe,Vg as ze,Vh as Ge,cj as S,Dw as He,Vi as X,Vj as Ye,Vk as Ne,Vl as qe,Vm as $e,Vn as Ke,Vo as Qe,Vp as Ze,Vq as Je,Vr as We,Vs as Xe,Vt as ea,Vu as aa,Vv as T,Vw as M,Vx as B,Vy as v,Vz as U,VA as x,VB as z,VC as G,VD as H,VE as Y,ek as sa,Ew as ta,Ej as ee,Ek as ae,EC as oa,Eo as se,EI as na,VF as ra,VG as la,VH as ca,VI as ia,VJ as da,VK as pa,VL as _a,VM as fa,VN as ma,VO as ba,e0 as ua,d$ as ha}from"./zeni-epic-state-DLEY0NmH.js";import{al as ya,am as wa,an as Ca,a as Ia,$ as Sa,W as ce,A as ie,z as de,ao as ga,V as Ra,d as Va,ap as Ta,aq as ja,a6 as ka,j as N,Q as Fa,s as Oa,p as pe,ar as Da,as as Aa,at as Ea}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import Pa from"./NotFoundScreen-D9bcBk9H.js";import{F as La}from"./FeaturePreviewScreen-X-JDJxdp.js";import{a as b}from"./sentry-oILOkT84.js";import{u as Ma}from"./useInitialThreadRequest-B8hjmQPb.js";import{t as te,a as oe,b as Ba}from"./routePaths-of7B18Ze.js";import{M as va}from"./MobileAppDrawer-DbZpT3WI.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./useTaskManagerAccess-CsQUeQX-.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]="6290ac36-53d9-412b-9024-bb9ee958f05d",e._sentryDebugIdIdentifier="sentry-dbid-6290ac36-53d9-412b-9024-bb9ee958f05d")}catch{}})();const Ua=["profit_loss","balance_sheet","cash_flow"],g=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(U({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},xa=e=>{e(la()),e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba())},za=De((function(e){const o=de.getSignedInUser(),_=e.tenantState.currentTenantId,m=q(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:Ue(o),showAccountGroups:r===!0,isAccountingClassesEnabled:ne(e),isAccountingProjectsEnabled:re(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(D(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(ra(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(na(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="same_period_last_year"))),e(ee(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(ae(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(T(a)),(g(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(se({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(X({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(se(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(oa(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(ee(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ae(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(ta({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=sa(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return oe(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ba(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?oe(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?te(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=pe(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(U({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(U({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=g(t),l=S(t);l?(e(Ze({viewMode:a})),e(Je({viewMode:a}))):r?(e(We({viewMode:a})),e(Xe({viewMode:a}))):(e(ea({viewMode:a})),e(aa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(T(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(T(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(T(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e($e({classesToFilterOut:a})):g(o.selectedReportID)?e(Ke({classesToFilterOut:a})):e(Qe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(Ye({projectsToFilterOut:a})):g(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e(qe({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(X({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=g(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?E():a?L():He()),o.isAccountingProjectsEnabled&&e(s?A():a?P():le())},onUpdateDisplayOrder:a=>{e(Ge(a))},onUpdateReportFormat:a=>{xa(e),e(ze(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?xe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):E(!0):P(!0):L(!0))}}}))(Da);function Ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ia(),_=Sa(),m=Aa(_),a=ke(),s=Fe(),t=J(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=ce(),{isFeatureEnabled:f}=l(ie.isReportsHorizontalClassLayoutSwitchEnabled),i=de.getSignedInUser(),[c,w]=b.useState(!1),[$,_e]=b.useState(!1);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>q(n))),fe=k.masterTOSInfo?.isMasterTOSAccepted??!1,me=k.company?.companyInfo.firstMonthOfFY??1,be=Ma(k?.companyId),C=d((n=>R(n).fetchState)),ue=d((n=>Ee(n))),{areTenantIdsInSync:u}=ga(),F=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>ne(n))),I=d((n=>re(n))),he=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),ye=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(w(!0),s(D(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!$&&C==="Completed"&&u&&(s(D(i.userId,!1,!0,!1)),_e(!0))}),[c,$,C,u]),b.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(F){case"profit_and_loss":case"profit_and_loss_by_classes":s(Me(h.timeframe));break;case"profit_and_loss_by_projects":I&&s(le());break;case"balance_sheet":s(Le(h.timeframe));break;case"balance_sheet_by_classes":V&&s(L());break;case"balance_sheet_by_projects":I&&s(P());break;case"cash_flow_by_classes":V&&s(E());break;case"cash_flow_by_projects":I&&s(A());break;case"cash_flow":s(Pe(h.timeframe))}}),[c,F,O,u,V,I]);const K=Ra(),we=K?.loggedInUserRole!=null&&Be(K?.loggedInUserRole)!==!0,[Ce,Ie]=b.useState(!1),Q=n=>{Ie(n)},Se=Va(),ge=Ta();return(function(n){const{isDataReady:Re}=n,{pathname:Ve}=J(),Z=ya(Ve??"")==="reports",Te=wa(Re),je=b.useMemo((()=>Z?Ua:void 0),[Z]);Ca({canFetchSuggestedQuestions:Te,pageContexts:je})})({isDataReady:C==="Completed"}),ja({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ka,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(va,{isAppContentDrawerOpen:Ce,handleDrawerToggle:Q}),p.jsx(za,{firstMonthOfFY:me,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:ye,selectedReportID:F,analytics:N,filter:h,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:I,isCompareModeOn:he,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:Q,reportsResyncFetchState:ue.reportsResyncFetchState,isAiCfoAccessEnabled:ge&&Se&&!e,onAskAiCfoClick:()=>{if(fe)if(m){const n=pe(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,initialOpenThreadRequest:be})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ps(){const e=d((s=>q(s))),{useFeatureGate:o}=ce(),{isFeatureEnabled:_}=o(ie.isDebitCardFeatureEnabled),m=ua(_,e),a=ha(e);return m===!0||a===!0?p.jsx(La,{}):p.jsxs(Ae,{children:[p.jsx(W,{path:"/",element:p.jsx(Ga,{})}),p.jsx(W,{path:"*",element:p.jsx(Pa,{})})]})}export{ps as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-QExkfWwX.js";import{z as b,a6 as N,j as d,Q as S,e0 as I,W as k,A as C}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-QExkfWwX.js";import{z as b,a6 as N,j as d,Q as S,e0 as I,W as k,A as C}from"./index-DvOt4VS9.js";import"./mui-DA_IUYGW.js";import g from"./NotFoundScreen-D9bcBk9H.js";import{a as c}from"./sentry-oILOkT84.js";import{u as D,j as h,h as F,g as L,l as T,n as U,o as u,N as y}from"./core-C9JgQJB4.js";import{fI as _,a2u as j,a2v as p,Ea as P,q3 as V,a2w as q,E8 as z}from"./zeni-epic-state-DLEY0NmH.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.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]="5fb6512a-3a91-46ee-8890-616d57807c4b",e._sentryDebugIdIdentifier="sentry-dbid-5fb6512a-3a91-46ee-8890-616d57807c4b")}catch{}})();const A=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),d.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&d.trackInviteEmailClicked("cancel")}}}))(I),G=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:d,onLoad:o=>(E=>E.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(A,{navigate:l,location:w,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(G,{}):a.jsx(g,{})}),a.jsx(u,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-QExkfWwX.js";import{a as A}from"./sentry-oILOkT84.js";import{i as M,u as H,h as Q,g as ee,j as h,l as te}from"./core-C9JgQJB4.js";import{Xc as Fe,Xd as Ve,m3 as ae,sB as Ge,sN as Me,t1 as $e,s$ as Re,t2 as Ke,t4 as Ue,Xe as Ye,fI as K,Wb as pe,Xf as Se,h2 as ne,cC as le,cD as se,FA as ve,Xg as Ce,FE as Xe,gS as ce,sE as ze,td as qe,dE as Ze,dD as We,Tz as fe,Fy as He,Fs as Qe,Xh as De,Fk as et,Fj as tt,Fe as at,Fp as nt,FF as lt,Xi as Y,Xj as ge,Fl as st,Wc as oe,FV as Ae,FO as Ie,Xk as xe,sH as Te,FI as Be,FG as Le,Xl as Je,G0 as je,FZ as we,FJ as be,F$ as Ne}from"./zeni-epic-state-DLEY0NmH.js";import{a2 as de,aW as ie,aX as ct,z as ot,h as dt,a5 as it,a6 as ue,j as _,at as ut,aY as rt,p as V,G as ye,K as Ee,aZ as ht,a_ as mt,a$ as pt}from"./index-
|
|
1
|
+
import{j as E}from"./liveblocks-QExkfWwX.js";import{a as A}from"./sentry-oILOkT84.js";import{i as M,u as H,h as Q,g as ee,j as h,l as te}from"./core-C9JgQJB4.js";import{Xc as Fe,Xd as Ve,m3 as ae,sB as Ge,sN as Me,t1 as $e,s$ as Re,t2 as Ke,t4 as Ue,Xe as Ye,fI as K,Wb as pe,Xf as Se,h2 as ne,cC as le,cD as se,FA as ve,Xg as Ce,FE as Xe,gS as ce,sE as ze,td as qe,dE as Ze,dD as We,Tz as fe,Fy as He,Fs as Qe,Xh as De,Fk as et,Fj as tt,Fe as at,Fp as nt,FF as lt,Xi as Y,Xj as ge,Fl as st,Wc as oe,FV as Ae,FO as Ie,Xk as xe,sH as Te,FI as Be,FG as Le,Xl as Je,G0 as je,FZ as we,FJ as be,F$ as Ne}from"./zeni-epic-state-DLEY0NmH.js";import{a2 as de,aW as ie,aX as ct,z as ot,h as dt,a5 as it,a6 as ue,j as _,at as ut,aY as rt,p as V,G as ye,K as Ee,aZ as ht,a_ as mt,a$ as pt}from"./index-DvOt4VS9.js";import{n as re}from"./mui-DA_IUYGW.js";import{p as St}from"./pathToGoBack-Cad-ghSF.js";import W from"./NotFoundScreen-D9bcBk9H.js";import{c as G}from"./routePaths-of7B18Ze.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]="b0e24764-79d6-4873-9029-357258a26f39",e._sentryDebugIdIdentifier="sentry-dbid-b0e24764-79d6-4873-9029-357258a26f39")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=M(),s=t??l,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,s??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{s!=null&&d==null&&m.fetchState==="Not-Started"&&n(Ge(s))}),[s,d,m.fetchState]),A.useEffect((()=>{n(Me({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(W,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(W,{}):E.jsx(ft,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(Ye({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(s,u,r))},onSkip:(u,r)=>{n($e(s,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
2
|
-
import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as xs,Bl as gs,dj as Rs,c9 as Is,gM as js,gc as Ts,dg as pe,cH as As,gq as bs,cz as Ds,bF as fs,br as ys,UE as vs,v as Cs,UH as Os,bq as Us,UI as Ps,bL as ws,bK as Fs,bu as Ls,cv as Hs,UJ as Vs,UK as ks,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as Ie,gP as je,go as zs}from"./zeni-epic-state-DLEY0NmH.js";import{j as e}from"./liveblocks-QExkfWwX.js";import{a as P}from"./sentry-oILOkT84.js";import{N as u,u as Gs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Ks,o as n}from"./core-C9JgQJB4.js";import{I as l,u as Js,z as y,W as Qs,d as Xs,D as et,A as S,f as st,M as tt,V as nt,L as F,G as Ae,t as _,P as at,N as ot,j as ne}from"./index-BvMe6BwU.js";import{u as rt}from"./mui-DA_IUYGW.js";import{f as be}from"./analyticsHelper-D3Z95hnv.js";import{t as it}from"./getLocaleForTenant-CZcWFJHh.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="3fe75de4-c251-4930-a3e1-8bbe33451cd9",o._sentryDebugIdIdentifier="sentry-dbid-3fe75de4-c251-4930-a3e1-8bbe33451cd9")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-azJwEf6u.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:H,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(H===!0){if(o)return e.jsx(fe,{tenantEmailDomain:C});if(i)return e.jsx(De,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(fe,{tenantEmailDomain:C}):i?e.jsx(De,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(dt,{tenantEmailDomain:C}):N?e.jsx(ut,{tenantEmailDomain:C}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-ePaa6RzM.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-zkvSlLIB.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-6xzsoOoQ.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-D-MmK7A2.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-DFwRhTG0.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-BOEFIFhM.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CUIv6Ff9.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-BxrX1JFh.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-CbAy6bRF.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Pqnpfg2v.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-CNNCASwJ.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-5EIDUyAv.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-BOEFIFhM.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-CjGixOCb.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-BxrX1JFh.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-FHrcpjWT.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-CmTSBCfZ.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-CNNCASwJ.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-BHcGo7KC.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-By8U2MA9.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-ePaa6RzM.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-zkvSlLIB.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-DFwRhTG0.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-7QJOc7_T.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-6xzsoOoQ.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-5EIDUyAv.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-Pqnpfg2v.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-D-MmK7A2.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),ft=l((()=>s((()=>import("./ChargeCardRoutes-CUIv6Ff9.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-C4m7rB7l.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),vt=l((()=>s((()=>import("./PerformanceRoutes-u7jsxKOk.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ct=l((()=>s((()=>import("./ExpenseAutomationRoutes-CbAy6bRF.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BJS18VqA.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-DJDgplhQ.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-B6-8g-HW.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-C2aGObgH.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-C6zY5aHa.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-azJwEf6u.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-vhycpFEZ.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:H,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:V})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(H)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return C===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):H?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Gs(),N=qs(),{tenantEmailDomain:i}=Ws(),H=rt().mode,{setLoading:O,clearAllLoading:C,clearLoading:V}=Js(),f=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),K=Es(j),z=Ys(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:k}=Qs(),M=Xs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,Ve=st(r,He,oe),{isCardsHidden:ke}=tt(r?.tenantId),Be=!Ve||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),G=$((a=>js(a)));if(i!=null){const a=y.getSignedInUserTenant(i);j!=null&&a!=null&&be(j,r,H)}const Z={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),h=nt(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=fs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(zs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,f,j,O,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),j!=null&&be(j,r,H,void 0,G.tenantsBaseInOrder))}),[G,T,r,j]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(C(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:We}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Hs(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Je?e.jsx(Rt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(Dt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&U===!1?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&U===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Ut,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,$t as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-D9bcBk9H.js","assets/sentry-oILOkT84.js","assets/core-C9JgQJB4.js","assets/zeni-epic-state-DLEY0NmH.js","assets/index-DvOt4VS9.js","assets/mui-DA_IUYGW.js","assets/analytics-Dk2G_EzJ.js","assets/utils-A5fkS8h7.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-DMjkbJKm.js","assets/withTransactionSidePanel-dWI8TaQe.js","assets/useAskAiCfoHostNavButtonProps-DqbLwjuM.js","assets/TransactionDetailScreen-C1bVEOAX.js","assets/decodeURIComponentSafe-CYuijBUP.js","assets/useInitialThreadRequest-B8hjmQPb.js","assets/routePaths-of7B18Ze.js","assets/expenseAutomationHelper-jtvNac2y.js","assets/stripSplatSuffix-DfsbDgo5.js","assets/analyticsHelper-D5T9Pp0r.js","assets/CompanyPassportScreen-CCGN8XdD.js","assets/MobileAppDrawer-DbZpT3WI.js","assets/InboxNotificationsProvider-yQHZ5K7x.js","assets/useTaskManagerAccess-CsQUeQX-.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Dm2nLAVE.js","assets/FeaturePreviewScreen-X-JDJxdp.js","assets/BillPayRoutes-DOtQLf2H.js","assets/AddressScreen-D6cv_M67.js","assets/DomesticWireDetailScreen-C0ktkm9X.js","assets/BusinessVerificationPageScreen-LkGxRSTs.js","assets/DrawerScreen-iwe9vo8N.js","assets/SetupPagesScreen-BeL32jvE.js","assets/BillPayApprovalRoutes-DmDSGeDR.js","assets/ReimbursementApprovalRuleDetailScreen-LTuYNlBh.js","assets/getLocaleForTenant-D6brqFOn.js","assets/ReimbursementRoutes-VvEa2eeW.js","assets/ReimbursementApprovalRoutes-siKEt4P5.js","assets/TransactionListRoutes-Bmw678LX.js","assets/ZeniAccountStatementScreen-Bu1Mm_37.js","assets/SettingsRoutes-D-DVCxRY.js","assets/AccountMappingScreen-US2XVxHS.js","assets/QBOConnectionScreen-DUhvVruv.js","assets/empty-Bn6LwN65.js","assets/index-B2whCLRz.js","assets/url-DoKU4Zzh.js","assets/index-BuFdtVKe.js","assets/accountMappingHelper-Cmqzt3o8.js","assets/useEmailConnectResultRefresh-CaTrYS8H.js","assets/ReportsRoutes-C2d97Zc4.js","assets/ChargeCardRoutes-0xaYBK7a.js","assets/useChargeCardPusherEvents-DIzup14w.js","assets/PeopleRoutes-RAr7GTqt.js","assets/ExpenseAutomationRoutes-inQz41D4.js","assets/useActualMatchingMatchDetail-YT3I0Lzu.js","assets/ScheduleDetailsPrepaidExpensesScreen-RqztnMI8.js","assets/pathToGoBack-Cad-ghSF.js","assets/TreasuryRoutes-M8WR0qHE.js","assets/VendorsRoutes-DJp0syoy.js","assets/ZeniAccountRoutes-Bt_zuUh-.js","assets/AddressRoutes-Bc244OpL.js","assets/PandLWithForecastRoutes-DOamJ_Fj.js","assets/CustomerOnboardingRoutes-BUPPuViZ.js","assets/TransactionDetailRoutes-SxiOJJwM.js","assets/EntityDetailRoutes-BkUIJeVW.js","assets/InvoicingRoutes-YIPTztGo.js","assets/NotificationRoutes-BzMEu6Wm.js","assets/PerformanceRoutes-BlaxgxAu.js","assets/ActualMatchingMatchDetailScreen-CIWPn1Y6.js","assets/RewardsRoutes-CD8Bg_Li.js","assets/TaskRoutes-Lle5AHhb.js","assets/TaskListScreen-bWUpRp3D.js","assets/useTaskManagerPusherEvents-DPwaoExz.js","assets/AiCfoScreen-B5-4LiJc.js","assets/CardsAiCfoScreen-DMWgyqr4.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as Es,fI as hs,e0 as ps,d$ as xs,Bl as gs,dj as Rs,c9 as Is,gM as js,gc as Ts,dg as pe,cH as As,gq as bs,cz as Ds,bF as fs,br as ys,UE as vs,v as Cs,UH as Os,bq as Us,UI as Ps,bL as ws,bK as Fs,bu as Ls,cv as Hs,UJ as Vs,UK as ks,db as Bs,de as Ss,dd as Ns,cG as Ms,cN as Zs,pW as xe,gl as ge,h0 as $s,gn as Re,gO as Ie,gP as je,go as zs}from"./zeni-epic-state-DLEY0NmH.js";import{j as e}from"./liveblocks-QExkfWwX.js";import{a as P}from"./sentry-oILOkT84.js";import{N as u,u as Gs,h as qs,i as Ws,g as Ys,j as $,q as Te,n as Ks,o as n}from"./core-C9JgQJB4.js";import{I as l,u as Js,z as y,W as Qs,d as Xs,D as et,A as S,f as st,M as tt,V as nt,L as F,G as Ae,t as _,P as at,N as ot,j as ne}from"./index-DvOt4VS9.js";import{u as rt}from"./mui-DA_IUYGW.js";import{f as be}from"./analyticsHelper-D5T9Pp0r.js";import{t as it}from"./getLocaleForTenant-D6brqFOn.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="3fe75de4-c251-4930-a3e1-8bbe33451cd9",o._sentryDebugIdIdentifier="sentry-dbid-3fe75de4-c251-4930-a3e1-8bbe33451cd9")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-D9bcBk9H.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ut=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),dt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:H,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(H===!0){if(o)return e.jsx(fe,{tenantEmailDomain:C});if(i)return e.jsx(De,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(fe,{tenantEmailDomain:C}):i?e.jsx(De,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):D?e.jsx(dt,{tenantEmailDomain:C}):N?e.jsx(ut,{tenantEmailDomain:C}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-DMjkbJKm.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-DOtQLf2H.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-VvEa2eeW.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Bmw678LX.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-D-DVCxRY.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-C2d97Zc4.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-0xaYBK7a.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-RAr7GTqt.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-inQz41D4.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-M8WR0qHE.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-DJp0syoy.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-Bt_zuUh-.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-C2d97Zc4.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),Et=l((()=>s((()=>import("./AddressRoutes-Bc244OpL.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),ht=l((()=>s((()=>import("./PeopleRoutes-RAr7GTqt.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-DOamJ_Fj.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BUPPuViZ.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),gt=l((()=>s((()=>import("./VendorsRoutes-DJp0syoy.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),Rt=l((()=>s((()=>import("./TransactionDetailRoutes-SxiOJJwM.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-BkUIJeVW.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-DMjkbJKm.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-DOtQLf2H.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-D-DVCxRY.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-YIPTztGo.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-VvEa2eeW.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-Bt_zuUh-.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),bt=l((()=>s((()=>import("./TreasuryRoutes-M8WR0qHE.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-Bmw678LX.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),ft=l((()=>s((()=>import("./ChargeCardRoutes-0xaYBK7a.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),yt=l((()=>s((()=>import("./NotificationRoutes-BzMEu6Wm.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),vt=l((()=>s((()=>import("./PerformanceRoutes-BlaxgxAu.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ct=l((()=>s((()=>import("./ExpenseAutomationRoutes-inQz41D4.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-CIWPn1Y6.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),Ut=l((()=>s((()=>import("./RewardsRoutes-CD8Bg_Li.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Pt=l((()=>s((()=>import("./TaskRoutes-Lle5AHhb.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-B5-4LiJc.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-DMWgyqr4.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-D9bcBk9H.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-bWUpRp3D.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:H,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:V})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(H)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return C===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):H?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),$t=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Gs(),N=qs(),{tenantEmailDomain:i}=Ws(),H=rt().mode,{setLoading:O,clearAllLoading:C,clearLoading:V}=Js(),f=y.getSignedInUserTenant(i)?.tenantId,j=y.getSignedInUser(),K=Es(j),z=Ys(),[L,we]=P.useState(!1),r=$((a=>hs(a))),{useFeatureGate:k}=Qs(),M=Xs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),T=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?ps(oe,r):void 0,Q=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?gs(r)&&!Rs(r):void 0,Ve=st(r,He,oe),{isCardsHidden:ke}=tt(r?.tenantId),Be=!Ve||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),G=$((a=>js(a)));if(i!=null){const a=y.getSignedInUserTenant(i);j!=null&&a!=null&&be(j,r,H)}const Z={tenantId:f,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),h=nt(),$e=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),ze=As(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,Ge=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Ge?.params.selectedPeriod,qe=$((a=>Z.tenantId!=null?bs(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=fs(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=ys();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,y]),P.useLayoutEffect((()=>{!Cs(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&d?.zeniSessionId!=null,cs=c==null||c.tenantId!==t,ms=c!=null&&c.excludedResources==null,_s=c!=null&&c.externalConnections==null;if(W&&cs){B(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)))}else W&&ms&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(Ie(d.userId,t))),W&&_s&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(je(d.userId,t)));if(W){ne.identify(d.userId,{tenant_id:t});const Y=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(zs(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,f,j,O,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&G.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(G.tenantsBaseInOrder)),j!=null&&be(j,r,H,void 0,G.tenantsBaseInOrder))}),[G,T,r,j]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(C(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=mt,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=ct[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:We}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Je=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Be&&!U,Qe=Ps(h?.loggedInUserRoleMap),Xe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&ws(h?.loggedInUserRoleMap),_e=Fe&&!U,ss=Le&&!U,ts=ue&&Fs(h?.loggedInUserRoleMap),ns=de&&Ls(h?.loggedInUserRoleMap),as=_e&&Hs(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),ls=Ss(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),x=Ms(h?.loggedInUserRoleMap),g=Zs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||ze===!0||Qe===!0||os===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||K&&!ee)&&es&&Xe!==!0&&E===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||K?!L||te!==!1||ee||K?L&&r?.userRole&&E!=null&&Q!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(ht,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Ke||Je?e.jsx(Rt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(Dt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Pt,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(At,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(vt,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&U===!1?e.jsx(Ct,{}):e.jsx(Pe,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&U===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(yt,{})}),e.jsx(n,{path:"vendors/*",element:$e?e.jsx(gt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Ut,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,$t as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{h as L,g as H,u as U,i as N,j as C,l as K,n as X,o as k}from"./core-C9JgQJB4.js";import{fI as w,ZT as Pe,O1 as ve,Zq as we,Zz as Ae,c9 as Q,cU as _e,cV as De,bq as Ue,df as Re,Gj as Me,ZU as Te,Pu as Be,MU as Oe,ML as de,MI as Ve,Gn as ue,MO as pe,MR as ge,MX as Y,Cx as ee,Gm as Fe,ly as $,lB as me,ZV as Le,mL as Ne,GE as Ze,W5 as Ge,W6 as $e,lw as He,ZW as Ke,lz as We,uL as ze,W0 as qe,W1 as Xe,uP as Je,hZ as Qe,U$ as q,hR as ae,hO as Ye,hW as en,V0 as nn,GB as tn,ZX as an,ZY as on,N9 as sn,m3 as rn,d$ as fe,e0 as he,ZZ as ln,gF as cn,Vf as dn,GA as oe,gK as se,gJ as un,Gz as pn,gI as gn,gH as mn,Z_ as fn,Ur as Ce,Z$ as hn,_0 as Cn,_1 as yn,_2 as Sn,_3 as bn,_4 as In,GH as xn,_5 as En,Gy as ie,Gs as G,_6 as kn,_7 as jn,_8 as re,_9 as Pn,dU as vn,_a as wn,_b as An,_c as _n,UD as Dn,c1 as Un,c8 as Rn,c7 as Mn,c2 as Tn,_d as Bn,c5 as On,c4 as Vn,c6 as Fn,c3 as Ln}from"./zeni-epic-state-DLEY0NmH.js";import{bR as Nn,z as v,V as Z,a5 as ne,c1 as Zn,j as W,W as te,A as V,f as ye,M as Se,c2 as Gn,h as $n,X as be,c3 as Hn,ag as Kn,c4 as Wn,c5 as zn,ao as qn,c6 as Xn,p as Jn,c as Ie,c7 as Qn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-QExkfWwX.js";import{a as d}from"./sentry-oILOkT84.js";import{h as L,g as H,u as U,i as N,j as C,l as K,n as X,o as k}from"./core-C9JgQJB4.js";import{fI as w,ZT as Pe,O1 as ve,Zq as we,Zz as Ae,c9 as Q,cU as _e,cV as De,bq as Ue,df as Re,Gj as Me,ZU as Te,Pu as Be,MU as Oe,ML as de,MI as Ve,Gn as ue,MO as pe,MR as ge,MX as Y,Cx as ee,Gm as Fe,ly as $,lB as me,ZV as Le,mL as Ne,GE as Ze,W5 as Ge,W6 as $e,lw as He,ZW as Ke,lz as We,uL as ze,W0 as qe,W1 as Xe,uP as Je,hZ as Qe,U$ as q,hR as ae,hO as Ye,hW as en,V0 as nn,GB as tn,ZX as an,ZY as on,N9 as sn,m3 as rn,d$ as fe,e0 as he,ZZ as ln,gF as cn,Vf as dn,GA as oe,gK as se,gJ as un,Gz as pn,gI as gn,gH as mn,Z_ as fn,Ur as Ce,Z$ as hn,_0 as Cn,_1 as yn,_2 as Sn,_3 as bn,_4 as In,GH as xn,_5 as En,Gy as ie,Gs as G,_6 as kn,_7 as jn,_8 as re,_9 as Pn,dU as vn,_a as wn,_b as An,_c as _n,UD as Dn,c1 as Un,c8 as Rn,c7 as Mn,c2 as Tn,_d as Bn,c5 as On,c4 as Vn,c6 as Fn,c3 as Ln}from"./zeni-epic-state-DLEY0NmH.js";import{bR as Nn,z as v,V as Z,a5 as ne,c1 as Zn,j as W,W as te,A as V,f as ye,M as Se,c2 as Gn,h as $n,X as be,c3 as Hn,ag as Kn,c4 as Wn,c5 as zn,ao as qn,c6 as Xn,p as Jn,c as Ie,c7 as Qn}from"./index-DvOt4VS9.js";import{n as B}from"./mui-DA_IUYGW.js";import{u as xe}from"./useTaskManagerAccess-CsQUeQX-.js";import{U as Yn}from"./AccountMappingScreen-US2XVxHS.js";import{t as et,A as nt}from"./AddressScreen-D6cv_M67.js";import F from"./NotFoundScreen-D9bcBk9H.js";import{g as tt}from"./analyticsHelper-D5T9Pp0r.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-LkGxRSTs.js";import{C as st}from"./CompanyPassportScreen-CCGN8XdD.js";import{M}from"./MobileAppDrawer-DbZpT3WI.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-CaTrYS8H.js";import{q as le}from"./QBOConnectionScreen-DUhvVruv.js";import{B as lt}from"./BillPayApprovalRoutes-DmDSGeDR.js";import{R as ct}from"./ReimbursementApprovalRoutes-siKEt4P5.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";import"./accountMappingHelper-Cmqzt3o8.js";import"./routePaths-of7B18Ze.js";import"./InboxNotificationsProvider-yQHZ5K7x.js";import"./empty-Bn6LwN65.js";import"./pdf-lib-C9IVGH9O.js";import"./index-B2whCLRz.js";import"./url-DoKU4Zzh.js";import"./index-BuFdtVKe.js";import"./decodeURIComponentSafe-CYuijBUP.js";import"./ReimbursementApprovalRuleDetailScreen-LTuYNlBh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="cd861493-7ba3-4d61-966a-066b051e3488",e._sentryDebugIdIdentifier="sentry-dbid-cd861493-7ba3-4d61-966a-066b051e3488")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-QExkfWwX.js";import{h as Y,g as X,u as ee,i as W,j as _,N as R,l as H,t as en}from"./core-C9JgQJB4.js";import{bK as nn,fI as x,cH as tn,Ib as J,Zq as an,Zt as sn,v2 as ne,uS as te,mD as ae,C3 as N,Zv as be,gJ as He,gI as Ge,gH as Ke,Zw as on,Ik as cn,MU as Ce,ML as he,MI as Ie,Mn as Q,MO as Ae,MR as ke,MX as _e,Cx as ve,h2 as rn,cC as un,e0 as dn,d$ as ln,dj as pn,bu as mn,cv as Fe,Zx as yn,Ln as fe,L$ as fn,Zy as gn,bL as Sn,Od as ge,O1 as bn,Zz as Cn,ZA as hn,Oh as In,Ol as An,ZB as je,BY as kn,SM as _n,ZC as vn,ZD as Pn,ZE as Tn,ZF as qe,ZG as En,ZH as Dn,VQ as On,YH as Un,W3 as wn,ZI as Je,Mz as Fn,Mr as xn,W4 as Vn,Mv as Bn,ZJ as Ue,P1 as Qe,mL as jn,uV as Ye,C5 as Rn,bF as Re,Ch as Le,cF as Ln,ZK as Xe,OT as we,OA as Nn,OB as Mn,OF as zn,ZL as Zn,OW as Ne,ZM as $n,ZN as Wn,ZO as Hn,PI as Se,ZP as Gn,gZ as Kn,Jw as qn,ZQ as Jn,JB as Qn,JA as Yn}from"./zeni-epic-state-DLEY0NmH.js";import{ag as Pe,V as ie,W as de,A as q,z as E,a6 as se,j as D,a5 as Te,Q as $,bO as Xn,ac as oe,bP as V,bg as xe,bQ as et,bR as nt,bS as tt,n as Be,bT as at,p as Me,aE as ze,$ as it,a9 as st,bU as ot,bV as ct,bW as rt,w as ut}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-QExkfWwX.js";import{h as Y,g as X,u as ee,i as W,j as _,N as R,l as H,t as en}from"./core-C9JgQJB4.js";import{bK as nn,fI as x,cH as tn,Ib as J,Zq as an,Zt as sn,v2 as ne,uS as te,mD as ae,C3 as N,Zv as be,gJ as He,gI as Ge,gH as Ke,Zw as on,Ik as cn,MU as Ce,ML as he,MI as Ie,Mn as Q,MO as Ae,MR as ke,MX as _e,Cx as ve,h2 as rn,cC as un,e0 as dn,d$ as ln,dj as pn,bu as mn,cv as Fe,Zx as yn,Ln as fe,L$ as fn,Zy as gn,bL as Sn,Od as ge,O1 as bn,Zz as Cn,ZA as hn,Oh as In,Ol as An,ZB as je,BY as kn,SM as _n,ZC as vn,ZD as Pn,ZE as Tn,ZF as qe,ZG as En,ZH as Dn,VQ as On,YH as Un,W3 as wn,ZI as Je,Mz as Fn,Mr as xn,W4 as Vn,Mv as Bn,ZJ as Ue,P1 as Qe,mL as jn,uV as Ye,C5 as Rn,bF as Re,Ch as Le,cF as Ln,ZK as Xe,OT as we,OA as Nn,OB as Mn,OF as zn,ZL as Zn,OW as Ne,ZM as $n,ZN as Wn,ZO as Hn,PI as Se,ZP as Gn,gZ as Kn,Jw as qn,ZQ as Jn,JB as Qn,JA as Yn}from"./zeni-epic-state-DLEY0NmH.js";import{ag as Pe,V as ie,W as de,A as q,z as E,a6 as se,j as D,a5 as Te,Q as $,bO as Xn,ac as oe,bP as V,bg as xe,bQ as et,bR as nt,bS as tt,n as Be,bT as at,p as Me,aE as ze,$ as it,a9 as st,bU as ot,bV as ct,bW as rt,w as ut}from"./index-DvOt4VS9.js";import{a as h}from"./sentry-oILOkT84.js";import{u as Ee,n as Ve,D as dt,S as lt}from"./mui-DA_IUYGW.js";import{u as pt,d as Ze,B as Oe}from"./BusinessVerificationPageScreen-LkGxRSTs.js";import{M as le}from"./MobileAppDrawer-DbZpT3WI.js";import L from"./NotFoundScreen-D9bcBk9H.js";import{a as $e}from"./analyticsHelper-D5T9Pp0r.js";import{d as We}from"./routePaths-of7B18Ze.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]="3b39fb8a-22e2-4c79-9930-2ebfcfc3db33",e._sentryDebugIdIdentifier="sentry-dbid-3b39fb8a-22e2-4c79-9930-2ebfcfc3db33")}catch{}})();const mt=Ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-QExkfWwX.js";import{a as f,R as T,t as A}from"./sentry-oILOkT84.js";import{u as z,h as D,j as c,g as M,N as O,l as j}from"./core-C9JgQJB4.js";import{u as P,z as s,j as E,G as F,O as N,Q as _,R as B,S as R,U as V,X as v}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-QExkfWwX.js";import{a as f,R as T,t as A}from"./sentry-oILOkT84.js";import{u as z,h as D,j as c,g as M,N as O,l as j}from"./core-C9JgQJB4.js";import{u as P,z as s,j as E,G as F,O as N,Q as _,R as B,S as R,U as V,X as v}from"./index-DvOt4VS9.js";import{fI as $,Un as H,UH as J,gl as Q,gn as W,UM as X,gY as Y,dk as G,UN as y,UO as q,UP as K,c0 as U}from"./zeni-epic-state-DLEY0NmH.js";import{u as Z}from"./mui-DA_IUYGW.js";import{u as ee}from"./useDeviceId-DZAWgg2s.js";import{f as te}from"./analyticsHelper-D5T9Pp0r.js";import{t as ne}from"./getLocaleForTenant-D6brqFOn.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="ed121e85-48e8-47ca-aec9-3dcabd78f5b9",t._sentryDebugIdIdentifier="sentry-dbid-ed121e85-48e8-47ca-aec9-3dcabd78f5b9")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(K({authCode:n,oauthProvider:a,appType:"web",redirectUri:U(l),sourceUri:U(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(q(n,a)))},clearSignInError:()=>{t(y())}}}))(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:k,accountLocked:b,accountUnlockTime:L}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),h=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>$(e))),I=c((e=>H(e))),m=M(),w=Z().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{k.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[k.fetchState,l]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&h!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(X("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Y().then((()=>{const e=R();e!=null&&N(e)})),setTimeout((()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",G(r.productSettings))}),2e3))}),[S,p,h,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(O,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?u.jsx(B,{onClose:()=>i(y()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QExkfWwX.js";import{a as i}from"./sentry-oILOkT84.js";import{u as d,g as f,N as u}from"./core-C9JgQJB4.js";import{z as n,j as a,Q as m,a5 as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-QExkfWwX.js";import{a as i}from"./sentry-oILOkT84.js";import{u as d,g as f,N as u}from"./core-C9JgQJB4.js";import{z as n,j as a,Q as m,a5 as p}from"./index-DvOt4VS9.js";import{g$ as g,V1 as y}from"./zeni-epic-state-DLEY0NmH.js";import{n as b}from"./mui-DA_IUYGW.js";import"./recharts-ikWEYduq.js";import"./analytics-Dk2G_EzJ.js";import"./plaid-CG0Jj5NR.js";import"./dnd-C8GpPG0g.js";import"./stripe-cKAAJElX.js";import"./lottie-C8c0mGol.js";import"./lexical-DewpM37L.js";import"./pdf-CglQcGFZ.js";import"./utils-A5fkS8h7.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]="c973ab0d-15e4-4860-812e-916a33444789",e._sentryDebugIdIdentifier="sentry-dbid-c973ab0d-15e4-4860-812e-916a33444789")}catch{}})();function N(){const e=d(),t=f(),r=i.useRef(!1),l=n.isSignedIn(),o=t.state?.message==="logout"||l;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(c){console.error("Error during sign out:",c)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|