@zeniai/web-app-ui 5.0.53-dev → 5.0.54-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-DTMsA7Yj.js +1 -0
- package/dist/assets/AddressScreen-CcaxSfVo.js +9 -0
- package/dist/assets/{AiCfoScreen-BZewpLje.js → AiCfoScreen-B5lAePrp.js} +2 -2
- package/dist/assets/{BillPayApprovalRoutes-CJR4AuBS.js → BillPayApprovalRoutes-DPnfb8zl.js} +1 -1
- package/dist/assets/{BillPayRoutes-DnKnqkZc.js → BillPayRoutes-BBZidA16.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CIapP8vT.js → BusinessVerificationPageScreen-BhuG90mr.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-C_dKBRuF.js → ChargeCardRoutes-DX76xSoe.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CO0ra3b3.js → CompanyPassportScreen-DpH624sQ.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BzFFitvW.js → ConnectionAuthScreen-BX7Pa_YN.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C1yW7Iny.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DAfAcoCp.js → CustomerOnboardingRoutes-B8wYKuDN.js} +1 -1
- package/dist/assets/DashboardRoutes-DGhgHRhk.js +20 -0
- package/dist/assets/{DefaultTenantHome-CoIL9zlW.js → DefaultTenantHome-CoxCqmlf.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DmlqBc99.js → DomesticWireDetailScreen-Dvg1eLYN.js} +3 -3
- package/dist/assets/DrawerScreen-B-sRWR4S.js +1 -0
- package/dist/assets/{EntityDetailRoutes-BUJ_kkZN.js → EntityDetailRoutes-D1XR-owB.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BeIoMNyV.js → ExpenseAutomationRoutes-BsYvzSsm.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-CCz00Z1b.js +1 -0
- package/dist/assets/{MagicLinkRoutes-Qs5jpSqt.js → MagicLinkRoutes-Bu7hVADb.js} +21 -21
- package/dist/assets/MagicLinkSignInScreen-DsDVQQsC.js +12 -0
- package/dist/assets/{MobileAppDrawer--t6IvFv1.js → MobileAppDrawer-BQOESYmo.js} +1 -1
- package/dist/assets/NotFoundScreen-C8VJaibs.js +1 -0
- package/dist/assets/{NotificationRoutes-sTDUm3UC.js → NotificationRoutes-CAjZQlzL.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DzntFAmM.js +1 -0
- package/dist/assets/{PeopleRoutes-tT0eCYuT.js → PeopleRoutes-_9Hs8cVl.js} +5 -5
- package/dist/assets/PerformanceRoutes-CTkbM-C6.js +1 -0
- package/dist/assets/{Preview-6f9LxPkS.js → Preview-By4v_mKm.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DUGBXHYt.js → QBOConnectionScreen-B-MlUjKI.js} +1 -1
- package/dist/assets/ReferralListScreen-RMa3rgwl.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-VgH79DJX.js → ReimbursementApprovalRoutes-BfuW7QsT.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-COa1H9AX.js → ReimbursementApprovalRuleDetailScreen-CKkTHOgV.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B1ZkkbHf.js → ReimbursementRoutes-FPCDfDNQ.js} +4 -4
- package/dist/assets/ReportsRoutes-yAN3M1vB.js +1 -0
- package/dist/assets/RewardsRoutes-C_kw-ByV.js +1 -0
- package/dist/assets/ScreenRoutes-DDOPHzW7.js +2 -0
- package/dist/assets/{SettingsRoutes-BxKE1ve9.js → SettingsRoutes-C6DKlWjz.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CQlX6aNj.js → SetupPagesScreen-BBerJQI5.js} +1 -1
- package/dist/assets/SignInScreen-C7QqxJ8Y.js +1 -0
- package/dist/assets/SignOutScreen-CB1LomnI.js +9 -0
- package/dist/assets/{TaskListScreen-Bgae74H_.js → TaskListScreen-CDIu8qtm.js} +2 -2
- package/dist/assets/TaskRoutes-A-CziYUE.js +9 -0
- package/dist/assets/TransactionDetailRoutes-DL0DiNI5.js +1 -0
- package/dist/assets/{TransactionDetailScreen-PaWtkTEH.js → TransactionDetailScreen-D0bGNbu6.js} +2 -2
- package/dist/assets/{TransactionListRoutes-DHWR3aVx.js → TransactionListRoutes-3wrw7u3L.js} +1 -1
- package/dist/assets/{TreasuryRoutes-NSgI8Cqk.js → TreasuryRoutes-CsXQXXp2.js} +5 -5
- package/dist/assets/{VendorsRoutes-pV_XlyDs.js → VendorsRoutes-C3O2vhe9.js} +1 -1
- package/dist/assets/WiseConfirmationScreen-CwR-EPA8.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-CKJA4fI8.js → ZeniAccountRoutes-D7JUPZxy.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-OSIiPbP1.js +9 -0
- package/dist/assets/{accountMappingHelper-Blov7ltS.js → accountMappingHelper-CczsFzU8.js} +1 -1
- package/dist/assets/{analytics-DMOhZ7ep.js → analytics-i6vOjy-6.js} +1 -1
- package/dist/assets/{analyticsHelper-CcQrbJpT.js → analyticsHelper-Dd3idKMc.js} +1 -1
- package/dist/assets/{core-BpuExePz.js → core-BsJxSguc.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BRoMr-Xr.js → decodeURIComponentSafe-Bp5j7gGB.js} +1 -1
- package/dist/assets/{dnd-Ool1WkEK.js → dnd-BqCDXelY.js} +1 -1
- package/dist/assets/{empty-BBb-0fG-.js → empty-D5Oa0fhU.js} +1 -1
- package/dist/assets/{empty-BUF0u-3V.js → empty-D9Z_gqRM.js} +1 -1
- package/dist/assets/{emptyVideoElement-Uzds3hpE.js → emptyVideoElement-D41eczF_.js} +1 -1
- package/dist/assets/{epic-CrZKkaDL.js → epic-sKmWpqZI.js} +1 -1
- package/dist/assets/getLocaleForTenant-BdkMpp_Q.js +1 -0
- package/dist/assets/{index-64WyzcEc.js → index-AkOyjrrT.js} +1 -1
- package/dist/assets/{index-CPMhopDR.js → index-B0mC9t-Y.js} +2 -2
- package/dist/assets/{index-6Rjzb8Pu.js → index-BTUjigpK.js} +1 -1
- package/dist/assets/{index-Cx6RZ5wc.js → index-BkCVhoyD.js} +1 -1
- package/dist/assets/{index-DidLjpq0.js → index-C_W1h50m.js} +14432 -14396
- package/dist/assets/{index-B2-OsYcb.js → index-DaBhzNLK.js} +1 -1
- package/dist/assets/{index-CiibyDuy.js → index-DfgLrt7Q.js} +1 -1
- package/dist/assets/{lexical-9B5gs5tG.js → lexical-DEnPiQ42.js} +1 -1
- package/dist/assets/{liveblocks-3WpI1obg.js → liveblocks-UD7liCcn.js} +1 -1
- package/dist/assets/{lottie-DFxKNIfK.js → lottie-Ct3047c5.js} +1 -1
- package/dist/assets/{mui-Bpme9BmU.js → mui-DnnuWLRL.js} +1 -1
- package/dist/assets/{pathToGoBack-JibONr5D.js → pathToGoBack-C1WhhbQW.js} +1 -1
- package/dist/assets/{pdf-CAA7iyNe.js → pdf-DUV5M5M4.js} +4 -4
- package/dist/assets/{pdf-lib-CRl3mCcE.js → pdf-lib-BVxjensB.js} +1 -1
- package/dist/assets/{plaid-CTMaHWW7.js → plaid-BQcpbHIu.js} +1 -1
- package/dist/assets/{pusher-By_9ihm6.js → pusher-DcJourS6.js} +1 -1
- package/dist/assets/{react-Df7GsDYV.js → react-BDwASVQ9.js} +1 -1
- package/dist/assets/{react-DMWTUnLu.js → react-CBkwrldV.js} +1 -1
- package/dist/assets/{react-CyvOMBtf.js → react-CCYPhKs0.js} +1 -1
- package/dist/assets/{react-CHKpQfw4.js → react-D0p9gUgD.js} +1 -1
- package/dist/assets/{react-B9l5xNkw.js → react-D2poDKQT.js} +1 -1
- package/dist/assets/{react-C9RjToco.js → react-DHcpugZ0.js} +1 -1
- package/dist/assets/{recharts-D5_tB-NC.js → recharts-ColGXU81.js} +1 -1
- package/dist/assets/{routePaths-D7d1SJs7.js → routePaths-TGpk-uov.js} +1 -1
- package/dist/assets/{sentry-z6zkwC0R.js → sentry-BMtgafda.js} +1 -1
- package/dist/assets/{url-C-EF6k4f.js → url-Bl7RYhJD.js} +1 -1
- package/dist/assets/{url-CVCmlGqq.js → url-BwBwNsXX.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-C2sPakGi.js +1 -0
- package/dist/assets/{useDeviceId-C8t7Lzes.js → useDeviceId-otTlvlMz.js} +1 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js +1 -0
- package/dist/assets/{useInitialThreadRequest-C2mjRKeW.js → useInitialThreadRequest-BUEtuoP8.js} +1 -1
- package/dist/assets/{utils-Cb7KsPLv.js → utils-BlFIrWFi.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-C5hIBso3.js → withTransactionSidePanel-DcrBlKeK.js} +2 -2
- package/dist/assets/{zeni-epic-state-RQBIdQMH.js → zeni-epic-state-xHyXPoIL.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-D2DRkabM.js +0 -1
- package/dist/assets/AddressScreen-Dz7dukxj.js +0 -9
- package/dist/assets/CustomerOnboardingAuthScreen-D-b9p5yP.js +0 -1
- package/dist/assets/DashboardRoutes-D-Yad_Gu.js +0 -20
- package/dist/assets/DrawerScreen-Ojlk_glq.js +0 -1
- package/dist/assets/FeaturePreviewScreen-XMp6Ks_m.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-C7anMkyc.js +0 -12
- package/dist/assets/NotFoundScreen-DwnzoLJU.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-C7spTjMj.js +0 -1
- package/dist/assets/PerformanceRoutes-CK0d_z0a.js +0 -1
- package/dist/assets/ReferralListScreen-Cf0Eqtgm.js +0 -5
- package/dist/assets/ReportsRoutes-DE0ZO7KW.js +0 -1
- package/dist/assets/RewardsRoutes--KPLXTbA.js +0 -1
- package/dist/assets/ScreenRoutes-DjE90VcS.js +0 -2
- package/dist/assets/SignInScreen-CjjSOtbr.js +0 -1
- package/dist/assets/SignOutScreen-Cff_01TR.js +0 -9
- package/dist/assets/TaskRoutes-BFnfWd1X.js +0 -9
- package/dist/assets/TransactionDetailRoutes-BqiPhNjn.js +0 -1
- package/dist/assets/WiseConfirmationScreen-ryAAdtIC.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BoeVpxsO.js +0 -9
- package/dist/assets/getLocaleForTenant-CjnKm7X5.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-D5Yjge45.js +0 -1
- package/dist/assets/useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-UD7liCcn.js";import{j as K,h as Z,u as H,l as Q,g as d,k as X,n as ee,o as C}from"./core-BsJxSguc.js";import{eN as M,qf as v,pP as ae,J8 as $,pK as y,bv as te,bn as se,bR as oe,pL as re,J9 as ne,IV as T,dB as ie,tC as ce,Ja as le,tZ as de,eT as me,eR as fe}from"./zeni-epic-state-xHyXPoIL.js";import{K as pe,z as ue,M as he,A as ge,a as w,p as N,y as Fe,d as B,aj as be,s as Ie}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import Ce from"./NotFoundScreen-C8VJaibs.js";import{F as Te}from"./FeaturePreviewScreen-CCz00Z1b.js";import{a as h}from"./sentry-BMtgafda.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import{c as Ae}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{u as Se}from"./useInitialThreadRequest-BUEtuoP8.js";import{t as ke}from"./routePaths-TGpk-uov.js";import{M as xe}from"./MobileAppDrawer-BQOESYmo.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="604d62c1-c027-45ce-a8a6-2bca61ff094b",s._sentryDebugIdIdentifier="sentry-dbid-604d62c1-c027-45ce-a8a6-2bca61ff094b")}catch{}})();const A=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(y(e)),A(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const g=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(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 f=ke(a.tenantEmailDomain,e.accountId,e.accountType,g,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(f,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(T({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(be);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=K(),o=Z(),r=H(),{forecastId:i,tenantEmailDomain:g}=Q(),[f,p]=h.useState(!1),[F,S]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),q=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>x.pandLByForecastID[t]!=null&&re(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=he();Ae({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:_}=ye({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!f&&b)p(!0),l||o(ae());else if(l&&!F){S(!0);const t=((m,R,P)=>R!=null?m.forecasts.findIndex(I=>I.id===R):P!=null?m.forecasts.findIndex(I=>I.id===P):m.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o($(c.forecasts[t].id,t)),A(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&A(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&b&&o(y(c.forecasts[t].id))}},[f,p,o,l,c,F,S,v,y,b]);const L=ge(),V=L?.loggedInUserRole!=null&&te(L.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:E}=W(N.isReportsCommentingEnabled),Y=Se(E?k?.companyId:void 0,{clearParams:l&&F}),[J,z]=h.useState(!1),O=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:B,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(xe,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:q,tenantEmailDomain:g,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Ze(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(N.isDebitCardFeatureEnabled),o=me(e,s),r=fe(s);return o===!0||r===!0?n.jsx(Te,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-UD7liCcn.js";import{J3 as oe,eN as X,jq as H,eT as Q,eR as ie,GE as Y,II as re,sK as ke,J4 as q,sy as Pe,sT as je,sN as le,sC as de,sR as Te,sO as Le,J5 as ce,uo as ve,J6 as Fe,fw as Ae,J7 as K,sH as pe,sF as ue,sW as Oe,c0 as Re}from"./zeni-epic-state-xHyXPoIL.js";import{q as me,a as ee,p as E,z as W,a4 as ge,G as fe,af as he,ag as Ve,E as Ce,o as A,I as be,D as ye,ah as Ue,M as Be,K as Ze,y as $e,d as we,f as Ge,s as Ke,ai as _e,A as ze}from"./index-C_W1h50m.js";import{D as Se,n as M,S as De}from"./mui-DnnuWLRL.js";import te from"./NotFoundScreen-C8VJaibs.js";import{a as l}from"./sentry-BMtgafda.js";import{h as se,l as He,g,j as We,u as Me,k as Je,n as ne,o as G}from"./core-BsJxSguc.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import{c as qe}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{M as Xe}from"./MobileAppDrawer-BQOESYmo.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.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]="d8cf1fcc-628d-48ab-8b77-3a3dccfb09ac",e._sentryDebugIdIdentifier="sentry-dbid-d8cf1fcc-628d-48ab-8b77-3a3dccfb09ac")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},_=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),{userId:S}=He(),c=g(t=>oe(t)),m=g(t=>X(t)),D=g(t=>H(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=Q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(q()),y()},F=()=>{O===!0?w(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return l.useEffect(()=>{x===!1&&S!=null&&u(ke(S))},[x,S]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:_.discardTitle}),descriptionComponent:s.jsx(Ee,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=M(De)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`,xe=
|
|
5
|
+
`,xe=M(be.H6Regular)`
|
|
6
6
|
margin-top: ${A.sp7};
|
|
7
7
|
padding-left: ${A.sp8};
|
|
8
8
|
padding-right: ${A.sp8};
|
|
9
9
|
color: ${e=>e.theme.colors.primary};
|
|
10
10
|
word-break: break-word;
|
|
11
|
-
`,Ee=
|
|
11
|
+
`,Ee=M(be.LargeRegularSp)`
|
|
12
12
|
color: ${e=>e.theme.colors.hero};
|
|
13
13
|
padding-left: ${A.sp8};
|
|
14
14
|
padding-right: ${A.sp8};
|
|
15
15
|
margin-bottom: 30px;
|
|
16
16
|
margin-top: ${A.sp4};
|
|
17
17
|
white-space: pre-line;
|
|
18
|
-
`,ss={overlayWidth:new Ce(100,100,48)},z=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:
|
|
18
|
+
`,ss={overlayWidth:new Ce(100,100,48)},z=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,w]=l.useState(!1),S=g(r=>oe(r)),c=g(r=>X(r)),m=g(r=>H(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=Q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(q())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:Z}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=D(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:B,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(f==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(q()))},[S.invitePersonState.fetchState]),s.jsx(Se,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:z.discardTitle}),descriptionComponent:s.jsx(Ee,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=M(De)`
|
|
19
19
|
display: flex;
|
|
20
20
|
min-height: 100%;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,ns=
|
|
22
|
+
`,ns=Je(function(e,n){const d=ce(e),o=W.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:we}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:f}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(K({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(K({searchText:i}))}}}})(_e);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=We(),o=se(),f=Me(),{areTenantIdsInSync:i}=Be(),y=W.getSignedInUser(),h=g(a=>X(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>H(a)),k=!Q(O,h)&&R,w=Y(h),S=h?.tenantId,{tenantEmailDomain:c}=h,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:B}=Ze(),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:$}=Ne({isAiCfoOpen:F,setIsAiCfoOpen:B,mobileExploreReferrer:"People"}),p=g(a=>ce(a));qe({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=h?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,S,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:we,onLoad:a=>a.trackPageLoaded(Ge.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,J)=>{o(K({sortKey:a,sortOrder:J}))},onRowClick:a=>{const J=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=Ke(f.state?.pathnameStackToGoBack,f.pathname);d(J,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:Z,onAskAiCfoClick:$})]})}function Es(){const e=ze();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(G,{path:"/",element:s.jsx(N,{})}),s.jsx(G,{path:"new",element:s.jsx(N,{isInvitePeopleDrawerOpen:!0})}),s.jsx(G,{path:":userId/edit",element:s.jsx(N,{isEditPeopleDrawerOpen:!0})}),s.jsx(G,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(G,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-UD7liCcn.js";import _ from"./NotFoundScreen-C8VJaibs.js";import{a as o}from"./sentry-BMtgafda.js";import{j as v,u as M,g,l as U,h as P,N as z,k as K,n as N,o as h}from"./core-BsJxSguc.js";import{eN as V,OK as b,bo as B,bn as F,h6 as H,gC as $}from"./zeni-epic-state-xHyXPoIL.js";import{x as q,z as C,K as G,cs as J}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{M as W}from"./MobileAppDrawer-BQOESYmo.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.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]="ac16838f-0848-46a0-ae93-1d095a9ad3b0",e._sentryDebugIdIdentifier="sentry-dbid-ac16838f-0848-46a0-ae93-1d095a9ad3b0")}catch{}})();const X=K(function(e){const t=C.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:r,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),r=g(a=>V(a)),{aggregatedReportViewState:n}=g(a=>b(a)),{tenantEmailDomain:m}=U(),p=P(),l=C.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=o.useRef(!1),[I,S]=o.useState(!1),k=B(r?.userRole??[]),w=r?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),A=k||w||x,d=o.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);o.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=o.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),y=o.useCallback((a,i)=>{d(a,i,!1)},[d]),u=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),A?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:I,handleDrawerToggle:u}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:r,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:y,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ce(){return s.jsxs(N,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{Ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-BMtgafda.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-UD7liCcn.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BMtgafda.js";import{L as dt,bR as Tc,eN as Ac,Ij as Rc,I$ as kl,c0 as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-xHyXPoIL.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-BlFIrWFi.js";import{r as un}from"./empty-D5Oa0fhU.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BVxjensB.js";import{r as Gl}from"./index-DfgLrt7Q.js";import{r as zl}from"./index-DaBhzNLK.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-BsJxSguc.js";import{u as Kl,z as Pc,L as Wl,U as Jl,V as Xl,j as Ql,d as tf}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import{d as Pe}from"./decodeURIComponentSafe-Bp5j7gGB.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="5e424db1-bbc4-4f6d-9d32-4300082e8b74",t._sentryDebugIdIdentifier="sentry-dbid-5e424db1-bbc4-4f6d-9d32-4300082e8b74")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-UD7liCcn.js";import{a as o}from"./sentry-BMtgafda.js";import{g as f,j as N,h as V,u as W,k as F}from"./core-BsJxSguc.js";import{h as _,q as z,z as R,b2 as U,E as $,M as q,K,y as X,d as l,f as Z,a1 as G,b3 as Q}from"./index-C_W1h50m.js";import{eX as J,eN as Y,Ly as I,Lz as ee,ts as ae,ti as g,eZ as re,bM as ne,tn as se,LA as te}from"./zeni-epic-state-xHyXPoIL.js";import{D as oe,e as ie,n as le,S as de}from"./mui-DnnuWLRL.js";import{u as ce}from"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{M as ue}from"./MobileAppDrawer-BQOESYmo.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]="36eff736-a15d-46dc-a53f-1bb4f45e6812",e._sentryDebugIdIdentifier="sentry-dbid-36eff736-a15d-46dc-a53f-1bb4f45e6812")}catch{}})();const pe={overlayWidth:new $(100,100,30)},we=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=_(),n=z();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>J(d));return t.jsx(oe,{anchor:"right",open:e,PaperProps:{style:{width:pe.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:t.jsx(ie,{in:e,direction:"left",children:t.jsx(ge,{onClick:d=>d.stopPropagation(),children:t.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ge=le(de)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,P="refer-and-earn-status-update",ke=F(function(e){const a=I(e),r=e.referralViewState.rewardsPlanFetchState,n=ne([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(te({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(se(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===P&&e(g(!0,!0))}}})(G(Q));function Pe({isReferralDrawerOpen:e}){const a=N(),r=V(),n=W(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,A]=o.useState(!1),[k,C]=o.useState(!1),p=R.getSignedInUser(),h=f(s=>Y(s)),m=f(s=>I(s)),b=m.fetchState,w=f(s=>s.referralViewState.rewardsPlanFetchState),y=ee([m,w]),{areTenantIdsInSync:c}=q();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(ae()),A(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),r(g(!0)))},[b,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(re(!0)))},[w,r,c]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[E,j]=o.useState(!1),v=s=>{j(s)},{isAiCfoOpen:O,setIsAiCfoOpen:L}=K(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=ce({isAiCfoOpen:O,setIsAiCfoOpen:L,mobileExploreReferrer:"Rewards"});fe({isDataReady:y===!0});const M={events:p?.userId!=null?[`private-${p.userId}.${P}`]:[],eventCallback:(s,S,H)=>{H.onEventReceived(s)}};return t.jsxs(t.Fragment,{children:[y===!0?t.jsx(X,{analytics:l,onLoad:s=>(S=>{p!=null&&S.trackPageLoaded(Z.Event.rewardsPageViewed)})(s)}):null,t.jsx(ue,{isAppContentDrawerOpen:E,handleDrawerToggle:v}),k===!0?t.jsx(we,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,t.jsx(ke,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...M})]})}export{Pe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-UD7liCcn.js";import R from"./NotFoundScreen-C8VJaibs.js";import{a as p}from"./sentry-BMtgafda.js";import{j as x,u as C,h as A,g as u,N as E,k,n as D,o as c}from"./core-BsJxSguc.js";import{eN as T,Ms as g,MI as S,Cp as V,By as U,Co as m,Cf as _,MX as B}from"./zeni-epic-state-xHyXPoIL.js";import{h as M,z as N,B as $,a1 as O,bI as W,aa as z}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-CKkTHOgV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="8bc8b1a8-d9d0-4e15-9f9e-06a5f43b4c3b",e._sentryDebugIdIdentifier="sentry-dbid-8bc8b1a8-d9d0-4e15-9f9e-06a5f43b4c3b")}catch{}})();const d="reimbursement-approval-rule-update",P=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:n=>{n.endsWith(d)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:n=>{e(_(n))},onEditRuleClick:n=>{n!=null?(e(m(n)),a(`./${n}/edit`)):(e(m()),a("./new"))}}})(O(W)),X=()=>{const e=x(),r=C(),a=A(),[l,n]=p.useState(!1),[f,y]=p.useState(!1),b=u(s=>s.remiSetupApproverViewState.fetchState),o=u(s=>T(s)),w=M(),i=u(s=>g(s)),h=u(s=>S(s).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(n(!0),a(U(!0)))},[l,b,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${d}`]:[],eventCallback:(s,q,I)=>{s.endsWith(d)&&I.onApprovalRulesEventReceived(s)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx($,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(P,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(c,{path:"/",element:t.jsx(X,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-UD7liCcn.js";import{a as y}from"./sentry-BMtgafda.js";import{j as w,h as A,u as C,l as T,g as b,k as U}from"./core-BsJxSguc.js";import{MI as R,Ms as E,Ci as x,Cr as _,Cp as S,Cq as h,MJ as B}from"./zeni-epic-state-xHyXPoIL.js";import{z as k,h as V,B as j,bz as F,aa as O}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.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]="f365dc0b-f143-456b-a827-b32eaa25d66f",e._sentryDebugIdIdentifier="sentry-dbid-f365dc0b-f143-456b-a827-b32eaa25d66f")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const f=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!$(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=D.concat(I);f.push({action:c.stepType.selectedOption,actors:v,operator:v.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function G(){const e=w(),a=A(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-3WpI1obg.js";import{j as J,h as me,u as V,l as Y,g as B,N as _,k as K,i as ut,n as pt,o as E}from"./core-BpuExePz.js";import{eN as q,MY as ce,c0 as de,Bt as De,jB as bt,BG as se,BF as ie,MZ as gt,bn as ue,fH as Fe,M_ as ht,Jk as ft,jq as Ue,Jl as ye,Jm as St,ik as It,Me as At,iA as yt,Bh as Rt,s6 as Ct,is as kt,C1 as Le,M$ as Ne,N0 as vt,N1 as Et,N2 as Bt,N3 as wt,N4 as xt,BN as Re,iG as Tt,Mn as jt,BH as Dt,Br as Ft,N5 as Ut,Bq as Lt,N6 as Nt,Bz as Ce,BR as Mt,BQ as Pt,BM as $t,N7 as Me,GE as _t,bo as Ot,BC as Gt,Cj as zt,N8 as Ht,N9 as Zt,BZ as Wt,BW as ke,LJ as Vt,Bo as qt,Na as Pe,CI as ve,CQ as Jt,Nb as Kt,Nc as Z,Nd as Qt,Ne as $e,Nf as Xt,Ng as _e,Nh as Oe,C9 as oe,bt as Yt,bE as pe,cA as be,eT as Ge,eR as ze,Ni as en,gC as tn,LW as nn,Nj as an,Nk as He,L_ as sn,MI as on,Nl as rn,MX as ln,CN as Ee,CM as mn,Nm as cn,Nn as dn,No as un,Np as pn,Nq as bn,Mt as gn,CD as hn,CH as fn,bv as Sn,bD as In,cv as An,cj as yn,bs as Rn,Il as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-RQBIdQMH.js";import{w as Ze,q as We,a as ee,d as k,G as ge,z as P,bJ as Ve,x as te,e as v,aC as Be,o as F,ao as X,E as wn,D as qe,bK as xn,s as W,bL as Tn,A as ne,bM as jn,I as Dn,y as Fn,B as he,g as Je,a1 as Un,ba as Ln,N as Nn,h as Ke,bN as Mn,a4 as Pn}from"./index-DidLjpq0.js";import{n as O,S as $n}from"./mui-Bpme9BmU.js";import re from"./NotFoundScreen-DwnzoLJU.js";import{S as we}from"./SetupPagesScreen-CQlX6aNj.js";import{F as Qe}from"./FeaturePreviewScreen-XMp6Ks_m.js";import{a as h}from"./sentry-z6zkwC0R.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-D5Yjge45.js";import{u as Xe}from"./useInitialThreadRequest-C2mjRKeW.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js";import{D as _n}from"./DrawerScreen-Ojlk_glq.js";import{M as et}from"./MobileAppDrawer--t6IvFv1.js";import{R as On}from"./ReimbursementApprovalRoutes-VgH79DJX.js";import{FallBackRoute as Gn}from"./ScreenRoutes-DjE90VcS.js";import"./recharts-D5_tB-NC.js";import"./analytics-DMOhZ7ep.js";import"./plaid-CTMaHWW7.js";import"./dnd-Ool1WkEK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DFxKNIfK.js";import"./lexical-9B5gs5tG.js";import"./pdf-CAA7iyNe.js";import"./utils-Cb7KsPLv.js";import"./analyticsHelper-CcQrbJpT.js";import"./routePaths-D7d1SJs7.js";import"./BusinessVerificationPageScreen-CIapP8vT.js";import"./ReimbursementApprovalRuleDetailScreen-COa1H9AX.js";import"./getLocaleForTenant-CjnKm7X5.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]="ae314e35-f50a-4379-a52b-1cd27b9276fe",e._sentryDebugIdIdentifier="sentry-dbid-ae314e35-f50a-4379-a52b-1cd27b9276fe")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let A=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(A=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,y=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:y},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:A,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Re(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(Re("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(vt());const i=tt(o),l=W(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(At())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(ye("common"))},onCancelAutoComplete:()=>{e(ye("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=V(),{reimbursementId:r}=Y(),c=Ze(),d=We(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:y}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:y,mobileExploreReferrer:"Reimbursement Details"}),C=V().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Xe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,A,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(_,{to:R}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Wn,{}):null,m&&d!=="small"?s.jsx(Vn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=O.div`
|
|
1
|
+
import{j as s}from"./liveblocks-UD7liCcn.js";import{j as J,h as me,u as V,l as Y,g as B,N as _,k as K,i as ut,n as pt,o as E}from"./core-BsJxSguc.js";import{eN as q,MY as ce,c0 as de,Bt as De,jB as bt,BG as se,BF as ie,MZ as gt,bn as ue,fH as Fe,M_ as ht,Jk as ft,jq as Ue,Jl as Re,Jm as St,ik as It,Me as At,iA as Rt,Bh as yt,s6 as Ct,is as kt,C1 as Le,M$ as Ne,N0 as vt,N1 as Et,N2 as Bt,N3 as wt,N4 as xt,BN as ye,iG as Tt,Mn as jt,BH as Dt,Br as Ft,N5 as Ut,Bq as Lt,N6 as Nt,Bz as Ce,BR as Mt,BQ as Pt,BM as $t,N7 as Me,GE as _t,bo as Ot,BC as Gt,Cj as zt,N8 as Ht,N9 as Zt,BZ as Wt,BW as ke,LJ as Vt,Bo as qt,Na as Pe,CI as ve,CQ as Jt,Nb as Kt,Nc as Z,Nd as Qt,Ne as $e,Nf as Xt,Ng as _e,Nh as Oe,C9 as oe,bt as Yt,bE as pe,cA as be,eT as Ge,eR as ze,Ni as en,gC as tn,LW as nn,Nj as an,Nk as He,L_ as sn,MI as on,Nl as rn,MX as ln,CN as Ee,CM as mn,Nm as cn,Nn as dn,No as un,Np as pn,Nq as bn,Mt as gn,CD as hn,CH as fn,bv as Sn,bD as In,cv as An,cj as Rn,bs as yn,Il as Cn,cL as kn,cN as vn,cM as En,cu as Bn}from"./zeni-epic-state-xHyXPoIL.js";import{x as Ze,q as We,a as ee,p as k,K as ge,z as P,bJ as Ve,y as te,d as v,aC as Be,o as F,ao as X,G as wn,D as qe,bK as xn,s as W,bL as Tn,A as ne,bM as jn,M as Dn,E as Fn,B as he,f as Je,a1 as Un,ba as Ln,R as Nn,h as Ke,bN as Mn,a4 as Pn}from"./index-C_W1h50m.js";import{n as O,S as $n}from"./mui-DnnuWLRL.js";import re from"./NotFoundScreen-C8VJaibs.js";import{S as we}from"./SetupPagesScreen-BBerJQI5.js";import{F as Qe}from"./FeaturePreviewScreen-CCz00Z1b.js";import{a as h}from"./sentry-BMtgafda.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import{u as Xe}from"./useInitialThreadRequest-BUEtuoP8.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{D as _n}from"./DrawerScreen-B-sRWR4S.js";import{M as et}from"./MobileAppDrawer-BQOESYmo.js";import{R as On}from"./ReimbursementApprovalRoutes-BfuW7QsT.js";import{FallBackRoute as Gn}from"./ScreenRoutes-DDOPHzW7.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.js";import"./analyticsHelper-Dd3idKMc.js";import"./routePaths-TGpk-uov.js";import"./BusinessVerificationPageScreen-BhuG90mr.js";import"./ReimbursementApprovalRuleDetailScreen-CKkTHOgV.js";import"./getLocaleForTenant-BdkMpp_Q.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]="22dbc8d6-1821-4474-bc22-760bdbc9cbaf",e._sentryDebugIdIdentifier="sentry-dbid-22dbc8d6-1821-4474-bc22-760bdbc9cbaf")}catch{}})();const tt=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=qe.getLocalizedStrings(),Hn=K(function(e,t){const n=t.currentTenant?.companyId,r=gt(e.plaidAccountViewState,"user_reimbursement_account"),c=P.getSignedInUser(),d=ue(c),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),u=ht(e,c?.userId??"");let A=`${c?.firstName} ${c?.lastName}`,I=!0;t.reimbursementId!=null&&(A=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,I=c?.userId===l.createdBy?.userId);const x=e.entityAutoCompleteState?.autoCompleteText?.common,R=ft(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:x,entityAutoCompleteView:R},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:A,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:u.bankAccountCreationState,bankAccounts:u.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:I,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,u)=>{i!=null&&e(ie(i,l,u,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ce(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Mt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ce(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Nt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Lt(l,i,n))},updateReimbursementType:(i,l,u)=>{e(Ut({reimbursementId:u,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,u)=>{e(Ft({reimbursementId:u,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Dt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(jt({data:l}))},onFetchBankName:i=>{e(Tt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(xt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(wt({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Bt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(Et({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Ne()),e(vt());const i=tt(o),l=W(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Le(n)))},onSaveBankAccount:()=>{a?.userId&&e(kt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Ct("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(yt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(It({fetchState:"Not-Started"})),e(At())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(St({searchString:i,entityType:l,searchOrigin:"common"})):e(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(xn);function xe(){const e=J(),t=me(),n=V(),{reimbursementId:r}=Y(),c=Ze(),d=We(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isReimbursementCommentingEnabled),{isAiCfoOpen:x,setIsAiCfoOpen:R}=ge(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:p}=fe({isAiCfoOpen:x,setIsAiCfoOpen:R,mobileExploreReferrer:"Reimbursement Details"}),C=V().pathname,D=C.includes("edit"),N=C.includes("reimbursement/new"),[G,j]=h.useState(!1),w=P.getSignedInUser(),S=B(g=>q(g)),b=B(g=>ce(g,r)),M=Xe(S?.companyId,{clearParams:b.fetchState==="Completed"}),U=de(S?.userRole??[]);h.useEffect(()=>{(N&&!G||D&&b.fetchState!="Completed"&&b.fetchState!="In-Progress")&&(j(!0),t(De(!1,u,A,r)))});const $=B(g=>bt(g.accountState,g.accountListState,"reimbursementAccountList"));if(w==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return b.isDeleted===!0||b.billStage=="paid"||b.billStage=="scheduled"||b.fetchState=="Not-Started"||U&&b.billStatus==="rejected"||U===!1&&b.billStage==="pending_approval"&&b.billStatus!=="rejected"?s.jsx(_,{to:y}):b.deleteStatus.fetchState==="In-Progress"||b.fetchState!=="Completed"?s.jsx(Ve,{isNewReimbursement:r==null}):s.jsxs(Zn,{windowSize:d,children:[s.jsx(te,{analytics:v,onLoad:g=>(ae=>{r!=null&&b.deleteStatus.fetchState!=="Completed"&&ae.trackReimbursementEditReimbursement(r)})(g)}),m&&d!=="small"?s.jsx(Wn,{}):null,m&&d!=="small"?s.jsx(Vn,{children:s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&d==="small"?s.jsxs(qn,{children:[s.jsx(Jn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(Be,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:S?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:g=>{g!=null&&t(ie(g,a,!0,r,w?.userId))},updateInvoiceUploadFetchState:g=>{t(se({reimbursementId:r,fetchState:g}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Kn,{windowSize:d,children:s.jsx(Hn,{initialOpenThreadRequest:M??void 0,isReimbursementCommentingEnabled:I,location:n,navigate:e,currentTenant:S,reimbursementId:r,themeState:c,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:p})})]})}const Zn=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-3WpI1obg.js";import{j as J,h as me,u as V,l as Y
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Qn=K(function(e,t){const n=Me(e,t.reimbursementId),r=P.getSignedInUser(),c=ue(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Ne());const a=tt(o),i=W(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(qt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ke(n,a.type,"")):e(ke(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=W(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Wt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Xn(){const e=J(),t=me(),n=V(),r=n.hash.substring(1),c=Ze(),{reimbursementId:d}=Y(),m=P.getSignedInUser(),o=B(
|
|
56
|
+
`,Qn=K(function(e,t){const n=Me(e,t.reimbursementId),r=P.getSignedInUser(),c=ue(r),d=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ht(n.remiActivities,Zt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:c,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Ue(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Ne());const a=tt(o),i=W(c.state?.pathnameStackToGoBack,c.pathname);d(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(qt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ke(n,a.type,"")):e(ke(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=W(c.state?.pathnameStackToGoBack,c.pathname);d("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Le(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Wt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(Tn);function Xn(){const e=J(),t=me(),n=V(),r=n.hash.substring(1),c=Ze(),{reimbursementId:d}=Y(),m=P.getSignedInUser(),o=B(y=>q(y)),a=B(y=>Me(y,d??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Xe(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoOpen:u,setIsAiCfoOpen:A}=ge(),{isAiCfoAccessEnabled:I,onAskAiCfoClick:x}=fe({isAiCfoOpen:u,setIsAiCfoOpen:A,mobileExploreReferrer:"Reimbursement Details"});Ye({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:R}=ee(),{isFeatureEnabled:T}=R(k.isLimitedCategoryForReimbursement),[p,C]=h.useState(!1),[D,N]=h.useState(!1),[G,j]=h.useState(!1),{isFeatureEnabled:w}=R(k.isReimbursementCommentingEnabled),{isFeatureEnabled:S}=R(k.isShowDeletedReimbursementsFeatureEnabled),b=B(y=>ce(y,d??"")),M=_t(o),U=Ot(o.userRole),$=a.fetchState;if(h.useEffect(()=>{p||d==null?p==1&&$==="Error"&&e("page-not-found",{replace:!0}):(C(!0),t(Gt(d,!1,S)))},[p,d,t,$]),h.useEffect(()=>{S&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&M===!1?j(!1):j(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(U||a.allApprovers.find(y=>y.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,U,o.isZeni,M,m]),h.useEffect(()=>{D||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||b.fetchState=="Completed"||b.fetchState=="In-Progress"||(N(!0),t(De(!1,T,S,d)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(zt(!1,!0,!0,a.lastUpdatedByUserId)))},[D,a,d,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(_,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&b.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(Ve,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:y=>(g=>{d!=null&&g.trackReimbursementReimbursementDetails(d)})(y)}),s.jsx(Qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:w,isShowDeletedReimbursementEnabled:S,location:n,navigate:e,isRealTimeApprovalEnabled:G,currentTenant:o,reimbursementId:d??"",themeState:c,isAiCfoAccessEnabled:I,onAskAiCfoClick:x})]})}const Yn=K(function(e,t){return{remisReviewView:Pe(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(Z())},onCloseReviewItem:n=>{e(Kt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Jt());break;case"approve":e(ve("approved",r??""));break;case"reject":e(ve("rejected",r??""))}}}})(jn);function ea(){const e=J(),t=B(d=>d.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=B(d=>Pe(d)),r=ne(),c=r?.loggedInUserRole?.includes("admin")===!0;return h.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(Yn,{navigate:e,analytics:v,isAdmin:c})}const H=sn(),nt="bulk-operation-update",le="reimbursement-approval-rule-update",{spendManagement:ta,common:Te}=qe.getLocalizedStrings(),je=ta.reimbursement.bulkActions,na=O.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-3WpI1obg.js";import{j as J,h as me,u as V,l as Y
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,aa=K(function(e,t){const n=Oe(e,H,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=ue(c),m=e.tenantState.currentTenantId,o=q(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(I=>I!=="deleted"));const u=n.fetchState,A=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(I=>I.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:u,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:H,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:A.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e($e(o))},onSubtabChange:o=>{e(Z()),e(_e(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=W(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=W(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=W(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ee("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ee("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(ln(!1))},onEventReceived:o=>{o===nt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=ge(),n=J(),r=me(),c=V(),d=c.state,m=We(),[o,a]=h.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const f=Qt(d.tab.toString());f!=null?r($e(f)):console.log("Warning:Not a valid remiListTab");const z=Xt(d.subTab.toString());z!=null?r(_e(z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(Z())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(k.isReimbursementCommentingEnabled),{isFeatureEnabled:
|
|
64
|
+
`,aa=K(function(e,t){const n=Oe(e,H,t.isBulkActionEnabled);let r=n.allSubTabs;const c=P.getSignedInUser(),d=ue(c),m=e.tenantState.currentTenantId,o=q(e),a=o?.companyName??"",i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(I=>I!=="deleted"));const u=n.fetchState,A=on(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(I=>I.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:d,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:u,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:H,spendManagementEndPoint:`${Nn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:A.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:c,period:d}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(Z()),e($e(o))},onSubtabChange:o=>{e(Z()),e(_e(o))},onTransactionClick:(o,a)=>{const i=oa(m,o,a),l=W(c.state?.pathnameStackToGoBack,c.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=ia(m),a=W(c.state?.pathnameStackToGoBack,c.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=W(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(bn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(pn(o))},onFiltersChange:o=>{e(un({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(dn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(d,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(cn(o))},removeAllTransactionsFromBulkActionList:()=>{e(Z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(mn(o,a??""));break;case"send_for_approval":e(Ee("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ee("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(ln(!1))},onEventReceived:o=>{o===nt&&e(rn())}}})(Un(Ln));function sa(){const{isAiCfoOpen:e,setIsAiCfoOpen:t}=ge(),n=J(),r=me(),c=V(),d=c.state,m=We(),[o,a]=h.useState(null),i=ut("/:tenantEmailDomain/reimbursements/bulk-review")!=null;h.useEffect(()=>{if(d?.tab!=null&&d?.subTab!=null){const f=Qt(d.tab.toString());f!=null?r($e(f)):console.log("Warning:Not a valid remiListTab");const z=Xt(d.subTab.toString());z!=null?r(_e(z)):console.log("Warning:Not a valid remiListSubTab")}return()=>{r(Z())}},[]);const{useFeatureGate:l}=ee(),{isFeatureEnabled:u}=l(k.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:A}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:I}=l(k.isBillPayCommentingEnabled),{isFeatureEnabled:x}=l(k.isReimbursementCommentingEnabled),{isFeatureEnabled:R}=l(k.isReimbursementBulkActionEnabled),T=P.getSignedInUser(),p=B(f=>q(f)),[C,D]=h.useState(!1),[N,G]=h.useState(!1),j=ne(),w=j?.loggedInUserRole?.includes("admin")===!0,S=B(f=>Oe(f,H,R)),{areTenantIdsInSync:b}=Dn(),M=S.fetchState,{isAiCfoAccessEnabled:U,onAskAiCfoClick:$}=fe({isAiCfoOpen:e,setIsAiCfoOpen:t,mobileExploreReferrer:"Reimbursement List"});if(Ye({isDataReady:M==="Completed"}),h.useEffect(()=>{!N&&b&&(G(!0),r(oe(H,!0,A,!1,!0)))},[N,H,r,b]),T==null)throw Error("Can't access address page without signing in...");const y=!!p?.userRole&&Yt(p),g=pe(j?.loggedInUserRoleMap),ae=be(j?.loggedInUserRoleMap),at=!!p.userReimbursementInfo?.isReimbursementTOSAccepted,st=!!p.companyReimbursementInfo?.info?.isReimbursementEnabled,it=!!p.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ot=B(f=>Fe(f.companyState,p.companyId)),rt=ot?.company.featuresActivationInfo.connectedAccountProvider,Se=f=>{D(f)},{isFeatureEnabled:lt}=l(k.isDebitCardFeatureEnabled),mt=Ge(lt,p),ct=ze(p),{remisProcessed:Q,remisProcessing:Ie}=B(f=>en(f));h.useEffect(()=>{Q===Ie&&o!=null&&(r(tn({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:Q>1?je.reports:je.report},{variableName:"_has_",variableValue:Q>1?Te.texts.have:Te.texts.has},{variableName:"_action_",variableValue:nn(o)}]})),r(an()),setTimeout(()=>{r(oe(H,!0,A,!1,!0,!0))},3e3),a(null))},[Q,Ie]);const dt={events:p.companyId!=null?[`private-${p.companyId}.${nt}`,`private-${p.companyId}.${le}`]:[],eventCallback:(f,z,Ae)=>{f.endsWith(le)?Ae.onReimbursementApprovalRulesEventReceived?.(f):z.entity_type==="reimbursement"&&(a(z.operation_type),Ae.onEventReceived(f))}};return c.pathname.endsWith("/reimbursements/")||c.pathname.endsWith("/reimbursements")||c.pathname.endsWith("/reimbursements/bulk-review")?mt===!0||ct===!0?s.jsx(Qe,{}):st&&(!y||g)||ae&&at?s.jsxs(s.Fragment,{children:[M==="Completed"?s.jsx(te,{analytics:v,onLoad:f=>(z=>z.trackPageLoaded(Je.Event.reimbursementHome))(f)}):null,s.jsx(et,{isAppContentDrawerOpen:C,handleDrawerToggle:Se}),s.jsxs(na,{windowSize:m,children:[s.jsx(_n,{isOpen:i,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{n("./"),r(Z())},children:s.jsx(ra,{onClick:f=>f.stopPropagation(),children:s.jsx(ea,{})})}),s.jsx(aa,{isShowDeletedBillsEnabled:u,isShowDeletedReimbursementEnabled:A,isBillPayCommentingEnabled:I,isReimbursementCommentingEnabled:x,location:c,navigate:n,currentTenant:p,period:H,isAdmin:w,isEmployee:y,entity:"reimbursement",onClickMenuIcon:()=>{Se(!0)},createdByUserList:S.createdByUserList,createdByUserListFetchState:S.createdByUserListFetchState,isDownloadEnabled:S.isDownloadEnabled,connectedAccountProvider:rt,isBulkActionEnabled:R,bulkSubmissionLimit:S.remiBulkSubmissionLimit,bulkSubmissionFetchState:S.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:U,onAskAiCfoClick:$,...dt})]})]}):it&&g?s.jsx(_,{to:"../setup"}):j!=null&&He(p,j.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(he,{fetchState:"In-Progress"}):s.jsx(re,{})}const ia=e=>`/${e}/reimbursements/setup`,oa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ra=O($n)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=V(),{tenantEmailDomain:n}=Y(),r=Ke(),[c,d]=h.useState(!1),m=B(C=>q(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),u=ne(),A=pe(u?.loggedInUserRoleMap),I=be(u?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,
|
|
68
|
+
`,la=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:gn(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(fn(n))},onCreateNewRemiButtonClick:()=>{e(hn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Mn),ma=()=>{const e=J(),t=V(),{tenantEmailDomain:n}=Y(),r=Ke(),[c,d]=h.useState(!1),m=B(C=>q(C)),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),u=ne(),A=pe(u?.loggedInUserRoleMap),I=be(u?.loggedInUserRoleMap),x=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,R=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,T=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,p=C=>{d(C)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return R&&I&&x?s.jsx(_,{to:"../../../reimbursements"}):T&&A?s.jsx(_,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!T||m.userReimbursementInfo&&I&&x===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:C=>(D=>D.trackPageLoaded(Je.Event.reimbursementPromoPage))(C)}),s.jsx(et,{isAppContentDrawerOpen:c,handleDrawerToggle:p}),s.jsx(la,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{p(!0)}})]}):s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function _a(){const e=B(y=>q(y)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ke(),c=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,d=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(k.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(k.isDebitCardFeatureEnabled),i=Ge(a,e),l=ze(e),u=e?.userRole!=null&&Sn(e?.userRole),A=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!u)&&In(t?.loggedInUserRoleMap),I=An(t?.loggedInUserRoleMap),x=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!u,R=pe(t?.loggedInUserRoleMap),T=x&&R,{isFeatureEnabled:p}=m(k.isDepositAccountsFeatureEnabled),C=p&&!u&&Rn(t?.loggedInUserRoleMap),D=Pn(e,o,a)&&!u&&yn(t?.loggedInUserRoleMap),N=Cn(t?.loggedInUserRoleMap),G=kn(t?.loggedInUserRoleMap),j=vn(t?.loggedInUserRoleMap),w=En(t?.loggedInUserRoleMap),S=Bn(t?.loggedInUserRoleMap),b=be(t?.loggedInUserRoleMap),{tenantEmailDomain:M}=Y(),U=V(),$=n===!0&&(R||b&&d);return s.jsxs(pt,{children:[U.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(we,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(we,{isBillPayAdminLevelAccess:A,isUserHasOnlyBillPayAccess:I,isReimbursementAdminLevelAccess:T,isZeniAccountAdminLevelAccess:C,isChargeCardAdminLevelAccess:D,isUserHasOnlyCardAccess:N,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(ma,{})}),s.jsx(E,{path:"approval-rules/*",element:T?s.jsx(On,{}):s.jsx(Gn,{isUserHasZeniAccountsAccess:G,isUserHasChargeCardAccess:w,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:b,isUserHasTreasuryAccess:j,isTenantBankingOnly:i,tenantEmailDomain:M??""})}),$&&s.jsx(E,{path:"*",element:s.jsx(sa,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Qe,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(_,{to:"../promo"})}),c&&R&&s.jsx(E,{path:"*",element:s.jsx(_,{to:"../setup"})})]}):U.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(xe,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Xn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(xe,{})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]}):s.jsx(E,{path:"*",element:s.jsx(he,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]})}export{_a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as p}from"./liveblocks-UD7liCcn.js";import{u as G,j as be,h as ye,l as Ie,g as d,k as Ce,n as ge,o as N}from"./core-BsJxSguc.js";import{eN as L,f7 as g,IG as Se,jq as Q,IH as W,pJ as A,je as we,ih as Re,t2 as Te,pO as Oe,bv as Ae,II as Fe,bn as ke,u5 as De,IJ as Ee,IK as Pe,s_ as je,t6 as Le,IL as H,IM as Me,IN as Be,IO as ve,IP as Ue,IQ as S,IR as F,IS as k,IT as Y,IU as D,IV as E,dB as Ve,tN as xe,tB as q,tC as $,tT as ze,tG as Z,tZ as Ge,IW as Ne,IX as He,IY as Ye,IZ as qe,I_ as $e,eT as Ze,eR as Je}from"./zeni-epic-state-xHyXPoIL.js";import{J as Ke,K as Qe,q as We,a as X,p as P,z as ee,M as Xe,A as ea,c as aa,y as sa,d as j,f as ta,s as ae,N as oa,O as na,R as ra}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import ia from"./NotFoundScreen-C8VJaibs.js";import{F as la}from"./FeaturePreviewScreen-CCz00Z1b.js";import{a as h}from"./sentry-BMtgafda.js";import{u as ca,a as da,b as pa,c as fa}from"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import{u as ma}from"./useInitialThreadRequest-BUEtuoP8.js";import{t as J,a as K}from"./routePaths-TGpk-uov.js";import{M as ua}from"./MobileAppDrawer-BQOESYmo.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.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]="0e8445e8-b52d-4bb1-8538-fb8359a32fb0",e._sentryDebugIdIdentifier="sentry-dbid-0e8445e8-b52d-4bb1-8538-fb8359a32fb0")}catch{}})();const _a=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ha=e=>{e(He()),e(Ye()),e(qe()),e($e())},ba=Ce(function(e){const o=ee.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:j,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${ra}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ne(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(I=>I!=="this_period_vs_same_period_last_year"&&I!=="this_period_vs_same_period_last_year_percent"&&I!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=ae(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(je()),o.isAccountingProjectsEnabled&&e(Le())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ha(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(oa);function ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=na(f),a=be(),s=ye(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:c}=X(),{isFeatureEnabled:m}=c(P.isReportsHorizontalClassLayoutSwitchEnabled),l=ee.getSignedInUser(),[i,I]=h.useState(!1),[M,se]=h.useState(!1),{isFeatureEnabled:B}=c(P.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>L(n)),te=v.company?.companyInfo.firstMonthOfFY??1,oe=ma(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),ne=d(n=>Se(n)),{areTenantIdsInSync:b}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>Q(n)),T=d(n=>W(n)),re=d(n=>g(n).isCompareModeOn),_=d(n=>g(n).filter),O=d(n=>g(n).selectedReportAndTimeframeFetchState),ie=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);h.useEffect(()=>{!i&&b&&(I(!0),s(A(l.userId,!0,!0,!1)))},[i,l,s,b]),h.useEffect(()=>{i&&!M&&C==="Completed"&&b&&(s(A(l.userId,!1,!0,!1)),se(!0))},[i,M,C,b]),h.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&_.timeframe!=="free_range"&&_.timeframe!=="week"&&b)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(_.timeframe));break;case"profit_and_loss_by_projects":T&&s(Te(_.timeframe));break;case"balance_sheet":s(Re(_.timeframe));break;case"cash_flow":s(we(_.timeframe))}},[i,R,O,b,U,T]);const V=ea(),le=V?.loggedInUserRole!=null&&Ae(V?.loggedInUserRole)!==!0,[ce,de]=h.useState(!1),x=n=>{de(n)},pe=aa(),fe=pa();return function(n){const{isDataReady:me}=n,{pathname:ue}=G(),z=Ke(ue??"")==="reports",_e=ca(me),he=h.useMemo(()=>z?_a:void 0,[z]);da({canFetchSuggestedQuestions:_e,pageContexts:he})}({isDataReady:C==="Completed"}),fa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(sa,{analytics:j,onLoad:n=>n.trackPageLoaded(ta.Event.reports)}):null,p.jsx(ua,{isAppContentDrawerOpen:ce,handleDrawerToggle:x}),p.jsx(ba,{firstMonthOfFY:te,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ie,selectedReportID:R,analytics:j,filter:_,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:re,hasTransactionAccess:le,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ne.reportsResyncFetchState,isAiCfoAccessEnabled:fe&&pe&&!e,onAskAiCfoClick:()=>{if(u){const n=ae(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:oe})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d(s=>L(s)),{useFeatureGate:o}=X(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(e);return u===!0||a===!0?p.jsx(la,{}):p.jsxs(ge,{children:[p.jsx(N,{path:"/",element:p.jsx(ya,{})}),p.jsx(N,{path:"*",element:p.jsx(ia,{})})]})}export{xa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-UD7liCcn.js";import{a as x,z as w,aI as y,y as E,d as p,f as F,cC as P,p as L}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import l from"./NotFoundScreen-C8VJaibs.js";import{a as f}from"./sentry-BMtgafda.js";import{h as T,g as b,j as V,u as A,k as R,n as U,o as d}from"./core-BsJxSguc.js";import{eN as z,Ph as C,M7 as Y,Pi as k,ts as q,eZ as G,Pj as M,tq as O}from"./zeni-epic-state-xHyXPoIL.js";import{R as j}from"./ReferralListScreen-RMa3rgwl.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.js";import"./useAskAiCfoHostNavButtonProps-C2sPakGi.js";import"./useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js";import"./MobileAppDrawer-BQOESYmo.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]="0856ebf0-c8ad-427e-9914-4a9ff405edc8",e._sentryDebugIdIdentifier="sentry-dbid-0856ebf0-c8ad-427e-9914-4a9ff405edc8")}catch{}})();const Z=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(k()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=b(i=>z(i)),c=V(),v=A(),{useDynamicConfig:g}=x(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=b(i=>C(i)),_=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:D}=g(y.zeniAccountsConfig),I=Y(D);f.useEffect(()=>{e(k()),r?.rewardsLastViewedTime==null&&o===!1&&(e(q()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const N=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:i=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:v,currentTenant:r,companyName:N,userName:_,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{ue as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DGhgHRhk.js","assets/sentry-BMtgafda.js","assets/core-BsJxSguc.js","assets/zeni-epic-state-xHyXPoIL.js","assets/index-C_W1h50m.js","assets/mui-DnnuWLRL.js","assets/analytics-i6vOjy-6.js","assets/utils-BlFIrWFi.js","assets/withTransactionSidePanel-DcrBlKeK.js","assets/useAskAiCfoHostNavButtonProps-C2sPakGi.js","assets/useFetchSuggestedQuestionsWhenReady-KQZwBlZC.js","assets/TransactionDetailScreen-D0bGNbu6.js","assets/decodeURIComponentSafe-Bp5j7gGB.js","assets/routePaths-TGpk-uov.js","assets/NotFoundScreen-C8VJaibs.js","assets/analyticsHelper-Dd3idKMc.js","assets/CompanyPassportScreen-DpH624sQ.js","assets/MobileAppDrawer-BQOESYmo.js","assets/FeaturePreviewScreen-CCz00Z1b.js","assets/ReferralListScreen-RMa3rgwl.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-BBZidA16.js","assets/AddressScreen-CcaxSfVo.js","assets/DomesticWireDetailScreen-Dvg1eLYN.js","assets/useInitialThreadRequest-BUEtuoP8.js","assets/DrawerScreen-B-sRWR4S.js","assets/SetupPagesScreen-BBerJQI5.js","assets/BusinessVerificationPageScreen-BhuG90mr.js","assets/BillPayApprovalRoutes-DPnfb8zl.js","assets/ReimbursementApprovalRuleDetailScreen-CKkTHOgV.js","assets/getLocaleForTenant-BdkMpp_Q.js","assets/ReimbursementRoutes-FPCDfDNQ.js","assets/ReimbursementApprovalRoutes-BfuW7QsT.js","assets/TransactionListRoutes-3wrw7u3L.js","assets/ZeniAccountStatementScreen-OSIiPbP1.js","assets/SettingsRoutes-C6DKlWjz.js","assets/accountMappingHelper-CczsFzU8.js","assets/QBOConnectionScreen-B-MlUjKI.js","assets/empty-D5Oa0fhU.js","assets/index-DfgLrt7Q.js","assets/url-BwBwNsXX.js","assets/index-DaBhzNLK.js","assets/ReportsRoutes-yAN3M1vB.js","assets/ChargeCardRoutes-DX76xSoe.js","assets/PeopleRoutes-_9Hs8cVl.js","assets/ExpenseAutomationRoutes-BsYvzSsm.js","assets/TreasuryRoutes-CsXQXXp2.js","assets/VendorsRoutes-C3O2vhe9.js","assets/pathToGoBack-C1WhhbQW.js","assets/ZeniAccountRoutes-D7JUPZxy.js","assets/AddressRoutes-DTMsA7Yj.js","assets/PandLWithForecastRoutes-DzntFAmM.js","assets/CustomerOnboardingRoutes-B8wYKuDN.js","assets/TransactionDetailRoutes-DL0DiNI5.js","assets/EntityDetailRoutes-D1XR-owB.js","assets/NotificationRoutes-CAjZQlzL.js","assets/PerformanceRoutes-CTkbM-C6.js","assets/RewardsRoutes-C_kw-ByV.js","assets/TaskRoutes-A-CziYUE.js","assets/TaskListScreen-CDIu8qtm.js","assets/AiCfoScreen-B5lAePrp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ik as hs,bv as js,Il as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as ys,Im as fs,In as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-xHyXPoIL.js";import{j as e}from"./liveblocks-UD7liCcn.js";import{a as v}from"./sentry-BMtgafda.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-BsJxSguc.js";import{h as ws,u as zs,z as R,a as Gs,c as $s,H as Ys,p as L,A as qs,L as B,D as he,t as _,P as Ws,d as X,l}from"./index-C_W1h50m.js";import"./mui-DnnuWLRL.js";import{f as je}from"./analyticsHelper-Dd3idKMc.js";import{t as Js}from"./getLocaleForTenant-BdkMpp_Q.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="5ab4eff7-9e9a-4e5d-9895-a8986e08f752",i._sentryDebugIdIdentifier="sentry-dbid-5ab4eff7-9e9a-4e5d-9895-a8986e08f752")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-DGhgHRhk.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:()=>n(()=>import("./BillPayRoutes-BBZidA16.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-FPCDfDNQ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-3wrw7u3L.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-C6DKlWjz.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-yAN3M1vB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DX76xSoe.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-_9Hs8cVl.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BsYvzSsm.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-CsXQXXp2.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-C3O2vhe9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-D7JUPZxy.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-yAN3M1vB.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-DTMsA7Yj.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-_9Hs8cVl.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DzntFAmM.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-B8wYKuDN.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-C3O2vhe9.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DL0DiNI5.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-D1XR-owB.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-DGhgHRhk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-BBZidA16.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-C6DKlWjz.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-FPCDfDNQ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-D7JUPZxy.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CsXQXXp2.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-3wrw7u3L.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DX76xSoe.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-CAjZQlzL.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-CTkbM-C6.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-BsYvzSsm.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-C_kw-ByV.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-A-CziYUE.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-B5lAePrp.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-C8VJaibs.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-CDIu8qtm.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,f,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&ys(A?.loggedInUserRoleMap),Qe=fs(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-UD7liCcn.js";import{a as u}from"./sentry-BMtgafda.js";import{j as T,u as R,h as P,g as m,k as B,l as _,n as W,o as x}from"./core-BsJxSguc.js";import{bn as Ie,eN as k,gv as ce,Kj as xe,IH as Ce,jq as le,lJ as Ae,gx as Ee,Kl as je,Kk as ke,MK as we,x3 as Pe,By as ve,Mj as Me,Ms as De,c0 as re,cF as Ue,cG as Te,Iw as Fe,ML as Re,Ix as Be,vv as _e,MM as Ve,DO as Oe,Be as Le,B5 as de,B2 as Ne,vz as ue,B8 as pe,Bb as ge,Bh as X,s6 as Y,vy as $e,j2 as q,j5 as me,MN as Ke,k6 as Ge,vO as ze,Je,Jf as Ze,j0 as He,MO as Qe,j3 as We,MP as qe,vL as Xe,MQ as Ye,MR as en,Bv as nn,eR as fe,eT as he,MS as tn,fv as an,II as sn,vK as te,fA as ae,fz as on,vJ as cn,fy as ln,fx as rn,MT as dn,eW as be,MU as un,MV as pn,vR as gn,vI as se,MW as mn,fc as fn,vF as hn,bT as bn,b$ as Sn,b_ as yn,bU as In,bY as xn,bX as Cn,bW as An,bZ as En,bV as jn}from"./zeni-epic-state-xHyXPoIL.js";import{a as ee,p as D,z as C,aa as Se,bA as kn,d as K,f as wn,A as V,B as ne,bB as Pn,bC as vn,al as Mn,j as ye,bD as Dn,bE as Un,bF as Tn,a4 as Fn,M as Rn,bG as Bn,s as _n,bH as Vn}from"./index-C_W1h50m.js";import{n as U}from"./mui-DnnuWLRL.js";import{M as v}from"./MobileAppDrawer-BQOESYmo.js";import{a as N,g as $,m as On}from"./accountMappingHelper-CczsFzU8.js";import{t as Ln,A as Nn}from"./AddressScreen-CcaxSfVo.js";import F from"./NotFoundScreen-C8VJaibs.js";import{g as $n}from"./analyticsHelper-Dd3idKMc.js";import{B as Kn}from"./BusinessVerificationPageScreen-BhuG90mr.js";import{C as Gn}from"./CompanyPassportScreen-DpH624sQ.js";import{q as oe}from"./QBOConnectionScreen-B-MlUjKI.js";import{B as zn}from"./BillPayApprovalRoutes-DPnfb8zl.js";import{R as Jn}from"./ReimbursementApprovalRoutes-BfuW7QsT.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.js";import"./routePaths-TGpk-uov.js";import"./empty-D5Oa0fhU.js";import"./pdf-lib-BVxjensB.js";import"./index-DfgLrt7Q.js";import"./url-BwBwNsXX.js";import"./index-DaBhzNLK.js";import"./decodeURIComponentSafe-Bp5j7gGB.js";import"./ReimbursementApprovalRuleDetailScreen-CKkTHOgV.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]="2ebac7fe-f869-4dcc-9152-7e555857ad78",e._sentryDebugIdIdentifier="sentry-dbid-2ebac7fe-f869-4dcc-9152-7e555857ad78")}catch{}})();const Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-UD7liCcn.js";import{j as X,u as Q,h as Y,l as G,g as E,N as M,k as W,q as Qe}from"./core-BsJxSguc.js";import{bD as Ye,cj as Ie,M7 as ye,eN as F,cv as en,xe as Z,x3 as nn,Mj as tn,Mm as an,pF as ee,pt as ne,j_ as te,rE as z,Mo as Ae,fz as $e,fy as Ge,fx as We,Mp as sn,xn as on,Be as ke,B5 as _e,B2 as ve,AV as K,B8 as Pe,Bb as Ee,Bh as we,s6 as Te,fO as cn,cq as rn,eT as un,eR as dn,eS as ln,bs as pn,Mq as mn,zX as le,Az as yn,Mr as fn,bE as gn,Cu as pe,By as Sn,Ms as bn,Mt as hn,Cy as Cn,CC as In,rx as An,GI as kn,D7 as Ce,E0 as me,Mu as _n,Mv as vn,Mw as Pn,Mx as He,My as En,J1 as wn,Lw as Tn,Jd as Dn,Mz as qe,MA as xe,Dl as Ke,k6 as Un,pw as Je,rG as On,bC as je,rS as Me,ct as Bn,MB as Xe,fb as xn,CR as Fn,CV as Vn,MC as jn,Da as Re,MD as Mn,ME as Rn,MF as zn,MG as Nn,fH as Ln,yy as Zn,MH as $n,yD as Gn,yC as Wn}from"./zeni-epic-state-xHyXPoIL.js";import{A as ae,a as ie,p as de,h as De,aI as J,z as T,y as se,d as w,B as Ue,f as $,bp as Hn,ao as oe,bq as V,br as qn,bs as Kn,aa as Ve,bt as Jn,s as ze,ap as Ne,q as Xn,E as Qn,bu as Yn,bv as et,bw as nt,a1 as tt}from"./index-C_W1h50m.js";import{a as C}from"./sentry-BMtgafda.js";import{n as Fe,D as at,S as it}from"./mui-DnnuWLRL.js";import{M as fe}from"./MobileAppDrawer-BQOESYmo.js";import R from"./NotFoundScreen-C8VJaibs.js";import{a as Le}from"./analyticsHelper-Dd3idKMc.js";import{c as Ze}from"./routePaths-TGpk-uov.js";import{B as Be}from"./BusinessVerificationPageScreen-BhuG90mr.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]="aaa1d96c-7c8f-41e2-9ee7-3d23ea388e44",e._sentryDebugIdIdentifier="sentry-dbid-aaa1d96c-7c8f-41e2-9ee7-3d23ea388e44")}catch{}})();const st=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as f}from"./liveblocks-UD7liCcn.js";import{a as u,b as T,q as A}from"./sentry-BMtgafda.js";import{h as D,j as z,g as c,u as j,N as M,k as O}from"./core-BsJxSguc.js";import{u as F,z as s,h as P,d as E,D as N,e as _,f as B,g as q,i as V,Q as $,j as v}from"./index-C_W1h50m.js";import{eN as G,Ij as J,Ik as Q,eO as R,fh as W,Ip as H,fG as K,cS as X,Iq as b,Ir as Y,Is as Z,bR as y}from"./zeni-epic-state-xHyXPoIL.js";import"./mui-DnnuWLRL.js";import{u as ee}from"./useDeviceId-otTlvlMz.js";import{f as te}from"./analyticsHelper-Dd3idKMc.js";import{t as ne}from"./getLocaleForTenant-BdkMpp_Q.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.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]="e4daf166-3b56-4e92-900d-b0cefc705ce6",t._sentryDebugIdIdentifier="sentry-dbid-e4daf166-3b56-4e92-900d-b0cefc705ce6")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({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(Y(n,a)))},clearSignInError:()=>{t(b())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>G(e)),S=c(e=>J(e)),m=j(),w=P().mode,U=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(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Q(S.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),K().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(q,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-UD7liCcn.js";import{a as n}from"./sentry-BMtgafda.js";import{h as u,u as m,j as p,N as g}from"./core-BsJxSguc.js";import{z as f,B as y,t as h,d,f as b}from"./index-C_W1h50m.js";import{fL as I,fM as x,IF as j}from"./zeni-epic-state-xHyXPoIL.js";import{n as w}from"./mui-DnnuWLRL.js";import"./recharts-ColGXU81.js";import"./analytics-i6vOjy-6.js";import"./plaid-BQcpbHIu.js";import"./dnd-BqCDXelY.js";import"./stripe-DMRn4zHo.js";import"./lottie-Ct3047c5.js";import"./lexical-DEnPiQ42.js";import"./pdf-DUV5M5M4.js";import"./utils-BlFIrWFi.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]="855d3725-2dc6-421d-8e19-f9b4f8a24ea1",e._sentryDebugIdIdentifier="sentry-dbid-855d3725-2dc6-421d-8e19-f9b4f8a24ea1")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),l=f.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(I()),e(x(!1)),j(),h.reset(),d.trackLogout(b.Event.logoutSuccess),d.resetUserIdentity()}catch(c){console.error("Error during sign out:",c)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.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
|
+
`;export{U as default};
|