@zeniai/web-app-ui 5.1.26-next → 5.1.26-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-C5z7aThH.js +1 -0
- package/dist/assets/{AddressScreen-CjfiYYQT.js → AddressScreen-Dps-w1Sa.js} +1 -1
- package/dist/assets/{AiCfoScreen-sMDE-uDl.js → AiCfoScreen-DCx0xhxZ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DNptzU_o.js → BillPayApprovalRoutes-C699yoIf.js} +1 -1
- package/dist/assets/{BillPayRoutes-Bgi22lGa.js → BillPayRoutes-B_jmsrni.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-YQp2zhcE.js → BusinessVerificationPageScreen-B93ovLXv.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-wNDnOEQN.js → ChargeCardRoutes-BjzMHtf-.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Ba5MMp4P.js → CompanyPassportScreen-BtCmSOhL.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Dj8Ry1wk.js → ConnectionAuthScreen-DvvRMktn.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-B02nk7NU.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Bbk7Izlv.js → CustomerOnboardingRoutes-BgV3Ywve.js} +1 -1
- package/dist/assets/{DashboardRoutes-Dplva8yT.js → DashboardRoutes-DYXQlmSB.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Dx2Iil5D.js → DefaultTenantHome-CpRE7___.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BDR3kWIZ.js → DomesticWireDetailScreen-Dim3H7hW.js} +1 -1
- package/dist/assets/{DrawerScreen-DDLQAbob.js → DrawerScreen-Zl5iUHN2.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-D5O3YBNn.js → EntityDetailRoutes-2ToQ-PxA.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CCbIxpmc.js → ExpenseAutomationRoutes-CCzkh7Kp.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BsQo0yYx.js → FeaturePreviewScreen-BbqD4Bts.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-C7QEYPYk.js → HubSpotOAuthCallbackScreen-C9uvk8cq.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-UyDirah5.js → MagicLinkRoutes-DDfENhin.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CCJmsZ8r.js → MagicLinkSignInScreen-BtgqsnwV.js} +1 -1
- package/dist/assets/{MobileAppDrawer-nkYX8GIx.js → MobileAppDrawer-BOy-szv4.js} +1 -1
- package/dist/assets/NotFoundScreen-B7WJWy8d.js +1 -0
- package/dist/assets/{NotificationRoutes-WK4dND40.js → NotificationRoutes-BR8CGEdy.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CJWG36bt.js → OAuthConsentScreen-CIkNmP4t.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-sThW5ETe.js → PandLWithForecastRoutes-Bt_Qf5jN.js} +1 -1
- package/dist/assets/{PeopleRoutes-DXJPuEcM.js → PeopleRoutes-cXSqv2P1.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CEK06pvJ.js → PerformanceRoutes-Sz-hKroj.js} +1 -1
- package/dist/assets/{Preview-vW1KYfkG.js → Preview-Co7v0DAd.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CYIvCqvg.js → QBOConnectionScreen-CZn0CzWI.js} +1 -1
- package/dist/assets/{ReferralListScreen-D6eYTW74.js → ReferralListScreen-DX_12LsC.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CMRyKdcQ.js → ReimbursementApprovalRoutes-FiPJZbl-.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-xxlKnrEd.js → ReimbursementApprovalRuleDetailScreen-DxDFeMjQ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-ktZ6qbTy.js → ReimbursementRoutes-iHn99P-N.js} +1 -1
- package/dist/assets/{ReportsRoutes-Di7v7R30.js → ReportsRoutes-BJsMusqx.js} +1 -1
- package/dist/assets/{RewardsRoutes-D0cz8TqK.js → RewardsRoutes-y74gXpju.js} +1 -1
- package/dist/assets/{ScreenRoutes-CLdOPxA5.js → ScreenRoutes-DLCPKAGX.js} +2 -2
- package/dist/assets/{SettingsRoutes-tGoYQDzh.js → SettingsRoutes-oPPfz0yw.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BmjFl-Xb.js → SetupPagesScreen-DsWBsj_S.js} +1 -1
- package/dist/assets/{SignInScreen-by8is1Kb.js → SignInScreen-CYjB5nt-.js} +1 -1
- package/dist/assets/{SignOutScreen-BIHHMSao.js → SignOutScreen-Cv1NVkZK.js} +1 -1
- package/dist/assets/{TaskListScreen-CSa_iGWW.js → TaskListScreen-FsK8ANL_.js} +1 -1
- package/dist/assets/{TaskRoutes-Bl3BbfyJ.js → TaskRoutes-DpMV3zKd.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-ByvifGvd.js → TransactionDetailRoutes-6f67vhWs.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-1j5GITNM.js → TransactionDetailScreen-DaprpGui.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DxoxQM4H.js → TransactionListRoutes-AHD9rIHD.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DXK8qYKa.js → TreasuryRoutes--1kmPJfR.js} +1 -1
- package/dist/assets/{VendorsRoutes-3OkfLrer.js → VendorsRoutes-CIru2JcE.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-D5BrTuJe.js → WiseConfirmationScreen-2Lfbesew.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DgNmhdux.js → ZeniAccountRoutes-D578Oh7m.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-z9nXn9uu.js → ZeniAccountStatementScreen-qp3Z3vYC.js} +1 -1
- package/dist/assets/{accountMappingHelper-l9tAaFBL.js → accountMappingHelper-BbUNiO4D.js} +1 -1
- package/dist/assets/{analytics-BZlEN5ux.js → analytics-DAPZ8UkE.js} +1 -1
- package/dist/assets/{analyticsHelper-BZMOKejZ.js → analyticsHelper-DkqHV9MS.js} +1 -1
- package/dist/assets/{core-CRKT-P9H.js → core-BQFH-fG_.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DKky7rAf.js → decodeURIComponentSafe-FTPGDiF3.js} +1 -1
- package/dist/assets/{dnd-Bp--Dca2.js → dnd-B3Cb0yFb.js} +1 -1
- package/dist/assets/{empty-gE1-zN7r.js → empty-BhjonfxI.js} +1 -1
- package/dist/assets/{empty-C0-r5Bw-.js → empty-CCdqFUNi.js} +1 -1
- package/dist/assets/{emptyVideoElement-DnpozXH6.js → emptyVideoElement-C74DZm73.js} +1 -1
- package/dist/assets/{epic-rloqRmH8.js → epic-DulUzlUc.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C7XxxzKS.js → getLocaleForTenant-DHjgfN6C.js} +1 -1
- package/dist/assets/{index-Cr-3dzDE.js → index-BXu263au.js} +1 -1
- package/dist/assets/{index-C6Kghwjz.js → index-BgqVo229.js} +2 -2
- package/dist/assets/{index-BGJhbfNl.js → index-Bqg0NLiJ.js} +1 -1
- package/dist/assets/{index-BwstWfwS.js → index-D3gRohM1.js} +1 -1
- package/dist/assets/{index-gAT2H-DG.js → index-DAJNLQVj.js} +7 -7
- package/dist/assets/{index-BnfyHdDw.js → index-DW_f1QJQ.js} +1 -1
- package/dist/assets/{index-IxAYajAw.js → index-Dwk8MdkZ.js} +1 -1
- package/dist/assets/{index-VnANKM8G.js → index-YS7LSrzH.js} +1 -1
- package/dist/assets/{lexical-B4tkPJ0_.js → lexical-DynK9JnD.js} +1 -1
- package/dist/assets/{liveblocks-miobc7Sv.js → liveblocks-DnYW4p-1.js} +1 -1
- package/dist/assets/{lottie-D1DHiqdt.js → lottie-BI7v3w73.js} +1 -1
- package/dist/assets/{mui-CQ7Fxeyv.js → mui-6mK3ua6E.js} +1 -1
- package/dist/assets/{pathToGoBack-Bi5-9p0M.js → pathToGoBack-CvX5reKt.js} +1 -1
- package/dist/assets/{pdf-ez8vj5Rk.js → pdf-DtE7k_wa.js} +3 -3
- package/dist/assets/{pdf-lib-DNV405_t.js → pdf-lib-CkuBIllJ.js} +1 -1
- package/dist/assets/{plaid-BWmPv-jI.js → plaid-qfqRxaag.js} +1 -1
- package/dist/assets/{pusher-BBR-uaf_.js → pusher-BbXyQD1M.js} +1 -1
- package/dist/assets/{react-M0H2JLXw.js → react-5YXauGmt.js} +1 -1
- package/dist/assets/{react-BnN3YRb5.js → react-BFVcZZOu.js} +1 -1
- package/dist/assets/{react-DuynUlm8.js → react-CuOw1j25.js} +1 -1
- package/dist/assets/{react-DQvlHley.js → react-DSMpXhfr.js} +1 -1
- package/dist/assets/{react-DQp3FkXb.js → react-Mz05y32W.js} +1 -1
- package/dist/assets/{react-B3cOPkDc.js → react-Nj8kNdFS.js} +1 -1
- package/dist/assets/{recharts-B0ZRuCwu.js → recharts-CI0D2Tbj.js} +1 -1
- package/dist/assets/{routePaths-CxKh9IOJ.js → routePaths-zO9L3kzJ.js} +1 -1
- package/dist/assets/{sentry-CvLHinWf.js → sentry-DaKeBrSN.js} +1 -1
- package/dist/assets/{url-DmJrIMbW.js → url-CtNDkGG_.js} +1 -1
- package/dist/assets/{url-CTbWVz5K.js → url-D5dmOsin.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Csd77J5o.js → useAiCfoDashboardSuggestedQuestionsChips-D_4gi03n.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Bj6YjlZM.js → useAskAiCfoHostNavButtonProps-BGvRON95.js} +1 -1
- package/dist/assets/{useDeviceId-DxgQYlVZ.js → useDeviceId-B0EbDUDU.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CmbItnE3.js → useInitialThreadRequest-DdGVicw1.js} +1 -1
- package/dist/assets/{utils-Z3-4e1nL.js → utils-ypIEo-Nu.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-JbamN0h4.js → withTransactionSidePanel-Ci9yGR5x.js} +1 -1
- package/dist/assets/{zeni-epic-state-D0PtTcHw.js → zeni-epic-state-BAtVrn2l.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-C3I8WCU9.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DwK2c_HH.js +0 -1
- package/dist/assets/NotFoundScreen-C6AH91tm.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as n,bn as os,eP as ls,e_ as cs,eY as ds,eZ as ms,fH as us,eT as _s,cP as Ee,cx as Es,fe as As,cp as ps,bE as gs,bq as xs,fj as Is,v as Ts,Jp as hs,bt as js,Jq as Us,bG as Hs,fg as Rs,bF as bs,bs as Ds,cl as ys,Jr as fs,Js as Cs,cM as vs,cO as Os,cN as Ps,cw as Fs,cC as Ls,mW as Ae,eW as pe,fR as Bs,fn as ge,fO as xe,fP as Ie,fo as ks}from"./zeni-epic-state-D0PtTcHw.js";import{j as e}from"./liveblocks-miobc7Sv.js";import{a as v}from"./sentry-CvLHinWf.js";import{u as Vs,h as Ss,i as Ns,g as Ms,j as G,l as Te,N as c,o as Zs,p as t}from"./core-CRKT-P9H.js";import{h as ws,u as Gs,z as R,S as zs,a as $s,y as Ws,c as L,k as Ys,L as B,D as he,t as _,P as qs,d as X,l}from"./index-gAT2H-DG.js";import"./mui-CQ7Fxeyv.js";import{f as je}from"./analyticsHelper-BZMOKejZ.js";import{t as Js}from"./getLocaleForTenant-C7XxxzKS.js";import"./recharts-B0ZRuCwu.js";import"./analytics-BZlEN5ux.js";import"./plaid-BWmPv-jI.js";import"./dnd-Bp--Dca2.js";import"./stripe-DMRn4zHo.js";import"./lottie-D1DHiqdt.js";import"./lexical-B4tkPJ0_.js";import"./pdf-ez8vj5Rk.js";import"./utils-Z3-4e1nL.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]="d8d2b291-81f6-4ea8-986e-c37ca1e0444a",i._sentryDebugIdIdentifier="sentry-dbid-d8d2b291-81f6-4ea8-986e-c37ca1e0444a")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-Dplva8yT.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:()=>n(()=>import("./BillPayRoutes-Bgi22lGa.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:()=>n(()=>import("./ReimbursementRoutes-ktZ6qbTy.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:()=>n(()=>import("./TransactionListRoutes-DxoxQM4H.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-tGoYQDzh.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:()=>n(()=>import("./ReportsRoutes-Di7v7R30.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-wNDnOEQN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-DXJPuEcM.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CCbIxpmc.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-DXK8qYKa.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-3OkfLrer.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DgNmhdux.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-Di7v7R30.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-C3I8WCU9.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-DXJPuEcM.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-sThW5ETe.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-Bbk7Izlv.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-3OkfLrer.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-ByvifGvd.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-D5O3YBNn.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-Dplva8yT.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]))),He=l(()=>n(()=>import("./BillPayRoutes-Bgi22lGa.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]))),ln=l(()=>n(()=>import("./SettingsRoutes-tGoYQDzh.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]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-ktZ6qbTy.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]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-DgNmhdux.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-DXK8qYKa.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-DxoxQM4H.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-wNDnOEQN.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-WK4dND40.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-CEK06pvJ.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-CCbIxpmc.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-D0cz8TqK.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),gn=l(()=>n(()=>import("./TaskRoutes-Bl3BbfyJ.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-sMDE-uDl.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-C6AH91tm.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-CSa_iGWW.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),K=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ys(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,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,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(ge(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!C,qe=re&&bs(E?.loggedInUserRoleMap),Je=oe&&Ds(E?.loggedInUserRoleMap),Ke=me&&ys(E?.loggedInUserRoleMap),Qe=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=Ye&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Qe===!0||Xe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({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"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DYXQlmSB.js","assets/sentry-DaKeBrSN.js","assets/core-BQFH-fG_.js","assets/zeni-epic-state-BAtVrn2l.js","assets/index-DAJNLQVj.js","assets/mui-6mK3ua6E.js","assets/analytics-DAPZ8UkE.js","assets/utils-ypIEo-Nu.js","assets/withTransactionSidePanel-Ci9yGR5x.js","assets/useAskAiCfoHostNavButtonProps-BGvRON95.js","assets/TransactionDetailScreen-DaprpGui.js","assets/decodeURIComponentSafe-FTPGDiF3.js","assets/routePaths-zO9L3kzJ.js","assets/NotFoundScreen-B7WJWy8d.js","assets/useInitialThreadRequest-DdGVicw1.js","assets/analyticsHelper-DkqHV9MS.js","assets/CompanyPassportScreen-BtCmSOhL.js","assets/MobileAppDrawer-BOy-szv4.js","assets/useAiCfoDashboardSuggestedQuestionsChips-D_4gi03n.js","assets/FeaturePreviewScreen-BbqD4Bts.js","assets/ReferralListScreen-DX_12LsC.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-B_jmsrni.js","assets/AddressScreen-Dps-w1Sa.js","assets/DomesticWireDetailScreen-Dim3H7hW.js","assets/DrawerScreen-Zl5iUHN2.js","assets/SetupPagesScreen-DsWBsj_S.js","assets/BusinessVerificationPageScreen-B93ovLXv.js","assets/BillPayApprovalRoutes-C699yoIf.js","assets/ReimbursementApprovalRuleDetailScreen-DxDFeMjQ.js","assets/getLocaleForTenant-DHjgfN6C.js","assets/ReimbursementRoutes-iHn99P-N.js","assets/ReimbursementApprovalRoutes-FiPJZbl-.js","assets/TransactionListRoutes-AHD9rIHD.js","assets/ZeniAccountStatementScreen-qp3Z3vYC.js","assets/SettingsRoutes-oPPfz0yw.js","assets/accountMappingHelper-BbUNiO4D.js","assets/QBOConnectionScreen-CZn0CzWI.js","assets/empty-CCdqFUNi.js","assets/index-Bqg0NLiJ.js","assets/url-CtNDkGG_.js","assets/index-BXu263au.js","assets/ReportsRoutes-BJsMusqx.js","assets/ChargeCardRoutes-BjzMHtf-.js","assets/PeopleRoutes-cXSqv2P1.js","assets/ExpenseAutomationRoutes-CCzkh7Kp.js","assets/TreasuryRoutes--1kmPJfR.js","assets/VendorsRoutes-CIru2JcE.js","assets/pathToGoBack-CvX5reKt.js","assets/ZeniAccountRoutes-D578Oh7m.js","assets/AddressRoutes-C5z7aThH.js","assets/PandLWithForecastRoutes-Bt_Qf5jN.js","assets/CustomerOnboardingRoutes-BgV3Ywve.js","assets/TransactionDetailRoutes-6f67vhWs.js","assets/EntityDetailRoutes-2ToQ-PxA.js","assets/NotificationRoutes-BR8CGEdy.js","assets/PerformanceRoutes-Sz-hKroj.js","assets/RewardsRoutes-y74gXpju.js","assets/TaskRoutes-DpMV3zKd.js","assets/TaskListScreen-FsK8ANL_.js","assets/AiCfoScreen-DCx0xhxZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eP as ls,e_ as cs,eY as ds,eZ as ms,fH as us,eT as _s,cP as Ee,cx as Es,fe as As,cp as ps,bE as gs,bq as xs,fj as Is,v as Ts,Jp as hs,bt as js,Jq as Us,bG as Hs,fg as Rs,bF as bs,bs as Ds,cl as ys,Jr as fs,Js as Cs,cM as vs,cO as Os,cN as Ps,cw as Fs,cC as Ls,mW as Ae,eW as pe,fR as Bs,fn as ge,fO as xe,fP as Ie,fo as ks}from"./zeni-epic-state-BAtVrn2l.js";import{j as e}from"./liveblocks-DnYW4p-1.js";import{a as v}from"./sentry-DaKeBrSN.js";import{u as Vs,h as Ss,i as Ns,g as Ms,j as G,l as Te,N as c,o as Zs,p as t}from"./core-BQFH-fG_.js";import{h as ws,u as Gs,z as R,S as zs,a as $s,y as Ws,c as L,k as Ys,L as B,D as he,t as _,P as qs,d as X,l}from"./index-DAJNLQVj.js";import"./mui-6mK3ua6E.js";import{f as je}from"./analyticsHelper-DkqHV9MS.js";import{t as Js}from"./getLocaleForTenant-DHjgfN6C.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.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]="d8d2b291-81f6-4ea8-986e-c37ca1e0444a",i._sentryDebugIdIdentifier="sentry-dbid-d8d2b291-81f6-4ea8-986e-c37ca1e0444a")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-DYXQlmSB.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:()=>n(()=>import("./BillPayRoutes-B_jmsrni.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:()=>n(()=>import("./ReimbursementRoutes-iHn99P-N.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:()=>n(()=>import("./TransactionListRoutes-AHD9rIHD.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-oPPfz0yw.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:()=>n(()=>import("./ReportsRoutes-BJsMusqx.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BjzMHtf-.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-cXSqv2P1.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CCzkh7Kp.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes--1kmPJfR.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-CIru2JcE.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-D578Oh7m.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-BJsMusqx.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-C5z7aThH.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-cXSqv2P1.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-Bt_Qf5jN.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BgV3Ywve.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-CIru2JcE.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-6f67vhWs.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-2ToQ-PxA.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DYXQlmSB.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]))),He=l(()=>n(()=>import("./BillPayRoutes-B_jmsrni.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]))),ln=l(()=>n(()=>import("./SettingsRoutes-oPPfz0yw.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]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-iHn99P-N.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]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-D578Oh7m.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes--1kmPJfR.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-AHD9rIHD.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BjzMHtf-.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-BR8CGEdy.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-Sz-hKroj.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-CCzkh7Kp.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-y74gXpju.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),gn=l(()=>n(()=>import("./TaskRoutes-DpMV3zKd.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-DCx0xhxZ.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-B7WJWy8d.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-FsK8ANL_.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),K=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ys(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&D!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,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,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(ge(s));const q=R.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(q?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(Y){X.identify(m.userId,{tenant_id:s});const q=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),q&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!C,qe=re&&bs(E?.loggedInUserRoleMap),Je=oe&&Ds(E?.loggedInUserRoleMap),Ke=me&&ys(E?.loggedInUserRoleMap),Qe=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=Ye&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Qe===!0||Xe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:qe||de||Ke||Je?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):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:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({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"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DnYW4p-1.js";import{a as p}from"./sentry-DaKeBrSN.js";import{h as _,g as T,u as k,j as h,n as R,i as F,o as Q,p as I}from"./core-BQFH-fG_.js";import{bn as xe,eP as j,gN as de,Lu as Ee,pB as Ae,jG as ue,lZ as we,gP as je,Lw as Pe,Lv as ke,NV as ve,xO as De,Ch as Ue,Nu as Me,ND as _e,c2 as ee,cH as Be,cI as Te,JB as Re,NW as Fe,JC as Oe,we as Ve,NX as Le,Ex as Ne,BZ as $e,BQ as pe,BN as Ke,wi as ge,BT as me,BW as fe,C0 as ne,sP as te,wh as Je,ji as Y,jl as he,NY as Ze,km as Ge,wx as ze,Kp as He,Kq as We,jg as qe,NZ as Qe,jj as Ye,rd as Xe,N_ as en,N$ as nn,rh as tn,gx as an,JK as q,gm as sn,gt as on,JL as cn,wu as rn,O0 as ln,O1 as dn,Ce as un,eY as be,e_ as Se,O2 as pn,fA as gn,JU as mn,wt as oe,fF as ie,fE as fn,ws as hn,fD as bn,fC as Sn,O3 as Cn,f1 as Ce,O4 as yn,O5 as In,wA as xn,wr as ce,O6 as En,fi as An,wo as wn,bV as jn,c1 as Pn,c0 as kn,bW as vn,b_ as Dn,bZ as Un,bY as Mn,b$ as _n,bX as Bn}from"./zeni-epic-state-BAtVrn2l.js";import{S as ae,c as U,z as E,af as ye,bI as Tn,d as K,f as Rn,k as O,B as se,bJ as Fn,bK as On,aq as Vn,i as Ie,bL as Ln,bM as Nn,bN as $n,a9 as Kn,W as Jn,bO as Zn,r as Gn,bP as zn}from"./index-DAJNLQVj.js";import{n as M}from"./mui-6mK3ua6E.js";import{M as v}from"./MobileAppDrawer-BOy-szv4.js";import{a as N,g as $,m as Hn}from"./accountMappingHelper-BbUNiO4D.js";import{t as Wn,A as qn}from"./AddressScreen-Dps-w1Sa.js";import B from"./NotFoundScreen-B7WJWy8d.js";import{g as Qn}from"./analyticsHelper-DkqHV9MS.js";import{B as Yn}from"./BusinessVerificationPageScreen-B93ovLXv.js";import{C as Xn}from"./CompanyPassportScreen-BtCmSOhL.js";import{q as re}from"./QBOConnectionScreen-CZn0CzWI.js";import{B as et}from"./BillPayApprovalRoutes-C699yoIf.js";import{R as nt}from"./ReimbursementApprovalRoutes-FiPJZbl-.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";import"./routePaths-zO9L3kzJ.js";import"./empty-CCdqFUNi.js";import"./pdf-lib-CkuBIllJ.js";import"./index-Bqg0NLiJ.js";import"./url-CtNDkGG_.js";import"./index-BXu263au.js";import"./decodeURIComponentSafe-FTPGDiF3.js";import"./ReimbursementApprovalRuleDetailScreen-DxDFeMjQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f7a9548c-7ad6-4fcf-b796-1ab1019822be",e._sentryDebugIdIdentifier="sentry-dbid-f7a9548c-7ad6-4fcf-b796-1ab1019822be")}catch{}})();const tt=M.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-DnYW4p-1.js";import{h as Q,g as Y,u as X,i as H,j as E,N as j,n as W,s as Ye}from"./core-BQFH-fG_.js";import{bF as Xe,cl as Ie,Ni as ye,eP as x,cx as en,xZ as Z,xO as nn,Nu as tn,Nx as an,qf as ee,q3 as ne,ke as te,sl as R,Nz as Ae,fE as $e,fD as He,fC as We,NA as sn,y6 as on,BZ as ke,BQ as _e,BN as ve,BE as K,BT as Pe,BW as Ee,C0 as we,sP as De,fT as cn,cs as rn,e_ as un,eY as dn,eZ as ln,bs as pn,NB as mn,AG as le,Bi as yn,NC as fn,bG as gn,Dd as pe,Ch as Sn,ND as bn,NE as hn,Dh as Cn,Dl as In,se as An,HK as kn,DS as Ce,EL as me,NF as _n,NG as vn,NH as Pn,NI as Ge,NJ as En,Kc as wn,MH as Dn,Ko as Tn,NK as qe,NL as Fe,E4 as Ke,km as Un,q6 as Je,sn as On,bE as Ne,sz as je,cv as Bn,NM as Qe,fh as Fn,DA as xn,DE as Vn,NN as Nn,DV as ze,NO as jn,NP as zn,NQ as Rn,NR as Ln,fM as Mn,zh as Zn,NS as $n,zm as Hn,zl as Wn}from"./zeni-epic-state-BAtVrn2l.js";import{k as ae,S as ie,c as de,h as Te,aN as J,z as D,x as se,d as w,B as Ue,f as $,bx as Gn,at as oe,by as V,bz as qn,bA as Kn,af as Ve,bB as Jn,r as Re,au as Le,J as Qn,F as Yn,bC as Xn,bD as et,bE as nt,a7 as tt}from"./index-DAJNLQVj.js";import{a as C}from"./sentry-DaKeBrSN.js";import{n as xe,D as at,S as it}from"./mui-6mK3ua6E.js";import{M as fe}from"./MobileAppDrawer-BOy-szv4.js";import z from"./NotFoundScreen-B7WJWy8d.js";import{a as Me}from"./analyticsHelper-DkqHV9MS.js";import{d as Ze}from"./routePaths-zO9L3kzJ.js";import{B as Be}from"./BusinessVerificationPageScreen-B93ovLXv.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]="795a5734-d121-4baa-8d27-841a5c10f412",e._sentryDebugIdIdentifier="sentry-dbid-795a5734-d121-4baa-8d27-841a5c10f412")}catch{}})();const st=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-DnYW4p-1.js";import{a as f,b as T,q as A}from"./sentry-DaKeBrSN.js";import{u as D,h as z,j as c,g as J,N as M,n as O}from"./core-BQFH-fG_.js";import{u as P,z as s,h as j,d as E,D as F,e as _,f as B,q as N,g as q,E as V,i as v}from"./index-DAJNLQVj.js";import{eP as W,Jo as $,Jp as G,eW as H,fn as K,Ju as Q,fL as R,cT as X,Jv as y,Jw as Y,Jx as Z,bT as b}from"./zeni-epic-state-BAtVrn2l.js";import"./mui-6mK3ua6E.js";import{u as ee}from"./useDeviceId-B0EbDUDU.js";import{f as te}from"./analyticsHelper-DkqHV9MS.js";import{t as ne}from"./getLocaleForTenant-DHjgfN6C.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.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]="b678ed67-9463-423b-b286-e6ac9c1eab29",t._sentryDebugIdIdentifier="sentry-dbid-b678ed67-9463-423b-b286-e6ac9c1eab29")}catch{}})();const ie=O(function(t,i){const d=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:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({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:b(l),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.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(Y(n,a)))},clearSignInError:()=>{t(y())}}})(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:x,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>W(e)),I=c(e=>$(e)),m=J(),w=j().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(f.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),f.useEffect(()=>{t(void 0)},[]),f.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="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(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),R().then(()=>{const e=q();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&k!=null?u.jsx(N,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DnYW4p-1.js";import{a as n}from"./sentry-DaKeBrSN.js";import{u,g as m,h as p,N as g}from"./core-BQFH-fG_.js";import{z as d,B as y,t as h,d as f,f as b}from"./index-DAJNLQVj.js";import{fQ as x,fR as I,JM as j}from"./zeni-epic-state-BAtVrn2l.js";import{n as w}from"./mui-6mK3ua6E.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.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]="142d40f5-7c51-48d3-a18a-ecb2402f29ed",e._sentryDebugIdIdentifier="sentry-dbid-142d40f5-7c51-48d3-a18a-ecb2402f29ed")}catch{}})();function Q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=d.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),j(),h.reset(),f.trackLogout(b.Event.logoutSuccess),f.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(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-DnYW4p-1.js";import{a as g}from"./sentry-DaKeBrSN.js";import{h as K,u as U,g as z,j as b,i as M,n as O}from"./core-BQFH-fG_.js";import{z as R,S as J,c as p,_ as V,x as W,d as Z,f as q,cO as H,r as f,p as X}from"./index-DAJNLQVj.js";import{eP as Y,QC as x,Gh as y,QD as Q,Qy as aa,FJ as S,QE as ea,FN as I,Fg as ta,Gi as B,QF as w,gT as sa,G8 as oa,Gd as na,G0 as ia,F_ as L,Ge as la,FX as ra,QG as ka,QH as ca,QI as ua,QJ as da,QK as m,ec as pa,QL as ma,QM as Ta}from"./zeni-epic-state-BAtVrn2l.js";import{n as ga}from"./mui-6mK3ua6E.js";import{u as fa}from"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import{M as Ga}from"./MobileAppDrawer-BOy-szv4.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.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]="e86ba567-0e1e-4042-b767-0609c05d88d4",e._sentryDebugIdIdentifier="sentry-dbid-e86ba567-0e1e-4042-b767-0609c05d88d4")}catch{}})();const ha=ga.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-
|
|
1
|
+
import{j as n}from"./liveblocks-DnYW4p-1.js";import se from"./NotFoundScreen-B7WJWy8d.js";import{a as c}from"./sentry-DaKeBrSN.js";import{h as M,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-BQFH-fG_.js";import{Gl as Q,Go as le,Gr as de,eP as Z,Qy as J,FF as H,Fn as pe,G5 as ue,F_ as ke,Qz as K,QA as q,Fj as me,Fg as fe,qf as ge,q3 as he,ke as Se,Fv as Ie,QB as be,FA as Te,Fx as Ge,Fq as Ee,FK as Ce,FJ as Fe}from"./zeni-epic-state-BAtVrn2l.js";import{z as C,cM as De,v as xe,S as ye,c as T,p as W,r as v,x as je,d as z,f as ve,cN as we,i as A,at as Re}from"./index-DAJNLQVj.js";import{n as Be}from"./mui-6mK3ua6E.js";import{u as Pe}from"./useInitialThreadRequest-DdGVicw1.js";import{M as Ue}from"./MobileAppDrawer-BOy-szv4.js";import Le from"./TaskListScreen-FsK8ANL_.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";import"./useAskAiCfoHostNavButtonProps-BGvRON95.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]="ca837a9b-61b2-44aa-a5bb-f4731cf09963",e._sentryDebugIdIdentifier="sentry-dbid-ca837a9b-61b2-44aa-a5bb-f4731cf09963")}catch{}})();function Ne(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Q())},[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(De,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let V,_=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=Z(e),l=r.taskGroupId??u,k=l!=null?q(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=J(e),{tenantEmailDomain:F}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${F}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,_=Object.values(I)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>q(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(Fe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(Te(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=w(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(be({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(H(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Q())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function j(){const e=M(),t=O(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>Z(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:F}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(T.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=c.useState(!1),b=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>J(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(X(!0),t(H(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(b.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(b.current){if(E==="Error")return x(!1),void(b.current=!1);if(E==="Completed"){x(!1),b.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=w(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else b.current=!0},[P,E,l,s,e]);const N=g(i=>K(i,r)),y=N.fetchState,$=C.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&N.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(qe,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:F,isTaskGroupAssigneesEnabled:G})]})]})}const qe=Be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-ByvifGvd.js → TransactionDetailRoutes-6f67vhWs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-DnYW4p-1.js";import i from"./NotFoundScreen-B7WJWy8d.js";import{T as r}from"./TransactionDetailScreen-DaprpGui.js";import"./sentry-DaKeBrSN.js";import{o as a,p as o}from"./core-BQFH-fG_.js";import"./zeni-epic-state-BAtVrn2l.js";import"./recharts-CI0D2Tbj.js";import"./index-DAJNLQVj.js";import"./mui-6mK3ua6E.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";import"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import"./decodeURIComponentSafe-FTPGDiF3.js";import"./routePaths-zO9L3kzJ.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]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}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-1j5GITNM.js → TransactionDetailScreen-DaprpGui.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-DnYW4p-1.js";import{a as d}from"./sentry-DaKeBrSN.js";import{u as G,j as S,g as re,h as le,i as de,N as Ge,n as je}from"./core-BQFH-fG_.js";import{bn as $e,eP as K,cP as ue,bt as me,pW as Y,KC as B,LD as pe,LE as Q,L0 as he,jR as fe,LF as ge,L5 as J,L6 as X,kG as Se,HC as Z,Kw as x,jL as Te,jJ as ye,jV as He,LG as Me,LH as We,tU as z,jQ as ve,GU as Ee,cU as qe,cV as Ke,LI as Ye,Kv as Qe,LJ as Je,tY as Xe,LK as Ze,LL as ea,LM as aa,LN as ta,LO as na,jU as oa,LP as sa,LQ as ia,Kx as ca,LR as ra,LS as la,LT as da,GO as ua,GC as ma,H4 as pa,jW as ha,HD as ie,GL as fa}from"./zeni-epic-state-BAtVrn2l.js";import{z as De,S as ee,c as L,aN as Ce,h as ga,J as Sa,aO as Ta,F as ya,p as W,k as va,aP as Ea,r as q,_ as Da,d as be,aQ as Ca,at as ba,a2 as M}from"./index-DAJNLQVj.js";import{n as Ia,S as ka,D as La}from"./mui-6mK3ua6E.js";import{u as Ua}from"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import{d as Ie}from"./decodeURIComponentSafe-FTPGDiF3.js";import{h as ke,g as Aa,e as xa,c as _a}from"./routePaths-zO9L3kzJ.js";import{t as Va}from"./utils-ypIEo-Nu.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]="87fc8941-6884-46b1-8803-61ee9e73a1bf",a._sentryDebugIdIdentifier="sentry-dbid-87fc8941-6884-46b1-8803-61ee9e73a1bf")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Le(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Qa(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>K(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,U=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,y)),C=S(u=>{const R=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return R==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[R]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),v=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[O,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const H=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),w=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?O||v==null||(P(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:w??v}))):(s(J()),s(X()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,O,v,w]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:U,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:A,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:H,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new ya(100,100,58)},wa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(He("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(La,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(Ba,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...b})})})},Ba=Ia(ka)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-miobc7Sv.js";import{h as K,g as q,u as Q,i as W,j as h,N as _,n as X,o as Ye,p as j}from"./core-CRKT-P9H.js";import{eP as U,pB as ee,j3 as p,O_ as te,Ht as De,bq as le,O$ as be,jG as ae,L2 as ne,P0 as ue,P1 as ve,bE as P,Hp as ye,P2 as Ee,P3 as me,P4 as je,Hq as Ae,P5 as xe,P6 as pe,P7 as Me,P8 as ge,P9 as Le,Pa as Fe,Pb as fe,IG as Be,bn as Ce}from"./zeni-epic-state-D0PtTcHw.js";import{D as de,S as Z,c as w,d as G,cc as ce,r as H,p as oe,W as Oe,z as ze}from"./index-gAT2H-DG.js";import"./mui-CQ7Fxeyv.js";import{a as S}from"./sentry-CvLHinWf.js";import{w as se}from"./withTransactionSidePanel-JbamN0h4.js";import{p as ie,c as re}from"./routePaths-CxKh9IOJ.js";import{u as Ge}from"./utils-Z3-4e1nL.js";import{d as b}from"./decodeURIComponentSafe-DKky7rAf.js";import{Z as _e}from"./ZeniAccountStatementScreen-z9nXn9uu.js";import"./recharts-B0ZRuCwu.js";import"./analytics-BZlEN5ux.js";import"./plaid-BWmPv-jI.js";import"./dnd-Bp--Dca2.js";import"./stripe-DMRn4zHo.js";import"./lottie-D1DHiqdt.js";import"./lexical-B4tkPJ0_.js";import"./pdf-ez8vj5Rk.js";import"./useAskAiCfoHostNavButtonProps-Bj6YjlZM.js";import"./TransactionDetailScreen-1j5GITNM.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]="79d58841-b273-4882-b2c1-062cbb7f2a66",a._sentryDebugIdIdentifier="sentry-dbid-79d58841-b273-4882-b2c1-062cbb7f2a66")}catch{}})();const we=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ge(a),Re=X(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(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=J(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:J(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=K(),t=q(),n=Q(),c=t.pathname.split("/").find(r=>we.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=Z(),{isFeatureEnabled:k}=g(w.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[B,E]=S.useState(!1),[C,O]=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,F]);S.useEffect(()=>{if(!B&&T!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,T.title);const r=J(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(_,{to:"../"}):s.jsx(Re,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(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},Je=X(function(a,e){const t=Ee(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)}`),G.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=H(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),He=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(w.isProjectsTransactionsEnabled),R=h(d=>ee(d))&&r;let i;const z=qe(f,g,k,D,y,A,x);if(z){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},$=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Je,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(_,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ze=X(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)}`),G.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=H(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),Ke=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(w.isProjectsTransactionsEnabled),R=h(d=>ee(d))&&r;let i;const z=Qe(f,g,k,D,y,A,x);if(z){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},$=We(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ze,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(_,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(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=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(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)}`),G.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=H(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=W(),f=b(l??""),g=b(u??""),k=b(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(Y=>Me(Y.transactionListState,g,f)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(Y=>U(Y)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=et(f,g,m,D,y,k);if(R){const Y={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},Pe=tt(F?.dateRange,Y);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=Z(),{isFeatureEnabled:L}=z(w.isTransactionCommentingEnabled),{isFeatureEnabled:V}=z(w.isProjectsTransactionsEnabled),d=h(Y=>ee(Y))&&V,{areTenantIdsInSync:$}=Oe();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),G.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(Y=>Y!=null);return R&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>C(Y),...e}):s.jsx(_,{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")&&P(n,"YYYY-MM-DD").isValid()&&P(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 Pt(){const a=q().state?.referrer,e=ze.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Z(),{isFeatureEnabled:c}=n(w.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(w.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(Ye,{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(_e,{})}),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(_,{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(_,{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(_,{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(He,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{Pt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-DnYW4p-1.js";import{h as K,g as q,u as Q,i as W,j as h,N as _,n as X,o as Ye,p as j}from"./core-BQFH-fG_.js";import{eP as U,pB as ee,j3 as p,O_ as te,Ht as De,bq as le,O$ as be,jG as ae,L2 as ne,P0 as ue,P1 as ve,bE as P,Hp as ye,P2 as Ee,P3 as me,P4 as je,Hq as Ae,P5 as xe,P6 as pe,P7 as Me,P8 as ge,P9 as Le,Pa as Fe,Pb as fe,IG as Be,bn as Ce}from"./zeni-epic-state-BAtVrn2l.js";import{D as de,S as Z,c as w,d as G,cc as ce,r as H,p as oe,W as Oe,z as ze}from"./index-DAJNLQVj.js";import"./mui-6mK3ua6E.js";import{a as S}from"./sentry-DaKeBrSN.js";import{w as se}from"./withTransactionSidePanel-Ci9yGR5x.js";import{p as ie,c as re}from"./routePaths-zO9L3kzJ.js";import{u as Ge}from"./utils-ypIEo-Nu.js";import{d as b}from"./decodeURIComponentSafe-FTPGDiF3.js";import{Z as _e}from"./ZeniAccountStatementScreen-qp3Z3vYC.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import"./TransactionDetailScreen-DaprpGui.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]="79d58841-b273-4882-b2c1-062cbb7f2a66",a._sentryDebugIdIdentifier="sentry-dbid-79d58841-b273-4882-b2c1-062cbb7f2a66")}catch{}})();const we=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Ge(a),Re=X(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(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=J(e.selectedAccount.tranListType),u=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:J(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}})(ce),N=se(function({...a}){const e=K(),t=q(),n=Q(),c=t.pathname.split("/").find(r=>we.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=Z(),{isFeatureEnabled:k}=g(w.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:v}=Ve(o,f,I.bookCloseDate),[B,E]=S.useState(!1),[C,O]=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,F]);S.useEffect(()=>{if(!B&&T!=null){E(!0),G.trackTransactionList(void 0,void 0,void 0,T.title);const r=J(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(_,{to:"../"}):s.jsx(Re,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(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},Je=X(function(a,e){const t=Ee(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)}`),G.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=H(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),He=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>ve(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(w.isProjectsTransactionsEnabled),R=h(d=>ee(d))&&r;let i;const z=qe(f,g,k,D,y,A,x);if(z){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},$=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Je,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(_,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ze=X(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)}`),G.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=H(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),Ke=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(w.isProjectsTransactionsEnabled),R=h(d=>ee(d))&&r;let i;const z=Qe(f,g,k,D,y,A,x);if(z){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},$=We(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{v||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ze,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:R,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>C(d),...e}):s.jsx(_,{to:he(V.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(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=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(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)}`),G.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=H(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=H(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=q(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=W(),f=b(l??""),g=b(u??""),k=b(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(Y=>Me(Y.transactionListState,g,f)),[v,B]=S.useState(!1),[E,C]=S.useState(void 0),O=h(Y=>U(Y)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const R=et(f,g,m,D,y,k);if(R){const Y={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},Pe=tt(F?.dateRange,Y);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:z}=Z(),{isFeatureEnabled:L}=z(w.isTransactionCommentingEnabled),{isFeatureEnabled:V}=z(w.isProjectsTransactionsEnabled),d=h(Y=>ee(Y))&&V,{areTenantIdsInSync:$}=Oe();S.useEffect(()=>{!v&&r!=null&&$&&(B(!0),G.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(Y=>Y!=null);return R&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>C(Y),...e}):s.jsx(_,{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")&&P(n,"YYYY-MM-DD").isValid()&&P(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 Pt(){const a=q().state?.referrer,e=ze.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Z(),{isFeatureEnabled:c}=n(w.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(w.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(Ye,{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(_e,{})}),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(_,{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(_,{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(_,{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(He,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{Pt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DnYW4p-1.js";import{h as B,g as U,u as P,i as M,j as f,N as L,n as N,o as Te,p as k}from"./core-BQFH-fG_.js";import{cm as V,eP as D,NM as R,DS as ae,fh as H,DA as ne,NO as we,DV as Ce,NK as Ie,NL as se,O1 as ke,C0 as be,sP as je,NQ as Ae,E4 as Ee,NN as re,cO as Z,wX as oe,eY as ve,e_ as De,OX as Fe,OY as Le,DB as Be,OZ as Ue,DC as Pe,DL as Re,bt as Oe,bF as Me,cx as Ne,bG as Ve,cl as _e,fg as ze,bs as Ge,Jq as $e,ck as qe}from"./zeni-epic-state-BAtVrn2l.js";import{k as _,aq as He,z as A,x as z,d as b,c5 as Ze,c6 as Je,c7 as q,J,h as We,W as Ke,_ as Xe,S as ie,c as v,F as Ye,B as Qe,c8 as et,at as W,r as tt,c9 as at,p as K,ca as nt,R as Y,cb as st,a9 as rt}from"./index-DAJNLQVj.js";import{D as ot,n as O,S as it}from"./mui-6mK3ua6E.js";import ct from"./NotFoundScreen-B7WJWy8d.js";import{S as Q}from"./SetupPagesScreen-DsWBsj_S.js";import{a as d}from"./sentry-DaKeBrSN.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import{u as ut}from"./useInitialThreadRequest-DdGVicw1.js";import{M as ce}from"./MobileAppDrawer-BOy-szv4.js";import{F as dt}from"./FeaturePreviewScreen-BbqD4Bts.js";import{a as ee}from"./analyticsHelper-DkqHV9MS.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";import"./routePaths-zO9L3kzJ.js";import"./BusinessVerificationPageScreen-B93ovLXv.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]="df7e0d01-b2e0-496e-a9c4-abe6cabe2e39",t._sentryDebugIdIdentifier="sentry-dbid-df7e0d01-b2e0-496e-a9c4-abe6cabe2e39")}catch{}})();const pt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ce(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function mt(){const t=B(),a=U(),n=P(),{tenantEmailDomain:o}=M(),p=_(),r=f(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=V(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,C]=d.useState(!1),[u,c]=d.useState(!1),h=f(I=>D(I)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(I=>R(I,y)),w=f(I=>I.treasurySetupViewState.fetchState),x=f(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(C(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const ft=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(be(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=M(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,C]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ie(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(C(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DnYW4p-1.js";import{a as g}from"./sentry-DaKeBrSN.js";import{h as J,g as Y,i as R,j as S,n as G,u as z,o as at,p as B,N as K}from"./core-BQFH-fG_.js";import{eP as V,Ks as Ee,Kt as Ue,fT as X,cs as be,ct as Ie,vw as St,Ku as nt,vA as zt,Ix as ee,jG as te,vu as Yt,vo as qt,Kv as Ne,vg as Ht,vf as Wt,v9 as Qt,vl as Zt,vB as Xt,Kw as he,Kx as Me,vh as ea,Ky as pe,f3 as ft,vQ as gt,vJ as vt,Kz as xt,os as Tt,vE as yt,vC as Dt,KA as Ct,vX as Et,vU as bt,vF as It,vW as Je,GU as kt,KB as ta,KC as aa,cv as na,KD as sa,KE as oa,KF as me,KG as ie,KH as ke,Iy as Ge,wa as ye,Iw as De,vZ as wt,vx as Ke,KI as la,Iz as H,KJ as $e,vr as ia,KK as ca,KL as da,KM as ze,KN as Ye,KO as qe,KP as He,w4 as we,KQ as At,vN as jt,KR as ra,KS as ua,KT as ha,KU as pa,KV as ma,KW as Sa,KX as fa,KY as ga,s$ as va,t0 as xa,HD as je,KZ as Ta,K_ as ya,j3 as Fe,bq as Da,K$ as Ca,L0 as Ea,kE as ba,kN as Ia,HC as Le,bE as st,L1 as Ft,Hh as Lt,L2 as ka,L3 as wa,L4 as Aa,kP as ja,L5 as ot,L6 as lt,L7 as it,L8 as ct,L9 as Fa,kL as La,La as Pa,kO as _a,Lb as Va,Lc as Pt,HZ as _t,k2 as Ba,Ld as Oa,Le as Pe,Lf as Vt,HX as Bt,yn as Ra,Lg as Ua,Lh as Na,km as Ot,Li as Ma,Lj as Ja,I9 as Ga,qA as Ka,Lk as Rt,Ll as dt,I6 as _e,Lm as rt,Ln as $a,Ib as za,Lo as Ya,Lp as qa,Lq as Ha,Lr as Wa,Ls as Qa,qD as Za,Lt as Xa,IA as en,Lu as tn,HQ as Ve,gP as an,Lv as nn,Lw as sn,gN as on,Lx as ln,Ly as cn,yr as dn,Lz as rn,LA as un,LB as hn,LC as pn,k6 as mn,bn as Sn,e_ as fn,eY as gn}from"./zeni-epic-state-BAtVrn2l.js";import{z as U,aq as Be,B as Ut,x as Q,d as j,a2 as Z,aw as vn,r as M,D as Ce,v as ce,ax as We,ay as xn,az as Tn,p as Qe,aA as yn,h as Dn,J as de,F as Ze,S as ae,c as $,aB as Cn,i as Xe,_ as Se,aC as En,aD as Nt,W as bn,aE as In,k as kn,aF as wn,at as Mt,aG as An,o as W,A as jn,I as Jt,V as Fn,aH as Ln,aI as Pn,f as et,aJ as _n,aK as Vn,m as Bn,aL as On,aM as Rn}from"./index-DAJNLQVj.js";import{n as N,D as Un,S as Gt}from"./mui-6mK3ua6E.js";import{t as Nn,A as Mn}from"./AddressScreen-Dps-w1Sa.js";import le from"./NotFoundScreen-B7WJWy8d.js";import{F as Jn}from"./FeaturePreviewScreen-BbqD4Bts.js";import{c as q,v as tt,d as Gn}from"./routePaths-zO9L3kzJ.js";import{p as Kt}from"./pathToGoBack-CvX5reKt.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import{M as ge}from"./MobileAppDrawer-BOy-szv4.js";import{D as Kn}from"./DrawerScreen-Zl5iUHN2.js";import{g as $n,m as zn}from"./accountMappingHelper-BbUNiO4D.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="ea1b736d-16ea-4dc2-8141-14b14beb5059",e._sentryDebugIdIdentifier="sentry-dbid-ea1b736d-16ea-4dc2-8141-14b14beb5059")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-D5BrTuJe.js → WiseConfirmationScreen-2Lfbesew.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-DnYW4p-1.js";import{a as d}from"./sentry-DaKeBrSN.js";import{s as u,u as h,j as I,N as y}from"./core-BQFH-fG_.js";import{JJ as b,eW as w,zI as j}from"./zeni-epic-state-BAtVrn2l.js";import{z as l,B as x,I as S,V as D}from"./index-DAJNLQVj.js";import{n as c}from"./mui-6mK3ua6E.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.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]="28371ffc-2ac2-4927-92ae-ef609563564b",e._sentryDebugIdIdentifier="sentry-dbid-28371ffc-2ac2-4927-92ae-ef609563564b")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=d.useState(!1),a=h(),s=I(m=>b(m)),r=l.getSignedInUser(),f=l.getSignedInUserTenantWithId(i);if(r==null||f==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,f?.tenantId),d.useEffect(()=>{n||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DnYW4p-1.js";import{h as ne,g as G,u as M,i as Y,j as k,n as K,N as X,o as Ve,p as w}from"./core-BQFH-fG_.js";import{eP as U,OD as Ce,OE as $e,cl as ee,cm as Ne,fg as He,wV as we,B6 as Ze,wP as Tn,OF as On,OG as Bn,wS as Fn,wZ as ge,wM as Rn,wJ as Ln,Np as le,OH as Un,Eq as _n,Kv as zn,Es as Mn,kn as Oe,OI as Vn,qf as We,q3 as Ge,ke as Ye,kh as Be,Kw as Fe,Kx as $n,OJ as Nn,kg as Hn,kD as Zn,k5 as Wn,iE as Gn,iD as Yn,OK as Kn,OL as ye,E7 as qn,OM as Jn,ON as Qn,Ni as ke,OO as Re,OP as Xn,ED as ea,O1 as na,C0 as Ke,sP as qe,OQ as aa,EA as ta,OR as Je,cM as Ae,EH as Qe,fh as oa,eY as Xe,e_ as De,EF as sa,BW as ra,Ex as ia,OS as en,OT as nn,E9 as an,Ej as Le,OU as ca,NR as la,EI as da,bt as ua,bF as pa,cx as ma,bG as fa,bs as ha,Jq as ga}from"./zeni-epic-state-BAtVrn2l.js";import{k as ae,S as N,z as S,c as F,h as _,B as de,bW as ya,a2 as Ie,J as V,F as q,p as tn,aq as xa,af as Ue,d as R,bX as Ca,at as Se,bY as wa,x as ue,bZ as ka,f as be,aN as W,b_ as Aa,W as Da,_ as on,ac as Ia,b$ as _e,c0 as Sa,r as ce,c1 as ba,c2 as Ea,c3 as Pa,a9 as va,o as ja}from"./index-DAJNLQVj.js";import{n as z,D as J,S as Q}from"./mui-6mK3ua6E.js";import ie from"./NotFoundScreen-B7WJWy8d.js";import{S as ze}from"./SetupPagesScreen-DsWBsj_S.js";import{F as sn}from"./FeaturePreviewScreen-BbqD4Bts.js";import{a as d}from"./sentry-DaKeBrSN.js";import{M as pe}from"./MobileAppDrawer-BOy-szv4.js";import{A as Ta,D as Oa,V as Ba}from"./DomesticWireDetailScreen-Dim3H7hW.js";import{A as Fa}from"./AddressScreen-Dps-w1Sa.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-BGvRON95.js";import{Z as Ra}from"./ZeniAccountStatementScreen-qp3Z3vYC.js";import"./recharts-CI0D2Tbj.js";import"./analytics-DAPZ8UkE.js";import"./plaid-qfqRxaag.js";import"./dnd-B3Cb0yFb.js";import"./stripe-DMRn4zHo.js";import"./lottie-BI7v3w73.js";import"./lexical-DynK9JnD.js";import"./pdf-DtE7k_wa.js";import"./utils-ypIEo-Nu.js";import"./analyticsHelper-DkqHV9MS.js";import"./routePaths-zO9L3kzJ.js";import"./BusinessVerificationPageScreen-B93ovLXv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="493a4942-e69e-4a40-af23-367dffb9496f",e._sentryDebugIdIdentifier="sentry-dbid-493a4942-e69e-4a40-af23-367dffb9496f")}catch{}})();const La=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-DnYW4p-1.js";import{a as f}from"./sentry-DaKeBrSN.js";import{h as x,u as j,g as B,i as $,j as p}from"./core-BQFH-fG_.js";import{IG as s,IF as v,OV as C,eP as P,OW as T}from"./zeni-epic-state-BAtVrn2l.js";import{J as z,at as g,h as D,z as E,B as L,c4 as G,p as N}from"./index-DAJNLQVj.js";import{n as _}from"./mui-6mK3ua6E.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]="b5db5a59-376b-4252-ad6f-783ec1b01e0a",e._sentryDebugIdIdentifier="sentry-dbid-b5db5a59-376b-4252-ad6f-783ec1b01e0a")}catch{}})();const U=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./sentry-
|
|
1
|
+
import"./sentry-DaKeBrSN.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
|