@zeniai/web-app-ui 5.2.19-prod → 5.2.20-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/AddressRoutes-EXo_W2G8.js +1 -0
- package/dist/assets/AddressScreen-2BaT3oA-.js +9 -0
- package/dist/assets/AiCfoScreen-D51UIBd5.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-guz2sdH1.js → BillPayApprovalRoutes-DmH2FpGv.js} +1 -1
- package/dist/assets/{BillPayRoutes-D0Ag3ATI.js → BillPayRoutes-DfJ2aUyG.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-BohezKn6.js → BusinessVerificationPageScreen-Bj1xk_4H.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-GOQqQudn.js → CardsAiCfoScreen-BgnMfnsv.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C3e575qW.js → ChargeCardRoutes-OCtj3EGu.js} +10 -10
- package/dist/assets/{CompanyPassportScreen-CxVFTUSz.js → CompanyPassportScreen-DZx6t9Ym.js} +1 -1
- package/dist/assets/ConnectionAuthScreen-MT-IQAtA.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-LgV5vbRx.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-wfQZLitF.js +30 -0
- package/dist/assets/{DashboardRoutes-BCmwgis8.js → DashboardRoutes-DZ3q6bkK.js} +4 -4
- package/dist/assets/{DefaultTenantHome-CC2FeaFy.js → DefaultTenantHome-p5Sm1nZ3.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CkUpa35c.js +18 -0
- package/dist/assets/DrawerScreen-C0UDia2K.js +1 -0
- package/dist/assets/EntityDetailRoutes-CVYJbbdy.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-DlWNUUJC.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BnJlO_wg.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CSIQ97oS.js +1 -0
- package/dist/assets/MagicLinkRoutes-BjPIElfX.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-91bKq8wl.js +12 -0
- package/dist/assets/MobileAppDrawer-CinzTjr5.js +1 -0
- package/dist/assets/NotFoundScreen-0K6cd0N1.js +1 -0
- package/dist/assets/{NotificationRoutes-dRraueia.js → NotificationRoutes-D6XmhJmY.js} +1 -1
- package/dist/assets/OAuthConsentScreen-BoXeHjzR.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-CSWL87A6.js +1 -0
- package/dist/assets/PeopleRoutes-DYYpRS5n.js +22 -0
- package/dist/assets/PerformanceRoutes-D39M8yO2.js +1 -0
- package/dist/assets/{Preview-CxHKvNb3.js → Preview-K7kVfJNZ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-vAHPaqo7.js → QBOConnectionScreen-OLT5sXwr.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DBKdGYm6.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BdQmAA7j.js → ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-OiL1KOsA.js → ReimbursementRoutes-BGm8wHdZ.js} +8 -8
- package/dist/assets/{ReportsRoutes-cJ_74y1a.js → ReportsRoutes-NgI0ftPw.js} +1 -1
- package/dist/assets/RewardsRoutes-BR5NZ2Mx.js +1 -0
- package/dist/assets/ScreenRoutes-CXSdkcuS.js +2 -0
- package/dist/assets/SettingsRoutes-BaPhIBve.js +57 -0
- package/dist/assets/{SetupPagesScreen-DqGd8bGY.js → SetupPagesScreen-Cvdlisb9.js} +5 -5
- package/dist/assets/SignInScreen-D4Abp5hF.js +1 -0
- package/dist/assets/SignOutScreen-iBWPMOhx.js +9 -0
- package/dist/assets/TaskListScreen-C2zap0Rn.js +9 -0
- package/dist/assets/TaskRoutes-CZVLK5dG.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-D9ZuqZEq.js → TransactionDetailRoutes-Dxvv503N.js} +1 -1
- package/dist/assets/TransactionDetailScreen-4CysuAHi.js +5 -0
- package/dist/assets/{TransactionListRoutes-t_0rbITT.js → TransactionListRoutes-DNSGDUp4.js} +1 -1
- package/dist/assets/TreasuryRoutes-CVqgaqHD.js +37 -0
- package/dist/assets/{VendorsRoutes-Ba7d72j7.js → VendorsRoutes-DVTbhmec.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-TxMYz6AU.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-DdIrrwcf.js → ZeniAccountRoutes-BvMIfD-Y.js} +11 -11
- package/dist/assets/ZeniAccountStatementScreen-D9RVH8zp.js +9 -0
- package/dist/assets/{accountMappingHelper-BmtW64tm.js → accountMappingHelper-gMZWceAt.js} +1 -1
- package/dist/assets/{analytics-C2MbRoEp.js → analytics-BP5D4JyB.js} +1 -1
- package/dist/assets/{analyticsHelper-DqO64pHt.js → analyticsHelper-BgeHTAVC.js} +1 -1
- package/dist/assets/{core-D2KaS3N5.js → core-BfWJ7zKT.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CD_zntJd.js → decodeURIComponentSafe-D2jiQ7Do.js} +1 -1
- package/dist/assets/{dnd-D-AkKI2c.js → dnd-tQgCG5z3.js} +1 -1
- package/dist/assets/{empty-ByGkxZf5.js → empty-0zu7mfa-.js} +1 -1
- package/dist/assets/{empty-D1hMU_8M.js → empty-D4KL-CgN.js} +1 -1
- package/dist/assets/{emptyVideoElement-B0o6h5Gb.js → emptyVideoElement-D2WpBqYb.js} +1 -1
- package/dist/assets/epic-_aUX4Son.js +2 -0
- package/dist/assets/getLocaleForTenant-BJ1a_Zja.js +1 -0
- package/dist/assets/{index-D6D50L1U.js → index-BtVRjclm.js} +1 -1
- package/dist/assets/{index-BQPo7Zt4.js → index-C2k_pBZi.js} +1 -1
- package/dist/assets/{index-CHRJI22G.js → index-CiS2dMrM.js} +1 -1
- package/dist/assets/index-Cx4f0JbF.css +1 -0
- package/dist/assets/{index-CivdpZRT.js → index-DWJVmwhz.js} +35734 -34803
- package/dist/assets/{index-Dyy6NuL-.js → index-DpTDwQon.js} +1 -1
- package/dist/assets/{index-BFVwI6w6.js → index-edb9TugW.js} +1 -1
- package/dist/assets/{index-nz48Z_9j.js → index-oBgu7-MV.js} +2 -2
- package/dist/assets/{index-CjrIzFQ1.js → index-zYcXrqlT.js} +1 -1
- package/dist/assets/{lexical-BQ-Po3YF.js → lexical-Bg8ldM3i.js} +1 -1
- package/dist/assets/liveblocks-DJbBe3tc.js +54 -0
- package/dist/assets/{lottie-Dz6JZ58r.js → lottie-BaCgeYyk.js} +1 -1
- package/dist/assets/{mui-C1ThRyKO.js → mui-ts7KHm6i.js} +1 -1
- package/dist/assets/{pathToGoBack-Du20FI7g.js → pathToGoBack-DG10zCZ4.js} +1 -1
- package/dist/assets/{pdf-2k8d7AeQ.js → pdf-C9HGpLCu.js} +4 -4
- package/dist/assets/{pdf-lib-DqPqgk_2.js → pdf-lib-DX6kz8a9.js} +1 -1
- package/dist/assets/{plaid-Do7hhR27.js → plaid-Cv0mPYlm.js} +1 -1
- package/dist/assets/{pusher-TY6R8jm6.js → pusher-CgG6vGRj.js} +1 -1
- package/dist/assets/{react-CASCBfCG.js → react-Bu9a3mw7.js} +1 -1
- package/dist/assets/{react-D8jfsv_0.js → react-CdB2kFeI.js} +1 -1
- package/dist/assets/{react-Bfs0rs07.js → react-Dp-aIPjg.js} +1 -1
- package/dist/assets/{react-DPqkDk9u.js → react-LH5dN4Ph.js} +1 -1
- package/dist/assets/{react-BReY6fnO.js → react-r7Nkvi02.js} +1 -1
- package/dist/assets/{react-CCcFi-WD.js → react-tqWON72J.js} +1 -1
- package/dist/assets/{recharts-jHFM5Sob.js → recharts-DNnhB5R_.js} +1 -1
- package/dist/assets/routePaths-DqVKIcAE.js +1 -0
- package/dist/assets/{sentry-DW4kKH26.js → sentry-C6T1HHHS.js} +1 -1
- package/dist/assets/{url-8bOSIiqX.js → url-CJ3E3PSB.js} +1 -1
- package/dist/assets/{url-GR46giUc.js → url-Xy6MI2YY.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CuA1dWGl.js → useAiCfoDashboardSuggestedQuestionsChips-BH6Wd98D.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DJm2npkG.js +1 -0
- package/dist/assets/useCashManagementBanner-Bjdnpen4.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-9ezHPs6j.js → useChargeCardPusherEvents-Bfrohee4.js} +1 -1
- package/dist/assets/{useDeviceId-CHTVQQ8G.js → useDeviceId-DNuYTM17.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-Ddee2XH0.js → useEmailConnectResultRefresh-DFbMcoeq.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-UA6eH2dj.js → useInitialThreadRequest-D3K2ol9C.js} +1 -1
- package/dist/assets/{utils-DIwqH7uj.js → utils-xWcqC4Wl.js} +1 -1
- package/dist/assets/withTransactionSidePanel-BMpiKSmG.js +21 -0
- package/dist/assets/{zeni-epic-state-BJ_gdj7r.js → zeni-epic-state-kow6PLud.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +7 -4
- package/dist/assets/AddressRoutes-B7ET6G-y.js +0 -1
- package/dist/assets/AddressScreen-CGTYstNo.js +0 -9
- package/dist/assets/AiCfoScreen-CA8qqox4.js +0 -22
- package/dist/assets/ConnectionAuthScreen-CDBmxiL_.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DbN5QLGb.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-C6q0UB9j.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-qVcyg1bS.js +0 -18
- package/dist/assets/DrawerScreen-YrXahOEM.js +0 -1
- package/dist/assets/EntityDetailRoutes-CteWzOFU.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-ChtLHwSX.js +0 -25
- package/dist/assets/FeaturePreviewScreen-C_bWMNSt.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-CFlu3uRE.js +0 -1
- package/dist/assets/MagicLinkRoutes-B6CyGV5n.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-CU5qkDL2.js +0 -12
- package/dist/assets/MobileAppDrawer-O95nPlSQ.js +0 -1
- package/dist/assets/NotFoundScreen-BeJq256C.js +0 -1
- package/dist/assets/OAuthConsentScreen-CRSd0T8_.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DdDF5n8o.js +0 -1
- package/dist/assets/PeopleRoutes-DPUju30P.js +0 -22
- package/dist/assets/PerformanceRoutes-BSNXb7w3.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-DhrGnU7Q.js +0 -1
- package/dist/assets/RewardsRoutes-DaWb-BQo.js +0 -1
- package/dist/assets/ScreenRoutes-CRY8MlH6.js +0 -2
- package/dist/assets/SettingsRoutes-B0QfLxKl.js +0 -57
- package/dist/assets/SignInScreen-wUhLdLU-.js +0 -1
- package/dist/assets/SignOutScreen-BChwhvvy.js +0 -9
- package/dist/assets/TaskListScreen-q9ElonDb.js +0 -9
- package/dist/assets/TaskRoutes-B9S8VECk.js +0 -9
- package/dist/assets/TransactionDetailScreen-B77dqrVQ.js +0 -5
- package/dist/assets/TreasuryRoutes-C2A809wv.js +0 -37
- package/dist/assets/WiseConfirmationScreen-AJ6Zf-xE.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BUgkOPv6.js +0 -9
- package/dist/assets/epic-C_V7SCDP.js +0 -2
- package/dist/assets/getLocaleForTenant--JGxRDjE.js +0 -1
- package/dist/assets/index-Czu7h9lW.css +0 -1
- package/dist/assets/liveblocks-BBLi67DG.js +0 -54
- package/dist/assets/routePaths-TRamKMNj.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CNoSipqI.js +0 -1
- package/dist/assets/useCashManagementBanner-COk5CYpf.js +0 -1
- package/dist/assets/withTransactionSidePanel-DWx4OX2G.js +0 -21
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BBLi67DG.js";import{h as n,n as e}from"./core-D2KaS3N5.js";import{R as i}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import"./sentry-DW4kKH26.js";import"./zeni-epic-state-BJ_gdj7r.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-BBLi67DG.js";import{a as r}from"./sentry-DW4kKH26.js";import{u as T,g as A,j as o,N as P}from"./core-D2KaS3N5.js";import{ME as j,eZ as C,fP as x,MF as z,MG as D,MH as L,MI as R,oi as k,LB as N}from"./zeni-epic-state-BJ_gdj7r.js";import{z as h,M as I}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="1497b19d-ff7a-4110-b12a-1cb36287a629",n._sentryDebugIdIdentifier="sentry-dbid-1497b19d-ff7a-4110-b12a-1cb36287a629")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>C(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),b=o(z),y=o(D),u=o(L),[v,S]=r.useState(null),[E,M]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(R())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(N(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{M("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BBLi67DG.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-D2KaS3N5.js";import{eZ as U,sw as R,s4 as X,N9 as v,r$ as y,bs as ee,bn as ae,bZ as te,s0 as se,Na as oe,MY as C,dI as re,wb as ne,Nb as ie,wy as ce,fG as le,fE as de}from"./zeni-epic-state-BJ_gdj7r.js";import{z as me,_ as fe,a0 as pe,e as ue,A as w,d as M,C as he,f as N,ap as ge,r as Fe}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import be from"./NotFoundScreen-BeJq256C.js";import{F as Ie}from"./FeaturePreviewScreen-C_bWMNSt.js";import{a as g}from"./sentry-DW4kKH26.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{u as ye}from"./useInitialThreadRequest-UA6eH2dj.js";import{t as Se}from"./routePaths-TRamKMNj.js";import{M as Te}from"./MobileAppDrawer-O95nPlSQ.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="5867bc77-3bd4-4d06-a77a-ec336f681805",s._sentryDebugIdIdentifier="sentry-dbid-5867bc77-3bd4-4d06-a77a-ec336f681805")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=K((function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:N}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(y(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),T=d((t=>U(t))),$=T.company?.companyInfo.firstMonthOfFY??1,c=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),A=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(c,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(y(c.forecasts[t].id))}}),[i,p,e,l,c,m,u,R,y,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:E}=G(M.isReportsCommentingEnabled),W=ye(E?T?.companyId:void 0,{clearParams:l&&m}),[Y,Z]=g.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:N,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((i=>U(i))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BBLi67DG.js";import{N5 as oe,eZ as Q,kG as H,fG as X,fE as ie,Kz as ee,ML as re,v8 as ke,N6 as Y,uZ as Ee,vi as ve,vc as le,v1 as ce,vg as Pe,vd as je,N7 as de,wZ as Le,fq as Te,gi as Ae,N8 as _,v5 as pe,v4 as ue,vl as Fe,c7 as Oe}from"./zeni-epic-state-BJ_gdj7r.js";import{K as me,A as ae,d as G,z as K,i as ge,S as fe,I as he,al as Ce,am as Re,F as ye,o as R,J as be,O as M,an as Ve,_ as Ze,a0 as Be,C as Ue,f as Se,h as $e,r as ze,ao as _e,e as Ge}from"./index-CivdpZRT.js";import{D as we,n as N,S as xe}from"./mui-C1ThRyKO.js";import te from"./NotFoundScreen-BeJq256C.js";import{a as c}from"./sentry-DW4kKH26.js";import{u as se,i as He,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-D2KaS3N5.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{M as qe}from"./MobileAppDrawer-O95nPlSQ.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="e323582e-43ca-41f7-b541-a027a1286c96",e._sentryDebugIdIdentifier="sentry-dbid-e323582e-43ca-41f7-b541-a027a1286c96")}catch{}})();const Je={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=He(),r=g((l=>oe(l))),p=g((l=>Q(l))),E=g((l=>H(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(G.isDebitCardFeatureEnabled),v=X(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!v&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),b()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(G.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:F}=fe(p?.tenantId),y=!j||F,O=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:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:v,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):ve(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Re,{...s})]})})},Xe=N(xe)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,De=N(be.H6Regular)`
|
|
6
|
-
margin-top: ${R.sp7};
|
|
7
|
-
padding-left: ${R.sp8};
|
|
8
|
-
padding-right: ${R.sp8};
|
|
9
|
-
color: ${e=>e.theme.colors.primary};
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,Ie=N(be.LargeRegularSp)`
|
|
12
|
-
color: ${e=>e.theme.colors.hero};
|
|
13
|
-
padding-left: ${R.sp8};
|
|
14
|
-
padding-right: ${R.sp8};
|
|
15
|
-
margin-bottom: 30px;
|
|
16
|
-
margin-top: ${R.sp4};
|
|
17
|
-
white-space: pre-line;
|
|
18
|
-
`,ea={overlayWidth:new ye(100,100,48)},q=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>oe(o))),r=g((o=>Q(o))),p=g((o=>H(o))),{useFeatureGate:E}=ae(),{isFeatureEnabled:D}=E(G.isDebitCardFeatureEnabled),I=X(D,r),v=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(Y())},C=()=>{V===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=E(G.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:F}=fe(r?.tenantId),y=!j||F,O=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:O===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:v,isLoading:U};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(Y()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:q.discardTitle}),descriptionComponent:a.jsx(Ie,{children:q.discardDescription}),primaryButtonText:q.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
|
|
19
|
-
display: flex;
|
|
20
|
-
min-height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
`,na=Ne((function(e,t){const d=de(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:Se}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(ce(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(_({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(_({searchText:i}))}}}}))(_e);function J({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Ke(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),h=g((s=>Q(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(G.isDebitCardFeatureEnabled),Z=g((s=>H(s))),k=!X(V,h)&&Z,S=ee(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[D,I]=c.useState(!1),[v,L]=c.useState(!1),[T,B]=c.useState("off"),[U,x]=c.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>de(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),F=g((s=>Ae(s))),y=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(_({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(pe()))}),[p,b,w,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ue(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(_({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const O=()=>{I(!1),L(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:O,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,v===!0?a.jsx(Qe,{closeDrawerHandler:O,isEditPeopleDrawerOpen:v,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,a.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(_({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=Ge();return Oe(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(J,{})}),a.jsx(z,{path:"new",element:a.jsx(J,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(J,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BBLi67DG.js";import E from"./NotFoundScreen-BeJq256C.js";import{a as r}from"./sentry-DW4kKH26.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as B,p as h}from"./core-D2KaS3N5.js";import{eZ as O,Th as b,bq as F,bn as N,im as V,fB as q}from"./zeni-epic-state-BJ_gdj7r.js";import{v as Y,z as I,a0 as Z,cY as $}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{M as H}from"./MobileAppDrawer-O95nPlSQ.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="d41624c0-4033-4bc2-a2e0-9f6a994af547",e._sentryDebugIdIdentifier="sentry-dbid-d41624c0-4033-4bc2-a2e0-9f6a994af547")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Y(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-BBLi67DG.js";import $ from"./NotFoundScreen-BeJq256C.js";import{a as p}from"./sentry-DW4kKH26.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as O,p as g}from"./core-D2KaS3N5.js";import{eZ as I,Qz as S,QP as b,FY as V,F5 as U,FX as d,FO as B,R0 as N,F_ as W}from"./zeni-epic-state-BJ_gdj7r.js";import{z as F,a9 as L,bZ as z,ag as T,bC as Q,b_ as Z}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import{u as K,R as A}from"./ReimbursementApprovalRuleDetailScreen-BdQmAA7j.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]="12e2438f-512c-4f0f-8f8c-366274e260ec",e._sentryDebugIdIdentifier="sentry-dbid-12e2438f-512c-4f0f-8f8c-366274e260ec")}catch{}})();const y="reimbursement-approval-rule-update",P=k((function(e){return{approvalView:S(e),remiSetupApproverViewUpdateData:b(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(N(!1))},onBackClick:()=>{T(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(L(z)),X=({isLoading:e})=>{const o=x(),s=C(),a=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>S(n))),v=u((n=>b(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!1)))}),[t,f,e,a]),F.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(n,_,h)=>{n.endsWith(y)&&h.onApprovalRulesEventReceived(n)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(P,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",Y=k((function(e){const o=S(e),s=b(e).remiSetupApproverViewUpdateData,a={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(a[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:a,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(N(!1))},onBackClick:()=>{T(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(L(Z)),q=()=>{const e=u((a=>I(a))),{isApprovalRulesV3Enabled:o,isLoading:s}=Q(e?.tenantId);return o?r.jsx(G,{isLoading:s}):r.jsx(X,{isLoading:s})},G=({isLoading:e})=>{const o=x(),s=C(),a=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>S(n)));K();const v=u((n=>b(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!0)))}),[t,f,e,a]),F.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(n,_,h)=>{n.endsWith(j)&&h.onApprovalRulesEventReceived(n)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Y,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(O,{children:[r.jsx(g,{path:"/",element:r.jsx(q,{})}),r.jsx(g,{path:"/new",element:r.jsx(A,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(g,{path:"*",element:r.jsx($,{})})]})}export{oe as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BBLi67DG.js";import{z as w,C as S,f,h as E,da as k,A as C,d as I}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import g from"./NotFoundScreen-BeJq256C.js";import{a as c}from"./sentry-DW4kKH26.js";import{u as D,j as h,h as F,g as L,n as T,o as U,p as d,N as y}from"./core-D2KaS3N5.js";import{eZ as _,T_ as b,T$ as p,w1 as P,fM as V,U0 as $,v$ as z}from"./zeni-epic-state-BJ_gdj7r.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="1299ddb8-12c7-4de5-ba47-175108e79c47",e._sentryDebugIdIdentifier="sentry-dbid-1299ddb8-12c7-4de5-ba47-175108e79c47")}catch{}})();const A=T((function(e,t){const n=b(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e($({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),G=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),j=L(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>b(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(A,{navigate:m,location:j,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.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,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BCmwgis8.js","assets/sentry-DW4kKH26.js","assets/core-D2KaS3N5.js","assets/zeni-epic-state-BJ_gdj7r.js","assets/index-CivdpZRT.js","assets/mui-C1ThRyKO.js","assets/analytics-C2MbRoEp.js","assets/utils-DIwqH7uj.js","assets/withTransactionSidePanel-DWx4OX2G.js","assets/useAskAiCfoHostNavButtonProps-CNoSipqI.js","assets/TransactionDetailScreen-B77dqrVQ.js","assets/decodeURIComponentSafe-CD_zntJd.js","assets/routePaths-TRamKMNj.js","assets/NotFoundScreen-BeJq256C.js","assets/useInitialThreadRequest-UA6eH2dj.js","assets/analyticsHelper-DqO64pHt.js","assets/CompanyPassportScreen-CxVFTUSz.js","assets/MobileAppDrawer-O95nPlSQ.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CuA1dWGl.js","assets/FeaturePreviewScreen-C_bWMNSt.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-D0Ag3ATI.js","assets/AddressScreen-CGTYstNo.js","assets/DomesticWireDetailScreen-qVcyg1bS.js","assets/DrawerScreen-YrXahOEM.js","assets/SetupPagesScreen-DqGd8bGY.js","assets/BusinessVerificationPageScreen-BohezKn6.js","assets/BillPayApprovalRoutes-guz2sdH1.js","assets/ReimbursementApprovalRuleDetailScreen-BdQmAA7j.js","assets/getLocaleForTenant--JGxRDjE.js","assets/ReimbursementRoutes-OiL1KOsA.js","assets/ReimbursementApprovalRoutes-DhrGnU7Q.js","assets/TransactionListRoutes-t_0rbITT.js","assets/ZeniAccountStatementScreen-BUgkOPv6.js","assets/SettingsRoutes-B0QfLxKl.js","assets/accountMappingHelper-BmtW64tm.js","assets/useEmailConnectResultRefresh-Ddee2XH0.js","assets/QBOConnectionScreen-vAHPaqo7.js","assets/empty-D1hMU_8M.js","assets/index-CHRJI22G.js","assets/url-8bOSIiqX.js","assets/index-Dyy6NuL-.js","assets/ReportsRoutes-cJ_74y1a.js","assets/ChargeCardRoutes-C3e575qW.js","assets/useChargeCardPusherEvents-9ezHPs6j.js","assets/PeopleRoutes-DPUju30P.js","assets/ExpenseAutomationRoutes-ChtLHwSX.js","assets/TreasuryRoutes-C2A809wv.js","assets/useCashManagementBanner-COk5CYpf.js","assets/VendorsRoutes-Ba7d72j7.js","assets/pathToGoBack-Du20FI7g.js","assets/ZeniAccountRoutes-DdIrrwcf.js","assets/AddressRoutes-B7ET6G-y.js","assets/PandLWithForecastRoutes-DdDF5n8o.js","assets/CustomerOnboardingRoutes-C6q0UB9j.js","assets/TransactionDetailRoutes-D9ZuqZEq.js","assets/EntityDetailRoutes-CteWzOFU.js","assets/NotificationRoutes-dRraueia.js","assets/PerformanceRoutes-BSNXb7w3.js","assets/RewardsRoutes-DaWb-BQo.js","assets/TaskRoutes-B9S8VECk.js","assets/TaskListScreen-q9ElonDb.js","assets/AiCfoScreen-CA8qqox4.js","assets/CardsAiCfoScreen-GOQqQudn.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as t,bn as us,eZ as ds,fG as cs,fE as ms,go as _s,ft as hs,cW as pe,cC as Es,fW as ps,cu as Rs,bE as xs,bo as gs,f_ as Is,v as js,Mg as Ts,bs as As,Mh as fs,bK as ys,bJ as Ds,bt as bs,cq as Cs,Mi as vs,Mj as Us,cS as Os,cV as ws,cU as Ps,cB as Fs,cI as Ls,oi as Re,fC as xe,gB as Hs,g2 as ge,gy as Ie,gz as je,g3 as ks}from"./zeni-epic-state-BJ_gdj7r.js";import{j as e}from"./liveblocks-BBLi67DG.js";import{a as w}from"./sentry-DW4kKH26.js";import{u as Bs,h as Vs,i as Ss,g as Ns,j as z,l as Te,N as u,o as Ms,p as a}from"./core-D2KaS3N5.js";import{y as Zs,u as zs,z as y,A as Gs,a as $s,c as Ws,d as G,i as Ys,S as qs,e as Js,L as F,O as Ae,t as _,P as Ks,f as X,l}from"./index-CivdpZRT.js";import"./mui-C1ThRyKO.js";import{f as fe}from"./analyticsHelper-DqO64pHt.js";import{t as Qs}from"./getLocaleForTenant--JGxRDjE.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},T=new o.Error().stack;T&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[T]="bfe50aa7-7148-49f2-82bb-9faff2f50205",o._sentryDebugIdIdentifier="sentry-dbid-bfe50aa7-7148-49f2-82bb-9faff2f50205")}catch{}})();const Xs={dashboard:()=>t((()=>import("./DashboardRoutes-BCmwgis8.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-D0Ag3ATI.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-OiL1KOsA.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-t_0rbITT.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-B0QfLxKl.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-cJ_74y1a.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-C3e575qW.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-DPUju30P.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-ChtLHwSX.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-C2A809wv.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-Ba7d72j7.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-DdIrrwcf.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},st=l((()=>t((()=>import("./ReportsRoutes-cJ_74y1a.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),tt=l((()=>t((()=>import("./AddressRoutes-B7ET6G-y.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),nt=l((()=>t((()=>import("./PeopleRoutes-DPUju30P.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),at=l((()=>t((()=>import("./PandLWithForecastRoutes-DdDF5n8o.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),ot=l((()=>t((()=>import("./CustomerOnboardingRoutes-C6q0UB9j.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),rt=l((()=>t((()=>import("./VendorsRoutes-Ba7d72j7.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),it=l((()=>t((()=>import("./TransactionDetailRoutes-D9ZuqZEq.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),ye=l((()=>t((()=>import("./EntityDetailRoutes-CteWzOFU.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),lt=l((()=>t((()=>import("./DashboardRoutes-BCmwgis8.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),De=l((()=>t((()=>import("./BillPayRoutes-D0Ag3ATI.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),ut=l((()=>t((()=>import("./SettingsRoutes-B0QfLxKl.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-OiL1KOsA.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),dt=l((()=>t((()=>import("./ZeniAccountRoutes-DdIrrwcf.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),ct=l((()=>t((()=>import("./TreasuryRoutes-C2A809wv.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),mt=l((()=>t((()=>import("./TransactionListRoutes-t_0rbITT.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),_t=l((()=>t((()=>import("./ChargeCardRoutes-C3e575qW.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),ht=l((()=>t((()=>import("./NotificationRoutes-dRraueia.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),Et=l((()=>t((()=>import("./PerformanceRoutes-BSNXb7w3.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),pt=l((()=>t((()=>import("./ExpenseAutomationRoutes-ChtLHwSX.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Rt=l((()=>t((()=>import("./RewardsRoutes-DaWb-BQo.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-B9S8VECk.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),gt=l((()=>t((()=>import("./AiCfoScreen-CA8qqox4.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-GOQqQudn.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-BeJq256C.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),It=l((()=>t((()=>import("./TaskListScreen-q9ElonDb.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function Nt({setTenantEmailDomain:o}){const T=Bs(),B=Vs(),{tenantEmailDomain:i}=Ss(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=zs(),v=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=us(I),$=Ns(),[V,Pe]=w.useState(!1),r=z((n=>ds(n))),{useFeatureGate:N}=Gs(),M=$s(),te=Ws(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z((n=>n.tenantState.fetchState)),j=z((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||A==="Completed"?cs(ne,r):void 0,J=j==="Completed"||A==="Completed"?ms(r):void 0,ke=Ys(r,He,ne),{isCardsHidden:Be}=qs(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(G.isAiCfoFileUploadEnabled),W=z((n=>_s(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=hs(),E=Js(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Me=Es(E?.loggedInUserRoleMap),oe=w.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=z((n=>Z.tenantId!=null?ps(n,Z.tenantId):void 0));w.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),w.useEffect((()=>{if(Q!=null&&v!=null){const n=Q.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=Rs(Number(f[0])),s=Number(f[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=gs();c.isAfter(S,"month")===!1?T(Is(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}}),[Q,v]),w.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!js(ae,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Hs(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Qs(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Ze))}),[Z,ae,I,T,y]),w.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s,c,S,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,rs=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,ls=d!=null&&d.externalConnections==null;if(Y&&rs){k(ge(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),Y&&ls&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(c.userId,c.zeniSessionId)))}})(A,j,r,v,I,U,T))}),[v,j]),w.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ts(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),w.useEffect((()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[j,A,v,V]);const ie=w.useRef(!1);w.useEffect((()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,(function(n=et,f=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),f)})())}),[j,V]);const O=r?.userRole!=null&&As(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,ue=!Ve&&!O,We=fs(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,qe=r.externalConnections?.fetchState==="Completed",de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&ys(E?.loggedInUserRoleMap),_e=Fe&&!O,Je=Le&&!O,Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=ue&&bs(E?.loggedInUserRoleMap),Xe=_e&&Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=Os(E?.loggedInUserRoleMap),ns=ws(E?.loggedInUserRoleMap),as=Ps(E?.loggedInUserRoleMap),p=Fs(E?.loggedInUserRoleMap),R=Ls(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ts,g=Je&&ns,m=ue&&as,os=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||es===!0||ss===!0;return y.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&qe&&Ye!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ms,{children:e.jsxs(a,{element:e.jsx(Ks,{}),children:[e.jsx(a,{path:"/",element:e.jsx(jt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(lt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:os||P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(at,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(ot,{})}),e.jsx(a,{path:"transaction/*",element:P&&O===!1||Ge||$e?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&O===!1?e.jsx(mt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&O===!1?e.jsx(ye,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&O===!1?e.jsx(ye,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(It,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Ke||me||Xe||Qe?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(ct,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(Et,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&O===!1?e.jsx(pt,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(ut,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(_t,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(Rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(gt,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const jt=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(Oe,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(Oe,{tenantEmailDomain:C}):T?e.jsx(At,{tenantEmailDomain:C}):B?e.jsx(Tt,{tenantEmailDomain:C}):e.jsx(b,{})},Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),At=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,Nt as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-BBLi67DG.js";import{a as u}from"./sentry-DW4kKH26.js";import{h as L,g as $,u as U,j as S,s as le,n as Z,i as G,o as ne,p as v}from"./core-D2KaS3N5.js";import{bn as De,eZ as P,gw as Te,n8 as re,OB as Me,hM as he,Os as Ue,r9 as _e,kG as be,n4 as Be,hO as Re,Ou as Fe,Ot as Oe,QR as Ve,zE as ze,F5 as Le,Qq as Ne,Qz as Qe,c7 as ae,cN as $e,cO as Ze,bs as Ge,Mt as He,y4 as Ke,QS as qe,Hw as Je,EN as We,EE as Se,EB as Xe,y8 as ye,EH as Ce,EK as Ie,EQ as oe,uu as se,y7 as Ye,ki as W,kl as Ae,QT as en,lm as nn,yn as tn,Nk as an,Nl as on,kg as sn,QU as cn,kj as ln,rD as rn,Nf as dn,Ng as un,rH as pn,hx as gn,MB as ee,hp as de,hm as mn,hu as fn,MC as hn,yk as bn,QV as Sn,QW as yn,F2 as Cn,fE as Ee,fG as xe,QX as In,gh as An,ML as En,yj as ue,gm as pe,gl as xn,yi as vn,gk as kn,gj as wn,QY as jn,fJ as ve,QZ as Pn,Q_ as Dn,yq as Tn,yh as ge,Q$ as Mn,fZ as Un,ye as _n,b_ as Bn,c6 as Rn,c5 as Fn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as Qn}from"./zeni-epic-state-BJ_gdj7r.js";import{A as X,d as O,z as w,ag as ke,bR as $n,f as H,h as Zn,bC as Gn,e as K,B as ie,bS as Hn,i as we,S as je,bT as Kn,ar as qn,k as Pe,bU as Jn,bV as Wn,bW as Xn,_ as Yn,bX as et,r as nt,bY as tt}from"./index-CivdpZRT.js";import{n as V}from"./mui-C1ThRyKO.js";import{M as R}from"./MobileAppDrawer-O95nPlSQ.js";import{a as q,g as J,m as at}from"./accountMappingHelper-BmtW64tm.js";import{t as ot,A as st}from"./AddressScreen-CGTYstNo.js";import Q from"./NotFoundScreen-BeJq256C.js";import{g as it}from"./analyticsHelper-DqO64pHt.js";import{B as ct}from"./BusinessVerificationPageScreen-BohezKn6.js";import{C as lt}from"./CompanyPassportScreen-CxVFTUSz.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-Ddee2XH0.js";import{q as me}from"./QBOConnectionScreen-vAHPaqo7.js";import{B as ut}from"./BillPayApprovalRoutes-guz2sdH1.js";import{R as pt}from"./ReimbursementApprovalRoutes-DhrGnU7Q.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./routePaths-TRamKMNj.js";import"./empty-D1hMU_8M.js";import"./pdf-lib-DqPqgk_2.js";import"./index-CHRJI22G.js";import"./url-8bOSIiqX.js";import"./index-Dyy6NuL-.js";import"./decodeURIComponentSafe-CD_zntJd.js";import"./ReimbursementApprovalRuleDetailScreen-BdQmAA7j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="64c085e2-e27f-4bed-9edc-dfb1e7174f73",e._sentryDebugIdIdentifier="sentry-dbid-64c085e2-e27f-4bed-9edc-dfb1e7174f73")}catch{}})();const gt=V.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,mt=Z((function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:be(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:_e(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:a.isCapitalizationFeatureEnabled,capitalizableAccounts:a.capitalizableAccounts,accountNamesById:a.accountNamesById,capitalizableAccountOverrides:a.capitalizableAccountOverrides,isCapitalizationThresholdSaving:a.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:a.onSaveCapitalizationAccountThreshold}}),(function(e,a){const{navigate:s,location:c,isFiling1099FeatureEnabled:l}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:i,reimbursementsAccountSection:p,vendorsAccountSection:m,filing1099Section:f}=n,{incomeAccount:y,expenseAccount:g}=t,{billPayAccount:r}=i,{reimbursementsAccount:b}=p,{prepaidExpensesAccount:I,fixedAssetsAccount:k,accruedExpensesAccount:E}=m,{bankAccount:h,expenseCategory1099:A}=f,_=q(a.accountMappingView.incomeAccountList,y.selectedOption),T=q(a.accountMappingView.expenseAccountList,g.selectedOption),x=q(a.accountMappingView.billPayAccountList,r.selectedOption),B=q(a.accountMappingView.reimbursementsAccountList,b.selectedOption),D=J(a.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),N=J(a.accountMappingView.fixedAssetsAccountList,k.selectedOptions),F=J(a.accountMappingView.accruedExpensesAccountList,E.selectedOptions),d=J(a.accountMappingView.bankAccounts1099FilingAccountList,h.selectedOptions),C=at(a.accountMappingView.expenseAccounts1099FilingAccountList,A),M={selectedIncomeAccountId:_?.accountId,selectedExpenseAccountId:T?.accountId,selectedBillPayAccountId:x?.accountId,selectedReimbursementsAccountId:B?.accountId,selectedPrepaidExpensesAccountIds:D.map((j=>j.accountId)),selectedFixedAssetsAccountIds:N.map((j=>j.accountId)),selectedAccruedExpensesAccountIds:F.map((j=>j.accountId)),selectedBankAccounts1099FilingAccountIds:d.map((j=>j.accountId)),selectedExpenseAccounts1099FilingAccountIds:C};e(Oe({data:M}))},onBackClick:()=>{ke(c)===!1?(s("../../dashboard"),e(Fe())):e(he())},onSaveClick:()=>{e(Re()),l&&H.track(Zn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Be(a.currentTenant.companyId,n))}}}))($n),ft=()=>{const e=L(),a=$(),s=U(),{useFeatureGate:c,useDynamicConfig:l}=X(),{isFeatureEnabled:n}=c(O.isFiling1099FeatureEnabled),{isFeatureEnabled:t}=c(O.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:i,isDynamicConfigLoading:p}=l("transaction_categorization_config"),m=!p&&i?.capitalization_enabled===!0,f=w.getSignedInUser(),y=De(f),g=S((d=>P(d))),{capitalizableAccounts:r,capitalizableAccountOverrides:b,isCapitalizationThresholdSaving:I,currencySymbol:k}=S((d=>{const C=d.tenantState.currentTenantId,M=C!=null?d.tenantState.tenantsById[C]:void 0,j=Te(d.companyState,g.companyId);return{capitalizableAccounts:M?.capitalizableAccounts??null,capitalizableAccountOverrides:M?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:d.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}}),le),E=u.useCallback(((d,C)=>{s(re(g.companyId,d,C))}),[s,g.companyId]),h=u.useCallback((d=>{const C={...b??{}},M=Object.entries(d);for(const[z,ce]of M)ce===null?delete C[z]:C[z]=ce;const[j,Y]=M[0]??[];j!=null&&s(re(g.companyId,j,Y,void 0,Object.keys(C).length>0?C:null))}),[s,g.companyId,b]),A=S((d=>Me(d.accountState)),le),_=u.useMemo((()=>{const d={};for(const C of A)C.accountId!=null&&C.accountName!=null&&(d[C.accountId]=C.accountName);return d}),[A]),[T,x]=u.useState(!1),[B,D]=u.useState(!1);u.useEffect((()=>{T===!1&&(s(he()),x(!0))}),[T]);const N=S((d=>Ue(d))),F=d=>{D(d)};return o.jsxs(gt,{children:[o.jsx(R,{isAppContentDrawerOpen:B,handleDrawerToggle:F}),o.jsx(mt,{currentTenant:g,navigate:e,accountMappingView:N,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:t,isCapitalizationFeatureEnabled:m,capitalizableAccounts:r,accountNamesById:_,capitalizableAccountOverrides:b,currencySymbol:k,isCapitalizationThresholdSaving:I,onSaveCapitalizationAccountThreshold:E,onSaveCapitalizationAccountThresholds:h,location:a,isSettings:ke(a),onClickMenuIcon:()=>F(!0)})]})},ht=V.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
height: 100%;
|
|
12
|
-
width: 100%;
|
|
13
|
-
flex: 1 1 auto;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: center;
|
|
16
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
-
`,bt=Z((function(e,a){const s=P(e),c=Ne(e),l=Qe(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(ae(s?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:l,analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}}))(Hn),St=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S((A=>P(A))),y=S((A=>A.billPaySetupApproverViewState.fetchState)),g=S((A=>A.remiSetupApproverViewState.fetchState)),r=S((A=>Ve(A))),{isApprovalRulesV3Enabled:b,isLoading:I}=Gn(f?.tenantId),k=f.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const E=K();u.useEffect((()=>{p||y!=="Not-Started"||I||(m(!0),s(ze(!0,!0,b)))}),[p,y,I,b,s]),u.useEffect((()=>{t||g!=="Not-Started"||I||(i(!0),s(Le(!0,!1,!1,b)))}),[t,g,I,b,s]);const h=A=>{n(A)};return E?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:h}),o.jsx(bt,{navigate:e,location:a,companyId:k,currentTenant:f,roleMap:E.loggedInUserRoleMap,onClickMenuIcon:()=>{h(!0)}})]}):o.jsx(ie,{fetchState:r.fetchState})},yt=V.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
height: 100%;
|
|
20
|
-
width: 100%;
|
|
21
|
-
flex: 1 1 auto;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
align-items: center;
|
|
24
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
-
`,Ct=Z((function(e,a){const{companyId:s,isZeniAccountEnabled:c,isChargeCardEnabled:l,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:i}=a,p=P(e);return{bankSetupView:qe(e,s,n,t,c,l,i),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t,i)=>{e(se(t,n,i))},onEstablishConnectionClick:(n,t,i)=>{e(oe(n,l,t,i))},onUpdatePaymentAccountStatus:(n,t,i,p,m)=>{e(Ie(n,t,m,p,i))},onUpdatePaymentAccountLoginStatus:(n,t,i,p)=>{e(Ce(!1,n,p,i,t))},onEstablishConnectionSuccess:(n,t)=>{e(ye(t,n))},onUpdateAccountClick:(n,t,i,p,m)=>{e(m==="paymentAccount"?Se(n,t,i,p):Xe(p,n,t))},onUpdatePrimaryFundingAccount:(n,t,i)=>{e(We(l,t,n,i))},onRemoveConnection:n=>{e(Je(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}}))(Kn),It=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),l=K(),{useFeatureGate:n}=X(),{isFeatureEnabled:t}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=n(O.isDebitCardFeatureEnabled),[p,m]=u.useState(!1),[f,y]=u.useState(!1),g=S((D=>P(D))),r=S((D=>D.settingsViewState.bankConnection.fetchState)),b=$e(g,l?.loggedInUserRoleMap),I=Ze(g,l?.loggedInUserRoleMap),k=g?.userRole!=null&&Ge(g.userRole),E=!!g.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!k,h=g.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!k,A=we(g,t,i),_=He(g,l?.loggedInUserRoleMap)&&A,{isCardsHidden:T}=je(g?.tenantId),x=g.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect((()=>{f||r==="Completed"||(y(!0),s(Ke(!1)))}),[f,s,r]);const B=D=>{m(D)};return b||E||I||_?o.jsxs(yt,{children:[o.jsx(R,{isAppContentDrawerOpen:p,handleDrawerToggle:B}),o.jsx(Ct,{navigate:e,location:a,companyId:x,currentTenant:g,roleMap:l.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:I,isZeniAccountEnabled:E,isChargeCardEnabled:_,isChargeCardsHidden:T,isTreasuryEnabled:h,onClickMenuIcon:()=>{B(!0)}})]}):o.jsx(Q,{})},At=V.div`
|
|
26
|
-
display: flex;
|
|
27
|
-
height: 100%;
|
|
28
|
-
width: 100%;
|
|
29
|
-
flex: 1 1 auto;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,Et=Z((function(e,a){const{companyId:s}=a,c=P(e),l=a.roleMap.bill_pay_admin,n=en(e,s),{uiState:t}=n,i=(ae(c?.userRole??[])||l)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:Pe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:i,analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t)=>{e(se("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(oe(n,l,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ye("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,i)=>{e(Ie(n,t,"billing","billing_setup",i))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(Ce(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(Se(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ae(n))},handleConfirmCardSetupIntent:n=>{e(ln(n))},updateCardPaymentModalState:n=>{e(cn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,i)=>{e(sn(n,t,i))},handleFetchPaymentSources:()=>{e(W())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},onBillingAddressSave:n=>{e(tn(n))},onAddressEditHandler:n=>{if(n!=null){const t=ot(n);e(nn({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Jn),xt=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S((h=>P(h))),y=S((h=>h.cardPaymentViewState)),g=S((h=>h.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),r=qn(y.addCardPaymentSourceStatus.fetchState),b=y.addCardPaymentSourceStatus.fetchState,I=f.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=K();u.useEffect((()=>{I!=null&&s(Ye(I,!1))}),[I,s]),u.useEffect((()=>{t||(i(!0),s(W()))}),[t,s]),u.useEffect((()=>{p||(Ae(["card"]),m(!0))}),[p]),u.useEffect((()=>{r==="In-Progress"&&b==="Completed"&&s(W())}),[r,b]);const E=h=>{n(h)};return k?.loggedInUserRoleMap!=null?o.jsxs(At,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:E}),o.jsx(Et,{navigate:e,location:a,companyId:I,currentTenant:f,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)},googleAPIKey:Pe.googleMapsAPIKey})]}):o.jsx(ie,{fetchState:g})},te="external_integrations",vt=Z((function(e){const a=un(e,te);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(a.map((s=>s.additionalInfo)).filter((s=>s!=null)))}}),(function(e,a){const{navigate:s,integrationsView:c,signedInUserEmail:l,tenantEmailDomain:n,tenantId:t}=a;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{me.init("/connection/auth",n),me.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(bn())},onSaveChargeBeeCredentials:(i,p)=>{const m=c.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;m!=null&&e(fn(t,m,ee("revenue"),hn("chargebee"),{api_key:i,site:p}))},onConnectHubSpot:(i,p)=>{const m=c.externalConnections?.revenue?.find((f=>f.connectionName==="hubspot"))?.connectionId;if(m!=null){const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:i,client_secret:p,connection_id:m,redirect_uri:f,tenant_id:t}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(i)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(f)}`}},onDisconnect:(i,p)=>{e(mn(t,i,ee(p)))},onConnectGmail:()=>{e(de(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(de(t,"outlook",window.location.href))},onSaveConnectorCredentials:i=>{e(gn(t,ee("payments"),i))},onNotifyMe:i=>{H.trackIntegrationsNotifyMeClicked("Settings",i),e(pn(te,i,l))}}}))(Wn),kt=()=>{const e=L(),a=U(),{tenantEmailDomain:s}=G();rt();const[c,l]=u.useState(!1),n=S((h=>h.tenantState.fetchState)),t=S((h=>P(h))),i=t.companyId??w.getSignedInUserTenant(s)?.companyId,p=w.getSignedInUser(),m=K(),f=ae(t.userRole??[]);if(p==null)throw Error("Can't access Integrations page without signing in...");u.useEffect((()=>{a(rn(te))}),[a]);const[y,g]=u.useState(!1);u.useEffect((()=>{y||(g(!0),a(W()))}),[y,a]);const r=h=>{l(h)},b=S((h=>dn(h,i))),I=S((h=>h.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:k,onAddPlaidAccount:E}=dt({companyId:i??t.companyId});return m?.loggedInUserRoleMap!=null?o.jsxs(wt,{children:[o.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:r}),o.jsx(vt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:f,integrationsView:b,signedInUserEmail:p.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??s??"",tenantId:t.tenantId,saveChargeBeeState:b.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:b.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:b.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:b.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:b.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(b.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([h,A])=>[h,A?.message]))),deleteConnectionState:b.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:b.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:k,onAddPlaidAccount:E,plaidConnectionDetails:I})]}):o.jsx(ie,{fetchState:n})},wt=V.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
flex: 1 1 auto;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: center;
|
|
40
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
-
`,jt=V.div`
|
|
42
|
-
display: flex;
|
|
43
|
-
height: 100%;
|
|
44
|
-
width: 100%;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
align-items: center;
|
|
48
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
-
`,Pt=()=>{const e=U(),{tenantEmailDomain:a}=G(),[s,c]=u.useState(!1),l=S((r=>P(r))).companyId??w.getSignedInUserTenant(a)?.companyId,n=w.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=S((r=>Sn(r,n.userId))),i=S((r=>yn(r,l,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:p}=i,m=r=>{c(r)},f=u.useCallback((r=>{e(se("user_reimbursement_account",r))}),[]),y=u.useCallback((r=>{e(oe(r,l,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);u.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(Cn(n.userId))}),[n.userId,t.fetchState]);const g=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return o.jsxs(jt,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:m}),o.jsx(Xn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:t,onFetchLinkTokenClick:f,onEstablishConnectionClick:y,onClickMenuIcon:()=>{m(!0)}})]})},Dt=V.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 100%;
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1 1 auto;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
align-items: center;
|
|
56
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
-
`,fe=({appContent:e})=>{const a=U(),s=L(),c=$(),[l,n]=u.useState(!1),t=S((d=>P(d))),{tenantEmailDomain:i}=t,p=t.companyId??w.getSignedInUserTenant(i)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:m}=X(),f=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:y}=m(O.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=m(O.isDebitCardFeatureEnabled),r=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=S((d=>be(d))),I=Ee(t),k=xe(g,t),E=!k&&b,h=we(t,y,g),{isCardsHidden:A}=je(t?.tenantId),_=!h||A,{areTenantIdsInSync:T}=Yn();u.useEffect((()=>{T&&a(In(p,E))}),[p,a,E,T]);const x=S((d=>An(d,E))),B=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||p==null,D=En(t),N=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,F=d=>{n(d)};return o.jsxs(Dt,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:F}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:N===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:_,isTreasuryDisabled:r===!1,isLiteRoleDisabled:D===!1,onClickMenuIcon:()=>{F(!0)},isLoading:B,isBankingOnlyTenant:k,isCardsOnlyTenant:I,onAddressClick:d=>{const C=(function(j,Y){let z=`/${j}/settings/my_profile`;return z=z.concat(`/new/${Y}`),z})(i,d),M=nt(c.state?.pathnameStackToGoBack,c.pathname);s(C,{state:{pathnameStackToGoBack:M}})},onGetOtp:d=>{const C={...x.myProfileLocalData,phone:d};a(ue({localData:C})),a(wn(d,"MyProfile"))},onResendOtp:d=>{a(kn(d,"MyProfile"))},onCancelClick:()=>{a(vn())},onSaveClick:()=>{a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(d,C)=>{a(xn(d,C,"MyProfile"))},onVerifyOtpSuccess:d=>{d!=null&&w.saveZeniOtpToken(d),a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:d=>{a(ue({localData:d}))}})]})};function Tt(){const e=U(),a=S((r=>P(r))).companyId,s=S((r=>jn(r))),c=S((r=>ve(r))),l=w.getSignedInUser(),[n,t]=u.useState(!1),i=u.useCallback((r=>{t(r)}),[]),p=u.useCallback((r=>{e(Pn(r))}),[]),m=u.useCallback((()=>{l?.userEmail!=null&&e(Dn({loggedInUserEmail:l.userEmail}))}),[l?.userEmail]),f=u.useCallback((()=>{e(Tn())}),[]);if(l==null)throw Error("Can't access Notification Settings page without signing in...");const y=u.useCallback((()=>{const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))}),[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback((()=>{e(Mn())}),[]);return u.useEffect((()=>{if(c.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))}}),[s.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:i}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:p,onCancel:m,onSave:f,onClickMenuIcon:()=>{i(!0)},signedInUser:l,onRefresh:y,resetUpdateStatus:g})]})}function ga(e){const[a,s]=u.useState(!1),c=S((r=>ve(r))),l=S((r=>P(r))),n=K(),t=w.getSignedInUser(),i=U(),{useFeatureGate:p}=X(),{isFeatureEnabled:m}=p(O.isDebitCardFeatureEnabled),f=t?.userEmail==null||c.fetchState!=="Completed"||Un(c.notificationSettings,t.userEmail,m,l);u.useEffect((()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(s(!0),i(_n()))}),[c.fetchState,a]);const y=xe(m,l),g=Ee(l);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?Bn(l)?o.jsxs(ne,{children:[Rn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"accounting/*",element:o.jsx(ft,{})}),Fn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"approval_rules/*",element:o.jsx(Mt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),On(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"my_bank_connections",element:o.jsx(Pt,{})}),Vn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"bank_connections",element:o.jsx(It,{})}),zn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"business_verification",element:o.jsx(ct,{productType:y?"zeni_accounts":g?"charge_cards":it(l,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"company_details",element:o.jsx(lt,{})}),Nn(n?.loggedInUserRole??[],l)&&o.jsx(v,{path:"billing",element:o.jsx(xt,{})}),Qn(n?.loggedInUserRole??[],m,l)&&o.jsx(v,{path:"integrations",element:o.jsx(kt,{})}),o.jsx(v,{path:"my_profile/new/:addressType",element:o.jsx(fe,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(v,{path:"my_profile",element:o.jsx(fe,{})}),f&&o.jsx(v,{path:"notifications",element:o.jsx(Tt,{})}),o.jsx(v,{path:"*",element:o.jsx(Q,{})})]}):o.jsx(ne,{children:o.jsx(v,{path:"*",element:o.jsx(Q,{})})}):null}function Mt(e){return o.jsxs(ne,{children:[o.jsx(v,{path:"/",element:o.jsx(St,{})}),o.jsx(v,{path:"bills/approval-rules/*",element:o.jsx(ut,{})}),o.jsx(v,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(pt,{}):o.jsx(Q,{})}),o.jsx(v,{path:"*",element:o.jsx(Q,{})})]})}export{ga as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-BBLi67DG.js";import{a as u,b as M,q as T}from"./sentry-DW4kKH26.js";import{u as A,h as z,j as c,g as D,N as O,n as j}from"./core-D2KaS3N5.js";import{u as P,z as s,y as F,f as E,O as _,g as B,h as N,H as Z,j as V,w as $,k as v}from"./index-CivdpZRT.js";import{eZ as q,Mf as H,Mg as J,fC as W,g2 as G,Ml as K,gv as Q,cZ as R,Mm as C,Mn as X,Mo as Y,bZ as y}from"./zeni-epic-state-BJ_gdj7r.js";import"./mui-C1ThRyKO.js";import{u as ee}from"./useDeviceId-CHTVQQ8G.js";import{f as te}from"./analyticsHelper-DqO64pHt.js";import{t as ne}from"./getLocaleForTenant--JGxRDjE.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="7f76d847-cd87-4fad-93d5-e12c6cf561fe",t._sentryDebugIdIdentifier="sentry-dbid-7f76d847-cd87-4fad-93d5-e12c6cf561fe")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(C())}}}))($),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),L=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>q(e))),I=c((e=>H(e))),m=D(),w=F().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[h.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Q().then((()=>{const e=V();e!=null&&B(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx(Z,{onClose:()=>i(C()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BBLi67DG.js";import{a as i}from"./sentry-DW4kKH26.js";import{u as l,g as c,N as u}from"./core-D2KaS3N5.js";import{z as d,f as a,h as m,B as p}from"./index-CivdpZRT.js";import{gA as g,MD as y}from"./zeni-epic-state-BJ_gdj7r.js";import{n as b}from"./mui-C1ThRyKO.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ddb64d63-a7d9-46d5-a06a-fd562ddb4daf",t._sentryDebugIdIdentifier="sentry-dbid-ddb64d63-a7d9-46d5-a06a-fd562ddb4daf")}catch{}})();function M(){const t=l(),e=c(),r=i.useRef(!1),n=d.isSignedIn(),o=e.state?.message==="logout"||n;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),d.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`;export{M as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BBLi67DG.js";import{a as b}from"./sentry-DW4kKH26.js";import{h as N,u as v,g as K,j as G,i as _,n as z}from"./core-D2KaS3N5.js";import{z as U,A as M,d as p,a0 as Z,C as O,f as V,h as W,dd as q,r as f,p as Q}from"./index-CivdpZRT.js";import{eZ as H,U5 as F,Jo as y,U6 as R,U1 as X,IM as E,U7 as Y,IU as I,Ie as aa,Jp as S,U8 as B,fB as ea,Jf as ta,Jk as sa,J7 as oa,J5 as w,Jl as na,J2 as ia,U9 as la,Ua as ra,Ub as ca,Uc as ka,Ud as m,ek as da,Ue as ua,Uf as pa}from"./zeni-epic-state-BJ_gdj7r.js";import{n as ma}from"./mui-C1ThRyKO.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{M as fa}from"./MobileAppDrawer-O95nPlSQ.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="b7d7910c-5ff9-4d1f-932c-8b762d9363fc",e._sentryDebugIdIdentifier="sentry-dbid-b7d7910c-5ff9-4d1f-932c-8b762d9363fc")}catch{}})();const ga=ma.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,ha=z((function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map((l=>({...l,tasks:l.tasks.filter((a=>a.taskGroupIds.includes(c)))}))).filter((l=>l.tasks.length>0))}:o,d=X(e),i=U.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}}),(function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(y(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(R({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(E({taskDetailLocalData:s}));const k=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),k=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}}))(q);function ja(){const e=N(),t=v(),o=K(),c=U.getSignedInUser(),n=G((r=>H(r))),{taskGroupId:d}=_(),{useFeatureGate:i}=M(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:g}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[x,P]=b.useState(!1),h=G((r=>F(r,l))),D=G((r=>r.taskGroupState)),T=h.fetchState,{isAiCfoAccessEnabled:J,onAskAiCfoClick:j}=Ta({mobileExploreReferrer:"Task Checklist"});if(Z({isDataReady:T==="Completed"}),b.useEffect((()=>{t(y(!1,l))}),[n?.tenantId,t,l]),b.useEffect((()=>{T==="Completed"&&t(R({taskGroupById:D.taskGroupById}))}),[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[T==="Completed"?u.jsx(O,{analytics:V,onLoad:r=>($=>$.trackPageLoaded(W.Event.taskListPage))(r)}):null,u.jsxs(ga,{children:[u.jsx(fa,{isAppContentDrawerOpen:x,handleDrawerToggle:r=>{P(r)}}),u.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:g,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:J,onAskAiCfoClick:j})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{ja as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BBLi67DG.js";import se from"./NotFoundScreen-BeJq256C.js";import{a as c}from"./sentry-DW4kKH26.js";import{h as M,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-D2KaS3N5.js";import{Ir as Z,Iu as le,Io as de,eZ as J,U1 as K,II as H,Il as pe,Jc as ue,J5 as ke,U2 as Q,U3 as z,Ih as me,Ie as fe,rW as ge,rK as he,le as Ie,IC as Se,U4 as Te,IT as be,IQ as Ce,Ix as Ee,IN as Ge,IM as De}from"./zeni-epic-state-BJ_gdj7r.js";import{z as G,db as xe,v as ye,A as je,d as b,p as W,r as w,C as ve,f as V,h as we,dc as Re,k as A,au as Ue}from"./index-CivdpZRT.js";import{n as Fe}from"./mui-C1ThRyKO.js";import{u as Be}from"./useInitialThreadRequest-UA6eH2dj.js";import{M as Pe}from"./MobileAppDrawer-O95nPlSQ.js";import Le from"./TaskListScreen-q9ElonDb.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./useAskAiCfoHostNavButtonProps-CNoSipqI.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]="f696f827-eee7-4e23-9b59-cccf287359e3",e._sentryDebugIdIdentifier="sentry-dbid-f696f827-eee7-4e23-9b59-cccf287359e3")}catch{}})();function Ne(){const e=M(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(Z())}),[t]),k=c.useCallback(((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))}),[t]),a=c.useCallback((o=>{t(de({cannedResponseId:o}))}),[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const $e=re((function(e,t){const{location:s,taskGroupId:u}=t,r=Q(e,t.taskId),d=J(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=K(e),{tenantEmailDomain:D}=d,C=r.recurringSourceTaskId,x=C!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(C)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Ue.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((p=>z(e.taskGroupState,p))).filter((p=>p!=null&&!p.isDeleted)).map((p=>({id:p.id,name:p.name,isDefault:p.isDefault})))}}),(function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ce(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function v(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g((i=>J(i))),k=Be(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:C}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,X]=c.useState(!1),[U,Y]=c.useState(!1),[F,ee]=c.useState(!1),[B,y]=c.useState(!1),T=c.useRef(!1),E=g((i=>i.taskListState.updateTasksFetchState.fetchState)),P=g((i=>K(i))),L=g((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(X(!0),t(H(!1,r)))}),[p,t]),c.useEffect((()=>{U||P.fetchState==="Completed"||(Y(!0),t(pe()))}),[U,t,P.fetchState]),c.useEffect((()=>{F||L==="Completed"||(ee(!0),t(ue()))}),[F,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))}),[t,r]);c.useEffect((()=>{if(B)if(E!=="In-Progress"){if(T.current){if(E==="Error")return y(!1),void(T.current=!1);if(E==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[B,E,l,s,e]);const N=g((i=>Q(i,r))),j=N.fetchState,$=G.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&N.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Pe,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx($e,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:C})]})]})}const ze=Fe.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(v,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx(Ne,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(v,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as w}from"./liveblocks-BBLi67DG.js";import{a as i}from"./sentry-DW4kKH26.js";import{u as W,k as Ye,j as S,s as fe,g as ge,h as Te,i as be,N as Qe,n as Ze}from"./core-D2KaS3N5.js";import{nX as he,eZ as Q,gw as Xe,OB as et,n8 as tt,mS as at,bn as nt,cW as Ee,bs as ve,ru as K,NA as q,OC as Ie,OD as oe,N_ as De,kR as Ce,OE as ke,O3 as se,O4 as ce,lG as Ae,Kv as ie,Nu as M,kL as Oe,kJ as Ue,kV as ot,nK as st,OF as ct,OG as it,vK as Y,kQ as we,JQ as _e,cj as rt,c_ as lt,OH as dt,Nt as ut,OI as mt,vG as pt,OJ as ft,OK as ht,OL as yt,OM as St,ON as gt,kU as Tt,OO as bt,OP as Et,Nv as vt,OQ as It,OR as Dt,OS as Ct,JK as kt,JA as At,JZ as Ot,kW as Ut,Kw as ye,nP as wt}from"./zeni-epic-state-BJ_gdj7r.js";import{A as H,d as _,z as xe,aS as Pe,y as _t,K as xt,aT as Pt,F as Ft,p as ae,e as Vt,aU as Bt,r as ne,a0 as Nt,aV as Rt,f as Fe,aW as Lt,au as zt,a4 as te}from"./index-CivdpZRT.js";import{n as Gt,S as jt,D as $t}from"./mui-C1ThRyKO.js";import{u as Mt}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{d as Ve}from"./decodeURIComponentSafe-CD_zntJd.js";import{h as Be,c as Ne,g as Wt,e as Kt}from"./routePaths-TRamKMNj.js";import{u as qt}from"./utils-DIwqH7uj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a6079558-eb3a-4cb8-b34e-e187acdc6189",t._sentryDebugIdIdentifier="sentry-dbid-a6079558-eb3a-4cb8-b34e-e187acdc6189")}catch{}})();function Ht(t=!0){const e=W(),s=Ye(),{useFeatureGate:a}=H(),{isFeatureEnabled:n}=a(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))}),[t,n,e,s])}function Jt(t,e){const s=(function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,O]=i.useState(null),{useDynamicConfig:T}=H(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),I=!C&&f?.capitalization_enabled===!0,k=S((h=>Q(h))),b=k.companyId,U=S((h=>Xe(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:x,capitalizableAccountOverrides:B,dismissedAccounts:z}=S((h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}}),fe),G=i.useRef(x);G.current=x;const N=i.useRef(B);N.current=B;const P=i.useRef(z);P.current=z;const R=S((h=>et(h.accountState)),fe),v=i.useMemo((()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h}),[R]),l=m!=null?v[m]??null:null,j=i.useCallback((h=>{if(!I)return;const E=G.current;if(E==null)return;const u=E.accounts??[],$=new Set(h),Z=N.current??{},J=P.current;for(const L of u)if($.has(L.accountId)&&Z[L.accountId]==null&&J?.[L.accountId]==null)return y(L.classificationType),O(L.accountId),void g(!0)}),[I]),D=i.useCallback(((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),O(null)}),[r,b]),F=i.useCallback((()=>{m!=null&&(r(at(b,m)),g(!1),y(null),O(null))}),[r,b,m]);return{showPopup:p&&I,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}})(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t}),[t]),s}const re=()=>{const t=xe.getSignedInUser(),{useFeatureGate:e}=H(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>nt(t)&&s),[t,s])};function Re(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=W(),{useFeatureGate:a,useDynamicConfig:n}=H(),o=S((u=>Q(u))),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&ve(o.userRole),{isFeatureEnabled:g}=a(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(_.isExpenseAutomationEnabled),{configValue:y}=n(Pe.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,O=re(),T=i.useMemo((()=>({id:t,type:K(e)})),[t,e]),f=S((u=>q(u,T))),C=f?.transactionDetailUpdateStatus?.fetchState,I=f?.transactionDetailLocalData?.lineItemById,k=S((u=>{const $=q(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return $==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[$]?.saveStatus.fetchState??"Not-Started"})),b=i.useMemo((()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0),[f?.fetchState,f?.transaction]),U=S((u=>{if(b!=null)return Ie(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")})),x=S((u=>oe(u))),B=S((u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")})),z=o.company?.companyInfo.firstMonthOfFY??1,G=S((u=>Ce(u.accountState,u.accountListState,"accountList"))),[N,P]=i.useState(!1),[R,v]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect((()=>{P(!1),v(!1),j(!1)}),[t,e]);const D=i.useCallback((()=>{P(!1),v(!1)}),[]),[F,h]=i.useState(!1),E=B?.selectedPeriod?.timePeriod;return i.useEffect((()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),b!=null&&(!c||r&&p===!1)&&(N?R||U==null||(v(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??U}))):(s(se()),s(ce()),P(!0),s(Ae(b))))}),[s,l,f?.fetchState,f?.transaction,b,c,r,p,N,R,U,E]),i.useEffect((()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)}),[x.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{s(M("common"))}),[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:O,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:I,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:U,vendorViewDetails:x,uiState:B,firstMonthOfFY:z,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Yt={overlayWidth:new Ft(100,100,58)},Qt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=_t(),c=xt(),r=W(),p=S((y=>oe(y))),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Oe({vendorId:void 0,localData:y}))}};return w.jsx($t,{anchor:"right",open:t,PaperProps:{style:{width:Yt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:w.jsx(Zt,{onClick:y=>y.stopPropagation(),children:w.jsx(Pt,{...A})})})},Zt=Gt(jt)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function Xt(t,e){t(st({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:K(e.transactionType),sourceTransactionType:K(e.sourceTransactionType)}))}function ea({currentTransactionId:t,enabled:e=!0,buildPath:s,beforeNavigate:a,navigate:n,navigateState:o}){const c=S((p=>p.createTransferEntryState.lastTransferEntryReplacement)),r=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||r.current===c)return;const{previousTransactionId:p,newTransactionId:g}=c;t.id===p.id&&t.type===p.type&&(r.current=c,a?.(),n(s(g),{replace:!0,state:o}))}),[e,c,t,s,a,n,o])}const ta=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:s})=>{const a=ge(),n=Te(),o=W(),c=re(),{transactionTypeEncoded:r,transactionId:p}=be(),g=e??p,A=s??Ve(r??"");let y;Be(g,A)&&(y={id:g,type:K(A)});const m=y!=null?S((T=>q(T,y))):void 0,O=()=>{const T=ae(a.state?.pathnameStackToGoBack),f=T.poppedPathname??((C=2)=>{let I="../";for(let k=0;k<C;k++)I=`${I}../`;return I})(1);n(f,{state:{pathnameStackToGoBack:T.newStack}})};return{transactionId:y,onSaveVendor:()=>{o(we(y,void 0))},onSaveSuccess:()=>{if(m!=null&&m?.transaction&&m?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&m?.transactionDetailLocalData.vendorUpdates?.id!=null){const T=m?.transactionDetailLocalData.vendorUpdates,f={id:m?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:m?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:T?.name,qboId:m?.transactionDetailLocalData.vendorUpdates?.qboId??""},C={transactionId:{id:m?.transaction?.id,type:m?.transaction?.type},transaction:m?.transaction,lineIds:m?.transaction?.lines?.map((I=>I.id))??[]};o(Y({entity:f,amount:m?.transaction?.amount.amount,transactionDetails:C,flowType:"detail",isFetchCOT:c}))}O()},onCancel:()=>{y!=null&&o(ct({transactionId:y})),o(Ue()),o(it()),t(!0),O()}}},aa=Ze((function(t,e){const s=q(t,e.selectedTransaction);let a;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=xe.getSignedInUser(),o=t.tenantState.currentTenantId,c={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(a=dt(t,e.entity,"TransactionDetail"));const r=t.entityAutoCompleteState.autoCompleteText.common,p=ut(t,"common"),g=Q(t);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${te}/transaction_attachment`,transactionAttachmentsEndpointToFetch:g.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${te}/transaction_attachments_accounting_provider`:`${te}/transaction_attachments`,attachmentUploadEndpoint:`${zt.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:a,analytics:Fe,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:r,entityAutoCompleteView:p},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}}),(function(t,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(t(M("common")),e.onBackClick!=null)return void e.onBackClick();const a=ae(e.location.state?.pathnameStackToGoBack),n=a.poppedPathname??Le(2);e.navigate(n,{state:{pathnameStackToGoBack:a.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(a,n)=>{e.transaction!=null&&t(wt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:a,customerId:n}))},onTransactionClick:a=>{e.resetTrendIsFetchedStates(),t(se()),t(ce());const n=ne(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Ne(a,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:a=>{if(a==null)e.defaultTrendTransactionTimePeriod!=null&&t(ye(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=a.currentTimePeriod==null?a.addTimePeriod:{startDate:a.addTimePeriod.startDate,endDate:a.currentTimePeriod.endDate};t(ie(e.entity,"TransactionDetail",{timeframe:a.timeframe,timePeriod:a.addTimePeriod})),t(ye(e.entity,"TransactionDetail",{timeframe:a.timeframe,timePeriod:n}))}},onSaveUpdates:(a,n,o,c)=>{t(c===!0&&o!=null?we(a,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):Ut({transactionId:a,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),t(M("common"))},onUploadAttachmentAttachment:a=>{t(Ot(a))},onDeleteAttachment:a=>{e.transaction!=null&&t(At(a,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(a,n)=>{t(kt({transactionId:a,transactionLocalData:n}))},onUpdateAllChecked:(a,n,o,c)=>{e.transaction!=null&&t(Ct(e.selectedTransaction,e.transaction,a,n,o,c))},onResetLineItemsCategoryClassInLocalData:(a,n,o,c,r,p)=>{t(Dt(a,n,o,c,r,p))},onChangeCategoryClassWhenUpdateAllIsChecked:(a,n)=>{e.transaction!=null&&t(It({id:e.transaction.id,type:e.transaction.type},e.transaction,a,n))},onSaveSuccess:()=>{const a=ae(e.location.state?.pathnameStackToGoBack);if(a.poppedPathname!=null){const n=qt(a.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${Wt(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${Kt(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(_e(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(a,n)=>{a.trim().length>=2?t(vt({searchString:a,entityType:n,searchOrigin:"common"})):a.trim().length===0&&t(M("common"))},onCancelAutoComplete:()=>{t(M("common"))}},onFetchRecommendationsForEntity:(a,n,o,c)=>{t(Y({entity:a,amount:n,transactionDetails:o,flowType:"detail",isFetchCOT:s}))},clearRecommendationForLineId:a=>{const{transactionId:n,transaction:o,lineId:c}=a;t(Et(n,o,c))},resetUpdateErrorState:()=>{const a={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(bt(a))},onSaveVendorInLocalData:(a,n,o,c,r)=>{if(t(Tt({transactionId:a,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&c!=null&&r!=null&&t(Y({entity:o,amount:c,transactionDetails:r,flowType:"detail",isFetchCOT:s})),t(Oe({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const p=e.transaction,g=ne(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(p.type??"")}/${p.id}/vendor/create`,{state:{pathnameStackToGoBack:g}})}},onSaveCustomerInLocalData:(a,n,o,c,r)=>{t(gt({transactionId:a,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&c!=null&&r!=null&&t(Y({entity:o,amount:c,transactionDetails:r,flowType:"detail",isFetchCOT:s}))},onUpdateAllTranactionsWithCurrentVendorChecked:a=>{t(St({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:a}))},onClickUpdateVendorToAllLineItems:(a,n,o)=>{t(yt(a,n,o))},onResetVendorToAllLineItems:(a,n,o)=>{t(ht(a,n,o))},saveLatestSelectedEntity:(a,n,o)=>{t(ft({transactionId:a,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(a,n)=>{t(pt(a,n))},setIsVendorUpdateAllChecked:(a,n,o)=>{t(mt(a,n,o))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?a=>Xt(t,a):void 0}}))(Lt);function ya(){const t=Te(),e=W(),s=ge(),{useFeatureGate:a,useDynamicConfig:n}=H(),o=Vt(),c=S((d=>Q(d))),r=c.userRole.includes("charge_card_user")||c.userRole.includes("charge_card_admin"),p=c.userRole!=null&&Ee(c.userRole),g=c.userRole!=null&&ve(c.userRole),{isFeatureEnabled:A}=a(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:y}=a(_.isExpenseAutomationEnabled),{configValue:m}=n(Pe.enableUncategorizedExpenseCategory),O=m?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:T,transactionTypeEncoded:f,transactionId:C}=be(),[I,k]=i.useState(!1),b=Ve(f??""),U=Be(C,b),x=S((d=>d.transactionVendorViewState)),B=re(),{isFeatureEnabled:z}=a(_.isTransactionCommentingEnabled),{isFeatureEnabled:G}=a(_.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:N}=a(_.isProjectsTransactionsEnabled),P=o?.currentTenant?.companyId,R=o?.currentTenant?.companyName,v=i.useMemo((()=>{if(U)return{id:C,type:K(b)}}),[U,C,b]),l=v!=null?S((d=>q(d,v))):void 0,j=l?.transactionDetailLocalData.vendorUpdates?.id!=null?x.editVendorStateById[l?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",D=l?.fetchState==="Completed"?Re(l?.transaction):void 0,F=S((d=>D!=null?Ie(d.customerIncomeState,d.vendorExpenseState,d.trendState,D,"month"):void 0)),h=S((d=>oe(d))),E=S((d=>D!=null?De(d.trendWithTransactionsState,D,"TransactionDetail"):void 0)),u=c.company?.companyInfo.firstMonthOfFY??1,$=S((d=>Ce(d.accountState,d.accountListState,"accountList"))),[Z,J]=i.useState(!1),[L,le]=i.useState(!1),[ze,de]=i.useState(!1),Ge=i.useCallback((d=>Ne(d,T??"")+s.search),[T,s.search]),je=i.useCallback((()=>{de(!1)}),[]);ea({currentTransactionId:v,enabled:T!=null&&T!=="",buildPath:Ge,beforeNavigate:je,navigate:t,navigateState:s.state});const ue=()=>{J(!1),le(!1)},me=Bt();Ht();const X=i.useRef(l?.transaction);X.current=l?.transaction;const $e=l?.transactionDetailUpdateStatus?.fetchState,V=Jt($e,(()=>{const d=[];if(X.current!=null)for(const ee of X.current.lines??[])"account"in ee&&ee.account?.accountId!=null&&d.push(ee.account.accountId);return d}));i.useEffect((()=>{v!=null&&l!=null&&l.fetchState==="Not-Started"&&(e(_e(v,!1)),ue())}),[e,v,l?.fetchState]),i.useEffect((()=>{if(v!=null&&l?.fetchState==="Error"){const d=ne(s.state?.pathnameStackToGoBack,s.pathname);t("page-not-found",{replace:!0,state:me?{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:d,message:"pageNotFound",origin:"transaction_detail"}})}}),[v,l?.fetchState,t,s.state,s.pathname,me]),i.useEffect((()=>{ze||l==null||l.transaction==null||(e(ke({id:l.transaction.id,type:l.transaction.type})),de(!0)),D==null&&l?.fetchState==="Completed"&&Se(l?.transaction),D!=null&&(!r||p&&g===!1)&&(Z?L||F==null||(le(!0),e(ie(D,"TransactionDetail",{timeframe:"month",timePeriod:E?.selectedPeriod?.timePeriod??F}))):(e(se()),e(ce()),Se(l?.transaction),J(!0),e(Ae(D))))}),[l?.fetchState,l?.transaction,F,r]),i.useEffect((()=>{h.newVendorState?.vendorDetailLocalData?.vendorName!=null?k(!0):k(!1)}),[h.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e(M("common"))}),[]);const Me=[f,C].filter((d=>d!=null)),{transactionId:pe,onSaveVendor:We,onSaveSuccess:Ke,onCancel:qe}=ta({closeDrawerHandler:d=>{k(!1),t(d?"../":"../..")}}),{isAiCfoAccessEnabled:He,onAskAiCfoClick:Je}=Mt({mobileExploreReferrer:"Transaction Details"});return Nt({isDataReady:l?.fetchState==="Completed"}),U?w.jsxs(w.Fragment,{children:[pe!=null&&I&&w.jsx(Qt,{isOpen:I,transactionId:pe,onSaveVendor:We,onSaveSuccess:Ke,onCancel:qe}),w.jsx(aa,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:l?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:T,location:s,navigate:t,selectedTransaction:v,entity:D,isCOTEnabled:B,defaultTrendTransactionTimePeriod:F,resetTrendIsFetchedStates:ue,transaction:l?.transaction,uncategorizedAccounts:$,vendorSaveStatus:j,isVendorBulkUpdateOnTransactionEnabled:A,isCreateTransferEntryFromExpenseEnabled:G,isExpenseAutomationEnabled:y,isUncategorizedExpenseCategoryEnabled:O,isAiCfoAccessEnabled:He,onAskAiCfoClick:Je,isTransactionCommentingEnabled:z,isProjectsTransactionsEnabled:N,companyId:P,companyName:R}),V.showPopup&&V.popupType!=null&&w.jsx(Rt,{popupType:V.popupType,currencySymbol:V.currencySymbol,accountId:V.popupAccountId??"",accountName:V.popupAccountName??"",onSubmit:V.handleSubmit,onDismiss:V.handleDismiss})]}):w.jsx(Qe,{to:Le(Me.length)})}const Le=(t=2)=>{let e="../";for(let s=0;s<t;s++)e=`${e}../`;return e},Se=t=>{if(t!=null){const{transactionCategory:e,transactionClass:s}=na(t),a=oa(t);Fe.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,e.length>0?e:void 0,s.length>0?s:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((n=>n.fileName)))}},na=t=>{const e=[],s=[];return t.lines?.forEach((a=>{switch(a.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=a;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}})),{transactionCategory:e,transactionClass:s}},oa=t=>rt(t)===!0?t.customer?.name??"":lt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{Qt as C,ya as T,Ht as a,Jt as b,ta as c,aa as d,ea as e,re as f,Xt as g,ha as u};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-BBLi67DG.js";import{h as F,g as B,u as L,i as O,j as g,N as D,n as N,o as Te,p as k}from"./core-D2KaS3N5.js";import{cr as G,eZ as E,QI as U,GJ as ae,fY as H,Gr as ne,QK as we,GM as ke,QG as be,QH as se,QW as je,EQ as Ae,uu as Ee,QM as ve,H3 as De,QJ as re,cV as Z,yN as oe,fE as Fe,fG as Be,RV as Le,RW as Ue,Gs as Me,RX as Pe,Gt as Re,GC as Ve,bs as Oe,bJ as Ne,cC as Ge,bK as _e,cq as ze,bt as $e,Mh as Qe,cp as He}from"./zeni-epic-state-BJ_gdj7r.js";import{e as _,ar as Ze,z as A,C as z,f as b,ch as Ke,ci as We,cj as Q,K,y as Je,_ as qe,a0 as Xe,A as ie,d as v,F as Ye,B as et,ck as tt,au as W,r as at,cl as nt,p as J,cm as st,V as X,cn as rt,i as ot}from"./index-CivdpZRT.js";import{D as it,n as P,S as ct}from"./mui-C1ThRyKO.js";import lt from"./NotFoundScreen-BeJq256C.js";import{S as Y}from"./SetupPagesScreen-DqGd8bGY.js";import{a as p}from"./sentry-DW4kKH26.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-CNoSipqI.js";import{u as dt}from"./useInitialThreadRequest-UA6eH2dj.js";import{u as pt}from"./useCashManagementBanner-COk5CYpf.js";import{M as ce}from"./MobileAppDrawer-O95nPlSQ.js";import{F as mt}from"./FeaturePreviewScreen-C_bWMNSt.js";import{a as ee}from"./analyticsHelper-DqO64pHt.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.js";import"./routePaths-TRamKMNj.js";import"./BusinessVerificationPageScreen-BohezKn6.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="83f6d6b6-1b6f-4c05-baa7-dbbc341b8b4d",t._sentryDebugIdIdentifier="sentry-dbid-83f6d6b6-1b6f-4c05-baa7-dbbc341b8b4d")}catch{}})();const ft=N((function(t,a){const{companyId:n}=a;return{treasurySetupView:U(t,n),analytics:b}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(we(s))}}}))(Ke);function yt(){const t=F(),a=B(),n=L(),{tenantEmailDomain:r}=O(),m=_(),s=g((w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=Ze(s),o=G(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,I]=p.useState(!1),[c,l]=p.useState(!1),S=g((w=>E(w))),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,x=A.getSignedInUser(),h=g((w=>U(w,y))),T=g((w=>w.treasurySetupViewState.fetchState)),C=g((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),R=g((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||T!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,T,y,n]),p.useEffect((()=>{c||R!=="Not-Started"||y==null||(l(!0),n(H()))}),[c,R,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(I(!0),n(ne()))}),[d,C,y,n]),p.useEffect((()=>{f==="In-Progress"&&s==="Completed"&&t("../")}),[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const M=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!M&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:M,isReadOnly:!o,treasurySetupView:h,analytics:b})]})}const gt=N((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:U(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(We),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=L(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,I]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>be(C))),T=g((C=>U(C,x)));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(H()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(I(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(gt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:T,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(b,"review",h.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=P.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,xt={overlayWidth:new Ye(100,100,48)},Ct=N((function(t,a){const n=re(t),{companyId:r}=a;return{treasuryDetail:n,treasurySetupView:U(t,r),downloadEndPoint:`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:r,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:o}=a,{tenantEmailDomain:u}=r;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let d="page-not-found";i==="editPortfolio"?d=It(u):i==="statements"?d=Tt(u):i==="taxLetter"?d=wt(u):i==="settings"&&(d=kt(u));const I=at(m.state?.pathnameStackToGoBack,m.pathname);n(d,{state:{pathnameStackToGoBack:I}})},onColumnSortConfigChanged:(i,d)=>{t(Le({uiState:{sortKey:i,sortOrder:d}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(o?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${u}/checking/cash_management`)}}}))(tt);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),r=F(),m=L(),s=K(),f=Je(),o=g((j=>E(j))),{tenantEmailDomain:u}=O(),i=o.companyId??A.getSignedInUserTenant(u)?.companyId,[d,I]=p.useState(!1),c=g((j=>re(j))),l=c.fetchState,S=c.accountSummary?.totalBalance?.amount,y=g((j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),x=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),T=!!o.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,C=G(h?.loggedInUserRoleMap),R=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:M}=qe();p.useEffect((()=>{l==="Not-Started"&&!d&&M&&(I(!0),m(oe(!0)))}),[d,m,l,M]),p.useEffect((()=>{c.transactionsFetchState.fetchState==="Completed"&&c.transactions.length===0&&!n.pathname.includes("transfer")&&C&&r("./transfer")}),[c.transactionsFetchState.fetchState,c.transactions.length]);const w=()=>{r("..")},[le,ue]=p.useState(!1),q=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=ut({mobileExploreReferrer:"Treasury"});Xe({isDataReady:l==="Completed"});const me=pt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(v.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(v.isCashManagementFeatureEnabled),Se=dt(i,{clearParams:l==="Completed"&&y?.fetchState==="Completed"}),xe=Fe(o),Ce=Be(fe,o);if(xe===!0&&Ce!==!0)return e.jsx(mt,{});if(x){const j=y?.fetchState!=="Completed"||c.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[c.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:xt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(bt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(ht,{isFirstTransfer:c.transactions.length===0||S===0}):null,a===!0?e.jsx(yt,{}):null]})}),e.jsxs(St,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:q}),e.jsx(Ct,{treasuryDetailsView:c,isAutoTransferRuleEnabled:ye,navigate:r,currentTenant:o,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:q,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return T&&C?e.jsx(D,{to:"../setup"}):o.companyTreasuryInfo?.info&&!T&&R?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,kt=t=>`/${t}/treasury/setup`,bt=P(ct)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,jt=P.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function At(){const t=F(),a=L(),n=K(),r=B(),m=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Ue(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),a(Me(!1)))}),[s,o.fetchState,a]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access statements page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(jt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:I,statementListView:o,isLoading:c,onBackClick:()=>{const l=J(r.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Et=P.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function vt(){const t=F(),a=K(),n=B(),r=L(),m=`${W.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),o=g((l=>Pe(l)));p.useEffect((()=>{s||o.fetchState!=="Not-Started"||(f(!0),r(Re(!1)))}),[s,o.fetchState,r]);const u=A.getSignedInUser(),i=g((l=>E(l))),d={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(u==null)throw Error("Can't access tax letter page without signing in...");const c=o.fetchState!=="Completed";return e.jsx(Et,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:I,taxLetterListView:o,isLoading:c,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),S=l.poppedPathname??"..";t(S,{state:{pathnameStackToGoBack:l.newStack}})},authParams:d,downloadEndPoint:m})})}const Dt=N((function(t,a){const{companyId:n}=a,r=U(t,n);return{treasurySetupView:r,isSetupComplete:r.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}}),(function(t,a){const{navigate:n,companyId:r}=a;return{onSetupButtonClick:()=>{t(Ve(r))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}}))(rt),Ft=()=>{const t=F(),a=B(),n=L(),{tenantEmailDomain:r}=O(),[m,s]=p.useState(!1),f=g((h=>E(h))),[o,u]=p.useState(!1),i=g((h=>h.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{o||i?.fetchState!=="Not-Started"||d==null||(u(!0),n(H()))}),[i,n]);const d=A.getSignedInUserTenant(r)?.companyId??f.companyId,I=A.getSignedInUser(),c=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=h=>{s(h)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const S=_(),y=G(S?.loggedInUserRoleMap),x=Z(S?.loggedInUserRoleMap);if(c&&y)return e.jsx(D,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!c&&y||x)){if(a.state?.message==="activation"){const h=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:h.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:h=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(h)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:l}),e.jsx(Dt,{analytics:b,navigate:t,companyId:d,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=P.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function na(){const t=B(),a=g((T=>E(T))),{useFeatureGate:n}=ie(),r=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=Z(s?.loggedInUserRoleMap),o=a?.userRole!=null&&Oe(a?.userRole),u=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!o)&&Ne(s?.loggedInUserRoleMap),i=Ge(s?.loggedInUserRoleMap),d=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!o)&&_e(s?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!o&&ze(s?.loggedInUserRoleMap),c=r&&!o&&G(s?.loggedInUserRoleMap),{isFeatureEnabled:l}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=n(v.isDebitCardFeatureEnabled),y=ot(a,l,S)&&!o&&$e(s?.loggedInUserRoleMap),x=Qe(s?.loggedInUserRoleMap),h=He(s?.loggedInUserRoleMap);return e.jsxs(Te,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:u,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:d,isZeniAccountAdminLevelAccess:I,isChargeCardAdminLevelAccess:y,isTreasuryAdminLevelAccess:c,isUserHasOnlyCardAccess:x,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Ft,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(vt,{})}),r?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),c?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):m&&c?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{na as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-BBLi67DG.js";import{a as f}from"./sentry-DW4kKH26.js";import{t as u,u as h,j as y,N as I}from"./core-D2KaS3N5.js";import{MA as b,fC as w,BD as j}from"./zeni-epic-state-BJ_gdj7r.js";import{z as l,B as x,I as S,J as D}from"./index-CivdpZRT.js";import{n as p}from"./mui-C1ThRyKO.js";import"./recharts-jHFM5Sob.js";import"./analytics-C2MbRoEp.js";import"./plaid-Do7hhR27.js";import"./dnd-D-AkKI2c.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz6JZ58r.js";import"./lexical-BQ-Po3YF.js";import"./pdf-2k8d7AeQ.js";import"./utils-DIwqH7uj.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]="27a79230-81f1-45de-b2df-a2159cb7590d",e._sentryDebugIdIdentifier="sentry-dbid-27a79230-81f1-45de-b2df-a2159cb7590d")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(g(!0),a(j(t,c,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,_=p(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{W as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-BBLi67DG.js";import{a as m}from"./sentry-DW4kKH26.js";import{h as x,u as j,g as B,i as L,j as p}from"./core-D2KaS3N5.js";import{Ly as s,Lx as T,RT as $,eZ as v,RU as C}from"./zeni-epic-state-BJ_gdj7r.js";import{K as z,au as g,y as D,z as E,B as P,cg as U,p as N}from"./index-CivdpZRT.js";import{n as _}from"./mui-C1ThRyKO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="01479181-75e3-47f3-9fb4-5812fa73ef8e",e._sentryDebugIdIdentifier="sentry-dbid-01479181-75e3-47f3-9fb4-5812fa73ef8e")}catch{}})();const G=_.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function q(){const e=x(),n=j(),d=z(),f=B();let{accountId:a}=L(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=m.useState(!1),h=D();m.useEffect((()=>{u||(y(!0),n(T(a??"",!1)))}),[u,n]);const o=p((t=>$(t,a??""))),I=()=>{const t=N(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),i=p((t=>v(t))),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=C(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(G,{windowSize:d,children:c.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{q as Z};
|