@zeniai/web-app-ui 5.4.19-dev → 5.4.19-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-BpJDQCQx.js → AccountMappingScreen-B_TkOsXF.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-fK8c-oot.js → ActualMatchingMatchDetailScreen-BSGSGFd_.js} +1 -1
- package/dist/assets/{AddressRoutes-_bCuEkwx.js → AddressRoutes-MQiA9f7I.js} +1 -1
- package/dist/assets/{AddressScreen-Dh4KOVQ1.js → AddressScreen-2uUNyZUQ.js} +1 -1
- package/dist/assets/{AiCfoScreen-03lSUwaj.js → AiCfoScreen-Da96F691.js} +1 -1
- package/dist/assets/{AppDrawer-DtBNEFvY.js → AppDrawer-CFin-_di.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-D1JvUYMQ.js → BillPayApprovalRoutes-BwX_LelL.js} +1 -1
- package/dist/assets/{BillPayRoutes-DosvZj42.js → BillPayRoutes-CUUTvN-o.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CeIfGxLQ.js → BusinessVerificationPageScreen-tC5awgdj.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-C8_v-BYR.js → CardsAiCfoScreen-B4NEjdpt.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BZz4pRiz.js → ChargeCardRoutes-CS3a4dBG.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-BieP2EZa.js → CompanyPassportScreen-C7Wa5c9G.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-C1MNasE2.js → ConnectionAuthScreen-DxsMDeer.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-DYKZjGKN.js → CustomerOnboardingAuthScreen-BVkOA0eq.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-DyVqaxvR.js → CustomerOnboardingRoutes-x1rT530A.js} +1 -1
- package/dist/assets/{CustomersRoutes-CtL2o5-n.js → CustomersRoutes-CtIzyj1-.js} +1 -1
- package/dist/assets/{DashboardRoutes-7yhAEy7g.js → DashboardRoutes-Bn-AOUEy.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DHs0Czed.js → DefaultTenantHome-DDXT9MvS.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BIF8BW0a.js → DomesticWireDetailScreen-CW_sfUk-.js} +1 -1
- package/dist/assets/{DrawerScreen-XY9r5sqx.js → DrawerScreen-Brp-giik.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CLCMxp18.js → EntityDetailRoutes-D3O2kCNF.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CA-VSGA_.js → ExpenseAutomationRoutes-BK56n2EU.js} +1 -1
- package/dist/assets/{FallBackRoute-BmlOw1z3.js → FallBackRoute-CNk6Evuv.js} +2 -2
- package/dist/assets/{FeaturePreviewScreen-C2u4cMYG.js → FeaturePreviewScreen-BmH3ZYPC.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CdL4B6fj.js → HubSpotOAuthCallbackScreen-8k4tGQBr.js} +1 -1
- package/dist/assets/{InvoicingRoutes-Ds8bd8V8.js → InvoicingRoutes-rTOKf9u7.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BCx3YLpp.js → MagicLinkRoutes-IgFkpGO8.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BJFFKbta.js → MagicLinkSignInScreen-B-E_KmE7.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BLYS912H.js → MobileAppDrawer-BGhooxvb.js} +1 -1
- package/dist/assets/{NotFoundScreen-BDU6ccX1.js → NotFoundScreen-BLdHlF0f.js} +1 -1
- package/dist/assets/{NotificationRoutes-B3DfKahf.js → NotificationRoutes-BwRHNbvw.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DMS9CTOV.js → OAuthConsentScreen-vXwcWLup.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-D4c4br1B.js → PandLWithForecastRoutes-CYeUQPq6.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-BEA834bi.js → PaymentLinkScreen-Nc72L2pE.js} +1 -1
- package/dist/assets/{PeopleRoutes-By8BlbIz.js → PeopleRoutes-HyNYediS.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CQ6Hxkqk.js → PerformanceRoutes-n4YI8VHX.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DyZaNX6V.js → QBOConnectionScreen-BVHythpX.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CPfPh7_I.js → ReimbursementApprovalRoutes-BJQptKVv.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DrgxKZH7.js → ReimbursementApprovalRuleDetailScreen-ChsEhKuN.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Bq5czlC0.js → ReimbursementRoutes-aim1_SRB.js} +1 -1
- package/dist/assets/{ReportsRoutes-DxNr6i5Y.js → ReportsRoutes-MQfVKr-3.js} +1 -1
- package/dist/assets/{RewardsRoutes-CO6TuNiV.js → RewardsRoutes-CndlMuVb.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BxMaq7Gq.js → ScheduleDetailsPrepaidExpensesScreen-Dk3kI_um.js} +1 -1
- package/dist/assets/{ScreenRoutes-LEc4L-Ek.js → ScreenRoutes-DI5tHgnr.js} +2 -2
- package/dist/assets/{SettingsRoutes-Cc8RIjZt.js → SettingsRoutes-DLMgjhfW.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BgAn4bD3.js → SetupPagesScreen-F5zTUkYx.js} +1 -1
- package/dist/assets/{SignInScreen-Di05f1i8.js → SignInScreen-DjuqZad6.js} +1 -1
- package/dist/assets/{SignOutScreen-CiQsSj2I.js → SignOutScreen-XXabWAFl.js} +1 -1
- package/dist/assets/{TaskListScreen-CBFYc4EW.js → TaskListScreen-BwZHMLXv.js} +1 -1
- package/dist/assets/{TaskRoutes-w6Z4j7Vq.js → TaskRoutes-B6TIhT3s.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-ggKexh3-.js → TransactionDetailRoutes-DIaZtep2.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BBWVy8TW.js → TransactionDetailScreen-CRhyoXmE.js} +1 -1
- package/dist/assets/{TransactionListRoutes-B7kikvJW.js → TransactionListRoutes-BoaLC6AE.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DnYXMIpO.js → TreasuryRoutes-BQGJgpKX.js} +1 -1
- package/dist/assets/{VendorsRoutes-BtVR0Vii.js → VendorsRoutes-CyVKSXys.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-8Hcaa3Fc.js → WiseConfirmationScreen-CcXko6Yq.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-VM-T0h6_.js → ZeniAccountRoutes-FyNmEtGc.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CM9U5Zls.js → ZeniAccountStatementScreen-CiCl4r2I.js} +1 -1
- package/dist/assets/{analyticsHelper-CKG9W7dC.js → analyticsHelper-C_Bq8-qH.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CI9ZVduS.js → getLocaleForTenant-D-NWQxBL.js} +1 -1
- package/dist/assets/{index-Dme9CBSK.js → index-B1jJZ6kq.js} +6 -6
- package/dist/assets/{routePaths-TIOEKAr9.js → routePaths-Dpxra6eQ.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-ClGwke9Y.js → useActualMatchingMatchDetail-Y4mqKvG2.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CF91keX4.js → useAiCfoDashboardSuggestedQuestionsChips-DLTMg2t8.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DO-bnRp-.js → useAskAiCfoHostNavButtonProps-B2P8ke_p.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-DTd9bnXH.js → useChargeCardPusherEvents-D7fAhhEd.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BJWnx3gQ.js → useEmailConnectResultRefresh-BlELL7U2.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DCdvOJx6.js → useInitialThreadRequest-C-eszkgP.js} +1 -1
- package/dist/assets/{useIsCustomersTabEnabled-DZ7jecHx.js → useIsCustomersTabEnabled-Bs9VGXUR.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-Z6bIfXqO.js → useTaskManagerAccess-ByBT4RdT.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-Doj7t2BI.js → useTaskManagerPusherEvents-hrwd8lXy.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DybBA6JZ.js → withTransactionSidePanel-Bcsqg7yc.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
package/dist/assets/{PandLWithForecastRoutes-D4c4br1B.js → PandLWithForecastRoutes-CYeUQPq6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-XOqCw7q2.js";import{h as Y,u as G,g as z,i as J,j as d,l as Z,n as H,o as C}from"./core-BVdj_noT.js";import{fJ as v,AT as R,vw as K,a25 as w,vr as T,bp as Q,e0 as X,vs as ee,a26 as ae,Ze as S,ej as te,EL as se,a27 as oe,F8 as re,er as ne,eq as ce}from"./zeni-epic-state-BSu6fdxh.js";import{az as ie,z as le,aC as de,al as me,V as fe,a9 as pe,c as M,dl as ue,s as he,p as Fe,_ as ge}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-XOqCw7q2.js";import{h as Y,u as G,g as z,i as J,j as d,l as Z,n as H,o as C}from"./core-BVdj_noT.js";import{fJ as v,AT as R,vw as K,a25 as w,vr as T,bp as Q,e0 as X,vs as ee,a26 as ae,Ze as S,ej as te,EL as se,a27 as oe,F8 as re,er as ne,eq as ce}from"./zeni-epic-state-BSu6fdxh.js";import{az as ie,z as le,aC as de,al as me,V as fe,a9 as pe,c as M,dl as ue,s as he,p as Fe,_ as ge}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import be from"./NotFoundScreen-BLdHlF0f.js";import{F as Ie}from"./FeaturePreviewScreen-BmH3ZYPC.js";import{a as F}from"./sentry-CNIAdl-1.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{u as Se}from"./useInitialThreadRequest-C-eszkgP.js";import{a as Te}from"./routePaths-Dpxra6eQ.js";import{M as ye}from"./MobileAppDrawer-BGhooxvb.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.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]="d47149e1-f7f4-4b53-b816-3b79927edfd7",s._sentryDebugIdIdentifier="sentry-dbid-d47149e1-f7f4-4b53-b816-3b79927edfd7")}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=Z((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),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,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=Y(),a=G(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=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)),L=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:$}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&b)u(!0),l||a(K());else if(l&&!m){A(!0);const t=((f,E,O)=>E!=null?f.forecasts.findIndex((I=>I.id===E)):O!=null?f.forecasts.findIndex((I=>I.id===O)):f.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&&!L(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,T,b]);const k=fe(),q=k?.loggedInUserRole!=null&&Q(k.loggedInUserRole),B=Se(x?.companyId,{clearParams:l&&m}),[V,W]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{W(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:V,handleDrawerToggle:P}),n.jsx(Ae,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:L,meetingUrl:X(h.toString()),hasTransactionAccess:q,isAiCfoAccessEnabled:N,onAskAiCfoClick:$,initialOpenThreadRequest:B,onClickMenuIcon:()=>{P(!0)}})]})}function Ze(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(H,{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(be,{})})]})}export{Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-XOqCw7q2.js";import{a as p}from"./sentry-CNIAdl-1.js";import{N as r,aa as u,ae as f,af as h}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-XOqCw7q2.js";import{a as p}from"./sentry-CNIAdl-1.js";import{N as r,aa as u,ae as f,af as h}from"./index-B1jJZ6kq.js";import{s as c}from"./mui-BZ0jnpww.js";import{i as y}from"./core-BVdj_noT.js";import"./zeni-epic-state-BSu6fdxh.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="871995c7-dd1a-4737-9534-e0746a0a457e",e._sentryDebugIdIdentifier="sentry-dbid-871995c7-dd1a-4737-9534-e0746a0a457e")}catch{}})();const g=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-XOqCw7q2.js";import{_w as re,fJ as N,mb as G,er as Y,eq as le,Tj as Q,Wa as ce,DB as Pe,_x as J,Dq as je,DL as Le,DF as de,Du as pe,DJ as Te,DG as ve,_y as ue,sS as Re,ga as Ae,gH as Fe,_z as z,Dy as me,Dx as ge,DO as Oe,c8 as Ve}from"./zeni-epic-state-BSu6fdxh.js";import{a2 as fe,p as X,_ as H,z as K,i as he,K as Ce,ag as ye,aL as be,bZ as Ze,ac as Se,N as O,ah as De,G as M,b_ as Be,aC as Ue,al as _e,a9 as $e,c as we,R as ze,s as He,b$ as Ge,V as Ke}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-XOqCw7q2.js";import{_w as re,fJ as N,mb as G,er as Y,eq as le,Tj as Q,Wa as ce,DB as Pe,_x as J,Dq as je,DL as Le,DF as de,Du as pe,DJ as Te,DG as ve,_y as ue,sS as Re,ga as Ae,gH as Fe,_z as z,Dy as me,Dx as ge,DO as Oe,c8 as Ve}from"./zeni-epic-state-BSu6fdxh.js";import{a2 as fe,p as X,_ as H,z as K,i as he,K as Ce,ag as ye,aL as be,bZ as Ze,ac as Se,N as O,ah as De,G as M,b_ as Be,aC as Ue,al as _e,a9 as $e,c as we,R as ze,s as He,b$ as Ge,V as Ke}from"./index-B1jJZ6kq.js";import{D as xe,n as W,S as Ie}from"./mui-BZ0jnpww.js";import ae from"./NotFoundScreen-BLdHlF0f.js";import{a as c}from"./sentry-CNIAdl-1.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-BVdj_noT.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{M as Ye}from"./MobileAppDrawer-BGhooxvb.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.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]="ff28d8d0-73b6-4f2e-8bc9-aefd18ce307f",e._sentryDebugIdIdentifier="sentry-dbid-ff28d8d0-73b6-4f2e-8bc9-aefd18ce307f")}catch{}})();const Qe={overlayWidth:new Se(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(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=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),T=le(p),v=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=()=>{V===!0?S(!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:A}=Ce(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:_,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:R,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor: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-XOqCw7q2.js";import E from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-XOqCw7q2.js";import E from"./NotFoundScreen-BLdHlF0f.js";import{a as r}from"./sentry-CNIAdl-1.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 b}from"./core-BVdj_noT.js";import{fJ as B,a3G as h,bn as F,bm as N,iX as V,gl as G}from"./zeni-epic-state-BSu6fdxh.js";import{j as J,z as I,al as X,ec as $}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{M as H}from"./MobileAppDrawer-BGhooxvb.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.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]="61945a16-bbb5-4785-af3e-bdae63a3f165",e._sentryDebugIdIdentifier="sentry-dbid-61945a16-bbb5-4785-af3e-bdae63a3f165")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),l=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:l??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),L=()=>{const e=_(),t=v(),l=J(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,j=N(d),x=C||k||j,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(G({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),D=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:l,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-XOqCw7q2.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-CNIAdl-1.js";import{L as ge,e0 as xc,fJ as kc,U_ as Tc,a1t as jl,c8 as xl}from"./zeni-epic-state-BSu6fdxh.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-BtSqr9lx.js";import{r as cn}from"./empty-C5tm1JkN.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BIDHf6ZS.js";import{r as Ye,a as Fl}from"./index-Ch4hjMoy.js";import{r as Ul}from"./index-BtE2ozWs.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BVdj_noT.js";import{d4 as Zl,W as Hl,u as Vl,z as Rc,L as Yl,d5 as Wl,J as Kl}from"./index-
|
|
1
|
+
import{j as _l}from"./liveblocks-XOqCw7q2.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-CNIAdl-1.js";import{L as ge,e0 as xc,fJ as kc,U_ as Tc,a1t as jl,c8 as xl}from"./zeni-epic-state-BSu6fdxh.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-BtSqr9lx.js";import{r as cn}from"./empty-C5tm1JkN.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-BIDHf6ZS.js";import{r as Ye,a as Fl}from"./index-Ch4hjMoy.js";import{r as Ul}from"./index-BtE2ozWs.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BVdj_noT.js";import{d4 as Zl,W as Hl,u as Vl,z as Rc,L as Yl,d5 as Wl,J as Kl}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import{d as It}from"./decodeURIComponentSafe-JMSvQveN.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]="c7fcf9fc-a0ae-4a7b-9e73-105a4fc68ab4",e._sentryDebugIdIdentifier="sentry-dbid-c7fcf9fc-a0ae-4a7b-9e73-105a4fc68ab4")}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-XOqCw7q2.js";import z from"./NotFoundScreen-
|
|
1
|
+
import{j as r}from"./liveblocks-XOqCw7q2.js";import z from"./NotFoundScreen-BLdHlF0f.js";import{a as p}from"./sentry-CNIAdl-1.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as X,o as g}from"./core-BVdj_noT.js";import{fJ as x,Yi as w,XW as h,Ox as U,Ot as B,Ow as f,Om as L,XY as N,Oq as Y,Oz as q}from"./zeni-epic-state-BSu6fdxh.js";import{z as T,w as $,bl as J,B as W,b0 as K,bm as F}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import{u as G}from"./useEnsureVendorListLoaded-U686iOkV.js";import{R as E}from"./ReimbursementApprovalRuleDetailScreen-ChsEhKuN.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]="b889dbd4-154c-46fe-932a-900bbd4bad34",e._sentryDebugIdIdentifier="sentry-dbid-b889dbd4-154c-46fe-932a-900bbd4bad34")}catch{}})();const j="reimbursement-approval-rule-update",H=O((function(e){return{approvalView:w(e),remiSetupApproverViewUpdateData:h(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(J)),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)),d=u((o=>x(o))),c=u((o=>w(o))),S=u((o=>h(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{S?.updateStatus.fetchState==="Completed"&&a(U())}),[S]),p.useEffect((()=>{t||b!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,c,a]);const m={events:d.companyId!=null?[`private-encrypted-${d.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return d?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(H,{currentTenant:d,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=O((function(e){const s=w(e),n=h(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(N(!1))},onBackClick:()=>{W(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(q(t,!0))}}}))($(F)),Q=()=>{const e=u((a=>x(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=K(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,d]=p.useState(!1),c=u((i=>i.remiSetupApproverViewState.fetchState)),S=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>x(i))),o=u((i=>w(i)));G();const y=u((i=>h(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||c!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,c,e,a]),p.useEffect((()=>{v||S!=="Not-Started"||e||(R(!0),a(Y(!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||(d(!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(X,{children:[r.jsx(g,{path:"/",element:r.jsx(Q,{})}),r.jsx(g,{path:"/new",element:r.jsx(E,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(E,{})}),r.jsx(g,{path:"*",element:r.jsx(z,{})})]})}export{ue as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-XOqCw7q2.js";import{a as y}from"./sentry-CNIAdl-1.js";import{h as T,u as C,g as _,i as V,j as S,l as k}from"./core-BVdj_noT.js";import{XW as E,Yi as U,Op as j,OC as B,Ox as A,Oy as w,YR as F,fJ as Y,Ow as z}from"./zeni-epic-state-BSu6fdxh.js";import{z as N,a8 as P,bn as J,B as $,b0 as K,bo as L}from"./index-
|
|
1
|
+
import{j as g}from"./liveblocks-XOqCw7q2.js";import{a as y}from"./sentry-CNIAdl-1.js";import{h as T,u as C,g as _,i as V,j as S,l as k}from"./core-BVdj_noT.js";import{XW as E,Yi as U,Op as j,OC as B,Ox as A,Oy as w,YR as F,fJ as Y,Ow as z}from"./zeni-epic-state-BSu6fdxh.js";import{z as N,a8 as P,bn as J,B as $,b0 as K,bo as L}from"./index-B1jJZ6kq.js";import{u as q}from"./mui-BZ0jnpww.js";import{u as X}from"./useEnsureVendorListLoaded-U686iOkV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="fd37a3ec-62c8-46cb-bf85-234566b12c5d",e._sentryDebugIdIdentifier="sentry-dbid-fd37a3ec-62c8-46cb-bf85-234566b12c5d")}catch{}})();const G=k((function(e,p){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=o==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return p.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===p.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:o}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=$(p.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=(R=m.value,F(R)==null);var R;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("../")}}}))(J);function H(){const e=T(),p=C(),t=_(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=q(),r=S((n=>E(n))),l=S((n=>U(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),p(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(G,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t})}function se(e){return F(e)==null}const M=k((function(e,p){const t=E(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:s,vendorNamesById:i,editingRuleId:o==="approval_update"?p.approvalRuleId:void 0,allApprovalRulesWithUser:U(e).allApprovalRules}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=$(p.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const R=f.actorKind?.selectedOption,W=f.selectedRole?.selectedNonUsers??[];let D=[];R==="role"?D=W.map((O=>({type:"attribute",subType:O.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):R==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((O=>({type:"user",subType:void 0,userId:O.userId,idType:"user",isImplicitActor:!1}))));const x=f.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,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`)}}}))(L);function ne(){const e=S((t=>Y(t))),{isApprovalRulesV3Enabled:p}=K(e?.tenantId);return p?g.jsx(Q,{}):g.jsx(H,{})}function Q(){const e=T(),p=C(),t=_(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=q(),r=S((n=>E(n))),l=S((n=>U(n))),[a,d]=y.useState(!1);if(X(),y.useEffect((()=>{a||(d(!0),p(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t},o??"new")}export{ne as R,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-XOqCw7q2.js";import{u as ae,j as v,h as Q,g as J,i as ie,N,l as ee,q as lt,n as mt,o as E}from"./core-BVdj_noT.js";import{fJ as Z,Ot as ct,Xx as ge,c8 as he,Nz as Fe,mm as dt,NO as ce,NN as de,Xy as ut,bm as fe,g_ as Le,Xz as pt,VS as bt,mb as $e,VU as ke,VT as gt,kZ as ht,Xo as ft,lc as St,Nn as It,CT as yt,l4 as Rt,O8 as Ne,XA as Pe,XB as Ce,XC as At,XD as vt,XE as kt,NU as we,li as Ct,XF as wt,NM as xt,Nx as Et,XG as Bt,Nw as Tt,XH as Dt,NE as xe,NY as jt,NX as Ut,NT as Ft,XI as Me,Tj as Lt,bn as $t,NH as Nt,Oq as Pt,XJ as Mt,XK as Ot,O4 as _t,O1 as Ee,WU as Xt,Nu as zt,XL as Oe,OT as Be,O$ as Gt,XM as Vt,XN as Y,XO as Zt,XP as _e,XQ as Ht,XR as Xe,XS as ze,Og as ue,d1 as Wt,bL as Se,cF as Ie,er as Ge,eq as Ve,XT as Yt,gl as qt,X5 as Jt,XU as Kt,XV as Ze,X9 as Qt,XW as en,XX as tn,XY as nn,OY as Te,OX as an,XZ as sn,X_ as on,X$ as rn,Y0 as ln,Y1 as mn,Y2 as cn,OO as dn,OS as un,bp as pn,bK as bn,cz as gn,cm as hn,bs as fn,hb as Sn,ec as In,ef as yn,ee as Rn,cy as An}from"./zeni-epic-state-BSu6fdxh.js";import{b0 as vn,j as He,a2 as We,p as oe,_ as F,z as L,b1 as Ye,a9 as re,c as x,aM as De,N as j,af as se,ag as kn,G as qe,b2 as Cn,s as q,al as Je,b3 as wn,V as le,b4 as xn,aC as En,ac as Bn,a8 as ye,R as Ke,w as Tn,aP as Dn,aj as jn,az as Un,b5 as Fn,i as Ln}from"./index-Dme9CBSK.js";import{n as P,S as $n,u as Qe}from"./mui-BZ0jnpww.js";import pe from"./NotFoundScreen-BDU6ccX1.js";import{S as je}from"./SetupPagesScreen-BgAn4bD3.js";import{F as et}from"./FeaturePreviewScreen-C2u4cMYG.js";import{a as g}from"./sentry-CNIAdl-1.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import{u as tt}from"./useInitialThreadRequest-DCdvOJx6.js";import{D as Nn}from"./DrawerScreen-XY9r5sqx.js";import{M as nt}from"./MobileAppDrawer-BLYS912H.js";import{F as Pn}from"./FallBackRoute-BmlOw1z3.js";import{R as Mn}from"./ReimbursementApprovalRoutes-CPfPh7_I.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./BusinessVerificationPageScreen-CeIfGxLQ.js";import"./routePaths-TIOEKAr9.js";import"./analyticsHelper-CKG9W7dC.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.js";import"./useIsCustomersTabEnabled-DZ7jecHx.js";import"./useEnsureVendorListLoaded-U686iOkV.js";import"./ReimbursementApprovalRuleDetailScreen-DrgxKZH7.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]="70dc3856-5846-41a2-943f-6dcf8d0ef44c",e._sentryDebugIdIdentifier="sentry-dbid-70dc3856-5846-41a2-943f-6dcf8d0ef44c")}catch{}})();const at=e=>`/${e}/reimbursements`,On=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:W,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),_n=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:$e(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(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},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(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({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(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),m=He(),c=We(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>Z(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(w?.userRole??[]);(function(){const b=ae(),O=v((K=>Z(K))),_=O?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:H}=vn(_),z=v((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{_==null||H||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[_,H,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Fe(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const 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"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{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=>(O=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&O.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:W.upload,single:ne.dropReceipt.single,or:W.texts.or,multiple:ne.dropReceipt.multiple,receipts:W.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Zn,{onClick:()=>a(!1),children:s.jsx(On,{})}),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:W.upload,single:ne.dropReceipt.single,or:W.texts.or,multiple:ne.dropReceipt.multiple,receipts:W.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:c,children:s.jsx(_n,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Ye,{isNewReimbursement:r==null})}const Xn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-XOqCw7q2.js";import{u as ae,j as v,h as Q,g as J,i as ie,N,l as ee,q as lt,n as mt,o as E}from"./core-BVdj_noT.js";import{fJ as Z,Ot as ct,Xx as ge,c8 as he,Nz as Fe,mm as dt,NO as ce,NN as de,Xy as ut,bm as fe,g_ as Le,Xz as pt,VS as bt,mb as $e,VU as ke,VT as gt,kZ as ht,Xo as ft,lc as St,Nn as It,CT as yt,l4 as Rt,O8 as Ne,XA as Pe,XB as Ce,XC as At,XD as vt,XE as kt,NU as we,li as Ct,XF as wt,NM as xt,Nx as Et,XG as Bt,Nw as Tt,XH as Dt,NE as xe,NY as jt,NX as Ut,NT as Ft,XI as Me,Tj as Lt,bn as $t,NH as Nt,Oq as Pt,XJ as Mt,XK as Ot,O4 as _t,O1 as Ee,WU as Xt,Nu as zt,XL as Oe,OT as Be,O$ as Gt,XM as Vt,XN as Y,XO as Zt,XP as _e,XQ as Ht,XR as Xe,XS as ze,Og as ue,d1 as Wt,bL as Se,cF as Ie,er as Ge,eq as Ve,XT as Yt,gl as qt,X5 as Jt,XU as Kt,XV as Ze,X9 as Qt,XW as en,XX as tn,XY as nn,OY as Te,OX as an,XZ as sn,X_ as on,X$ as rn,Y0 as ln,Y1 as mn,Y2 as cn,OO as dn,OS as un,bp as pn,bK as bn,cz as gn,cm as hn,bs as fn,hb as Sn,ec as In,ef as yn,ee as Rn,cy as An}from"./zeni-epic-state-BSu6fdxh.js";import{b0 as vn,j as He,a2 as We,p as oe,_ as F,z as L,b1 as Ye,a9 as re,c as x,aM as De,N as j,af as se,ag as kn,G as qe,b2 as Cn,s as q,al as Je,b3 as wn,V as le,b4 as xn,aC as En,ac as Bn,a8 as ye,R as Ke,w as Tn,aP as Dn,aj as jn,az as Un,b5 as Fn,i as Ln}from"./index-B1jJZ6kq.js";import{n as P,S as $n,u as Qe}from"./mui-BZ0jnpww.js";import pe from"./NotFoundScreen-BLdHlF0f.js";import{S as je}from"./SetupPagesScreen-F5zTUkYx.js";import{F as et}from"./FeaturePreviewScreen-BmH3ZYPC.js";import{a as g}from"./sentry-CNIAdl-1.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{u as tt}from"./useInitialThreadRequest-C-eszkgP.js";import{D as Nn}from"./DrawerScreen-Brp-giik.js";import{M as nt}from"./MobileAppDrawer-BGhooxvb.js";import{F as Pn}from"./FallBackRoute-CNk6Evuv.js";import{R as Mn}from"./ReimbursementApprovalRoutes-BJQptKVv.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./BusinessVerificationPageScreen-tC5awgdj.js";import"./routePaths-Dpxra6eQ.js";import"./analyticsHelper-C_Bq8-qH.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.js";import"./useEnsureVendorListLoaded-U686iOkV.js";import"./ReimbursementApprovalRuleDetailScreen-ChsEhKuN.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]="70dc3856-5846-41a2-943f-6dcf8d0ef44c",e._sentryDebugIdIdentifier="sentry-dbid-70dc3856-5846-41a2-943f-6dcf8d0ef44c")}catch{}})();const at=e=>`/${e}/reimbursements`,On=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:W,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=qe.getLocalizedStrings(),_n=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:$e(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(Ft(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},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(vt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({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(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),m=He(),c=We(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(F.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(F.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=Re({mobileExploreReferrer:"Reimbursement Details"}),B=J().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,R]=g.useState(!1),S=L.getSignedInUser(),w=v((b=>Z(b))),h=v((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),U=he(w?.userRole??[]);(function(){const b=ae(),O=v((K=>Z(K))),_=O?.tenantId,{isApprovalRulesV3Enabled:X,isLoading:H}=vn(_),z=v((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{_==null||H||z==="Not-Started"&&b(ct(!0,!1,!1,X))}),[_,H,X,z,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(R(!0),t(Fe(!1,I,u,r)))}));const A=v((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const 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"||U&&h.billStatus==="rejected"||U===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{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=>(O=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&O.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:W.upload,single:ne.dropReceipt.single,or:W.texts.or,multiple:ne.dropReceipt.multiple,receipts:W.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Zn,{onClick:()=>a(!1),children:s.jsx(On,{})}),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:W.upload,single:ne.dropReceipt.single,or:W.texts.or,multiple:ne.dropReceipt.multiple,receipts:W.texts.receipts2}})]}):null,s.jsx(Hn,{windowSize:c,children:s.jsx(_n,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Ye,{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-XOqCw7q2.js";import{g as te,h as Ze,u as ve,i as Ve,j as _,l as Ue,n as xe,o as oe}from"./core-BVdj_noT.js";import{fJ as K,EW as I,Wi as ze,mb as ue,uB as he,vq as v,lS as O,l$ as D,lT as P,kW as A,kN as E,kM as M,DZ as V,vv as ye,bp as Ge,Wa as He,bm as Ne,Fi as qe,YS as $e,YT as We,ca as R,DS as ne,YU as re,YV as Qe,YW as Je,YX as Ke,YY as Xe,YZ as ea,Y_ as aa,Y$ as sa,Z0 as ta,Z1 as oa,Z2 as na,Z3 as ra,Z4 as la,Z5 as j,Z6 as U,Z7 as x,Z8 as z,Z9 as G,Za as H,Zb as N,Zc as q,Zd as $,Ze as W,ej as ca,EY as ia,EK as le,EL as ce,F2 as da,EP as ie,bF as k,VY as de,d2 as pe,EQ as _e,F8 as pa,Zf as _a,Zg as fa,Zh as ba,Zi as ma,Zj as ua,Zk as ha,Zl as ya,Zm as Ca,Zn as ga,Zo as wa,er as Ra,eq as Sa}from"./zeni-epic-state-BSu6fdxh.js";import{bp as Ia,at as Ta,bq as ja,g as ka,a2 as Fa,p as Ce,_ as Q,z as ge,aC as Oa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Ma,c as J,R as Ba,E as La,s as we,br as Ya,ax as Za,aj as va}from"./index-Dme9CBSK.js";import"./mui-BZ0jnpww.js";import Va from"./NotFoundScreen-BDU6ccX1.js";import{F as Ua}from"./FeaturePreviewScreen-C2u4cMYG.js";import{a as u}from"./sentry-CNIAdl-1.js";import{u as xa}from"./useInitialThreadRequest-DCdvOJx6.js";import{a as fe,c as be,b as za}from"./routePaths-TIOEKAr9.js";import{t as me}from"./reportTimeframe-BTqRG1HM.js";import{M as Ga}from"./MobileAppDrawer-BLYS912H.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.js";import"./useIsCustomersTabEnabled-DZ7jecHx.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]="fb770e76-cfcb-4cc5-8298-f3e60f781d2d",e._sentryDebugIdIdentifier="sentry-dbid-fb770e76-cfcb-4cc5-8298-f3e60f781d2d")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],S=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(W({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(U({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(ga()),e(wa())},qa=Ue((function(e){const o=ge.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=I(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:J,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=k(a),i=k(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(V());break;case"balance_sheet":e(M(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(M(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(M(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:B}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:B}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(S(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?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=we(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(W({scrollPosition:s}));break;case"profit_and_loss_by_classes":e($({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(q({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(U({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(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(q({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(U({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=S(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):S(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):S(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=S(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():V())},onUpdateDisplayOrder:a=>{e(We(a))},onUpdateReportFormat:a=>{Na(e),e($e(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"?qe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ya);function $a(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Fa(),m=Za(b),a=Ze(),s=ve(),t=te(),{tenantEmailDomain:n}=Ve(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=ge.getSignedInUser(),[p,B]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Se=L.masterTOSInfo?.isMasterTOSAccepted??!1,Ie=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),g=_((l=>I(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),Y=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),w=_((l=>he(l))),ke=_((l=>I(l).isCompareModeOn)),C=_((l=>I(l).filter)),Z=_((l=>I(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(B(!0),s(v(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&g==="Completed"&&y&&(s(v(c.userId,!1,!0,!1)),Re(!0))}),[p,X,g,y]),u.useEffect((()=>{if(p&&Z.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(Y){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":w&&s(V());break;case"balance_sheet":s(M(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":w&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":w&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,Y,Z,y,T,w]);const ee=Da(),Oe=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:Me}=l,{pathname:Be}=te(),se=Ia(Be??"")==="reports",Le=Ta(Me),Ye=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Le,pageContexts:Ye})})({isDataReady:g==="Completed"}),Ea({isDataReady:g==="Completed"}),f.jsxs(f.Fragment,{children:[g==="Completed"?f.jsx(Ma,{analytics:J,onLoad:l=>l.trackPageLoaded(Ba.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx(qa,{firstMonthOfFY:Ie,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:Y,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:w,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:Z,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Se)if(m){const l=we(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function Cs(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Sa(e);return m===!0||a===!0?f.jsx(Ua,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx($a,{})}),f.jsx(oe,{path:"*",element:f.jsx(Va,{})})]})}export{Cs as default};
|
|
1
|
+
import{j as f}from"./liveblocks-XOqCw7q2.js";import{g as te,h as Ze,u as ve,i as Ve,j as _,l as Ue,n as xe,o as oe}from"./core-BVdj_noT.js";import{fJ as K,EW as I,Wi as ze,mb as ue,uB as he,vq as v,lS as O,l$ as D,lT as P,kW as A,kN as E,kM as M,DZ as V,vv as ye,bp as Ge,Wa as He,bm as Ne,Fi as qe,YS as $e,YT as We,ca as R,DS as ne,YU as re,YV as Qe,YW as Je,YX as Ke,YY as Xe,YZ as ea,Y_ as aa,Y$ as sa,Z0 as ta,Z1 as oa,Z2 as na,Z3 as ra,Z4 as la,Z5 as j,Z6 as U,Z7 as x,Z8 as z,Z9 as G,Za as H,Zb as N,Zc as q,Zd as $,Ze as W,ej as ca,EY as ia,EK as le,EL as ce,F2 as da,EP as ie,bF as k,VY as de,d2 as pe,EQ as _e,F8 as pa,Zf as _a,Zg as fa,Zh as ba,Zi as ma,Zj as ua,Zk as ha,Zl as ya,Zm as Ca,Zn as ga,Zo as wa,er as Ra,eq as Sa}from"./zeni-epic-state-BSu6fdxh.js";import{bp as Ia,at as Ta,bq as ja,g as ka,a2 as Fa,p as Ce,_ as Q,z as ge,aC as Oa,V as Da,a as Pa,ar as Aa,al as Ea,a9 as Ma,c as J,R as Ba,E as La,s as we,br as Ya,ax as Za,aj as va}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import Va from"./NotFoundScreen-BLdHlF0f.js";import{F as Ua}from"./FeaturePreviewScreen-BmH3ZYPC.js";import{a as u}from"./sentry-CNIAdl-1.js";import{u as xa}from"./useInitialThreadRequest-C-eszkgP.js";import{a as fe,c as be,b as za}from"./routePaths-Dpxra6eQ.js";import{t as me}from"./reportTimeframe-BTqRG1HM.js";import{M as Ga}from"./MobileAppDrawer-BGhooxvb.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.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]="fb770e76-cfcb-4cc5-8298-f3e60f781d2d",e._sentryDebugIdIdentifier="sentry-dbid-fb770e76-cfcb-4cc5-8298-f3e60f781d2d")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],S=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(W({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(U({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(ga()),e(wa())},qa=Ue((function(e){const o=ge.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=I(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:J,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=k(a),i=k(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(V());break;case"balance_sheet":e(M(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(M(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(M(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=k(a),d=k(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:B}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:B}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(j(a)),(S(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?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=we(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(W({scrollPosition:s}));break;case"profit_and_loss_by_classes":e($({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(q({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(U({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(W({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(q({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(U({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=S(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(j(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(j(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(j(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):S(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):S(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=S(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():V())},onUpdateDisplayOrder:a=>{e(We(a))},onUpdateReportFormat:a=>{Na(e),e($e(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"?qe(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ya);function $a(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ka(),b=Fa(),m=Za(b),a=Ze(),s=ve(),t=te(),{tenantEmailDomain:n}=Ve(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=ge.getSignedInUser(),[p,B]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Se=L.masterTOSInfo?.isMasterTOSAccepted??!1,Ie=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),g=_((l=>I(l).fetchState)),je=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),Y=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),w=_((l=>he(l))),ke=_((l=>I(l).isCompareModeOn)),C=_((l=>I(l).filter)),Z=_((l=>I(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(B(!0),s(v(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&g==="Completed"&&y&&(s(v(c.userId,!1,!0,!1)),Re(!0))}),[p,X,g,y]),u.useEffect((()=>{if(p&&Z.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(Y){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":w&&s(V());break;case"balance_sheet":s(M(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":w&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":w&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,Y,Z,y,T,w]);const ee=Da(),Oe=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:Me}=l,{pathname:Be}=te(),se=Ia(Be??"")==="reports",Le=Ta(Me),Ye=u.useMemo((()=>se?Ha:void 0),[se]);ja({canFetchSuggestedQuestions:Le,pageContexts:Ye})})({isDataReady:g==="Completed"}),Ea({isDataReady:g==="Completed"}),f.jsxs(f.Fragment,{children:[g==="Completed"?f.jsx(Ma,{analytics:J,onLoad:l=>l.trackPageLoaded(Ba.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx(qa,{firstMonthOfFY:Ie,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:Y,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:w,isCompareModeOn:ke,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:Z,handleDrawerToggle:ae,reportsResyncFetchState:je.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Se)if(m){const l=we(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function Cs(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Sa(e);return m===!0||a===!0?f.jsx(Ua,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx($a,{})}),f.jsx(oe,{path:"*",element:f.jsx(Va,{})})]})}export{Cs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-XOqCw7q2.js";import{z as b,a9 as N,c as u,R as S,ed as I,p as k,_ as C}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-XOqCw7q2.js";import{z as b,a9 as N,c as u,R as S,ed as I,p as k,_ as C}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import g from"./NotFoundScreen-BLdHlF0f.js";import{a as c}from"./sentry-CNIAdl-1.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-BVdj_noT.js";import{fJ as U,a3H as j,a3I as p,EB as P,qo as V,a3J as z,Ez as J}from"./zeni-epic-state-BSu6fdxh.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="36ef668d-b769-4d89-be5b-2d3c12465df8",e._sentryDebugIdIdentifier="sentry-dbid-36ef668d-b769-4d89-be5b-2d3c12465df8")}catch{}})();const R=_((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(J())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(I),q=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(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(R,{navigate:l,location:w,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{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(q,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-XOqCw7q2.js";import{a as v}from"./sentry-CNIAdl-1.js";import{i as R,u as W,h as X,g as ee,j as r,l as te}from"./core-BVdj_noT.js";import{_N as Ge,$1 as Ve,mb as ae,sW as Me,t6 as Re,tm as $e,tk as Fe,tn as Ke,tp as Ue,a0N as Ye,fJ as K,$R as pe,a0O as Se,h3 as ne,ct as le,cu as se,G0 as ve,a0P as Ce,G4 as ze,gT as ce,sZ as qe,ty as Ze,dq as He,dp as Qe,Ua as fe,F_ as We,FU as Xe,VS as De,FM as et,FL as tt,FG as at,FR as nt,G5 as lt,VU as Y,VT as ge,FN as st,$S as oe,Gl as Ae,Ge as Ie,a0Q as xe,t0 as Te,G8 as Be,G6 as Le,a0R as Je,Gs as be,Gp as we,G9 as je,Gr as Ne}from"./zeni-epic-state-BSu6fdxh.js";import{a5 as de,cG as ie,cH as ct,z as ot,o as dt,a8 as it,a9 as ue,c as _,aj as ut,cI as rt,s as V,G as ye,j as ke,cJ as ht,cK as mt,cL as pt}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-XOqCw7q2.js";import{a as v}from"./sentry-CNIAdl-1.js";import{i as R,u as W,h as X,g as ee,j as r,l as te}from"./core-BVdj_noT.js";import{_N as Ge,$1 as Ve,mb as ae,sW as Me,t6 as Re,tm as $e,tk as Fe,tn as Ke,tp as Ue,a0N as Ye,fJ as K,$R as pe,a0O as Se,h3 as ne,ct as le,cu as se,G0 as ve,a0P as Ce,G4 as ze,gT as ce,sZ as qe,ty as Ze,dq as He,dp as Qe,Ua as fe,F_ as We,FU as Xe,VS as De,FM as et,FL as tt,FG as at,FR as nt,G5 as lt,VU as Y,VT as ge,FN as st,$S as oe,Gl as Ae,Ge as Ie,a0Q as xe,t0 as Te,G8 as Be,G6 as Le,a0R as Je,Gs as be,Gp as we,G9 as je,Gr as Ne}from"./zeni-epic-state-BSu6fdxh.js";import{a5 as de,cG as ie,cH as ct,z as ot,o as dt,a8 as it,a9 as ue,c as _,aj as ut,cI as rt,s as V,G as ye,j as ke,cJ as ht,cK as mt,cL as pt}from"./index-B1jJZ6kq.js";import{n as re}from"./mui-BZ0jnpww.js";import{p as St}from"./pathToGoBack-BYz7DD9r.js";import{a as ft}from"./useActualMatchingMatchDetail-Y4mqKvG2.js";import Q from"./NotFoundScreen-BLdHlF0f.js";import{t as M}from"./routePaths-Dpxra6eQ.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]="aaa29c04-3b0c-4c80-94b8-4227deb19a67",e._sentryDebugIdIdentifier="sentry-dbid-aaa29c04-3b0c-4c80-94b8-4227deb19a67")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=R(),s=t??l,n=W(),i=X(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Ge(u,s??""))),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((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Me(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n(Re({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?k.jsx(Q,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?k.jsx(ie,{}):k.jsx(Q,{}):k.jsx(Dt,{children:k.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(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Fe(s,u,f))},onSkip:(u,f)=>{n($e(s,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 hs,fJ as _s,er as ps,eq as xs,h8 as js,d4 as Es,c8 as gs,gN as Is,gd as Rs,eh as xe,cz as As,gr as Ts,cq as fs,bF as bs,bw as ys,h9 as ws,v as Cs,ha as Ds,bp as vs,hb as Us,bL as ks,bK as Fs,bs as Os,cm as Ps,hc as Hs,hd as Ss,ec as Bs,ef as Ls,ee as Ns,cy as Vs,cF as Zs,he as je,gm as Ee,h1 as Ms,go as ge,gP as Ie,gQ as Re,gp as zs,_ as r}from"./zeni-epic-state-BSu6fdxh.js";import{j as e}from"./liveblocks-XOqCw7q2.js";import{a as U}from"./sentry-CNIAdl-1.js";import{u as Gs,h as $s,i as Ys,g as qs,j as z,q as Ae,N as d,n as Ws,o as s}from"./core-BVdj_noT.js";import{u as Ks,z as f,p as Js,a as Qs,h as Xs,_ as L,i as en,K as sn,V as nn,L as F,G as Te,t as c,b as an,P as tn,c as ae,r as on,l as i,d as rn,Z as ln}from"./index-Dme9CBSK.js";import{u as dn}from"./mui-BZ0jnpww.js";import{f as fe}from"./analyticsHelper-CKG9W7dC.js";import{t as cn}from"./getLocaleForTenant-CI9ZVduS.js";import{u as un}from"./useIsCustomersTabEnabled-DZ7jecHx.js";import{F as C}from"./FallBackRoute-BmlOw1z3.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new l.Error().stack;b&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[b]="1c231a9c-a720-4a84-9133-c2aa76ffe40d",l._sentryDebugIdIdentifier="sentry-dbid-1c231a9c-a720-4a84-9133-c2aa76ffe40d")}catch{}})();const mn=i((()=>r((()=>import("./ReportsRoutes-DxNr6i5Y.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))),hn=i((()=>r((()=>import("./AddressRoutes-_bCuEkwx.js")),__vite__mapDeps([18,1,2,3,19,4,5,6,7,8,17])))),_n=i((()=>r((()=>import("./PeopleRoutes-By8BlbIz.js")),__vite__mapDeps([20,1,2,3,4,5,6,7,8,21,13,14,15,16,17])))),pn=i((()=>r((()=>import("./PandLWithForecastRoutes-D4c4br1B.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,21,10,11,13,14,15,16,17])))),xn=i((()=>r((()=>import("./CustomerOnboardingRoutes-DyVqaxvR.js")),__vite__mapDeps([23,1,2,3,19,4,5,6,7,8,24,25,26,27,28,29,30,31,17])))),jn=i((()=>r((()=>import("./VendorsRoutes-BtVR0Vii.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,19,8,9,33,34,35,36,29,11,21,13,14,15,16,37,38,17])))),En=i((()=>r((()=>import("./CustomersRoutes-CtL2o5-n.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,11,8,21,13,14,15,16,17])))),gn=i((()=>r((()=>import("./TransactionDetailRoutes-ggKexh3-.js")),__vite__mapDeps([40,1,2,3,8,4,5,6,7,29,41,42,21,10,11,43,17])))),be=i((()=>r((()=>import("./EntityDetailRoutes-CLCMxp18.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,29,45,21,42,10,11,43,36,16,17])))),In=i((()=>r((()=>import("./DashboardRoutes-7yhAEy7g.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,16,8,12,47,48,13,14,15,49,9,17])))),ye=i((()=>r((()=>import("./BillPayRoutes-DosvZj42.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,19,8,51,21,10,52,11,13,14,15,16,37,9,53,47,54,41,55,56,17])))),Rn=i((()=>r((()=>import("./SettingsRoutes-Cc8RIjZt.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,15,58,13,14,16,24,25,26,27,28,29,38,19,8,47,52,11,48,30,54,41,55,59,17])))),An=i((()=>r((()=>import("./InvoicingRoutes-Ds8bd8V8.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,19,8,13,14,15,16,24,25,26,27,28,29,17])))),we=i((()=>r((()=>import("./ReimbursementRoutes-Bq5czlC0.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,21,10,37,56,59,41,55,17])))),Tn=i((()=>r((()=>import("./ZeniAccountRoutes-VM-T0h6_.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,51,19,21,63,17])))),fn=i((()=>r((()=>import("./TreasuryRoutes-DnYXMIpO.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,21,10,9,17])))),bn=i((()=>r((()=>import("./TransactionListRoutes-B7kikvJW.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,63,17])))),yn=i((()=>r((()=>import("./ChargeCardRoutes-BZz4pRiz.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,21,13,14,15,16,53,52,11,8,47,10,31,19,17])))),wn=i((()=>r((()=>import("./NotificationRoutes-B3DfKahf.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,21,15,17])))),Cn=i((()=>r((()=>import("./PerformanceRoutes-CQ6Hxkqk.js")),__vite__mapDeps([68,1,2,3,8,4,5,6,7,21,13,14,15,16,17])))),Dn=i((()=>r((()=>import("./ExpenseAutomationRoutes-CA-VSGA_.js")),__vite__mapDeps([69,1,2,3,8,4,5,6,7,21,42,29,10,11,43,35,36,45,33,34,38,37,17])))),vn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-fK8c-oot.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,35,36,29,11,8,17])))),Un=i((()=>r((()=>import("./RewardsRoutes-CO6TuNiV.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8,17])))),kn=i((()=>r((()=>import("./TaskRoutes-w6Z4j7Vq.js")),__vite__mapDeps([72,1,2,3,8,4,5,6,7,10,13,14,15,16,73,21,74,17])))),Fn=i((()=>r((()=>import("./AiCfoScreen-03lSUwaj.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,49,34,11,74,17])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-C8_v-BYR.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,17])))),R=i((()=>r((()=>import("./NotFoundScreen-BDU6ccX1.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,17])))),On=i((()=>r((()=>import("./TaskListScreen-CBFYc4EW.js").then((l=>l.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,21,13,14,15,16,74,17]))));function na({setTenantEmailDomain:l}){const b=Gs(),N=$s(),{tenantEmailDomain:o}=Ys(),V=dn().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ks(),y=f.getSignedInUserTenant(o)?.tenantId,A=f.getSignedInUser(),K=hs(A),G=qs(),[P,ve]=U.useState(!1),n=z((a=>_s(a))),{useFeatureGate:S}=Js(),Z=Qs(),J=Xs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),T=z((a=>a.tenantState.fetchState)),x=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=x==="Completed"||T==="Completed"?ps(te,n):void 0,Q=x==="Completed"||T==="Completed"?xs(n):void 0,oe=x==="Completed"||T==="Completed"?js(n)&&!Es(n):void 0,Oe=en(n,Fe,te),{isCardsHidden:Pe}=sn(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=>Is(a)));if(o!=null){const a=f.getSignedInUserTenant(o);A!=null&&a!=null&&fe(A,n,V)}const M={tenantId:y,userId:A?.userId,sessionId:A?.zeniSessionId},re=Rs(),h=nn(),Ne=un(n.company==null),Ve=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ze=As(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,ze=z((a=>M.tenantId!=null?Ts(a,M.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=fs(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=ys();t.isAfter(_,"month")===!1?b(ws(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,M,re,A,b,f]),U.useLayoutEffect((()=>{!Cs(re,M)&&f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(Ee(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(ge(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=f.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(cn(t)),_?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(M,A,b,ze))}),[y]),U.useEffect((()=>{f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,ls,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ds=w==null||w.tenantId!==t,cs=w!=null&&w.excludedResources==null,us=w!=null&&w.externalConnections==null;if(Y&&ds){B(ge(t));const q=f.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(q?.tenantEmailDomain),Ee(_?.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&&cs&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&us&&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),ls(F.TENANT_FETCHING),B(zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:ms,zeniSessionId:pe}=_;on((()=>{f.getSignedInUser()?.zeniSessionId===pe?B(je(ms,pe)):c.markAllTenantsFetchFailed()}),Pn)}}})(T,x,n,y,A,O,b))}),[y,x]),U.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(Ds($.tenantsBaseInOrder)),A!=null&&fe(A,n,V,void 0,$.tenantsBaseInOrder))}),[$,T,n,A]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?c.markAllTenantsFetchCompleted():T==="Error"&&c.markAllTenantsFetchFailed())}),[x,T,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&x==="Completed"&&P&&(ie.current=!0,an())}),[x,P]);const v=n?.userRole!=null&&vs(n?.userRole),{isFeatureEnabled:Ge}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:$e}=S(L.isAccrualEnabled),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_user"),qe=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,We=Us(h?.loggedInUserRoleMap),Ke=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&&ks(h?.loggedInUserRoleMap),me=Ue&&!v,Qe=ke&&!v,Xe=le&&Fs(h?.loggedInUserRoleMap),es=de&&Os(h?.loggedInUserRoleMap),ss=me&&Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),rs=Ns(h?.loggedInUserRoleMap),j=Vs(h?.loggedInUserRoleMap),E=Zs(h?.loggedInUserRoleMap),he=le&&j,_e=ce&&E,g=me&&ts,I=Qe&&os,u=de&&rs,is=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ze===!0||We===!0||ns===!0||as===!0;return f.isSignedIn()?y==null?T==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(A!=null&&T!=="In-Progress"&&b(je(A.userId,A.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&Je&&Ke!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||K?!P||ne!==!1||ee||K?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(s,{element:e.jsx(tn,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Hn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(In,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:is||k?e.jsx(_n,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(pn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||Ye||qe?e.jsx(gn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(bn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(be,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:I,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(On,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(s,{path:"address/*",element:Xe||ue||ss||es?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(p,{isAllowed:g,fallback:e.jsx(R,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(p,{isAllowed:I,fallback:e.jsx(R,{}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(p,{isAllowed:J,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(p,{isAllowed:J&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Dn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(p,{isAllowed:J&&!v&&$e,fallback:e.jsx(R,{}),children:e.jsx(vn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(wn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(p,{isAllowed:Ve,fallback:e.jsx(R,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"customers/*",element:e.jsx(p,{isAllowed:Ne,fallback:e.jsx(R,{}),children:e.jsx(En,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(p,{isAllowed:Se,fallback:e.jsx(R,{}),children:e.jsx(Rn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(p,{isAllowed:Be&&Le,fallback:e.jsx(R,{}),children:e.jsx(An,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(p,{isAllowed:u,fallback:e.jsx(R,{}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(p,{isAllowed:Ge,fallback:e.jsx(R,{}),children:e.jsx(Un,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(Fn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(R,{})})]})}):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 Pn=5e3,Hn=({isDashboardAccess:l,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(b)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"}):b?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"})},p=({children:l,fallback:b,isAllowed:N})=>{const o=rn();return N?l:o?e.jsx(ln,{fetchState:"In-Progress"}):b},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{na as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReportsRoutes-MQfVKr-3.js","assets/sentry-CNIAdl-1.js","assets/core-BVdj_noT.js","assets/zeni-epic-state-BSu6fdxh.js","assets/index-B1jJZ6kq.js","assets/mui-BZ0jnpww.js","assets/analytics-u8j262Ga.js","assets/utils-BtSqr9lx.js","assets/NotFoundScreen-BLdHlF0f.js","assets/FeaturePreviewScreen-BmH3ZYPC.js","assets/useInitialThreadRequest-C-eszkgP.js","assets/routePaths-Dpxra6eQ.js","assets/reportTimeframe-BTqRG1HM.js","assets/MobileAppDrawer-BGhooxvb.js","assets/InboxNotificationsProvider-DvvXiK-n.js","assets/useTaskManagerAccess-ByBT4RdT.js","assets/useIsCustomersTabEnabled-Bs9VGXUR.js","assets/index-BQ3cXEYt.css","assets/AddressRoutes-MQiA9f7I.js","assets/AddressScreen-2uUNyZUQ.js","assets/PeopleRoutes-HyNYediS.js","assets/useAskAiCfoHostNavButtonProps-B2P8ke_p.js","assets/PandLWithForecastRoutes-CYeUQPq6.js","assets/CustomerOnboardingRoutes-x1rT530A.js","assets/QBOConnectionScreen-BVHythpX.js","assets/empty-C5tm1JkN.js","assets/index-Ch4hjMoy.js","assets/url-uObfQ0XR.js","assets/index-BtE2ozWs.js","assets/decodeURIComponentSafe-JMSvQveN.js","assets/useEmailConnectResultRefresh-BlELL7U2.js","assets/useChargeCardPusherEvents-D7fAhhEd.js","assets/VendorsRoutes-CyVKSXys.js","assets/ScheduleDetailsPrepaidExpensesScreen-Dk3kI_um.js","assets/pathToGoBack-BYz7DD9r.js","assets/useActualMatchingMatchDetail-Y4mqKvG2.js","assets/stripSplatSuffix-CLHAbjpi.js","assets/DrawerScreen-Brp-giik.js","assets/accountMappingHelper-8C9JQylV.js","assets/CustomersRoutes-CtIzyj1-.js","assets/TransactionDetailRoutes-DIaZtep2.js","assets/useEnsureVendorListLoaded-U686iOkV.js","assets/TransactionDetailScreen-CRhyoXmE.js","assets/expenseAutomationHelper-BtpowfoM.js","assets/EntityDetailRoutes-D3O2kCNF.js","assets/withTransactionSidePanel-Bcsqg7yc.js","assets/DashboardRoutes-Bn-AOUEy.js","assets/analyticsHelper-C_Bq8-qH.js","assets/CompanyPassportScreen-C7Wa5c9G.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DLTMg2t8.js","assets/BillPayRoutes-CUUTvN-o.js","assets/DomesticWireDetailScreen-CW_sfUk-.js","assets/BusinessVerificationPageScreen-tC5awgdj.js","assets/SetupPagesScreen-F5zTUkYx.js","assets/BillPayApprovalRoutes-BwX_LelL.js","assets/ReimbursementApprovalRuleDetailScreen-ChsEhKuN.js","assets/FallBackRoute-CNk6Evuv.js","assets/SettingsRoutes-DLMgjhfW.js","assets/AccountMappingScreen-B_TkOsXF.js","assets/ReimbursementApprovalRoutes-BJQptKVv.js","assets/InvoicingRoutes-rTOKf9u7.js","assets/ReimbursementRoutes-aim1_SRB.js","assets/ZeniAccountRoutes-FyNmEtGc.js","assets/ZeniAccountStatementScreen-CiCl4r2I.js","assets/TreasuryRoutes-BQGJgpKX.js","assets/TransactionListRoutes-BoaLC6AE.js","assets/ChargeCardRoutes-CS3a4dBG.js","assets/NotificationRoutes-BwRHNbvw.js","assets/PerformanceRoutes-n4YI8VHX.js","assets/ExpenseAutomationRoutes-BK56n2EU.js","assets/ActualMatchingMatchDetailScreen-BSGSGFd_.js","assets/RewardsRoutes-CndlMuVb.js","assets/TaskRoutes-B6TIhT3s.js","assets/TaskListScreen-BwZHMLXv.js","assets/useTaskManagerPusherEvents-hrwd8lXy.js","assets/AiCfoScreen-Da96F691.js","assets/CardsAiCfoScreen-B4NEjdpt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as hs,fJ as _s,er as ps,eq as xs,h8 as js,d4 as Es,c8 as gs,gN as Is,gd as Rs,eh as xe,cz as As,gr as Ts,cq as fs,bF as bs,bw as ys,h9 as ws,v as Cs,ha as Ds,bp as vs,hb as Us,bL as ks,bK as Fs,bs as Os,cm as Ps,hc as Hs,hd as Ss,ec as Bs,ef as Ls,ee as Ns,cy as Vs,cF as Zs,he as je,gm as Ee,h1 as Ms,go as ge,gP as Ie,gQ as Re,gp as zs,_ as r}from"./zeni-epic-state-BSu6fdxh.js";import{j as e}from"./liveblocks-XOqCw7q2.js";import{a as U}from"./sentry-CNIAdl-1.js";import{u as Gs,h as $s,i as Ys,g as qs,j as z,q as Ae,N as d,n as Ws,o as s}from"./core-BVdj_noT.js";import{u as Ks,z as f,p as Js,a as Qs,h as Xs,_ as L,i as en,K as sn,V as nn,L as F,G as Te,t as c,b as an,P as tn,c as ae,r as on,l as i,d as rn,Z as ln}from"./index-B1jJZ6kq.js";import{u as dn}from"./mui-BZ0jnpww.js";import{f as fe}from"./analyticsHelper-C_Bq8-qH.js";import{t as cn}from"./getLocaleForTenant-D-NWQxBL.js";import{u as un}from"./useIsCustomersTabEnabled-Bs9VGXUR.js";import{F as C}from"./FallBackRoute-CNk6Evuv.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new l.Error().stack;b&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[b]="1c231a9c-a720-4a84-9133-c2aa76ffe40d",l._sentryDebugIdIdentifier="sentry-dbid-1c231a9c-a720-4a84-9133-c2aa76ffe40d")}catch{}})();const mn=i((()=>r((()=>import("./ReportsRoutes-MQfVKr-3.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])))),hn=i((()=>r((()=>import("./AddressRoutes-MQiA9f7I.js")),__vite__mapDeps([18,1,2,3,19,4,5,6,7,8,17])))),_n=i((()=>r((()=>import("./PeopleRoutes-HyNYediS.js")),__vite__mapDeps([20,1,2,3,4,5,6,7,8,21,13,14,15,16,17])))),pn=i((()=>r((()=>import("./PandLWithForecastRoutes-CYeUQPq6.js")),__vite__mapDeps([22,1,2,3,4,5,6,7,8,9,21,10,11,13,14,15,16,17])))),xn=i((()=>r((()=>import("./CustomerOnboardingRoutes-x1rT530A.js")),__vite__mapDeps([23,1,2,3,19,4,5,6,7,8,24,25,26,27,28,29,30,31,17])))),jn=i((()=>r((()=>import("./VendorsRoutes-CyVKSXys.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,19,8,9,33,34,35,36,29,11,21,13,14,15,16,37,38,17])))),En=i((()=>r((()=>import("./CustomersRoutes-CtIzyj1-.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,11,8,21,13,14,15,16,17])))),gn=i((()=>r((()=>import("./TransactionDetailRoutes-DIaZtep2.js")),__vite__mapDeps([40,1,2,3,8,4,5,6,7,29,41,42,21,10,11,43,17])))),be=i((()=>r((()=>import("./EntityDetailRoutes-D3O2kCNF.js")),__vite__mapDeps([44,1,2,3,4,5,6,7,29,45,21,42,10,11,43,36,16,17])))),In=i((()=>r((()=>import("./DashboardRoutes-Bn-AOUEy.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,16,8,12,47,48,13,14,15,49,9,17])))),ye=i((()=>r((()=>import("./BillPayRoutes-CUUTvN-o.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,19,8,51,21,10,52,11,13,14,15,16,37,9,53,47,54,41,55,56,17])))),Rn=i((()=>r((()=>import("./SettingsRoutes-DLMgjhfW.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,15,58,13,14,16,24,25,26,27,28,29,38,19,8,47,52,11,48,30,54,41,55,59,17])))),An=i((()=>r((()=>import("./InvoicingRoutes-rTOKf9u7.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,19,8,13,14,15,16,24,25,26,27,28,29,17])))),we=i((()=>r((()=>import("./ReimbursementRoutes-aim1_SRB.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,21,10,37,56,59,41,55,17])))),Tn=i((()=>r((()=>import("./ZeniAccountRoutes-FyNmEtGc.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,9,51,19,21,63,17])))),fn=i((()=>r((()=>import("./TreasuryRoutes-BQGJgpKX.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,8,53,52,11,13,14,15,16,47,21,10,9,17])))),bn=i((()=>r((()=>import("./TransactionListRoutes-BoaLC6AE.js")),__vite__mapDeps([65,1,2,3,4,5,6,7,45,21,42,29,10,11,43,36,63,17])))),yn=i((()=>r((()=>import("./ChargeCardRoutes-CS3a4dBG.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,21,13,14,15,16,53,52,11,8,47,10,31,19,17])))),wn=i((()=>r((()=>import("./NotificationRoutes-BwRHNbvw.js")),__vite__mapDeps([67,1,2,3,8,4,5,6,7,21,15,17])))),Cn=i((()=>r((()=>import("./PerformanceRoutes-n4YI8VHX.js")),__vite__mapDeps([68,1,2,3,8,4,5,6,7,21,13,14,15,16,17])))),Dn=i((()=>r((()=>import("./ExpenseAutomationRoutes-BK56n2EU.js")),__vite__mapDeps([69,1,2,3,8,4,5,6,7,21,42,29,10,11,43,35,36,45,33,34,38,37,17])))),vn=i((()=>r((()=>import("./ActualMatchingMatchDetailScreen-BSGSGFd_.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,35,36,29,11,8,17])))),Un=i((()=>r((()=>import("./RewardsRoutes-CndlMuVb.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,8,17])))),kn=i((()=>r((()=>import("./TaskRoutes-B6TIhT3s.js")),__vite__mapDeps([72,1,2,3,8,4,5,6,7,10,13,14,15,16,73,21,74,17])))),Fn=i((()=>r((()=>import("./AiCfoScreen-Da96F691.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,49,34,11,74,17])))),Ce=i((()=>r((()=>import("./CardsAiCfoScreen-B4NEjdpt.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,17])))),R=i((()=>r((()=>import("./NotFoundScreen-BLdHlF0f.js")),__vite__mapDeps([8,1,2,3,4,5,6,7,17])))),On=i((()=>r((()=>import("./TaskListScreen-BwZHMLXv.js").then((l=>l.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,21,13,14,15,16,74,17]))));function na({setTenantEmailDomain:l}){const b=Gs(),N=$s(),{tenantEmailDomain:o}=Ys(),V=dn().mode,{setLoading:O,clearAllLoading:W,clearLoading:H}=Ks(),y=f.getSignedInUserTenant(o)?.tenantId,A=f.getSignedInUser(),K=hs(A),G=qs(),[P,ve]=U.useState(!1),n=z((a=>_s(a))),{useFeatureGate:S}=Js(),Z=Qs(),J=Xs(),Ue=!!n.company?.companyZeniAccountInfo?.isZeniAccountEnabled,ke=n.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Fe}=S(L.isChargeCardFeatureEnabled),{isFeatureEnabled:te}=S(L.isDebitCardFeatureEnabled),T=z((a=>a.tenantState.fetchState)),x=z((a=>a.tenantState.activeTenantFetchState.fetchState)),m=x==="Completed"||T==="Completed"?ps(te,n):void 0,Q=x==="Completed"||T==="Completed"?xs(n):void 0,oe=x==="Completed"||T==="Completed"?js(n)&&!Es(n):void 0,Oe=en(n,Fe,te),{isCardsHidden:Pe}=sn(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=>Is(a)));if(o!=null){const a=f.getSignedInUserTenant(o);A!=null&&a!=null&&fe(A,n,V)}const M={tenantId:y,userId:A?.userId,sessionId:A?.zeniSessionId},re=Rs(),h=nn(),Ne=un(n.company==null),Ve=n.company==null||h?.loggedInUserRoleMap!=null&&xe(h.loggedInUserRole),Ze=As(h?.loggedInUserRoleMap),ee=Ae("/:tenantEmailDomain/onboarding/*")!==null,Me=Ae("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=Me?.params.selectedPeriod,ze=z((a=>M.tenantId!=null?Ts(a,M.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=fs(Number(a[0])),w=Number(a[1]),t=bs(`01-${D<10?`0${D}`:D}-${w}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),_=ys();t.isAfter(_,"month")===!1?b(ws(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,M,re,A,b,f]),U.useLayoutEffect((()=>{!Cs(re,M)&&f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t){if(Ee(D?.userId,D?.zeniSessionId,a.tenantId),w(Ms(!0)),w(ge(a.tenantId)),a.tenantId!=null&&c.clearTenant(a.tenantId),a.tenantId!=null){const _=f.getSignedInUserTenantWithId(a.tenantId);t&&Te.updateAppLocaleID(cn(t)),_?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(_?.tenantEmailDomain)}a.userId!=null?ae.identify(a.userId,{tenant_id:a.tenantId}):ae.resetUserIdentity()})(M,A,b,ze))}),[y]),U.useEffect((()=>{f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,D,w,t,_,ls,B){if(w==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&_?.zeniSessionId!=null,ds=w==null||w.tenantId!==t,cs=w!=null&&w.excludedResources==null,us=w!=null&&w.externalConnections==null;if(Y&&ds){B(ge(t));const q=f.getSignedInUserTenantWithId(t);q?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(q?.tenantEmailDomain),Ee(_?.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&&cs&&c.shouldFetchExcludedResources(t)&&(c.markExcludedResourcesFetchStarted(t),B(Ie(_.userId,t))),Y&&us&&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),ls(F.TENANT_FETCHING),B(zs(_.userId,t,_.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&c.shouldFetchAllTenants()){c.markAllTenantsFetchStarted();const{userId:ms,zeniSessionId:pe}=_;on((()=>{f.getSignedInUser()?.zeniSessionId===pe?B(je(ms,pe)):c.markAllTenantsFetchFailed()}),Pn)}}})(T,x,n,y,A,O,b))}),[y,x]),U.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&$.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(Ds($.tenantsBaseInOrder)),A!=null&&fe(A,n,V,void 0,$.tenantsBaseInOrder))}),[$,T,n,A]),U.useEffect((()=>{x==="In-Progress"&&O(F.TENANT_FETCHING),x!=="Completed"&&x!=="Error"||(x==="Completed"&&y!=null?(performance.mark("zeni:boot_tenant_data"),W(),c.markActiveTenantFetchCompleted(y)):x==="Error"&&y!=null&&(c.markActiveTenantFetchFailed(y),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?c.markAllTenantsFetchCompleted():T==="Error"&&c.markAllTenantsFetchFailed())}),[x,T,y,P]);const ie=U.useRef(!1);U.useEffect((()=>{!ie.current&&x==="Completed"&&P&&(ie.current=!0,an())}),[x,P]);const v=n?.userRole!=null&&vs(n?.userRole),{isFeatureEnabled:Ge}=S(L.isReferralFeatureEnabled),{isFeatureEnabled:$e}=S(L.isAccrualEnabled),Ye=n?.userRole!=null&&n.userRole.includes("charge_card_user"),qe=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,We=Us(h?.loggedInUserRoleMap),Ke=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&&ks(h?.loggedInUserRoleMap),me=Ue&&!v,Qe=ke&&!v,Xe=le&&Fs(h?.loggedInUserRoleMap),es=de&&Os(h?.loggedInUserRoleMap),ss=me&&Ps(h?.loggedInUserRoleMap),ns=Hs(h?.loggedInUserRoleMap),as=Ss(h?.loggedInUserRoleMap),ts=Bs(h?.loggedInUserRoleMap),os=Ls(h?.loggedInUserRoleMap),rs=Ns(h?.loggedInUserRoleMap),j=Vs(h?.loggedInUserRoleMap),E=Zs(h?.loggedInUserRoleMap),he=le&&j,_e=ce&&E,g=me&&ts,I=Qe&&os,u=de&&rs,is=n.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ze===!0||We===!0||ns===!0||as===!0;return f.isSignedIn()?y==null?T==="Completed"?e.jsx(d,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(A!=null&&T!=="In-Progress"&&b(je(A.userId,A.zeniSessionId)),null):x!=="In-Progress"&&x!=="Not-Started"||T==="Completed"?(ne===!0||K&&!ee)&&Je&&Ke!==!0&&m===!1&&Q===!1&&oe===!1?(l(void 0),e.jsx(d,{to:"/connection/auth",replace:!0})):!P||oe!==!0||ne!==!0||ee||K?!P||ne!==!1||ee||K?P&&n?.userRole&&m!=null&&Q!=null&&o!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ws,{children:e.jsxs(s,{element:e.jsx(tn,{}),children:[e.jsx(s,{path:"/",element:e.jsx(Hn,{isDashboardAccess:k,showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,isTenantCardsOnly:Q,showChargeCardRoute:u})}),e.jsx(s,{path:"dashboard/*",element:k?e.jsx(In,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reports/*",element:k?e.jsx(mn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"people/*",element:is||k?e.jsx(_n,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"forecast/*",element:k?e.jsx(pn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"onboarding/*",element:e.jsx(xn,{})}),e.jsx(s,{path:"transaction/*",element:k&&v===!1||Ye||qe?e.jsx(gn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"transactions/*",element:k&&v===!1?e.jsx(bn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"customer/*",element:k&&v===!1?e.jsx(be,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,isTenantBankingOnly:m,showTreasuryRoute:I,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"vendor/*",element:k&&v===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"tasks",element:e.jsx(On,{})}),e.jsx(s,{path:"tasks/*",element:e.jsx(kn,{})}),e.jsx(s,{path:"address/*",element:Xe||ue||ss||es?e.jsx(hn,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"checking/*",element:e.jsx(p,{isAllowed:g,fallback:e.jsx(R,{}),children:e.jsx(Tn,{})})}),e.jsx(s,{path:"treasury/*",element:e.jsx(p,{isAllowed:I,fallback:e.jsx(R,{}),children:e.jsx(fn,{})})}),e.jsx(s,{path:"performance",element:e.jsx(p,{isAllowed:J,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Cn,{})})}),e.jsx(s,{path:"month_end_close_checks/review/*",element:e.jsx(p,{isAllowed:J&&!v,fallback:e.jsx(De,{tenantEmailDomain:o}),children:e.jsx(Dn,{})})}),e.jsx(s,{path:"expense-automation/actual-matching/:matchId",element:e.jsx(p,{isAllowed:J&&!v&&$e,fallback:e.jsx(R,{}),children:e.jsx(vn,{})})}),e.jsx(s,{path:"notifications/*",element:e.jsx(wn,{})}),e.jsx(s,{path:"vendors/*",element:e.jsx(p,{isAllowed:Ve,fallback:e.jsx(R,{}),children:e.jsx(jn,{})})}),e.jsx(s,{path:"customers/*",element:e.jsx(p,{isAllowed:Ne,fallback:e.jsx(R,{}),children:e.jsx(En,{})})}),e.jsx(s,{path:"bill/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"bills/*",element:he?e.jsx(ye,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursement/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"reimbursements/*",element:_e?e.jsx(we,{}):e.jsx(C,{showZeniAccountRoute:g,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:E,showTreasuryRoute:I,isTenantBankingOnly:m,showChargeCardRoute:u,tenantEmailDomain:o})}),e.jsx(s,{path:"settings/*",element:e.jsx(p,{isAllowed:Se,fallback:e.jsx(R,{}),children:e.jsx(Rn,{hasAdminLevelAccess:ue})})}),e.jsx(s,{path:"invoicing/*",element:e.jsx(p,{isAllowed:Be&&Le,fallback:e.jsx(R,{}),children:e.jsx(An,{})})}),e.jsx(s,{path:"cards/ask",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/ask/:session_id",element:e.jsx(p,{isAllowed:u&&Z,fallback:e.jsx(R,{}),children:e.jsx(Ce,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"cards/*",element:e.jsx(p,{isAllowed:u,fallback:e.jsx(R,{}),children:e.jsx(yn,{})})}),e.jsx(s,{path:"rewards/*",element:e.jsx(p,{isAllowed:Ge,fallback:e.jsx(R,{}),children:e.jsx(Un,{})})}),e.jsx(s,{path:"/ai-cfo",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(d,{to:"explore"})})}),e.jsx(s,{path:"/ai-cfo/:session_id",element:e.jsx(p,{isAllowed:Z,fallback:e.jsx(R,{}),children:e.jsx(Fn,{isFileUploadEnabled:X})})}),e.jsx(s,{path:"*",element:e.jsx(R,{})})]})}):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 Pn=5e3,Hn=({isDashboardAccess:l,showZeniAccountRoute:b,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:o,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:W,showChargeCardRoute:H})=>{if(O===!0){if(b)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"}):b?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"})},p=({children:l,fallback:b,isAllowed:N})=>{const o=rn();return N?l:o?e.jsx(ln,{fetchState:"In-Progress"}):b},De=({tenantEmailDomain:l})=>e.jsx(d,{to:`/${l}/dashboard`});export{na as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-XOqCw7q2.js";import{a as d}from"./sentry-CNIAdl-1.js";import{h as Y,g as $,u as _,i as F,j as C,l as Z,n as J,o as k}from"./core-BVdj_noT.js";import{fJ as w,Yh as je,Ot as ve,Xt as we,Yi as Ae,c8 as Q,cM as De,cN as Ue,bp as _e,eg as Te,GL as Re,Yj as Me,PW as Be,Nk as Ne,Nb as de,N8 as Ve,GP as ue,Ne as pe,Nh as ge,Nn as X,CT as ee,GO as Oe,lG as H,lJ as me,Yk as Ye,mT as Fe,H4 as Le,Yl as Ge,Ym as He,lE as $e,Yn as Ze,lH as Ke,v3 as qe,Yo as ze,Yp as Je,v7 as We,i5 as Qe,Vw as z,hZ as ae,hW as Xe,i2 as en,Vx as nn,H1 as tn,Yq as an,Yr as on,NB as sn,mb as rn,eq as fe,er as he,Ys as ln,gG as cn,Wa as dn,H0 as oe,gL as se,gK as un,G$ as pn,gJ as gn,gI as mn,Yt as fn,V2 as Ce,Yu as hn,Yv as Cn,Yw as bn,Yx as yn,Yy as Sn,Yz as In,H7 as xn,YA as En,G_ as ie,GU as G,YB as kn,YC as Pn,YD as re,YE as jn,dG as vn,YF as wn,YG as An,YH as Dn,Ve as Un,dO as _n,dV as Tn,dU as Rn,dP as Mn,YI as Bn,dS as Nn,dR as Vn,dT as On,dQ as Yn}from"./zeni-epic-state-BSu6fdxh.js";import{b0 as Fn,z as v,V as L,a8 as ne,b7 as Ln,c as K,p as te,_ as V,i as be,K as ye,b8 as Gn,o as Hn,W as Se,b9 as $n,az as Zn,ba as Kn,bb as qn,aC as zn,bc as Jn,s as Wn,k as Ie,bd as Qn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-XOqCw7q2.js";import{a as d}from"./sentry-CNIAdl-1.js";import{h as Y,g as $,u as _,i as F,j as C,l as Z,n as J,o as k}from"./core-BVdj_noT.js";import{fJ as w,Yh as je,Ot as ve,Xt as we,Yi as Ae,c8 as Q,cM as De,cN as Ue,bp as _e,eg as Te,GL as Re,Yj as Me,PW as Be,Nk as Ne,Nb as de,N8 as Ve,GP as ue,Ne as pe,Nh as ge,Nn as X,CT as ee,GO as Oe,lG as H,lJ as me,Yk as Ye,mT as Fe,H4 as Le,Yl as Ge,Ym as He,lE as $e,Yn as Ze,lH as Ke,v3 as qe,Yo as ze,Yp as Je,v7 as We,i5 as Qe,Vw as z,hZ as ae,hW as Xe,i2 as en,Vx as nn,H1 as tn,Yq as an,Yr as on,NB as sn,mb as rn,eq as fe,er as he,Ys as ln,gG as cn,Wa as dn,H0 as oe,gL as se,gK as un,G$ as pn,gJ as gn,gI as mn,Yt as fn,V2 as Ce,Yu as hn,Yv as Cn,Yw as bn,Yx as yn,Yy as Sn,Yz as In,H7 as xn,YA as En,G_ as ie,GU as G,YB as kn,YC as Pn,YD as re,YE as jn,dG as vn,YF as wn,YG as An,YH as Dn,Ve as Un,dO as _n,dV as Tn,dU as Rn,dP as Mn,YI as Bn,dS as Nn,dR as Vn,dT as On,dQ as Yn}from"./zeni-epic-state-BSu6fdxh.js";import{b0 as Fn,z as v,V as L,a8 as ne,b7 as Ln,c as K,p as te,_ as V,i as be,K as ye,b8 as Gn,o as Hn,W as Se,b9 as $n,az as Zn,ba as Kn,bb as qn,aC as zn,bc as Jn,s as Wn,k as Ie,bd as Qn}from"./index-B1jJZ6kq.js";import{n as B}from"./mui-BZ0jnpww.js";import{u as xe}from"./useTaskManagerAccess-ByBT4RdT.js";import{U as Xn}from"./AccountMappingScreen-B_TkOsXF.js";import{t as et,A as nt}from"./AddressScreen-2uUNyZUQ.js";import O from"./NotFoundScreen-BLdHlF0f.js";import{g as tt}from"./analyticsHelper-C_Bq8-qH.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-tC5awgdj.js";import{C as st}from"./CompanyPassportScreen-C7Wa5c9G.js";import{M as R}from"./MobileAppDrawer-BGhooxvb.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BlELL7U2.js";import{q as le}from"./QBOConnectionScreen-BVHythpX.js";import{B as lt}from"./BillPayApprovalRoutes-BwX_LelL.js";import{R as ct}from"./ReimbursementApprovalRoutes-BJQptKVv.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./accountMappingHelper-8C9JQylV.js";import"./routePaths-Dpxra6eQ.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.js";import"./useEnsureVendorListLoaded-U686iOkV.js";import"./ReimbursementApprovalRuleDetailScreen-ChsEhKuN.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]="1197c102-8227-46d8-ae1a-a942649ce08d",e._sentryDebugIdIdentifier="sentry-dbid-1197c102-8227-46d8-ae1a-a942649ce08d")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-XOqCw7q2.js";import{h as X,g as Q,u as ee,i as W,j as k,N,l as H,t as en}from"./core-BVdj_noT.js";import{bK as nn,fJ as x,cz as tn,ID as J,Xt as an,Xw as sn,vm as ne,va as te,mL as ae,Cp as L,a1d as be,gK as He,gJ as Ke,gI as Ge,a1e as on,IM as cn,Nk as Ce,Nb as he,N8 as Ie,MP as Y,Ne as Ae,Nh as _e,Nn as ke,CT as Pe,h3 as rn,ct as un,er as dn,eq as ln,d4 as pn,bs as mn,cm as Fe,ZS as yn,LP as fe,Mr as fn,ZO as gn,bL as Sn,OF as ge,Ot as bn,Yi as Cn,Y2 as hn,OJ as In,ON as An,a12 as je,Ci as _n,Tn as kn,a1f as Pn,a1g as vn,a1h as Tn,a1i as qe,a1j as En,a1k as Dn,a1l as Un,YP as wn,a1m as On,$K as Je,M$ as Fn,MT as xn,a1n as Vn,MX as Bn,$L as we,Pt as Ye,mT as jn,vd as Xe,Cr as Nn,bF as Ne,CD as Re,cw as Rn,$I as Qe,Pj as Oe,P0 as Ln,P1 as Mn,P5 as zn,$N as $n,Pm as Le,$J as Zn,a1o as Wn,$M as Hn,Q8 as Se,a1a as Kn,g_ as Gn,JY as qn,a1p as Jn,K1 as Yn,K0 as Xn}from"./zeni-epic-state-BSu6fdxh.js";import{az as ve,V as ie,p as de,_ as q,z as E,a9 as se,c as D,a8 as Te,R as Z,cZ as Qn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,B as Be,d0 as at,s as Me,bg as ze,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as ut}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-XOqCw7q2.js";import{h as X,g as Q,u as ee,i as W,j as k,N,l as H,t as en}from"./core-BVdj_noT.js";import{bK as nn,fJ as x,cz as tn,ID as J,Xt as an,Xw as sn,vm as ne,va as te,mL as ae,Cp as L,a1d as be,gK as He,gJ as Ke,gI as Ge,a1e as on,IM as cn,Nk as Ce,Nb as he,N8 as Ie,MP as Y,Ne as Ae,Nh as _e,Nn as ke,CT as Pe,h3 as rn,ct as un,er as dn,eq as ln,d4 as pn,bs as mn,cm as Fe,ZS as yn,LP as fe,Mr as fn,ZO as gn,bL as Sn,OF as ge,Ot as bn,Yi as Cn,Y2 as hn,OJ as In,ON as An,a12 as je,Ci as _n,Tn as kn,a1f as Pn,a1g as vn,a1h as Tn,a1i as qe,a1j as En,a1k as Dn,a1l as Un,YP as wn,a1m as On,$K as Je,M$ as Fn,MT as xn,a1n as Vn,MX as Bn,$L as we,Pt as Ye,mT as jn,vd as Xe,Cr as Nn,bF as Ne,CD as Re,cw as Rn,$I as Qe,Pj as Oe,P0 as Ln,P1 as Mn,P5 as zn,$N as $n,Pm as Le,$J as Zn,a1o as Wn,$M as Hn,Q8 as Se,a1a as Kn,g_ as Gn,JY as qn,a1p as Jn,K1 as Yn,K0 as Xn}from"./zeni-epic-state-BSu6fdxh.js";import{az as ve,V as ie,p as de,_ as q,z as E,a9 as se,c as D,a8 as Te,R as Z,cZ as Qn,af as oe,bH as V,au as xe,c_ as et,b0 as nt,c$ as tt,B as Be,d0 as at,s as Me,bg as ze,a2 as it,ac as st,d1 as ot,d2 as ct,d3 as rt,w as ut}from"./index-B1jJZ6kq.js";import{a as h}from"./sentry-CNIAdl-1.js";import{u as Ee,n as Ve,D as dt,S as lt}from"./mui-BZ0jnpww.js";import{u as pt,d as $e,B as Ue}from"./BusinessVerificationPageScreen-tC5awgdj.js";import{M as le}from"./MobileAppDrawer-BGhooxvb.js";import R from"./NotFoundScreen-BLdHlF0f.js";import{a as Ze}from"./analyticsHelper-C_Bq8-qH.js";import{d as We}from"./routePaths-Dpxra6eQ.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]="a4e18b8b-f234-4536-b43f-ca20359b9650",e._sentryDebugIdIdentifier="sentry-dbid-a4e18b8b-f234-4536-b43f-ca20359b9650")}catch{}})();const mt=Ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|