@zeniai/web-app-ui 5.2.5-prod → 5.2.6-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-CRqr9Fgx.js +1 -0
- package/dist/assets/AddressScreen-_QOTUIVr.js +9 -0
- package/dist/assets/{AiCfoScreen-D9aWaDO3.js → AiCfoScreen-CX7E8Peo.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BPA1jDxb.js → BillPayApprovalRoutes-ClmCpYFd.js} +1 -1
- package/dist/assets/{BillPayRoutes-qkXBoyKe.js → BillPayRoutes-DoSwk72T.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Dfzu-Csr.js → BusinessVerificationPageScreen-CzDFv09Y.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-DUNQLzC2.js → CardsAiCfoScreen-eeV0SveA.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DtoUVLz_.js → ChargeCardRoutes-D-2cGFR8.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-yCNNnA2f.js → CompanyPassportScreen-Dgc1b90N.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CsvloZPi.js → ConnectionAuthScreen-BJNKfgFC.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-B5MRHJlf.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BvJrgH_H.js → CustomerOnboardingRoutes-CU2s9JFJ.js} +1 -1
- package/dist/assets/{DashboardRoutes-BLE92vW2.js → DashboardRoutes-D_nR7gnV.js} +1 -1
- package/dist/assets/{DefaultTenantHome-B_f1EfoU.js → DefaultTenantHome-CAghXBT6.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BMEc1Fdz.js → DomesticWireDetailScreen-BrMTJ0LT.js} +1 -1
- package/dist/assets/{DrawerScreen-DZnLHMBS.js → DrawerScreen-DbaoUmyp.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-Ztyi01_3.js → EntityDetailRoutes-RWRqdoUW.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CP8NKJO0.js → ExpenseAutomationRoutes-Bg1lugdX.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BCrWFTUC.js → FeaturePreviewScreen-BfuOs-n9.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DRwyvrgo.js → HubSpotOAuthCallbackScreen-Tm6-OaLw.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-2vBviZ-m.js → MagicLinkRoutes-BPFrOlQS.js} +9 -9
- package/dist/assets/MagicLinkSignInScreen-_-oIW3R9.js +12 -0
- package/dist/assets/{MobileAppDrawer-nDOn2VVp.js → MobileAppDrawer-BVsx0d52.js} +1 -1
- package/dist/assets/NotFoundScreen-6c0jfbLt.js +1 -0
- package/dist/assets/{NotificationRoutes-BrPJJjEp.js → NotificationRoutes-m7aisVZh.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-BlrVfpyf.js → OAuthConsentScreen-Dr5xHicR.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DF1hH1kU.js → PandLWithForecastRoutes-DWPW45GW.js} +1 -1
- package/dist/assets/{PeopleRoutes-1PdCBIPh.js → PeopleRoutes-CeN9aIQp.js} +3 -3
- package/dist/assets/{PerformanceRoutes-Isw87iKN.js → PerformanceRoutes-Dhkh0POj.js} +1 -1
- package/dist/assets/{Preview-80eCMHQY.js → Preview-B54tVRwE.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-C-WrLI44.js → QBOConnectionScreen-DaV3loZh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-PvPn5LSN.js → ReimbursementApprovalRoutes-D6a0suIn.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BASuYoLM.js → ReimbursementApprovalRuleDetailScreen-LSfhRsMC.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DKDG9b9J.js → ReimbursementRoutes-Bh9_hMkC.js} +4 -4
- package/dist/assets/{ReportsRoutes-E3A517u8.js → ReportsRoutes-vW__-mqO.js} +1 -1
- package/dist/assets/{RewardsRoutes-BTTUd7t0.js → RewardsRoutes-DTUZ1AWT.js} +1 -1
- package/dist/assets/{ScreenRoutes-SuYQAkkB.js → ScreenRoutes-foz6ng2P.js} +2 -2
- package/dist/assets/{SettingsRoutes-QTNoGxNR.js → SettingsRoutes-fWbhF4uP.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CVkrWCTb.js → SetupPagesScreen-B8WYHzUu.js} +5 -5
- package/dist/assets/{SignInScreen-BO3-iSxO.js → SignInScreen-CHWWmIOt.js} +1 -1
- package/dist/assets/{SignOutScreen-DJ1Zhw4H.js → SignOutScreen-xt4AkWg7.js} +1 -1
- package/dist/assets/{TaskListScreen-DPShaK_Z.js → TaskListScreen-BNNdSA1G.js} +1 -1
- package/dist/assets/{TaskRoutes-BtRVTkOP.js → TaskRoutes-Brk_g9vS.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-CspiDqNl.js → TransactionDetailRoutes-D6y-8FuE.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-CPrKrf24.js → TransactionDetailScreen-CHtoQtM9.js} +1 -1
- package/dist/assets/{TransactionListRoutes-B5SGKg_-.js → TransactionListRoutes-DqRETwf-.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BCE8j_R6.js → TreasuryRoutes-Bgqikq-u.js} +6 -6
- package/dist/assets/{VendorsRoutes-B-ewvqLW.js → VendorsRoutes-CHFxSJdV.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DNUmCPrX.js → WiseConfirmationScreen-XYoM1z3h.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B7J0vSwn.js → ZeniAccountRoutes-Chw_TTRS.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DuV3gcHW.js → ZeniAccountStatementScreen-C6Lownq7.js} +1 -1
- package/dist/assets/{accountMappingHelper-Bl9od2tV.js → accountMappingHelper-Cb6Phjli.js} +1 -1
- package/dist/assets/{analytics-D7U6FkWM.js → analytics-CMhYvjgp.js} +1 -1
- package/dist/assets/{analyticsHelper-Pbro0grO.js → analyticsHelper-D86wGf3h.js} +1 -1
- package/dist/assets/{core-BaHdz0Z3.js → core-BjRnoVdN.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Bt-LovJZ.js → decodeURIComponentSafe-8RHUrhvv.js} +1 -1
- package/dist/assets/{dnd-HX_d84hm.js → dnd-DD1NomKe.js} +1 -1
- package/dist/assets/{empty-TH3hSw2f.js → empty-BxET7kap.js} +1 -1
- package/dist/assets/{empty-2-kQRmo_.js → empty-Lyk-jq4r.js} +1 -1
- package/dist/assets/{emptyVideoElement-D71nE0_e.js → emptyVideoElement-6B6_1DjQ.js} +1 -1
- package/dist/assets/{epic-DstNOZJZ.js → epic-Bndm1KHn.js} +2 -2
- package/dist/assets/{getLocaleForTenant-B_22cG-q.js → getLocaleForTenant-B67NSzYh.js} +1 -1
- package/dist/assets/{index-D3ibc-ph.js → index-0VsUkhux.js} +1 -1
- package/dist/assets/{index-DLhTjRHL.js → index-BT-czevE.js} +1 -1
- package/dist/assets/{index-CxGd9xak.js → index-BfsWyp4D.js} +1 -1
- package/dist/assets/{index-xz9U8NHf.js → index-BgcyTzzQ.js} +2 -2
- package/dist/assets/{index-BJomN0Pl.js → index-CQBqRx-l.js} +1 -1
- package/dist/assets/{index-DmfkNWRz.js → index-DG5dsziC.js} +5452 -5452
- package/dist/assets/{index-CN-Dik3W.js → index-DaCvER1D.js} +1 -1
- package/dist/assets/{index-B2W6qNDR.js → index-DlX43o9f.js} +1 -1
- package/dist/assets/{lexical-P4gdCg3f.js → lexical-CkYiXWk9.js} +1 -1
- package/dist/assets/{liveblocks-k7WSZCse.js → liveblocks-BxpjjfmG.js} +1 -1
- package/dist/assets/{lottie-Cjd5XrbW.js → lottie-iCzPfqr5.js} +1 -1
- package/dist/assets/{mui-CO4kaue3.js → mui-CdxnWIp4.js} +1 -1
- package/dist/assets/{pathToGoBack-B9VrsHDV.js → pathToGoBack-ne1S9CXU.js} +1 -1
- package/dist/assets/{pdf-FJJM8Vnm.js → pdf-C9PyNDT1.js} +3 -3
- package/dist/assets/{pdf-lib-BjjuzYgj.js → pdf-lib-AYWezrZl.js} +1 -1
- package/dist/assets/{plaid-BSq4ZOJD.js → plaid-DtXw88Ai.js} +1 -1
- package/dist/assets/{pusher-dze7pV-s.js → pusher-BKAtqq4a.js} +1 -1
- package/dist/assets/{react-CN-P6GC6.js → react-BU5_UEj2.js} +1 -1
- package/dist/assets/{react-CXU-sICY.js → react-BoUZ92nm.js} +1 -1
- package/dist/assets/{react-DVf3_CUx.js → react-C9kbZlRC.js} +1 -1
- package/dist/assets/{react-Df08o1ow.js → react-CpTVGU-U.js} +1 -1
- package/dist/assets/{react-ChKRRopb.js → react-DT4sGgUJ.js} +1 -1
- package/dist/assets/{react-CS04ZEkX.js → react-nOMx_HSn.js} +1 -1
- package/dist/assets/{recharts-751aGRIs.js → recharts-CFinCL-a.js} +1 -1
- package/dist/assets/{routePaths-CNc6nHhn.js → routePaths-C7myDwxn.js} +1 -1
- package/dist/assets/{sentry-Bc1YSthu.js → sentry-B06otMHd.js} +1 -1
- package/dist/assets/{url-CnTPBNW_.js → url-C1h0szFu.js} +1 -1
- package/dist/assets/{url-DFoBqxFO.js → url-CX7iFnba.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D6hhiiSY.js → useAiCfoDashboardSuggestedQuestionsChips-TpXXYr6r.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-gUO9fBEO.js → useAskAiCfoHostNavButtonProps-CFgUcHmD.js} +1 -1
- package/dist/assets/{useCashManagementBanner-BCBGlGap.js → useCashManagementBanner-FLL8Hs1-.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-xZBjXEr7.js → useChargeCardPusherEvents-DT2ptjCA.js} +1 -1
- package/dist/assets/{useDeviceId-CC02y86g.js → useDeviceId-BTkaAWDK.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-BM36DxiM.js → useEmailConnectResultRefresh-DG9AkHtd.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BE1ryOFq.js → useInitialThreadRequest-Dc7yU2XH.js} +1 -1
- package/dist/assets/{utils-CUnybw23.js → utils-CaYSR2MR.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DhJmef-u.js → withTransactionSidePanel-tBE2uHP9.js} +1 -1
- package/dist/assets/{zeni-epic-state-MsO62wcG.js → zeni-epic-state-BkEKIYbX.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-DcW4Qf-8.js +0 -1
- package/dist/assets/AddressScreen-CldAgY2h.js +0 -9
- package/dist/assets/CustomerOnboardingAuthScreen-CXfj-HXF.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-CrG0pgFY.js +0 -12
- package/dist/assets/NotFoundScreen-DXtCPN2N.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BxpjjfmG.js";import E from"./NotFoundScreen-6c0jfbLt.js";import{a as r}from"./sentry-B06otMHd.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as b}from"./core-BjRnoVdN.js";import{eW as B,SZ as h,bq as F,bn as N,id as V,fy as q}from"./zeni-epic-state-BkEKIYbX.js";import{w as W,z as I,a0 as Y,cY as Z}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import{u as $}from"./useAskAiCfoHostNavButtonProps-CFgUcHmD.js";import{M as G}from"./MobileAppDrawer-BVsx0d52.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.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]="8024dfd7-6b80-4315-b5aa-c75b2bcb1134",e._sentryDebugIdIdentifier="sentry-dbid-8024dfd7-6b80-4315-b5aa-c75b2bcb1134")}catch{}})();const H=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Z),J=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,y=N(l),x=C||k||y,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=$({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(b,{path:"*",element:s.jsx(J,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-B06otMHd.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-BxpjjfmG.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-B06otMHd.js";import{L as dt,bZ as Tc,eW as Ac,LX as Rc,Mp as kl,c7 as Tl,f$ as Al,g0 as Rl}from"./zeni-epic-state-BkEKIYbX.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-CaYSR2MR.js";import{r as un}from"./empty-BxET7kap.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-AYWezrZl.js";import{r as Gl}from"./index-BT-czevE.js";import{r as zl}from"./index-0VsUkhux.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BjRnoVdN.js";import{u as Kl,z as Pc,L as Wl,N as Jl,O as Xl,m as Ql,d as tf}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import{d as Pe}from"./decodeURIComponentSafe-8RHUrhvv.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="356318a4-1439-4102-9b8c-dd6ebecfd908",t._sentryDebugIdIdentifier="sentry-dbid-356318a4-1439-4102-9b8c-dd6ebecfd908")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-BxpjjfmG.js";import _ from"./NotFoundScreen-6c0jfbLt.js";import{a as p}from"./sentry-B06otMHd.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as F,p as b}from"./core-BjRnoVdN.js";import{eW as j,Qf as g,Qv as S,FE as V,EN as U,FD as d,Fu as N,QI as B,FG as O}from"./zeni-epic-state-BkEKIYbX.js";import{z as L,a9 as T,bZ as Q,ag as $,bC as z,b_ as G}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import{u as K,R as E}from"./ReimbursementApprovalRuleDetailScreen-LSfhRsMC.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]="c733e0f1-a9ba-40b0-adf2-e8dbba9b0967",e._sentryDebugIdIdentifier="sentry-dbid-c733e0f1-a9ba-40b0-adf2-e8dbba9b0967")}catch{}})();const y="reimbursement-approval-rule-update",Z=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{$(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(T(Q)),q=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>j(a)),c=u(a=>g(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),L.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,W,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Z,{currentTenant:l,location:s,navigate:o,...R})},I="reimbursement-approval-rule-update",H=k(function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(B(!1))},onBackClick:()=>{$(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(O(t,!0))}}})(T(G)),J=()=>{const e=u(n=>j(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>j(a)),c=u(a=>g(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),L.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${I}`]:[],eventCallback:(a,W,h)=>{a.endsWith(I)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(F,{children:[r.jsx(b,{path:"/",element:r.jsx(J,{})}),r.jsx(b,{path:"/new",element:r.jsx(E,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(E,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-BxpjjfmG.js";import{a as f}from"./sentry-B06otMHd.js";import{u as T,j as g,h as _,g as O,i as F,n as k}from"./core-BjRnoVdN.js";import{kY as L,Qv as w,Qf as x,Fx as V,FJ as B,FE as A,FF as E,Qw as j,eW as W,FD as z}from"./zeni-epic-state-BkEKIYbX.js";import{z as P,y as N,B as Q,bP as J,ag as $,bC as K,bQ as Y}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.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]="844355cf-8b63-4342-bf6a-ea2eaf816aa1",e._sentryDebugIdIdentifier="sentry-dbid-844355cf-8b63-4342-bf6a-ea2eaf816aa1")}catch{}})();function G(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const H=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const b=[];return v.forEach(u=>{const I=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),R=u.actors.selectedNonUsers.map(m=>{const y=(S=m.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=I.concat(R);b.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),b},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(J);function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const X=k(function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(y=>{const S=y.actorKind?.selectedOption,C=y.selectedRole?.selectedOption;let D=[];S==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,b=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=b?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:b?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(Y);function ne(){const e=g(t=>W(t)),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(Z,{}):h.jsx(M,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=F(),o=P.getSignedInUser(),l=N(),r=g(n=>w(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(G(),f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,G as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-k7WSZCse.js";import{h as W,u as de,g as Z,i as Y,j as w,N as _,n as J,l as mt,o as ct,p as C}from"./core-BaHdz0Z3.js";import{eW as V,QJ as ue,c7 as pe,EI as Fe,kH as dt,EV as oe,EU as re,QK as ut,bn as be,go as Ue,QL as pt,N9 as bt,kw as Le,Na as ve,Nb as gt,jr as ht,Q1 as ft,jG as St,Ew as It,ua as Rt,jy as yt,Fg as Pe,QM as $e,QN as vt,QO as kt,QP as At,QQ as Ct,QR as Et,F0 as ke,jM as wt,Qa as xt,EW as Bt,EG as Tt,QS as jt,EF as Dt,QT as Ft,EO as Ae,F4 as Ut,F3 as Lt,E$ as Pt,QU as Me,Kf as $t,bq as Mt,ER as _t,Fy as Nt,QV as Ot,QW as Qt,Fc as Gt,F9 as Ce,Pw as zt,ED as Zt,QX as _e,F_ as Ee,G6 as Vt,QY as Ht,QZ as G,Q_ as Wt,Q$ as Ne,R0 as Jt,R1 as Oe,R2 as Qe,Fo as le,bu as qt,bK as ge,cI as he,fD as Ge,fB as ze,R3 as Kt,fy as Xt,PJ as Yt,R4 as en,R5 as Ze,PN as tn,Qv as nn,R6 as an,QI as sn,G3 as we,G2 as on,R7 as rn,R8 as ln,R9 as mn,Ra as cn,Rb as dn,Qg as un,FV as pn,FZ as bn,bs as gn,bJ as hn,cC as fn,cq as Sn,bt as In,LZ as Rn,cS as yn,cV as vn,cU as kn,cB as An}from"./zeni-epic-state-MsO62wcG.js";import{w as Ve,K as He,C as ee,G as E,z as $,b$ as We,D as te,d as k,aM as xe,o as D,au as X,J as Cn,a as Je,c0 as En,s as z,a0 as qe,c1 as wn,I as ne,c2 as xn,Z as Bn,F as Tn,B as fe,f as Ke,a9 as jn,bn as Dn,a4 as Fn,y as Xe,c3 as Un,i as Ln}from"./index-DmfkNWRz.js";import{n as N,S as Pn}from"./mui-CO4kaue3.js";import me from"./NotFoundScreen-DXtCPN2N.js";import{S as Be}from"./SetupPagesScreen-CVkrWCTb.js";import{F as Ye}from"./FeaturePreviewScreen-BCrWFTUC.js";import{a as f}from"./sentry-Bc1YSthu.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-gUO9fBEO.js";import{u as et}from"./useInitialThreadRequest-BE1ryOFq.js";import{D as $n}from"./DrawerScreen-DZnLHMBS.js";import{M as tt}from"./MobileAppDrawer-nDOn2VVp.js";import{R as Mn}from"./ReimbursementApprovalRoutes-PvPn5LSN.js";import{FallBackRoute as _n}from"./ScreenRoutes-SuYQAkkB.js";import"./recharts-751aGRIs.js";import"./analytics-D7U6FkWM.js";import"./plaid-BSq4ZOJD.js";import"./dnd-HX_d84hm.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cjd5XrbW.js";import"./lexical-P4gdCg3f.js";import"./pdf-FJJM8Vnm.js";import"./utils-CUnybw23.js";import"./analyticsHelper-Pbro0grO.js";import"./routePaths-CNc6nHhn.js";import"./BusinessVerificationPageScreen-Dfzu-Csr.js";import"./ReimbursementApprovalRuleDetailScreen-BASuYoLM.js";import"./getLocaleForTenant-B_22cG-q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b7d48259-4ed2-41fa-92ba-c4c25905834c",e._sentryDebugIdIdentifier="sentry-dbid-b7d48259-4ed2-41fa-92ba-c4c25905834c")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Je.getLocalizedStrings(),On=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ke(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ke("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(vt());const i=nt(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}})(En);function Te(){const e=W(),t=de(),n=Z(),{reimbursementId:r}=Y(),d=Ve(),c=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Z().pathname,j=x.includes("edit"),v=x.includes("reimbursement/new"),[F,B]=f.useState(!1),A=$.getSignedInUser(),I=w(p=>V(p)),g=w(p=>ue(p,r)),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect(()=>{(v&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Fe(!1,b,y,r)))});const M=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(A==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(te,{analytics:k,onLoad:p=>(H=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&H.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Hn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BxpjjfmG.js";import{h as W,u as de,g as Z,i as Y,j as w,N as _,n as J,l as mt,o as ct,p as C}from"./core-BjRnoVdN.js";import{eW as V,QJ as ue,c7 as pe,EI as Fe,kH as dt,EV as oe,EU as re,QK as ut,bn as be,go as Ue,QL as pt,N9 as bt,kw as Le,Na as ke,Nb as gt,jr as ht,Q1 as ft,jG as St,Ew as It,ua as Rt,jy as yt,Fg as Pe,QM as $e,QN as kt,QO as vt,QP as At,QQ as Ct,QR as Et,F0 as ve,jM as wt,Qa as xt,EW as Bt,EG as Tt,QS as jt,EF as Dt,QT as Ft,EO as Ae,F4 as Ut,F3 as Lt,E$ as Pt,QU as Me,Kf as $t,bq as Mt,ER as _t,Fy as Nt,QV as Ot,QW as Qt,Fc as Gt,F9 as Ce,Pw as zt,ED as Zt,QX as _e,F_ as Ee,G6 as Vt,QY as Ht,QZ as G,Q_ as Wt,Q$ as Ne,R0 as Jt,R1 as Oe,R2 as Qe,Fo as le,bu as qt,bK as ge,cI as he,fD as Ge,fB as ze,R3 as Kt,fy as Xt,PJ as Yt,R4 as en,R5 as Ze,PN as tn,Qv as nn,R6 as an,QI as sn,G3 as we,G2 as on,R7 as rn,R8 as ln,R9 as mn,Ra as cn,Rb as dn,Qg as un,FV as pn,FZ as bn,bs as gn,bJ as hn,cC as fn,cq as Sn,bt as In,LZ as Rn,cS as yn,cV as kn,cU as vn,cB as An}from"./zeni-epic-state-BkEKIYbX.js";import{w as Ve,K as He,C as ee,G as E,z as $,b$ as We,D as te,d as v,aM as xe,o as D,au as X,J as Cn,a as Je,c0 as En,s as z,a0 as qe,c1 as wn,k as ne,c2 as xn,Z as Bn,F as Tn,B as fe,f as Ke,a9 as jn,bn as Dn,a4 as Fn,y as Xe,c3 as Un,i as Ln}from"./index-DG5dsziC.js";import{n as N,S as Pn}from"./mui-CdxnWIp4.js";import me from"./NotFoundScreen-6c0jfbLt.js";import{S as Be}from"./SetupPagesScreen-B8WYHzUu.js";import{F as Ye}from"./FeaturePreviewScreen-BfuOs-n9.js";import{a as f}from"./sentry-B06otMHd.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CFgUcHmD.js";import{u as et}from"./useInitialThreadRequest-Dc7yU2XH.js";import{D as $n}from"./DrawerScreen-DbaoUmyp.js";import{M as tt}from"./MobileAppDrawer-BVsx0d52.js";import{R as Mn}from"./ReimbursementApprovalRoutes-D6a0suIn.js";import{FallBackRoute as _n}from"./ScreenRoutes-foz6ng2P.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.js";import"./analyticsHelper-D86wGf3h.js";import"./routePaths-C7myDwxn.js";import"./BusinessVerificationPageScreen-CzDFv09Y.js";import"./ReimbursementApprovalRuleDetailScreen-LSfhRsMC.js";import"./getLocaleForTenant-B67NSzYh.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]="e1be49b4-8405-40c7-b012-0cbca394bb78",e._sentryDebugIdIdentifier="sentry-dbid-e1be49b4-8405-40c7-b012-0cbca394bb78")}catch{}})();const nt=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Je.getLocalizedStrings(),On=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Ue(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Le(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ve(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ve("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(At({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(kt());const i=nt(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}})(En);function Te(){const e=W(),t=de(),n=Z(),{reimbursementId:r}=Y(),d=Ve(),c=He(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=Z().pathname,j=x.includes("edit"),k=x.includes("reimbursement/new"),[F,B]=f.useState(!1),A=$.getSignedInUser(),I=w(p=>V(p)),g=w(p=>ue(p,r)),L=et(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=pe(I?.userRole??[]);f.useEffect(()=>{(k&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Fe(!1,b,y,r)))});const M=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(A==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(We,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(te,{analytics:v,onLoad:p=>(H=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&H.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,A?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Hn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -53,7 +53,7 @@ import{j as s}from"./liveblocks-k7WSZCse.js";import{h as W,u as de,g as Z,i as Y
|
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,Wn=J(function(e,t){const n=Me(e,t.reimbursementId),r=$.getSignedInUser(),d=be(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,Qt(t.currentTenant),r));const i=pe(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Le(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e($e());const a=nt(o),i=z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Ce(n,a.type,"")):e(Ce(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{
|
|
56
|
+
`,Wn=J(function(e,t){const n=Me(e,t.reimbursementId),r=$.getSignedInUser(),d=be(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,Qt(t.currentTenant),r));const i=pe(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:Le(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e($e());const a=nt(o),i=z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(zt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(Ce(n,a.type,"")):e(Ce(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{v.trackReimbursementDeleteReimbursement(n),e(Pe(n))},cancelAndDeleteReport:a=>{a===!0?v.trackReimbursementCancelAndDeleteReimbursement(n):v.trackReimbursementCancelReimbursement(n),e(Gt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Jn(){const e=W(),t=de(),n=Z(),r=n.hash.substring(1),d=Ve(),{reimbursementId:c}=Y(),m=$.getSignedInUser(),o=w(R=>V(R)),a=w(R=>Me(R,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=et(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=Se({mobileExploreReferrer:"Reimbursement Details"});qe({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=ee(),{isFeatureEnabled:T}=h(E.isLimitedCategoryForReimbursement),[u,x]=f.useState(!1),[j,k]=f.useState(!1),[F,B]=f.useState(!1),{isFeatureEnabled:A}=h(E.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(E.isShowDeletedReimbursementsFeatureEnabled),g=w(R=>ue(R,c??"")),L=$t(o),P=Mt(o.userRole),M=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&M==="Error"&&e("page-not-found",{replace:!0}):(x(!0),t(_t(c,!1,I)))},[u,c,t,M]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&L===!1?B(!1):B(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(P||a.allApprovers.find(R=>R.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,P,o.isZeni,L,m]),f.useEffect(()=>{j||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(k(!0),t(Fe(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))},[j,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(_,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(We,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:R=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(R)}),s.jsx(Wn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:A,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:F,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const qn=J(function(e,t){return{remisReviewView:_e(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Ht(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Vt());break;case"approve":e(Ee("approved",r??""));break;case"reject":e(Ee("rejected",r??""))}}}})(xn);function Kn(){const e=W(),t=w(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(c=>_e(c)),r=ne(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:v,isAdmin:d})}const Q=tn(),at="bulk-operation-update",ce="reimbursement-approval-rule-update",{spendManagement:Xn,common:je}=Je.getLocalizedStrings(),De=Xn.reimbursement.bulkActions,Yn=N.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
min-height: 100%;
|
|
59
59
|
width: 100%;
|
|
@@ -61,8 +61,8 @@ import{j as s}from"./liveblocks-k7WSZCse.js";import{h as W,u as de,g as Z,i as Y
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ea=J(function(e,t){const n=Qe(e,Q,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=be(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:
|
|
64
|
+
`,ea=J(function(e,t){const n=Qe(e,Q,t.isBulkActionEnabled);let r=n.allSubTabs;const d=$.getSignedInUser(),c=be(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:v,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:Q,spendManagementEndPoint:`${Fn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Ne(o))},onSubtabChange:o=>{e(G()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;v?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&v.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&v.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(le(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(we("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(we("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(ce)&&e(sn(!1))},onEventReceived:o=>{o===at&&e(an())}}})(jn(Dn));function ta(){const e=W(),t=de(),n=Z(),r=n.state,d=He(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Wt(r.tab.toString());S!=null?t(Ne(S)):console.log("Warning:Not a valid remiListTab");const O=Jt(r.subTab.toString());O!=null?t(Oe(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=ee(),{isFeatureEnabled:i}=a(E.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(E.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(E.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(E.isReimbursementBulkActionEnabled),T=$.getSignedInUser(),u=w(S=>V(S)),[x,j]=f.useState(!1),[k,F]=f.useState(!1),B=ne(),A=B?.loggedInUserRole?.includes("admin")===!0,I=w(S=>Qe(S,Q,h)),{areTenantIdsInSync:g}=Bn(),L=I.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:M}=Se({mobileExploreReferrer:"Reimbursement List"});if(qe({isDataReady:L==="Completed"}),f.useEffect(()=>{!k&&g&&(F(!0),t(le(Q,!0,l,!1,!0)))},[k,Q,t,g]),T==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&qt(u),p=ge(B?.loggedInUserRoleMap),H=he(B?.loggedInUserRoleMap),ae=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,q=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,se=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ie=w(S=>Ue(S.companyState,u.companyId)),st=ie?.company.featuresActivationInfo.connectedAccountProvider,Ie=S=>{j(S)},{isFeatureEnabled:it}=a(E.isDebitCardFeatureEnabled),ot=Ge(it,u),rt=ze(u),{remisProcessed:K,remisProcessing:Re}=w(S=>Kt(S));f.useEffect(()=>{K===Re&&c!=null&&(t(Xt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:K>1?De.reports:De.report},{variableName:"_has_",variableValue:K>1?je.texts.have:je.texts.has},{variableName:"_action_",variableValue:Yt(c)}]})),t(en()),setTimeout(()=>{t(le(Q,!0,l,!1,!0,!0))},3e3),m(null))},[K,Re]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${at}`,`private-encrypted-${u.companyId}.${ce}`]:[],eventCallback:(S,O,ye)=>{S.endsWith(ce)?ye.onReimbursementApprovalRulesEventReceived?.(S):O.entity_type==="reimbursement"&&(m(O.operation_type),ye.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Ye,{}):q&&(!R||p)||H&&ae?s.jsxs(s.Fragment,{children:[L==="Completed"?s.jsx(te,{analytics:v,onLoad:S=>(O=>O.trackPageLoaded(Ke.Event.reimbursementHome))(S)}):null,s.jsx(tt,{isAppContentDrawerOpen:x,handleDrawerToggle:Ie}),s.jsxs(Yn,{windowSize:d,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Kn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:Q,isAdmin:A,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{Ie(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:P,onAskAiCfoClick:M,...lt})]})]}):se&&p?s.jsx(_,{to:"../setup"}):B!=null&&Ze(u,B.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(fe,{fetchState:"In-Progress"}):s.jsx(me,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=N(Pn)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,ia=J(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:
|
|
68
|
+
`,ia=J(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:v,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=W(),t=Z(),{tenantEmailDomain:n}=Y(),r=Xe(),[d,c]=f.useState(!1),m=w(k=>V(k)),o=$.getSignedInUserTenant(n)?.companyId??m.companyId,a=$.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=ne(),y=ge(b?.loggedInUserRoleMap),h=he(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,x=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,j=k=>{c(k)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(_,{to:"../../../reimbursements"}):x&&y?s.jsx(_,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!x||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:v,onLoad:k=>(F=>F.trackPageLoaded(Ke.Event.reimbursementPromoPage))(k)}),s.jsx(tt,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{j(!0)}})]}):s.jsx(fe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=w(ie=>V(ie)),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Xe(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(E.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(E.isDebitCardFeatureEnabled),i=Ge(a,e),l=ze(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=ge(t?.loggedInUserRoleMap),x=T&&u,j=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,k=j&&Sn(t?.loggedInUserRoleMap),F=Ln(e,o,a)&&!b,B=F&&In(t?.loggedInUserRoleMap),A=Rn(t?.loggedInUserRoleMap),I=yn(t?.loggedInUserRoleMap),g=kn(t?.loggedInUserRoleMap),L=j&&I,P=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&g,M=vn(t?.loggedInUserRoleMap),R=An(t?.loggedInUserRoleMap),p=he(t?.loggedInUserRoleMap),H=F&&M,{tenantEmailDomain:ae}=Y(),q=Z(),se=n===!0&&(u||p&&c);return s.jsxs(ct,{children:[q.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"verification",element:s.jsx(Be,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:A,productType:"reimbursement",type:"verification"})}),s.jsx(C,{path:"setup",element:s.jsx(Be,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:k,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:A,productType:"reimbursement",type:"setup"})}),s.jsx(C,{path:"promo",element:s.jsx(oa,{})}),s.jsx(C,{path:"approval-rules/*",element:x?s.jsx(Mn,{}):s.jsx(_n,{showZeniAccountRoute:L,isUserHasBillPayAccess:R,isUserHasReimbursementAccess:p,showTreasuryRoute:P,isTenantBankingOnly:i,showChargeCardRoute:H,tenantEmailDomain:ae??""})}),se&&s.jsx(C,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(C,{path:"/*",element:s.jsx(Ye,{})}),t!=null&&Ze(e,t?.loggedInUserRoleMap)&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../promo"})}),d&&u&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../setup"})})]}):q.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"new",element:s.jsx(Te,{})}),s.jsx(C,{path:":reimbursementId",element:s.jsx(Jn,{})}),s.jsx(C,{path:":reimbursementId/edit",element:s.jsx(Te,{})}),s.jsx(C,{path:"*",element:s.jsx(me,{})})]}):s.jsx(C,{path:"*",element:s.jsx(fe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${D.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(C,{path:"*",element:s.jsx(me,{})})]})}export{Pa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-k7WSZCse.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-BaHdz0Z3.js";import{eW as v,fS as w,Mq as Te,kw as K,qQ as J,rF as A,kk as Re,jo as Me,vd as W,rK as Oe,bs as Ae,Mr as Fe,bn as ke,wm as De,Ms as je,Mt as Ee,v5 as Pe,Mu as Y,Mv as ve,Mw as Le,Mx as Be,My as Ve,Mz as I,MA as F,MB as k,MC as N,MD as D,ME as j,dI as Ue,w2 as xe,vS as q,vT as $,w8 as ze,vX as Z,we as Ge,MF as He,MG as Ye,MH as Ne,MI as qe,MJ as $e,fD as Ze,fB as Qe}from"./zeni-epic-state-MsO62wcG.js";import{R as Xe,T as Ke,V as Je,X as We,K as ea,C as ee,G as E,z as ae,Z as aa,I as sa,c as ta,_ as oa,a0 as na,D as ra,d as P,f as ia,a1 as la,s as se,a2 as ca,a3 as da,a4 as pa}from"./index-DmfkNWRz.js";import"./mui-CO4kaue3.js";import fa from"./NotFoundScreen-DXtCPN2N.js";import{F as ma}from"./FeaturePreviewScreen-BCrWFTUC.js";import{a as _}from"./sentry-Bc1YSthu.js";import{u as ua}from"./useInitialThreadRequest-BE1ryOFq.js";import{t as Q,a as X,b as _a}from"./routePaths-CNc6nHhn.js";import{M as ha}from"./MobileAppDrawer-nDOn2VVp.js";import"./recharts-751aGRIs.js";import"./analytics-D7U6FkWM.js";import"./plaid-BSq4ZOJD.js";import"./dnd-HX_d84hm.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cjd5XrbW.js";import"./lexical-P4gdCg3f.js";import"./pdf-FJJM8Vnm.js";import"./utils-CUnybw23.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]="417588de-fa43-4cab-9ed4-17dea1e1f79a",e._sentryDebugIdIdentifier="sentry-dbid-417588de-fa43-4cab-9ed4-17dea1e1f79a")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},Ca=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:J(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(A(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return X(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?X(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(W())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),g=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>K(n)),M=d(n=>J(n)),le=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&g==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,L,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(W());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Xe(he??"")==="reports",be=Ke(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Je({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-BxpjjfmG.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-BjRnoVdN.js";import{eW as v,fS as w,Mq as Te,kw as K,qQ as J,rF as k,kk as Re,jo as Me,vd as W,rK as Oe,bs as ke,Mr as Ae,bn as Fe,wm as De,Ms as je,Mt as Ee,v5 as Pe,Mu as Y,Mv as ve,Mw as Le,Mx as Be,My as Ve,Mz as I,MA as A,MB as F,MC as N,MD as D,ME as j,dI as Ue,w2 as xe,vS as q,vT as $,w8 as ze,vX as Z,we as Ge,MF as He,MG as Ye,MH as Ne,MI as qe,MJ as $e,fD as Ze,fB as Qe}from"./zeni-epic-state-BkEKIYbX.js";import{R as Xe,T as Ke,V as Je,X as We,K as ea,C as ee,G as E,z as ae,Z as aa,k as sa,c as ta,_ as oa,a0 as na,D as ra,d as P,f as ia,a1 as la,s as se,a2 as ca,a3 as da,a4 as pa}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import fa from"./NotFoundScreen-6c0jfbLt.js";import{F as ma}from"./FeaturePreviewScreen-BfuOs-n9.js";import{a as _}from"./sentry-B06otMHd.js";import{u as ua}from"./useInitialThreadRequest-Dc7yU2XH.js";import{t as Q,a as X,b as _a}from"./routePaths-C7myDwxn.js";import{M as ha}from"./MobileAppDrawer-BVsx0d52.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.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]="7825e39e-69cc-4864-9b10-494b82656038",e._sentryDebugIdIdentifier="sentry-dbid-7825e39e-69cc-4864-9b10-494b82656038")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},Ca=Ie(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:K(e),isAccountingProjectsEnabled:J(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>y(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return X(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?X(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(N({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(W())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=We(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),g=d(n=>w(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>K(n)),M=d(n=>J(n)),le=d(n=>w(n).isCompareModeOn),b=d(n=>w(n).filter),O=d(n=>w(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(k(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&g==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))},[i,L,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(W());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&ke(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Xe(he??"")==="reports",be=Ke(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Je({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-BxpjjfmG.js";import{z as b,D as C,d as u,f as N,d7 as S,C as E,G as k}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import g from"./NotFoundScreen-6c0jfbLt.js";import{a as c}from"./sentry-B06otMHd.js";import{u as I,j as h,h as F,g as T,n as L,o as U,p as f,N as y}from"./core-BjRnoVdN.js";import{eW as _,TB as j,TC as p,vJ as P,fJ as V,TD as G,vH as J}from"./zeni-epic-state-BkEKIYbX.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.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]="e22cf382-851b-4956-b380-4fc93bd8f2f7",e._sentryDebugIdIdentifier="sentry-dbid-e22cf382-851b-4956-b380-4fc93bd8f2f7")}catch{}})();const z=L(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(m=>{s.push(m.companyName),r.push(m.emailIds[0])}),u.trackInviteEmailClicked("send",s,r,s.length)}e(J())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}})(S),B=()=>{const e=I(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h(o=>_(o)),m=F(),v=T(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h(o=>j(o)),w=d?.firstName!=null?d.firstName:"User";c.useEffect(()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))},[]),c.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))},[l.fetchState,e]);const x=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(C,{analytics:u,onLoad:o=>(D=>D.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(z,{navigate:m,location:v,currentTenant:r,companyName:x,userName:w,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=E(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as t,bn as ls,eW as us,fD as ds,fB as cs,gj as ms,fq as _s,cW as pe,cC as hs,fT as Es,cu as ps,bE as Rs,bo as xs,fX as Is,v as gs,LY as js,bs as Ts,LZ as As,bK as bs,bJ as fs,bt as Ds,cq as ys,L_ as Cs,L$ as vs,cS as Us,cV as ws,cU as Os,cB as Ps,cI as Fs,o8 as Re,fz as xe,gt as Ls,f$ as Ie,gq as ge,gr as je,g0 as Hs}from"./zeni-epic-state-MsO62wcG.js";import{j as e}from"./liveblocks-k7WSZCse.js";import{a as O}from"./sentry-Bc1YSthu.js";import{u as ks,h as Bs,i as Vs,g as Ss,j as z,l as Te,N as u,o as Ns,p as a}from"./core-BaHdz0Z3.js";import{y as Zs,u as Ms,z as f,C as zs,c as Gs,A as $s,G,i as Ws,W as qs,I as Ys,L as F,a as Ae,t as _,P as Js,d as Q,l}from"./index-DmfkNWRz.js";import"./mui-CO4kaue3.js";import{f as be}from"./analyticsHelper-Pbro0grO.js";import{t as Ks}from"./getLocaleForTenant-B_22cG-q.js";import"./recharts-751aGRIs.js";import"./analytics-D7U6FkWM.js";import"./plaid-BSq4ZOJD.js";import"./dnd-HX_d84hm.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cjd5XrbW.js";import"./lexical-P4gdCg3f.js";import"./pdf-FJJM8Vnm.js";import"./utils-CUnybw23.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},T=new o.Error().stack;T&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[T]="9429b95b-dbb4-4ac8-a13f-1eb2a396e150",o._sentryDebugIdIdentifier="sentry-dbid-9429b95b-dbb4-4ac8-a13f-1eb2a396e150")}catch{}})();const Xs={dashboard:()=>t(()=>import("./DashboardRoutes-BLE92vW2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t(()=>import("./BillPayRoutes-qkXBoyKe.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t(()=>import("./ReimbursementRoutes-DKDG9b9J.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t(()=>import("./TransactionListRoutes-B5SGKg_-.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t(()=>import("./SettingsRoutes-QTNoGxNR.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t(()=>import("./ReportsRoutes-E3A517u8.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t(()=>import("./ChargeCardRoutes-DtoUVLz_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t(()=>import("./PeopleRoutes-1PdCBIPh.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t(()=>import("./ExpenseAutomationRoutes-CP8NKJO0.js"),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t(()=>import("./TreasuryRoutes-BCE8j_R6.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t(()=>import("./VendorsRoutes-B-ewvqLW.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t(()=>import("./ZeniAccountRoutes-B7J0vSwn.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l(()=>t(()=>import("./ReportsRoutes-E3A517u8.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20]))),st=l(()=>t(()=>import("./AddressRoutes-DcW4Qf-8.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20]))),tt=l(()=>t(()=>import("./PeopleRoutes-1PdCBIPh.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20]))),nt=l(()=>t(()=>import("./PandLWithForecastRoutes-DF1hH1kU.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20]))),at=l(()=>t(()=>import("./CustomerOnboardingRoutes-BvJrgH_H.js"),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20]))),ot=l(()=>t(()=>import("./VendorsRoutes-B-ewvqLW.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20]))),rt=l(()=>t(()=>import("./TransactionDetailRoutes-CspiDqNl.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20]))),fe=l(()=>t(()=>import("./EntityDetailRoutes-Ztyi01_3.js"),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20]))),it=l(()=>t(()=>import("./DashboardRoutes-BLE92vW2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),De=l(()=>t(()=>import("./BillPayRoutes-qkXBoyKe.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20]))),lt=l(()=>t(()=>import("./SettingsRoutes-QTNoGxNR.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20]))),ye=l(()=>t(()=>import("./ReimbursementRoutes-DKDG9b9J.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20]))),ut=l(()=>t(()=>import("./ZeniAccountRoutes-B7J0vSwn.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))),dt=l(()=>t(()=>import("./TreasuryRoutes-BCE8j_R6.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20]))),ct=l(()=>t(()=>import("./TransactionListRoutes-B5SGKg_-.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20]))),mt=l(()=>t(()=>import("./ChargeCardRoutes-DtoUVLz_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20]))),_t=l(()=>t(()=>import("./NotificationRoutes-BrPJJjEp.js"),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20]))),ht=l(()=>t(()=>import("./PerformanceRoutes-Isw87iKN.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20]))),Et=l(()=>t(()=>import("./ExpenseAutomationRoutes-CP8NKJO0.js"),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20]))),pt=l(()=>t(()=>import("./RewardsRoutes-BTTUd7t0.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20]))),Rt=l(()=>t(()=>import("./TaskRoutes-BtRVTkOP.js"),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20]))),xt=l(()=>t(()=>import("./AiCfoScreen-D9aWaDO3.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20]))),Ce=l(()=>t(()=>import("./CardsAiCfoScreen-DUNQLzC2.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,20]))),y=l(()=>t(()=>import("./NotFoundScreen-DXtCPN2N.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,20]))),It=l(()=>t(()=>import("./TaskListScreen-DPShaK_Z.js"),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20])));function St({setTenantEmailDomain:o}){const T=ks(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=Ms(),v=f.getSignedInUserTenant(i)?.tenantId,g=f.getSignedInUser(),se=ls(g),$=Ss(),[V,Pe]=O.useState(!1),r=z(n=>us(n)),{useFeatureGate:N}=zs(),Z=Gs(),te=$s(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z(n=>n.tenantState.fetchState),j=z(n=>n.tenantState.activeTenantFetchState.fetchState),h=j==="Completed"||A==="Completed"?ds(ne,r):void 0,J=j==="Completed"||A==="Completed"?cs(r):void 0,ke=Ws(r,He,ne),{isCardsHidden:Be}=qs(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(G.isAiCfoFileUploadEnabled),W=z(n=>ms(n));if(i!=null){const n=f.getSignedInUserTenant(i);g!=null&&n!=null&&be(g,r,L)}const M={tenantId:v,userId:g?.userId,sessionId:g?.zeniSessionId},ae=_s(),E=Ys(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ze=hs(E?.loggedInUserRoleMap),oe=O.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>M.tenantId!=null?Es(n,M.tenantId):void 0);O.useEffect(()=>{U(F.TENANT_FETCHING),o(i)},[i]),O.useEffect(()=>{if(X!=null&&v!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?T(Is(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}},[X,v]),O.useEffect(()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!gs(ae,M)&&f.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,b,d,s){if(xe(b?.userId,b?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=f.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()}(M,g,T,Me))},[M,ae,g,T,f]),O.useEffect(()=>{f.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,b,d,s,c,S,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(q&&os){k(Ie(s));const Y=f.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)))}else q&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(c.userId,s))),q&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)));if(q){Q.identify(c.userId,{tenant_id:s});const Y=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(Hs(c.userId,s,c.zeniSessionId))),Y&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(c.userId,c.zeniSessionId)))}}(A,j,r,v,g,U,T))},[v,j]),O.useEffect(()=>{f.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),g!=null&&be(g,r,L,void 0,W.tenantsBaseInOrder))},[W,A,r,g]),O.useEffect(()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())},[j,A,v,V]);const ie=O.useRef(!1);O.useEffect(()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,function(n=Qs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[j,V]);const w=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=As(E?.loggedInUserRoleMap),qe=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&bs(E?.loggedInUserRoleMap),_e=Fe&&!w,Ye=Le&&!w,Je=le&&fs(E?.loggedInUserRoleMap),Ke=ue&&Ds(E?.loggedInUserRoleMap),Xe=_e&&ys(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),R=Fs(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ss,I=Ye&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||We===!0||Qe===!0||es===!0;return f.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(g!=null&&A!=="In-Progress"&&T(Re(g.userId,g.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&qe===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(gt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||$e?e.jsx(rt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(It,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Xe||Ke?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:I?e.jsx(dt,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(ye,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(ye,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(pt,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:Z?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const gt=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):T?e.jsx(Tt,{tenantEmailDomain:C}):B?e.jsx(jt,{tenantEmailDomain:C}):e.jsx(y,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,St as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-D_nR7gnV.js","assets/sentry-B06otMHd.js","assets/core-BjRnoVdN.js","assets/zeni-epic-state-BkEKIYbX.js","assets/index-DG5dsziC.js","assets/mui-CdxnWIp4.js","assets/analytics-CMhYvjgp.js","assets/utils-CaYSR2MR.js","assets/withTransactionSidePanel-tBE2uHP9.js","assets/useAskAiCfoHostNavButtonProps-CFgUcHmD.js","assets/TransactionDetailScreen-CHtoQtM9.js","assets/decodeURIComponentSafe-8RHUrhvv.js","assets/routePaths-C7myDwxn.js","assets/NotFoundScreen-6c0jfbLt.js","assets/useInitialThreadRequest-Dc7yU2XH.js","assets/analyticsHelper-D86wGf3h.js","assets/CompanyPassportScreen-Dgc1b90N.js","assets/MobileAppDrawer-BVsx0d52.js","assets/useAiCfoDashboardSuggestedQuestionsChips-TpXXYr6r.js","assets/FeaturePreviewScreen-BfuOs-n9.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-DoSwk72T.js","assets/AddressScreen-_QOTUIVr.js","assets/DomesticWireDetailScreen-BrMTJ0LT.js","assets/DrawerScreen-DbaoUmyp.js","assets/SetupPagesScreen-B8WYHzUu.js","assets/BusinessVerificationPageScreen-CzDFv09Y.js","assets/BillPayApprovalRoutes-ClmCpYFd.js","assets/ReimbursementApprovalRuleDetailScreen-LSfhRsMC.js","assets/getLocaleForTenant-B67NSzYh.js","assets/ReimbursementRoutes-Bh9_hMkC.js","assets/ReimbursementApprovalRoutes-D6a0suIn.js","assets/TransactionListRoutes-DqRETwf-.js","assets/ZeniAccountStatementScreen-C6Lownq7.js","assets/SettingsRoutes-fWbhF4uP.js","assets/accountMappingHelper-Cb6Phjli.js","assets/useEmailConnectResultRefresh-DG9AkHtd.js","assets/QBOConnectionScreen-DaV3loZh.js","assets/empty-BxET7kap.js","assets/index-BT-czevE.js","assets/url-CX7iFnba.js","assets/index-0VsUkhux.js","assets/ReportsRoutes-vW__-mqO.js","assets/ChargeCardRoutes-D-2cGFR8.js","assets/useChargeCardPusherEvents-DT2ptjCA.js","assets/PeopleRoutes-CeN9aIQp.js","assets/ExpenseAutomationRoutes-Bg1lugdX.js","assets/TreasuryRoutes-Bgqikq-u.js","assets/useCashManagementBanner-FLL8Hs1-.js","assets/VendorsRoutes-CHFxSJdV.js","assets/pathToGoBack-ne1S9CXU.js","assets/ZeniAccountRoutes-Chw_TTRS.js","assets/AddressRoutes-CRqr9Fgx.js","assets/PandLWithForecastRoutes-DWPW45GW.js","assets/CustomerOnboardingRoutes-CU2s9JFJ.js","assets/TransactionDetailRoutes-D6y-8FuE.js","assets/EntityDetailRoutes-RWRqdoUW.js","assets/NotificationRoutes-m7aisVZh.js","assets/PerformanceRoutes-Dhkh0POj.js","assets/RewardsRoutes-DTUZ1AWT.js","assets/TaskRoutes-Brk_g9vS.js","assets/TaskListScreen-BNNdSA1G.js","assets/AiCfoScreen-CX7E8Peo.js","assets/CardsAiCfoScreen-eeV0SveA.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t,bn as ls,eW as us,fD as ds,fB as cs,gj as ms,fq as _s,cW as pe,cC as hs,fT as Es,cu as ps,bE as Rs,bo as xs,fX as gs,v as Is,LY as js,bs as Ts,LZ as As,bK as fs,bJ as bs,bt as Ds,cq as ys,L_ as Cs,L$ as vs,cS as Us,cV as ws,cU as Os,cB as Ps,cI as Fs,o8 as Re,fz as xe,gt as Ls,f$ as ge,gq as Ie,gr as je,g0 as ks}from"./zeni-epic-state-BkEKIYbX.js";import{j as e}from"./liveblocks-BxpjjfmG.js";import{a as O}from"./sentry-B06otMHd.js";import{u as Hs,h as Bs,i as Vs,g as Ss,j as z,l as Te,N as u,o as Ns,p as a}from"./core-BjRnoVdN.js";import{y as Zs,u as Ms,z as b,C as zs,c as Gs,A as $s,G,i as Ws,W as qs,k as Ys,L as F,a as Ae,t as _,P as Js,d as Q,l}from"./index-DG5dsziC.js";import"./mui-CdxnWIp4.js";import{f as fe}from"./analyticsHelper-D86wGf3h.js";import{t as Ks}from"./getLocaleForTenant-B67NSzYh.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},T=new o.Error().stack;T&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[T]="96fd1b0a-8d9f-400a-a06b-b357b5e81b68",o._sentryDebugIdIdentifier="sentry-dbid-96fd1b0a-8d9f-400a-a06b-b357b5e81b68")}catch{}})();const Xs={dashboard:()=>t(()=>import("./DashboardRoutes-D_nR7gnV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t(()=>import("./BillPayRoutes-DoSwk72T.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t(()=>import("./ReimbursementRoutes-Bh9_hMkC.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t(()=>import("./TransactionListRoutes-DqRETwf-.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t(()=>import("./SettingsRoutes-fWbhF4uP.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t(()=>import("./ReportsRoutes-vW__-mqO.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t(()=>import("./ChargeCardRoutes-D-2cGFR8.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t(()=>import("./PeopleRoutes-CeN9aIQp.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t(()=>import("./ExpenseAutomationRoutes-Bg1lugdX.js"),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t(()=>import("./TreasuryRoutes-Bgqikq-u.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t(()=>import("./VendorsRoutes-CHFxSJdV.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t(()=>import("./ZeniAccountRoutes-Chw_TTRS.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l(()=>t(()=>import("./ReportsRoutes-vW__-mqO.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20]))),st=l(()=>t(()=>import("./AddressRoutes-CRqr9Fgx.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20]))),tt=l(()=>t(()=>import("./PeopleRoutes-CeN9aIQp.js"),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20]))),nt=l(()=>t(()=>import("./PandLWithForecastRoutes-DWPW45GW.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20]))),at=l(()=>t(()=>import("./CustomerOnboardingRoutes-CU2s9JFJ.js"),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20]))),ot=l(()=>t(()=>import("./VendorsRoutes-CHFxSJdV.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20]))),rt=l(()=>t(()=>import("./TransactionDetailRoutes-D6y-8FuE.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20]))),be=l(()=>t(()=>import("./EntityDetailRoutes-RWRqdoUW.js"),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20]))),it=l(()=>t(()=>import("./DashboardRoutes-D_nR7gnV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),De=l(()=>t(()=>import("./BillPayRoutes-DoSwk72T.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20]))),lt=l(()=>t(()=>import("./SettingsRoutes-fWbhF4uP.js"),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20]))),ye=l(()=>t(()=>import("./ReimbursementRoutes-Bh9_hMkC.js"),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20]))),ut=l(()=>t(()=>import("./ZeniAccountRoutes-Chw_TTRS.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))),dt=l(()=>t(()=>import("./TreasuryRoutes-Bgqikq-u.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20]))),ct=l(()=>t(()=>import("./TransactionListRoutes-DqRETwf-.js"),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20]))),mt=l(()=>t(()=>import("./ChargeCardRoutes-D-2cGFR8.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20]))),_t=l(()=>t(()=>import("./NotificationRoutes-m7aisVZh.js"),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20]))),ht=l(()=>t(()=>import("./PerformanceRoutes-Dhkh0POj.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20]))),Et=l(()=>t(()=>import("./ExpenseAutomationRoutes-Bg1lugdX.js"),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20]))),pt=l(()=>t(()=>import("./RewardsRoutes-DTUZ1AWT.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20]))),Rt=l(()=>t(()=>import("./TaskRoutes-Brk_g9vS.js"),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20]))),xt=l(()=>t(()=>import("./AiCfoScreen-CX7E8Peo.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20]))),Ce=l(()=>t(()=>import("./CardsAiCfoScreen-eeV0SveA.js"),__vite__mapDeps([63,1,2,3,4,5,6,7,20]))),y=l(()=>t(()=>import("./NotFoundScreen-6c0jfbLt.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,20]))),gt=l(()=>t(()=>import("./TaskListScreen-BNNdSA1G.js"),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20])));function St({setTenantEmailDomain:o}){const T=Hs(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Ms(),v=b.getSignedInUserTenant(i)?.tenantId,I=b.getSignedInUser(),se=ls(I),$=Ss(),[V,Pe]=O.useState(!1),r=z(n=>us(n)),{useFeatureGate:N}=zs(),Z=Gs(),te=$s(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z(n=>n.tenantState.fetchState),j=z(n=>n.tenantState.activeTenantFetchState.fetchState),h=j==="Completed"||A==="Completed"?ds(ne,r):void 0,J=j==="Completed"||A==="Completed"?cs(r):void 0,He=Ws(r,ke,ne),{isCardsHidden:Be}=qs(r?.tenantId),Ve=!He||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(G.isAiCfoFileUploadEnabled),W=z(n=>ms(n));if(i!=null){const n=b.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const M={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=Ys(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ze=hs(E?.loggedInUserRoleMap),oe=O.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(n=>M.tenantId!=null?Es(n,M.tenantId):void 0);O.useEffect(()=>{U(F.TENANT_FETCHING),o(i)},[i]),O.useEffect(()=>{if(X!=null&&v!=null){const n=X.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=ps(Number(f[0])),s=Number(f[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?T(gs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}},[X,v]),O.useEffect(()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Is(ae,M)&&b.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Ls(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=b.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?Q.identify(n.userId,{tenant_id:n.tenantId}):Q.resetUserIdentity()}(M,I,T,Me))},[M,ae,I,T,b]),O.useEffect(()=>{b.isSignedIn()&&(U(F.TENANT_FETCHING),function(n,f,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(q&&os){H(ge(s));const Y=b.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&b.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(c.userId,s)))}else q&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),q&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(je(c.userId,s)));if(q){Q.identify(c.userId,{tenant_id:s});const Y=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),Y&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}}(A,j,r,v,I,U,T))},[v,j]),O.useEffect(()=>{b.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),b.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))},[W,A,r,I]),O.useEffect(()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())},[j,A,v,V]);const ie=O.useRef(!1);O.useEffect(()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,function(n=Qs,f=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},f)}())},[j,V]);const w=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=As(E?.loggedInUserRoleMap),qe=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&fs(E?.loggedInUserRoleMap),_e=Fe&&!w,Ye=Le&&!w,Je=le&&bs(E?.loggedInUserRoleMap),Ke=ue&&Ds(E?.loggedInUserRoleMap),Xe=_e&&ys(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),R=Fs(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ss,g=Ye&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||We===!0||Qe===!0||es===!0;return b.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&qe===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||$e?e.jsx(rt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(be,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(be,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Xe||Ke?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(y,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(y,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(y,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(ye,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(ye,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(y,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(pt,{}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(y,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:Z?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(y,{})}),e.jsx(a,{path:"*",element:e.jsx(y,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):T?e.jsx(Tt,{tenantEmailDomain:C}):B?e.jsx(jt,{tenantEmailDomain:C}):e.jsx(y,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,St as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-BxpjjfmG.js";import{a as u}from"./sentry-B06otMHd.js";import{h as L,g as $,u as U,j as S,s as re,n as G,i as Z,o as ne,p as v}from"./core-BjRnoVdN.js";import{bn as De,eW as j,go as Me,m_ as le,Oh as Te,hE as he,O8 as Ue,qQ as _e,kw as be,mW as Be,hG as Re,Oa as Fe,O9 as Oe,Qx as Ve,zk as ze,EN as Le,Q6 as Ne,Qf as Qe,c7 as ae,cN as $e,cO as Ge,bs as Ze,M9 as He,xM as Ke,Qy as We,Hc as qe,Et as Je,Ek as Se,Eh as Xe,xQ as ye,En as Ce,Eq as Ie,Ew as oe,ua as se,xP as Ye,k8 as J,kb as Ae,Qz as en,lc as nn,y3 as tn,N0 as an,N1 as on,k6 as sn,QA as cn,k9 as rn,ri as ln,MX as dn,MY as un,rm as pn,hp as gn,Mh as ee,hh as de,he as mn,hm as fn,Mi as hn,y0 as bn,QB as Sn,QC as yn,EK as Cn,fB as Ee,fD as xe,QD as In,gc as An,Mr as En,x$ as ue,gh as pe,gg as xn,x_ as vn,gf as kn,ge as wn,QE as Pn,fG as ve,QF as jn,QG as Dn,y6 as Mn,xZ as ge,QH as Tn,fW as Un,xW as _n,b_ as Bn,c6 as Rn,c5 as Fn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as Qn}from"./zeni-epic-state-BkEKIYbX.js";import{C as X,G as O,z as w,ag as ke,bR as $n,d as H,f as Gn,bC as Zn,k as K,B as ie,bS as Hn,i as we,W as Pe,bT as Kn,ar as Wn,m as je,bU as qn,bV as Jn,bW as Xn,Z as Yn,bX as et,s as nt,bY as tt}from"./index-DG5dsziC.js";import{n as V}from"./mui-CdxnWIp4.js";import{M as R}from"./MobileAppDrawer-BVsx0d52.js";import{a as W,g as q,m as at}from"./accountMappingHelper-Cb6Phjli.js";import{t as ot,A as st}from"./AddressScreen-_QOTUIVr.js";import Q from"./NotFoundScreen-6c0jfbLt.js";import{g as it}from"./analyticsHelper-D86wGf3h.js";import{B as ct}from"./BusinessVerificationPageScreen-CzDFv09Y.js";import{C as rt}from"./CompanyPassportScreen-Dgc1b90N.js";import{u as lt,a as dt}from"./useEmailConnectResultRefresh-DG9AkHtd.js";import{q as me}from"./QBOConnectionScreen-DaV3loZh.js";import{B as ut}from"./BillPayApprovalRoutes-ClmCpYFd.js";import{R as pt}from"./ReimbursementApprovalRoutes-D6a0suIn.js";import"./recharts-CFinCL-a.js";import"./analytics-CMhYvjgp.js";import"./plaid-DtXw88Ai.js";import"./dnd-DD1NomKe.js";import"./stripe-DMRn4zHo.js";import"./lottie-iCzPfqr5.js";import"./lexical-CkYiXWk9.js";import"./pdf-C9PyNDT1.js";import"./utils-CaYSR2MR.js";import"./routePaths-C7myDwxn.js";import"./empty-BxET7kap.js";import"./pdf-lib-AYWezrZl.js";import"./index-BT-czevE.js";import"./url-CX7iFnba.js";import"./index-0VsUkhux.js";import"./decodeURIComponentSafe-8RHUrhvv.js";import"./ReimbursementApprovalRuleDetailScreen-LSfhRsMC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6e1700d6-81e0-4b10-ab56-0a46fdfcdddf",e._sentryDebugIdIdentifier="sentry-dbid-6e1700d6-81e0-4b10-ab56-0a46fdfcdddf")}catch{}})();const gt=V.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|