@zeniai/web-app-ui 5.2.18-qa → 5.2.19-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-C8sZ1LMI.js +1 -0
- package/dist/assets/AddressScreen-BIXlTd0k.js +9 -0
- package/dist/assets/AiCfoScreen-BBbfhHPd.js +22 -0
- package/dist/assets/{BillPayApprovalRoutes-8Ll-z-xT.js → BillPayApprovalRoutes-Cckj8faG.js} +1 -1
- package/dist/assets/{BillPayRoutes-pfP5wo_C.js → BillPayRoutes-DoYzm1s_.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-MOMZNf2n.js → BusinessVerificationPageScreen-DtwUBmOs.js} +2 -2
- package/dist/assets/CardsAiCfoScreen-DC_ARWEe.js +14 -0
- package/dist/assets/{ChargeCardRoutes-CkepWz7M.js → ChargeCardRoutes-DrlvPNEr.js} +10 -10
- package/dist/assets/CompanyPassportScreen-DSK81yql.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Dt0zrkJk.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-BLWOt3oi.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-BRWto4FV.js +30 -0
- package/dist/assets/{DashboardRoutes-MCNi0Cm3.js → DashboardRoutes-DMxcTWza.js} +4 -4
- package/dist/assets/{DefaultTenantHome-B8QXwYfi.js → DefaultTenantHome-BL6j-dU2.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-CIqjtvpv.js +18 -0
- package/dist/assets/DrawerScreen-CF6jlYli.js +1 -0
- package/dist/assets/EntityDetailRoutes-DsK2unnT.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Bh2GJ5eR.js +25 -0
- package/dist/assets/FeaturePreviewScreen-CqdV6Bc4.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CkSSYOv5.js +1 -0
- package/dist/assets/MagicLinkRoutes-CUITVdVT.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-Ck9fKk0s.js +12 -0
- package/dist/assets/MobileAppDrawer-N86gBmzN.js +1 -0
- package/dist/assets/NotFoundScreen-B9IlcCjB.js +1 -0
- package/dist/assets/{NotificationRoutes-CghqA--C.js → NotificationRoutes-cS6QWWsP.js} +1 -1
- package/dist/assets/OAuthConsentScreen-8YU26znY.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-UkbQdYTq.js +1 -0
- package/dist/assets/PeopleRoutes-CsD4yHB-.js +22 -0
- package/dist/assets/PerformanceRoutes-NXKZM9JF.js +1 -0
- package/dist/assets/{Preview-C3t9OASa.js → Preview-Bjww8VIJ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BxSTUR6Z.js → QBOConnectionScreen-Cwzdj4Q-.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DpbViwiq.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BCDSmsvv.js → ReimbursementApprovalRuleDetailScreen-CpG3boOY.js} +1 -1
- package/dist/assets/{ReimbursementRoutes--vh1Dgkn.js → ReimbursementRoutes-DiGdaZcS.js} +8 -8
- package/dist/assets/{ReportsRoutes-B0L7XL0D.js → ReportsRoutes-BCP7KWMp.js} +1 -1
- package/dist/assets/RewardsRoutes-CpIo0I4i.js +1 -0
- package/dist/assets/ScreenRoutes-CSTyxtbM.js +2 -0
- package/dist/assets/SettingsRoutes-DvRgqkat.js +57 -0
- package/dist/assets/{SetupPagesScreen-z1fhy2nD.js → SetupPagesScreen-DFYeQ_eK.js} +5 -5
- package/dist/assets/SignInScreen-ZyXdRrhQ.js +1 -0
- package/dist/assets/SignOutScreen-CjCZ3Zak.js +9 -0
- package/dist/assets/TaskListScreen-DgEblwsB.js +9 -0
- package/dist/assets/TaskRoutes-Cg1seHyv.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-Ds78cNrz.js → TransactionDetailRoutes-BBskyEa9.js} +1 -1
- package/dist/assets/TransactionDetailScreen-lkVHlxIe.js +5 -0
- package/dist/assets/{TransactionListRoutes-CbJW0jN6.js → TransactionListRoutes-V5JqSayP.js} +1 -1
- package/dist/assets/TreasuryRoutes-MHYDsvJq.js +37 -0
- package/dist/assets/{VendorsRoutes-WaC1MSeH.js → VendorsRoutes-BJ_iX5jb.js} +15 -15
- package/dist/assets/WiseConfirmationScreen-Dk_ohJaH.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-ChKECbqX.js → ZeniAccountRoutes-DnQ5jPxp.js} +10 -10
- package/dist/assets/ZeniAccountStatementScreen-mgHi-fEV.js +9 -0
- package/dist/assets/{accountMappingHelper-B-kf-Qnc.js → accountMappingHelper-DkNOxib8.js} +1 -1
- package/dist/assets/{analytics-DtYJ-EGT.js → analytics-dRdyiJhV.js} +1 -1
- package/dist/assets/{analyticsHelper-DcIIaR44.js → analyticsHelper-BlJN3smJ.js} +1 -1
- package/dist/assets/{core-DnZcjy6X.js → core-6UWneHYU.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CjxujRw-.js → decodeURIComponentSafe-IgzW2Epz.js} +1 -1
- package/dist/assets/{dnd-eoV-_JYH.js → dnd-DPJDixDO.js} +1 -1
- package/dist/assets/{empty-DkIaLxCd.js → empty-Ct6G3q3O.js} +1 -1
- package/dist/assets/{empty-Dq2hLrCm.js → empty-UUw51dpq.js} +1 -1
- package/dist/assets/{emptyVideoElement-BFB9pddL.js → emptyVideoElement-DWcmeFmU.js} +1 -1
- package/dist/assets/epic-BrLkseVN.js +2 -0
- package/dist/assets/getLocaleForTenant-bb4clfVv.js +1 -0
- package/dist/assets/{index-Bar5dTpy.js → index-A9TSx6IP.js} +15820 -16753
- package/dist/assets/{index-C8_nlYo6.js → index-CaSGnkOr.js} +2 -2
- package/dist/assets/{index-DUKU6sVX.js → index-CiAPO6YA.js} +1 -1
- package/dist/assets/index-Czu7h9lW.css +1 -0
- package/dist/assets/{index-Wtyhkk6J.js → index-D2jN0Wir.js} +1 -1
- package/dist/assets/{index-Dmm4l94W.js → index-Ns5QLo2D.js} +1 -1
- package/dist/assets/{index-D_CZgugN.js → index-T0jg9Q8I.js} +1 -1
- package/dist/assets/{index-nn6YvIGD.js → index-sP-MfLTE.js} +1 -1
- package/dist/assets/{index-CiCTnO2S.js → index-xNLACcug.js} +1 -1
- package/dist/assets/{lexical-CSqytB8g.js → lexical-BSu0Xk1T.js} +1 -1
- package/dist/assets/liveblocks-CO5jpspP.js +54 -0
- package/dist/assets/{lottie-Dz5luYQG.js → lottie-BHZsp7n9.js} +1 -1
- package/dist/assets/{mui-sr6zger7.js → mui-CZj-zMWV.js} +1 -1
- package/dist/assets/{pathToGoBack-DpO-gBzq.js → pathToGoBack-B6i9h4RV.js} +1 -1
- package/dist/assets/{pdf-BNSeVvBm.js → pdf-B15NABJW.js} +3 -3
- package/dist/assets/{pdf-lib-DwpnbCVp.js → pdf-lib-CT0ukUSx.js} +1 -1
- package/dist/assets/{plaid-QvRDxgoN.js → plaid-CQGSnVgh.js} +1 -1
- package/dist/assets/{pusher-senIjtt-.js → pusher-Cgk0flcG.js} +1 -1
- package/dist/assets/{react-CuKQRzYG.js → react-B4uDycL4.js} +1 -1
- package/dist/assets/{react-OAPKV4uC.js → react-BL-Db5kO.js} +1 -1
- package/dist/assets/{react-CBRcLxW-.js → react-C-hKaTCY.js} +1 -1
- package/dist/assets/{react-ClmbMdlp.js → react-DIU8hszS.js} +1 -1
- package/dist/assets/{react-CiyNePZ5.js → react-GfGdDMpS.js} +1 -1
- package/dist/assets/{react-BGDkRw8Y.js → react-KFT2mdy8.js} +1 -1
- package/dist/assets/{recharts-Bim6mdwu.js → recharts-DNj0j956.js} +1 -1
- package/dist/assets/routePaths-CsP6Ffie.js +1 -0
- package/dist/assets/{sentry-DFI2OQU2.js → sentry-DT80za28.js} +1 -1
- package/dist/assets/{url-p6YiHaLn.js → url-DEpm4gKV.js} +1 -1
- package/dist/assets/{url-4e0ZWhZq.js → url-DvP2uQIr.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-zVG2a35W.js → useAiCfoDashboardSuggestedQuestionsChips-DBOgNEAN.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CpfOq769.js +1 -0
- package/dist/assets/useCashManagementBanner-Z61qrdOB.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-0JCfQ36-.js → useChargeCardPusherEvents-Div87iyA.js} +1 -1
- package/dist/assets/{useDeviceId-DasP_-mC.js → useDeviceId-BU2za7GL.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-2wnXRew_.js → useEmailConnectResultRefresh-D7AP3TT4.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DW3cIl_2.js → useInitialThreadRequest-Dt_bRaHc.js} +1 -1
- package/dist/assets/{utils-cHxIh7E8.js → utils-CLt4eceg.js} +1 -1
- package/dist/assets/withTransactionSidePanel-DKi_i4iZ.js +21 -0
- package/dist/assets/{zeni-epic-state-m4zoW3ek.js → zeni-epic-state-CO3_FacC.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +6 -9
- package/dist/assets/AddressRoutes-C8XYQ13t.js +0 -1
- package/dist/assets/AddressScreen-DCby60TJ.js +0 -9
- package/dist/assets/AiCfoScreen-BV-DOocp.js +0 -22
- package/dist/assets/CardsAiCfoScreen-C6GxFeya.js +0 -14
- package/dist/assets/CompanyPassportScreen-CF1WCnT9.js +0 -1
- package/dist/assets/ConnectionAuthScreen-CBqhtWai.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-DkQZlHKP.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-B4msejL-.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-CTMJQoQi.js +0 -18
- package/dist/assets/DrawerScreen-B34R7bdb.js +0 -1
- package/dist/assets/EntityDetailRoutes-D5iLxjcN.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-Bem3Gc7u.js +0 -25
- package/dist/assets/FeaturePreviewScreen-O1rkkX9g.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-Bzg62ZZu.js +0 -1
- package/dist/assets/MagicLinkRoutes-CSc1SUSL.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BVxqZuYQ.js +0 -12
- package/dist/assets/MobileAppDrawer-BoTcj0FT.js +0 -1
- package/dist/assets/NotFoundScreen-D7eT4TBn.js +0 -1
- package/dist/assets/OAuthConsentScreen-BzSEu8Ts.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-BfaNIbxL.js +0 -1
- package/dist/assets/PeopleRoutes-B44-Upod.js +0 -22
- package/dist/assets/PerformanceRoutes-Bv8XOGTE.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-D_w-vyXX.js +0 -1
- package/dist/assets/RewardsRoutes-4lrT5UUo.js +0 -1
- package/dist/assets/ScreenRoutes-x2ZEU7XA.js +0 -2
- package/dist/assets/SettingsRoutes-CLQ49ROa.js +0 -57
- package/dist/assets/SignInScreen-CbCM_7kJ.js +0 -1
- package/dist/assets/SignOutScreen-CPqtbwhE.js +0 -9
- package/dist/assets/TaskListScreen-ChqMZGua.js +0 -9
- package/dist/assets/TaskRoutes-DqVkv1wh.js +0 -9
- package/dist/assets/TransactionDetailScreen-DTD0gbHD.js +0 -5
- package/dist/assets/TreasuryRoutes-BzPs578Q.js +0 -37
- package/dist/assets/WiseConfirmationScreen-DP0HNbpz.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-nptp5yY4.js +0 -9
- package/dist/assets/epic-Blr6eiMV.js +0 -2
- package/dist/assets/getLocaleForTenant-DIOFG6A5.js +0 -1
- package/dist/assets/index-Cx4f0JbF.css +0 -1
- package/dist/assets/liveblocks-DKL6viSK.js +0 -54
- package/dist/assets/routePaths-BQ28bs96.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DZXDQgDN.js +0 -1
- package/dist/assets/useCashManagementBanner-DM17aUQt.js +0 -1
- package/dist/assets/withTransactionSidePanel-CBujpiDq.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y,j as w,N as _,n as K,l as ct,o as dt,p as C}from"./core-DnZcjy6X.js";import{e$ as V,Rh as ue,c7 as pe,F5 as Ue,kW as ut,Fi as oe,Fh as re,Ri as pt,bn as be,gy as Le,Rj as bt,NG as gt,kL as Pe,NH as ve,NI as ht,jG as ft,QB as St,jV as Rt,EV as It,uz as yt,jN as vt,FF as $e,Rk as Me,Rl as kt,Rm as At,Rn as Ct,Ro as Et,Rp as wt,Fp as ke,j$ as xt,QK as Bt,Fj as Tt,F3 as Ft,Rq as jt,F2 as Dt,Rr as Ut,Fb as Ae,Ft as Lt,Fs as Pt,Fo as $t,Rs as _e,KM as Mt,bq as _t,Fe as Nt,FX as Gt,Rt as Ot,Ru as zt,FB as Zt,Fy as Ce,Q4 as Ht,F0 as Vt,Rv as Ne,Gn as Ee,Gv as Wt,Rw as Qt,Rx as z,Ry as Kt,Rz as Ge,RA as qt,RB as Oe,RC as ze,FN as le,bu as Jt,bK as ge,cJ as he,fI as Ze,fG as He,RD as Xt,fD as Yt,Qh as en,RE as tn,RF as Ve,Ql as nn,R3 as an,RG as sn,Rg as on,Gs as we,Gr as rn,RH as ln,RI as mn,RJ as cn,RK as dn,RL as un,QQ as pn,Gi as bn,Gm as gn,bs as hn,bJ as fn,cD as Sn,cr as Rn,bt as In,Mu as yn,cT as vn,cW as kn,cV as An,cC as Cn}from"./zeni-epic-state-m4zoW3ek.js";import{x as We,J as Qe,w as ee,i as E,z as P,b$ as Ke,F as te,e as k,aM as xe,o as j,au as X,H as En,a as qe,c0 as wn,r as Z,a0 as Je,c1 as xn,D as ne,c2 as Bn,Z as Tn,G as Fn,B as fe,g as Xe,a9 as jn,bn as Dn,a4 as Un,E as Ye,c3 as Ln,d as Pn}from"./index-Bar5dTpy.js";import{n as N,S as $n}from"./mui-sr6zger7.js";import me from"./NotFoundScreen-D7eT4TBn.js";import{S as Be}from"./SetupPagesScreen-z1fhy2nD.js";import{F as et}from"./FeaturePreviewScreen-O1rkkX9g.js";import{a as f}from"./sentry-DFI2OQU2.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DZXDQgDN.js";import{u as tt}from"./useInitialThreadRequest-DW3cIl_2.js";import{D as Mn}from"./DrawerScreen-B34R7bdb.js";import{M as nt}from"./MobileAppDrawer-BoTcj0FT.js";import{R as _n}from"./ReimbursementApprovalRoutes-D_w-vyXX.js";import{FallBackRoute as Nn}from"./ScreenRoutes-x2ZEU7XA.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.js";import"./analyticsHelper-DcIIaR44.js";import"./routePaths-BQ28bs96.js";import"./BusinessVerificationPageScreen-MOMZNf2n.js";import"./ReimbursementApprovalRuleDetailScreen-BCDSmsvv.js";import"./getLocaleForTenant-DIOFG6A5.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]="cf31aa7b-24e3-4ee9-913f-f7c2b25df824",e._sentryDebugIdIdentifier="sentry-dbid-cf31aa7b-24e3-4ee9-913f-f7c2b25df824")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=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"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=qe.getLocalizedStrings(),On=K((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(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=gt(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:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.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($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("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(Ut({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(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ke(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(ke("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(At({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(kt());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function Fe(){const e=Q(),t=de(),n=H(),{reimbursementId:r}=Y(),d=We(),c=Qe(),[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=H().pathname,F=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),A=P.getSignedInUser(),R=w((p=>V(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(v&&!D||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(A==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ke,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:k,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Zn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.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:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:R?.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:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Qn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CO5jpspP.js";import{h as W,u as de,g as V,i as Y,j as w,N as _,n as q,l as ct,o as dt,p as C}from"./core-6UWneHYU.js";import{eZ as H,R1 as ue,c7 as pe,F0 as Ue,kR as ut,Fd as oe,Fc as re,R2 as pt,bn as be,gw as Le,R3 as bt,Nt as gt,kG as Pe,Nu as ve,Nv as ht,jB as ft,Ql as St,jQ as Rt,EQ as It,uu as yt,jI as vt,FA as $e,R4 as Me,R5 as At,R6 as kt,R7 as Ct,R8 as Et,R9 as wt,Fk as Ae,jW as xt,Qu as Bt,Fe as Tt,E_ as Ft,Ra as jt,EZ as Dt,Rb as Ut,F6 as ke,Fo as Lt,Fn as Pt,Fj as $t,Rc as _e,Kz as Mt,bq as _t,F9 as Nt,FS as Gt,Rd as Ot,Re as zt,Fw as Zt,Ft as Ce,PQ as Vt,EX as Ht,Rf as Ne,Gi as Ee,Gq as Qt,Rg as Wt,Rh as z,Ri as qt,Rj as Ge,Rk as Kt,Rl as Oe,Rm as ze,FI as le,bu as Jt,bK as ge,cI as he,fG as Ze,fE as Ve,Rn as Xt,fB as Yt,Q1 as en,Ro as tn,Rp as He,Q5 as nn,QP as an,Rq as sn,R0 as on,Gn as we,Gm as rn,Rr as ln,Rs as mn,Rt as cn,Ru as dn,Rv as un,QA as pn,Gd as bn,Gh as gn,bs as hn,bJ as fn,cC as Sn,cq as Rn,bt as In,Mh as yn,cS as vn,cV as An,cU as kn,cB as Cn}from"./zeni-epic-state-CO3_FacC.js";import{v as Qe,K as We,A as ee,d as E,z as P,b$ as qe,C as te,f as A,aM as xe,o as j,au as X,I as En,O as Ke,c0 as wn,r as Z,a0 as Je,c1 as xn,e as ne,c2 as Bn,_ as Tn,F as Fn,B as fe,h as Xe,a9 as jn,bn as Dn,a4 as Un,y as Ye,c3 as Ln,i as Pn}from"./index-A9TSx6IP.js";import{n as N,S as $n}from"./mui-CZj-zMWV.js";import me from"./NotFoundScreen-B9IlcCjB.js";import{S as Be}from"./SetupPagesScreen-DFYeQ_eK.js";import{F as et}from"./FeaturePreviewScreen-CqdV6Bc4.js";import{a as f}from"./sentry-DT80za28.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CpfOq769.js";import{u as tt}from"./useInitialThreadRequest-Dt_bRaHc.js";import{D as Mn}from"./DrawerScreen-CF6jlYli.js";import{M as nt}from"./MobileAppDrawer-N86gBmzN.js";import{R as _n}from"./ReimbursementApprovalRoutes-DpbViwiq.js";import{FallBackRoute as Nn}from"./ScreenRoutes-CSTyxtbM.js";import"./recharts-DNj0j956.js";import"./analytics-dRdyiJhV.js";import"./plaid-CQGSnVgh.js";import"./dnd-DPJDixDO.js";import"./stripe-cKAAJElX.js";import"./lottie-BHZsp7n9.js";import"./lexical-BSu0Xk1T.js";import"./pdf-B15NABJW.js";import"./utils-CLt4eceg.js";import"./analyticsHelper-BlJN3smJ.js";import"./routePaths-CsP6Ffie.js";import"./BusinessVerificationPageScreen-DtwUBmOs.js";import"./ReimbursementApprovalRuleDetailScreen-CpG3boOY.js";import"./getLocaleForTenant-bb4clfVv.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]="44ba6339-b8dc-4a85-9c2f-1971d5560880",e._sentryDebugIdIdentifier="sentry-dbid-44ba6339-b8dc-4a85-9c2f-1971d5560880")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=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"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=Ke.getLocalizedStrings(),On=q((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(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=gt(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:A,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ke(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ke(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({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(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ae(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(Ae("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(At());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(A.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function Fe(){const e=W(),t=de(),n=V(),{reimbursementId:r}=Y(),d=Qe(),c=We(),[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=V().pathname,F=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),k=P.getSignedInUser(),R=w((p=>H(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(v&&!D||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(k==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(qe,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:A,onLoad:p=>(Q=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&Q.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Zn,{}):null,m&&c!=="small"?s.jsx(Vn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Qn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -12,7 +12,7 @@ import{j as s}from"./liveblocks-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y
|
|
|
12
12
|
bottom: 0;
|
|
13
13
|
background-color: ${En.overlayBackgroundBlack};
|
|
14
14
|
z-index: 5;
|
|
15
|
-
`,
|
|
15
|
+
`,Vn=N.div`
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: 0;
|
|
18
18
|
left: 0;
|
|
@@ -22,7 +22,7 @@ import{j as s}from"./liveblocks-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y
|
|
|
22
22
|
display: flex;
|
|
23
23
|
background-color: transparent;
|
|
24
24
|
overflow: hidden;
|
|
25
|
-
`,
|
|
25
|
+
`,Hn=N.div`
|
|
26
26
|
position: fixed;
|
|
27
27
|
top: 0;
|
|
28
28
|
left: 0;
|
|
@@ -33,7 +33,7 @@ import{j as s}from"./liveblocks-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
overflow-y: auto;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
-
`,
|
|
36
|
+
`,Qn=N.button`
|
|
37
37
|
align-self: flex-end;
|
|
38
38
|
background: none;
|
|
39
39
|
border: none;
|
|
@@ -48,12 +48,12 @@ import{j as s}from"./liveblocks-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y
|
|
|
48
48
|
width: ${j.sp4};
|
|
49
49
|
height: ${j.sp4};
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`,Wn=N.div`
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
width: 100%;
|
|
55
55
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
56
|
-
`,
|
|
56
|
+
`,qn=q((function(e,t){const n=_e(e,t.reimbursementId),r=P.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,zt(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:Pe(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(Me());const a=at(o),i=Z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Ht(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Vt({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:()=>{A.trackReimbursementDeleteReimbursement(n),e($e(n))},cancelAndDeleteReport:a=>{a===!0?A.trackReimbursementCancelAndDeleteReimbursement(n):A.trackReimbursementCancelReimbursement(n),e(Zt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}}))(xn);function Kn(){const e=W(),t=de(),n=V(),r=n.hash.substring(1),d=Qe(),{reimbursementId:c}=Y(),m=P.getSignedInUser(),o=w((I=>H(I))),a=w((I=>_e(I,c??""))),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=tt(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=Se({mobileExploreReferrer:"Reimbursement Details"});Je({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=ee(),{isFeatureEnabled:T}=h(E.isLimitedCategoryForReimbursement),[u,x]=f.useState(!1),[F,v]=f.useState(!1),[D,B]=f.useState(!1),{isFeatureEnabled:k}=h(E.isReimbursementCommentingEnabled),{isFeatureEnabled:R}=h(E.isShowDeletedReimbursementsFeatureEnabled),g=w((I=>ue(I,c??""))),U=Mt(o),L=_t(o.userRole),$=a.fetchState;if(f.useEffect((()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(x(!0),t(Nt(c,!1,R)))}),[u,c,t,$]),f.useEffect((()=>{R&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&U===!1?B(!1):B(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(L||a.allApprovers.find((I=>I.user.userId===m?.userId))!=null||a.remiDetails?.lastUpdatedBy===m?.userId))}),[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,L,o.isZeni,U,m]),f.useEffect((()=>{F||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(v(!0),t(Ue(!1,T,R,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Gt(!1,!0,!0,a.lastUpdatedByUserId)))}),[F,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(qe,{}):s.jsxs(s.Fragment,{children:[s.jsx(te,{analytics:A,onLoad:I=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(I)}),s.jsx(qn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:k,isShowDeletedReimbursementEnabled:R,location:n,navigate:e,isRealTimeApprovalEnabled:D,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const Jn=q((function(e,t){return{remisReviewView:Ne(e),analytics:t.analytics}}),(function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(z())},onCloseReviewItem:n=>{e(Wt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Qt());break;case"approve":e(Ee("approved",r??""));break;case"reject":e(Ee("rejected",r??""))}}}}))(Bn);function Xn(){const e=W(),t=w((c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState)),{remisForReview:n}=w((c=>Ne(c))),r=ne(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect((()=>{t!=="Completed"&&n.length!==0||e("./")}),[t,n.length]),s.jsx(Jn,{navigate:e,analytics:A,isAdmin:d})}const O=nn(),st="bulk-operation-update",ce="reimbursement-approval-rule-update",{spendManagement:Yn,common:je}=Ke.getLocalizedStrings(),De=Yn.reimbursement.bulkActions,ea=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-DKL6viSK.js";import{h as Q,u as de,g as H,i as Y
|
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
align-items: center;
|
|
63
63
|
background-color: ${e=>e.theme.colors.grey4};
|
|
64
|
-
`,ta=
|
|
64
|
+
`,ta=q((function(e,t){const n=ze(e,O,t.isBulkActionEnabled);let r=n.allSubTabs;const d=P.getSignedInUser(),c=be(d),m=e.tenantState.currentTenantId,o=H(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=an(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:A,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:O,spendManagementEndPoint:`${Un}/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(z()),e(Ge(o))},onSubtabChange:o=>{e(z()),e(Oe(o))},onTransactionClick:(o,a)=>{const i=sa(m,o,a),l=Z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=aa(m),a=Z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;A?.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(un({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(dn(o))},onFiltersChange:o=>{e(cn({filters:o})),o.categories.every((a=>a.field!=null&&a.values?.length!==0))&&A.trackSpendManagmentFilterChange("reimbursement",o.categories.map((a=>`${a.field}-${JSON.stringify(a.values)}`)))},updateDownloadStateHandler:o=>{o==="In-Progress"&&A.trackSpendManagementDownloadClick("reimbursement"),e(mn({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(le(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(ln(o))},removeAllTransactionsFromBulkActionList:()=>{e(z())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(rn(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(on(!1))},onEventReceived:o=>{o===st&&e(sn())}}}))(jn(Dn));function na(){const e=W(),t=de(),n=V(),r=n.state,d=We(),[c,m]=f.useState(null),o=ct("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect((()=>{if(r?.tab!=null&&r?.subTab!=null){const S=qt(r.tab.toString());S!=null?t(Ge(S)):console.log("Warning:Not a valid remiListTab");const G=Kt(r.subTab.toString());G!=null?t(Oe(G)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(z())}}),[]);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=P.getSignedInUser(),u=w((S=>H(S))),[x,F]=f.useState(!1),[v,D]=f.useState(!1),B=ne(),k=B?.loggedInUserRole?.includes("admin")===!0,R=w((S=>ze(S,O,h))),{areTenantIdsInSync:g}=Tn(),U=R.fetchState,{isAiCfoAccessEnabled:L,onAskAiCfoClick:$}=Se({mobileExploreReferrer:"Reimbursement List"});if(Je({isDataReady:U==="Completed"}),f.useEffect((()=>{!v&&g&&(D(!0),t(le(O,!0,l,!1,!0)))}),[v,O,t,g]),T==null)throw Error("Can't access address page without signing in...");const I=!!u?.userRole&&Jt(u),p=ge(B?.loggedInUserRoleMap),Q=he(B?.loggedInUserRoleMap),ae=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,K=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,se=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,ie=w((S=>Le(S.companyState,u.companyId))),it=ie?.company.featuresActivationInfo.connectedAccountProvider,Re=S=>{F(S)},{isFeatureEnabled:ot}=a(E.isDebitCardFeatureEnabled),rt=Ze(ot,u),lt=Ve(u),{remisProcessed:J,remisProcessing:Ie}=w((S=>Xt(S)));f.useEffect((()=>{J===Ie&&c!=null&&(t(Yt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:J>1?De.reports:De.report},{variableName:"_has_",variableValue:J>1?je.texts.have:je.texts.has},{variableName:"_action_",variableValue:en(c)}]})),t(tn()),setTimeout((()=>{t(le(O,!0,l,!1,!0,!0))}),3e3),m(null))}),[J,Ie]);const mt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${st}`,`private-encrypted-${u.companyId}.${ce}`]:[],eventCallback:(S,G,ye)=>{S.endsWith(ce)?ye.onReimbursementApprovalRulesEventReceived?.(S):G.entity_type==="reimbursement"&&(m(G.operation_type),ye.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?rt===!0||lt===!0?s.jsx(et,{}):K&&(!I||p)||Q&&ae?s.jsxs(s.Fragment,{children:[U==="Completed"?s.jsx(te,{analytics:A,onLoad:S=>(G=>G.trackPageLoaded(Xe.Event.reimbursementHome))(S)}):null,s.jsx(nt,{isAppContentDrawerOpen:x,handleDrawerToggle:Re}),s.jsxs(ea,{windowSize:d,children:[s.jsx(Mn,{isOpen:o,drawerLeftMargin:new Fn(0,0,300,600),onClose:()=>{e("./"),t(z())},children:s.jsx(ia,{onClick:S=>S.stopPropagation(),children:s.jsx(Xn,{})})}),s.jsx(ta,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:O,isAdmin:k,isEmployee:I,entity:"reimbursement",onClickMenuIcon:()=>{Re(!0)},createdByUserList:R.createdByUserList,createdByUserListFetchState:R.createdByUserListFetchState,isDownloadEnabled:R.isDownloadEnabled,connectedAccountProvider:it,isBulkActionEnabled:h,bulkSubmissionLimit:R.remiBulkSubmissionLimit,bulkSubmissionFetchState:R.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:L,onAskAiCfoClick:$,...mt})]})]}):se&&p?s.jsx(_,{to:"../setup"}):B!=null&&He(u,B.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(fe,{fetchState:"In-Progress"}):s.jsx(me,{})}const aa=e=>`/${e}/reimbursements/setup`,sa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},ia=N($n)`
|
|
65
65
|
display: flex;
|
|
66
66
|
min-height: 100%;
|
|
67
67
|
flex-direction: column;
|
|
68
|
-
`,oa=
|
|
68
|
+
`,oa=q((function(e,t){const{companyId:n}=t;return{reimbursementSetupView:pn(e,n),analytics:A,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(gn(n))},onCreateNewRemiButtonClick:()=>{e(bn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}}))(Ln),ra=()=>{const e=W(),t=V(),{tenantEmailDomain:n}=Y(),r=Ye(),[d,c]=f.useState(!1),m=w((v=>H(v))),o=P.getSignedInUserTenant(n)?.companyId??m.companyId,a=P.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,F=v=>{c(v)};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:A,onLoad:v=>(D=>D.trackPageLoaded(Xe.Event.reimbursementPromoPage))(v)}),s.jsx(nt,{isAppContentDrawerOpen:d,handleDrawerToggle:F}),s.jsx(oa,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{F(!0)}})]}):s.jsx(fe,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function $a(){const e=w((ie=>H(ie))),t=ne(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=Ye(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=ee(),{isFeatureEnabled:o}=m(E.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(E.isDebitCardFeatureEnabled),i=Ze(a,e),l=Ve(e),b=e?.userRole!=null&&hn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&fn(t?.loggedInUserRoleMap),h=Sn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=ge(t?.loggedInUserRoleMap),x=T&&u,F=!!e.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!b,v=F&&Rn(t?.loggedInUserRoleMap),D=Pn(e,o,a)&&!b,B=D&&In(t?.loggedInUserRoleMap),k=yn(t?.loggedInUserRoleMap),R=vn(t?.loggedInUserRoleMap),g=An(t?.loggedInUserRoleMap),U=F&&R,L=e.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!b&&g,$=kn(t?.loggedInUserRoleMap),I=Cn(t?.loggedInUserRoleMap),p=he(t?.loggedInUserRoleMap),Q=D&&$,{tenantEmailDomain:ae}=Y(),K=V(),se=n===!0&&(u||p&&c);return s.jsxs(dt,{children:[K.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"verification",element:s.jsx(Be,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:k,productType:"reimbursement",type:"verification"})}),s.jsx(C,{path:"setup",element:s.jsx(Be,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:k,productType:"reimbursement",type:"setup"})}),s.jsx(C,{path:"promo",element:s.jsx(ra,{})}),s.jsx(C,{path:"approval-rules/*",element:x?s.jsx(_n,{}):s.jsx(Nn,{showZeniAccountRoute:U,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:p,showTreasuryRoute:L,isTenantBankingOnly:i,showChargeCardRoute:Q,tenantEmailDomain:ae??""})}),se&&s.jsx(C,{path:"*",element:s.jsx(na,{})}),(i===!0||l===!0)&&s.jsx(C,{path:"/*",element:s.jsx(et,{})}),t!=null&&He(e,t?.loggedInUserRoleMap)&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../promo"})}),d&&u&&s.jsx(C,{path:"*",element:s.jsx(_,{to:"../setup"})})]}):K.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(C,{path:"new",element:s.jsx(Fe,{})}),s.jsx(C,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(C,{path:":reimbursementId/edit",element:s.jsx(Fe,{})}),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 ${j.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(C,{path:"*",element:s.jsx(me,{})})]})}export{$a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-DKL6viSK.js";import{g as z,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as G}from"./core-DnZcjy6X.js";import{e$ as L,fX as w,MX as Te,kL as J,re as W,s3 as A,kz as Re,jD as Oe,vC as K,s8 as ke,bs as Ae,MY as Fe,bn as De,wL as je,MZ as Ee,M_ as Pe,vu as Me,M$ as Y,N0 as Le,N1 as Ne,N2 as Be,N3 as ve,N4 as I,N5 as F,N6 as D,N7 as H,N8 as j,N9 as E,dL as Ve,wr as Ue,wf as $,wg as q,wx as xe,wk as Z,wD as ze,Na as Ge,Nb as Ye,Nc as He,Nd as $e,Ne as qe,fI as Ze,fG as Xe}from"./zeni-epic-state-m4zoW3ek.js";import{T as Qe,W as Je,X as We,Y as Ke,J as ea,w as ee,i as P,z as ae,Z as aa,D as sa,c as ta,$ as oa,a0 as na,F as ra,e as M,g as ia,a1 as la,r as se,a2 as ca,a3 as da,a4 as pa}from"./index-Bar5dTpy.js";import"./mui-sr6zger7.js";import fa from"./NotFoundScreen-D7eT4TBn.js";import{F as ma}from"./FeaturePreviewScreen-O1rkkX9g.js";import{a as _}from"./sentry-DFI2OQU2.js";import{u as ua}from"./useInitialThreadRequest-DW3cIl_2.js";import{t as X,a as Q,b as _a}from"./routePaths-BQ28bs96.js";import{M as ha}from"./MobileAppDrawer-BoTcj0FT.js";import"./recharts-Bim6mdwu.js";import"./analytics-DtYJ-EGT.js";import"./plaid-QvRDxgoN.js";import"./dnd-eoV-_JYH.js";import"./stripe-cKAAJElX.js";import"./lottie-Dz5luYQG.js";import"./lexical-CSqytB8g.js";import"./pdf-BNSeVvBm.js";import"./utils-cHxIh7E8.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]="c99db4a9-cc7e-4c1e-93fb-ec071a44eed9",e._sentryDebugIdIdentifier="sentry-dbid-c99db4a9-cc7e-4c1e-93fb-ec071a44eed9")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e($e()),e(qe())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(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:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(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(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(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(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(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(Ue({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=Ve(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 X(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(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?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?X(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(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({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(Ne({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}}))(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[N,te]=_.useState(!1),{isFeatureEnabled:B}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),v=d((n=>J(n))),O=d((n=>W(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),k=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!N&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))}),[i,N,C,h]),_.useEffect((()=>{if(i&&k.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(ke(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(K());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,k,h,v,O]);const V=sa(),de=V?.loggedInUserRole!=null&&Ae(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),U=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Qe(he??"")==="reports",be=Je(_e),ye=_.useMemo((()=>x?ba:void 0),[x]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:U}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:v,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:k,handleDrawerToggle:U,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 xa(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Xe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
|
|
1
|
+
import{j as p}from"./liveblocks-CO5jpspP.js";import{g as z,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as Y}from"./core-6UWneHYU.js";import{eZ as L,fV as w,MK as Te,kG as K,r9 as W,r_ as A,ku as Re,jy as Me,vx as J,s3 as Oe,bs as Ae,ML as ke,bn as Fe,wG as De,MM as je,MN as Ee,vp as Pe,MO as N,MP as Le,MQ as Be,MR as ve,MS as Ve,MT as I,MU as k,MV as F,MW as H,MX as D,MY as j,dI as Ue,wm as xe,wa as $,wb as Z,ws as Ge,wf as q,wy as ze,MZ as Ye,M_ as Ne,M$ as He,N0 as $e,N1 as Ze,fG as qe,fE as Qe}from"./zeni-epic-state-CO3_FacC.js";import{U as Xe,X as Ke,Y as We,Z as Je,K as ea,A as ee,d as E,z as ae,_ as aa,e as sa,a as ta,$ as oa,a0 as na,C as ra,f as P,h as ia,a1 as la,r as se,a2 as ca,a3 as da,a4 as pa}from"./index-A9TSx6IP.js";import"./mui-CZj-zMWV.js";import fa from"./NotFoundScreen-B9IlcCjB.js";import{F as ma}from"./FeaturePreviewScreen-CqdV6Bc4.js";import{a as _}from"./sentry-DT80za28.js";import{u as ua}from"./useInitialThreadRequest-Dt_bRaHc.js";import{t as Q,a as X,b as _a}from"./routePaths-CsP6Ffie.js";import{M as ha}from"./MobileAppDrawer-N86gBmzN.js";import"./recharts-DNj0j956.js";import"./analytics-dRdyiJhV.js";import"./plaid-CQGSnVgh.js";import"./dnd-DPJDixDO.js";import"./stripe-cKAAJElX.js";import"./lottie-BHZsp7n9.js";import"./lexical-BSu0Xk1T.js";import"./pdf-B15NABJW.js";import"./utils-CLt4eceg.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]="468638e6-e714-4054-9860-c7aef4fe581a",e._sentryDebugIdIdentifier="sentry-dbid-468638e6-e714-4054-9860-c7aef4fe581a")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(k({resetLeftScroll:!0}))},ya=e=>{e(Ne()),e(He()),e($e()),e(Ze())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=ke(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:W(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(Ye(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(Z(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(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(N({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ge(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(Z(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(H({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(k({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(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(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(Be({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(N({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(J())},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 Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Je(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[B,te]=_.useState(!1),{isFeatureEnabled:v}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(v?T?.companyId:void 0),C=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=>W(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&&(g(!0),s(A(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!B&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))}),[i,B,C,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(J());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}=z(),G=Xe(he??"")==="reports",be=Ke(_e),ye=_.useMemo((()=>G?ba:void 0),[G]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{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:v,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 Ga(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=qe(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(Y,{path:"/",element:p.jsx(Ca,{})}),p.jsx(Y,{path:"*",element:p.jsx(fa,{})})]})}export{Ga as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-CO5jpspP.js";import{z as w,C as S,f,h as E,da as k,A as C,d as I}from"./index-A9TSx6IP.js";import"./mui-CZj-zMWV.js";import g from"./NotFoundScreen-B9IlcCjB.js";import{a as c}from"./sentry-DT80za28.js";import{u as D,j as h,h as F,g as L,n as T,o as U,p as d,N as y}from"./core-6UWneHYU.js";import{eZ as _,T_ as b,T$ as p,w1 as P,fM as V,U0 as $,v$ as z}from"./zeni-epic-state-CO3_FacC.js";import"./recharts-DNj0j956.js";import"./analytics-dRdyiJhV.js";import"./plaid-CQGSnVgh.js";import"./dnd-DPJDixDO.js";import"./stripe-cKAAJElX.js";import"./lottie-BHZsp7n9.js";import"./lexical-BSu0Xk1T.js";import"./pdf-B15NABJW.js";import"./utils-CLt4eceg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1299ddb8-12c7-4de5-ba47-175108e79c47",e._sentryDebugIdIdentifier="sentry-dbid-1299ddb8-12c7-4de5-ba47-175108e79c47")}catch{}})();const A=T((function(e,t){const n=b(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e($({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),G=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),j=L(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>b(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(A,{navigate:m,location:j,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(G,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DMxcTWza.js","assets/sentry-DT80za28.js","assets/core-6UWneHYU.js","assets/zeni-epic-state-CO3_FacC.js","assets/index-A9TSx6IP.js","assets/mui-CZj-zMWV.js","assets/analytics-dRdyiJhV.js","assets/utils-CLt4eceg.js","assets/withTransactionSidePanel-DKi_i4iZ.js","assets/useAskAiCfoHostNavButtonProps-CpfOq769.js","assets/TransactionDetailScreen-lkVHlxIe.js","assets/decodeURIComponentSafe-IgzW2Epz.js","assets/routePaths-CsP6Ffie.js","assets/NotFoundScreen-B9IlcCjB.js","assets/useInitialThreadRequest-Dt_bRaHc.js","assets/analyticsHelper-BlJN3smJ.js","assets/CompanyPassportScreen-DSK81yql.js","assets/MobileAppDrawer-N86gBmzN.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DBOgNEAN.js","assets/FeaturePreviewScreen-CqdV6Bc4.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-DoYzm1s_.js","assets/AddressScreen-BIXlTd0k.js","assets/DomesticWireDetailScreen-CIqjtvpv.js","assets/DrawerScreen-CF6jlYli.js","assets/SetupPagesScreen-DFYeQ_eK.js","assets/BusinessVerificationPageScreen-DtwUBmOs.js","assets/BillPayApprovalRoutes-Cckj8faG.js","assets/ReimbursementApprovalRuleDetailScreen-CpG3boOY.js","assets/getLocaleForTenant-bb4clfVv.js","assets/ReimbursementRoutes-DiGdaZcS.js","assets/ReimbursementApprovalRoutes-DpbViwiq.js","assets/TransactionListRoutes-V5JqSayP.js","assets/ZeniAccountStatementScreen-mgHi-fEV.js","assets/SettingsRoutes-DvRgqkat.js","assets/accountMappingHelper-DkNOxib8.js","assets/useEmailConnectResultRefresh-D7AP3TT4.js","assets/QBOConnectionScreen-Cwzdj4Q-.js","assets/empty-Ct6G3q3O.js","assets/index-Ns5QLo2D.js","assets/url-DEpm4gKV.js","assets/index-CiAPO6YA.js","assets/ReportsRoutes-BCP7KWMp.js","assets/ChargeCardRoutes-DrlvPNEr.js","assets/useChargeCardPusherEvents-Div87iyA.js","assets/PeopleRoutes-CsD4yHB-.js","assets/ExpenseAutomationRoutes-Bh2GJ5eR.js","assets/TreasuryRoutes-MHYDsvJq.js","assets/useCashManagementBanner-Z61qrdOB.js","assets/VendorsRoutes-BJ_iX5jb.js","assets/pathToGoBack-B6i9h4RV.js","assets/ZeniAccountRoutes-DnQ5jPxp.js","assets/AddressRoutes-C8sZ1LMI.js","assets/PandLWithForecastRoutes-UkbQdYTq.js","assets/CustomerOnboardingRoutes-BRWto4FV.js","assets/TransactionDetailRoutes-BBskyEa9.js","assets/EntityDetailRoutes-DsK2unnT.js","assets/NotificationRoutes-cS6QWWsP.js","assets/PerformanceRoutes-NXKZM9JF.js","assets/RewardsRoutes-CpIo0I4i.js","assets/TaskRoutes-Cg1seHyv.js","assets/TaskListScreen-DgEblwsB.js","assets/AiCfoScreen-BBbfhHPd.js","assets/CardsAiCfoScreen-DC_ARWEe.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t,bn as us,eZ as ds,fG as cs,fE as ms,go as _s,ft as hs,cW as pe,cC as Es,fW as ps,cu as Rs,bE as xs,bo as gs,f_ as Is,v as js,Mg as Ts,bs as As,Mh as fs,bK as ys,bJ as Ds,bt as bs,cq as Cs,Mi as vs,Mj as Us,cS as Os,cV as ws,cU as Ps,cB as Fs,cI as Ls,oi as Re,fC as xe,gB as Hs,g2 as ge,gy as Ie,gz as je,g3 as ks}from"./zeni-epic-state-CO3_FacC.js";import{j as e}from"./liveblocks-CO5jpspP.js";import{a as w}from"./sentry-DT80za28.js";import{u as Bs,h as Vs,i as Ss,g as Ns,j as z,l as Te,N as u,o as Ms,p as a}from"./core-6UWneHYU.js";import{y as Zs,u as zs,z as y,A as Gs,a as $s,c as Ws,d as G,i as Ys,S as qs,e as Js,L as F,O as Ae,t as _,P as Ks,f as X,l}from"./index-A9TSx6IP.js";import"./mui-CZj-zMWV.js";import{f as fe}from"./analyticsHelper-BlJN3smJ.js";import{t as Qs}from"./getLocaleForTenant-bb4clfVv.js";import"./recharts-DNj0j956.js";import"./analytics-dRdyiJhV.js";import"./plaid-CQGSnVgh.js";import"./dnd-DPJDixDO.js";import"./stripe-cKAAJElX.js";import"./lottie-BHZsp7n9.js";import"./lexical-BSu0Xk1T.js";import"./pdf-B15NABJW.js";import"./utils-CLt4eceg.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},T=new o.Error().stack;T&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[T]="bfe50aa7-7148-49f2-82bb-9faff2f50205",o._sentryDebugIdIdentifier="sentry-dbid-bfe50aa7-7148-49f2-82bb-9faff2f50205")}catch{}})();const Xs={dashboard:()=>t((()=>import("./DashboardRoutes-DMxcTWza.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-DoYzm1s_.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-DiGdaZcS.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-V5JqSayP.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-DvRgqkat.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-BCP7KWMp.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-DrlvPNEr.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-CsD4yHB-.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-Bh2GJ5eR.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-MHYDsvJq.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-BJ_iX5jb.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-DnQ5jPxp.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},st=l((()=>t((()=>import("./ReportsRoutes-BCP7KWMp.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),tt=l((()=>t((()=>import("./AddressRoutes-C8sZ1LMI.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),nt=l((()=>t((()=>import("./PeopleRoutes-CsD4yHB-.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),at=l((()=>t((()=>import("./PandLWithForecastRoutes-UkbQdYTq.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),ot=l((()=>t((()=>import("./CustomerOnboardingRoutes-BRWto4FV.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),rt=l((()=>t((()=>import("./VendorsRoutes-BJ_iX5jb.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),it=l((()=>t((()=>import("./TransactionDetailRoutes-BBskyEa9.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),ye=l((()=>t((()=>import("./EntityDetailRoutes-DsK2unnT.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),lt=l((()=>t((()=>import("./DashboardRoutes-DMxcTWza.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-DoYzm1s_.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),ut=l((()=>t((()=>import("./SettingsRoutes-DvRgqkat.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-DiGdaZcS.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),dt=l((()=>t((()=>import("./ZeniAccountRoutes-DnQ5jPxp.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),ct=l((()=>t((()=>import("./TreasuryRoutes-MHYDsvJq.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),mt=l((()=>t((()=>import("./TransactionListRoutes-V5JqSayP.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),_t=l((()=>t((()=>import("./ChargeCardRoutes-DrlvPNEr.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),ht=l((()=>t((()=>import("./NotificationRoutes-cS6QWWsP.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),Et=l((()=>t((()=>import("./PerformanceRoutes-NXKZM9JF.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),pt=l((()=>t((()=>import("./ExpenseAutomationRoutes-Bh2GJ5eR.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Rt=l((()=>t((()=>import("./RewardsRoutes-CpIo0I4i.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-Cg1seHyv.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),gt=l((()=>t((()=>import("./AiCfoScreen-BBbfhHPd.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-DC_ARWEe.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-B9IlcCjB.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),It=l((()=>t((()=>import("./TaskListScreen-DgEblwsB.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function Nt({setTenantEmailDomain:o}){const T=Bs(),B=Vs(),{tenantEmailDomain:i}=Ss(),L=Zs().mode,{setLoading:U,clearAllLoading:C,clearLoading:H}=zs(),v=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=us(I),$=Ns(),[V,Pe]=w.useState(!1),r=z((n=>ds(n))),{useFeatureGate:N}=Gs(),M=$s(),te=Ws(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:He}=N(G.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(G.isDebitCardFeatureEnabled),A=z((n=>n.tenantState.fetchState)),j=z((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||A==="Completed"?cs(ne,r):void 0,J=j==="Completed"||A==="Completed"?ms(r):void 0,ke=Ys(r,He,ne),{isCardsHidden:Be}=qs(r?.tenantId),Ve=!ke||!!Be,{isFeatureEnabled:Se}=N(G.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(G.isAiCfoFileUploadEnabled),W=z((n=>_s(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=hs(),E=Js(),Ne=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Me=Es(E?.loggedInUserRoleMap),oe=w.useRef(!0),re=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=z((n=>Z.tenantId!=null?ps(n,Z.tenantId):void 0));w.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),w.useEffect((()=>{if(Q!=null&&v!=null){const n=Q.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=Rs(Number(f[0])),s=Number(f[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=gs();c.isAfter(S,"month")===!1?T(Is(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}}),[Q,v]),w.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!js(ae,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Hs(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Qs(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Ze))}),[Z,ae,I,T,y]),w.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s,c,S,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,rs=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,ls=d!=null&&d.externalConnections==null;if(Y&&rs){k(ge(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Ie(c.userId,s))),Y&&ls&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),k(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Re(c.userId,c.zeniSessionId)))}})(A,j,r,v,I,U,T))}),[v,j]),w.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ts(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),w.useEffect((()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):j==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[j,A,v,V]);const ie=w.useRef(!1);w.useEffect((()=>{!ie.current&&j==="Completed"&&V&&(ie.current=!0,(function(n=et,f=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Xs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),f)})())}),[j,V]);const O=r?.userRole!=null&&As(r?.userRole),{isFeatureEnabled:ze}=N(G.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&pe(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,ue=!Ve&&!O,We=fs(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,qe=r.externalConnections?.fetchState==="Completed",de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&ys(E?.loggedInUserRoleMap),_e=Fe&&!O,Je=Le&&!O,Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=ue&&bs(E?.loggedInUserRoleMap),Xe=_e&&Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=Os(E?.loggedInUserRoleMap),ns=ws(E?.loggedInUserRoleMap),as=Ps(E?.loggedInUserRoleMap),p=Fs(E?.loggedInUserRoleMap),R=Ls(E?.loggedInUserRoleMap),he=le&&p,Ee=ce&&R,x=_e&&ts,g=Je&&ns,m=ue&&as,os=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||es===!0||ss===!0;return y.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&A!=="In-Progress"&&T(Re(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&qe&&Ye!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ms,{children:e.jsxs(a,{element:e.jsx(Ks,{}),children:[e.jsx(a,{path:"/",element:e.jsx(jt,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(lt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:os||P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(at,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(ot,{})}),e.jsx(a,{path:"transaction/*",element:P&&O===!1||Ge||$e?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&O===!1?e.jsx(mt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&O===!1?e.jsx(ye,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&O===!1?e.jsx(ye,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(It,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Ke||me||Xe||Qe?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(ct,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(Et,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&O===!1?e.jsx(pt,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(ht,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:Ee?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:Ee?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(ut,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(_t,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:ze?e.jsx(Rt,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(gt,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const jt=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(Oe,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(Oe,{tenantEmailDomain:C}):T?e.jsx(At,{tenantEmailDomain:C}):B?e.jsx(Tt,{tenantEmailDomain:C}):e.jsx(b,{})},Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),At=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,Nt as default};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import{j as o}from"./liveblocks-CO5jpspP.js";import{a as u}from"./sentry-DT80za28.js";import{h as L,g as $,u as U,j as S,s as le,n as Z,i as G,o as ne,p as v}from"./core-6UWneHYU.js";import{bn as De,eZ as P,gw as Te,n8 as re,OB as Me,hM as he,Os as Ue,r9 as _e,kG as be,n4 as Be,hO as Re,Ou as Fe,Ot as Oe,QR as Ve,zE as ze,F5 as Le,Qq as Ne,Qz as Qe,c7 as ae,cN as $e,cO as Ze,bs as Ge,Mt as He,y4 as Ke,QS as qe,Hw as Je,EN as We,EE as Se,EB as Xe,y8 as ye,EH as Ce,EK as Ie,EQ as oe,uu as se,y7 as Ye,ki as W,kl as Ae,QT as en,lm as nn,yn as tn,Nk as an,Nl as on,kg as sn,QU as cn,kj as ln,rD as rn,Nf as dn,Ng as un,rH as pn,hx as gn,MB as ee,hp as de,hm as mn,hu as fn,MC as hn,yk as bn,QV as Sn,QW as yn,F2 as Cn,fE as Ee,fG as xe,QX as In,gh as An,ML as En,yj as ue,gm as pe,gl as xn,yi as vn,gk as kn,gj as wn,QY as jn,fJ as ve,QZ as Pn,Q_ as Dn,yq as Tn,yh as ge,Q$ as Mn,fZ as Un,ye as _n,b_ as Bn,c6 as Rn,c5 as Fn,b$ as On,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as Qn}from"./zeni-epic-state-CO3_FacC.js";import{A as X,d as O,z as w,ag as ke,bR as $n,f as H,h as Zn,bC as Gn,e as K,B as ie,bS as Hn,i as we,S as je,bT as Kn,ar as qn,k as Pe,bU as Jn,bV as Wn,bW as Xn,_ as Yn,bX as et,r as nt,bY as tt}from"./index-A9TSx6IP.js";import{n as V}from"./mui-CZj-zMWV.js";import{M as R}from"./MobileAppDrawer-N86gBmzN.js";import{a as q,g as J,m as at}from"./accountMappingHelper-DkNOxib8.js";import{t as ot,A as st}from"./AddressScreen-BIXlTd0k.js";import Q from"./NotFoundScreen-B9IlcCjB.js";import{g as it}from"./analyticsHelper-BlJN3smJ.js";import{B as ct}from"./BusinessVerificationPageScreen-DtwUBmOs.js";import{C as lt}from"./CompanyPassportScreen-DSK81yql.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-D7AP3TT4.js";import{q as me}from"./QBOConnectionScreen-Cwzdj4Q-.js";import{B as ut}from"./BillPayApprovalRoutes-Cckj8faG.js";import{R as pt}from"./ReimbursementApprovalRoutes-DpbViwiq.js";import"./recharts-DNj0j956.js";import"./analytics-dRdyiJhV.js";import"./plaid-CQGSnVgh.js";import"./dnd-DPJDixDO.js";import"./stripe-cKAAJElX.js";import"./lottie-BHZsp7n9.js";import"./lexical-BSu0Xk1T.js";import"./pdf-B15NABJW.js";import"./utils-CLt4eceg.js";import"./routePaths-CsP6Ffie.js";import"./empty-Ct6G3q3O.js";import"./pdf-lib-CT0ukUSx.js";import"./index-Ns5QLo2D.js";import"./url-DEpm4gKV.js";import"./index-CiAPO6YA.js";import"./decodeURIComponentSafe-IgzW2Epz.js";import"./ReimbursementApprovalRuleDetailScreen-CpG3boOY.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="64c085e2-e27f-4bed-9edc-dfb1e7174f73",e._sentryDebugIdIdentifier="sentry-dbid-64c085e2-e27f-4bed-9edc-dfb1e7174f73")}catch{}})();const gt=V.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
`,mt=Z((function(e,a){return{accountMappingView:a.accountMappingView,isFiling1099FeatureEnabled:a.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:a.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:be(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:_e(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:a.isCapitalizationFeatureEnabled,capitalizableAccounts:a.capitalizableAccounts,accountNamesById:a.accountNamesById,capitalizableAccountOverrides:a.capitalizableAccountOverrides,isCapitalizationThresholdSaving:a.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:a.onSaveCapitalizationAccountThreshold}}),(function(e,a){const{navigate:s,location:c,isFiling1099FeatureEnabled:l}=a;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:t,billsAccountSection:i,reimbursementsAccountSection:p,vendorsAccountSection:m,filing1099Section:f}=n,{incomeAccount:y,expenseAccount:g}=t,{billPayAccount:r}=i,{reimbursementsAccount:b}=p,{prepaidExpensesAccount:I,fixedAssetsAccount:k,accruedExpensesAccount:E}=m,{bankAccount:h,expenseCategory1099:A}=f,_=q(a.accountMappingView.incomeAccountList,y.selectedOption),T=q(a.accountMappingView.expenseAccountList,g.selectedOption),x=q(a.accountMappingView.billPayAccountList,r.selectedOption),B=q(a.accountMappingView.reimbursementsAccountList,b.selectedOption),D=J(a.accountMappingView.prepaidExpensesAccountList,I.selectedOptions),N=J(a.accountMappingView.fixedAssetsAccountList,k.selectedOptions),F=J(a.accountMappingView.accruedExpensesAccountList,E.selectedOptions),d=J(a.accountMappingView.bankAccounts1099FilingAccountList,h.selectedOptions),C=at(a.accountMappingView.expenseAccounts1099FilingAccountList,A),M={selectedIncomeAccountId:_?.accountId,selectedExpenseAccountId:T?.accountId,selectedBillPayAccountId:x?.accountId,selectedReimbursementsAccountId:B?.accountId,selectedPrepaidExpensesAccountIds:D.map((j=>j.accountId)),selectedFixedAssetsAccountIds:N.map((j=>j.accountId)),selectedAccruedExpensesAccountIds:F.map((j=>j.accountId)),selectedBankAccounts1099FilingAccountIds:d.map((j=>j.accountId)),selectedExpenseAccounts1099FilingAccountIds:C};e(Oe({data:M}))},onBackClick:()=>{ke(c)===!1?(s("../../dashboard"),e(Fe())):e(he())},onSaveClick:()=>{e(Re()),l&&H.track(Zn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(Be(a.currentTenant.companyId,n))}}}))($n),ft=()=>{const e=L(),a=$(),s=U(),{useFeatureGate:c,useDynamicConfig:l}=X(),{isFeatureEnabled:n}=c(O.isFiling1099FeatureEnabled),{isFeatureEnabled:t}=c(O.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:i,isDynamicConfigLoading:p}=l("transaction_categorization_config"),m=!p&&i?.capitalization_enabled===!0,f=w.getSignedInUser(),y=De(f),g=S((d=>P(d))),{capitalizableAccounts:r,capitalizableAccountOverrides:b,isCapitalizationThresholdSaving:I,currencySymbol:k}=S((d=>{const C=d.tenantState.currentTenantId,M=C!=null?d.tenantState.tenantsById[C]:void 0,j=Te(d.companyState,g.companyId);return{capitalizableAccounts:M?.capitalizableAccounts??null,capitalizableAccountOverrides:M?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:d.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}}),le),E=u.useCallback(((d,C)=>{s(re(g.companyId,d,C))}),[s,g.companyId]),h=u.useCallback((d=>{const C={...b??{}},M=Object.entries(d);for(const[z,ce]of M)ce===null?delete C[z]:C[z]=ce;const[j,Y]=M[0]??[];j!=null&&s(re(g.companyId,j,Y,void 0,Object.keys(C).length>0?C:null))}),[s,g.companyId,b]),A=S((d=>Me(d.accountState)),le),_=u.useMemo((()=>{const d={};for(const C of A)C.accountId!=null&&C.accountName!=null&&(d[C.accountId]=C.accountName);return d}),[A]),[T,x]=u.useState(!1),[B,D]=u.useState(!1);u.useEffect((()=>{T===!1&&(s(he()),x(!0))}),[T]);const N=S((d=>Ue(d))),F=d=>{D(d)};return o.jsxs(gt,{children:[o.jsx(R,{isAppContentDrawerOpen:B,handleDrawerToggle:F}),o.jsx(mt,{currentTenant:g,navigate:e,accountMappingView:N,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:t,isCapitalizationFeatureEnabled:m,capitalizableAccounts:r,accountNamesById:_,capitalizableAccountOverrides:b,currencySymbol:k,isCapitalizationThresholdSaving:I,onSaveCapitalizationAccountThreshold:E,onSaveCapitalizationAccountThresholds:h,location:a,isSettings:ke(a),onClickMenuIcon:()=>F(!0)})]})},ht=V.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
flex: 1 1 auto;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
17
|
+
`,bt=Z((function(e,a){const s=P(e),c=Ne(e),l=Qe(e),n=a.roleMap.bill_pay_admin;return{isDisabled:(ae(s?.userRole??[])||n)&&"readonly",billpayApprovalView:c,remiApproverView:l,analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c}=a;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}}))(Hn),St=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S((A=>P(A))),y=S((A=>A.billPaySetupApproverViewState.fetchState)),g=S((A=>A.remiSetupApproverViewState.fetchState)),r=S((A=>Ve(A))),{isApprovalRulesV3Enabled:b,isLoading:I}=Gn(f?.tenantId),k=f.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const E=K();u.useEffect((()=>{p||y!=="Not-Started"||I||(m(!0),s(ze(!0,!0,b)))}),[p,y,I,b,s]),u.useEffect((()=>{t||g!=="Not-Started"||I||(i(!0),s(Le(!0,!1,!1,b)))}),[t,g,I,b,s]);const h=A=>{n(A)};return E?.loggedInUserRoleMap!=null?o.jsxs(ht,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:h}),o.jsx(bt,{navigate:e,location:a,companyId:k,currentTenant:f,roleMap:E.loggedInUserRoleMap,onClickMenuIcon:()=>{h(!0)}})]}):o.jsx(ie,{fetchState:r.fetchState})},yt=V.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
height: 100%;
|
|
20
|
+
width: 100%;
|
|
21
|
+
flex: 1 1 auto;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
align-items: center;
|
|
24
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
25
|
+
`,Ct=Z((function(e,a){const{companyId:s,isZeniAccountEnabled:c,isChargeCardEnabled:l,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:i}=a,p=P(e);return{bankSetupView:qe(e,s,n,t,c,l,i),connectedAccountProvider:p.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t,i)=>{e(se(t,n,i))},onEstablishConnectionClick:(n,t,i)=>{e(oe(n,l,t,i))},onUpdatePaymentAccountStatus:(n,t,i,p,m)=>{e(Ie(n,t,m,p,i))},onUpdatePaymentAccountLoginStatus:(n,t,i,p)=>{e(Ce(!1,n,p,i,t))},onEstablishConnectionSuccess:(n,t)=>{e(ye(t,n))},onUpdateAccountClick:(n,t,i,p,m)=>{e(m==="paymentAccount"?Se(n,t,i,p):Xe(p,n,t))},onUpdatePrimaryFundingAccount:(n,t,i)=>{e(We(l,t,n,i))},onRemoveConnection:n=>{e(Je(n))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}}))(Kn),It=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),l=K(),{useFeatureGate:n}=X(),{isFeatureEnabled:t}=n(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=n(O.isDebitCardFeatureEnabled),[p,m]=u.useState(!1),[f,y]=u.useState(!1),g=S((D=>P(D))),r=S((D=>D.settingsViewState.bankConnection.fetchState)),b=$e(g,l?.loggedInUserRoleMap),I=Ze(g,l?.loggedInUserRoleMap),k=g?.userRole!=null&&Ge(g.userRole),E=!!g.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!k,h=g.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!k,A=we(g,t,i),_=He(g,l?.loggedInUserRoleMap)&&A,{isCardsHidden:T}=je(g?.tenantId),x=g.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");u.useEffect((()=>{f||r==="Completed"||(y(!0),s(Ke(!1)))}),[f,s,r]);const B=D=>{m(D)};return b||E||I||_?o.jsxs(yt,{children:[o.jsx(R,{isAppContentDrawerOpen:p,handleDrawerToggle:B}),o.jsx(Ct,{navigate:e,location:a,companyId:x,currentTenant:g,roleMap:l.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:I,isZeniAccountEnabled:E,isChargeCardEnabled:_,isChargeCardsHidden:T,isTreasuryEnabled:h,onClickMenuIcon:()=>{B(!0)}})]}):o.jsx(Q,{})},At=V.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
height: 100%;
|
|
28
|
+
width: 100%;
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
+
`,Et=Z((function(e,a){const{companyId:s}=a,c=P(e),l=a.roleMap.bill_pay_admin,n=en(e,s),{uiState:t}=n,i=(ae(c?.userRole??[])||l)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:Pe.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:i,analytics:H}}),(function(e,a){const{navigate:s,currentTenant:c,companyId:l}=a;return{onFetchLinkTokenClick:(n,t)=>{e(se("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(oe(n,l,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ye("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,i)=>{e(Ie(n,t,"billing","billing_setup",i))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(Ce(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(Se(n,t,"billing","billing_setup"))},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ae(n))},handleConfirmCardSetupIntent:n=>{e(ln(n))},updateCardPaymentModalState:n=>{e(cn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,i)=>{e(sn(n,t,i))},handleFetchPaymentSources:()=>{e(W())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},onBillingAddressSave:n=>{e(tn(n))},onAddressEditHandler:n=>{if(n!=null){const t=ot(n);e(nn({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Jn),xt=()=>{const e=L(),a=$(),s=U(),{tenantEmailDomain:c}=G(),[l,n]=u.useState(!1),[t,i]=u.useState(!1),[p,m]=u.useState(!1),f=S((h=>P(h))),y=S((h=>h.cardPaymentViewState)),g=S((h=>h.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),r=qn(y.addCardPaymentSourceStatus.fetchState),b=y.addCardPaymentSourceStatus.fetchState,I=f.companyId??w.getSignedInUserTenant(c)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const k=K();u.useEffect((()=>{I!=null&&s(Ye(I,!1))}),[I,s]),u.useEffect((()=>{t||(i(!0),s(W()))}),[t,s]),u.useEffect((()=>{p||(Ae(["card"]),m(!0))}),[p]),u.useEffect((()=>{r==="In-Progress"&&b==="Completed"&&s(W())}),[r,b]);const E=h=>{n(h)};return k?.loggedInUserRoleMap!=null?o.jsxs(At,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:E}),o.jsx(Et,{navigate:e,location:a,companyId:I,currentTenant:f,roleMap:k.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)},googleAPIKey:Pe.googleMapsAPIKey})]}):o.jsx(ie,{fetchState:g})},te="external_integrations",vt=Z((function(e){const a=un(e,te);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(a.map((s=>s.additionalInfo)).filter((s=>s!=null)))}}),(function(e,a){const{navigate:s,integrationsView:c,signedInUserEmail:l,tenantEmailDomain:n,tenantId:t}=a;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{me.init("/connection/auth",n),me.handleClick()},onRefreshClick:()=>{c.integrations.refreshQBO.fetchState!=="In-Progress"&&e(bn())},onSaveChargeBeeCredentials:(i,p)=>{const m=c.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;m!=null&&e(fn(t,m,ee("revenue"),hn("chargebee"),{api_key:i,site:p}))},onConnectHubSpot:(i,p)=>{const m=c.externalConnections?.revenue?.find((f=>f.connectionName==="hubspot"))?.connectionId;if(m!=null){const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:i,client_secret:p,connection_id:m,redirect_uri:f,tenant_id:t}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(i)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(f)}`}},onDisconnect:(i,p)=>{e(mn(t,i,ee(p)))},onConnectGmail:()=>{e(de(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(de(t,"outlook",window.location.href))},onSaveConnectorCredentials:i=>{e(gn(t,ee("payments"),i))},onNotifyMe:i=>{H.trackIntegrationsNotifyMeClicked("Settings",i),e(pn(te,i,l))}}}))(Wn),kt=()=>{const e=L(),a=U(),{tenantEmailDomain:s}=G();rt();const[c,l]=u.useState(!1),n=S((h=>h.tenantState.fetchState)),t=S((h=>P(h))),i=t.companyId??w.getSignedInUserTenant(s)?.companyId,p=w.getSignedInUser(),m=K(),f=ae(t.userRole??[]);if(p==null)throw Error("Can't access Integrations page without signing in...");u.useEffect((()=>{a(rn(te))}),[a]);const[y,g]=u.useState(!1);u.useEffect((()=>{y||(g(!0),a(W()))}),[y,a]);const r=h=>{l(h)},b=S((h=>dn(h,i))),I=S((h=>h.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:k,onAddPlaidAccount:E}=dt({companyId:i??t.companyId});return m?.loggedInUserRoleMap!=null?o.jsxs(wt,{children:[o.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:r}),o.jsx(vt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:f,integrationsView:b,signedInUserEmail:p.userEmail??"",tenantEmailDomain:t.tenantEmailDomain??s??"",tenantId:t.tenantId,saveChargeBeeState:b.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:b.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:b.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:b.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:b.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(b.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([h,A])=>[h,A?.message]))),deleteConnectionState:b.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:b.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:k,onAddPlaidAccount:E,plaidConnectionDetails:I})]}):o.jsx(ie,{fetchState:n})},wt=V.div`
|
|
34
|
+
display: flex;
|
|
35
|
+
height: 100%;
|
|
36
|
+
width: 100%;
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: center;
|
|
40
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
41
|
+
`,jt=V.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
flex: 1 1 auto;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
49
|
+
`,Pt=()=>{const e=U(),{tenantEmailDomain:a}=G(),[s,c]=u.useState(!1),l=S((r=>P(r))).companyId??w.getSignedInUserTenant(a)?.companyId,n=w.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const t=S((r=>Sn(r,n.userId))),i=S((r=>yn(r,l,"bill_pay","user_reimbursement_account"))),{plaidConnectionDetails:p}=i,m=r=>{c(r)},f=u.useCallback((r=>{e(se("user_reimbursement_account",r))}),[]),y=u.useCallback((r=>{e(oe(r,l,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))}),[]);u.useEffect((()=>{t.fetchState!=="Completed"&&t.fetchState!=="In-Progress"&&e(Cn(n.userId))}),[n.userId,t.fetchState]);const g=t.fetchState==="Not-Started"||t.fetchState==="In-Progress";return o.jsxs(jt,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:m}),o.jsx(Xn,{plaidConnectionDetails:p,isLoading:g,myBankConnectionsView:t,onFetchLinkTokenClick:f,onEstablishConnectionClick:y,onClickMenuIcon:()=>{m(!0)}})]})},Dt=V.div`
|
|
50
|
+
display: flex;
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: 100%;
|
|
53
|
+
flex: 1 1 auto;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: center;
|
|
56
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
57
|
+
`,fe=({appContent:e})=>{const a=U(),s=L(),c=$(),[l,n]=u.useState(!1),t=S((d=>P(d))),{tenantEmailDomain:i}=t,p=t.companyId??w.getSignedInUserTenant(i)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:m}=X(),f=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:y}=m(O.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=m(O.isDebitCardFeatureEnabled),r=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=S((d=>be(d))),I=Ee(t),k=xe(g,t),E=!k&&b,h=we(t,y,g),{isCardsHidden:A}=je(t?.tenantId),_=!h||A,{areTenantIdsInSync:T}=Yn();u.useEffect((()=>{T&&a(In(p,E))}),[p,a,E,T]);const x=S((d=>An(d,E))),B=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||p==null,D=En(t),N=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,F=d=>{n(d)};return o.jsxs(Dt,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:F}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:N===!1,isZeniAccountsDisabled:f===!1,isChargeCardDisabled:_,isTreasuryDisabled:r===!1,isLiteRoleDisabled:D===!1,onClickMenuIcon:()=>{F(!0)},isLoading:B,isBankingOnlyTenant:k,isCardsOnlyTenant:I,onAddressClick:d=>{const C=(function(j,Y){let z=`/${j}/settings/my_profile`;return z=z.concat(`/new/${Y}`),z})(i,d),M=nt(c.state?.pathnameStackToGoBack,c.pathname);s(C,{state:{pathnameStackToGoBack:M}})},onGetOtp:d=>{const C={...x.myProfileLocalData,phone:d};a(ue({localData:C})),a(wn(d,"MyProfile"))},onResendOtp:d=>{a(kn(d,"MyProfile"))},onCancelClick:()=>{a(vn())},onSaveClick:()=>{a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(d,C)=>{a(xn(d,C,"MyProfile"))},onVerifyOtpSuccess:d=>{d!=null&&w.saveZeniOtpToken(d),a(pe("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:d=>{a(ue({localData:d}))}})]})};function Tt(){const e=U(),a=S((r=>P(r))).companyId,s=S((r=>jn(r))),c=S((r=>ve(r))),l=w.getSignedInUser(),[n,t]=u.useState(!1),i=u.useCallback((r=>{t(r)}),[]),p=u.useCallback((r=>{e(Pn(r))}),[]),m=u.useCallback((()=>{l?.userEmail!=null&&e(Dn({loggedInUserEmail:l.userEmail}))}),[l?.userEmail]),f=u.useCallback((()=>{e(Tn())}),[]);if(l==null)throw Error("Can't access Notification Settings page without signing in...");const y=u.useCallback((()=>{const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))}),[a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=u.useCallback((()=>{e(Mn())}),[]);return u.useEffect((()=>{if(c.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=c.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ge(r,a))}}),[s.fetchState,a,c.notificationSettings.monthEndInsightsNotificationSettings.enabled,c.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:i}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:p,onCancel:m,onSave:f,onClickMenuIcon:()=>{i(!0)},signedInUser:l,onRefresh:y,resetUpdateStatus:g})]})}function ga(e){const[a,s]=u.useState(!1),c=S((r=>ve(r))),l=S((r=>P(r))),n=K(),t=w.getSignedInUser(),i=U(),{useFeatureGate:p}=X(),{isFeatureEnabled:m}=p(O.isDebitCardFeatureEnabled),f=t?.userEmail==null||c.fetchState!=="Completed"||Un(c.notificationSettings,t.userEmail,m,l);u.useEffect((()=>{c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&a===!1&&(s(!0),i(_n()))}),[c.fetchState,a]);const y=xe(m,l),g=Ee(l);return c.fetchState!=="In-Progress"&&c.fetchState!=="Not-Started"||f!==!0?Bn(l)?o.jsxs(ne,{children:[Rn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"accounting/*",element:o.jsx(ft,{})}),Fn(n?.loggedInUserRole??[],m,l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"approval_rules/*",element:o.jsx(Mt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),On(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"my_bank_connections",element:o.jsx(Pt,{})}),Vn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"bank_connections",element:o.jsx(It,{})}),zn(l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"business_verification",element:o.jsx(ct,{productType:y?"zeni_accounts":g?"charge_cards":it(l,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],l,n?.loggedInUserRoleMap)&&o.jsx(v,{path:"company_details",element:o.jsx(lt,{})}),Nn(n?.loggedInUserRole??[],l)&&o.jsx(v,{path:"billing",element:o.jsx(xt,{})}),Qn(n?.loggedInUserRole??[],m,l)&&o.jsx(v,{path:"integrations",element:o.jsx(kt,{})}),o.jsx(v,{path:"my_profile/new/:addressType",element:o.jsx(fe,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(v,{path:"my_profile",element:o.jsx(fe,{})}),f&&o.jsx(v,{path:"notifications",element:o.jsx(Tt,{})}),o.jsx(v,{path:"*",element:o.jsx(Q,{})})]}):o.jsx(ne,{children:o.jsx(v,{path:"*",element:o.jsx(Q,{})})}):null}function Mt(e){return o.jsxs(ne,{children:[o.jsx(v,{path:"/",element:o.jsx(St,{})}),o.jsx(v,{path:"bills/approval-rules/*",element:o.jsx(ut,{})}),o.jsx(v,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(pt,{}):o.jsx(Q,{})}),o.jsx(v,{path:"*",element:o.jsx(Q,{})})]})}export{ga as default};
|