@zeniai/web-app-ui 5.4.2-qa → 5.4.3-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-5_pL8p1J.js → AccountMappingScreen-DwjqrktH.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-BIkDxDCx.js → ActualMatchingMatchDetailScreen-8KGyjwRR.js} +1 -1
- package/dist/assets/AddressRoutes-CY5a0VtR.js +1 -0
- package/dist/assets/{AddressScreen-DKEFDilQ.js → AddressScreen-CXqTXhTG.js} +1 -1
- package/dist/assets/{AiCfoScreen-BXMcrMvW.js → AiCfoScreen-rggsfRgx.js} +1 -1
- package/dist/assets/{AppDrawer-Rk7OEIXc.js → AppDrawer-V7y_4f0k.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DK1bUhta.js → BillPayApprovalRoutes-D-OLUuae.js} +1 -1
- package/dist/assets/{BillPayRoutes-yIHDhdd1.js → BillPayRoutes-PC9eBlf_.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-ZMcth61u.js → BusinessVerificationPageScreen-Bn_KBJkO.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BfM49ZFs.js → CardsAiCfoScreen-DBTpOOLH.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C3eO8JK1.js → ChargeCardRoutes-DXwBTw1d.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-1TFOHn2A.js → CompanyPassportScreen-CbGLe6QF.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Bm1mms_J.js → ConnectionAuthScreen-BtCyOX7g.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BtJ5MXND.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DDHwk1Gd.js → CustomerOnboardingRoutes-D9w1fV3M.js} +1 -1
- package/dist/assets/{DashboardRoutes-Jf6yegQQ.js → DashboardRoutes-TL5YPnNT.js} +1 -1
- package/dist/assets/{DefaultTenantHome-V7zkwBIA.js → DefaultTenantHome-XgZ5Xs6e.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DkC0UQKc.js → DomesticWireDetailScreen-D1nl3A65.js} +1 -1
- package/dist/assets/{DrawerScreen-QeGRaR5D.js → DrawerScreen-DDsov1FN.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-liAVKnfl.js → EntityDetailRoutes-CCOfEYyK.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-C3OiOopZ.js → ExpenseAutomationRoutes-DM3y0wS9.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CVuyjUhB.js → FeaturePreviewScreen-Bp5ipZTu.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-4-3ujMEC.js → HubSpotOAuthCallbackScreen-D4EK3BNf.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-Bh2XZMjj.js → InboxNotificationsProvider-Br8MPZKt.js} +1 -1
- package/dist/assets/{InvoicingRoutes-mC5AR174.js → InvoicingRoutes-DLk-X0Cy.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BuuyVcBe.js → MagicLinkRoutes-D1Becv58.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BfF3-SZ8.js → MagicLinkSignInScreen-CpOJwYCd.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BIT6vyIm.js → MobileAppDrawer-DUVyC8w3.js} +1 -1
- package/dist/assets/NotFoundScreen-Be6kVyg5.js +1 -0
- package/dist/assets/{NotificationRoutes-CkbvZ8J5.js → NotificationRoutes-B4CRDfZ6.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DBDbw5t9.js → OAuthConsentScreen-BcpmocIF.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DXWy1YPP.js → PandLWithForecastRoutes-Ba8n3tmx.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-B5Gb6bt2.js → PaymentLinkScreen-UNAC96bY.js} +1 -1
- package/dist/assets/{PeopleRoutes-BczQctlX.js → PeopleRoutes-DYmL1Pqy.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DDGVbYEg.js → PerformanceRoutes-75VxK2gE.js} +1 -1
- package/dist/assets/{Preview-Bk5qAysj.js → Preview-DiRLnehA.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-GPCS5Izm.js → QBOConnectionScreen-DpWMsXgJ.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-WRJ18u0b.js → ReimbursementApprovalRoutes-Bna0UESu.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-HH1KS4wW.js → ReimbursementApprovalRuleDetailScreen-DW4BefkY.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DrykXPse.js → ReimbursementRoutes-BVQ2Lbvo.js} +1 -1
- package/dist/assets/{ReportsRoutes-3f9ST_VX.js → ReportsRoutes-DicBKiJn.js} +1 -1
- package/dist/assets/{RewardsRoutes-BgrELWaw.js → RewardsRoutes-C_hjDWHK.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BdonlQkz.js → ScheduleDetailsPrepaidExpensesScreen-Qux5fkUz.js} +1 -1
- package/dist/assets/{ScreenRoutes-Dd_oQ5Gq.js → ScreenRoutes-CpbrSkhZ.js} +2 -2
- package/dist/assets/{SettingsRoutes-D_0-024q.js → SettingsRoutes-BeMypL_o.js} +1 -1
- package/dist/assets/{SetupPagesScreen-HQk7RdED.js → SetupPagesScreen-BJDLwgVy.js} +1 -1
- package/dist/assets/{SignInScreen-BLjiHMp8.js → SignInScreen-LvNAefDz.js} +1 -1
- package/dist/assets/{SignOutScreen-n_PIGeF0.js → SignOutScreen-D9_K2ByP.js} +1 -1
- package/dist/assets/{TaskListScreen-5TAQAgVe.js → TaskListScreen-CAb9BbJD.js} +1 -1
- package/dist/assets/{TaskRoutes-CjxbASsk.js → TaskRoutes-Bv4UxzF2.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-Bvfde0rc.js → TransactionDetailRoutes-vOAeChsM.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Dg2ryZMO.js → TransactionDetailScreen-DRCokQU4.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DedveH1S.js → TransactionListRoutes-Bte-1Du_.js} +1 -1
- package/dist/assets/{TreasuryRoutes-mMVOYrHE.js → TreasuryRoutes-BCA5T77L.js} +1 -1
- package/dist/assets/{VendorsRoutes-DU1jOPiy.js → VendorsRoutes-3QoCYM7w.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Xg9F8ns0.js → WiseConfirmationScreen-CQJNQkV3.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BeZHZXhk.js → ZeniAccountRoutes-CLjveu8J.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BowCXW4r.js → ZeniAccountStatementScreen-B-US5teA.js} +1 -1
- package/dist/assets/{accountMappingHelper-CHry1WVR.js → accountMappingHelper-B6LIBgfi.js} +1 -1
- package/dist/assets/{analytics-C4h9uwWs.js → analytics-DCs8movC.js} +1 -1
- package/dist/assets/{analyticsHelper-D283acnh.js → analyticsHelper-TSDaRiC1.js} +1 -1
- package/dist/assets/{core-DRRkK-nh.js → core-NMWl9HcG.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DZs4O12l.js → decodeURIComponentSafe-CBFueyhb.js} +1 -1
- package/dist/assets/{dnd-_2sJc_42.js → dnd-DYGkKXmy.js} +1 -1
- package/dist/assets/{empty-CTTtTEUb.js → empty-BUv8_1nR.js} +1 -1
- package/dist/assets/{empty-DLiHGVfw.js → empty-BXlU1O_7.js} +1 -1
- package/dist/assets/{emptyVideoElement-DVRRW-8o.js → emptyVideoElement-B5Pw_NPJ.js} +1 -1
- package/dist/assets/{epic-1JvU70v2.js → epic-CLRvl_qg.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-BC0QbU5f.js → expenseAutomationHelper-BGctBzlE.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D1LK5Ma1.js → getLocaleForTenant-p3fiDmdm.js} +1 -1
- package/dist/assets/{index-C4gCcAzE.js → index-BWsbj-g3.js} +1 -1
- package/dist/assets/{index-BS0ziwo3.js → index-BZGnNPmd.js} +2275 -2275
- package/dist/assets/{index-4rD-Inub.js → index-ClHlp6nA.js} +2 -2
- package/dist/assets/{index-DsnNO9ob.js → index-DRNGF535.js} +1 -1
- package/dist/assets/{index-tDitJ4zF.js → index-DdkfogE0.js} +1 -1
- package/dist/assets/{index-DojZx2HJ.js → index-DnBy3_oi.js} +1 -1
- package/dist/assets/{index-C9SmCfob.js → index-ghmt-Unt.js} +1 -1
- package/dist/assets/{index-DV4hjrJB.js → index-y3hTmFoR.js} +1 -1
- package/dist/assets/{lexical-DcIe1jg7.js → lexical-BDCn2yQD.js} +1 -1
- package/dist/assets/{liveblocks-BMZsanry.js → liveblocks-B0gJTiM8.js} +1 -1
- package/dist/assets/{lottie-C0cdlMyO.js → lottie-D9ziiKjq.js} +1 -1
- package/dist/assets/{mui-Cs4dDAVi.js → mui-fUj5QCho.js} +1 -1
- package/dist/assets/{pathToGoBack-CkgUjsRE.js → pathToGoBack-Ct2da2Qg.js} +1 -1
- package/dist/assets/{pdf-DTtYOrE_.js → pdf-DhjqWgyv.js} +3 -3
- package/dist/assets/{pdf-lib-0L0P6hdy.js → pdf-lib-BaSLmyR8.js} +1 -1
- package/dist/assets/{plaid-3Z5MZAow.js → plaid-BbWeRCm2.js} +1 -1
- package/dist/assets/{pusher-CwJ3oZrv.js → pusher-CcXYDWfn.js} +1 -1
- package/dist/assets/{react-DdN0oGm3.js → react-BeuNCN_c.js} +1 -1
- package/dist/assets/{react-CM1VGrgK.js → react-DLM7gbmA.js} +1 -1
- package/dist/assets/{react-clYOjmSd.js → react-DlHg4wbj.js} +1 -1
- package/dist/assets/{react-Du8d_1DW.js → react-Dto9OcUO.js} +1 -1
- package/dist/assets/{react-DEFivwtJ.js → react-nOwyWLbc.js} +1 -1
- package/dist/assets/{react-BFbkar2S.js → react-yA6nUq9F.js} +1 -1
- package/dist/assets/{recharts-Dv_Zobiy.js → recharts-CtKj7SB-.js} +1 -1
- package/dist/assets/{reportTimeframe-BZ8sifp3.js → reportTimeframe-DY52SCJ2.js} +1 -1
- package/dist/assets/{routePaths-Nt-fN6-I.js → routePaths-CQtCkYWz.js} +1 -1
- package/dist/assets/{sentry-w92aQEbS.js → sentry-Thv-GFDq.js} +1 -1
- package/dist/assets/{stripSplatSuffix-Dsy_ttXJ.js → stripSplatSuffix-1Ag2JFaZ.js} +1 -1
- package/dist/assets/{url--dAX0VEW.js → url-CbKwwWU9.js} +1 -1
- package/dist/assets/{url-CfBqFLaf.js → url-D4LlZTEG.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-B2wN8c3X.js → useActualMatchingMatchDetail-CM1lbKcY.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CYCAPC5Y.js → useAiCfoDashboardSuggestedQuestionsChips-3R8zGocd.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-C4eW2GGz.js → useAskAiCfoHostNavButtonProps-BzN5rK8R.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BapnP402.js → useChargeCardPusherEvents-CwyzRF3O.js} +1 -1
- package/dist/assets/{useDeviceId-BCt1yivX.js → useDeviceId-CW2AgTBB.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DSTsMqJU.js → useEmailConnectResultRefresh-Dib2-nu_.js} +1 -1
- package/dist/assets/{useEnsureVendorListLoaded-C9_7Q9zw.js → useEnsureVendorListLoaded-D5_n4OSS.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CfncK70W.js → useInitialThreadRequest-CYbTlzdp.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-DmPaHdfO.js → useTaskManagerAccess-ODLginXo.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-BPEsN8Xv.js → useTaskManagerPusherEvents-tjSSYwjP.js} +1 -1
- package/dist/assets/{utils-BKjdMjTj.js → utils-Cluy0TA1.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BUue_KHK.js → withTransactionSidePanel-CTdHOV4c.js} +1 -1
- package/dist/assets/{zeni-epic-state-BgQvRRQh.js → zeni-epic-state-CIOMH7O2.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-Dc4-aHUD.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CZ-vITy9.js +0 -1
- package/dist/assets/NotFoundScreen-CBzOeZpR.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-B0gJTiM8.js";import{a as p}from"./sentry-Thv-GFDq.js";import{J as a,a7 as u,ab as f,ac as h}from"./index-BZGnNPmd.js";import{s as c}from"./mui-fUj5QCho.js";import{i as y}from"./core-NMWl9HcG.js";import"./zeni-epic-state-CIOMH7O2.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.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]="9f729723-bd38-49a8-93d9-b8de3e144ccc",e._sentryDebugIdIdentifier="sentry-dbid-9f729723-bd38-49a8-93d9-b8de3e144ccc")}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-
|
|
1
|
+
import{j as a}from"./liveblocks-B0gJTiM8.js";import{Wd as re,fI as N,m3 as H,e1 as Y,e0 as le,T2 as Q,VB as de,Di as Pe,We as J,D7 as je,Ds as Le,Dm as ce,Db as pe,Dq as ve,Dn as Te,Wf as ue,sx as Ae,g9 as Re,gG as Ve,Wg as W,Df as me,De as ge,Dv as Fe,ca as Oe}from"./zeni-epic-state-CIOMH7O2.js";import{$ as fe,c as X,F as G,z as _,h as he,N as Ce,ad as ye,ax as be,ay as Be,a9 as De,J as F,ae as Se,G as K,az as Ze,ao as Ue,aq as $e,a6 as ze,k as we,R as We,p as Ge,aA as He,V as _e}from"./index-BZGnNPmd.js";import{D as xe,n as M,S as Ie}from"./mui-fUj5QCho.js";import ae from"./NotFoundScreen-Be6kVyg5.js";import{a as d}from"./sentry-Thv-GFDq.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-NMWl9HcG.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-BzN5rK8R.js";import{M as Ye}from"./MobileAppDrawer-DUVyC8w3.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.js";import"./InboxNotificationsProvider-Br8MPZKt.js";import"./useTaskManagerAccess-ODLginXo.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]="3d83aeb1-ea7d-49df-9c7a-5a6eb3d08904",e._sentryDebugIdIdentifier="sentry-dbid-3d83aeb1-ea7d-49df-9c7a-5a6eb3d08904")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=d.useState(!1),[k,D]=d.useState(!1),{userId:S}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>H(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(G.isDebitCardFeatureEnabled),P=Y(I,p),v=le(p),T=Q(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(_.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{O===!0?D(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(G.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:R}=Ce(p?.tenantId),y=!L||R,V=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:V===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return d.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-B0gJTiM8.js";import E from"./NotFoundScreen-Be6kVyg5.js";import{a as r}from"./sentry-Thv-GFDq.js";import{h as _,g as U,j as p,i as v,u as M,N as P,l as O,n as z,o as b}from"./core-NMWl9HcG.js";import{fI as B,a1Z as h,bo as F,bn as N,iP as V,gk as q}from"./zeni-epic-state-CIOMH7O2.js";import{U as Z,z as I,aq as $,dO as G}from"./index-BZGnNPmd.js";import"./mui-fUj5QCho.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-BzN5rK8R.js";import{M as J}from"./MobileAppDrawer-DUVyC8w3.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.js";import"./InboxNotificationsProvider-Br8MPZKt.js";import"./useTaskManagerAccess-ODLginXo.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]="c3f5e77b-8f9d-41c9-87b3-e8b0baf73392",e._sentryDebugIdIdentifier="sentry-dbid-c3f5e77b-8f9d-41c9-87b3-e8b0baf73392")}catch{}})();const K=O((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),L=()=>{const e=_(),t=U(),c=Z(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:m}=v(),u=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function be(){return s.jsxs(z,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-Thv-GFDq.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-
|
|
1
|
+
import{j as _l}from"./liveblocks-B0gJTiM8.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-Thv-GFDq.js";import{L as ge,c1 as xc,fI as kc,UJ as Tc,Vz as jl,ca as xl}from"./zeni-epic-state-CIOMH7O2.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-Cluy0TA1.js";import{r as cn}from"./empty-BUv8_1nR.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BaSLmyR8.js";import{a as Ye,r as Fl}from"./index-y3hTmFoR.js";import{r as Ul}from"./index-DdkfogE0.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-NMWl9HcG.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,X as Wl,H as Kl}from"./index-BZGnNPmd.js";import"./mui-fUj5QCho.js";import{d as It}from"./decodeURIComponentSafe-CBFueyhb.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]="ea0d31bc-68c9-4117-8f1f-a18acab09910",e._sentryDebugIdIdentifier="sentry-dbid-ea0d31bc-68c9-4117-8f1f-a18acab09910")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-B0gJTiM8.js";import q from"./NotFoundScreen-Be6kVyg5.js";import{a as p}from"./sentry-Thv-GFDq.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as b}from"./core-NMWl9HcG.js";import{fI as E,_1 as h,_j as w,Oe as U,Oa as L,Od as f,O3 as N,_I as B,O7 as K,Og as F}from"./zeni-epic-state-CIOMH7O2.js";import{z as _,w as T,cb as G,q as $,bU as H,cc as J}from"./index-BZGnNPmd.js";import"./mui-fUj5QCho.js";import{u as M}from"./useEnsureVendorListLoaded-D5_n4OSS.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-DW4BefkY.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]="ae421f73-240c-49c3-ba56-97a414aa49f3",e._sentryDebugIdIdentifier="sentry-dbid-ae421f73-240c-49c3-ba56-97a414aa49f3")}catch{}})();const j="reimbursement-approval-rule-update",P=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(G)),Q=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),g=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),_.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,I,y)=>{o.endsWith(j)&&y.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(P,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",X=O((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{$(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(F(t,!0))}}}))(T(J)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=H(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(Q,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));M();const I=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{I?.updateStatus.fetchState==="Completed"&&a(U())}),[I]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||g!=="Not-Started"||e||(R(!0),a(K(!1,!0)))}),[v,g,e,a]),_.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 y={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(A)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...y})};function ue(){return r.jsxs(z,{children:[r.jsx(b,{path:"/",element:r.jsx(Y,{})}),r.jsx(b,{path:"/new",element:r.jsx(x,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(b,{path:"*",element:r.jsx(q,{})})]})}export{ue as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-B0gJTiM8.js";import{a as y}from"./sentry-Thv-GFDq.js";import{h as T,u as x,g as C,i as V,j as R,l as k}from"./core-NMWl9HcG.js";import{_j as _,_1 as O,O6 as j,Oj as B,Oe as A,Of as E,_k as F,fI as K,Od as L}from"./zeni-epic-state-CIOMH7O2.js";import{z as N,a5 as P,c2 as W,q,bU as G,c3 as H}from"./index-BZGnNPmd.js";import{u as $}from"./mui-fUj5QCho.js";import{u as J}from"./useEnsureVendorListLoaded-D5_n4OSS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="092c4863-2f4b-4acb-b6e0-d8d224da8446",e._sentryDebugIdIdentifier="sentry-dbid-092c4863-2f4b-4acb-b6e0-d8d224da8446")}catch{}})();const M=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=o==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return p.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===p.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:o}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=q(p.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=I.concat(b);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(W);function Q(){const e=T(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=$(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),p(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:s,vendorNamesById:i,editingRuleId:o==="approval_update"?p.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=q(p.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,z=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=z.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const U=f.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const b=h?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(L(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=R((t=>K(t))),{isApprovalRulesV3Enabled:p}=G(e?.tenantId);return p?g.jsx(Y,{}):g.jsx(Q,{})}function Y(){const e=T(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=$(),r=R((n=>_(n))),l=R((n=>O(n))),[a,d]=y.useState(!1);if(J(),y.useEffect((()=>{a||(d(!0),p(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t},o??"new")}export{ne as R,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BMZsanry.js";import{u as ae,j as v,h as Q,g as J,i as ie,N,l as ee,q as lt,n as ct,o as x}from"./core-DRRkK-nh.js";import{fI as H,Oa as mt,$O as ge,ca as he,Ng as Ue,me as dt,Nv as me,Nu as de,$P as ut,bn as fe,gZ as Le,$Q as pt,XE as bt,m3 as $e,XF as ke,XG as gt,kR as ht,ZP as ft,l4 as St,N4 as It,CA as yt,kY as Rt,NR as Ne,$R as Pe,$S as Ce,$T as At,$U as vt,$V as kt,NB as we,la as Ct,ZY as wt,Nt as Et,Ne as xt,$W as Bt,Nd as Tt,$X as Dt,Nl as Ee,NF as jt,NE as Ft,NA as Ut,$Y as _e,T2 as Lt,bo as $t,No as Nt,O7 as Pt,$Z as _t,$_ as Mt,NN as Ot,NK as xe,Zj as Zt,Nb as zt,$$ as Me,OA as Be,OI as Gt,a00 as Vt,a01 as X,a02 as Ht,a03 as Oe,a04 as Wt,a05 as Ze,a06 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a07 as Xt,gk as Yt,Zw as Jt,a08 as Kt,a09 as He,ZA as Qt,_j as en,a0a as tn,_I as nn,OF as Te,OE as an,a0b as sn,a0c as on,a0d as rn,a0e as ln,a0f as cn,_2 as mn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V2 as Sn,dc as In,df as yn,de as Rn,cH as An}from"./zeni-epic-state-BgQvRRQh.js";import{bU as vn,U as We,$ as qe,c as oe,F as U,z as L,cT as Xe,a6 as re,k as E,aQ as De,J as j,ac as se,ad as kn,G as Ye,cU as Cn,p as Y,aq as Je,cV as wn,V as le,cW as En,ao as xn,a9 as Bn,a5 as ye,R as Ke,w as Tn,bC as Dn,at as jn,ag as Fn,cX as Un,h as Ln}from"./index-BS0ziwo3.js";import{n as P,S as $n,u as Qe}from"./mui-Cs4dDAVi.js";import pe from"./NotFoundScreen-CBzOeZpR.js";import{S as je}from"./SetupPagesScreen-HQk7RdED.js";import{F as et}from"./FeaturePreviewScreen-CVuyjUhB.js";import{a as g}from"./sentry-w92aQEbS.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-C4eW2GGz.js";import{u as tt}from"./useInitialThreadRequest-CfncK70W.js";import{D as Nn}from"./DrawerScreen-QeGRaR5D.js";import{M as nt}from"./MobileAppDrawer-BIT6vyIm.js";import{F as Pn}from"./ScreenRoutes-Dd_oQ5Gq.js";import{R as _n}from"./ReimbursementApprovalRoutes-WRJ18u0b.js";import"./recharts-Dv_Zobiy.js";import"./analytics-C4h9uwWs.js";import"./plaid-3Z5MZAow.js";import"./dnd-_2sJc_42.js";import"./stripe-cKAAJElX.js";import"./lottie-C0cdlMyO.js";import"./lexical-DcIe1jg7.js";import"./pdf-DTtYOrE_.js";import"./utils-BKjdMjTj.js";import"./BusinessVerificationPageScreen-ZMcth61u.js";import"./routePaths-Nt-fN6-I.js";import"./analyticsHelper-D283acnh.js";import"./InboxNotificationsProvider-Bh2XZMjj.js";import"./useTaskManagerAccess-DmPaHdfO.js";import"./getLocaleForTenant-D1LK5Ma1.js";import"./useEnsureVendorListLoaded-C9_7Q9zw.js";import"./ReimbursementApprovalRuleDetailScreen-HH1KS4wW.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]="bc9f73f3-e7f2-4cb8-8dee-f5cab7cc395c",e._sentryDebugIdIdentifier="sentry-dbid-bc9f73f3-e7f2-4cb8-8dee-f5cab7cc395c")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ye.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=L.getSignedInUser(),m=fe(c),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:m,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:m,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(me({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Y(c.state?.pathnameStackToGoBack,c.pathname);m(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=We(),m=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=v((K=>H(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(mt(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:m,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&m!=="small"?s.jsx(zn,{}):null,i&&m!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(me({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&m==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(me({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:m,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-B0gJTiM8.js";import{u as ae,j as v,h as Q,g as J,i as ie,N,l as ee,q as lt,n as ct,o as x}from"./core-NMWl9HcG.js";import{fI as H,Oa as mt,$O as ge,ca as he,Ng as Ue,me as dt,Nv as me,Nu as de,$P as ut,bn as fe,gZ as Le,$Q as pt,XE as bt,m3 as $e,XF as ke,XG as gt,kR as ht,ZP as ft,l4 as St,N4 as It,CA as yt,kY as Rt,NR as Ne,$R as Pe,$S as Ce,$T as At,$U as vt,$V as kt,NB as we,la as Ct,ZY as wt,Nt as Et,Ne as xt,$W as Bt,Nd as Tt,$X as Dt,Nl as Ee,NF as jt,NE as Ft,NA as Ut,$Y as _e,T2 as Lt,bo as $t,No as Nt,O7 as Pt,$Z as _t,$_ as Mt,NN as Ot,NK as xe,Zj as Zt,Nb as zt,$$ as Me,OA as Be,OI as Gt,a00 as Vt,a01 as X,a02 as Ht,a03 as Oe,a04 as Wt,a05 as Ze,a06 as ze,NZ as ue,bv as qt,bM as Se,cO as Ie,e1 as Ge,e0 as Ve,a07 as Xt,gk as Yt,Zw as Jt,a08 as Kt,a09 as He,ZA as Qt,_j as en,a0a as tn,_I as nn,OF as Te,OE as an,a0b as sn,a0c as on,a0d as rn,a0e as ln,a0f as cn,_2 as mn,Ov as dn,Oz as un,bq as pn,bL as bn,cI as gn,cw as hn,bu as fn,V2 as Sn,dc as In,df as yn,de as Rn,cH as An}from"./zeni-epic-state-CIOMH7O2.js";import{bU as vn,U as We,$ as qe,c as oe,F as U,z as L,cT as Xe,a6 as re,k as E,aQ as De,J as j,ac as se,ad as kn,G as Ye,cU as Cn,p as Y,aq as Je,cV as wn,V as le,cW as En,ao as xn,a9 as Bn,a5 as ye,R as Ke,w as Tn,bC as Dn,at as jn,ag as Fn,cX as Un,h as Ln}from"./index-BZGnNPmd.js";import{n as P,S as $n,u as Qe}from"./mui-fUj5QCho.js";import pe from"./NotFoundScreen-Be6kVyg5.js";import{S as je}from"./SetupPagesScreen-BJDLwgVy.js";import{F as et}from"./FeaturePreviewScreen-Bp5ipZTu.js";import{a as g}from"./sentry-Thv-GFDq.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-BzN5rK8R.js";import{u as tt}from"./useInitialThreadRequest-CYbTlzdp.js";import{D as Nn}from"./DrawerScreen-DDsov1FN.js";import{M as nt}from"./MobileAppDrawer-DUVyC8w3.js";import{F as Pn}from"./ScreenRoutes-CpbrSkhZ.js";import{R as _n}from"./ReimbursementApprovalRoutes-Bna0UESu.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.js";import"./BusinessVerificationPageScreen-Bn_KBJkO.js";import"./routePaths-CQtCkYWz.js";import"./analyticsHelper-TSDaRiC1.js";import"./InboxNotificationsProvider-Br8MPZKt.js";import"./useTaskManagerAccess-ODLginXo.js";import"./getLocaleForTenant-p3fiDmdm.js";import"./useEnsureVendorListLoaded-D5_n4OSS.js";import"./ReimbursementApprovalRuleDetailScreen-DW4BefkY.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]="bc9f73f3-e7f2-4cb8-8dee-f5cab7cc395c",e._sentryDebugIdIdentifier="sentry-dbid-bc9f73f3-e7f2-4cb8-8dee-f5cab7cc395c")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Ye.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),c=L.getSignedInUser(),m=fe(c),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,c?.userId??"");let I=`${c?.firstName} ${c?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=c?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:m,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:E,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:m,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(Ee(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(Ee(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(xt({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(Et({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(me({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Y(c.state?.pathnameStackToGoBack,c.pathname);m(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(E.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=We(),m=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>H(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=v((K=>H(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:Z,isLoading:W}=vn(O),z=v((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(mt(!0,!1,!1,Z))}),[O,W,Z,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Zn,{windowSize:m,children:[s.jsx(re,{analytics:E,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&m!=="small"?s.jsx(zn,{}):null,i&&m!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(me({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&m==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(me({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:m,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:c,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Xe,{isNewReimbursement:r==null})}const Zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BMZsanry.js";import{g as te,h as ve,u as Ye,i as Ue,j as _,l as xe,n as ze,o as oe}from"./core-DRRkK-nh.js";import{fI as J,ED as S,VA as Ge,m3 as ue,uh as he,v6 as Y,lK as j,lT as D,lL as V,kO as E,kF as P,kE as A,DG as U,vb as ye,bq as We,VB as He,bn as Ne,E$ as $e,VC as qe,VD as Ze,ck as R,Dz as ne,VE as re,VF as Ke,VG as Qe,VH as Je,VI as Xe,VJ as ea,VK as aa,VL as sa,VM as ta,VN as oa,VO as na,VP as ra,VQ as la,VR as k,VS as x,VT as z,VU as G,VV as W,VW as H,VX as N,VY as $,VZ as q,V_ as Z,ek as ca,EF as ia,Er as le,Es as ce,EL as da,Ew as ie,bG as O,V$ as de,di as pe,Ex as _e,ER as pa,W0 as _a,W1 as fa,W2 as ba,W3 as ma,W4 as ua,W5 as ha,W6 as ya,W7 as Ca,W8 as wa,W9 as ga,e1 as Ra,e0 as Ia}from"./zeni-epic-state-BgQvRRQh.js";import{al as Sa,am as Ta,an as ka,a as Oa,$ as Fa,c as Ce,F as K,z as we,ao as ja,V as Da,e as Va,ap as Ea,aq as Pa,a6 as Aa,k as Q,R as Ma,B as La,p as ge,ar as Ba,as as va,at as Ya}from"./index-BS0ziwo3.js";import"./mui-Cs4dDAVi.js";import Ua from"./NotFoundScreen-CBzOeZpR.js";import{F as xa}from"./FeaturePreviewScreen-CVuyjUhB.js";import{a as u}from"./sentry-w92aQEbS.js";import{u as za}from"./useInitialThreadRequest-CfncK70W.js";import{t as fe,a as be,b as Ga}from"./routePaths-Nt-fN6-I.js";import{t as me}from"./reportTimeframe-BZ8sifp3.js";import{M as Wa}from"./MobileAppDrawer-BIT6vyIm.js";import"./recharts-Dv_Zobiy.js";import"./analytics-C4h9uwWs.js";import"./plaid-3Z5MZAow.js";import"./dnd-_2sJc_42.js";import"./stripe-cKAAJElX.js";import"./lottie-C0cdlMyO.js";import"./lexical-DcIe1jg7.js";import"./pdf-DTtYOrE_.js";import"./utils-BKjdMjTj.js";import"./InboxNotificationsProvider-Bh2XZMjj.js";import"./useTaskManagerAccess-DmPaHdfO.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]="3ecd8bed-ef4d-48bc-a53c-5f08ac6b99b4",e._sentryDebugIdIdentifier="sentry-dbid-3ecd8bed-ef4d-48bc-a53c-5f08ac6b99b4")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(W({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=xe((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=J(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(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:Q,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Ya}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(Y(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=O(a),i=O(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(A(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(A(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"balance_sheet_by_projects":e(A(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(E());break;case"cash_flow":e(j(r,!0,a,s));break;case"cash_flow_by_classes":e(j(r,!0,a,s)),o.isAccountingClassesEnabled&&e(V());break;case"cash_flow_by_projects":e(j(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=O(a),d=O(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ga(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(W({scrollPosition:s}));break;case"cash_flow_by_classes":e(G({scrollPosition:s}));break;case"cash_flow_by_projects":e(z({scrollPosition:s}));break;case"cash_flow":e(x({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(k(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(k(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(k(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Ke({projectsToFilterOut:a})):I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):e(Je({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?V():a?P():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?E():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):V(!0):E(!0):P(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Oa(),b=Fa(),m=va(b),a=ve(),s=Ye(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(K.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(K.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>J(l))),Ie=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=za(L?.companyId),w=_((l=>S(l).fetchState)),ke=_((l=>Ge(l))),{areTenantIdsInSync:y}=ja(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),Oe=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(Y(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(Y(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(A(C.timeframe));break;case"balance_sheet_by_classes":T&&s(P());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(V());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(j(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),je=ee?.loggedInUserRole!=null&&We(ee?.loggedInUserRole)!==!0,[De,Ve]=u.useState(!1),ae=l=>{Ve(l)},Ee=Va(),Pe=Ea();return(function(l){const{isDataReady:Ae}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ae),Be=u.useMemo((()=>se?Ha:void 0),[se]);ka({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Pa({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Aa,{analytics:Q,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Wa,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:B,analytics:Q,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:Oe,hasTransactionAccess:je,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:ke.reportsResyncFetchState,isAiCfoAccessEnabled:Pe&&Ee&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=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 ys(){const e=_((s=>J(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(K.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(xa,{}):f.jsxs(ze,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
|
|
1
|
+
import{j as f}from"./liveblocks-B0gJTiM8.js";import{g as te,h as ve,u as Ye,i as Ue,j as _,l as xe,n as ze,o as oe}from"./core-NMWl9HcG.js";import{fI as J,ED as S,VA as Ge,m3 as ue,uh as he,v6 as Y,lK as j,lT as D,lL as V,kO as E,kF as P,kE as A,DG as U,vb as ye,bq as We,VB as He,bn as Ne,E$ as $e,VC as qe,VD as Ze,ck as R,Dz as ne,VE as re,VF as Ke,VG as Qe,VH as Je,VI as Xe,VJ as ea,VK as aa,VL as sa,VM as ta,VN as oa,VO as na,VP as ra,VQ as la,VR as k,VS as x,VT as z,VU as G,VV as W,VW as H,VX as N,VY as $,VZ as q,V_ as Z,ek as ca,EF as ia,Er as le,Es as ce,EL as da,Ew as ie,bG as O,V$ as de,di as pe,Ex as _e,ER as pa,W0 as _a,W1 as fa,W2 as ba,W3 as ma,W4 as ua,W5 as ha,W6 as ya,W7 as Ca,W8 as wa,W9 as ga,e1 as Ra,e0 as Ia}from"./zeni-epic-state-CIOMH7O2.js";import{al as Sa,am as Ta,an as ka,a as Oa,$ as Fa,c as Ce,F as K,z as we,ao as ja,V as Da,e as Va,ap as Ea,aq as Pa,a6 as Aa,k as Q,R as Ma,B as La,p as ge,ar as Ba,as as va,at as Ya}from"./index-BZGnNPmd.js";import"./mui-fUj5QCho.js";import Ua from"./NotFoundScreen-Be6kVyg5.js";import{F as xa}from"./FeaturePreviewScreen-Bp5ipZTu.js";import{a as u}from"./sentry-Thv-GFDq.js";import{u as za}from"./useInitialThreadRequest-CYbTlzdp.js";import{t as fe,a as be,b as Ga}from"./routePaths-CQtCkYWz.js";import{t as me}from"./reportTimeframe-DY52SCJ2.js";import{M as Wa}from"./MobileAppDrawer-DUVyC8w3.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.js";import"./InboxNotificationsProvider-Br8MPZKt.js";import"./useTaskManagerAccess-ODLginXo.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]="3ecd8bed-ef4d-48bc-a53c-5f08ac6b99b4",e._sentryDebugIdIdentifier="sentry-dbid-3ecd8bed-ef4d-48bc-a53c-5f08ac6b99b4")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(W({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=xe((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=J(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(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:Q,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Ya}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(Y(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=O(a),i=O(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(A(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(A(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"balance_sheet_by_projects":e(A(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(E());break;case"cash_flow":e(j(r,!0,a,s));break;case"cash_flow_by_classes":e(j(r,!0,a,s)),o.isAccountingClassesEnabled&&e(V());break;case"cash_flow_by_projects":e(j(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=O(a),d=O(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?Ga(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(W({scrollPosition:s}));break;case"cash_flow_by_classes":e(G({scrollPosition:s}));break;case"cash_flow_by_projects":e(z({scrollPosition:s}));break;case"cash_flow":e(x({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(k(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(k(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(k(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Ke({projectsToFilterOut:a})):I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):e(Je({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?V():a?P():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?E():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(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"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):V(!0):E(!0):P(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Oa(),b=Fa(),m=va(b),a=ve(),s=Ye(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(K.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(K.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>J(l))),Ie=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=za(L?.companyId),w=_((l=>S(l).fetchState)),ke=_((l=>Ge(l))),{areTenantIdsInSync:y}=ja(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),Oe=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(Y(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(Y(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(A(C.timeframe));break;case"balance_sheet_by_classes":T&&s(P());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(V());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(j(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),je=ee?.loggedInUserRole!=null&&We(ee?.loggedInUserRole)!==!0,[De,Ve]=u.useState(!1),ae=l=>{Ve(l)},Ee=Va(),Pe=Ea();return(function(l){const{isDataReady:Ae}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ae),Be=u.useMemo((()=>se?Ha:void 0),[se]);ka({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Pa({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Aa,{analytics:Q,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Wa,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:B,analytics:Q,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:Oe,hasTransactionAccess:je,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:ke.reportsResyncFetchState,isAiCfoAccessEnabled:Pe&&Ee&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=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 ys(){const e=_((s=>J(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(K.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(xa,{}):f.jsxs(ze,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B0gJTiM8.js";import{z as j,a6 as N,k as u,R as S,e5 as k,c as I,F as C}from"./index-BZGnNPmd.js";import"./mui-fUj5QCho.js";import g from"./NotFoundScreen-Be6kVyg5.js";import{a as c}from"./sentry-Thv-GFDq.js";import{u as D,j as h,h as F,g as L,l as T,n as U,o as d,N as y}from"./core-NMWl9HcG.js";import{fI as _,a30 as w,a31 as p,Ei as P,q3 as V,a32 as R,Eg as q}from"./zeni-epic-state-CIOMH7O2.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.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]="8857480d-4bd5-47d1-8a8f-aafa0c1cf9d7",e._sentryDebugIdIdentifier="sentry-dbid-8857480d-4bd5-47d1-8a8f-aafa0c1cf9d7")}catch{}})();const z=T((function(e,t){const n=w(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=j.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])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(q())},onUpdateInviteFormLocalData:s=>{e(R({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),G=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),x=L(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),b=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 E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(z,{navigate:l,location:x,currentTenant:r,companyName:E,userName:b,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(G,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-
|
|
1
|
+
import{j as E}from"./liveblocks-B0gJTiM8.js";import{a as A}from"./sentry-Thv-GFDq.js";import{i as M,u as W,h as Q,g as ee,j as h,l as te}from"./core-NMWl9HcG.js";import{Xz as Fe,XA as Ge,m3 as ae,sB as Ve,sN as Me,t1 as $e,s$ as Re,t2 as Ke,t4 as Ue,XB as Ye,fI as K,Wy as pe,XC as Se,h2 as ne,cD as se,cE as le,FJ as ve,XD as Ce,FN as Xe,gS as ce,sE as ze,td as qe,dF as Ze,dE as He,TV as fe,FH as We,FB as Qe,XE as De,Ft as et,Fs as tt,Fn as at,Fy as nt,FO as st,XF as Y,XG as ge,Fu as lt,Wz as oe,G2 as Ae,FX as Ie,XH as xe,sH as Te,FR as Be,FP as Le,XI as be,G9 as Je,G6 as we,FS as je,G8 as Ne}from"./zeni-epic-state-CIOMH7O2.js";import{a2 as de,aW as ie,aX as ct,z as ot,j as dt,a5 as it,a6 as ue,k as _,at as ut,aY as rt,p as G,G as ye,U as Ee,aZ as ht,a_ as mt,a$ as pt}from"./index-BZGnNPmd.js";import{n as re}from"./mui-fUj5QCho.js";import{p as St}from"./pathToGoBack-Ct2da2Qg.js";import H from"./NotFoundScreen-Be6kVyg5.js";import{c as V}from"./routePaths-CQtCkYWz.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]="bd9754f9-e20c-4344-a8cb-ddc8bcdfbe32",e._sentryDebugIdIdentifier="sentry-dbid-bd9754f9-e20c-4344-a8cb-ddc8bcdfbe32")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=M(),l=t??s,n=W(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ge(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Ve(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Me({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?E.jsx(H,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(H,{}):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(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -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 hs,fI as Es,e1 as ps,e0 as xs,Bo as Rs,dk as gs,ca as Is,gM as js,gc as Ts,dh as pe,cI as As,gq as fs,cA as Ds,bG as ys,br as bs,U_ as Cs,v as vs,V1 as Os,bq as Ps,V2 as Us,bM as ws,bL as Fs,bu as Ls,cw as Vs,V3 as ks,V4 as Hs,dc as Bs,df as Ss,de as Ns,cH as Ms,cO as Zs,pW as xe,gl as Re,h0 as Gs,gn as ge,gO as Ie,gP as je,go as $s}from"./zeni-epic-state-BgQvRRQh.js";import{j as e}from"./liveblocks-BMZsanry.js";import{a as U}from"./sentry-w92aQEbS.js";import{N as u,u as zs,h as qs,i as Ws,g as Ys,j as G,q as Te,n as Xs,o as n}from"./core-DRRkK-nh.js";import{M as l,u as Js,z as b,c as Ks,e as Qs,f as et,F as S,h as st,N as tt,V as nt,L as F,G as Ae,t as _,P as at,O as ot,k as ne}from"./index-BS0ziwo3.js";import{u as rt}from"./mui-Cs4dDAVi.js";import{f as fe}from"./analyticsHelper-D283acnh.js";import{t as it}from"./getLocaleForTenant-D1LK5Ma1.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]="c5e37c1c-a993-4fd5-945e-a077c35ae74c",o._sentryDebugIdIdentifier="sentry-dbid-c5e37c1c-a993-4fd5-945e-a077c35ae74c")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-CBzOeZpR.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`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return o?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-Jf6yegQQ.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,25,8])),bills:()=>s((()=>import("./BillPayRoutes-yIHDhdd1.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DrykXPse.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DedveH1S.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-D_0-024q.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-3f9ST_VX.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-C3eO8JK1.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-BczQctlX.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-C3OiOopZ.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-mMVOYrHE.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-DU1jOPiy.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BeZHZXhk.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-3f9ST_VX.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),ht=l((()=>s((()=>import("./AddressRoutes-Dc4-aHUD.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-BczQctlX.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-DXWy1YPP.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-DDHwk1Gd.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rt=l((()=>s((()=>import("./VendorsRoutes-DU1jOPiy.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])))),gt=l((()=>s((()=>import("./TransactionDetailRoutes-Bvfde0rc.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-liAVKnfl.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-Jf6yegQQ.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,25,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-yIHDhdd1.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-D_0-024q.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-mC5AR174.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DrykXPse.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-BeZHZXhk.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-mMVOYrHE.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-DedveH1S.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),yt=l((()=>s((()=>import("./ChargeCardRoutes-C3eO8JK1.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),bt=l((()=>s((()=>import("./NotificationRoutes-CkbvZ8J5.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-DDGVbYEg.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-C3OiOopZ.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BIkDxDCx.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Pt=l((()=>s((()=>import("./RewardsRoutes-BgrELWaw.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),Ut=l((()=>s((()=>import("./TaskRoutes-CjxbASsk.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-BXMcrMvW.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-BfM49ZFs.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-CBzOeZpR.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-5TAQAgVe.js").then((o=>o.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Js(),y=b.getSignedInUserTenant(i)?.tenantId,j=b.getSignedInUser(),X=hs(j),$=Ys(),[L,we]=U.useState(!1),r=G((a=>Es(a))),{useFeatureGate:H}=Ks(),M=Qs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,K=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?Rs(r)&&!gs(r):void 0,ke=st(r,Ve,oe),{isCardsHidden:He}=tt(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=G((a=>js(a)));if(i!=null){const a=b.getSignedInUserTenant(i);j!=null&&a!=null&&fe(j,r,V)}const Z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),Ge=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),$e=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=G((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=bs();t.isAfter(d,"month")===!1?D(Cs(y,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,y]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,b]),U.useLayoutEffect((()=>{!vs(ie,Z)&&b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(Re(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=b.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[y]),U.useEffect((()=>{b.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(ge(t));const Y=b.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),Re(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($s(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,y,j,O,D))}),[y,p]),U.useEffect((()=>{b.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),b.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=U.useRef(!1);U.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 P=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:We}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=H(S.isAccrualEnabled),Xe=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&&!P,de=!Be&&!P,Ke=Us(E?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!P,ss=Le&&!P,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=ks(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),R=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&R,g=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Ke===!0||os===!0||rs===!0;return b.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||X&&!ee)&&es&&Qe!==!0&&h===!1&&K===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||X?!L||te!==!1||ee||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Xe||Je?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ut,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:g?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(Ct,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&P===!1?e.jsx(vt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&P===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(bt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(Rt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(yt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):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:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,Gt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-Be6kVyg5.js","assets/sentry-Thv-GFDq.js","assets/core-NMWl9HcG.js","assets/zeni-epic-state-CIOMH7O2.js","assets/index-BZGnNPmd.js","assets/mui-fUj5QCho.js","assets/analytics-DCs8movC.js","assets/utils-Cluy0TA1.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-TL5YPnNT.js","assets/withTransactionSidePanel-CTdHOV4c.js","assets/useAskAiCfoHostNavButtonProps-BzN5rK8R.js","assets/TransactionDetailScreen-DRCokQU4.js","assets/decodeURIComponentSafe-CBFueyhb.js","assets/useInitialThreadRequest-CYbTlzdp.js","assets/routePaths-CQtCkYWz.js","assets/expenseAutomationHelper-BGctBzlE.js","assets/stripSplatSuffix-1Ag2JFaZ.js","assets/reportTimeframe-DY52SCJ2.js","assets/analyticsHelper-TSDaRiC1.js","assets/CompanyPassportScreen-CbGLe6QF.js","assets/MobileAppDrawer-DUVyC8w3.js","assets/InboxNotificationsProvider-Br8MPZKt.js","assets/useTaskManagerAccess-ODLginXo.js","assets/useAiCfoDashboardSuggestedQuestionsChips-3R8zGocd.js","assets/FeaturePreviewScreen-Bp5ipZTu.js","assets/BillPayRoutes-PC9eBlf_.js","assets/AddressScreen-CXqTXhTG.js","assets/DomesticWireDetailScreen-D1nl3A65.js","assets/BusinessVerificationPageScreen-Bn_KBJkO.js","assets/DrawerScreen-DDsov1FN.js","assets/SetupPagesScreen-BJDLwgVy.js","assets/BillPayApprovalRoutes-D-OLUuae.js","assets/useEnsureVendorListLoaded-D5_n4OSS.js","assets/ReimbursementApprovalRuleDetailScreen-DW4BefkY.js","assets/getLocaleForTenant-p3fiDmdm.js","assets/ReimbursementRoutes-BVQ2Lbvo.js","assets/ReimbursementApprovalRoutes-Bna0UESu.js","assets/TransactionListRoutes-Bte-1Du_.js","assets/ZeniAccountStatementScreen-B-US5teA.js","assets/SettingsRoutes-BeMypL_o.js","assets/AccountMappingScreen-DwjqrktH.js","assets/QBOConnectionScreen-DpWMsXgJ.js","assets/empty-BUv8_1nR.js","assets/index-y3hTmFoR.js","assets/url-D4LlZTEG.js","assets/index-DdkfogE0.js","assets/accountMappingHelper-B6LIBgfi.js","assets/useEmailConnectResultRefresh-Dib2-nu_.js","assets/ReportsRoutes-DicBKiJn.js","assets/ChargeCardRoutes-DXwBTw1d.js","assets/useChargeCardPusherEvents-CwyzRF3O.js","assets/PeopleRoutes-DYmL1Pqy.js","assets/ExpenseAutomationRoutes-DM3y0wS9.js","assets/useActualMatchingMatchDetail-CM1lbKcY.js","assets/ScheduleDetailsPrepaidExpensesScreen-Qux5fkUz.js","assets/pathToGoBack-Ct2da2Qg.js","assets/TreasuryRoutes-BCA5T77L.js","assets/VendorsRoutes-3QoCYM7w.js","assets/ZeniAccountRoutes-CLjveu8J.js","assets/AddressRoutes-CY5a0VtR.js","assets/PandLWithForecastRoutes-Ba8n3tmx.js","assets/CustomerOnboardingRoutes-D9w1fV3M.js","assets/TransactionDetailRoutes-vOAeChsM.js","assets/EntityDetailRoutes-CCOfEYyK.js","assets/InvoicingRoutes-DLk-X0Cy.js","assets/NotificationRoutes-B4CRDfZ6.js","assets/PerformanceRoutes-75VxK2gE.js","assets/ActualMatchingMatchDetailScreen-8KGyjwRR.js","assets/RewardsRoutes-C_hjDWHK.js","assets/TaskRoutes-Bv4UxzF2.js","assets/TaskListScreen-CAb9BbJD.js","assets/useTaskManagerPusherEvents-tjSSYwjP.js","assets/AiCfoScreen-rggsfRgx.js","assets/CardsAiCfoScreen-DBTpOOLH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as hs,fI as Es,e1 as ps,e0 as xs,Bo as Rs,dk as gs,ca as Is,gM as js,gc as Ts,dh as pe,cI as As,gq as fs,cA as Ds,bG as ys,br as bs,U_ as Cs,v as vs,V1 as Os,bq as Ps,V2 as Us,bM as ws,bL as Fs,bu as Ls,cw as Vs,V3 as ks,V4 as Hs,dc as Bs,df as Ss,de as Ns,cH as Ms,cO as Zs,pW as xe,gl as Re,h0 as Gs,gn as ge,gO as Ie,gP as je,go as $s}from"./zeni-epic-state-CIOMH7O2.js";import{j as e}from"./liveblocks-B0gJTiM8.js";import{a as U}from"./sentry-Thv-GFDq.js";import{N as u,u as zs,h as qs,i as Ws,g as Ys,j as G,q as Te,n as Xs,o as n}from"./core-NMWl9HcG.js";import{M as l,u as Js,z as b,c as Ks,e as Qs,f as et,F as S,h as st,N as tt,V as nt,L as F,G as Ae,t as _,P as at,O as ot,k as ne}from"./index-BZGnNPmd.js";import{u as rt}from"./mui-fUj5QCho.js";import{f as fe}from"./analyticsHelper-TSDaRiC1.js";import{t as it}from"./getLocaleForTenant-p3fiDmdm.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]="c5e37c1c-a993-4fd5-945e-a077c35ae74c",o._sentryDebugIdIdentifier="sentry-dbid-c5e37c1c-a993-4fd5-945e-a077c35ae74c")}catch{}})();const lt=l((()=>s((()=>import("./NotFoundScreen-Be6kVyg5.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`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),be=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(o)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(De,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return o?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(De,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):D?e.jsx(dt,{tenantEmailDomain:v}):N?e.jsx(ut,{tenantEmailDomain:v}):e.jsx(lt,{})},ct={dashboard:()=>s((()=>import("./DashboardRoutes-TL5YPnNT.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,25,8])),bills:()=>s((()=>import("./BillPayRoutes-PC9eBlf_.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BVQ2Lbvo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Bte-1Du_.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])),settings:()=>s((()=>import("./SettingsRoutes-BeMypL_o.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])),reports:()=>s((()=>import("./ReportsRoutes-DicBKiJn.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DXwBTw1d.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])),people:()=>s((()=>import("./PeopleRoutes-DYmL1Pqy.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DM3y0wS9.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BCA5T77L.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])),vendors:()=>s((()=>import("./VendorsRoutes-3QoCYM7w.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CLjveu8J.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8]))},mt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},_t=l((()=>s((()=>import("./ReportsRoutes-DicBKiJn.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,25,14,15,18,21,22,23,8])))),ht=l((()=>s((()=>import("./AddressRoutes-CY5a0VtR.js")),__vite__mapDeps([60,1,2,3,27,4,5,6,7,0,8])))),Et=l((()=>s((()=>import("./PeopleRoutes-DYmL1Pqy.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,0,11,21,22,23,8])))),pt=l((()=>s((()=>import("./PandLWithForecastRoutes-Ba8n3tmx.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,0,25,11,14,15,21,22,23,8])))),xt=l((()=>s((()=>import("./CustomerOnboardingRoutes-D9w1fV3M.js")),__vite__mapDeps([62,1,2,3,27,4,5,6,7,0,42,43,44,45,46,13,48,51,8])))),Rt=l((()=>s((()=>import("./VendorsRoutes-3QoCYM7w.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,27,0,25,55,56,15,11,21,22,23,30,47,8])))),gt=l((()=>s((()=>import("./TransactionDetailRoutes-vOAeChsM.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,13,33,12,11,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CCOfEYyK.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),It=l((()=>s((()=>import("./DashboardRoutes-TL5YPnNT.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,25,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-PC9eBlf_.js")),__vite__mapDeps([26,1,2,3,4,5,6,7,27,0,28,11,14,29,15,21,22,23,30,25,31,19,32,33,34,35,8])))),jt=l((()=>s((()=>import("./SettingsRoutes-BeMypL_o.js")),__vite__mapDeps([40,1,2,3,4,5,6,7,23,41,21,22,42,43,44,45,46,13,47,27,0,19,29,15,20,48,32,33,34,37,8])))),Tt=l((()=>s((()=>import("./InvoicingRoutes-DLk-X0Cy.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,27,0,21,22,23,42,43,44,45,46,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BVQ2Lbvo.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,11,14,30,37,33,34,35,8])))),At=l((()=>s((()=>import("./ZeniAccountRoutes-CLjveu8J.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,25,28,27,11,39,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-BCA5T77L.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,31,29,15,21,22,23,19,11,14,25,8])))),Dt=l((()=>s((()=>import("./TransactionListRoutes-Bte-1Du_.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,39,8])))),yt=l((()=>s((()=>import("./ChargeCardRoutes-DXwBTw1d.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,11,21,22,23,31,29,15,0,19,14,51,27,8])))),bt=l((()=>s((()=>import("./NotificationRoutes-B4CRDfZ6.js")),__vite__mapDeps([66,1,2,3,0,4,5,6,7,11,23,8])))),Ct=l((()=>s((()=>import("./PerformanceRoutes-75VxK2gE.js")),__vite__mapDeps([67,1,2,3,0,4,5,6,7,11,21,22,23,8])))),vt=l((()=>s((()=>import("./ExpenseAutomationRoutes-DM3y0wS9.js")),__vite__mapDeps([53,1,2,3,0,4,5,6,7,11,12,13,14,15,16,54,17,10,55,56,47,30,8])))),Ot=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-8KGyjwRR.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,54,17,13,15,0,8])))),Pt=l((()=>s((()=>import("./RewardsRoutes-C_hjDWHK.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,0,8])))),Ut=l((()=>s((()=>import("./TaskRoutes-Bv4UxzF2.js")),__vite__mapDeps([70,1,2,3,0,4,5,6,7,14,21,22,23,71,11,72,8])))),wt=l((()=>s((()=>import("./AiCfoScreen-rggsfRgx.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,24,56,15,72,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-DBTpOOLH.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,8])))),f=l((()=>s((()=>import("./NotFoundScreen-Be6kVyg5.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ft=l((()=>s((()=>import("./TaskListScreen-CAb9BbJD.js").then((o=>o.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,11,21,22,23,72,8])))),Lt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Gt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=zs(),N=qs(),{tenantEmailDomain:i}=Ws(),V=rt().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Js(),y=b.getSignedInUserTenant(i)?.tenantId,j=b.getSignedInUser(),X=hs(j),$=Ys(),[L,we]=U.useState(!1),r=G((a=>Es(a))),{useFeatureGate:H}=Ks(),M=Qs(),J=et(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=H(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(S.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?ps(oe,r):void 0,K=p==="Completed"||T==="Completed"?xs(r):void 0,re=p==="Completed"||T==="Completed"?Rs(r)&&!gs(r):void 0,ke=st(r,Ve,oe),{isCardsHidden:He}=tt(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=H(S.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||ot==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),z=G((a=>js(a)));if(i!=null){const a=b.getSignedInUserTenant(i);j!=null&&a!=null&&fe(j,r,V)}const Z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Ts(),E=nt(),Ge=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),$e=As(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,qe=G((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const A=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=bs();t.isAfter(d,"month")===!1?D(Cs(y,{month:A,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,y]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,ie,j,D,b]),U.useLayoutEffect((()=>{!vs(ie,Z)&&b.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(Re(A?.userId,A?.zeniSessionId,a.tenantId),c(Gs(!0)),c(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=b.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(it(t)),d?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,j,D,qe))}),[y]),U.useEffect((()=>{b.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(ge(t));const Y=b.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),Re(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($s(d.userId,t,d.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(T,p,r,y,j,O,D))}),[y,p]),U.useEffect((()=>{b.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),b.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),j!=null&&fe(j,r,V,void 0,z.tenantsBaseInOrder))}),[z,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=U.useRef(!1);U.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 P=r?.userRole!=null&&Ps(r?.userRole),{isFeatureEnabled:We}=H(S.isReferralFeatureEnabled),{isFeatureEnabled:Ye}=H(S.isAccrualEnabled),Xe=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&&!P,de=!Be&&!P,Ke=Us(E?.loggedInUserRoleMap),Qe=r.externalConnections?.accounting[0]?.isValid,es=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&ws(E?.loggedInUserRoleMap),_e=Fe&&!P,ss=Le&&!P,ts=ue&&Fs(E?.loggedInUserRoleMap),ns=de&&Ls(E?.loggedInUserRoleMap),as=_e&&Vs(E?.loggedInUserRoleMap),os=ks(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),x=Ms(E?.loggedInUserRoleMap),R=Zs(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&R,g=_e&&is,I=ss&&ls,m=de&&us,ds=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Ke===!0||os===!0||rs===!0;return b.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&T!=="In-Progress"&&D(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||X&&!ee)&&es&&Qe!==!0&&h===!1&&K===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||te!==!0||ee||X?!L||te!==!1||ee||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(at,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Lt,{isDashboardAccess:w,showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(_t,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:ds||w?e.jsx(Et,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(xt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Xe||Je?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(Dt,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ft,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ut,{})}),e.jsx(n,{path:"address/*",element:ts||me||as||ns?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:g?e.jsx(At,{}):e.jsx(f,{})}),e.jsx(n,{path:"treasury/*",element:I?e.jsx(ft,{}):e.jsx(f,{})}),e.jsx(n,{path:"performance",element:J===!0?e.jsx(Ct,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:J===!0&&P===!1?e.jsx(vt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:J===!0&&P===!1&&Ye===!0?e.jsx(Ot,{}):e.jsx(f,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(bt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(Rt,{}):e.jsx(f,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(jt,{hasAdminLevelAccess:me}):e.jsx(f,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(Tt,{}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(yt,{}):e.jsx(f,{})}),e.jsx(n,{path:"rewards/*",element:We?e.jsx(Pt,{}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(f,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(wt,{isFileUploadEnabled:Q}):e.jsx(f,{})}),e.jsx(n,{path:"*",element:e.jsx(f,{})})]})}):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:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,Gt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-B0gJTiM8.js";import{a as d}from"./sentry-Thv-GFDq.js";import{h as O,g as H,u as U,i as L,j as C,l as K,n as J,o as k}from"./core-NMWl9HcG.js";import{fI as v,_l as Pe,Oa as je,ZU as ve,_1 as we,ca as X,cV as Ae,cW as De,bq as Ue,dg as Re,Gs as Te,_m as Me,PD as Be,N1 as Ne,MU as de,MR as Ve,Gw as ue,MX as pe,M_ as ge,N4 as Y,CA as ee,Gv as Fe,ly as $,lB as me,_n as Oe,mL as Le,GN as Ge,Ws as Ze,Wt as $e,lw as He,_o as Ke,lz as We,uL as ze,Wn as qe,Wo as Je,uP as Qe,hZ as Xe,Vl as q,hR as ae,hO as Ye,hW as en,Vm as nn,GK as tn,_p as an,_q as on,Ni as sn,m3 as rn,e0 as fe,e1 as he,_r as ln,gF as cn,VB as dn,GJ as oe,gK as se,gJ as un,GI as pn,gI as gn,gH as mn,_s as fn,UN as Ce,_t as hn,_u as Cn,_v as yn,_w as Sn,_x as bn,_y as In,GQ as xn,_z as En,GH as ie,GB as Z,_A as kn,_B as _n,_C as re,_D as Pn,dV as jn,_E as vn,_F as wn,_G as An,UZ as Dn,c2 as Un,c9 as Rn,c8 as Tn,c3 as Mn,_H as Bn,c6 as Nn,c5 as Vn,c7 as Fn,c4 as On}from"./zeni-epic-state-CIOMH7O2.js";import{bU as Ln,z as j,V as G,a5 as ne,c4 as Gn,k as W,c as te,F as V,h as ye,N as Se,c5 as Zn,j as $n,X as be,c6 as Hn,ag as Kn,c7 as Wn,c8 as zn,ao as qn,c9 as Jn,p as Qn,d as Ie,ca as Xn}from"./index-BZGnNPmd.js";import{n as B}from"./mui-fUj5QCho.js";import{u as xe}from"./useTaskManagerAccess-ODLginXo.js";import{U as Yn}from"./AccountMappingScreen-DwjqrktH.js";import{t as et,A as nt}from"./AddressScreen-CXqTXhTG.js";import F from"./NotFoundScreen-Be6kVyg5.js";import{g as tt}from"./analyticsHelper-TSDaRiC1.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-Bn_KBJkO.js";import{C as st}from"./CompanyPassportScreen-CbGLe6QF.js";import{M as T}from"./MobileAppDrawer-DUVyC8w3.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-Dib2-nu_.js";import{q as le}from"./QBOConnectionScreen-DpWMsXgJ.js";import{B as lt}from"./BillPayApprovalRoutes-D-OLUuae.js";import{R as ct}from"./ReimbursementApprovalRoutes-Bna0UESu.js";import"./recharts-CtKj7SB-.js";import"./analytics-DCs8movC.js";import"./plaid-BbWeRCm2.js";import"./dnd-DYGkKXmy.js";import"./stripe-cKAAJElX.js";import"./lottie-D9ziiKjq.js";import"./lexical-BDCn2yQD.js";import"./pdf-DhjqWgyv.js";import"./utils-Cluy0TA1.js";import"./accountMappingHelper-B6LIBgfi.js";import"./routePaths-CQtCkYWz.js";import"./InboxNotificationsProvider-Br8MPZKt.js";import"./empty-BUv8_1nR.js";import"./pdf-lib-BaSLmyR8.js";import"./index-y3hTmFoR.js";import"./url-D4LlZTEG.js";import"./index-DdkfogE0.js";import"./decodeURIComponentSafe-CBFueyhb.js";import"./useEnsureVendorListLoaded-D5_n4OSS.js";import"./ReimbursementApprovalRuleDetailScreen-DW4BefkY.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]="985c13ee-f615-4ae4-8e17-d0625bd56a40",e._sentryDebugIdIdentifier="sentry-dbid-985c13ee-f615-4ae4-8e17-d0625bd56a40")}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-
|
|
1
|
+
import{j as u}from"./liveblocks-B0gJTiM8.js";import{h as Y,g as Q,u as ee,i as W,j as k,N as R,l as G,t as en}from"./core-NMWl9HcG.js";import{bL as nn,fI as V,cI as tn,Ik as J,ZU as an,ZX as sn,v2 as ne,uS as te,mD as ae,C6 as N,ZZ as be,gJ as Ge,gI as He,gH as Ke,Z_ as on,It as cn,N1 as Ce,MU as he,MR as Ie,Mw as X,MX as Ae,M_ as _e,N4 as ke,CA as ve,h2 as rn,cD as un,e1 as dn,e0 as ln,dk as pn,bu as mn,cw as Fe,Z$ as yn,Lw as fe,M8 as fn,_0 as gn,bM as Sn,Om as ge,Oa as bn,_1 as Cn,_2 as hn,Oq as In,Ou as An,_3 as je,B$ as _n,T6 as kn,_4 as vn,_5 as Pn,_6 as Tn,_7 as qe,_8 as En,_9 as Dn,Wb as Un,Z9 as On,Wq as wn,_a as Je,MI as Fn,MA as Vn,Wr as xn,ME as Bn,_b as Oe,Pa as Xe,mL as jn,uV as Ye,C8 as Rn,bG as Re,Ck as Le,cG as Ln,_c as Qe,P0 as we,OJ as Nn,OK as Mn,OO as zn,_d as Zn,P3 as Ne,_e as $n,_f as Wn,_g as Gn,PR as Se,_h as Hn,gZ as Kn,JF as qn,_i as Jn,JK as Xn,JJ as Yn}from"./zeni-epic-state-CIOMH7O2.js";import{ag as Pe,V as ie,c as de,F as q,z as E,a6 as se,k as D,a5 as Te,R as $,bR as Qn,ac as oe,bS as x,bj as Ve,bT as et,bU as nt,bV as tt,q as Be,bW as at,p as Me,aE as ze,$ as it,a9 as st,bX as ot,bY as ct,bZ as rt,w as ut}from"./index-BZGnNPmd.js";import{a as h}from"./sentry-Thv-GFDq.js";import{u as Ee,n as xe,D as dt,S as lt}from"./mui-fUj5QCho.js";import{u as pt,d as Ze,B as Ue}from"./BusinessVerificationPageScreen-Bn_KBJkO.js";import{M as le}from"./MobileAppDrawer-DUVyC8w3.js";import L from"./NotFoundScreen-Be6kVyg5.js";import{a as $e}from"./analyticsHelper-TSDaRiC1.js";import{d as We}from"./routePaths-CQtCkYWz.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]="45e4a05b-86f6-4fd8-8026-4ecbe5c7c3e4",e._sentryDebugIdIdentifier="sentry-dbid-45e4a05b-86f6-4fd8-8026-4ecbe5c7c3e4")}catch{}})();const mt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|