@zeniai/web-app-ui 5.4.14-dev → 5.4.14-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-BZk8jrAP.js → AccountMappingScreen-C10r8FT4.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-DdqC6TYo.js → ActualMatchingMatchDetailScreen-DmpwVVlK.js} +1 -1
- package/dist/assets/{AddressRoutes-DZnn8xs0.js → AddressRoutes-BDOBooPT.js} +1 -1
- package/dist/assets/{AddressScreen-DpzckL13.js → AddressScreen-DNA1AoN1.js} +1 -1
- package/dist/assets/{AiCfoScreen-BuC0DF7-.js → AiCfoScreen-DnjoSm7p.js} +1 -1
- package/dist/assets/{AppDrawer-BnkAekbe.js → AppDrawer-BCLUj3se.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-2Q-AgKCr.js → BillPayApprovalRoutes-C6bRRPwn.js} +1 -1
- package/dist/assets/{BillPayRoutes-CV19o_tt.js → BillPayRoutes-Bt2WWtCK.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-NPjj2cPM.js → BusinessVerificationPageScreen-Bfd5tr2J.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-CadRu1yE.js → CardsAiCfoScreen-CDRimZMa.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BRNnHx29.js → ChargeCardRoutes-CQ3YhqOL.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-d_xThxF-.js → CompanyPassportScreen-Bfc4Y68n.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B-GQ_uXR.js → ConnectionAuthScreen-CMlReMJa.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-Dv-djr6z.js → CustomerOnboardingAuthScreen-DBUn_LFI.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-KQwdDIjg.js → CustomerOnboardingRoutes-6-pJPoxK.js} +1 -1
- package/dist/assets/{DashboardRoutes-VCRBM_Lo.js → DashboardRoutes-DJSbRVCa.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Bnjp4uin.js → DefaultTenantHome-NUU8WaVG.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-FhF-Oy51.js → DomesticWireDetailScreen-DWmkYeuk.js} +1 -1
- package/dist/assets/{DrawerScreen-DOVfIfbY.js → DrawerScreen-A-8KPbEP.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BKu8bIme.js → EntityDetailRoutes-BmBeh8BN.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-C-dPVJak.js → ExpenseAutomationRoutes-CS0uneJ0.js} +1 -1
- package/dist/assets/{FallBackRoute-BsefzYi4.js → FallBackRoute-jaHJLYeL.js} +2 -2
- package/dist/assets/{FeaturePreviewScreen-CEvvSUOY.js → FeaturePreviewScreen-5EZY4ymu.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BRLjqcM8.js → HubSpotOAuthCallbackScreen-CBmVs8ym.js} +1 -1
- package/dist/assets/{InvoicingRoutes-Cn0ho2Ac.js → InvoicingRoutes-hwg79esy.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-DETheAv8.js → MagicLinkRoutes-EigZsZN-.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-hwNEJu9D.js → MagicLinkSignInScreen-BcBLnsBu.js} +1 -1
- package/dist/assets/{MobileAppDrawer-YElMwyTk.js → MobileAppDrawer-BBfUxZ3Z.js} +1 -1
- package/dist/assets/{NotFoundScreen-DD1ftXbM.js → NotFoundScreen-DghvMtNI.js} +1 -1
- package/dist/assets/{NotificationRoutes-j31qfFA3.js → NotificationRoutes-dIn5lLFo.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CQV1J_Nj.js → OAuthConsentScreen-BK9COtW9.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CUitXoy8.js → PandLWithForecastRoutes-Dl1UJVvN.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-B77tcNGP.js → PaymentLinkScreen-BLMCnNfo.js} +1 -1
- package/dist/assets/{PeopleRoutes-BbZuMgKW.js → PeopleRoutes-DUMXIx_K.js} +1 -1
- package/dist/assets/{PerformanceRoutes-D6iGCdx1.js → PerformanceRoutes-DCK_siQo.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DdhMvyre.js → QBOConnectionScreen-DZ38il0m.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-lGHZV1sd.js → ReimbursementApprovalRoutes-BNnHI223.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtdOG2XT.js → ReimbursementApprovalRuleDetailScreen-B4jqTz0j.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DjGiFO3h.js → ReimbursementRoutes-DuTeQGc-.js} +1 -1
- package/dist/assets/{ReportsRoutes-DNhWXb3T.js → ReportsRoutes-BdGXf5ZW.js} +1 -1
- package/dist/assets/{RewardsRoutes-C0czxWPN.js → RewardsRoutes-BvWFhZRc.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CkM33AZC.js → ScheduleDetailsPrepaidExpensesScreen-gxx2-EFd.js} +1 -1
- package/dist/assets/{ScreenRoutes-DYGYxgwA.js → ScreenRoutes-DsU2m2B_.js} +2 -2
- package/dist/assets/{SettingsRoutes-DRSU5I7g.js → SettingsRoutes-rivgMg4F.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CfUfKDWM.js → SetupPagesScreen-D34F2few.js} +1 -1
- package/dist/assets/{SignInScreen-DDQ1e38Q.js → SignInScreen-JCm-eqte.js} +1 -1
- package/dist/assets/{SignOutScreen-CmYRhks4.js → SignOutScreen-CRiK0OGZ.js} +1 -1
- package/dist/assets/{TaskListScreen-D8jqZbNF.js → TaskListScreen-bLM4yBPa.js} +1 -1
- package/dist/assets/{TaskRoutes-Cu7kReic.js → TaskRoutes-wI7rPjq5.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-B7AzD4hg.js → TransactionDetailRoutes-zKd3AnPd.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-CpvJY1a3.js → TransactionDetailScreen-CzMYbtKa.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BejbKDzL.js → TransactionListRoutes-DuGhQU2Q.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DTax48Tc.js → TreasuryRoutes-I94VefD1.js} +1 -1
- package/dist/assets/{VendorsRoutes-DWNg-EPe.js → VendorsRoutes-CogcroEr.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C4KbEpAc.js → WiseConfirmationScreen-DHFsDzmW.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BI00gqox.js → ZeniAccountRoutes-Bt30AIgn.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BUg2sDXI.js → ZeniAccountStatementScreen-DPCVgpTe.js} +1 -1
- package/dist/assets/{analyticsHelper-DcUdLdtd.js → analyticsHelper-DXk7k3Sg.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CSUvt8Gt.js → getLocaleForTenant-Bdg31N9b.js} +1 -1
- package/dist/assets/{index-zmOdoQIt.js → index-C9gDoiPZ.js} +6 -6
- package/dist/assets/{routePaths-RxstHRDw.js → routePaths-Qo9PrkRx.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-Dr6cKA7B.js → useActualMatchingMatchDetail-D3PMymJ7.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CC8PIy8S.js → useAiCfoDashboardSuggestedQuestionsChips-DsRKu7db.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Bl76c5H-.js → useAskAiCfoHostNavButtonProps-Dn-NLDsa.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-C6oeFa4_.js → useChargeCardPusherEvents-HTI-Gpv-.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-nv6tTKw5.js → useEmailConnectResultRefresh-C9tQTK1g.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DqCJRXyQ.js → useInitialThreadRequest-UNqcV9yZ.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-DhT542co.js → useTaskManagerAccess-CiHwVHGW.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-B9F1i19u.js → useTaskManagerPusherEvents-B7K0XRHM.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BaaDGWl5.js → withTransactionSidePanel-BclYopZI.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
package/dist/assets/{PandLWithForecastRoutes-CUitXoy8.js → PandLWithForecastRoutes-Dl1UJVvN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-CM1vcHN_.js";import{h as W,u as Y,g as z,i as J,j as d,l as X,n as Z,o as C}from"./core-Cc1CwF93.js";import{fI as v,AJ as R,vm as H,a1V as w,vh as T,bp as K,d$ as Q,vi as ee,a1W as ae,Z3 as S,ei as te,EB as se,a1X as oe,E_ as re,eq as ne,ep as ce}from"./zeni-epic-state-DFhlE0W3.js";import{az as ie,z as le,aC as de,al as fe,V as me,a9 as pe,e as M,dl as ue,v as he,p as be,b as Fe}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-CM1vcHN_.js";import{h as W,u as Y,g as z,i as J,j as d,l as X,n as Z,o as C}from"./core-Cc1CwF93.js";import{fI as v,AJ as R,vm as H,a1V as w,vh as T,bp as K,d$ as Q,vi as ee,a1W as ae,Z3 as S,ei as te,EB as se,a1X as oe,E_ as re,eq as ne,ep as ce}from"./zeni-epic-state-DFhlE0W3.js";import{az as ie,z as le,aC as de,al as fe,V as me,a9 as pe,e as M,dl as ue,v as he,p as be,b as Fe}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import ge from"./NotFoundScreen-DghvMtNI.js";import{F as Ie}from"./FeaturePreviewScreen-5EZY4ymu.js";import{a as b}from"./sentry-Bh68thgn.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import{u as Se}from"./useInitialThreadRequest-UNqcV9yZ.js";import{a as Te}from"./routePaths-Qo9PrkRx.js";import{M as ye}from"./MobileAppDrawer-BBfUxZ3Z.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="b7ab0a3c-6237-4feb-b13b-fe79fe43fd8a",s._sentryDebugIdIdentifier="sentry-dbid-b7ab0a3c-6237-4feb-b13b-fe79fe43fd8a")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=X((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),f=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:f,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=b.useState(!1),[f,A]=b.useState(!1),F=le.getSignedInUser(),x=d((t=>v(t))),_=x.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=de();fe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});b.useEffect((()=>{if(!p&&g)u(!0),l||a(H());else if(l&&!f){A(!0);const t=((m,P,O)=>P!=null?m.forecasts.findIndex((I=>I.id===P)):O!=null?m.forecasts.findIndex((I=>I.id===O)):m.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&g&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,f,A,R,T,g]);const E=me(),$=E?.loggedInUserRole!=null&&K(E.loggedInUserRole),q=Se(x?.companyId,{clearParams:l&&f}),[V,G]=b.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:Q(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,initialOpenThreadRequest:q,onClickMenuIcon:()=>{L(!0)}})]})}function Je(){const s=d((c=>v(c))),{useFeatureGate:e}=be(),{isFeatureEnabled:a}=e(Fe.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{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(ge,{})})]})}export{Je as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-CM1vcHN_.js";import{a as p}from"./sentry-Bh68thgn.js";import{R as a,aa as u,ae as f,af as h}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-CM1vcHN_.js";import{a as p}from"./sentry-Bh68thgn.js";import{R as a,aa as u,ae as f,af as h}from"./index-C9gDoiPZ.js";import{s as d}from"./mui-ehyt9jca.js";import{i as y}from"./core-Cc1CwF93.js";import"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.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]="d17b17a2-d5a4-455d-b47f-e032ee88dffe",e._sentryDebugIdIdentifier="sentry-dbid-d17b17a2-d5a4-455d-b47f-e032ee88dffe")}catch{}})();const g=d("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CM1vcHN_.js";import{_l as re,fI as N,ma as G,eq as Y,ep as le,T8 as Q,V$ as ce,Dr as Pe,_m as J,Dg as je,DB as Le,Dv as de,Dk as pe,Dz as ve,Dw as Te,_n as ue,sH as Re,g9 as Ve,gG as Ae,_o as z,Do as me,Dn as ge,DE as Fe,c7 as Oe}from"./zeni-epic-state-DFhlE0W3.js";import{a2 as fe,p as X,b as H,z as K,i as he,L as Ce,ag as ye,aL as be,bZ as Ze,ac as De,R as F,ah as Se,G as M,b_ as Be,aC as Ue,al as $e,a9 as _e,e as we,U as ze,v as He,b$ as Ge,V as Ke}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CM1vcHN_.js";import{_l as re,fI as N,ma as G,eq as Y,ep as le,T8 as Q,V$ as ce,Dr as Pe,_m as J,Dg as je,DB as Le,Dv as de,Dk as pe,Dz as ve,Dw as Te,_n as ue,sH as Re,g9 as Ve,gG as Ae,_o as z,Do as me,Dn as ge,DE as Fe,c7 as Oe}from"./zeni-epic-state-DFhlE0W3.js";import{a2 as fe,p as X,b as H,z as K,i as he,L as Ce,ag as ye,aL as be,bZ as Ze,ac as De,R as F,ah as Se,G as M,b_ as Be,aC as Ue,al as $e,a9 as _e,e as we,U as ze,v as He,b$ as Ge,V as Ke}from"./index-C9gDoiPZ.js";import{D as xe,n as W,S as Ie}from"./mui-ehyt9jca.js";import ae from"./NotFoundScreen-DghvMtNI.js";import{a as c}from"./sentry-Bh68thgn.js";import{u as ee,i as Me,j as g,h as We,g as qe,l as Je,n as se,o as _}from"./core-Cc1CwF93.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import{M as Ye}from"./MobileAppDrawer-BBfUxZ3Z.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.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]="c3441a1f-839a-48ab-aedd-470fe9484706",e._sentryDebugIdIdentifier="sentry-dbid-c3441a1f-839a-48ab-aedd-470fe9484706")}catch{}})();const Qe={overlayWidth:new De(100,100,48)},te=M.getLocalizedStrings().peoplePage.invitePage,ne=M.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,Z]=c.useState(!1),[k,D]=c.useState(!1),{userId:S}=Me(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(H.isDebitCardFeatureEnabled),P=Y(I,p),v=le(p),T=Q(p),B=ce(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},R=()=>{O===!0?D(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(H.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:V}=Ce(p?.tenantId),y=!L||V,A=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:A===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(T))},onCloseClick:R,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return c.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:R,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Ze,{...s})]})})},ea=W(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CM1vcHN_.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-CM1vcHN_.js";import E from"./NotFoundScreen-DghvMtNI.js";import{a as r}from"./sentry-Bh68thgn.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as O,o as h}from"./core-Cc1CwF93.js";import{fI as B,a3h as b,bn as F,bm as N,iW as V,gk as W}from"./zeni-epic-state-DFhlE0W3.js";import{k as $,z as I,al as q,ea as G}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import{M as J}from"./MobileAppDrawer-BBfUxZ3Z.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.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]="2013c596-b5ff-4cc8-8797-79be05df42bc",e._sentryDebugIdIdentifier="sentry-dbid-2013c596-b5ff-4cc8-8797-79be05df42bc")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),L=()=>{const e=_(),t=v(),c=$(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:m}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&f.current&&(u(W({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-CM1vcHN_.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-Bh68thgn.js";import{L as ge,d$ as xc,fI as kc,UP as Tc,a1h as jl,c7 as xl}from"./zeni-epic-state-DFhlE0W3.js";import{a as pe,b as kl,d as Tl,e as Al,f as un,g as Rl,h as Pl,i as Il,j as Ve,k as Ac,l as ot,m as xt,o as Ll,p as ct,q as Nl}from"./utils-CjDqL2uk.js";import{r as cn}from"./empty-DhAh77JM.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-kwPPw7gn.js";import{r as Ye,a as Fl}from"./index-BJ8vYoNR.js";import{r as Ul}from"./index-foi_vl2g.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-Cc1CwF93.js";import{d4 as Zl,_ as Hl,u as Vl,z as Rc,c as Yl,d5 as Wl,O as Kl}from"./index-
|
|
1
|
+
import{j as _l}from"./liveblocks-CM1vcHN_.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-Bh68thgn.js";import{L as ge,d$ as xc,fI as kc,UP as Tc,a1h as jl,c7 as xl}from"./zeni-epic-state-DFhlE0W3.js";import{a as pe,b as kl,d as Tl,e as Al,f as un,g as Rl,h as Pl,i as Il,j as Ve,k as Ac,l as ot,m as xt,o as Ll,p as ct,q as Nl}from"./utils-CjDqL2uk.js";import{r as cn}from"./empty-DhAh77JM.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-kwPPw7gn.js";import{r as Ye,a as Fl}from"./index-BJ8vYoNR.js";import{r as Ul}from"./index-foi_vl2g.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-Cc1CwF93.js";import{d4 as Zl,_ as Hl,u as Vl,z as Rc,c as Yl,d5 as Wl,O as Kl}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import{d as It}from"./decodeURIComponentSafe-BhSMetwg.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]="e6b8b1ac-9966-48fc-9ff6-9d9adaac0894",e._sentryDebugIdIdentifier="sentry-dbid-e6b8b1ac-9966-48fc-9ff6-9d9adaac0894")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-CM1vcHN_.js";import X from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-CM1vcHN_.js";import X from"./NotFoundScreen-DghvMtNI.js";import{a as p}from"./sentry-Bh68thgn.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as z,o as g}from"./core-Cc1CwF93.js";import{fI as E,Y7 as h,XL as w,On as L,Oj as N,Om as f,Oc as U,XN as B,Og as K,Op as Y}from"./zeni-epic-state-DFhlE0W3.js";import{z as T,w as $,bl as q,D as W,b0 as F,bm as G}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import{u as H}from"./useEnsureVendorListLoaded-zh5PaZPv.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-B4jqTz0j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="33408bb8-619a-45c1-a774-9cabbc639915",e._sentryDebugIdIdentifier="sentry-dbid-33408bb8-619a-45c1-a774-9cabbc639915")}catch{}})();const j="reimbursement-approval-rule-update",J=O((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(U(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(q)),M=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),b=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),S=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{S?.updateStatus.fetchState==="Completed"&&a(L())}),[S]),p.useEffect((()=>{t||b!=="Not-Started"||e||(l(!0),a(N(!0,!1,!1,!1)))}),[t,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(J,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=O((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(B(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(U(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(Y(t,!0))}}}))($(G)),Q=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(M,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[b,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),S=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));H();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(L())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(N(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||S!=="Not-Started"||e||(R(!0),a(K(!1,!0)))}),[v,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(b||(c(!0),a(f())),s("./new"))}),[b,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,_)=>{i.endsWith(A)&&_.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function ue(){return r.jsxs(z,{children:[r.jsx(g,{path:"/",element:r.jsx(Q,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(X,{})})]})}export{ue as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-CM1vcHN_.js";import{a as y}from"./sentry-Bh68thgn.js";import{h as x,u as _,g as C,i as V,j as R,l as k}from"./core-Cc1CwF93.js";import{XL as E,Y7 as T,Of as j,Os as B,On as A,Oo as w,YG as F,fI as Y,Om as z}from"./zeni-epic-state-DFhlE0W3.js";import{z as N,a8 as P,bn as G,D as $,b0 as K,bo as W}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-CM1vcHN_.js";import{a as y}from"./sentry-Bh68thgn.js";import{h as x,u as _,g as C,i as V,j as R,l as k}from"./core-Cc1CwF93.js";import{XL as E,Y7 as T,Of as j,Os as B,On as A,Oo as w,YG as F,fI as Y,Om as z}from"./zeni-epic-state-DFhlE0W3.js";import{z as N,a8 as P,bn as G,D as $,b0 as K,bo as W}from"./index-C9gDoiPZ.js";import{u as q}from"./mui-ehyt9jca.js";import{u as X}from"./useEnsureVendorListLoaded-zh5PaZPv.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]="7119c013-42d9-4757-a44c-0a0b2bbdf2c9",e._sentryDebugIdIdentifier="sentry-dbid-7119c013-42d9-4757-a44c-0a0b2bbdf2c9")}catch{}})();const H=k((function(e,o){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return o.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===o.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const b=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const f=(S=m.value,F(S)==null);var S;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=b.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(G);function J(){const e=x(),o=_(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>E(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),o(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function se(e){return F(e)==null}const M=k((function(e,o){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:s,vendorNamesById:i,editingRuleId:p==="approval_update"?o.approvalRuleId:void 0,allApprovalRulesWithUser:T(e).allApprovalRules}}),(function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:s,approvalRuleId:i}=o,r=p.remiSetupApproverViewUpdateData?.type,l=$(o.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const S=f.actorKind?.selectedOption,L=f.selectedRole?.selectedNonUsers??[];let D=[];S==="role"?D=L.map((O=>({type:"attribute",subType:O.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):S==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((O=>({type:"user",subType:void 0,userId:O.userId,idType:"user",isImplicitActor:!1}))));const U=f.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const b=v?.selection.selectedOptions??[];b.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:b});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=R((t=>Y(t))),{isApprovalRulesV3Enabled:o}=K(e?.tenantId);return o?g.jsx(Q,{}):g.jsx(J,{})}function Q(){const e=x(),o=_(),t=C(),{approvalRuleId:p}=V(),s=N.getSignedInUser(),i=q(),r=R((n=>E(n))),l=R((n=>T(n))),[a,d]=y.useState(!1);if(X(),y.useEffect((()=>{a||(d(!0),o(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-CM1vcHN_.js";import{u as ae,j as A,h as Y,g as K,i as ie,N as $,l as ee,q as lt,n as mt,o as E}from"./core-Cc1CwF93.js";import{fI as Z,Oj as ct,Xm as ge,c7 as he,Np as Ue,ml as dt,NE as ce,ND as de,Xn as ut,bm as fe,gZ as Le,Xo as pt,VH as bt,ma as Ne,VJ as ke,VI as gt,kY as ht,Xd as ft,lb as St,Nd as It,CJ as yt,l3 as Rt,N_ as $e,Xp as Pe,Xq as Ce,Xr as vt,Xs as At,Xt as kt,NK as we,lh as Ct,Xu as wt,NC as xt,Nn as Et,Xv as Bt,Nm as Tt,Xw as Dt,Nu as xe,NO as jt,NN as Ft,NJ as Ut,Xx as Me,T8 as Lt,bn as Nt,Nx as $t,Og as Pt,Xy as Mt,Xz as _t,NW as Ot,NT as Ee,WJ as Xt,Nk as zt,XA as _e,OJ as Be,OR as Gt,XB as Vt,XC as J,XD as Zt,XE as Oe,XF as Wt,XG as Xe,XH as ze,O6 as ue,c$ as Ht,bK as Se,cD as Ie,eq as Ge,ep as Ve,XI as Jt,gk as qt,WW as Kt,XJ as Qt,XK as Ze,W_ as Yt,XL as en,XM as tn,XN as nn,OO as Te,ON as an,XO as sn,XP as on,XQ as rn,XR as ln,XS as mn,XT as cn,OE as dn,OI as un,bp as pn,bJ as bn,cx as gn,cl as hn,br as fn,ha as Sn,eb as In,ee as yn,ed as Rn,cw as vn}from"./zeni-epic-state-DFhlE0W3.js";import{b0 as An,k as We,a2 as He,p as oe,b as U,z as L,b1 as Je,a9 as re,e as x,aM as De,R as j,af as se,ag as kn,G as qe,b2 as Cn,v as q,al as Ke,b3 as wn,V as le,b4 as xn,aC as En,ac as Bn,a8 as ye,U as Qe,w as Tn,aP as Dn,aj as jn,az as Fn,b5 as Un,i as Ln}from"./index-zmOdoQIt.js";import{n as P,S as Nn,u as Ye}from"./mui-ehyt9jca.js";import pe from"./NotFoundScreen-DD1ftXbM.js";import{S as je}from"./SetupPagesScreen-CfUfKDWM.js";import{F as et}from"./FeaturePreviewScreen-CEvvSUOY.js";import{a as g}from"./sentry-Bh68thgn.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-Bl76c5H-.js";import{u as tt}from"./useInitialThreadRequest-DqCJRXyQ.js";import{D as $n}from"./DrawerScreen-DOVfIfbY.js";import{M as nt}from"./MobileAppDrawer-YElMwyTk.js";import{F as Pn}from"./FallBackRoute-BsefzYi4.js";import{R as Mn}from"./ReimbursementApprovalRoutes-lGHZV1sd.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./BusinessVerificationPageScreen-NPjj2cPM.js";import"./routePaths-RxstHRDw.js";import"./analyticsHelper-DcUdLdtd.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.js";import"./useEnsureVendorListLoaded-zh5PaZPv.js";import"./ReimbursementApprovalRuleDetailScreen-CtdOG2XT.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]="b61f2bff-a5cf-4876-8eed-673a3212935c",e._sentryDebugIdIdentifier="sentry-dbid-b61f2bff-a5cf-4876-8eed-673a3212935c")}catch{}})();const at=e=>`/${e}/reimbursements`,_n=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:H,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:x,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ne(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(xe(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(xe(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(Et({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(xt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(At({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(vt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(x.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Y(),t=ae(),n=K(),{reimbursementId:r}=ie(),m=We(),c=He(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=K().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=A((b=>Z(b))),h=A((b=>ge(b,r))),N=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),_=A((Q=>Z(Q))),O=_?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:W}=An(O),z=A((Q=>Q.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[O,W,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const v=A((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const M={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx($,{to:M}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Xn,{windowSize:c,children:[s.jsx(re,{analytics:x,onLoad:b=>(_=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&_.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Zn,{onClick:()=>a(!1),children:s.jsx(_n,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:v,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Je,{isNewReimbursement:r==null})}const Xn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CM1vcHN_.js";import{u as ae,j as A,h as Y,g as K,i as ie,N as $,l as ee,q as lt,n as mt,o as E}from"./core-Cc1CwF93.js";import{fI as Z,Oj as ct,Xm as ge,c7 as he,Np as Ue,ml as dt,NE as ce,ND as de,Xn as ut,bm as fe,gZ as Le,Xo as pt,VH as bt,ma as Ne,VJ as ke,VI as gt,kY as ht,Xd as ft,lb as St,Nd as It,CJ as yt,l3 as Rt,N_ as $e,Xp as Pe,Xq as Ce,Xr as vt,Xs as At,Xt as kt,NK as we,lh as Ct,Xu as wt,NC as xt,Nn as Et,Xv as Bt,Nm as Tt,Xw as Dt,Nu as xe,NO as jt,NN as Ft,NJ as Ut,Xx as Me,T8 as Lt,bn as Nt,Nx as $t,Og as Pt,Xy as Mt,Xz as _t,NW as Ot,NT as Ee,WJ as Xt,Nk as zt,XA as _e,OJ as Be,OR as Gt,XB as Vt,XC as J,XD as Zt,XE as Oe,XF as Wt,XG as Xe,XH as ze,O6 as ue,c$ as Ht,bK as Se,cD as Ie,eq as Ge,ep as Ve,XI as Jt,gk as qt,WW as Kt,XJ as Qt,XK as Ze,W_ as Yt,XL as en,XM as tn,XN as nn,OO as Te,ON as an,XO as sn,XP as on,XQ as rn,XR as ln,XS as mn,XT as cn,OE as dn,OI as un,bp as pn,bJ as bn,cx as gn,cl as hn,br as fn,ha as Sn,eb as In,ee as yn,ed as Rn,cw as vn}from"./zeni-epic-state-DFhlE0W3.js";import{b0 as An,k as We,a2 as He,p as oe,b as U,z as L,b1 as Je,a9 as re,e as x,aM as De,R as j,af as se,ag as kn,G as qe,b2 as Cn,v as q,al as Ke,b3 as wn,V as le,b4 as xn,aC as En,ac as Bn,a8 as ye,U as Qe,w as Tn,aP as Dn,aj as jn,az as Fn,b5 as Un,i as Ln}from"./index-C9gDoiPZ.js";import{n as P,S as Nn,u as Ye}from"./mui-ehyt9jca.js";import pe from"./NotFoundScreen-DghvMtNI.js";import{S as je}from"./SetupPagesScreen-D34F2few.js";import{F as et}from"./FeaturePreviewScreen-5EZY4ymu.js";import{a as g}from"./sentry-Bh68thgn.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-Dn-NLDsa.js";import{u as tt}from"./useInitialThreadRequest-UNqcV9yZ.js";import{D as $n}from"./DrawerScreen-A-8KPbEP.js";import{M as nt}from"./MobileAppDrawer-BBfUxZ3Z.js";import{F as Pn}from"./FallBackRoute-jaHJLYeL.js";import{R as Mn}from"./ReimbursementApprovalRoutes-BNnHI223.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./BusinessVerificationPageScreen-Bfd5tr2J.js";import"./routePaths-Qo9PrkRx.js";import"./analyticsHelper-DXk7k3Sg.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.js";import"./useEnsureVendorListLoaded-zh5PaZPv.js";import"./ReimbursementApprovalRuleDetailScreen-B4jqTz0j.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]="b61f2bff-a5cf-4876-8eed-673a3212935c",e._sentryDebugIdIdentifier="sentry-dbid-b61f2bff-a5cf-4876-8eed-673a3212935c")}catch{}})();const at=e=>`/${e}/reimbursements`,_n=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:H,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:x,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Ne(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(xe(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(xe(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(Et({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(xt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(At({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(vt({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(x.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Y(),t=ae(),n=K(),{reimbursementId:r}=ie(),m=We(),c=He(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=K().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=A((b=>Z(b))),h=A((b=>ge(b,r))),N=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),_=A((Q=>Z(Q))),O=_?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:W}=An(O),z=A((Q=>Q.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[O,W,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Ue(!1,I,u,r)))}));const v=A((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const M={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx($,{to:M}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(Xn,{windowSize:c,children:[s.jsx(re,{analytics:x,onLoad:b=>(_=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&_.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(zn,{}):null,i&&c!=="small"?s.jsx(Gn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Zn,{onClick:()=>a(!1),children:s.jsx(_n,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:H.upload,single:ne.dropReceipt.single,or:H.texts.or,multiple:ne.dropReceipt.multiple,receipts:H.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:v,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Je,{isNewReimbursement:r==null})}const Xn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-CM1vcHN_.js";import{g as te,h as ve,u as Ve,i as Ue,j as _,l as Ze,n as xe,o as oe}from"./core-Cc1CwF93.js";import{fI as K,EM as S,W7 as ze,ma as ue,ur as he,vg as V,lR as F,l_ as D,lS as P,kV as A,kM as E,kL as Y,DP as U,vl as ye,bp as Ge,V$ as He,bm as Ne,F8 as $e,YH as qe,YI as Je,c9 as I,DI as ne,YJ as re,YK as Qe,YL as We,YM as Ke,YN as Xe,YO as ea,YP as aa,YQ as sa,YR as ta,YS as oa,YT as na,YU as ra,YV as la,YW as j,YX as Z,YY as x,YZ as z,Y_ as G,Y$ as H,Z0 as N,Z1 as $,Z2 as q,Z3 as J,ei as ca,EO as ia,EA as le,EB as ce,EU as da,EF as ie,bE as O,VN as de,d0 as pe,EG as _e,E_ as pa,Z4 as _a,Z5 as fa,Z6 as ba,Z7 as ma,Z8 as ua,Z9 as ha,Za as ya,Zb as Ca,Zc as wa,Zd as ga,eq as Ia,ep as Ra}from"./zeni-epic-state-DFhlE0W3.js";import{bp as Sa,at as Ta,bq as ja,j as Oa,a2 as ka,p as Ce,b as Q,z as we,aC as Fa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Ya,e as W,U as Ma,J as La,v as ge,br as Ba,ax as va,aj as Va}from"./index-zmOdoQIt.js";import"./mui-ehyt9jca.js";import Ua from"./NotFoundScreen-DD1ftXbM.js";import{F as Za}from"./FeaturePreviewScreen-CEvvSUOY.js";import{a as u}from"./sentry-Bh68thgn.js";import{u as xa}from"./useInitialThreadRequest-DqCJRXyQ.js";import{a as fe,c as be,b as za}from"./routePaths-RxstHRDw.js";import{t as me}from"./reportTimeframe-DX5pHUc_.js";import{M as Ga}from"./MobileAppDrawer-YElMwyTk.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-DhT542co.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]="178739df-11c8-4f22-9b6b-1cefcb7d25ee",e._sentryDebugIdIdentifier="sentry-dbid-178739df-11c8-4f22-9b6b-1cefcb7d25ee")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],R=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(J({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(Z({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=Ze((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:W,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Va}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(V(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=O(a),i=O(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(Y(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(Y(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(Y(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(F(r,!0,a,s));break;case"cash_flow_by_classes":e(F(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(F(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=O(a),d=O(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(R(a)||I(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(J({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(Z({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(J({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=R(t),r=I(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{I(o.selectedReportID)?e(Xe({classesToFilterOut:a})):R(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):R(o.selectedReportID)?e(We({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=R(o.selectedReportID),s=I(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():U())},onUpdateDisplayOrder:a=>{e(Je(a))},onUpdateReportFormat:a=>{Na(e),e(qe(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Oa(),b=ka(),m=va(b),a=ve(),s=Ve(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Ie]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Re=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),w=_((l=>S(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Fa(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),Oe=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),ke=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(V(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(V(c.userId,!1,!0,!1)),Ie(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(Y(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":g&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(F(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),Fe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ye}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ye),Be=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Ea({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Ya,{analytics:W,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:ke,selectedReportID:B,analytics:W,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:Oe,hasTransactionAccess:Fe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Re)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ys(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ia(b,e),a=Ra(e);return m===!0||a===!0?f.jsx(Za,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
|
|
1
|
+
import{j as f}from"./liveblocks-CM1vcHN_.js";import{g as te,h as ve,u as Ve,i as Ue,j as _,l as Ze,n as xe,o as oe}from"./core-Cc1CwF93.js";import{fI as K,EM as S,W7 as ze,ma as ue,ur as he,vg as V,lR as F,l_ as D,lS as P,kV as A,kM as E,kL as Y,DP as U,vl as ye,bp as Ge,V$ as He,bm as Ne,F8 as $e,YH as qe,YI as Je,c9 as I,DI as ne,YJ as re,YK as Qe,YL as We,YM as Ke,YN as Xe,YO as ea,YP as aa,YQ as sa,YR as ta,YS as oa,YT as na,YU as ra,YV as la,YW as j,YX as Z,YY as x,YZ as z,Y_ as G,Y$ as H,Z0 as N,Z1 as $,Z2 as q,Z3 as J,ei as ca,EO as ia,EA as le,EB as ce,EU as da,EF as ie,bE as O,VN as de,d0 as pe,EG as _e,E_ as pa,Z4 as _a,Z5 as fa,Z6 as ba,Z7 as ma,Z8 as ua,Z9 as ha,Za as ya,Zb as Ca,Zc as wa,Zd as ga,eq as Ia,ep as Ra}from"./zeni-epic-state-DFhlE0W3.js";import{bp as Sa,at as Ta,bq as ja,j as Oa,a2 as ka,p as Ce,b as Q,z as we,aC as Fa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Ya,e as W,U as Ma,J as La,v as ge,br as Ba,ax as va,aj as Va}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import Ua from"./NotFoundScreen-DghvMtNI.js";import{F as Za}from"./FeaturePreviewScreen-5EZY4ymu.js";import{a as u}from"./sentry-Bh68thgn.js";import{u as xa}from"./useInitialThreadRequest-UNqcV9yZ.js";import{a as fe,c as be,b as za}from"./routePaths-Qo9PrkRx.js";import{t as me}from"./reportTimeframe-DX5pHUc_.js";import{M as Ga}from"./MobileAppDrawer-BBfUxZ3Z.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./useTaskManagerAccess-CiHwVHGW.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]="178739df-11c8-4f22-9b6b-1cefcb7d25ee",e._sentryDebugIdIdentifier="sentry-dbid-178739df-11c8-4f22-9b6b-1cefcb7d25ee")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],R=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(J({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(Z({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=Ze((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:W,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Va}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(V(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=O(a),i=O(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(Y(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(Y(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(Y(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(F(r,!0,a,s));break;case"cash_flow_by_classes":e(F(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(F(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=O(a),d=O(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(R(a)||I(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:k(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(J({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(Z({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(J({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=R(t),r=I(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",k(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",k(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",k(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{I(o.selectedReportID)?e(Xe({classesToFilterOut:a})):R(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{I(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):R(o.selectedReportID)?e(We({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=R(o.selectedReportID),s=I(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():U())},onUpdateDisplayOrder:a=>{e(Je(a))},onUpdateReportFormat:a=>{Na(e),e(qe(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Oa(),b=ka(),m=va(b),a=ve(),s=Ve(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Ie]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Re=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),w=_((l=>S(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Fa(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),Oe=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),ke=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(V(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(V(c.userId,!1,!0,!1)),Ie(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(Y(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":g&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(F(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),Fe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ye}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ye),Be=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Ea({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Ya,{analytics:W,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:ke,selectedReportID:B,analytics:W,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:Oe,hasTransactionAccess:Fe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Re)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const k=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function ys(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ia(b,e),a=Ra(e);return m===!0||a===!0?f.jsx(Za,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{ys as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CM1vcHN_.js";import{z as b,a9 as N,e as u,U as S,eb as k,p as I,b as C}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CM1vcHN_.js";import{z as b,a9 as N,e as u,U as S,eb as k,p as I,b as C}from"./index-C9gDoiPZ.js";import"./mui-ehyt9jca.js";import g from"./NotFoundScreen-DghvMtNI.js";import{a as c}from"./sentry-Bh68thgn.js";import{u as D,j as h,h as F,g as L,l as U,n as T,o as d,N as y}from"./core-Cc1CwF93.js";import{fI as _,a3i as j,a3j as p,Er as P,qd as V,a3k as q,Ep as z}from"./zeni-epic-state-DFhlE0W3.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.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]="9df8bb75-97d3-4215-8667-048167c217c1",e._sentryDebugIdIdentifier="sentry-dbid-9df8bb75-97d3-4215-8667-048167c217c1")}catch{}})();const G=U((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),l=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-CM1vcHN_.js";import{a as v}from"./sentry-Bh68thgn.js";import{i as M,u as Q,h as W,g as ee,j as r,l as te}from"./core-Cc1CwF93.js";import{_C as Ge,_S as Ve,ma as ae,sL as Fe,sX as Me,tb as $e,t9 as Re,tc as Ke,te as Ue,a0C as Ye,fI as K,$G as pe,a0D as Se,h2 as ne,cs as se,ct as le,FS as ve,a0E as Ce,FW as ze,gS as ce,sO as He,tn as qe,dn as Ze,dm as Xe,T$ as fe,FQ as Qe,FK as We,VH as De,FC as et,FB as tt,Fw as at,FH as nt,FX as st,VJ as Y,VI as ge,FD as lt,$H as oe,Gb as Ae,G4 as Ie,a0F as xe,sR as Te,F_ as Be,FY as Le,a0G as Je,Gi as we,Gf as be,F$ as je,Gh as _e}from"./zeni-epic-state-DFhlE0W3.js";import{a5 as de,cG as ie,cH as ct,z as ot,s as dt,a8 as it,a9 as ue,e as N,aj as ut,cI as rt,v as V,G as ye,k as Ee,cJ as ht,cK as mt,cL as pt}from"./index-
|
|
1
|
+
import{j as E}from"./liveblocks-CM1vcHN_.js";import{a as v}from"./sentry-Bh68thgn.js";import{i as M,u as Q,h as W,g as ee,j as r,l as te}from"./core-Cc1CwF93.js";import{_C as Ge,_S as Ve,ma as ae,sL as Fe,sX as Me,tb as $e,t9 as Re,tc as Ke,te as Ue,a0C as Ye,fI as K,$G as pe,a0D as Se,h2 as ne,cs as se,ct as le,FS as ve,a0E as Ce,FW as ze,gS as ce,sO as He,tn as qe,dn as Ze,dm as Xe,T$ as fe,FQ as Qe,FK as We,VH as De,FC as et,FB as tt,Fw as at,FH as nt,FX as st,VJ as Y,VI as ge,FD as lt,$H as oe,Gb as Ae,G4 as Ie,a0F as xe,sR as Te,F_ as Be,FY as Le,a0G as Je,Gi as we,Gf as be,F$ as je,Gh as _e}from"./zeni-epic-state-DFhlE0W3.js";import{a5 as de,cG as ie,cH as ct,z as ot,s as dt,a8 as it,a9 as ue,e as N,aj as ut,cI as rt,v as V,G as ye,k as Ee,cJ as ht,cK as mt,cL as pt}from"./index-C9gDoiPZ.js";import{n as re}from"./mui-ehyt9jca.js";import{p as St}from"./pathToGoBack-jAeSfAQ9.js";import{a as ft}from"./useActualMatchingMatchDetail-D3PMymJ7.js";import X from"./NotFoundScreen-DghvMtNI.js";import{t as F}from"./routePaths-Qo9PrkRx.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]="836ba8da-366f-4913-9ac6-8f1cac2d6fa7",e._sentryDebugIdIdentifier="sentry-dbid-836ba8da-366f-4913-9ac6-8f1cac2d6fa7")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=M(),l=t??s,n=Q(),i=W(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Ge(u,l??""))),m=r((u=>Ve(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{l!=null&&d==null&&h.fetchState==="Not-Started"&&n(Fe(l))}),[l,d,h.fetchState]),v.useEffect((()=>{n(Me({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?E.jsx(X,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(X,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Re(l,u,f))},onSkip:(u,f)=>{n($e(l,u,f))}})})}const Dt=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReportsRoutes-
|
|
2
|
-
import{bm as ms,fI as hs,eq as _s,ep as ps,h7 as xs,d2 as Es,c7 as gs,gM as js,gc as Is,eg as xe,cx as Rs,gq as As,cp as Ts,bE as bs,bv as fs,h8 as ys,v as ws,h9 as Cs,bp as Ds,ha as vs,bK as Us,bJ as ks,br as Fs,cl as Os,hb as Ps,hc as Hs,eb as Ss,ee as Bs,ed as Ls,cw as Ns,cD as Vs,hd as Ee,gl as ge,h0 as Ms,gn as je,gO as Ie,gP as Re,go as Zs,_ as r}from"./zeni-epic-state-DFhlE0W3.js";import{j as e}from"./liveblocks-CM1vcHN_.js";import{a as U}from"./sentry-Bh68thgn.js";import{u as zs,h as Gs,i as $s,g as Ys,j as z,q as Ae,N as d,n as qs,o as s}from"./core-Cc1CwF93.js";import{u as Ws,z as T,p as Js,a as Ks,f as Qs,b as L,i as Xs,L as en,V as sn,c as F,G as Te,t as c,d as nn,P as an,e as ae,r as tn,l as i,B as on,Z as rn}from"./index-zmOdoQIt.js";import{u as ln}from"./mui-ehyt9jca.js";import{f as be}from"./analyticsHelper-DcUdLdtd.js";import{t as dn}from"./getLocaleForTenant-CSUvt8Gt.js";import{F as C}from"./FallBackRoute-BsefzYi4.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new l.Error().stack;f&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[f]="bbe10438-4c0a-430c-85b9-b62f497c7093",l._sentryDebugIdIdentifier="sentry-dbid-bbe10438-4c0a-430c-85b9-b62f497c7093")}catch{}})();const cn=i((()=>r((()=>import("./ReportsRoutes-DNhWXb3T.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])))),un=i((()=>r((()=>import("./AddressRoutes-DZnn8xs0.js")),__vite__mapDeps([17,1,2,3,18,4,5,6,7,8,16])))),mn=i((()=>r((()=>import("./PeopleRoutes-BbZuMgKW.js")),__vite__mapDeps([19,1,2,3,4,5,6,7,8,20,13,14,15,16])))),hn=i((()=>r((()=>import("./PandLWithForecastRoutes-CUitXoy8.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,20,10,11,13,14,15,16])))),_n=i((()=>r((()=>import("./CustomerOnboardingRoutes-KQwdDIjg.js")),__vite__mapDeps([22,1,2,3,18,4,5,6,7,8,23,24,25,26,27,28,29,30,16])))),pn=i((()=>r((()=>import("./VendorsRoutes-DWNg-EPe.js")),__vite__mapDeps([31,1,2,3,4,5,6,7,18,8,9,32,33,34,35,28,11,20,13,14,15,36,37,16])))),xn=i((()=>r((()=>import("./TransactionDetailRoutes-B7AzD4hg.js")),__vite__mapDeps([38,1,2,3,8,4,5,6,7,28,39,40,20,10,11,41,16])))),fe=i((()=>r((()=>import("./EntityDetailRoutes-BKu8bIme.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,28,43,20,40,10,11,41,35,16])))),En=i((()=>r((()=>import("./DashboardRoutes-VCRBM_Lo.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,43,20,40,28,10,11,41,35,8,12,45,46,13,14,15,47,9,16])))),ye=i((()=>r((()=>import("./BillPayRoutes-CV19o_tt.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,18,8,49,20,10,50,11,13,14,15,36,9,51,45,52,39,53,54,16])))),gn=i((()=>r((()=>import("./SettingsRoutes-DRSU5I7g.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,15,56,13,14,23,24,25,26,27,28,37,18,8,45,50,11,46,29,52,39,53,57,16])))),jn=i((()=>r((()=>import("./InvoicingRoutes-Cn0ho2Ac.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,18,8,13,14,15,23,24,25,26,27,28,16])))),we=i((()=>r((()=>import("./ReimbursementRoutes-DjGiFO3h.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,9,20,10,36,54,57,39,53,16])))),In=i((()=>r((()=>import("./ZeniAccountRoutes-BI00gqox.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,9,49,18,20,61,16])))),Rn=i((()=>r((()=>import("./TreasuryRoutes-DTax48Tc.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,20,10,9,16])))),An=i((()=>r((()=>import("./TransactionListRoutes-BejbKDzL.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,43,20,40,28,10,11,41,35,61,16])))),Tn=i((()=>r((()=>import("./ChargeCardRoutes-BRNnHx29.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,20,13,14,15,51,50,11,8,45,10,30,18,16])))),bn=i((()=>r((()=>import("./NotificationRoutes-j31qfFA3.js")),__vite__mapDeps([65,1,2,3,8,4,5,6,7,20,15,16])))),fn=i((()=>r((()=>import("./PerformanceRoutes-D6iGCdx1.js")),__vite__mapDeps([66,1,2,3,8,4,5,6,7,20,13,14,15,16])))),yn=i((()=>r((()=>import("./ExpenseAutomationRoutes-C-dPVJak.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,20,40,28,10,11,41,34,35,43,32,33,37,36,16])))),wn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-DdqC6TYo.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,34,35,28,11,8,16])))),Cn=i((()=>r((()=>import("./RewardsRoutes-C0czxWPN.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,8,16])))),Dn=i((()=>r((()=>import("./TaskRoutes-Cu7kReic.js")),__vite__mapDeps([70,1,2,3,8,4,5,6,7,10,13,14,15,71,20,72,16])))),vn=i((()=>r((()=>import("./AiCfoScreen-BuC0DF7-.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,47,33,11,72,16])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-CadRu1yE.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,16])))),b=i((()=>r((()=>import("./NotFoundScreen-DD1ftXbM.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,16])))),Un=i((()=>r((()=>import("./TaskListScreen-D8jqZbNF.js").then((l=>l.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,20,13,14,15,72,16]))));function Qn({setTenantEmailDomain:l}){const f=zs(),N=Gs(),{tenantEmailDomain:o}=$s(),V=ln().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ws(),y=T.getSignedInUserTenant(o)?.tenantId,R=T.getSignedInUser(),J=ms(R),G=Ys(),[P,ve]=U.useState(!1),n=z((a=>hs(a))),{useFeatureGate:S}=Js(),M=Ks(),K=Qs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),A=z((a=>a.tenantState.fetchState)),p=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=p==="Completed"||A==="Completed"?_s(te,n):void 0,Q=p==="Completed"||A==="Completed"?ps(n):void 0,oe=p==="Completed"||A==="Completed"?xs(n)&&!Es(n):void 0,Oe=Xs(n,Fe,te),{isCardsHidden:Pe}=en(n?.tenantId),He=!Oe||!!Pe,{isFeatureEnabled:Se}=S(L.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(L.isAiCfoFileUploadEnabled),{isFeatureEnabled:Be}=S(L.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Le=n?.userRole!=null&&gs(n.userRole),$=z((a=>js(a)));if(o!=null){const a=T.getSignedInUserTenant(o);R!=null&&a!=null&&be(R,n,V)}const Z={tenantId:y,userId:R?.userId,sessionId:R?.zeniSessionId},re=Is(),h=sn(),Ne=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ve=Rs(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,Ze=z((a=>Z.tenantId!=null?As(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),l(o)}),[o]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const D=Ts(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=fs();t.isAfter(_,"month")===!1?f(ys(y,{month:D,year:w})):N(`/${o}/month_end_close_checks/review`)}}}),[se,o,y]),U.useEffect((()=>{P||(ve(!0),O(F.TENANT_FETCHING))}),[P,Z,re,R,f,T]),U.useLayoutEffect((()=>{!ws(re,Z)&&T.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(ge(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(je(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=T.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(dn(t)),_?.tenantEmailDomain!=null&&T.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(Z,R,f,Ze))}),[y]),U.useEffect((()=>{T.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,is,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ls=w==null||w.tenantId!==t,ds=w!=null&&w.excludedResources==null,cs=w!=null&&w.externalConnections==null;if(Y&&ls){B(je(t));const q=T.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&T.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(_?.userId,_?.zeniSessionId,t),c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)))}else Y&&ds&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&cs&&c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)));if(Y){ae.identify(_.userId,{tenant_id:t});const q=t==null||t!=null&&(D==="Completed"||D==="Error");if(a==="Completed"||D!=="Not-Started"&&D!=="Error"||t==null||!c.shouldFetchActiveTenant(t)||(c.markActiveTenantFetchStarted(t),is(F.TENANT_FETCHING),B(Zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:us,zeniSessionId:pe}=_;tn((()=>{T.getSignedInUser()?.zeniSessionId===pe?B(Ee(us,pe)):c.markAllTenantsFetchFailed()}),kn)}}})(A,p,n,y,R,O,f))}),[y,p]),U.useEffect((()=>{T.isSignedIn()&&A==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),T.saveSignedInUserTenants(Cs($.tenantsBaseInOrder)),R!=null&&be(R,n,V,void 0,$.tenantsBaseInOrder))}),[$,A,n,R]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?c.markAllTenantsFetchCompleted():A==="Error"&&c.markAllTenantsFetchFailed())}),[p,A,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&p==="Completed"&&P&&(ie.current=!0,nn())}),[p,P]);const v=n?.userRole!=null&&Ds(n?.userRole),{isFeatureEnabled:ze}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:Ge}=S(L.isAccrualEnabled),$e=n?.userRole!=null&&n.userRole.includes("charge_card_user"),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_admin"),k=n?.userRole!=null&&xe(n.userRole),le=n?.company==null||n.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!v,de=!He&&!v,qe=vs(h?.loggedInUserRoleMap),We=n.externalConnections?.accounting[0]?.isValid,Je=n.externalConnections?.fetchState==="Completed",ne=n.company?.companyOnboardingInfo.isOnboardingCompleted,ce=n?.company==null||n.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!v,ue=ce&&Us(h?.loggedInUserRoleMap),me=Ue&&!v,Ke=ke&&!v,Qe=le&&ks(h?.loggedInUserRoleMap),Xe=de&&Fs(h?.loggedInUserRoleMap),es=me&&Os(h?.loggedInUserRoleMap),ss=Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),E=Vs(h?.loggedInUserRoleMap),he=le&&x,_e=ce&&E,g=me&&as,j=Ke&&ts,u=de&&os,rs=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ve===!0||qe===!0||ss===!0||ns===!0;return T.isSignedIn()?y==null?A==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(R!=null&&A!=="In-Progress"&&f(Ee(R.userId,R.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||A==="Completed"?(ne===!0||J&&!ee)&&Je&&We!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||J?!P||ne!==!1||ee||J?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(s,{element:e.jsx(an,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Fn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(En,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(cn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:rs||k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(_n,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||$e||Ye?e.jsx(xn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(An,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:j,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(Un,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(Dn,{})}),e.jsx(s,{path:"address/*",element:Qe||ue||es||Xe?e.jsx(un,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(I,{isAllowed:g,fallback:e.jsx(b,{}),children:e.jsx(In,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(I,{isAllowed:j,fallback:e.jsx(b,{}),children:e.jsx(Rn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(I,{isAllowed:K,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(I,{isAllowed:K&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(I,{isAllowed:K&&!v&&Ge,fallback:e.jsx(b,{}),children:e.jsx(wn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(bn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(I,{isAllowed:Ne,fallback:e.jsx(b,{}),children:e.jsx(pn,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(I,{isAllowed:Se,fallback:e.jsx(b,{}),children:e.jsx(gn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(I,{isAllowed:Be&&Le,fallback:e.jsx(b,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(I,{isAllowed:u&&M,fallback:e.jsx(b,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(I,{isAllowed:u&&M,fallback:e.jsx(b,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(I,{isAllowed:u,fallback:e.jsx(b,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(I,{isAllowed:ze,fallback:e.jsx(b,{}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(vn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(b,{})})]})}):null:(l(void 0),e.jsx(d,{to:`/${o}/onboarding`,replace:!0})):(l(void 0),e.jsx(d,{to:`/${o}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),l(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const kn=5e3,Fn=({isDashboardAccess:l,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(f)return e.jsx(d,{to:"checking"});if(V)return e.jsx(d,{to:"treasury"});if(H)return e.jsx(d,{to:"cards"})}return W===!0&&H?e.jsx(d,{to:"cards"}):l?e.jsx(d,{to:"dashboard"}):f?e.jsx(d,{to:"checking"}):V?e.jsx(d,{to:"treasury"}):H?e.jsx(d,{to:"cards"}):N?e.jsx(d,{to:"bills"}):o?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},I=({children:l,fallback:f,isAllowed:N})=>{const o=on();return N?l:o?e.jsx(rn,{fetchState:"In-Progress"}):f},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{Qn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReportsRoutes-BdGXf5ZW.js","assets/sentry-Bh68thgn.js","assets/core-Cc1CwF93.js","assets/zeni-epic-state-DFhlE0W3.js","assets/index-C9gDoiPZ.js","assets/mui-ehyt9jca.js","assets/analytics-D_VVN36A.js","assets/utils-CjDqL2uk.js","assets/NotFoundScreen-DghvMtNI.js","assets/FeaturePreviewScreen-5EZY4ymu.js","assets/useInitialThreadRequest-UNqcV9yZ.js","assets/routePaths-Qo9PrkRx.js","assets/reportTimeframe-DX5pHUc_.js","assets/MobileAppDrawer-BBfUxZ3Z.js","assets/InboxNotificationsProvider-CPjcPE2w.js","assets/useTaskManagerAccess-CiHwVHGW.js","assets/index-BQ3cXEYt.css","assets/AddressRoutes-BDOBooPT.js","assets/AddressScreen-DNA1AoN1.js","assets/PeopleRoutes-DUMXIx_K.js","assets/useAskAiCfoHostNavButtonProps-Dn-NLDsa.js","assets/PandLWithForecastRoutes-Dl1UJVvN.js","assets/CustomerOnboardingRoutes-6-pJPoxK.js","assets/QBOConnectionScreen-DZ38il0m.js","assets/empty-DhAh77JM.js","assets/index-BJ8vYoNR.js","assets/url-DqRIAQ9M.js","assets/index-foi_vl2g.js","assets/decodeURIComponentSafe-BhSMetwg.js","assets/useEmailConnectResultRefresh-C9tQTK1g.js","assets/useChargeCardPusherEvents-HTI-Gpv-.js","assets/VendorsRoutes-CogcroEr.js","assets/ScheduleDetailsPrepaidExpensesScreen-gxx2-EFd.js","assets/pathToGoBack-jAeSfAQ9.js","assets/useActualMatchingMatchDetail-D3PMymJ7.js","assets/stripSplatSuffix-B0jus2nC.js","assets/DrawerScreen-A-8KPbEP.js","assets/accountMappingHelper-DPBaxZAX.js","assets/TransactionDetailRoutes-zKd3AnPd.js","assets/useEnsureVendorListLoaded-zh5PaZPv.js","assets/TransactionDetailScreen-CzMYbtKa.js","assets/expenseAutomationHelper-CCv2kRkH.js","assets/EntityDetailRoutes-BmBeh8BN.js","assets/withTransactionSidePanel-BclYopZI.js","assets/DashboardRoutes-DJSbRVCa.js","assets/analyticsHelper-DXk7k3Sg.js","assets/CompanyPassportScreen-Bfc4Y68n.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DsRKu7db.js","assets/BillPayRoutes-Bt2WWtCK.js","assets/DomesticWireDetailScreen-DWmkYeuk.js","assets/BusinessVerificationPageScreen-Bfd5tr2J.js","assets/SetupPagesScreen-D34F2few.js","assets/BillPayApprovalRoutes-C6bRRPwn.js","assets/ReimbursementApprovalRuleDetailScreen-B4jqTz0j.js","assets/FallBackRoute-jaHJLYeL.js","assets/SettingsRoutes-rivgMg4F.js","assets/AccountMappingScreen-C10r8FT4.js","assets/ReimbursementApprovalRoutes-BNnHI223.js","assets/InvoicingRoutes-hwg79esy.js","assets/ReimbursementRoutes-DuTeQGc-.js","assets/ZeniAccountRoutes-Bt30AIgn.js","assets/ZeniAccountStatementScreen-DPCVgpTe.js","assets/TreasuryRoutes-I94VefD1.js","assets/TransactionListRoutes-DuGhQU2Q.js","assets/ChargeCardRoutes-CQ3YhqOL.js","assets/NotificationRoutes-dIn5lLFo.js","assets/PerformanceRoutes-DCK_siQo.js","assets/ExpenseAutomationRoutes-CS0uneJ0.js","assets/ActualMatchingMatchDetailScreen-DmpwVVlK.js","assets/RewardsRoutes-BvWFhZRc.js","assets/TaskRoutes-wI7rPjq5.js","assets/TaskListScreen-bLM4yBPa.js","assets/useTaskManagerPusherEvents-B7K0XRHM.js","assets/AiCfoScreen-DnjoSm7p.js","assets/CardsAiCfoScreen-CDRimZMa.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as ms,fI as hs,eq as _s,ep as ps,h7 as xs,d2 as Es,c7 as gs,gM as js,gc as Is,eg as xe,cx as Rs,gq as As,cp as Ts,bE as bs,bv as fs,h8 as ys,v as ws,h9 as Cs,bp as Ds,ha as vs,bK as Us,bJ as ks,br as Fs,cl as Os,hb as Ps,hc as Hs,eb as Ss,ee as Bs,ed as Ls,cw as Ns,cD as Vs,hd as Ee,gl as ge,h0 as Ms,gn as je,gO as Ie,gP as Re,go as Zs,_ as r}from"./zeni-epic-state-DFhlE0W3.js";import{j as e}from"./liveblocks-CM1vcHN_.js";import{a as U}from"./sentry-Bh68thgn.js";import{u as zs,h as Gs,i as $s,g as Ys,j as z,q as Ae,N as d,n as qs,o as s}from"./core-Cc1CwF93.js";import{u as Ws,z as T,p as Js,a as Ks,f as Qs,b as L,i as Xs,L as en,V as sn,c as F,G as Te,t as c,d as nn,P as an,e as ae,r as tn,l as i,B as on,Z as rn}from"./index-C9gDoiPZ.js";import{u as ln}from"./mui-ehyt9jca.js";import{f as be}from"./analyticsHelper-DXk7k3Sg.js";import{t as dn}from"./getLocaleForTenant-Bdg31N9b.js";import{F as C}from"./FallBackRoute-jaHJLYeL.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new l.Error().stack;f&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[f]="bbe10438-4c0a-430c-85b9-b62f497c7093",l._sentryDebugIdIdentifier="sentry-dbid-bbe10438-4c0a-430c-85b9-b62f497c7093")}catch{}})();const cn=i((()=>r((()=>import("./ReportsRoutes-BdGXf5ZW.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])))),un=i((()=>r((()=>import("./AddressRoutes-BDOBooPT.js")),__vite__mapDeps([17,1,2,3,18,4,5,6,7,8,16])))),mn=i((()=>r((()=>import("./PeopleRoutes-DUMXIx_K.js")),__vite__mapDeps([19,1,2,3,4,5,6,7,8,20,13,14,15,16])))),hn=i((()=>r((()=>import("./PandLWithForecastRoutes-Dl1UJVvN.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,20,10,11,13,14,15,16])))),_n=i((()=>r((()=>import("./CustomerOnboardingRoutes-6-pJPoxK.js")),__vite__mapDeps([22,1,2,3,18,4,5,6,7,8,23,24,25,26,27,28,29,30,16])))),pn=i((()=>r((()=>import("./VendorsRoutes-CogcroEr.js")),__vite__mapDeps([31,1,2,3,4,5,6,7,18,8,9,32,33,34,35,28,11,20,13,14,15,36,37,16])))),xn=i((()=>r((()=>import("./TransactionDetailRoutes-zKd3AnPd.js")),__vite__mapDeps([38,1,2,3,8,4,5,6,7,28,39,40,20,10,11,41,16])))),fe=i((()=>r((()=>import("./EntityDetailRoutes-BmBeh8BN.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,28,43,20,40,10,11,41,35,16])))),En=i((()=>r((()=>import("./DashboardRoutes-DJSbRVCa.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,43,20,40,28,10,11,41,35,8,12,45,46,13,14,15,47,9,16])))),ye=i((()=>r((()=>import("./BillPayRoutes-Bt2WWtCK.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,18,8,49,20,10,50,11,13,14,15,36,9,51,45,52,39,53,54,16])))),gn=i((()=>r((()=>import("./SettingsRoutes-rivgMg4F.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,15,56,13,14,23,24,25,26,27,28,37,18,8,45,50,11,46,29,52,39,53,57,16])))),jn=i((()=>r((()=>import("./InvoicingRoutes-hwg79esy.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,18,8,13,14,15,23,24,25,26,27,28,16])))),we=i((()=>r((()=>import("./ReimbursementRoutes-DuTeQGc-.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,9,20,10,36,54,57,39,53,16])))),In=i((()=>r((()=>import("./ZeniAccountRoutes-Bt30AIgn.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,9,49,18,20,61,16])))),Rn=i((()=>r((()=>import("./TreasuryRoutes-I94VefD1.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,51,50,11,13,14,15,45,20,10,9,16])))),An=i((()=>r((()=>import("./TransactionListRoutes-DuGhQU2Q.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,43,20,40,28,10,11,41,35,61,16])))),Tn=i((()=>r((()=>import("./ChargeCardRoutes-CQ3YhqOL.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,20,13,14,15,51,50,11,8,45,10,30,18,16])))),bn=i((()=>r((()=>import("./NotificationRoutes-dIn5lLFo.js")),__vite__mapDeps([65,1,2,3,8,4,5,6,7,20,15,16])))),fn=i((()=>r((()=>import("./PerformanceRoutes-DCK_siQo.js")),__vite__mapDeps([66,1,2,3,8,4,5,6,7,20,13,14,15,16])))),yn=i((()=>r((()=>import("./ExpenseAutomationRoutes-CS0uneJ0.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,20,40,28,10,11,41,34,35,43,32,33,37,36,16])))),wn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-DmpwVVlK.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,34,35,28,11,8,16])))),Cn=i((()=>r((()=>import("./RewardsRoutes-BvWFhZRc.js")),__vite__mapDeps([69,1,2,3,4,5,6,7,8,16])))),Dn=i((()=>r((()=>import("./TaskRoutes-wI7rPjq5.js")),__vite__mapDeps([70,1,2,3,8,4,5,6,7,10,13,14,15,71,20,72,16])))),vn=i((()=>r((()=>import("./AiCfoScreen-DnjoSm7p.js")),__vite__mapDeps([73,1,2,3,4,5,6,7,47,33,11,72,16])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-CDRimZMa.js")),__vite__mapDeps([74,1,2,3,4,5,6,7,16])))),b=i((()=>r((()=>import("./NotFoundScreen-DghvMtNI.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,16])))),Un=i((()=>r((()=>import("./TaskListScreen-bLM4yBPa.js").then((l=>l.f))),__vite__mapDeps([71,1,2,3,4,5,6,7,20,13,14,15,72,16]))));function Qn({setTenantEmailDomain:l}){const f=zs(),N=Gs(),{tenantEmailDomain:o}=$s(),V=ln().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ws(),y=T.getSignedInUserTenant(o)?.tenantId,R=T.getSignedInUser(),J=ms(R),G=Ys(),[P,ve]=U.useState(!1),n=z((a=>hs(a))),{useFeatureGate:S}=Js(),M=Ks(),K=Qs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),A=z((a=>a.tenantState.fetchState)),p=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=p==="Completed"||A==="Completed"?_s(te,n):void 0,Q=p==="Completed"||A==="Completed"?ps(n):void 0,oe=p==="Completed"||A==="Completed"?xs(n)&&!Es(n):void 0,Oe=Xs(n,Fe,te),{isCardsHidden:Pe}=en(n?.tenantId),He=!Oe||!!Pe,{isFeatureEnabled:Se}=S(L.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(L.isAiCfoFileUploadEnabled),{isFeatureEnabled:Be}=S(L.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Le=n?.userRole!=null&&gs(n.userRole),$=z((a=>js(a)));if(o!=null){const a=T.getSignedInUserTenant(o);R!=null&&a!=null&&be(R,n,V)}const Z={tenantId:y,userId:R?.userId,sessionId:R?.zeniSessionId},re=Is(),h=sn(),Ne=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ve=Rs(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,Ze=z((a=>Z.tenantId!=null?As(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),l(o)}),[o]),U.useEffect((()=>{if(se!=null&&y!=null){const a=se.split("-");if(a.length===2){const D=Ts(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=fs();t.isAfter(_,"month")===!1?f(ys(y,{month:D,year:w})):N(`/${o}/month_end_close_checks/review`)}}}),[se,o,y]),U.useEffect((()=>{P||(ve(!0),O(F.TENANT_FETCHING))}),[P,Z,re,R,f,T]),U.useLayoutEffect((()=>{!ws(re,Z)&&T.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(ge(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(je(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=T.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(dn(t)),_?.tenantEmailDomain!=null&&T.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(Z,R,f,Ze))}),[y]),U.useEffect((()=>{T.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,is,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ls=w==null||w.tenantId!==t,ds=w!=null&&w.excludedResources==null,cs=w!=null&&w.externalConnections==null;if(Y&&ls){B(je(t));const q=T.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&T.saveActiveTenantDomainForUser(q?.tenantEmailDomain),ge(_?.userId,_?.zeniSessionId,t),c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)))}else Y&&ds&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&cs&&c.shouldFetchConnections(t)&&(c.markConnectionsFetchStarted(t),B(Re(_.userId,t)));if(Y){ae.identify(_.userId,{tenant_id:t});const q=t==null||t!=null&&(D==="Completed"||D==="Error");if(a==="Completed"||D!=="Not-Started"&&D!=="Error"||t==null||!c.shouldFetchActiveTenant(t)||(c.markActiveTenantFetchStarted(t),is(F.TENANT_FETCHING),B(Zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:us,zeniSessionId:pe}=_;tn((()=>{T.getSignedInUser()?.zeniSessionId===pe?B(Ee(us,pe)):c.markAllTenantsFetchFailed()}),kn)}}})(A,p,n,y,R,O,f))}),[y,p]),U.useEffect((()=>{T.isSignedIn()&&A==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),T.saveSignedInUserTenants(Cs($.tenantsBaseInOrder)),R!=null&&be(R,n,V,void 0,$.tenantsBaseInOrder))}),[$,A,n,R]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?c.markAllTenantsFetchCompleted():A==="Error"&&c.markAllTenantsFetchFailed())}),[p,A,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&p==="Completed"&&P&&(ie.current=!0,nn())}),[p,P]);const v=n?.userRole!=null&&Ds(n?.userRole),{isFeatureEnabled:ze}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:Ge}=S(L.isAccrualEnabled),$e=n?.userRole!=null&&n.userRole.includes("charge_card_user"),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_admin"),k=n?.userRole!=null&&xe(n.userRole),le=n?.company==null||n.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!v,de=!He&&!v,qe=vs(h?.loggedInUserRoleMap),We=n.externalConnections?.accounting[0]?.isValid,Je=n.externalConnections?.fetchState==="Completed",ne=n.company?.companyOnboardingInfo.isOnboardingCompleted,ce=n?.company==null||n.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!v,ue=ce&&Us(h?.loggedInUserRoleMap),me=Ue&&!v,Ke=ke&&!v,Qe=le&&ks(h?.loggedInUserRoleMap),Xe=de&&Fs(h?.loggedInUserRoleMap),es=me&&Os(h?.loggedInUserRoleMap),ss=Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),E=Vs(h?.loggedInUserRoleMap),he=le&&x,_e=ce&&E,g=me&&as,j=Ke&&ts,u=de&&os,rs=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ve===!0||qe===!0||ss===!0||ns===!0;return T.isSignedIn()?y==null?A==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(R!=null&&A!=="In-Progress"&&f(Ee(R.userId,R.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||A==="Completed"?(ne===!0||J&&!ee)&&Je&&We!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||J?!P||ne!==!1||ee||J?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(s,{element:e.jsx(an,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Fn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(En,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(cn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:rs||k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(_n,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||$e||Ye?e.jsx(xn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(An,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:j,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(Un,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(Dn,{})}),e.jsx(s,{path:"address/*",element:Qe||ue||es||Xe?e.jsx(un,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(I,{isAllowed:g,fallback:e.jsx(b,{}),children:e.jsx(In,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(I,{isAllowed:j,fallback:e.jsx(b,{}),children:e.jsx(Rn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(I,{isAllowed:K,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(I,{isAllowed:K&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(I,{isAllowed:K&&!v&&Ge,fallback:e.jsx(b,{}),children:e.jsx(wn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(bn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(I,{isAllowed:Ne,fallback:e.jsx(b,{}),children:e.jsx(pn,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:E,showTreasuryRoute:j,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(I,{isAllowed:Se,fallback:e.jsx(b,{}),children:e.jsx(gn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(I,{isAllowed:Be&&Le,fallback:e.jsx(b,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(I,{isAllowed:u&&M,fallback:e.jsx(b,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(I,{isAllowed:u&&M,fallback:e.jsx(b,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(I,{isAllowed:u,fallback:e.jsx(b,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(I,{isAllowed:ze,fallback:e.jsx(b,{}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(I,{isAllowed:M,fallback:e.jsx(b,{}),children:e.jsx(vn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(b,{})})]})}):null:(l(void 0),e.jsx(d,{to:`/${o}/onboarding`,replace:!0})):(l(void 0),e.jsx(d,{to:`/${o}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),l(void 0),e.jsx(d,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const kn=5e3,Fn=({isDashboardAccess:l,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(f)return e.jsx(d,{to:"checking"});if(V)return e.jsx(d,{to:"treasury"});if(H)return e.jsx(d,{to:"cards"})}return W===!0&&H?e.jsx(d,{to:"cards"}):l?e.jsx(d,{to:"dashboard"}):f?e.jsx(d,{to:"checking"}):V?e.jsx(d,{to:"treasury"}):H?e.jsx(d,{to:"cards"}):N?e.jsx(d,{to:"bills"}):o?e.jsx(d,{to:"reimbursements"}):e.jsx(d,{to:"dashboard"})},I=({children:l,fallback:f,isAllowed:N})=>{const o=on();return N?l:o?e.jsx(rn,{fetchState:"In-Progress"}):f},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{Qn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CM1vcHN_.js";import{a as d}from"./sentry-Bh68thgn.js";import{h as Y,g as Z,u as _,i as O,j as C,l as K,n as Q,o as k}from"./core-Cc1CwF93.js";import{fI as w,Y6 as Pe,Oj as ve,Xi as we,Y7 as Ae,c7 as W,cK as De,cL as Ue,bp as _e,ef as Re,GB as Te,Y8 as Me,PM as Be,Na as Ne,N1 as de,M_ as Ve,GF as ue,N4 as pe,N7 as ge,Nd as X,CJ as ee,GE as Fe,lF as $,lI as me,Y9 as Ye,mS as Oe,GW as Le,Ya as Ge,Yb as $e,lD as Ze,Yc as Ke,lG as He,uV as qe,Yd as ze,Ye as Qe,uZ as Je,i4 as We,Vl as z,hY as ae,hV as Xe,i1 as en,Vm as nn,GT as tn,Yf as an,Yg as on,Nr as sn,ma as rn,ep as fe,eq as he,Yh as ln,gF as cn,V$ as dn,GS as oe,gK as se,gJ as un,GR as pn,gI as gn,gH as mn,Yi as fn,UT as Ce,Yj as hn,Yk as Cn,Yl as bn,Ym as Sn,Yn as yn,Yo as In,GZ as xn,Yp as En,GQ as ie,GK as G,Yq as kn,Yr as jn,Ys as re,Yt as Pn,dF as vn,Yu as wn,Yv as An,Yw as Dn,V3 as Un,dN as _n,dU as Rn,dT as Tn,dO as Mn,Yx as Bn,dR as Nn,dQ as Vn,dS as Fn,dP as Yn}from"./zeni-epic-state-DFhlE0W3.js";import{b0 as On,z as v,V as L,a8 as ne,b7 as Ln,e as H,p as te,b as V,i as be,L as Se,b8 as Gn,s as $n,_ as ye,b9 as Zn,az as Kn,ba as Hn,bb as qn,aC as zn,bc as Qn,v as Jn,m as Ie,bd as Wn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-CM1vcHN_.js";import{a as d}from"./sentry-Bh68thgn.js";import{h as Y,g as Z,u as _,i as O,j as C,l as K,n as Q,o as k}from"./core-Cc1CwF93.js";import{fI as w,Y6 as Pe,Oj as ve,Xi as we,Y7 as Ae,c7 as W,cK as De,cL as Ue,bp as _e,ef as Re,GB as Te,Y8 as Me,PM as Be,Na as Ne,N1 as de,M_ as Ve,GF as ue,N4 as pe,N7 as ge,Nd as X,CJ as ee,GE as Fe,lF as $,lI as me,Y9 as Ye,mS as Oe,GW as Le,Ya as Ge,Yb as $e,lD as Ze,Yc as Ke,lG as He,uV as qe,Yd as ze,Ye as Qe,uZ as Je,i4 as We,Vl as z,hY as ae,hV as Xe,i1 as en,Vm as nn,GT as tn,Yf as an,Yg as on,Nr as sn,ma as rn,ep as fe,eq as he,Yh as ln,gF as cn,V$ as dn,GS as oe,gK as se,gJ as un,GR as pn,gI as gn,gH as mn,Yi as fn,UT as Ce,Yj as hn,Yk as Cn,Yl as bn,Ym as Sn,Yn as yn,Yo as In,GZ as xn,Yp as En,GQ as ie,GK as G,Yq as kn,Yr as jn,Ys as re,Yt as Pn,dF as vn,Yu as wn,Yv as An,Yw as Dn,V3 as Un,dN as _n,dU as Rn,dT as Tn,dO as Mn,Yx as Bn,dR as Nn,dQ as Vn,dS as Fn,dP as Yn}from"./zeni-epic-state-DFhlE0W3.js";import{b0 as On,z as v,V as L,a8 as ne,b7 as Ln,e as H,p as te,b as V,i as be,L as Se,b8 as Gn,s as $n,_ as ye,b9 as Zn,az as Kn,ba as Hn,bb as qn,aC as zn,bc as Qn,v as Jn,m as Ie,bd as Wn}from"./index-C9gDoiPZ.js";import{n as B}from"./mui-ehyt9jca.js";import{u as xe}from"./useTaskManagerAccess-CiHwVHGW.js";import{U as Xn}from"./AccountMappingScreen-C10r8FT4.js";import{t as et,A as nt}from"./AddressScreen-DNA1AoN1.js";import F from"./NotFoundScreen-DghvMtNI.js";import{g as tt}from"./analyticsHelper-DXk7k3Sg.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-Bfd5tr2J.js";import{C as st}from"./CompanyPassportScreen-Bfc4Y68n.js";import{M as T}from"./MobileAppDrawer-BBfUxZ3Z.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-C9tQTK1g.js";import{q as le}from"./QBOConnectionScreen-DZ38il0m.js";import{B as lt}from"./BillPayApprovalRoutes-C6bRRPwn.js";import{R as ct}from"./ReimbursementApprovalRoutes-BNnHI223.js";import"./recharts-tLFME7sM.js";import"./analytics-D_VVN36A.js";import"./plaid-WRjvFkFp.js";import"./dnd-AdUHoEcy.js";import"./stripe-cKAAJElX.js";import"./lottie-BXg_FLck.js";import"./lexical-BRekJTpF.js";import"./pdf-CHwZP-Er.js";import"./utils-CjDqL2uk.js";import"./accountMappingHelper-DPBaxZAX.js";import"./routePaths-Qo9PrkRx.js";import"./InboxNotificationsProvider-CPjcPE2w.js";import"./empty-DhAh77JM.js";import"./pdf-lib-kwPPw7gn.js";import"./index-BJ8vYoNR.js";import"./url-DqRIAQ9M.js";import"./index-foi_vl2g.js";import"./decodeURIComponentSafe-BhSMetwg.js";import"./useEnsureVendorListLoaded-zh5PaZPv.js";import"./ReimbursementApprovalRuleDetailScreen-B4jqTz0j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="91e3a4a7-8c9e-4b38-9dd4-647a2071cea6",e._sentryDebugIdIdentifier="sentry-dbid-91e3a4a7-8c9e-4b38-9dd4-647a2071cea6")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-CM1vcHN_.js";import{h as Y,g as Q,u as ee,i as H,j as k,N,l as W,t as en}from"./core-Cc1CwF93.js";import{bJ as nn,fI as x,cx as tn,It as q,Xi as an,Xl as sn,vc as ne,v0 as te,mK as ae,Cf as L,a12 as be,gJ as We,gI as Ge,gH as Ke,a13 as on,IC as cn,Na as Ce,N1 as he,M_ as Ie,MF as X,N4 as Ae,N7 as _e,Nd as ke,CJ as ve,h2 as rn,cs as dn,eq as un,ep as ln,d2 as pn,br as mn,cl as Fe,ZH as yn,LF as fe,Mh as fn,ZD as gn,bK as Sn,Ov as ge,Oj as bn,Y7 as Cn,XT as hn,Oz as In,OD as An,a0T as je,C8 as _n,Tc as kn,a14 as vn,a15 as Pn,a16 as Tn,a17 as Je,a18 as En,a19 as Dn,a1a as Un,YE as On,a1b as wn,$z as qe,MR as Fn,MJ as xn,a1c as Vn,MN as Bn,$A as Oe,Pj as Xe,mS as jn,v3 as Ye,Ch as Nn,bE as Ne,Ct as Re,cv as Rn,$x as Qe,P9 as we,OS as Ln,OT as zn,OX as Mn,$C as $n,Pc as Le,$y as Zn,a1d as Hn,$B as Wn,P_ as Se,a0$ as Gn,gZ as Kn,JO as Jn,a1e as qn,JT as Xn,JS as Yn}from"./zeni-epic-state-DFhlE0W3.js";import{az as Pe,V as ie,p as ue,b as J,z as E,a9 as se,e as D,a8 as Te,U as Z,cZ as Qn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,D as Be,d0 as at,v as ze,bg as Me,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as dt}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-CM1vcHN_.js";import{h as Y,g as Q,u as ee,i as H,j as k,N,l as W,t as en}from"./core-Cc1CwF93.js";import{bJ as nn,fI as x,cx as tn,It as q,Xi as an,Xl as sn,vc as ne,v0 as te,mK as ae,Cf as L,a12 as be,gJ as We,gI as Ge,gH as Ke,a13 as on,IC as cn,Na as Ce,N1 as he,M_ as Ie,MF as X,N4 as Ae,N7 as _e,Nd as ke,CJ as ve,h2 as rn,cs as dn,eq as un,ep as ln,d2 as pn,br as mn,cl as Fe,ZH as yn,LF as fe,Mh as fn,ZD as gn,bK as Sn,Ov as ge,Oj as bn,Y7 as Cn,XT as hn,Oz as In,OD as An,a0T as je,C8 as _n,Tc as kn,a14 as vn,a15 as Pn,a16 as Tn,a17 as Je,a18 as En,a19 as Dn,a1a as Un,YE as On,a1b as wn,$z as qe,MR as Fn,MJ as xn,a1c as Vn,MN as Bn,$A as Oe,Pj as Xe,mS as jn,v3 as Ye,Ch as Nn,bE as Ne,Ct as Re,cv as Rn,$x as Qe,P9 as we,OS as Ln,OT as zn,OX as Mn,$C as $n,Pc as Le,$y as Zn,a1d as Hn,$B as Wn,P_ as Se,a0$ as Gn,gZ as Kn,JO as Jn,a1e as qn,JT as Xn,JS as Yn}from"./zeni-epic-state-DFhlE0W3.js";import{az as Pe,V as ie,p as ue,b as J,z as E,a9 as se,e as D,a8 as Te,U as Z,cZ as Qn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,D as Be,d0 as at,v as ze,bg as Me,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as dt}from"./index-C9gDoiPZ.js";import{a as h}from"./sentry-Bh68thgn.js";import{u as Ee,n as Ve,D as ut,S as lt}from"./mui-ehyt9jca.js";import{u as pt,d as $e,B as Ue}from"./BusinessVerificationPageScreen-Bfd5tr2J.js";import{M as le}from"./MobileAppDrawer-BBfUxZ3Z.js";import R from"./NotFoundScreen-DghvMtNI.js";import{a as Ze}from"./analyticsHelper-DXk7k3Sg.js";import{d as He}from"./routePaths-Qo9PrkRx.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]="77df951e-bd49-4fde-a501-5201466d019d",e._sentryDebugIdIdentifier="sentry-dbid-77df951e-bd49-4fde-a501-5201466d019d")}catch{}})();const mt=Ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|