@zeniai/web-app-ui 5.1.52-dev → 5.1.52-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-Cg2gXbOf.js → AddressRoutes-odXkPzQ0.js} +1 -1
- package/dist/assets/{AddressScreen-BBCv44qS.js → AddressScreen-BJ-IOcKb.js} +1 -1
- package/dist/assets/{AiCfoScreen-Da9zCyWe.js → AiCfoScreen-CRoxnDRU.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-TnPLWObs.js → BillPayApprovalRoutes-BWlPp4gg.js} +1 -1
- package/dist/assets/{BillPayRoutes-gRXPgRX3.js → BillPayRoutes-BcERL4gz.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DWx2BUK6.js → BusinessVerificationPageScreen-DWX7ySZI.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BCU45aIH.js → CardsAiCfoScreen-DEKa5Xew.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-SrcIcjEg.js → ChargeCardRoutes-FSWFOO49.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-C2ZjBTtu.js → CompanyPassportScreen-CrpUoXvt.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DQGgk8VQ.js → ConnectionAuthScreen-DDK9ow_u.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-DndbS7zx.js → CustomerOnboardingAuthScreen-CDJwl_XS.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-BiJk8RGO.js → CustomerOnboardingRoutes-BdqZkh_s.js} +1 -1
- package/dist/assets/{DashboardRoutes-C2R9sFOt.js → DashboardRoutes-BGmqy8sI.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Cs1fEcl7.js → DefaultTenantHome-dUxiOroS.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D2sqfin3.js → DomesticWireDetailScreen-BA2EKhEI.js} +1 -1
- package/dist/assets/{DrawerScreen-BXWf7y4o.js → DrawerScreen-BSfM66hM.js} +1 -1
- package/dist/assets/{EntityDetailRoutes--LkTS4Lg.js → EntityDetailRoutes-VUYCsTyx.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DN1VLKxs.js → ExpenseAutomationRoutes-Baf_deUk.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-C_7xKfC9.js → FeaturePreviewScreen-DoKDdD4M.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BtgwDGFv.js → HubSpotOAuthCallbackScreen-DLXvcbO1.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-w9Xo_7JQ.js → MagicLinkRoutes-NK00hAHs.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-_FORqdKk.js → MagicLinkSignInScreen-DnxlEFNW.js} +1 -1
- package/dist/assets/{MobileAppDrawer-B2Mj3GDG.js → MobileAppDrawer-BzOopfIc.js} +1 -1
- package/dist/assets/{NotFoundScreen-DpHt-tQH.js → NotFoundScreen-6vyCFr5S.js} +1 -1
- package/dist/assets/{NotificationRoutes-Bd-2Em1h.js → NotificationRoutes-BfWTxi_L.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DunOek_C.js → OAuthConsentScreen-DKtWI-tp.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BnZrz52M.js → PandLWithForecastRoutes-DgT8jx_6.js} +1 -1
- package/dist/assets/{PeopleRoutes-tR11OG4C.js → PeopleRoutes-Cd2xa-tF.js} +1 -1
- package/dist/assets/{PerformanceRoutes-tqcqZlMe.js → PerformanceRoutes-xYB_POFo.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CWE_gavn.js → QBOConnectionScreen-DiXbUmxS.js} +1 -1
- package/dist/assets/{ReferralListScreen-B51q6tuc.js → ReferralListScreen-BFHfgY0C.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CX0ljo0U.js → ReimbursementApprovalRoutes-BYBFJrYx.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BY8AWRBv.js → ReimbursementApprovalRuleDetailScreen-DiIBy_Kn.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BNT5fCZV.js → ReimbursementRoutes-Byj4p7dn.js} +1 -1
- package/dist/assets/{ReportsRoutes-BkcfE81W.js → ReportsRoutes-urJtOHDo.js} +1 -1
- package/dist/assets/{RewardsRoutes-Bp0jvJUz.js → RewardsRoutes-CHiDiriW.js} +1 -1
- package/dist/assets/{ScreenRoutes-DzWi1qtt.js → ScreenRoutes-DgHGyuTa.js} +2 -2
- package/dist/assets/{SettingsRoutes-C45RXj_4.js → SettingsRoutes-B9XEOz3c.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CnApuu2-.js → SetupPagesScreen-DiqU6iZv.js} +1 -1
- package/dist/assets/{SignInScreen-D4fYBdSr.js → SignInScreen-DqVi8QMM.js} +1 -1
- package/dist/assets/{SignOutScreen-scofbvIC.js → SignOutScreen-BcKxVgCr.js} +1 -1
- package/dist/assets/{TaskListScreen-5M_H_3yt.js → TaskListScreen-CIIrTWF0.js} +1 -1
- package/dist/assets/{TaskRoutes-Bc8V0KLM.js → TaskRoutes-C3BwKdkV.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-lhjQfiA2.js → TransactionDetailRoutes-L60jmvh4.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-advW0sri.js → TransactionDetailScreen-BHKf3UvG.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BTVDW0ac.js → TransactionListRoutes-B8V8eaVr.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BlM-Juxy.js → TreasuryRoutes-BIv9NJIQ.js} +1 -1
- package/dist/assets/{VendorsRoutes-Db2Ed2Fz.js → VendorsRoutes-CInyDoSC.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-8khqAoaZ.js → WiseConfirmationScreen-DmiV73IN.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-68W3Grg4.js → ZeniAccountRoutes-CbhJXy_a.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CCwshkYl.js → ZeniAccountStatementScreen-BuDvio8F.js} +1 -1
- package/dist/assets/{analyticsHelper-7imjYGd-.js → analyticsHelper-CfMFPPIh.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BWdefIGu.js → getLocaleForTenant-CTwYyvWj.js} +1 -1
- package/dist/assets/{index-Cm2LZphQ.js → index-B4wUHn-k.js} +5 -5
- package/dist/assets/{routePaths-d7Ok-gzv.js → routePaths-ooqctjvV.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D_8fZhjX.js → useAiCfoDashboardSuggestedQuestionsChips-Cx3WWldL.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-j-YNVdB5.js → useAskAiCfoHostNavButtonProps-BJGg886y.js} +1 -1
- package/dist/assets/{useCashManagementBanner-Dq8PXuUm.js → useCashManagementBanner-Cjm3Ayi5.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DoCqWgSy.js → useInitialThreadRequest-C_cJhQDA.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-AeDcEPW-.js → withTransactionSidePanel-3cc8um6s.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D3ESVZyk.js";import{h as W,u as re,g as H,i as Y,j as E,N as _,n as J,l as mt,o as ct,p as C}from"./core-k_c8SCBE.js";import{eW as Z,Qh as le,c7 as me,Ej as Be,kD as dt,Ew as ne,Ev as ae,Qi as ut,bn as ce,go as Te,Qj as pt,ME as bt,ks as je,MF as Se,MG as gt,jn as ht,Py as ft,jC as St,E7 as It,t_ as yt,ju as Rt,ET as De,Qk as Fe,Ql as At,Qm as kt,Qn as vt,Qo as Ct,Qp as Et,ED as Ie,jI as wt,PH as xt,Ex as Bt,Eh as Tt,Qq as jt,Eg as Dt,Qr as Ft,Ep as ye,EH as Ut,EG as Lt,EC as Pt,Qs as Ue,JS as $t,bo as Mt,Es as _t,Fc as Qt,Qt as Nt,Qu as Ot,EP as Gt,EM as Re,P1 as zt,Ee as Ht,Qv as Le,FB as Ae,FJ as Zt,Qw as Vt,Qx as G,Qy as Wt,Qz as Pe,QA as Jt,QB as $e,QC as Me,E$ as se,bu as qt,bK as de,cH as ue,fe as _e,fc as Qe,QD as Kt,f9 as Yt,Pe as Xt,QE as en,QF as Ne,Pi as tn,Q0 as nn,QG as an,Qg as sn,FG as ke,FF as on,QH as rn,QI as ln,QJ as mn,QK as cn,QL as dn,PN as un,Fw as pn,FA as bn,bt as gn,bJ as hn,cB as fn,cp as Sn,bs as In,LA as yn,cR as Rn,cT as An,cS as kn,cA as vn}from"./zeni-epic-state-C3zBO1No.js";import{Y as Oe,h as Ge,N as X,x as k,z as $,bY as ze,r as ee,c as v,aH as ve,o as D,at as K,E as Cn,D as He,bZ as En,n as z,_ as Ze,b_ as wn,j as te,b$ as xn,X as Bn,w as Tn,B as pe,e as Ve,a7 as jn,bk as Dn,a2 as Fn,m as We,c0 as Un,a9 as Ln}from"./index-Cm2LZphQ.js";import{n as Q,S as Pn}from"./mui-UJrLjp1k.js";import ie from"./NotFoundScreen-DpHt-tQH.js";import{S as Ce}from"./SetupPagesScreen-CnApuu2-.js";import{F as Je}from"./FeaturePreviewScreen-C_7xKfC9.js";import{a as f}from"./sentry-B_92GPgU.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import{u as qe}from"./useInitialThreadRequest-DoCqWgSy.js";import{D as $n}from"./DrawerScreen-BXWf7y4o.js";import{M as Ke}from"./MobileAppDrawer-B2Mj3GDG.js";import{R as Mn}from"./ReimbursementApprovalRoutes-CX0ljo0U.js";import{FallBackRoute as _n}from"./ScreenRoutes-DzWi1qtt.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./analyticsHelper-7imjYGd-.js";import"./routePaths-d7Ok-gzv.js";import"./BusinessVerificationPageScreen-DWx2BUK6.js";import"./ReimbursementApprovalRuleDetailScreen-BY8AWRBv.js";import"./getLocaleForTenant-BWdefIGu.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]="8ea27ce8-75bb-4e18-9457-9f597d17b039",e._sentryDebugIdIdentifier="sentry-dbid-8ea27ce8-75bb-4e18-9457-9f597d17b039")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Qn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${K.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:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Ye(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(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(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=H(),{reimbursementId:r}=Y(),d=Oe(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,j=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>Z(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(ze,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Zn,{onClick:()=>o(!1),children:s.jsx(Qn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=Q.div`
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import{h as W,u as re,g as H,i as Y,j as E,N as _,n as J,l as mt,o as ct,p as C}from"./core-k_c8SCBE.js";import{eW as Z,Qh as le,c7 as me,Ej as Be,kD as dt,Ew as ne,Ev as ae,Qi as ut,bn as ce,go as Te,Qj as pt,ME as bt,ks as je,MF as Se,MG as gt,jn as ht,Py as ft,jC as St,E7 as It,t_ as yt,ju as Rt,ET as De,Qk as Fe,Ql as At,Qm as kt,Qn as vt,Qo as Ct,Qp as Et,ED as Ie,jI as wt,PH as xt,Ex as Bt,Eh as Tt,Qq as jt,Eg as Dt,Qr as Ft,Ep as ye,EH as Ut,EG as Lt,EC as Pt,Qs as Ue,JS as $t,bo as Mt,Es as _t,Fc as Qt,Qt as Nt,Qu as Ot,EP as Gt,EM as Re,P1 as zt,Ee as Ht,Qv as Le,FB as Ae,FJ as Zt,Qw as Vt,Qx as G,Qy as Wt,Qz as Pe,QA as Jt,QB as $e,QC as Me,E$ as se,bu as qt,bK as de,cH as ue,fe as _e,fc as Qe,QD as Kt,f9 as Yt,Pe as Xt,QE as en,QF as Ne,Pi as tn,Q0 as nn,QG as an,Qg as sn,FG as ke,FF as on,QH as rn,QI as ln,QJ as mn,QK as cn,QL as dn,PN as un,Fw as pn,FA as bn,bt as gn,bJ as hn,cB as fn,cp as Sn,bs as In,LA as yn,cR as Rn,cT as An,cS as kn,cA as vn}from"./zeni-epic-state-C3zBO1No.js";import{Y as Oe,h as Ge,N as X,x as k,z as $,bY as ze,r as ee,c as v,aH as ve,o as D,at as K,E as Cn,D as He,bZ as En,n as z,_ as Ze,b_ as wn,j as te,b$ as xn,X as Bn,w as Tn,B as pe,e as Ve,a7 as jn,bk as Dn,a2 as Fn,m as We,c0 as Un,a9 as Ln}from"./index-B4wUHn-k.js";import{n as Q,S as Pn}from"./mui-UJrLjp1k.js";import ie from"./NotFoundScreen-6vyCFr5S.js";import{S as Ce}from"./SetupPagesScreen-DiqU6iZv.js";import{F as Je}from"./FeaturePreviewScreen-DoKDdD4M.js";import{a as f}from"./sentry-B_92GPgU.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import{u as qe}from"./useInitialThreadRequest-C_cJhQDA.js";import{D as $n}from"./DrawerScreen-BSfM66hM.js";import{M as Ke}from"./MobileAppDrawer-BzOopfIc.js";import{R as Mn}from"./ReimbursementApprovalRoutes-BYBFJrYx.js";import{FallBackRoute as _n}from"./ScreenRoutes-DgHGyuTa.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./analyticsHelper-CfMFPPIh.js";import"./routePaths-ooqctjvV.js";import"./BusinessVerificationPageScreen-DWX7ySZI.js";import"./ReimbursementApprovalRuleDetailScreen-DiIBy_Kn.js";import"./getLocaleForTenant-CTwYyvWj.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]="8ea27ce8-75bb-4e18-9457-9f597d17b039",e._sentryDebugIdIdentifier="sentry-dbid-8ea27ce8-75bb-4e18-9457-9f597d17b039")}catch{}})();const Ye=e=>`/${e}/reimbursements`,Qn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=He.getLocalizedStrings(),Nn=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=$.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${K.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:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=$.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Ye(o),l=z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(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(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=W(),t=re(),n=H(),{reimbursementId:r}=Y(),d=Oe(),c=Ge(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),w=H().pathname,j=w.includes("edit"),A=w.includes("reimbursement/new"),[F,x]=f.useState(!1),B=$.getSignedInUser(),I=E(p=>Z(p)),g=E(p=>le(p,r)),P=qe(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(x(!0),t(Be(!1,b,R,r)))});const M=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(B==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(ze,{isNewReimbursement:r==null}):s.jsxs(On,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(V=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&V.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Gn,{}):null,m&&c!=="small"?s.jsx(zn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Hn,{children:[s.jsx(Zn,{onClick:()=>o(!1),children:s.jsx(Qn,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${K.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:B?.userId??"",sessionId:B?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,B?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(Nn,{initialOpenThreadRequest:P??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const On=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-D3ESVZyk.js";import{g as H,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-k_c8SCBE.js";import{eW as v,ft as I,M1 as Te,ks as W,qN as X,rC as k,kg as Re,jk as Me,uZ as K,rH as Oe,bt as ke,M2 as Ae,bn as Fe,w6 as De,M3 as je,M4 as Ee,uR as Pe,M5 as N,M6 as ve,M7 as Le,M8 as Be,M9 as Ue,Ma as w,Mb as A,Mc as F,Md as Y,Me as D,Mf as j,dJ as Ve,vO as xe,vC as $,vD as q,vU as ze,vH as Z,v_ as He,Mg as Ge,Mh as Ne,Mi as Ye,Mj as $e,Mk as qe,fe as Ze,fc as Je}from"./zeni-epic-state-C3zBO1No.js";import{O as Qe,T as We,U as Xe,V as Ke,h as ea,N as ee,x as E,z as ae,X as aa,j as sa,a as ta,Z as oa,_ as na,r as ra,c as P,e as ia,$ as la,n as se,a0 as ca,a1 as da,a2 as pa}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import fa from"./NotFoundScreen-DpHt-tQH.js";import{F as ma}from"./FeaturePreviewScreen-C_7xKfC9.js";import{a as _}from"./sentry-B_92GPgU.js";import{u as ua}from"./useInitialThreadRequest-DoCqWgSy.js";import{t as J,a as Q,b as _a}from"./routePaths-d7Ok-gzv.js";import{M as ha}from"./MobileAppDrawer-B2Mj3GDG.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="48adc8aa-a011-47c0-96ba-2ca711a129ad",e._sentryDebugIdIdentifier="sentry-dbid-48adc8aa-a011-47c0-96ba-2ca711a129ad")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ya=e=>{e(Ne()),e(Ye()),e($e()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(He(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(w(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(N({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(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(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=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 J(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?J(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(Y({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(N({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},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}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=H(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),M=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(k(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))},[i,L,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(K());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,U,M]);const V=sa(),de=V?.loggedInUserRole!=null&&ke(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=H(),z=Qe(he??"")==="reports",be=We(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Xe({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:U,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(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{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-D3ESVZyk.js";import{g as H,h as ge,u as Ce,i as Ie,j as d,n as we,o as Se,p as G}from"./core-k_c8SCBE.js";import{eW as v,ft as I,M1 as Te,ks as W,qN as X,rC as k,kg as Re,jk as Me,uZ as K,rH as Oe,bt as ke,M2 as Ae,bn as Fe,w6 as De,M3 as je,M4 as Ee,uR as Pe,M5 as N,M6 as ve,M7 as Le,M8 as Be,M9 as Ue,Ma as w,Mb as A,Mc as F,Md as Y,Me as D,Mf as j,dJ as Ve,vO as xe,vC as $,vD as q,vU as ze,vH as Z,v_ as He,Mg as Ge,Mh as Ne,Mi as Ye,Mj as $e,Mk as qe,fe as Ze,fc as Je}from"./zeni-epic-state-C3zBO1No.js";import{O as Qe,T as We,U as Xe,V as Ke,h as ea,N as ee,x as E,z as ae,X as aa,j as sa,a as ta,Z as oa,_ as na,r as ra,c as P,e as ia,$ as la,n as se,a0 as ca,a1 as da,a2 as pa}from"./index-B4wUHn-k.js";import"./mui-UJrLjp1k.js";import fa from"./NotFoundScreen-6vyCFr5S.js";import{F as ma}from"./FeaturePreviewScreen-DoKDdD4M.js";import{a as _}from"./sentry-B_92GPgU.js";import{u as ua}from"./useInitialThreadRequest-C_cJhQDA.js";import{t as J,a as Q,b as _a}from"./routePaths-ooqctjvV.js";import{M as ha}from"./MobileAppDrawer-BzOopfIc.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="48adc8aa-a011-47c0-96ba-2ca711a129ad",e._sentryDebugIdIdentifier="sentry-dbid-48adc8aa-a011-47c0-96ba-2ca711a129ad")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},ya=e=>{e(Ne()),e(Ye()),e($e()),e(qe())},ga=we(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(He(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(w(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(N({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(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(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=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 J(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?J(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(Y({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Ue({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(N({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},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}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=H(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>v(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>W(n)),M=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(k(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))},[i,L,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(K());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,U,M]);const V=sa(),de=V?.loggedInUserRole!=null&&ke(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return function(n){const{isDataReady:_e}=n,{pathname:he}=H(),z=Qe(he??"")==="reports",be=We(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Xe({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:U,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>v(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(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{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-D3ESVZyk.js";import{N as j,z as w,aN as y,r as I,c as p,e as F,d5 as P,x as T}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-D3ESVZyk.js";import{N as j,z as w,aN as y,r as I,c as p,e as F,d5 as P,x as T}from"./index-B4wUHn-k.js";import"./mui-UJrLjp1k.js";import m from"./NotFoundScreen-6vyCFr5S.js";import{a as d}from"./sentry-B_92GPgU.js";import{u as L,j as b,h as V,g as A,n as R,o as U,p as f}from"./core-k_c8SCBE.js";import{eW as z,Ta as C,Pr as Y,Tb as v,vt as G,fk as O,Tc as W,vr as q}from"./zeni-epic-state-C3zBO1No.js";import{R as x}from"./ReferralListScreen-BFHfgY0C.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import"./MobileAppDrawer-BzOopfIc.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]="1edcdf1f-5402-483c-a9b1-1367789539b4",e._sentryDebugIdIdentifier="sentry-dbid-1edcdf1f-5402-483c-a9b1-1367789539b4")}catch{}})();const B=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(v()),n("..")},onSendClick:()=>{if(i!=null){const r=[],s=[];t.inviteFormCompayData.forEach(c=>{r.push(c.companyName),s.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",r,s,r.length)}e(q())},onUpdateInviteFormLocalData:r=>{e(W({localData:r}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),H=()=>{const e=L(),[t,n]=d.useState(!1),[i,r]=d.useState(!1),s=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=j(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const l=b(o=>C(o)),k=u?.firstName!=null?u.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:N}=g(y.zeniAccountsConfig),D=Y(N);d.useEffect(()=>{e(v()),s?.rewardsLastViewedTime==null&&i===!1&&(e(G()),r(!0))},[]),d.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(O(!0)))},[l.fetchState,e]);const S=s.company?.companyInfo.companyLegalName??s.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(B,{navigate:c,location:_,currentTenant:s,companyName:S,userName:k,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(T.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(H,{}):a.jsx(m,{})}),a.jsx(f,{path:"*",element:a.jsx(m,{})})]})}export{fe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as a,bn as ls,eW as cs,fe as ds,fc as ms,fd as us,gj as _s,f1 as Es,cU as Ae,cB as ps,fu as As,ct as xs,bE as gs,bq as Is,fz as Ts,v as js,Lz as hs,bt as Us,LA as bs,bK as Hs,fw as Rs,bJ as Ds,bs as ys,cp as fs,LB as Cs,LC as vs,cR as Os,cT as Ps,cS as Fs,cA as Ls,cH as Bs,o5 as xe,fa as ge,gt as ks,fD as Ie,gq as Te,gr as je,fE as Vs}from"./zeni-epic-state-C3zBO1No.js";import{j as e}from"./liveblocks-D3ESVZyk.js";import{a as v}from"./sentry-B_92GPgU.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-k_c8SCBE.js";import{m as zs,u as Gs,z as H,N as $s,a as qs,s as Ws,x as L,j as Ys,L as B,D as Ue,t as _,P as Js,c as se,l}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{f as be}from"./analyticsHelper-7imjYGd-.js";import{t as Ks}from"./getLocaleForTenant-BWdefIGu.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="19de061f-bcb5-4a46-8230-672b40beba83",i._sentryDebugIdIdentifier="sentry-dbid-19de061f-bcb5-4a46-8230-672b40beba83")}catch{}})();const Qs={dashboard:()=>a(()=>import("./DashboardRoutes-C2R9sFOt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-gRXPgRX3.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-BNT5fCZV.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-BTVDW0ac.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-C45RXj_4.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-BkcfE81W.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-SrcIcjEg.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-tR11OG4C.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-DN1VLKxs.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-BlM-Juxy.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-Db2Ed2Fz.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-68W3Grg4.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-BkcfE81W.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-Cg2gXbOf.js"),__vite__mapDeps([51,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-tR11OG4C.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-BnZrz52M.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-BiJk8RGO.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-Db2Ed2Fz.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-lhjQfiA2.js"),__vite__mapDeps([54,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes--LkTS4Lg.js"),__vite__mapDeps([55,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-C2R9sFOt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Re=l(()=>a(()=>import("./BillPayRoutes-gRXPgRX3.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-C45RXj_4.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>a(()=>import("./ReimbursementRoutes-BNT5fCZV.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-68W3Grg4.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-BlM-Juxy.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-BTVDW0ac.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-SrcIcjEg.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-Bd-2Em1h.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-tqcqZlMe.js"),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-DN1VLKxs.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-Bp0jvJUz.js"),__vite__mapDeps([58,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-Bc8V0KLM.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,14,17,60,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-Da9zCyWe.js"),__vite__mapDeps([61,1,2,3,4,5,6,7,18,49,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-BCU45aIH.js"),__vite__mapDeps([62,1,2,3,7,4,5,6,21]))),D=l(()=>a(()=>import("./NotFoundScreen-DpHt-tQH.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-5M_H_3yt.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),y=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),K=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=qs(),ve=Ws(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&K,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Be}=P(L.isTreasuryEnabled),{isFeatureEnabled:ke}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,q=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=ke||ne||!!Ve||!!q||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=P(L.isAiCfoFileUploadEnabled),W=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ys(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&y!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=xs(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,y]),v.useEffect(()=>{N||(Ce(!0),f(B.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s){if(ge(b?.userId,b?.zeniSessionId,n.tenantId),d(ks(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(Y&&is){k(Ie(s));const J=H.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),Y&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)));if(Y){se.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(Vs(m.userId,s,m.zeniSessionId))),J&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(xe(m.userId,m.zeniSessionId)))}}(h,p,r,y,j,f,U))},[y,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,W.tenantsBaseInOrder))},[W,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&f(B.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,y,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Qs[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},b)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,qe=bs(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,Ye=r.company!=null&&Rs(r.company),Je=Be&&Ye===!0&&!C,Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=ce&&ys(E?.loggedInUserRoleMap),Xe=_e&&fs(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=Bs(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Je&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||qe===!0||es===!0||ss===!0;return H.isSignedIn()?y==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||K&&!re)&&We===!1&&u===!1&&q===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||K?N&&r?.userRole&&u!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:q})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Ke||ue||Xe||Qe?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(ba,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(D,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wa as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BGmqy8sI.js","assets/sentry-B_92GPgU.js","assets/core-k_c8SCBE.js","assets/zeni-epic-state-C3zBO1No.js","assets/index-B4wUHn-k.js","assets/mui-UJrLjp1k.js","assets/analytics-DVTbnjlr.js","assets/utils-Mjhh9T8E.js","assets/withTransactionSidePanel-3cc8um6s.js","assets/useAskAiCfoHostNavButtonProps-BJGg886y.js","assets/TransactionDetailScreen-BHKf3UvG.js","assets/decodeURIComponentSafe-ClSfwHJC.js","assets/routePaths-ooqctjvV.js","assets/NotFoundScreen-6vyCFr5S.js","assets/useInitialThreadRequest-C_cJhQDA.js","assets/analyticsHelper-CfMFPPIh.js","assets/CompanyPassportScreen-CrpUoXvt.js","assets/MobileAppDrawer-BzOopfIc.js","assets/useAiCfoDashboardSuggestedQuestionsChips-Cx3WWldL.js","assets/FeaturePreviewScreen-DoKDdD4M.js","assets/ReferralListScreen-BFHfgY0C.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-BcERL4gz.js","assets/AddressScreen-BJ-IOcKb.js","assets/DomesticWireDetailScreen-BA2EKhEI.js","assets/DrawerScreen-BSfM66hM.js","assets/SetupPagesScreen-DiqU6iZv.js","assets/BusinessVerificationPageScreen-DWX7ySZI.js","assets/BillPayApprovalRoutes-BWlPp4gg.js","assets/ReimbursementApprovalRuleDetailScreen-DiIBy_Kn.js","assets/getLocaleForTenant-CTwYyvWj.js","assets/ReimbursementRoutes-Byj4p7dn.js","assets/ReimbursementApprovalRoutes-BYBFJrYx.js","assets/TransactionListRoutes-B8V8eaVr.js","assets/ZeniAccountStatementScreen-BuDvio8F.js","assets/SettingsRoutes-B9XEOz3c.js","assets/accountMappingHelper-DoYWzqd9.js","assets/QBOConnectionScreen-DiXbUmxS.js","assets/empty-rBU__xZH.js","assets/index-B0M_M2si.js","assets/url-CGw_V4gG.js","assets/index-D7n4W-6R.js","assets/ReportsRoutes-urJtOHDo.js","assets/ChargeCardRoutes-FSWFOO49.js","assets/PeopleRoutes-Cd2xa-tF.js","assets/ExpenseAutomationRoutes-Baf_deUk.js","assets/TreasuryRoutes-BIv9NJIQ.js","assets/useCashManagementBanner-Cjm3Ayi5.js","assets/VendorsRoutes-CInyDoSC.js","assets/pathToGoBack-D0Z5Ycmy.js","assets/ZeniAccountRoutes-CbhJXy_a.js","assets/AddressRoutes-odXkPzQ0.js","assets/PandLWithForecastRoutes-DgT8jx_6.js","assets/CustomerOnboardingRoutes-BdqZkh_s.js","assets/TransactionDetailRoutes-L60jmvh4.js","assets/EntityDetailRoutes-VUYCsTyx.js","assets/NotificationRoutes-BfWTxi_L.js","assets/PerformanceRoutes-xYB_POFo.js","assets/RewardsRoutes-CHiDiriW.js","assets/TaskRoutes-C3BwKdkV.js","assets/TaskListScreen-CIIrTWF0.js","assets/AiCfoScreen-CRoxnDRU.js","assets/CardsAiCfoScreen-DEKa5Xew.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bn as ls,eW as cs,fe as ds,fc as ms,fd as us,gj as _s,f1 as Es,cU as Ae,cB as ps,fu as As,ct as xs,bE as gs,bq as Is,fz as Ts,v as js,Lz as hs,bt as Us,LA as bs,bK as Hs,fw as Rs,bJ as Ds,bs as ys,cp as fs,LB as Cs,LC as vs,cR as Os,cT as Ps,cS as Fs,cA as Ls,cH as Bs,o5 as xe,fa as ge,gt as ks,fD as Ie,gq as Te,gr as je,fE as Vs}from"./zeni-epic-state-C3zBO1No.js";import{j as e}from"./liveblocks-D3ESVZyk.js";import{a as v}from"./sentry-B_92GPgU.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-k_c8SCBE.js";import{m as zs,u as Gs,z as H,N as $s,a as qs,s as Ws,x as L,j as Ys,L as B,D as Ue,t as _,P as Js,c as se,l}from"./index-B4wUHn-k.js";import"./mui-UJrLjp1k.js";import{f as be}from"./analyticsHelper-CfMFPPIh.js";import{t as Ks}from"./getLocaleForTenant-CTwYyvWj.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="19de061f-bcb5-4a46-8230-672b40beba83",i._sentryDebugIdIdentifier="sentry-dbid-19de061f-bcb5-4a46-8230-672b40beba83")}catch{}})();const Qs={dashboard:()=>a(()=>import("./DashboardRoutes-BGmqy8sI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-BcERL4gz.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-Byj4p7dn.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-B8V8eaVr.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-B9XEOz3c.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-urJtOHDo.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-FSWFOO49.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-Cd2xa-tF.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-Baf_deUk.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-BIv9NJIQ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-CInyDoSC.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CbhJXy_a.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-urJtOHDo.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-odXkPzQ0.js"),__vite__mapDeps([51,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-Cd2xa-tF.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-DgT8jx_6.js"),__vite__mapDeps([52,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-BdqZkh_s.js"),__vite__mapDeps([53,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-CInyDoSC.js"),__vite__mapDeps([48,1,2,3,4,5,6,7,23,13,19,12,49,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-L60jmvh4.js"),__vite__mapDeps([54,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-VUYCsTyx.js"),__vite__mapDeps([55,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-BGmqy8sI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Re=l(()=>a(()=>import("./BillPayRoutes-BcERL4gz.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-B9XEOz3c.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>a(()=>import("./ReimbursementRoutes-Byj4p7dn.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-CbhJXy_a.js"),__vite__mapDeps([50,1,2,3,4,5,6,7,47,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-BIv9NJIQ.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,47,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-B8V8eaVr.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-FSWFOO49.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-BfWTxi_L.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-xYB_POFo.js"),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-Baf_deUk.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-CHiDiriW.js"),__vite__mapDeps([58,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-C3BwKdkV.js"),__vite__mapDeps([59,1,2,3,13,4,5,6,7,14,17,60,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-CRoxnDRU.js"),__vite__mapDeps([61,1,2,3,4,5,6,7,18,49,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-DEKa5Xew.js"),__vite__mapDeps([62,1,2,3,7,4,5,6,21]))),D=l(()=>a(()=>import("./NotFoundScreen-6vyCFr5S.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-CIIrTWF0.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),y=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),K=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=qs(),ve=Ws(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&K,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Be}=P(L.isTreasuryEnabled),{isFeatureEnabled:ke}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,q=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=ke||ne||!!Ve||!!q||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=P(L.isAiCfoFileUploadEnabled),W=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ys(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&y!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=xs(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,y]),v.useEffect(()=>{N||(Ce(!0),f(B.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s){if(ge(b?.userId,b?.zeniSessionId,n.tenantId),d(ks(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(n,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(Y&&is){k(Ie(s));const J=H.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),Y&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(je(m.userId,s)));if(Y){se.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(Vs(m.userId,s,m.zeniSessionId))),J&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(xe(m.userId,m.zeniSessionId)))}}(h,p,r,y,j,f,U))},[y,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,W.tenantsBaseInOrder))},[W,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&f(B.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,y,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Qs[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},b)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,qe=bs(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,Ye=r.company!=null&&Rs(r.company),Je=Be&&Ye===!0&&!C,Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=ce&&ys(E?.loggedInUserRoleMap),Xe=_e&&fs(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=Bs(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Je&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||qe===!0||es===!0||ss===!0;return H.isSignedIn()?y==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||K&&!re)&&We===!1&&u===!1&&q===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||K?N&&r?.userRole&&u!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:q})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Ke||ue||Xe||Qe?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:Q}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(ba,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(D,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-D3ESVZyk.js";import{a as p}from"./sentry-B_92GPgU.js";import{h as V,g as Q,u as T,j as h,s as ce,n as $,i as G,o as W,p as A}from"./core-k_c8SCBE.js";import{bn as ke,eW as D,go as Pe,mW as le,NM as je,hA as me,ND as De,qN as Me,ks as he,mS as Ue,hC as Te,NF as _e,NE as Re,Q2 as Fe,z3 as Be,Eo as Oe,PD as Ve,PM as ze,c7 as ee,cM as Le,cN as Ne,LL as Qe,Q3 as $e,LM as Ge,xw as Ke,Q4 as He,GP as Ze,E4 as qe,DX as fe,DU as Je,xA as be,D_ as Se,E1 as ye,E7 as ne,t_ as te,xz as We,k4 as X,k7 as Ce,Q5 as Xe,l8 as Ye,xP as en,My as nn,Mz as tn,k2 as an,Q6 as on,k5 as sn,rf as cn,Q7 as ln,Q8 as rn,rj as dn,hl as un,LU as J,he as pn,hh as gn,LV as mn,xM as hn,Q9 as fn,Qa as bn,El as Sn,fc as Ie,fe as xe,Qb as yn,gc as Cn,M2 as In,xL as re,gh as de,gg as xn,xK as En,gf as An,ge as vn,Qc as wn,fh as Ee,Qd as kn,Qe as Pn,xS as jn,xJ as ue,Qf as Dn,fy as Mn,xG as Un,b_ as Tn,c6 as _n,c5 as Rn,b$ as Fn,c3 as Bn,c2 as On,c1 as Vn,c4 as zn,c0 as Ln}from"./zeni-epic-state-C3zBO1No.js";import{N as ae,x as R,z as P,af as Ae,bO as Nn,c as q,e as Qn,bz as $n,j as K,B as oe,bP as Gn,bQ as Kn,aq as Hn,f as ve,bR as Zn,bS as qn,bT as Jn,a9 as Wn,X as Xn,bU as Yn,n as et,bV as nt}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-D3ESVZyk.js";import{a as p}from"./sentry-B_92GPgU.js";import{h as V,g as Q,u as T,j as h,s as ce,n as $,i as G,o as W,p as A}from"./core-k_c8SCBE.js";import{bn as ke,eW as D,go as Pe,mW as le,NM as je,hA as me,ND as De,qN as Me,ks as he,mS as Ue,hC as Te,NF as _e,NE as Re,Q2 as Fe,z3 as Be,Eo as Oe,PD as Ve,PM as ze,c7 as ee,cM as Le,cN as Ne,LL as Qe,Q3 as $e,LM as Ge,xw as Ke,Q4 as He,GP as Ze,E4 as qe,DX as fe,DU as Je,xA as be,D_ as Se,E1 as ye,E7 as ne,t_ as te,xz as We,k4 as X,k7 as Ce,Q5 as Xe,l8 as Ye,xP as en,My as nn,Mz as tn,k2 as an,Q6 as on,k5 as sn,rf as cn,Q7 as ln,Q8 as rn,rj as dn,hl as un,LU as J,he as pn,hh as gn,LV as mn,xM as hn,Q9 as fn,Qa as bn,El as Sn,fc as Ie,fe as xe,Qb as yn,gc as Cn,M2 as In,xL as re,gh as de,gg as xn,xK as En,gf as An,ge as vn,Qc as wn,fh as Ee,Qd as kn,Qe as Pn,xS as jn,xJ as ue,Qf as Dn,fy as Mn,xG as Un,b_ as Tn,c6 as _n,c5 as Rn,b$ as Fn,c3 as Bn,c2 as On,c1 as Vn,c4 as zn,c0 as Ln}from"./zeni-epic-state-C3zBO1No.js";import{N as ae,x as R,z as P,af as Ae,bO as Nn,c as q,e as Qn,bz as $n,j as K,B as oe,bP as Gn,bQ as Kn,aq as Hn,f as ve,bR as Zn,bS as qn,bT as Jn,a9 as Wn,X as Xn,bU as Yn,n as et,bV as nt}from"./index-B4wUHn-k.js";import{n as F}from"./mui-UJrLjp1k.js";import{M as _}from"./MobileAppDrawer-BzOopfIc.js";import{a as H,g as Z,m as tt}from"./accountMappingHelper-DoYWzqd9.js";import{t as at,A as ot}from"./AddressScreen-BJ-IOcKb.js";import N from"./NotFoundScreen-6vyCFr5S.js";import{g as st}from"./analyticsHelper-CfMFPPIh.js";import{B as it}from"./BusinessVerificationPageScreen-DWX7ySZI.js";import{C as ct}from"./CompanyPassportScreen-CrpUoXvt.js";import{q as pe}from"./QBOConnectionScreen-DiXbUmxS.js";import{B as lt}from"./BillPayApprovalRoutes-BWlPp4gg.js";import{R as rt}from"./ReimbursementApprovalRoutes-BYBFJrYx.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./routePaths-ooqctjvV.js";import"./empty-rBU__xZH.js";import"./pdf-lib-Cgly_u4z.js";import"./index-B0M_M2si.js";import"./url-CGw_V4gG.js";import"./index-D7n4W-6R.js";import"./decodeURIComponentSafe-ClSfwHJC.js";import"./ReimbursementApprovalRuleDetailScreen-DiIBy_Kn.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]="e8ba6e15-505a-4a2a-9809-dd5f15b7c085",e._sentryDebugIdIdentifier="sentry-dbid-e8ba6e15-505a-4a2a-9809-dd5f15b7c085")}catch{}})();const dt=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-D3ESVZyk.js";import{h as X,g as Y,u as ee,i as W,j as _,N as j,n as H,t as Ye}from"./core-k_c8SCBE.js";import{bJ as en,cp as Ie,Pr as ye,eW as V,cB as nn,zk as $,z3 as tn,PD as an,PG as sn,ry as ne,rm as te,l0 as ae,tw as L,PI as Ae,gg as $e,gf as Ge,ge as We,PJ as on,zt as cn,E4 as ke,DX as Pe,DU as _e,DL as J,D_ as ve,E1 as Ee,E7 as we,t_ as De,gv as rn,cw as un,fe as dn,fc as ln,fd as pn,bs as mn,PK as yn,CL as le,Dn as fn,PL as gn,bK as Sn,Fn as pe,Eo as bn,PM as hn,PN as Cn,Fr as In,Fv as An,tp as kn,JV as Pn,G0 as Ce,H0 as me,PO as _n,PP as vn,PQ as En,PR as He,PS as wn,Mm as Dn,OQ as Tn,Mx as Un,PT as Ke,PU as Ve,Gm as qe,l8 as On,rp as Je,ty as Fn,bE as je,tK as Re,cz as Vn,PV as Qe,fx as xn,FK as Bn,FO as jn,PW as Rn,G3 as Ne,PX as Nn,PY as zn,PZ as Ln,P_ as Mn,go as Zn,AE as $n,P$ as Gn,AJ as Wn,AI as Hn}from"./zeni-epic-state-C3zBO1No.js";import{j as ie,N as se,x as de,m as Te,aN as Q,bz as Xe,z as T,r as oe,c as U,B as Ue,e as G,bA as Kn,at as ce,bB as x,bC as qn,bD as Jn,af as Be,bE as Qn,n as ze,au as Le,h as Xn,w as Yn,bF as et,bG as nt,bH as tt,a7 as at}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-D3ESVZyk.js";import{h as X,g as Y,u as ee,i as W,j as _,N as j,n as H,t as Ye}from"./core-k_c8SCBE.js";import{bJ as en,cp as Ie,Pr as ye,eW as V,cB as nn,zk as $,z3 as tn,PD as an,PG as sn,ry as ne,rm as te,l0 as ae,tw as L,PI as Ae,gg as $e,gf as Ge,ge as We,PJ as on,zt as cn,E4 as ke,DX as Pe,DU as _e,DL as J,D_ as ve,E1 as Ee,E7 as we,t_ as De,gv as rn,cw as un,fe as dn,fc as ln,fd as pn,bs as mn,PK as yn,CL as le,Dn as fn,PL as gn,bK as Sn,Fn as pe,Eo as bn,PM as hn,PN as Cn,Fr as In,Fv as An,tp as kn,JV as Pn,G0 as Ce,H0 as me,PO as _n,PP as vn,PQ as En,PR as He,PS as wn,Mm as Dn,OQ as Tn,Mx as Un,PT as Ke,PU as Ve,Gm as qe,l8 as On,rp as Je,ty as Fn,bE as je,tK as Re,cz as Vn,PV as Qe,fx as xn,FK as Bn,FO as jn,PW as Rn,G3 as Ne,PX as Nn,PY as zn,PZ as Ln,P_ as Mn,go as Zn,AE as $n,P$ as Gn,AJ as Wn,AI as Hn}from"./zeni-epic-state-C3zBO1No.js";import{j as ie,N as se,x as de,m as Te,aN as Q,bz as Xe,z as T,r as oe,c as U,B as Ue,e as G,bA as Kn,at as ce,bB as x,bC as qn,bD as Jn,af as Be,bE as Qn,n as ze,au as Le,h as Xn,w as Yn,bF as et,bG as nt,bH as tt,a7 as at}from"./index-B4wUHn-k.js";import{a as C}from"./sentry-B_92GPgU.js";import{n as xe,D as it,S as st}from"./mui-UJrLjp1k.js";import{M as fe}from"./MobileAppDrawer-BzOopfIc.js";import z from"./NotFoundScreen-6vyCFr5S.js";import{a as Me}from"./analyticsHelper-CfMFPPIh.js";import{d as Ze}from"./routePaths-ooqctjvV.js";import{B as Fe}from"./BusinessVerificationPageScreen-DWX7ySZI.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]="3439180c-0cd8-4ca5-8bd7-019f763bee66",e._sentryDebugIdIdentifier="sentry-dbid-3439180c-0cd8-4ca5-8bd7-019f763bee66")}catch{}})();const ot=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-D3ESVZyk.js";import{a as u,b as D,q as T}from"./sentry-B_92GPgU.js";import{u as A,h as z,j as d,g as M,N as O,n as j}from"./core-k_c8SCBE.js";import{u as F,z as s,m as P,c as w,D as B,d as _,e as N,K as V,g as W,R as Y,f as v}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-D3ESVZyk.js";import{a as u,b as D,q as T}from"./sentry-B_92GPgU.js";import{u as A,h as z,j as d,g as M,N as O,n as j}from"./core-k_c8SCBE.js";import{u as F,z as s,m as P,c as w,D as B,d as _,e as N,K as V,g as W,R as Y,f as v}from"./index-B4wUHn-k.js";import{eW as $,Ly as q,Lz as G,fa as H,fD as J,LE as K,gn as R,cY as Q,LF as b,LG as X,LH as Z,bY as y}from"./zeni-epic-state-C3zBO1No.js";import"./mui-UJrLjp1k.js";import{u as ee}from"./useDeviceId-BE1s-3Wf.js";import{f as te}from"./analyticsHelper-CfMFPPIh.js";import{t as ne}from"./getLocaleForTenant-CTwYyvWj.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="cb012bf1-16ff-4c3f-90f8-d2ac834c3cb5",t._sentryDebugIdIdentifier="sentry-dbid-cb012bf1-16ff-4c3f-90f8-d2ac834c3cb5")}catch{}})();const ie=j(function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:c,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}})(Y),ae=D.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),c=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=d(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:C,accountUnlockTime:k}=d(e=>e.tenantState),p=d(e=>e.tenantState.fetchState),E=d(e=>e.tenantState.activeTenantFetchState.fetchState),S=d(e=>e.tenantState.signInState),o=d(e=>e.tenantState.loggedInUser),r=d(e=>$(e)),I=d(e=>q(e)),m=M(),h=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[L.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&E!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,h,void 0,I.tenantsInOrder),R().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))},2e3))},[S,p,E,o,r,I,h,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:c,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D3ESVZyk.js";import{a as n}from"./sentry-B_92GPgU.js";import{u,g as m,h as g,N as p}from"./core-k_c8SCBE.js";import{z as c,B as y,t as b,c as d,e as h}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import{a as n}from"./sentry-B_92GPgU.js";import{u,g as m,h as g,N as p}from"./core-k_c8SCBE.js";import{z as c,B as y,t as b,c as d,e as h}from"./index-B4wUHn-k.js";import{gs as x,gt as I,LW as w}from"./zeni-epic-state-C3zBO1No.js";import{n as j}from"./mui-UJrLjp1k.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="d4c898fa-41ea-4d93-8abe-4eb34c475780",e._sentryDebugIdIdentifier="sentry-dbid-d4c898fa-41ea-4d93-8abe-4eb34c475780")}catch{}})();function $(){const e=u(),t=m(),i=g(),a=n.useRef(!1),f=c.isSignedIn(),r=t.state?.message==="logout",o=r||f;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(x()),e(I(!1)),w(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-D3ESVZyk.js";import{a as b}from"./sentry-B_92GPgU.js";import{h as _,u as v,g as K,j as G,i as z,n as q}from"./core-k_c8SCBE.js";import{z as x,N as W,x as p,_ as H,r as M,c as O,e as V,d8 as Z,n as g,p as Q}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-D3ESVZyk.js";import{a as b}from"./sentry-B_92GPgU.js";import{h as _,u as v,g as K,j as G,i as z,n as q}from"./core-k_c8SCBE.js";import{z as x,N as W,x as p,_ as H,r as M,c as O,e as V,d8 as Z,n as g,p as Q}from"./index-B4wUHn-k.js";import{eW as J,Th as F,IH as C,Ti as R,Td as X,I3 as y,Tj as Y,Ib as E,Hx as aa,II as S,Tk as B,f9 as ea,Iy as ta,ID as sa,Iq as oa,Io as w,IE as na,Il as ia,Tl as la,Tm as ra,Tn as ka,To as ca,Tp as T,ei as da,Tq as ua,Tr as pa}from"./zeni-epic-state-C3zBO1No.js";import{n as Ta}from"./mui-UJrLjp1k.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import{M as ga}from"./MobileAppDrawer-BzOopfIc.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.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]="f7d887e0-53e5-40f8-bb0f-b0ee9d502938",e._sentryDebugIdIdentifier="sentry-dbid-f7d887e0-53e5-40f8-bb0f-b0ee9d502938")}catch{}})();const fa=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-D3ESVZyk.js";import se from"./NotFoundScreen-
|
|
1
|
+
import{j as n}from"./liveblocks-D3ESVZyk.js";import se from"./NotFoundScreen-6vyCFr5S.js";import{a as c}from"./sentry-B_92GPgU.js";import{h as q,u as O,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-k_c8SCBE.js";import{HK as Z,HN as le,HH as de,eW as M,Td as K,H$ as Q,HE as pe,Iv as ue,Io as ke,Te as J,Tf as N,HA as me,Hx as fe,ry as ge,rm as he,l0 as Se,HV as Ie,Tg as Te,Ia as be,I7 as Ee,HQ as Ce,I4 as Ge,I3 as De}from"./zeni-epic-state-C3zBO1No.js";import{z as G,d6 as xe,Y as ye,N as je,x as b,p as W,n as w,r as ve,c as V,e as we,d7 as Re,f as z,at as Fe}from"./index-B4wUHn-k.js";import{n as Be}from"./mui-UJrLjp1k.js";import{u as Pe}from"./useInitialThreadRequest-C_cJhQDA.js";import{M as Ue}from"./MobileAppDrawer-BzOopfIc.js";import Le from"./TaskListScreen-CIIrTWF0.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./useAskAiCfoHostNavButtonProps-BJGg886y.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]="6c1768b8-5a21-4c4f-9507-8065a33cc145",e._sentryDebugIdIdentifier="sentry-dbid-6c1768b8-5a21-4c4f-9507-8065a33cc145")}catch{}})();function He(){const e=q(),t=O(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,_=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=J(e,t.taskId),d=M(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=K(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${z.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,_=Object.values(I)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${z.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=q(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>M(i)),k=Pe(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,I]=c.useState(!1),[p,X]=c.useState(!1),[F,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,y]=c.useState(!1),T=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>K(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(X(!0),t(Q(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return y(!1),void(T.current=!1);if(C==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const H=g(i=>J(i,r)),j=H.fetchState,$=G.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&H.error?.code===400){const{tenantEmailDomain:i}=l,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-lhjQfiA2.js → TransactionDetailRoutes-L60jmvh4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-D3ESVZyk.js";import i from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-D3ESVZyk.js";import i from"./NotFoundScreen-6vyCFr5S.js";import{T as r}from"./TransactionDetailScreen-BHKf3UvG.js";import"./sentry-B_92GPgU.js";import{o as a,p as o}from"./core-k_c8SCBE.js";import"./zeni-epic-state-C3zBO1No.js";import"./recharts-Q-kkTNuO.js";import"./index-B4wUHn-k.js";import"./mui-UJrLjp1k.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import"./decodeURIComponentSafe-ClSfwHJC.js";import"./routePaths-ooqctjvV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56b6774e-1a6b-43e6-92ce-ea2969956395",e._sentryDebugIdIdentifier="sentry-dbid-56b6774e-1a6b-43e6-92ce-ea2969956395")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|
package/dist/assets/{TransactionDetailScreen-advW0sri.js → TransactionDetailScreen-BHKf3UvG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as x}from"./liveblocks-D3ESVZyk.js";import{a as i}from"./sentry-B_92GPgU.js";import{u as W,k as Qe,j as S,s as fe,g as ge,h as Te,i as be,N as Ze,n as Xe}from"./core-k_c8SCBE.js";import{nJ as he,eW as Z,go as Ke,NM as et,mW as tt,mE as at,bn as nt,cU as Ee,bt as Ie,r6 as q,ML as H,NN as ve,NO as oe,N9 as De,kD as Ce,NP as ke,Ne as se,Nf as ce,ls as Ae,JO as ie,MF as $,kx as Ne,kv as Ue,kH as ot,nw as st,NQ as ct,NR as it,va as Q,kC as xe,J7 as _e,cZ as rt,c_ as lt,NS as dt,ME as ut,NT as mt,v6 as pt,NU as ft,NV as ht,NW as yt,NX as St,NY as gt,kG as Tt,NZ as bt,N_ as Et,MG as It,N$ as vt,O0 as Dt,O1 as Ct,J1 as kt,IT as At,Jg as Nt,kI as Ut,JP as ye,nB as xt}from"./zeni-epic-state-C3zBO1No.js";import{N as J,x as _,z as we,aN as Pe,m as _t,h as wt,aO as Pt,w as Ft,p as ae,j as Ot,aP as Vt,n as ne,_ as Bt,aQ as Rt,c as Fe,aR as Lt,at as zt,a2 as te}from"./index-
|
|
1
|
+
import{j as x}from"./liveblocks-D3ESVZyk.js";import{a as i}from"./sentry-B_92GPgU.js";import{u as W,k as Qe,j as S,s as fe,g as ge,h as Te,i as be,N as Ze,n as Xe}from"./core-k_c8SCBE.js";import{nJ as he,eW as Z,go as Ke,NM as et,mW as tt,mE as at,bn as nt,cU as Ee,bt as Ie,r6 as q,ML as H,NN as ve,NO as oe,N9 as De,kD as Ce,NP as ke,Ne as se,Nf as ce,ls as Ae,JO as ie,MF as $,kx as Ne,kv as Ue,kH as ot,nw as st,NQ as ct,NR as it,va as Q,kC as xe,J7 as _e,cZ as rt,c_ as lt,NS as dt,ME as ut,NT as mt,v6 as pt,NU as ft,NV as ht,NW as yt,NX as St,NY as gt,kG as Tt,NZ as bt,N_ as Et,MG as It,N$ as vt,O0 as Dt,O1 as Ct,J1 as kt,IT as At,Jg as Nt,kI as Ut,JP as ye,nB as xt}from"./zeni-epic-state-C3zBO1No.js";import{N as J,x as _,z as we,aN as Pe,m as _t,h as wt,aO as Pt,w as Ft,p as ae,j as Ot,aP as Vt,n as ne,_ as Bt,aQ as Rt,c as Fe,aR as Lt,at as zt,a2 as te}from"./index-B4wUHn-k.js";import{n as Gt,S as Mt,D as jt}from"./mui-UJrLjp1k.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import{d as Oe}from"./decodeURIComponentSafe-ClSfwHJC.js";import{h as Ve,c as Be,g as Wt,e as qt}from"./routePaths-ooqctjvV.js";import{u as Ht}from"./utils-Mjhh9T8E.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="594aadfb-bf1c-4db7-9bc7-364c884f2745",t._sentryDebugIdIdentifier="sentry-dbid-594aadfb-bf1c-4db7-9bc7-364c884f2745")}catch{}})();function Jt(t=!0){const e=W(),s=Qe(),{useFeatureGate:a}=J(),{isFeatureEnabled:n}=a(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect(()=>{if(!t||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))},[t,n,e,s])}function Yt(t,e){const s=function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,N]=i.useState(null),{useDynamicConfig:T}=J(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S(h=>Z(h)),b=k.companyId,U=S(h=>Ke(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:w,capitalizableAccountOverrides:V,dismissedAccounts:z}=S(h=>{const E=h.tenantState.currentTenantId,u=E!=null?h.tenantState.tenantsById[E]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}},fe),G=i.useRef(w);G.current=w;const B=i.useRef(V);B.current=V;const P=i.useRef(z);P.current=z;const R=S(h=>et(h.accountState),fe),I=i.useMemo(()=>{const h={};for(const E of R)E.accountId!=null&&E.accountName!=null&&(h[E.accountId]=E.accountName);return h},[R]),l=m!=null?I[m]??null:null,M=i.useCallback(h=>{if(!v)return;const E=G.current;if(E==null)return;const u=E.accounts??[],j=new Set(h),X=B.current??{},Y=P.current;for(const L of u)if(j.has(L.accountId)&&X[L.accountId]==null&&Y?.[L.accountId]==null)return y(L.classificationType),N(L.accountId),void g(!0)},[v]),D=i.useCallback((h,E)=>{r(tt(b,h,E,!0)),g(!1),y(null),N(null)},[r,b]),F=i.useCallback(()=>{m!=null&&(r(at(b,m)),g(!1),y(null),N(null))},[r,b,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:M,handleSubmit:D,handleDismiss:F}}(),a=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect(()=>{t==="In-Progress"&&(n.current=c.current()),t==="Completed"&&a.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),a.current=t},[t]),s}const re=()=>{const t=we.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:s}=e(_.isChainOfThoughtEnabled);return i.useMemo(()=>nt(t)&&s,[t,s])};function Re(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ha(t,e){const s=W(),{useFeatureGate:a,useDynamicConfig:n}=J(),o=S(u=>Z(u)),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&Ee(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=a(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=a(_.isExpenseAutomationEnabled),{configValue:y}=n(Pe.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,N=re(),T=i.useMemo(()=>({id:t,type:q(e)}),[t,e]),f=S(u=>H(u,T)),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S(u=>{const j=H(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return j==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[j]?.saveStatus.fetchState??"Not-Started"}),b=i.useMemo(()=>f?.fetchState==="Completed"?Re(f?.transaction):void 0,[f?.fetchState,f?.transaction]),U=S(u=>{if(b!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,b,"month")}),w=S(u=>oe(u)),V=S(u=>{if(b!=null)return De(u.trendWithTransactionsState,b,"TransactionDetail")}),z=o.company?.companyInfo.firstMonthOfFY??1,G=S(u=>Ce(u.accountState,u.accountListState,"accountList")),[B,P]=i.useState(!1),[R,I]=i.useState(!1),[l,M]=i.useState(!1);i.useEffect(()=>{P(!1),I(!1),M(!1)},[t,e]);const D=i.useCallback(()=>{P(!1),I(!1)},[]),[F,h]=i.useState(!1),E=V?.selectedPeriod?.timePeriod;return i.useEffect(()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),M(!0)),b!=null&&(!c||r&&p===!1)&&(B?R||U==null||(I(!0),s(ie(b,"TransactionDetail",{timeframe:"month",timePeriod:E??U}))):(s(se()),s(ce()),P(!0),s(Ae(b))))},[s,l,f?.fetchState,f?.transaction,b,c,r,p,B,R,U,E]),i.useEffect(()=>{w.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)},[w.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect(()=>()=>{s($("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:N,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:b,defaultTrendTransactionTimePeriod:U,vendorViewDetails:w,uiState:V,firstMonthOfFY:z,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Qt={overlayWidth:new Ft(100,100,58)},Zt=({isOpen:t,onSaveVendor:e,onSaveSuccess:s,onCancel:a,vendorViewDetails:n})=>{const o=_t(),c=wt(),r=W(),p=S(y=>oe(y)),g=()=>{a()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(ot("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Ne({vendorId:void 0,localData:y}))}};return x.jsx(jt,{anchor:"right",open:t,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:x.jsx(Xt,{onClick:y=>y.stopPropagation(),children:x.jsx(Pt,{...A})})})},Xt=Gt(Mt)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-D3ESVZyk.js";import{h as Z,g as U,u as H,i as K,j as h,N as w,n as Q,o as be,p as j}from"./core-k_c8SCBE.js";import{eW as W,qN as ee,jR as p,Rc as te,JF as De,bq as le,Rd as Ee,ks as ae,Nb as ne,Re as ue,Rf as ve,bE as Y,JB as ye,Rg as Pe,Rh as me,Ri as je,JE as Ae,Rj as xe,Rk as pe,Rl as Me,Rm as ge,Rn as Fe,Ro as Le,Rp as fe,KR as Be,bn as Ce}from"./zeni-epic-state-C3zBO1No.js";import{D as de,N as X,x as G,c as z,cl as ce,n as J,p as oe,X as Re,z as Oe}from"./index-Cm2LZphQ.js";import"./mui-UJrLjp1k.js";import{a as S}from"./sentry-B_92GPgU.js";import{w as se}from"./withTransactionSidePanel-AeDcEPW-.js";import{p as ie,c as re}from"./routePaths-d7Ok-gzv.js";import{v as ze}from"./utils-Mjhh9T8E.js";import{d as E}from"./decodeURIComponentSafe-ClSfwHJC.js";import{Z as we}from"./ZeniAccountStatementScreen-CCwshkYl.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./useAskAiCfoHostNavButtonProps-j-YNVdB5.js";import"./TransactionDetailScreen-advW0sri.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="8c780700-a0e3-4d5d-bf7a-c63f6c47d309",a._sentryDebugIdIdentifier="sentry-dbid-8c780700-a0e3-4d5d-bf7a-c63f6c47d309")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>ze(a),_e=Q(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:q(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=Z(),t=U(),n=H(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=K(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>W(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=X(),{isFeatureEnabled:k}=g(G.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:L,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[B,P]=S.useState(!1),[C,R]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,L]);S.useEffect(()=>{if(!B&&T!=null){P(!0),z.trackTransactionList(void 0,void 0,void 0,T.title);const r=q(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,T,n]);let M=T;return T!=null&&C!=null&&(M={...T,period:C}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx(_e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:L,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>R(r),...a})}),$e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ve=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},qe=Q(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Je=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>W(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=X(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=Ue(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=We(L?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(qe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=Q(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ze=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>W(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=X(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=He(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ke(L?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(Xe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ke=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Qe=Q(function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Le(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=K(),f=E(l??""),g=E(u??""),k=E(A??""),x=!(I!=null&&I==="exclude_subaccounts"),L=h(b=>Me(b.transactionListState,g,f)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(b=>W(b)),T=R.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=R.company?.companyInfo.firstMonthOfFY??1;let r;const _=et(f,g,m,D,y,k);if(_){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(L?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:O}=X(),{isFeatureEnabled:F}=O(G.isTransactionCommentingEnabled),{isFeatureEnabled:V}=O(G.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&V,{areTenantIdsInSync:$}=Re();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),z.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(b=>b!=null);return _&&i!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:F,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>C(b),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Be}/statements`;function Yt(){const a=U().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=X(),{isFeatureEnabled:c}=n(G.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>W(m)).tenantId],{isFeatureEnabled:l}=n(G.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Je,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})})]})}export{Yt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-D3ESVZyk.js";import{h as Z,g as U,u as H,i as K,j as h,N as w,n as Q,o as be,p as j}from"./core-k_c8SCBE.js";import{eW as W,qN as ee,jR as p,Rc as te,JF as De,bq as le,Rd as Ee,ks as ae,Nb as ne,Re as ue,Rf as ve,bE as Y,JB as ye,Rg as Pe,Rh as me,Ri as je,JE as Ae,Rj as xe,Rk as pe,Rl as Me,Rm as ge,Rn as Fe,Ro as Le,Rp as fe,KR as Be,bn as Ce}from"./zeni-epic-state-C3zBO1No.js";import{D as de,N as X,x as G,c as z,cl as ce,n as J,p as oe,X as Re,z as Oe}from"./index-B4wUHn-k.js";import"./mui-UJrLjp1k.js";import{a as S}from"./sentry-B_92GPgU.js";import{w as se}from"./withTransactionSidePanel-3cc8um6s.js";import{p as ie,c as re}from"./routePaths-ooqctjvV.js";import{v as ze}from"./utils-Mjhh9T8E.js";import{d as E}from"./decodeURIComponentSafe-ClSfwHJC.js";import{Z as we}from"./ZeniAccountStatementScreen-BuDvio8F.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import"./TransactionDetailScreen-BHKf3UvG.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="8c780700-a0e3-4d5d-bf7a-c63f6c47d309",a._sentryDebugIdIdentifier="sentry-dbid-8c780700-a0e3-4d5d-bf7a-c63f6c47d309")}catch{}})();const Ge=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>ze(a),_e=Q(function(a,e){const t=Ee(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);z.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:q(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=Z(),t=U(),n=H(),c=t.pathname.split("/").find(r=>Ge.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=K(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>W(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=X(),{isFeatureEnabled:k}=g(G.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:L,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[B,P]=S.useState(!1),[C,R]=S.useState(void 0),T=S.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,L]);S.useEffect(()=>{if(!B&&T!=null){P(!0),z.trackTransactionList(void 0,void 0,void 0,T.title);const r=q(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[B,T,n]);let M=T;return T!=null&&C!=null&&(M={...T,period:C}),c==null||M==null?s.jsx(w,{to:"../"}):s.jsx(_e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:L,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>R(r),...a})}),$e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ve=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},qe=Q(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Je=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>W(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=X(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=Ue(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=We(L?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(qe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=Q(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ze=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=K(),f=E(l??""),g=E(u??""),k=E(m??""),x=E(I??""),L=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(d=>W(d)),T=R.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=X(),{isFeatureEnabled:r}=M(G.isProjectsTransactionsEnabled),_=h(d=>ee(d))&&r;let i;const O=He(f,g,k,D,y,A,x);if(O){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ke(L?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),z.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let F=i;i!=null&&P!=null&&(F={...i,period:P});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return O&&F!=null?s.jsx(Xe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:_,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(w,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,Ke=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Qe=Q(function(a,e){const t=Fe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Le(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),z.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=J(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=Z(),n=U(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=K(),f=E(l??""),g=E(u??""),k=E(A??""),x=!(I!=null&&I==="exclude_subaccounts"),L=h(b=>Me(b.transactionListState,g,f)),[v,B]=S.useState(!1),[P,C]=S.useState(void 0),R=h(b=>W(b)),T=R.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=R.company?.companyInfo.firstMonthOfFY??1;let r;const _=et(f,g,m,D,y,k);if(_){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(L?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:O}=X(),{isFeatureEnabled:F}=O(G.isTransactionCommentingEnabled),{isFeatureEnabled:V}=O(G.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&V,{areTenantIdsInSync:$}=Re();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),z.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,$]);const ke=[l,u,m,D,y,A].filter(b=>b!=null);return _&&i!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:F,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>C(b),...e}):s.jsx(w,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Be}/statements`;function Yt(){const a=U().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=X(),{isFeatureEnabled:c}=n(G.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>W(m)).tenantId],{isFeatureEnabled:l}=n(G.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(we,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(w,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Je,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ze,{referrerType:a})})]})}export{Yt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-D3ESVZyk.js";import{h as L,g as B,u as U,i as O,j as y,N as P,n as N,o as Ce,p as k}from"./core-k_c8SCBE.js";import{cq as _,eW as D,PV as R,G0 as ae,fx as H,FK as ne,PX as Ie,G3 as ke,PT as be,PU as se,Qa as je,E7 as Ee,t_ as Ae,PZ as ve,Gm as De,PW as re,cT as W,yd as oe,fc as Fe,fe as Pe,R9 as Le,Ra as Be,FL as Ue,Rb as Re,FM as Me,FV as Ve,bt as Oe,bJ as Ne,cB as _e,bK as Ge,cp as ze,fw as $e,bs as qe,LA as He,co as We}from"./zeni-epic-state-C3zBO1No.js";import{j as G,aq as Ze,z as E,r as z,c as b,ce as Ke,cf as Je,cg as q,h as Z,m as Xe,X as Qe,_ as Ye,N as ie,x as A,w as et,B as tt,ch as at,at as K,n as nt,ci as st,p as J,cj as rt,M as Q,ck as ot,a9 as it}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-D3ESVZyk.js";import{h as L,g as B,u as U,i as O,j as y,N as P,n as N,o as Ce,p as k}from"./core-k_c8SCBE.js";import{cq as _,eW as D,PV as R,G0 as ae,fx as H,FK as ne,PX as Ie,G3 as ke,PT as be,PU as se,Qa as je,E7 as Ee,t_ as Ae,PZ as ve,Gm as De,PW as re,cT as W,yd as oe,fc as Fe,fe as Pe,R9 as Le,Ra as Be,FL as Ue,Rb as Re,FM as Me,FV as Ve,bt as Oe,bJ as Ne,cB as _e,bK as Ge,cp as ze,fw as $e,bs as qe,LA as He,co as We}from"./zeni-epic-state-C3zBO1No.js";import{j as G,aq as Ze,z as E,r as z,c as b,ce as Ke,cf as Je,cg as q,h as Z,m as Xe,X as Qe,_ as Ye,N as ie,x as A,w as et,B as tt,ch as at,at as K,n as nt,ci as st,p as J,cj as rt,M as Q,ck as ot,a9 as it}from"./index-B4wUHn-k.js";import{D as ct,n as M,S as lt}from"./mui-UJrLjp1k.js";import ut from"./NotFoundScreen-6vyCFr5S.js";import{S as Y}from"./SetupPagesScreen-DiqU6iZv.js";import{a as p}from"./sentry-B_92GPgU.js";import{u as dt}from"./useAskAiCfoHostNavButtonProps-BJGg886y.js";import{u as pt}from"./useInitialThreadRequest-C_cJhQDA.js";import{u as mt}from"./useCashManagementBanner-Cjm3Ayi5.js";import{M as ce}from"./MobileAppDrawer-BzOopfIc.js";import{F as ft}from"./FeaturePreviewScreen-DoKDdD4M.js";import{a as ee}from"./analyticsHelper-CfMFPPIh.js";import"./recharts-Q-kkTNuO.js";import"./analytics-DVTbnjlr.js";import"./plaid-B1j5PXHV.js";import"./dnd-CKEs-Nbe.js";import"./stripe-DMRn4zHo.js";import"./lottie-BYni7Ovk.js";import"./lexical-k-PQZXkn.js";import"./pdf-CaeTpLUv.js";import"./utils-Mjhh9T8E.js";import"./routePaths-ooqctjvV.js";import"./BusinessVerificationPageScreen-DWX7ySZI.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="811fdb6e-8e8c-4f51-bdd7-d8a878b4a603",t._sentryDebugIdIdentifier="sentry-dbid-811fdb6e-8e8c-4f51-bdd7-d8a878b4a603")}catch{}})();const yt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{o.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}})(Ke);function gt(){const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=O(),m=G(),s=y(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=Ze(s),r=_(m?.loggedInUserRoleMap),[l,i]=p.useState(!1),[u,w]=p.useState(!1),[d,c]=p.useState(!1),h=y(I=>D(I)),g=E.getSignedInUserTenant(o)?.companyId??h.companyId,T=E.getSignedInUser(),S=y(I=>R(I,g)),C=y(I=>I.treasurySetupViewState.fetchState),x=y(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=y(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{l||C!=="Not-Started"||g==null||(i(!0),n(ae(g,!0,!1)))},[l,C,g,n]),p.useEffect(()=>{d||F!=="Not-Started"||g==null||(c(!0),n(H()))},[d,F,g,n]),p.useEffect(()=>{u||x!=="Not-Started"||g==null||(w(!0),n(ne()))},[u,x,g,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(P,{to:"../promo"});const v=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||C!=="Completed";return e.jsxs(e.Fragment,{children:[!v&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{navigate:t,location:a,companyId:g,isEditMode:!0,isLoading:v,isReadOnly:!r,treasurySetupView:S,analytics:b})]})}const ht=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:m}=a,s=o.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:r=>{t(ve(r))},onFetchLinkTokenClick:r=>{t(Ae("treasury_setup",r))},onEstablishConnectionClick:r=>{t(Ee(r,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),St=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[m,s]=p.useState(!1),[f,r]=p.useState(!1),[l,i]=p.useState(!1),[u,w]=p.useState(!1),d=y(x=>x.treasurySetupViewState.fetchState),c=y(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=y(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),g=y(x=>D(x)),T=E.getSignedInUserTenant(n)?.companyId??g.companyId,S=y(x=>be(x)),C=y(x=>R(x,T));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||d!=="Not-Started"||T==null||(r(!0),o(ae(T,!0,!1)))},[f,d,T,o]),p.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),p.useEffect(()=>{u||h!=="Not-Started"||T==null||(w(!0),o(ne()))},[u,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ht,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{s(!1),o(se())},currentTenant:g,treasurySetupView:C,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",S.treasuryTransferMoneyLocalData,C.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},xt=M.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|