@zeniai/web-app-ui 5.3.30-dev → 5.3.31-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-DwZgnpO5.js → AccountMappingScreen-UdzIeE_v.js} +2 -2
- package/dist/assets/AddressRoutes-CaXv_Hc-.js +1 -0
- package/dist/assets/AddressScreen-Dmypz8Cm.js +9 -0
- package/dist/assets/AiCfoScreen-DNghBGiO.js +22 -0
- package/dist/assets/AppDrawer-kOTtyyGv.js +10 -0
- package/dist/assets/{BillPayApprovalRoutes-k9A_OynM.js → BillPayApprovalRoutes--ALQ35-1.js} +1 -1
- package/dist/assets/{BillPayRoutes-DqYiVdlx.js → BillPayRoutes-BcTRlRv8.js} +9 -9
- package/dist/assets/{BusinessVerificationPageScreen-3R_uxb4s.js → BusinessVerificationPageScreen-DzWgqXwG.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-Bi4DWU-D.js → CardsAiCfoScreen-C_lk15md.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-D_J5Jsfo.js → ChargeCardRoutes-BjIdSbvb.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CWgdKqmQ.js → CompanyPassportScreen-BKrZbZ6U.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-I4BlOLSg.js → ConnectionAuthScreen-Dzixugfp.js} +2 -2
- package/dist/assets/CustomerOnboardingAuthScreen-D31TaCjo.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-3cZyVkRN.js +30 -0
- package/dist/assets/{DashboardRoutes-ZMo0onUW.js → DashboardRoutes-BruAIMYU.js} +4 -4
- package/dist/assets/{DefaultTenantHome-BqaVnNI0.js → DefaultTenantHome-BtIFl_77.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-DhMVIfNi.js +18 -0
- package/dist/assets/DrawerScreen-CbY0_Vl5.js +1 -0
- package/dist/assets/EntityDetailRoutes-DpM6LjT5.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-Dll0r-g6.js +25 -0
- package/dist/assets/FeaturePreviewScreen-DRMNz052.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-CaSUfoGO.js +1 -0
- package/dist/assets/{InboxNotificationsProvider-BIRPulc1.js → InboxNotificationsProvider-55rQDTXA.js} +1 -1
- package/dist/assets/InvoicingRoutes-B8ytNofm.js +2 -0
- package/dist/assets/{MagicLinkRoutes-Bnp_x7Nk.js → MagicLinkRoutes-DbYU9yxF.js} +19 -19
- package/dist/assets/MagicLinkSignInScreen-DSGkqzLp.js +12 -0
- package/dist/assets/{MobileAppDrawer-CcN5sT0f.js → MobileAppDrawer-BAV0ejOs.js} +1 -1
- package/dist/assets/NotFoundScreen-ButYFiTG.js +1 -0
- package/dist/assets/NotificationRoutes-jy7KSYzl.js +1 -0
- package/dist/assets/OAuthConsentScreen-4W57tKq2.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-Diz_Rn8O.js +1 -0
- package/dist/assets/PaymentLinkScreen-BcSDg2Q0.js +21 -0
- package/dist/assets/PeopleRoutes-BsxSMUvq.js +22 -0
- package/dist/assets/PerformanceRoutes-DFKVpzlk.js +1 -0
- package/dist/assets/{Preview-ByUhhrY0.js → Preview-DNAybQkC.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-IBpF64YF.js → QBOConnectionScreen-BmXy-56M.js} +1 -1
- package/dist/assets/ReimbursementApprovalRoutes-DW0hPEhv.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DetQk8QU.js → ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C9_awEWz.js → ReimbursementRoutes-BQ18gzav.js} +9 -9
- package/dist/assets/ReportsRoutes-iapNY-Ca.js +1 -0
- package/dist/assets/RewardsRoutes-CO35jNo-.js +1 -0
- package/dist/assets/ScreenRoutes-B2fNAm1R.js +2 -0
- package/dist/assets/{SettingsRoutes-BEdYLTM7.js → SettingsRoutes-DU6XdEOY.js} +6 -6
- package/dist/assets/{SetupPagesScreen-Sjd63M0p.js → SetupPagesScreen-CPUD_j1y.js} +5 -5
- package/dist/assets/SignInScreen-DL2bXt_7.js +1 -0
- package/dist/assets/SignOutScreen-DSAHdKNP.js +9 -0
- package/dist/assets/{TaskListScreen-DdkR5DtM.js → TaskListScreen-BH2rdLa7.js} +2 -2
- package/dist/assets/{TaskRoutes-LOSKO78T.js → TaskRoutes-C-JJtR4s.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-CaIXvpDL.js +1 -0
- package/dist/assets/TransactionDetailScreen-srWo_3sK.js +5 -0
- package/dist/assets/TransactionListRoutes-CpBDr1qT.js +1 -0
- package/dist/assets/TreasuryRoutes-Ja8FQwZH.js +37 -0
- package/dist/assets/VendorsRoutes-CoiOEvIl.js +112 -0
- package/dist/assets/WiseConfirmationScreen-Dj7QUTt6.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BXfvCXHr.js → ZeniAccountRoutes-BjLND6jg.js} +8 -8
- package/dist/assets/ZeniAccountStatementScreen-BgOPM6A3.js +9 -0
- package/dist/assets/{accountMappingHelper-CU6wucuM.js → accountMappingHelper-CAg2qsF3.js} +1 -1
- package/dist/assets/{analytics-BgUj-hR5.js → analytics-CqoRAkB1.js} +1 -1
- package/dist/assets/{analyticsHelper-Cypw_xC0.js → analyticsHelper-Cjtujqyf.js} +1 -1
- package/dist/assets/{core-CMivCywN.js → core-CiFsHd3i.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-DRefzrWS.js → decodeURIComponentSafe-FYjI-TwW.js} +1 -1
- package/dist/assets/{dnd-B8NpvFCU.js → dnd-jcX4BW0a.js} +1 -1
- package/dist/assets/{empty-CllNfDt1.js → empty-4iGv0vIv.js} +1 -1
- package/dist/assets/{empty-CawgNJEF.js → empty-DSab5moc.js} +1 -1
- package/dist/assets/{emptyVideoElement-DBVZ22o5.js → emptyVideoElement-BSwv6rHf.js} +1 -1
- package/dist/assets/{epic-Cw47VvOB.js → epic-CjiXGW6W.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-BuTA7ucx.js → expenseAutomationHelper-R2jHKv-Z.js} +1 -1
- package/dist/assets/getLocaleForTenant-CRduVQsY.js +1 -0
- package/dist/assets/{index-DCnLtCHg.js → index-0sENwUb_.js} +1 -1
- package/dist/assets/{index-BnHTUbKj.js → index-2FqIUc6q.js} +1 -1
- package/dist/assets/{index-CD-EymjZ.js → index-BJOxGHxN.js} +2 -2
- package/dist/assets/{index-baDCTZK3.js → index-CVbu1_bp.js} +1 -1
- package/dist/assets/{index-Cx55eHdr.js → index-Cz99TrBA.js} +1 -1
- package/dist/assets/{index-XoGDegrx.js → index-D6dzsKZ7.js} +1 -1
- package/dist/assets/{index-Djuwyi3d.js → index-DGRhh-da.js} +1 -1
- package/dist/assets/{index-DlMGj3Af.js → index-juRht-9c.js} +11171 -11173
- package/dist/assets/{lexical-Di6ZXkXF.js → lexical-DBiumTDC.js} +1 -1
- package/dist/assets/{liveblocks-mJJR3MsR.js → liveblocks-CkQ2CY6T.js} +1 -1
- package/dist/assets/{lottie-BTBtSLCO.js → lottie-cUBeCDOE.js} +1 -1
- package/dist/assets/{mui-C6XtNCo7.js → mui-FQy08n5j.js} +1 -1
- package/dist/assets/{pathToGoBack-DkQc48Fj.js → pathToGoBack-DWIhT07R.js} +1 -1
- package/dist/assets/{pdf-DSDpdkmb.js → pdf-C6cPvWx8.js} +3 -3
- package/dist/assets/{pdf-lib-BbzL8H1t.js → pdf-lib-C9DR7g8H.js} +1 -1
- package/dist/assets/{plaid-l8YRzpBD.js → plaid-Dw5LGskq.js} +1 -1
- package/dist/assets/{pusher-B8Hm6DMT.js → pusher-Bs1ItrSl.js} +1 -1
- package/dist/assets/{react-BeA4fGXX.js → react-B-yGKA4G.js} +1 -1
- package/dist/assets/{react-TfJbQpIh.js → react-BD9-MMqW.js} +1 -1
- package/dist/assets/{react-FrhNEOT3.js → react-BK8OyR5e.js} +1 -1
- package/dist/assets/{react-CFob_XAv.js → react-BzoedhUW.js} +1 -1
- package/dist/assets/{react-hzw_vRmY.js → react-N2ByZQ0u.js} +1 -1
- package/dist/assets/{react-CexHjl19.js → react-Rj21KKGh.js} +1 -1
- package/dist/assets/{recharts-Co0_Dmc-.js → recharts-CYbL6OhC.js} +1 -1
- package/dist/assets/routePaths-DqksJ4i_.js +1 -0
- package/dist/assets/{sentry-CItQHKpv.js → sentry-Lj2WEO6K.js} +1 -1
- package/dist/assets/{url-MmuF1WQx.js → url-Bk85P8pL.js} +1 -1
- package/dist/assets/{url-xQ9KNY2e.js → url-DhKb0GNI.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-B3XyU0Fo.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-Dhoa0fnv.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-YQlWLN09.js +1 -0
- package/dist/assets/{useDeviceId-DJLfe-br.js → useDeviceId-CWOFj37E.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-DpIv7GW3.js +1 -0
- package/dist/assets/useInitialThreadRequest-D-SxLs4P.js +1 -0
- package/dist/assets/{useTaskManagerAccess-B7jKkFFv.js → useTaskManagerAccess-BrCmQLIc.js} +1 -1
- package/dist/assets/{utils-macSqF2O.js → utils-DsJsAXTJ.js} +1 -1
- package/dist/assets/withTransactionSidePanel-BjLmCRfl.js +25 -0
- package/dist/assets/{zeni-epic-state-CqKBThJ0.js → zeni-epic-state-BdFiPfcm.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-C62kNpv6.js +0 -1
- package/dist/assets/AddressScreen-CLiV0mfm.js +0 -9
- package/dist/assets/AiCfoScreen-CqZYbNVQ.js +0 -22
- package/dist/assets/AppDrawer-BIggl_eh.js +0 -10
- package/dist/assets/CustomerOnboardingAuthScreen-B0zqTC0c.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-DD4F_qvN.js +0 -30
- package/dist/assets/DomesticWireDetailScreen-DQgaUF67.js +0 -18
- package/dist/assets/DrawerScreen-C6V6LURt.js +0 -1
- package/dist/assets/EntityDetailRoutes-Dm568mMt.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-B1Pq1A36.js +0 -38
- package/dist/assets/FeaturePreviewScreen-B_aYJlol.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-ClpdRb8W.js +0 -1
- package/dist/assets/InvoicingRoutes-CBGWefo8.js +0 -2
- package/dist/assets/MagicLinkSignInScreen-D-6FJGXy.js +0 -12
- package/dist/assets/NotFoundScreen-fxNT7vgC.js +0 -1
- package/dist/assets/NotificationRoutes-BJVwBy9d.js +0 -1
- package/dist/assets/OAuthConsentScreen-DOVfptZ6.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CGhv0VSW.js +0 -1
- package/dist/assets/PaymentLinkScreen-Ci5gr6F7.js +0 -21
- package/dist/assets/PeopleRoutes-Bee6xNme.js +0 -22
- package/dist/assets/PerformanceRoutes-CD6W5bUU.js +0 -1
- package/dist/assets/ReimbursementApprovalRoutes-B5KvxgyI.js +0 -1
- package/dist/assets/ReportsRoutes-zo7ew2ho.js +0 -1
- package/dist/assets/RewardsRoutes-sTKxe2ug.js +0 -1
- package/dist/assets/ScheduleDetailsPrepaidExpensesScreen-CrWn6EEs.js +0 -25
- package/dist/assets/ScreenRoutes-DIYlkgqr.js +0 -2
- package/dist/assets/SignInScreen-_27hdB-U.js +0 -1
- package/dist/assets/SignOutScreen-CDr6KmEf.js +0 -9
- package/dist/assets/TransactionDetailRoutes-PwaQuAlN.js +0 -1
- package/dist/assets/TransactionDetailScreen-BlnM6_t9.js +0 -5
- package/dist/assets/TransactionListRoutes-Bx3VnAdU.js +0 -1
- package/dist/assets/TreasuryRoutes-BEdtvJnK.js +0 -37
- package/dist/assets/VendorsRoutes-DoXAtF5W.js +0 -88
- package/dist/assets/WiseConfirmationScreen-CVwWngtr.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-C3siKg2V.js +0 -9
- package/dist/assets/getLocaleForTenant-DCXbCJAu.js +0 -1
- package/dist/assets/routePaths-Bpj3i3MK.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CBJFyF6T.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-eZEppiJu.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-D3l-sj94.js +0 -1
- package/dist/assets/useEmailConnectResultRefresh-DlmntN_b.js +0 -1
- package/dist/assets/useInitialThreadRequest-DBDsuRGA.js +0 -1
- package/dist/assets/withTransactionSidePanel-DMpmT4ot.js +0 -25
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-fxNT7vgC.js","assets/sentry-CItQHKpv.js","assets/core-CMivCywN.js","assets/zeni-epic-state-CqKBThJ0.js","assets/index-DlMGj3Af.js","assets/mui-C6XtNCo7.js","assets/analytics-BgUj-hR5.js","assets/utils-macSqF2O.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-ZMo0onUW.js","assets/withTransactionSidePanel-DMpmT4ot.js","assets/useAskAiCfoHostNavButtonProps-eZEppiJu.js","assets/TransactionDetailScreen-BlnM6_t9.js","assets/decodeURIComponentSafe-DRefzrWS.js","assets/useInitialThreadRequest-DBDsuRGA.js","assets/routePaths-Bpj3i3MK.js","assets/expenseAutomationHelper-BuTA7ucx.js","assets/analyticsHelper-Cypw_xC0.js","assets/CompanyPassportScreen-CWgdKqmQ.js","assets/MobileAppDrawer-CcN5sT0f.js","assets/InboxNotificationsProvider-BIRPulc1.js","assets/useTaskManagerAccess-B7jKkFFv.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CBJFyF6T.js","assets/FeaturePreviewScreen-B_aYJlol.js","assets/BillPayRoutes-DqYiVdlx.js","assets/AddressScreen-CLiV0mfm.js","assets/DomesticWireDetailScreen-DQgaUF67.js","assets/BusinessVerificationPageScreen-3R_uxb4s.js","assets/DrawerScreen-C6V6LURt.js","assets/SetupPagesScreen-Sjd63M0p.js","assets/BillPayApprovalRoutes-k9A_OynM.js","assets/ReimbursementApprovalRuleDetailScreen-DetQk8QU.js","assets/getLocaleForTenant-DCXbCJAu.js","assets/ReimbursementRoutes-C9_awEWz.js","assets/ReimbursementApprovalRoutes-B5KvxgyI.js","assets/TransactionListRoutes-Bx3VnAdU.js","assets/ZeniAccountStatementScreen-C3siKg2V.js","assets/SettingsRoutes-BEdYLTM7.js","assets/AccountMappingScreen-DwZgnpO5.js","assets/QBOConnectionScreen-IBpF64YF.js","assets/empty-CllNfDt1.js","assets/index-baDCTZK3.js","assets/url-xQ9KNY2e.js","assets/index-Cx55eHdr.js","assets/accountMappingHelper-CU6wucuM.js","assets/useEmailConnectResultRefresh-DlmntN_b.js","assets/ReportsRoutes-zo7ew2ho.js","assets/ChargeCardRoutes-D_J5Jsfo.js","assets/useChargeCardPusherEvents-D3l-sj94.js","assets/PeopleRoutes-Bee6xNme.js","assets/ExpenseAutomationRoutes-B1Pq1A36.js","assets/ScheduleDetailsPrepaidExpensesScreen-CrWn6EEs.js","assets/pathToGoBack-DkQc48Fj.js","assets/TreasuryRoutes-BEdtvJnK.js","assets/VendorsRoutes-DoXAtF5W.js","assets/ZeniAccountRoutes-BXfvCXHr.js","assets/AddressRoutes-C62kNpv6.js","assets/PandLWithForecastRoutes-CGhv0VSW.js","assets/CustomerOnboardingRoutes-DD4F_qvN.js","assets/TransactionDetailRoutes-PwaQuAlN.js","assets/EntityDetailRoutes-Dm568mMt.js","assets/InvoicingRoutes-CBGWefo8.js","assets/NotificationRoutes-BJVwBy9d.js","assets/PerformanceRoutes-CD6W5bUU.js","assets/RewardsRoutes-sTKxe2ug.js","assets/TaskRoutes-LOSKO78T.js","assets/TaskListScreen-DdkR5DtM.js","assets/AiCfoScreen-CqZYbNVQ.js","assets/CardsAiCfoScreen-Bi4DWU-D.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s,bn as ms,fB as _s,dV as Es,dU as hs,Aj as ps,de as gs,c7 as xs,gG as Rs,g5 as Is,db as pe,cF as js,gj as Ts,cx as As,bE as bs,br as ys,Ts as fs,v as Ds,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as Us,bt as ws,ct as Fs,Tx as Ls,Ty as Vs,d6 as Hs,d9 as ks,d8 as Bs,cE as Ss,cL as Ns,pO as ge,ge as xe,gV as Ms,gg as Re,gI as Ie,gJ as je,gh as Zs}from"./zeni-epic-state-CqKBThJ0.js";import{j as e}from"./liveblocks-mJJR3MsR.js";import{a as U}from"./sentry-CItQHKpv.js";import{N as u,u as Gs,h as $s,i as zs,g as qs,j as $,q as Te,n as Js,o as t}from"./core-CMivCywN.js";import{H as l,E as Ys,u as Ws,z as f,O as Ks,d as Qs,n as Xs,y as M,f as en,I as sn,J as nn,L as F,G as Ae,t as _,P as tn,M as an,h as ne}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import{f as be}from"./analyticsHelper-Cypw_xC0.js";import{t as on}from"./getLocaleForTenant-DCXbCJAu.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="3bd374ef-3531-4036-9817-ccc33695b74e",a._sentryDebugIdIdentifier="sentry-dbid-3bd374ef-3531-4036-9817-ccc33695b74e")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-fxNT7vgC.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(fe,{tenantEmailDomain:v});if(i)return e.jsx(ye,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(fe,{tenantEmailDomain:v}):i?e.jsx(ye,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):B?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-ZMo0onUW.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-DqYiVdlx.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-C9_awEWz.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Bx3VnAdU.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-BEdYLTM7.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-zo7ew2ho.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-D_J5Jsfo.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-Bee6xNme.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-B1Pq1A36.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BEdtvJnK.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-DoXAtF5W.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BXfvCXHr.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-zo7ew2ho.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-C62kNpv6.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),En=l((()=>s((()=>import("./PeopleRoutes-Bee6xNme.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),hn=l((()=>s((()=>import("./PandLWithForecastRoutes-CGhv0VSW.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-DD4F_qvN.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-DoXAtF5W.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-PwaQuAlN.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-Dm568mMt.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-ZMo0onUW.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-DqYiVdlx.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),In=l((()=>s((()=>import("./SettingsRoutes-BEdYLTM7.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),jn=l((()=>s((()=>import("./InvoicingRoutes-CBGWefo8.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-C9_awEWz.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-BXfvCXHr.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-BEdtvJnK.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),bn=l((()=>s((()=>import("./TransactionListRoutes-Bx3VnAdU.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),yn=l((()=>s((()=>import("./ChargeCardRoutes-D_J5Jsfo.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),fn=l((()=>s((()=>import("./NotificationRoutes-BJVwBy9d.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),Dn=l((()=>s((()=>import("./PerformanceRoutes-CD6W5bUU.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-B1Pq1A36.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-sTKxe2ug.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-LOSKO78T.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-CqZYbNVQ.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-Bi4DWU-D.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-fxNT7vgC.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Un=l((()=>s((()=>import("./TaskListScreen-DdkR5DtM.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),wn=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:H})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return v===!0&&H?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Gs(),B=$s(),{tenantEmailDomain:i}=zs(),V=Ys().mode,{setLoading:O,clearAllLoading:v,clearLoading:H}=Ws(),b=f.getSignedInUserTenant(i)?.tenantId,j=f.getSignedInUser(),W=ms(j),z=qs(),[L,we]=U.useState(!1),r=$((o=>_s(o))),{useFeatureGate:S}=Ks(),Z=Qs(),ae=Xs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?Es(oe,r):void 0,K=p==="Completed"||T==="Completed"?hs(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,He=en(r,Ve,oe),{isCardsHidden:ke}=sn(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),q=$((o=>Rs(o)));if(i!=null){const o=f.getSignedInUserTenant(i);j!=null&&o!=null&&be(j,r,V)}const G={tenantId:b,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),h=nn(),Ge=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=js(h?.loggedInUserRoleMap),X=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=$((o=>G.tenantId!=null?Ts(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const y=o.split("-");if(y.length===2){const d=As(Number(y[0])),n=Number(y[1]),c=bs(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=ys();c.isAfter(N,"month")===!1?A(fs(b,{month:d,year:n})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,j,A,f]),U.useLayoutEffect((()=>{!Ds(ie,G)&&f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n){if(xe(y?.userId,y?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=f.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})(G,j,A,ze))}),[b]),U.useEffect((()=>{f.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,y,d,n,c,N,k){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const J=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(J&&us){k(Re(n));const Y=f.getSignedInUserTenantWithId(n);Y?.tenantEmailDomain!=null&&f.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)))}else J&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),k(Ie(c.userId,n))),J&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),k(je(c.userId,n)));if(J){ne.identify(c.userId,{tenant_id:n});const Y=n==null||n!=null&&(y==="Completed"||y==="Error");o==="Completed"||y!=="Not-Started"&&y!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),k(Zs(c.userId,n,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,j,O,A))}),[b,p]),U.useEffect((()=>{f.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),f.saveSignedInUserTenants(Cs(q.tenantsBaseInOrder)),j!=null&&be(j,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,j]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,y=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),y)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:qe}=S(M.isReferralFeatureEnabled),Je=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ye=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,We=Os(h?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Qe=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(h?.loggedInUserRoleMap),_e=Fe&&!P,Xe=Le&&!P,es=ue&&Us(h?.loggedInUserRoleMap),ss=de&&ws(h?.loggedInUserRoleMap),ns=_e&&Fs(h?.loggedInUserRoleMap),ts=Ls(h?.loggedInUserRoleMap),as=Vs(h?.loggedInUserRoleMap),os=Hs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),is=Bs(h?.loggedInUserRoleMap),g=Ss(h?.loggedInUserRoleMap),x=Ns(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&os,I=Xe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||$e===!0||We===!0||ts===!0||as===!0;return f.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||W&&!X)&&Qe&&Ke!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||X||W?!L||se!==!1||X||W?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Js,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(wn,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:w?e.jsx(Rn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:w?e.jsx(mn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||w?e.jsx(En,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:w?e.jsx(hn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:w&&P===!1||Je||Ye?e.jsx(xn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:w&&P===!1?e.jsx(bn,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(Un,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(Dn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(fn,{})}),e.jsx(t,{path:"vendors/*",element:Ge?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Se?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(yn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:qe?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:Q}):e.jsx(C,{})}),e.jsx(t,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Mn as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-mJJR3MsR.js";import{a as u,R as x,q as A}from"./sentry-CItQHKpv.js";import{u as D,h as z,j as c,g as M,N as O,l as j}from"./core-CMivCywN.js";import{u as B,z as s,E as P,h as w,G as _,N as F,Q as N,R,S as V,T as $,X as v}from"./index-DlMGj3Af.js";import{fB as q,Tb as J,Tv as Q,ge as W,gg as G,TA as H,gR as X,df as K,TB as T,TC as Y,TD as Z,b_ as y}from"./zeni-epic-state-CqKBThJ0.js";import"./mui-C6XtNCo7.js";import{u as ee}from"./useDeviceId-DJLfe-br.js";import{f as te}from"./analyticsHelper-Cypw_xC0.js";import{t as ne}from"./getLocaleForTenant-DCXbCJAu.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.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]="d969f2dd-c52f-49bf-913d-4151c54191c4",t._sentryDebugIdIdentifier="sentry-dbid-d969f2dd-c52f-49bf-913d-4151c54191c4")}catch{}})();const ie=j((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:y(l),sourceUri:y(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(T())}}}))($),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=B(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=c((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:b,accountUnlockTime:L}=c((e=>e.tenantState)),p=c((e=>e.tenantState.fetchState)),k=c((e=>e.tenantState.activeTenantFetchState.fetchState)),S=c((e=>e.tenantState.signInState)),o=c((e=>e.tenantState.loggedInUser)),r=c((e=>q(e))),I=c((e=>J(e))),m=M(),E=P().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[h.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Q(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),X().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",K(r.productSettings))}),2e3))}),[S,p,k,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),b===!0&&L!=null?f.jsx(R,{onClose:()=>i(T()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-mJJR3MsR.js";import{a as i}from"./sentry-CItQHKpv.js";import{u as l,g as f,N as u}from"./core-CMivCywN.js";import{z as n,h as a,Q as m,a7 as p}from"./index-DlMGj3Af.js";import{gU as g,TR as b}from"./zeni-epic-state-CqKBThJ0.js";import{n as y}from"./mui-C6XtNCo7.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.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]="613904de-7deb-416e-b7c2-e1cb93322e3c",e._sentryDebugIdIdentifier="sentry-dbid-613904de-7deb-416e-b7c2-e1cb93322e3c")}catch{}})();function L(){const e=l(),t=f(),r=i.useRef(!1),c=n.isSignedIn(),o=t.state?.message==="logout"||c;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;export{L as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-mJJR3MsR.js";import i from"./NotFoundScreen-fxNT7vgC.js";import{T as r}from"./TransactionDetailScreen-BlnM6_t9.js";import"./sentry-CItQHKpv.js";import{n as d,o}from"./core-CMivCywN.js";import"./zeni-epic-state-CqKBThJ0.js";import"./recharts-Co0_Dmc-.js";import"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.js";import"./useAskAiCfoHostNavButtonProps-eZEppiJu.js";import"./decodeURIComponentSafe-DRefzrWS.js";import"./useInitialThreadRequest-DBDsuRGA.js";import"./routePaths-Bpj3i3MK.js";import"./expenseAutomationHelper-BuTA7ucx.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]="07c2895c-270d-414b-a4ec-49ceb0cdd05a",e._sentryDebugIdIdentifier="sentry-dbid-07c2895c-270d-414b-a4ec-49ceb0cdd05a")}catch{}})();function z(){return t.jsxs(d,{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{z as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-mJJR3MsR.js";import{a as i}from"./sentry-CItQHKpv.js";import{u as z,k as ot,j as g,s as ge,g as De,h as Ce,i as Ae,N as st,l as ct}from"./core-CMivCywN.js";import{pr as Ie,fB as Z,gS as it,TX as rt,ox as lt,o7 as dt,CX as se,bn as ut,db as we,bq as _e,sd as H,V1 as Q,W9 as Re,Wa as le,Vr as Pe,m6 as Fe,Wb as xe,Vw as de,Vx as ue,mX as Ue,Rt as me,W5 as G,m0 as Oe,l_ as Le,ma as mt,pe as pt,Wc as ft,Wd as ht,CO as J,m5 as Ve,QO as Be,cl as St,dh as yt,We as Tt,W4 as bt,Wf as gt,Wg as It,Wh as kt,Wi as vt,CK as Et,Wj as Dt,Wk as Ct,Wl as At,Wm as wt,Wn as _t,m9 as Rt,Wo as Pt,Wp as Ft,W6 as xt,Wq as Ut,Wr as Ot,Ws as Lt,QI as Vt,Qy as Bt,QX as Nt,mb as Wt,Ru as ke,pj as zt}from"./zeni-epic-state-CqKBThJ0.js";import{O as X,y as _,h as $,b2 as jt,z as Ne,E as Mt,a1 as Gt,b3 as $t,ab as qt,a4 as ce,J as Ht,b4 as Qt,p as ie,as as Xt,b5 as Yt,b6 as Jt,b7 as Kt,ae as Zt,av as oe}from"./index-DlMGj3Af.js";import{n as en,S as tn,D as nn}from"./mui-C6XtNCo7.js";import{u as an}from"./useAskAiCfoHostNavButtonProps-eZEppiJu.js";import{d as We}from"./decodeURIComponentSafe-DRefzrWS.js";import{u as on}from"./useInitialThreadRequest-DBDsuRGA.js";import{h as ze,c as je,g as sn,e as cn}from"./routePaths-Bpj3i3MK.js";import{u as rn}from"./expenseAutomationHelper-BuTA7ucx.js";import{v as ln}from"./utils-macSqF2O.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d344edbf-efb2-4dce-9f9e-b71673e34dd0",t._sentryDebugIdIdentifier="sentry-dbid-d344edbf-efb2-4dce-9f9e-b71673e34dd0")}catch{}})();function dn(t=!0){const e=z(),o=ot(),{useFeatureGate:n}=X(),{isFeatureEnabled:a}=n(_.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!t||a!==!0)return;const s=c=>{const u=o.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return u!=="In-Progress"&&u!=="Completed"};s("transferEntryEligible")&&e(Ie({kind:"transferEntryEligible"})),s("creditCardOnlyEligible")&&e(Ie({kind:"creditCardOnlyEligible"}))}),[t,a,e,o])}function un(t,e){const o=(function(){const u=z(),[h,y]=i.useState(!1),[p,d]=i.useState(null),[r,f]=i.useState(null),{useDynamicConfig:k}=X(),{configValue:D,isDynamicConfigLoading:T}=k("transaction_categorization_config"),b=!T&&D?.capitalization_enabled===!0,v=g((I=>Z(I))),A=v.companyId,j=g((I=>it(I.companyState,v.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:x,capitalizableAccountOverrides:U,dismissedAccounts:R}=g((I=>{const S=I.tenantState.currentTenantId,w=S!=null?I.tenantState.tenantsById[S]:void 0;return{capitalizableAccounts:w?.capitalizableAccounts??null,capitalizableAccountOverrides:w?.capitalizableAccountOverrides??null,dismissedAccounts:w?.capitalizationOnboardingDismissedAccounts??null}}),ge),O=i.useRef(x);O.current=x;const P=i.useRef(U);P.current=U;const L=i.useRef(R);L.current=R;const V=g((I=>rt(I.accountState)),ge),M=i.useMemo((()=>{const I={};for(const S of V)S.accountId!=null&&S.accountName!=null&&(I[S.accountId]=S.accountName);return I}),[V]),q=r!=null?M[r]??null:null,B=i.useCallback((I=>{if(!b)return;const S=O.current;if(S==null)return;const w=S.accounts??[],Y=new Set(I),ee=P.current??{},te=L.current;for(const N of w)if(Y.has(N.accountId)&&ee[N.accountId]==null&&te?.[N.accountId]==null)return d(N.classificationType),f(N.accountId),void y(!0)}),[b]),E=i.useCallback(((I,S)=>{u(lt(A,I,S,!0)),y(!1),d(null),f(null)}),[u,A]),l=i.useCallback((()=>{r!=null&&(u(dt(A,r)),y(!1),d(null),f(null))}),[u,A,r]);return{showPopup:h&&b,popupType:p,popupAccountId:r,popupAccountName:q,currencySymbol:j,checkAndShowPopup:B,handleSubmit:E,handleDismiss:l}})(),n=i.useRef(void 0),a=i.useRef([]),s=i.useRef(o.checkAndShowPopup);s.current=o.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{t==="In-Progress"&&(a.current=c.current()),t==="Completed"&&n.current==="In-Progress"&&a.current.length>0&&(s.current(a.current),a.current=[]),n.current=t}),[t]),o}const W=new Map,ve=(t,e,o)=>`${t}|${e??""}|${o}`,K=(t,e)=>({recommendationFor:t.dimension,recommendationSetId:null,selectedSource:t.matchedSource,selectedRank:t.matchedRank,topPickSource:t.topPickSource,numberOfRecommendations:t.shownRecommendations.length,transactionId:e,lineId:t.lineId??null}),re=(t,e,o)=>({transactionId:e,lineId:t.lineId,dimension:t.dimension,outcome:t.outcome,selected:{name:t.selected.name,id:t.selected.id},matchedSource:t.matchedSource,matchedRank:t.matchedRank,topPickSource:t.topPickSource,shownRecommendations:t.shownRecommendations.map((n=>({source:n.source,rank:n.rank,value:{name:n.name,id:n.id},confidence:n.confidencePercentage!=null?n.confidencePercentage/100:void 0}))),...o}),Me=(t,e,o)=>{$.trackRecommendationFeedbackRetracted(K(e,o)),t(se(re(e,o,{outcome:"retracted"})))},Un=(t,e)=>{const o=new Set(e.map(String));W.forEach(((n,a)=>{o.has(n.transactionId)&&(W.delete(a),Me(t,n.feedback,n.transactionId))}))},On=t=>{const e=new Set(t.map(String));W.forEach(((o,n)=>{e.has(o.transactionId)&&W.delete(n)}))};function mn(t){const e=z(),[o,n]=i.useState(null),{isEnabled:a,fallbackTransactionId:s}=t,c=i.useCallback((p=>p.transactionId??s??""),[s]),u=i.useCallback((p=>{if(!a)return;const d=c(p);if(d==="")return;if(p.outcome!=="accepted")return void n(p);((f,k,D,T)=>{const b=ve(k,D,T),v=W.get(b);return v!=null&&(W.delete(b),Me(f,v.feedback,v.transactionId),!0)})(e,d,p.lineId,p.dimension)||(((f,k)=>{$.trackRecommendationAccepted({...K(f,k),recommendationConfidencePercentage:f.shownRecommendations[0]?.confidencePercentage??null})})(p,d),e(se(re(p,d,{}))))}),[a,c,e]),h=i.useCallback((p=>{if(o==null)return;const d=c(o);((r,f,k)=>{$.trackRecommendationFeedbackSubmitted({...K(r,f),feedbackOutcome:r.outcome,feedbackReasonLength:k,isNewEntitySelected:!1})})(o,d,p.length),e(se(re(o,d,{reasonText:p,skipped:!1}))),((r,f)=>{W.set(ve(f,r.lineId,r.dimension),{feedback:r,transactionId:f})})(o,d),n(null)}),[o,c,e]),y=i.useCallback((()=>{var p,d;o!=null&&(p=o,d=c(o),$.trackRecommendationFeedbackSkipped({...K(p,d),feedbackOutcome:p.outcome,isNewEntitySelected:!1}),n(null))}),[o,c]);return{onRecommendationSelection:u,popup:o!=null?C.jsx(jt,{feedback:o,onSubmit:h,onSkip:y}):null}}const pe=()=>{const t=Ne.getSignedInUser(),{useFeatureGate:e}=X(),{isFeatureEnabled:o}=e(_.isChainOfThoughtEnabled);return i.useMemo((()=>ut(t)&&o),[t,o])};function Ge(t){if(t!=null){if("customer"in t&&t.customer!=null){const{customer:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in t&&t.vendor!=null){const{vendor:e}=t;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ln(t,e){const o=z(),{useFeatureGate:n}=X(),a=g((l=>Z(l))),s=a.userRole.includes("charge_card_user")||a.userRole.includes("charge_card_admin"),c=a.userRole!=null&&we(a.userRole),u=a.userRole!=null&&_e(a.userRole),{isFeatureEnabled:h}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:y}=n(_.isExpenseAutomationEnabled),p=pe(),d=i.useMemo((()=>({id:t,type:H(e)})),[t,e]),r=g((l=>Q(l,d))),f=r?.transactionDetailUpdateStatus?.fetchState,k=r?.transactionDetailLocalData?.lineItemById,D=g((l=>{const I=Q(l,d)?.transactionDetailLocalData.vendorUpdates?.id;return I==null?"Not-Started":l.transactionVendorViewState.editVendorStateById[I]?.saveStatus.fetchState??"Not-Started"})),T=i.useMemo((()=>r?.fetchState==="Completed"?Ge(r?.transaction):void 0),[r?.fetchState,r?.transaction]),b=g((l=>{if(T!=null)return Re(l.customerIncomeState,l.vendorExpenseState,l.trendState,T,"month")})),v=g((l=>le(l))),A=g((l=>{if(T!=null)return Pe(l.trendWithTransactionsState,T,"TransactionDetail")})),j=a.company?.companyInfo.firstMonthOfFY??1,x=g((l=>Fe(l.accountState,l.accountListState,"accountList"))),[U,R]=i.useState(!1),[O,P]=i.useState(!1),[L,V]=i.useState(!1);i.useEffect((()=>{R(!1),P(!1),V(!1)}),[t,e]);const M=i.useCallback((()=>{R(!1),P(!1)}),[]),[q,B]=i.useState(!1),E=A?.selectedPeriod?.timePeriod;return i.useEffect((()=>{L||r==null||r.transaction==null||(o(xe({id:r.transaction.id,type:r.transaction.type})),V(!0)),T!=null&&(!s||c&&u===!1)&&(U?O||b==null||(P(!0),o(me(T,"TransactionDetail",{timeframe:"month",timePeriod:E??b}))):(o(de()),o(ue()),R(!0),o(Ue(T))))}),[o,L,r?.fetchState,r?.transaction,T,s,c,u,U,O,b,E]),i.useEffect((()=>{v.newVendorState?.vendorDetailLocalData?.vendorName!=null?B(!0):B(!1)}),[v.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{o(G("common"))}),[o]),{currentTenant:a,loggedInUserHasCardUserOrAdminRole:s,isUserHasDashboardAccess:c,isUserHasInvestorOrBankerAccess:u,isVendorBulkUpdateOnTransactionEnabled:h,isExpenseAutomationEnabled:y,isChainOfThoughtEnabled:p,selectedTransaction:d,transactionDetail:r,rawDetailSaveStatus:f,rawDetailLineItemById:k,vendorSaveStatus:D,tranEntity:T,defaultTrendTransactionTimePeriod:b,vendorViewDetails:v,uiState:A,firstMonthOfFY:j,uncategorizedAccounts:x,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:q,setIsCreateVendorDrawerOpen:B}}const pn={overlayWidth:new qt(100,100,58)},fn=({isOpen:t,onSaveVendor:e,onSaveSuccess:o,onCancel:n,vendorViewDetails:a})=>{const s=Mt(),c=Gt(),u=z(),h=g((d=>le(d))),y=()=>{n()},p={vendorDetailView:a??h,onSaveSuccess:()=>{u(Le()),u(mt("Not-Started")),o()},onSaveVendor:e,onCancelClick:y,saveVendorDetailLocalData:d=>{u(Oe({vendorId:void 0,localData:d}))}};return C.jsx(nn,{anchor:"right",open:t,PaperProps:{style:{width:pn.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.4,cursor:"pointer"}}},onClose:y,children:C.jsx(hn,{onClick:d=>d.stopPropagation(),children:C.jsx($t,{...p})})})},hn=en(tn)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`;function Sn(t,e){t(pt({transactionId:e.transactionId,creditAccountIntegrationId:e.creditAccountIntegrationId,debitAccountIntegrationId:e.debitAccountIntegrationId,memo:e.memo,transactionType:H(e.transactionType),sourceTransactionType:H(e.sourceTransactionType)}))}function yn({currentTransactionId:t,enabled:e=!0,buildPath:o,beforeNavigate:n,navigate:a,navigateState:s}){const c=g((h=>h.createTransferEntryState.lastTransferEntryReplacement)),u=i.useRef(null);i.useEffect((()=>{if(!e||c==null||t==null||u.current===c)return;const{previousTransactionId:h,newTransactionId:y}=c;t.id===h.id&&t.type===h.type&&(u.current=c,n?.(),a(o(y),{replace:!0,state:s}))}),[e,c,t,o,n,a,s])}const Tn=({closeDrawerHandler:t,overrideTransactionId:e,overrideTransactionType:o})=>{const n=De(),a=Ce(),s=z(),c=pe(),{transactionTypeEncoded:u,transactionId:h}=Ae(),y=e??h,p=o??We(u??"");let d;ze(y,p)&&(d={id:y,type:H(p)});const r=d!=null?g((k=>Q(k,d))):void 0,f=()=>{const k=ce(n.state?.pathnameStackToGoBack),D=k.poppedPathname??((T=2)=>{let b="../";for(let v=0;v<T;v++)b=`${b}../`;return b})(1);a(D,{state:{pathnameStackToGoBack:k.newStack}})};return{transactionId:d,onSaveVendor:()=>{s(Ve(d,void 0))},onSaveSuccess:()=>{if(r!=null&&r?.transaction&&r?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&r?.transactionDetailLocalData.vendorUpdates?.id!=null){const k=r?.transactionDetailLocalData.vendorUpdates,D={id:r?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:r?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:k?.name,qboId:r?.transactionDetailLocalData.vendorUpdates?.qboId??""},T={transactionId:{id:r?.transaction?.id,type:r?.transaction?.type},transaction:r?.transaction,lineIds:r?.transaction?.lines?.map((b=>b.id))??[]};s(J({entity:D,amount:r?.transaction?.amount.amount,transactionDetails:T,flowType:"detail",isFetchCOT:c}))}f()},onCancel:()=>{d!=null&&s(ft({transactionId:d})),s(Le()),s(ht()),t(!0),f()}}},bn=ct((function(t,e){const o=Q(t,e.selectedTransaction);let n;o==null&&console.warn("Check if the you've selected the transaction before getting the details");const a=Ne.getSignedInUser(),s=t.tenantState.currentTenantId,c={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:s??""};o!=null&&o.fetchState==="Completed"&&o.transaction!=null&&e.entity!=null&&(n=Tt(t,e.entity,"TransactionDetail"));const u=t.entityAutoCompleteState.autoCompleteText.common,h=bt(t,"common"),y=Z(t);return{transactionDetail:o,transactionAttachmentEndpointToDownload:`${oe}/transaction_attachment`,transactionAttachmentsEndpointToFetch:y.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${oe}/transaction_attachments_accounting_provider`:`${oe}/transaction_attachments`,attachmentUploadEndpoint:`${Zt.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:c,trendReport:n,analytics:$,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:u,entityAutoCompleteView:h},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails"),isTransactionSplitEditMode:o?.transactionDetailLocalData?.editMode??!1}}),(function(t,e){const{isCOTEnabled:o}=e;return{onBackClick:()=>{if(t(G("common")),e.onBackClick!=null)return void e.onBackClick();const n=ce(e.location.state?.pathnameStackToGoBack),a=n.poppedPathname??$e(2);e.navigate(a,{state:{pathnameStackToGoBack:n.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(n,a)=>{e.transaction!=null&&t(zt({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:n,customerId:a}))},onTransactionClick:n=>{e.resetTrendIsFetchedStates(),t(de()),t(ue());const a=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(je(n,e.tenantEmailDomain),{state:{pathnameStackToGoBack:a}})},onTrendSelectedPeriodChange:n=>{if(n==null)e.defaultTrendTransactionTimePeriod!=null&&t(ke(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const a=n.currentTimePeriod==null?n.addTimePeriod:{startDate:n.addTimePeriod.startDate,endDate:n.currentTimePeriod.endDate};t(me(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:n.addTimePeriod})),t(ke(e.entity,"TransactionDetail",{timeframe:n.timeframe,timePeriod:a}))}},onSaveUpdates:(n,a,s,c)=>{t(c===!0&&s!=null?Ve(n,s,!0,e.isExpenseAutomationEnabled):Wt({transactionId:n,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:a})),t(G("common"))},onUploadAttachmentAttachment:n=>{t(Nt(n))},onDeleteAttachment:n=>{e.transaction!=null&&t(Bt(n,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(n,a)=>{t(Vt({transactionId:n,transactionLocalData:a}))},onUpdateAllChecked:(n,a,s,c)=>{e.transaction!=null&&t(Lt(e.selectedTransaction,e.transaction,n,a,s,c))},onResetLineItemsCategoryClassInLocalData:(n,a,s,c,u,h)=>{t(Ot(n,a,s,c,u,h))},onChangeCategoryClassWhenUpdateAllIsChecked:(n,a)=>{e.transaction!=null&&t(Ut({id:e.transaction.id,type:e.transaction.type},e.transaction,n,a))},onSaveSuccess:()=>{const n=ce(e.location.state?.pathnameStackToGoBack);if(n.poppedPathname!=null){const a=ln(n.poppedPathname,"/").split("/"),s=a[a.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(s)&&e.navigate(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const c=`${sn(e.tenantEmailDomain)}`;e.navigate(c)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const c=`${cn(e.tenantEmailDomain)}`;e.navigate(c)}}},onPageRefresh:()=>{t(Be(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(n,a)=>{n.trim().length>=2?t(xt({searchString:n,entityType:a,searchOrigin:"common"})):n.trim().length===0&&t(G("common"))},onCancelAutoComplete:()=>{t(G("common"))}},onFetchRecommendationsForEntity:(n,a,s,c)=>{t(J({entity:n,amount:a,transactionDetails:s,flowType:"detail",isBulkFetch:c,isFetchCOT:o}))},clearRecommendationForLineId:n=>{const{transactionId:a,transaction:s,lineId:c}=n;t(Ft(a,s,c))},resetUpdateErrorState:()=>{const n={id:e.selectedTransaction.id,type:e.selectedTransaction.type};t(Pt(n))},onSaveVendorInLocalData:(n,a,s,c,u)=>{if(t(Rt({transactionId:n,vendorUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&u!=null&&t(J({entity:s,amount:c,transactionDetails:u,flowType:"detail",isFetchCOT:o})),t(Oe({vendorId:a.id?a.id:void 0,localData:{vendorName:a.name,vendorId:a.id?a.id:void 0}})),!a.id&&e.transaction!=null){const h=e.transaction,y=ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(h.type??"")}/${h.id}/vendor/create`,{state:{pathnameStackToGoBack:y}})}},onSaveCustomerInLocalData:(n,a,s,c,u)=>{t(_t({transactionId:n,customerUpdates:a,entity:s})),a.id!=null&&s!=null&&c!=null&&u!=null&&t(J({entity:s,amount:c,transactionDetails:u,flowType:"detail",isFetchCOT:o}))},onUpdateAllTranactionsWithCurrentVendorChecked:n=>{t(wt({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:n}))},onClickUpdateVendorToAllLineItems:(n,a,s)=>{t(At(n,a,s))},onResetVendorToAllLineItems:(n,a,s)=>{t(Ct(n,a,s))},saveLatestSelectedEntity:(n,a,s)=>{t(Dt({transactionId:n,lineId:a,entity:s}))},updateVendorBulkRecommendationsFetchStatus:(n,a)=>{t(Et(n,a))},setIsVendorUpdateAllChecked:(n,a,s)=>{t(vt(n,a,s))},onCreateTransferEntry:e.isCreateTransferEntryFromExpenseEnabled===!0?n=>Sn(t,n):void 0,onLineAdd:()=>{if(e.transaction==null)return;const n={id:e.transaction.id,type:e.transaction.type},a=e.transaction.type==="journal_entry",s=e.transaction.amount?.currencyCode??"",c=e.transaction.amount?.currencySymbol??"",u=a?{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"journal_entry_line_detail",type:"journal_entry_transaction_line",postingType:void 0,postingTypeName:"",lineTransactionType:"journal_entry"}:{amount:{amount:0,currencyCode:s,currencySymbol:c},id:crypto.randomUUID(),isCategoryMiscategorized:!1,isClassMiscategorized:!1,lineDescription:"",platformLineDetailType:"account_based_expense_line_detail",type:"transaction_with_account_and_class_line"};t(kt(n,u))},onLineDelete:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(It(a,n))},onToggleSplitEditMode:n=>{if(e.transaction==null)return;const a={id:e.transaction.id,type:e.transaction.type};t(gt(a,n))}}}))(Kt);function Vn(){const t=Ce(),e=z(),o=De(),{useFeatureGate:n}=X(),a=Ht(),s=g((m=>Z(m))),c=s.userRole.includes("charge_card_user")||s.userRole.includes("charge_card_admin"),u=s.userRole!=null&&we(s.userRole),h=s.userRole!=null&&_e(s.userRole),{isFeatureEnabled:y}=n(_.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:p}=n(_.isExpenseAutomationEnabled),{tenantEmailDomain:d,transactionTypeEncoded:r,transactionId:f}=Ae(),[k,D]=i.useState(!1),T=We(r??""),b=ze(f,T),v=g((m=>m.transactionVendorViewState)),A=pe(),j=Qt(),{onRecommendationSelection:x,popup:U}=mn({isEnabled:A,fallbackTransactionId:f}),R=i.useMemo((()=>({...j,onRecommendationSelection:x})),[j,x]),{isFeatureEnabled:O}=n(_.isTransactionCommentingEnabled),{isFeatureEnabled:P}=n(_.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:L}=n(_.isProjectsTransactionsEnabled),{isFeatureEnabled:V}=n(_.isTransactionSplitEnabled),M=a?.currentTenant?.companyId,q=a?.currentTenant?.companyName,B=on(M),E=i.useMemo((()=>{if(b)return{id:f,type:H(T)}}),[b,f,T]),l=E!=null?g((m=>Q(m,E))):void 0,I=l?.transactionDetailLocalData.vendorUpdates?.id!=null?v.editVendorStateById[l?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",S=l?.fetchState==="Completed"?Ge(l?.transaction):void 0,w=g((m=>S!=null?Re(m.customerIncomeState,m.vendorExpenseState,m.trendState,S,"month"):void 0)),Y=g((m=>le(m))),ee=g((m=>S!=null?Pe(m.trendWithTransactionsState,S,"TransactionDetail"):void 0)),te=s.company?.companyInfo.firstMonthOfFY??1,N=g((m=>Fe(m.accountState,m.accountListState,"accountList"))),[qe,fe]=i.useState(!1),[He,he]=i.useState(!1),[Qe,Se]=i.useState(!1),Xe=i.useCallback((m=>je(m,d??"")+o.search),[d,o.search]),Ye=i.useCallback((()=>{Se(!1)}),[]);yn({currentTransactionId:E,enabled:d!=null&&d!=="",buildPath:Xe,beforeNavigate:Ye,navigate:t,navigateState:o.state});const ye=()=>{fe(!1),he(!1)},Te=rn();dn();const ne=i.useRef(l?.transaction);ne.current=l?.transaction;const Je=l?.transactionDetailUpdateStatus?.fetchState,F=un(Je,(()=>{const m=[];if(ne.current!=null)for(const ae of ne.current.lines??[])"account"in ae&&ae.account?.accountId!=null&&m.push(ae.account.accountId);return m}));i.useEffect((()=>{E!=null&&l!=null&&l.fetchState==="Not-Started"&&(e(Be(E,!1)),ye())}),[e,E,l?.fetchState]),i.useEffect((()=>{if(E!=null&&l?.fetchState==="Error"){const m=ie(o.state?.pathnameStackToGoBack,o.pathname);t("page-not-found",{replace:!0,state:Te?{pathnameStackToGoBack:m,message:"expenseAutomation",origin:"transaction_categorization"}:{pathnameStackToGoBack:m,message:"pageNotFound",origin:"transaction_detail"}})}}),[E,l?.fetchState,t,o.state,o.pathname,Te]),i.useEffect((()=>{Qe||l==null||l.transaction==null||(e(xe({id:l.transaction.id,type:l.transaction.type})),Se(!0));const m=o.state?.searchContext;S==null&&l?.fetchState==="Completed"&&Ee(l?.transaction,m),S!=null&&(!c||u&&h===!1)&&(qe?He||w==null||(he(!0),e(me(S,"TransactionDetail",{timeframe:"month",timePeriod:ee?.selectedPeriod?.timePeriod??w}))):(e(de()),e(ue()),Ee(l?.transaction,m),fe(!0),e(Ue(S))))}),[l?.fetchState,l?.transaction,w,c]),i.useEffect((()=>{Y.newVendorState?.vendorDetailLocalData?.vendorName!=null?D(!0):D(!1)}),[Y.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{e(G("common"))}),[]);const Ke=[r,f].filter((m=>m!=null)),{transactionId:be,onSaveVendor:Ze,onSaveSuccess:et,onCancel:tt}=Tn({closeDrawerHandler:m=>{D(!1),t(m?"../":"../..")}}),{isAiCfoAccessEnabled:nt,onAskAiCfoClick:at}=an({mobileExploreReferrer:"Transaction Details"});return Xt({isDataReady:l?.fetchState==="Completed"}),b?C.jsxs(C.Fragment,{children:[be!=null&&k&&C.jsx(fn,{isOpen:k,transactionId:be,onSaveVendor:Ze,onSaveSuccess:et,onCancel:tt}),C.jsx(Yt,{toolkit:R,children:C.jsx(bn,{hideDeleteAttachment:!0,firstMonthOfFY:te,isDisabled:l?.transaction?.type==="transfer"&&a?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:d,location:o,navigate:t,selectedTransaction:E,entity:S,isCOTEnabled:A,defaultTrendTransactionTimePeriod:w,resetTrendIsFetchedStates:ye,transaction:l?.transaction,uncategorizedAccounts:N,vendorSaveStatus:I,isVendorBulkUpdateOnTransactionEnabled:y,isCreateTransferEntryFromExpenseEnabled:P,isExpenseAutomationEnabled:p,isAiCfoAccessEnabled:nt,onAskAiCfoClick:at,isTransactionCommentingEnabled:O,isProjectsTransactionsEnabled:L,isTransactionSplitEnabled:V,companyId:M,companyName:q,initialOpenThreadRequest:B})}),U,F.showPopup&&F.popupType!=null&&C.jsx(Jt,{popupType:F.popupType,currencySymbol:F.currencySymbol,accountId:F.popupAccountId??"",accountName:F.popupAccountName??"",onSubmit:F.handleSubmit,onDismiss:F.handleDismiss})]}):C.jsx(st,{to:$e(Ke.length)})}const $e=(t=2)=>{let e="../";for(let o=0;o<t;o++)e=`${e}../`;return e},Ee=(t,e)=>{if(t!=null){const{transactionCategory:o,transactionClass:n}=gn(t),a=In(t);$.trackTransactionDetails(t.account?.accountId,t.account?.accountName,t.id,a,o.length>0?o:void 0,n.length>0?n:void 0,t.type,t.amount,t.memo,t.lines?.length??0,t.attachments?.map((s=>s.fileName)),e!=null?"Search":void 0,e?.searchTerm,e?.resultPosition,e?.resultsCount)}},gn=t=>{const e=[],o=[];return t.lines?.forEach((n=>{switch(n.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const a=n;a!=null&&a.account!=null&&a.account.accountName?.length>0&&e.push(a.account.accountName),a.class!=null&&a.class.className?.length>0&&o.push(a.class.className);break}}})),{transactionCategory:e,transactionClass:o}},In=t=>St(t)===!0?t.customer?.name??"":yt(t)===!0?t.vendor?.name??"":t.memo!=null?t.memo:t.type;export{fn as C,Vn as T,mn as a,dn as b,un as c,Tn as d,bn as e,yn as f,pe as g,On as h,Sn as i,Ee as l,Un as r,Ln as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-mJJR3MsR.js";import{h as K,g as U,u as Q,i as W,j as g,N as q,l as H,n as Me,o as C}from"./core-CMivCywN.js";import{fB as Z,tx as ee,lb as p,et as te,Rk as Se,br as pe,_Y as Be,lX as ae,Vt as ne,_Z as fe,__ as Le,bE as k,Rg as he,_$ as Fe,$0 as Te,$1 as Oe,Rj as ge,$2 as Ge,$3 as De,$4 as $e,$5 as Ie,$6 as we,$7 as ze,$8 as ye,Sw as Re}from"./zeni-epic-state-CqKBThJ0.js";import{O as ce,y as J,h as F,G as ke,dc as oe,p as z,a4 as se,aq as _e,n as Ve}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import{a as y}from"./sentry-CItQHKpv.js";import{w as ie}from"./withTransactionSidePanel-DMpmT4ot.js";import{p as re,c as de}from"./routePaths-Bpj3i3MK.js";import{w as Ne}from"./utils-macSqF2O.js";import{d as j}from"./decodeURIComponentSafe-DRefzrWS.js";import{Z as Je}from"./ZeniAccountStatementScreen-C3siKg2V.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./useAskAiCfoHostNavButtonProps-eZEppiJu.js";import"./TransactionDetailScreen-BlnM6_t9.js";import"./useInitialThreadRequest-DBDsuRGA.js";import"./expenseAutomationHelper-BuTA7ucx.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]="ee136391-8058-4fc0-88e2-8feece140ec9",a._sentryDebugIdIdentifier="sentry-dbid-ee136391-8058-4fc0-88e2-8feece140ec9")}catch{}})();const Ue=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>Ne(a),Ye=()=>{const{common:a,uncategorizedTransactionList:e}=ke.getLocalizedStrings();return{amount:e.missingReceipt.missingReceiptMinAmount.amount,currencyCode:a.currency.currencyCode,currencySymbol:a.currency.currencySymbol}},qe=H((function(a,e){const t=Be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(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=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=N(e.selectedAccount.tranListType),d=Ke(t,n,c,o,e.bookCloseDate);F.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(fe({uiState:{dateRange:d},type:N(e.selectedAccount.tranListType)})),a(Se(o,p(d),!1,o==="missingReceipts"?Ye():void 0)),e.onSelectedTimePeriodChange(p(d))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}}))(oe),V=ie((function({...a}){const e=K(),t=U(),n=Q(),c=t.pathname.split("/").find((l=>Ue.includes(l))),o=c??"uncategorized-expense",{tenantEmailDomain:d}=W(),{accountType:Y,title:v,subTitle:A}=Ze(o),f="month",T=g((l=>Z(l))),b=T.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:S}=ce(),{isFeatureEnabled:h}=S(J.isProjectsTransactionsEnabled),I=g((l=>ee(l)))&&h,{dataAvailable:x,initialTimeframeTick:O}=Xe(o,b,T.bookCloseDate),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=y.useMemo((()=>{const l=p(O);return{tranListType:o,accountType:te(Y),title:v,subTitle:A,timeframe:f,period:l}}),[o,f,Y,x]);y.useEffect((()=>{if(!P&&u!=null){G(!0),F.trackTransactionList(void 0,void 0,void 0,u.title);const l=N(u.tranListType);n(Se(l,u.period,!0,l==="missingReceipts"?Ye():void 0))}}),[P,u,n]);let M=u;return u!=null&&E!=null&&(M={...u,period:E}),c==null||M==null?s.jsx(q,{to:"../"}):s.jsx(qe,{firstMonthOfFY:b,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:x,navigate:e,showProjectField:I,selectedAccount:M,referrerType:o,bookCloseDate:T.bookCloseDate,onSelectedTimePeriodChange:l=>$(l),...a})})),Ze=a=>{let e="",t="";const n=ke.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.common.texts.uncategorizedExpenses;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.common.texts.receipts}return{accountType:e,title:t,subTitle:""}},Xe=(a,e,t)=>{const n=pe();let c=pe().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:re(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ke=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Qe=H((function(a,e){const t=Fe(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:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ve();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)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(he(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=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(Te({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(oe),We=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,classIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=W(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),O=g((r=>Le(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>Z(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),w=g((r=>ee(r)))&&m;let i;const L=He(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=et(O?.dateRange,r);i={accountId:h,accountType:te(S),classId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(he(i.accountId,i.accountType,i.classId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return L&&B!=null?s.jsx(Qe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(q,{to:ve(R.length)})})),ve=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),tt=H((function(a,e){const t=Ge(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:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??be();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)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(ge(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=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(De({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(oe),at=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,projectIdEncoded:v,timeframe:A,startDate:f,endDate:T,titleEncoded:b}=W(),S=j(d??""),h=j(Y??""),I=j(v??""),x=j(b??""),O=g((r=>Oe(r.transactionListState,h,S,I))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((r=>Z(r))),M=u.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:l}=ce(),{isFeatureEnabled:m}=l(J.isProjectsTransactionsEnabled),w=g((r=>ee(r)))&&m;let i;const L=nt(S,h,I,A,f,T,x);if(L){const r={startDate:k(f,"YYYY-MM-DD"),endDate:k(T,"YYYY-MM-DD")},_=ct(O?.dateRange,r);i={accountId:h,accountType:te(S),projectId:I,title:x,timeframe:A,period:_}}y.useEffect((()=>{P||i==null||(G(!0),F.trackTransactionList(i.accountId,void 0,a,i.title),c(ge(i.accountId,i.accountType,i.projectId,i.period)))}),[P,i,c]);let B=i;i!=null&&E!=null&&(B={...i,period:E});const R=[d,Y,v,A,f,T,b].filter((r=>r!=null));return L&&B!=null?s.jsx(tt,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:B,referrerType:a,onSelectedTimePeriodChange:r=>$(r),...e}):s.jsx(q,{to:be(R.length)})})),be=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},nt=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&k(c,"YYYY-MM-DD").isValid()&&k(o,"YYYY-MM-DD").isValid()&&d!=null,ct=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),ot=H((function(a,e){const t=we(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ze(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:re(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}}),(function(a,e){return{onBackClick:()=>{const t=se(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Pe();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)}`),F.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(Ie(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=de(t,e.tenantEmailDomain),c=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ye({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=rt(e.tenantEmailDomain),n=z(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(oe),Ae=ie((function({referrerType:a,...e}){const t=K(),n=U(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:Y,timeframe:v,startDate:A,endDate:f,titleEncoded:T,excludeSubAccounts:b}=W(),S=j(d??""),h=j(Y??""),I=j(T??""),x=!(b!=null&&b==="exclude_subaccounts"),O=g((D=>$e(D.transactionListState,h,S))),[P,G]=y.useState(!1),[E,$]=y.useState(void 0),u=g((D=>Z(D))),M=u.company?.featuresActivationInfo.connectedAccountProvider==="unit",l=u.company?.companyInfo.firstMonthOfFY??1;let m;const w=st(S,h,v,A,f,I);if(w){const D={startDate:k(A,"YYYY-MM-DD"),endDate:k(f,"YYYY-MM-DD")},le=it(O?.dateRange,D);m={accountId:h,accountType:te(S),title:I,timeframe:v,period:le}}let i=m;m!=null&&E!=null&&(i={...m,period:E});const{useFeatureGate:L}=ce(),{isFeatureEnabled:B}=L(J.isTransactionCommentingEnabled),R=y.useCallback(((D,le)=>{if(o==null)return;const me=D.url.split(`/${o}/`)[1];if(me==null)return;const[je,xe]=me.split("?"),X=new URLSearchParams(xe??"");X.set("view","full"),X.set("thread_id",le),X.set("entity_type",D.entityType);const Ce=z(n.state?.pathnameStackToGoBack,n.pathname);t(`/${o}/${je}?${X.toString()}`,{state:{pathnameStackToGoBack:Ce}})}),[t,o,n.state,n.pathname]),{isFeatureEnabled:r}=L(J.isProjectsTransactionsEnabled),_=g((D=>ee(D)))&&r,{areTenantIdsInSync:ue}=_e();y.useEffect((()=>{!P&&m!=null&&ue&&(G(!0),F.trackTransactionList(m.accountId,void 0,a,m.title),c(Ie(m.accountId,m.accountType,m.period,void 0,!1,x)))}),[P,m,c,ue]);const Ee=[d,Y,v,A,f,T].filter((D=>D!=null));return w&&i!=null?s.jsx(ot,{firstMonthOfFY:l,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:M,isTransactionCommentingEnabled:B,onCommentThreadClick:R,showProjectField:_,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:D=>$(D),...e}):s.jsx(q,{to:Pe(Ee.length)})})),Pe=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},st=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&k(n,"YYYY-MM-DD").isValid()&&k(c,"YYYY-MM-DD").isValid()&&o!=null,it=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),rt=a=>`/${a}/transactions/${Re}/statements`;function Mt(){const a=U().state?.referrer,e=g((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[g((n=>Z(n))).tenantId],t=Ve();return s.jsxs(Me,{children:[s.jsx(C,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/zeni-clearing-account/statements",element:s.jsx(Je,{})}),s.jsx(C,{path:"/*",element:s.jsx(Ae,{referrerType:a})}),s.jsx(C,{path:"/uncategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/uncategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/miscategorized-expense/*",element:s.jsx(V,{})}),s.jsx(C,{path:"/missing-receipts/*",element:t?s.jsx(q,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(V,{})}),s.jsx(C,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})}),s.jsx(C,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(at,{referrerType:a})})]})}export{Mt as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-mJJR3MsR.js";import{h as L,g as F,u as U,i as V,j as y,N as D,l as O,n as Te,o as k}from"./core-CMivCywN.js";import{cu as M,fB as v,Yv as B,NK as ae,Nr as q,Ns as ne,Yx as we,NN as Ie,Yt as Ce,Yu as se,YJ as ke,LO as je,Bv as be,Yz as Ae,NU as Ee,Yw as re,d9 as Z,F$ as oe,dU as ve,dV as De,_V as Le,_W as Fe,Nt as Ue,_X as Be,Nu as Pe,ND as Re,bq as Ne,bJ as Ve,cF as Oe,bK as Me,ct as _e,bt as ze,Tw as $e,cs as Ge}from"./zeni-epic-state-CqKBThJ0.js";import{J as _,g as Ye,z as E,a8 as z,h as b,d5 as qe,d6 as Ze,d7 as Y,a1 as H,E as He,aq as Je,as as Ke,O as ie,y as R,ab as We,a7 as Xe,d8 as Qe,ae as J,p as et,d9 as tt,a4 as K,da as at,ai as nt,$ as X,db as st,f as rt}from"./index-DlMGj3Af.js";import{D as ot,n as N,S as it}from"./mui-C6XtNCo7.js";import ct from"./NotFoundScreen-fxNT7vgC.js";import{S as Q}from"./SetupPagesScreen-Sjd63M0p.js";import{a as p}from"./sentry-CItQHKpv.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-eZEppiJu.js";import{u as ut}from"./useInitialThreadRequest-DBDsuRGA.js";import{M as ce}from"./MobileAppDrawer-CcN5sT0f.js";import{F as dt}from"./FeaturePreviewScreen-B_aYJlol.js";import{a as ee}from"./analyticsHelper-Cypw_xC0.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.js";import"./BusinessVerificationPageScreen-3R_uxb4s.js";import"./routePaths-Bpj3i3MK.js";import"./InboxNotificationsProvider-BIRPulc1.js";import"./useTaskManagerAccess-B7jKkFFv.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]="25ab4dd8-2f2f-4b4f-9d66-e1722bacf6dd",t._sentryDebugIdIdentifier="sentry-dbid-25ab4dd8-2f2f-4b4f-9d66-e1722bacf6dd")}catch{}})();const pt=O((function(t,a){const{companyId:n}=a;return{treasurySetupView:B(t,n),analytics:b}}),(function(t,a){const{navigate:n,analytics:o,treasurySetupView:i}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=i.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}}))(qe);function mt(){const t=L(),a=F(),n=U(),{tenantEmailDomain:o}=V(),i=_(),r=y((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),m=Ye(r),s=M(i?.loggedInUserRoleMap),[d,c]=p.useState(!1),[S,T]=p.useState(!1),[l,u]=p.useState(!1),x=y((I=>v(I))),f=E.getSignedInUserTenant(o)?.companyId??x.companyId,C=E.getSignedInUser(),h=y((I=>B(I,f))),g=y((I=>I.treasurySetupViewState.fetchState)),j=y((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),w=y((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{d||g!=="Not-Started"||f==null||(c(!0),n(ae(f,!0,!1)))}),[d,g,f,n]),p.useEffect((()=>{l||w!=="Not-Started"||f==null||(u(!0),n(q()))}),[l,w,f,n]),p.useEffect((()=>{S||j!=="Not-Started"||f==null||(T(!0),n(ne()))}),[S,j,f,n]),p.useEffect((()=>{m==="In-Progress"&&r==="Completed"&&t("../")}),[m,r,t]),x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=x.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||g!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:f,isEditMode:!0,isLoading:P,isReadOnly:!s,treasurySetupView:h,analytics:b})]})}const ft=O((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:B(t,n)}}),(function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:i}=a,r=o.treasuryTransferMoneyLocalData,m=i.fundAllocationLocalData;return{onCancelClick:()=>{Y(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Y(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ze),yt=({isFirstTransfer:t,isTransactionsLoaded:a})=>{const n=L(),{tenantEmailDomain:o}=V(),i=U(),[r,m]=p.useState(!1),[s,d]=p.useState(!1),[c,S]=p.useState(!1),[T,l]=p.useState(!1),u=y((w=>w.treasurySetupViewState.fetchState)),x=y((w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),f=y((w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),C=y((w=>v(w))),h=E.getSignedInUserTenant(o)?.companyId??C.companyId,g=y((w=>Ce(w))),j=y((w=>B(w,h)));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{s||u!=="Not-Started"||h==null||(d(!0),i(ae(h,!0,!1)))}),[s,u,h,i]),p.useEffect((()=>{c||x!=="Not-Started"||h==null||(S(!0),i(q()))}),[c,x,h,i]),p.useEffect((()=>{T||f!=="Not-Started"||h==null||(l(!0),i(ne()))}),[T,f,h,i]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{analytics:b,navigate:n,transferDetails:g,onAnotherTransferClick:()=>{m(!1),i(se())},currentTenant:C,treasurySetupView:j,showReviewContent:r,maxInsuredAmount:5e5,onReviewClick:()=>{Y(b,"review",g.treasuryTransferMoneyLocalData,j.fundAllocationLocalData,"Transfer"),m(!0)},isFirstTransfer:t,isTransactionsLoaded:a,setShowReviewContent:m,onBackClick:()=>{}})]})},gt=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
9
|
-
`,St={overlayWidth:new We(100,100,48)},ht=O((function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:B(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}}),(function(t,a){const{navigate:n,currentTenant:o,location:i,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:d=>{let c="page-not-found";d==="editPortfolio"?c=xt(s):d==="statements"?c=Tt(s):d==="taxLetter"?c=wt(s):d==="settings"&&(c=It(s));const S=et(i.state?.pathnameStackToGoBack,i.pathname);n(c,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(d,c)=>{t(Le({uiState:{sortKey:d,sortOrder:c}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}}))(Qe);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=F(),o=L(),i=U(),r=H(),m=He(),s=y((A=>v(A))),{tenantEmailDomain:d}=V(),c=s.companyId??E.getSignedInUserTenant(d)?.companyId,[S,T]=p.useState(!1),l=y((A=>re(A))),u=l.fetchState,x=l.accountSummary?.totalBalance?.amount,f=y((A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus)),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",h=_(),g=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,j=M(h?.loggedInUserRoleMap),w=Z(h?.loggedInUserRoleMap),{areTenantIdsInSync:P}=Je();p.useEffect((()=>{u==="Not-Started"&&!S&&P&&(T(!0),i(oe(!0)))}),[S,i,u,P]),p.useEffect((()=>{l.transactionsFetchState.fetchState==="Completed"&&l.transactions.length===0&&!n.pathname.includes("transfer")&&j&&o("./transfer")}),[l.transactionsFetchState.fetchState,l.transactions.length,n.pathname,j,o]);const I=()=>{o("..")},[le,ue]=p.useState(!1),W=A=>{ue(A)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Ke({isDataReady:u==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:me}=$(R.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=$(R.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=$(R.isTreasuryCommentingEnabled),ge=ut(c,{clearParams:u==="Completed"&&f?.fetchState==="Completed"}),Se=ve(s),he=De(me,s);if(Se===!0&&he!==!0)return e.jsx(dt,{});if(C){const A=f?.fetchState!=="Completed"||l.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[l.accountSummaryFetchState.fetchState==="Completed"&&f?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(ot,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:l.transactions.length===0||x===0,isTransactionsLoaded:l.transactionsFetchState.fetchState!=="In-Progress"&&l.transactionsFetchState.fetchState!=="Not-Started"}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(ht,{treasuryDetailsView:l,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:c,analytics:b,isTreasuryCommentingEnabled:ye,handleDrawerToggle:W,initialOpenThreadRequest:ge,isLoading:A,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return g&&j?e.jsx(D,{to:"../setup"}):s.companyTreasuryInfo?.info&&!g&&w?e.jsx(D,{to:"../promo",state:n.state}):e.jsx(Xe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=N(it)`
|
|
10
|
-
display: flex;
|
|
11
|
-
min-height: 100%;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
`,kt=N.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 100vh;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
21
|
-
`;function jt(){const t=L(),a=U(),n=H(),o=F(),i=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Fe(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))}),[r,s.fetchState,a]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access statements page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(tt,{currentTenantCompanyName:T,statementListView:s,isLoading:l,onBackClick:()=>{const u=K(o.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const bt=N.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
height: 100vh;
|
|
24
|
-
width: 100%;
|
|
25
|
-
flex: 1 1 auto;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
align-items: center;
|
|
28
|
-
background-color: ${t=>t.theme.colors.grey4};
|
|
29
|
-
`;function At(){const t=L(),a=H(),n=F(),o=U(),i=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=p.useState(!1),s=y((u=>Be(u)));p.useEffect((()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))}),[r,s.fetchState,o]);const d=E.getSignedInUser(),c=y((u=>v(u))),S={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c.tenantId??""},T=c.company?.companyInfo.companyLegalName??c.companyName;if(d==null)throw Error("Can't access tax letter page without signing in...");const l=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(at,{currentTenantCompanyName:T,taxLetterListView:s,isLoading:l,onBackClick:()=>{const u=K(n.state?.pathnameStackToGoBack),x=u.poppedPathname??"..";t(x,{state:{pathnameStackToGoBack:u.newStack}})},authParams:S,downloadEndPoint:i})})}const Et=O((function(t,a){const{companyId:n}=a,o=B(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk"}}),(function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:i=>{n(i?"..":"../setup",{relative:"path"})}}}))(st),vt=()=>{const t=nt(),a=L(),n=F(),o=U(),{tenantEmailDomain:i}=V(),[r,m]=p.useState(!1),s=y((g=>v(g))),[d,c]=p.useState(!1),S=y((g=>g.treasurySetupViewState.treasuryFundsDetails?.fetchStatus));p.useEffect((()=>{d||S?.fetchState!=="Not-Started"||T==null||(c(!0),o(q()))}),[S,o]);const T=E.getSignedInUserTenant(i)?.companyId??s.companyId,l=E.getSignedInUser(),u=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=g=>{m(g)};if(l==null)throw Error("Can't access treasury promo page without signing in...");const f=_(),C=M(f?.loggedInUserRoleMap),h=Z(f?.loggedInUserRoleMap);if(u&&C)return e.jsx(D,{to:"../../treasury/setup"});if(s.company?.companyTreasuryInfo&&(!u&&C||h)){if(n.state?.message==="activation"){const g=K(n.state?.pathnameStackToGoBack);a(n.pathname,{state:{...n.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return S?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:g=>(j=>j.trackTreasuryPromoView("Treasury Promo Page"))(g)}),e.jsx(ce,{isAppContentDrawerOpen:r,handleDrawerToggle:x}),e.jsx(Et,{analytics:b,navigate:a,companyId:T,meetingUrl:t("treasury_promo"),onClickMenuIcon:()=>{x(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=N.div`
|
|
30
|
-
display: flex;
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
background-color: ${t=>t.theme.colors.grey5};
|
|
37
|
-
`;function aa(){const t=F(),a=y((g=>v(g))),{useFeatureGate:n}=ie(),o=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",i=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Ne(a?.userRole),d=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),c=Oe(r?.loggedInUserRoleMap),S=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Me(r?.loggedInUserRoleMap),T=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!s&&_e(r?.loggedInUserRoleMap),l=o&&!s&&M(r?.loggedInUserRoleMap),{isFeatureEnabled:u}=n(R.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(R.isDebitCardFeatureEnabled),f=rt(a,u,x)&&!s&&ze(r?.loggedInUserRoleMap),C=$e(r?.loggedInUserRoleMap),h=Ge(r?.loggedInUserRoleMap);return e.jsxs(Te,{children:[h?null:e.jsx(k,{path:"setup",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:c,productType:"zeni_treasury",type:"setup"})}),h?null:e.jsx(k,{path:"verification",element:e.jsx(Q,{isBillPayAdminLevelAccess:d,isUserHasOnlyBillPayAccess:c,isReimbursementAdminLevelAccess:S,isZeniAccountAdminLevelAccess:T,isChargeCardAdminLevelAccess:f,isTreasuryAdminLevelAccess:l,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(At,{})}),o?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),l?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):i&&l?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(D,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{aa as default};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-mJJR3MsR.js";import{a as u}from"./sentry-CItQHKpv.js";import{h as N,u as $,i as Y,j as f,l as G,g as H,n as Me,o as k,N as B}from"./core-CMivCywN.js";import{U_ as gt,U$ as Ze,QO as et,V0 as vt,fB as U,gX as ge,V1 as Tt,cD as xt,V2 as bt,EX as yt,V3 as wt,V4 as oe,V5 as te,V6 as ve,Sn as ue,So as Fe,Fb as pe,Sm as he,E_ as tt,Ex as ke,V7 as It,Sp as J,lX as me,V8 as Pe,Er as Ct,V9 as Dt,Va as Vt,Vb as je,Vc as _e,Vd as Ae,Ve as Re,F5 as Te,Vf as nt,EO as at,Vg as Et,Vh as Ft,Vi as kt,Vj as Pt,Vk as jt,Vl as _t,Vm as At,Vn as Rt,BH as Ut,BP as Bt,BI as Lt,Ru as we,Vo as Ot,Vp as Mt,lb as Ie,br as Nt,Vq as Gt,Vr as $t,mV as zt,n2 as Yt,Rt as Ce,bE as Ne,Vs as ot,R4 as st,Vt as Jt,Vu as qt,Vv as Kt,n4 as Ht,Vw as Ge,Vx as $e,Vy as ze,Vz as Ye,VA as Qt,n0 as Wt,VB as Xt,n3 as Zt,VC as en,VD as it,RP as rt,mj as tn,VE as nn,VF as De,VG as dt,RN as lt,Hw as an,VH as on,VI as sn,mD as ct,VJ as rn,VK as dn,R$ as ln,uD as cn,VL as ut,VM as Je,RY as Ve,VN as qe,VO as un,S1 as pn,VP as hn,VQ as mn,VR as fn,VS as Sn,VT as gn,uG as vn,VU as Tn,Sq as xn,TZ as bn,RG as Ee,i7 as yn,T$ as wn,T_ as In,i5 as Cn,VV as Dn,VW as Vn,HB as En,VX as Fn,VY as kn,VZ as Pn,V_ as jn,mn as _n,bn as An,dV as Rn,dU as Un}from"./zeni-epic-state-CqKBThJ0.js";import{E as Bn,a1 as ne,ab as Ue,O as Q,y as M,z as R,a7 as Ln,aM as On,h as P,X as Be,U as xe,av as ee,as as se,aN as Mn,aO as pt,aq as Nn,a8 as Se,aP as Gn,p as K,J as $n,G as ht,aQ as zn,ae as mt,a4 as Yn,g as Ke,aR as Jn,F as q,a9 as qn,af as ft,ag as Kn,aS as Hn,aT as Qn,Q as Le,aU as Wn,aV as Xn,a3 as Zn,aW as ea,aX as ta}from"./index-DlMGj3Af.js";import{D as na,n as L,S as St}from"./mui-C6XtNCo7.js";import{t as aa,A as oa}from"./AddressScreen-CLiV0mfm.js";import fe from"./NotFoundScreen-fxNT7vgC.js";import{F as sa}from"./FeaturePreviewScreen-B_aYJlol.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-CrWn6EEs.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-eZEppiJu.js";import{M as re}from"./MobileAppDrawer-CcN5sT0f.js";import{v as Oe,c as ua,d as pa}from"./routePaths-Bpj3i3MK.js";import{D as ha}from"./DrawerScreen-C6V6LURt.js";import{a as ma,m as fa}from"./accountMappingHelper-CU6wucuM.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.js";import"./pathToGoBack-DkQc48Fj.js";import"./InboxNotificationsProvider-BIRPulc1.js";import"./useTaskManagerAccess-B7jKkFFv.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]="30dae52d-7a48-4dcf-bf6b-3430d8ebe136",e._sentryDebugIdIdentifier="sentry-dbid-30dae52d-7a48-4dcf-bf6b-3430d8ebe136")}catch{}})();const Sa={drawerLeftMargin:new Ue(0,0,100,200)},ga=G((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=U(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:P,qboAppUrl:xt(Be.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(On),va=()=>{const e=Bn(),a=N(),s=$(),{scheduleDetailId:t}=Y(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=Y(),{useFeatureGate:p}=Q(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>U(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Ln,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=L(St)`
|
|
2
|
-
display: flex;
|
|
3
|
-
min-height: 100%;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
`,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=H(),a=$(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},W="accrued_expenses",xa=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:W,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:W,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:W,searchText:t}))},onReloadReport:()=>{e(tt(W))},onScroll:t=>{e(je({scheduleType:W,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Vt()),P.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:W,fetchState:t}))}}}))(Mn),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=N(),h=$(),{useFeatureGate:v}=Q(),m=xe();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),T=f((S=>U(S))),x={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:T.tenantId},g=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:T.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),V=f((S=>Fe(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&V==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:ke("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,V]);const j=f((S=>It(S,W))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:j.fetchState==="Completed"});const D=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const F=f((S=>ge(S,T.companyId))),z=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:z}),o.jsx(xa,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:j,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:P,controllerUserDetails:F,isAiCfoAccessEnabled:O,onAskAiCfoClick:E,onClickMenuIcon:()=>z(!0)})]})},X="fixed_assets",ya=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:X,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:X,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:X,searchText:t}))},onReloadReport:()=>{e(Te(X))},onScroll:t=>{e(je({scheduleType:X,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:X,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=$();ce();const{useFeatureGate:p}=Q(),h=xe(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>U(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[x,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>Fe(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),V=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||V||C)&&x===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[x]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,V,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(Te("fixed_assets",{selectedTimeframe:ke("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,X))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:j}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),V||i("../opex");const E=f((S=>ge(S,d.companyId))),[D,F]=u.useState(!1),z=S=>{F(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:z}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:T,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:P,controllerUserDetails:E,isAiCfoAccessEnabled:A,onAskAiCfoClick:j,onClickMenuIcon:()=>{z(!0)}})]})},Ia=L.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
min-height: 100%;
|
|
8
|
-
width: 100%;
|
|
9
|
-
flex: 1 1 auto;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
13
|
-
`,Ca=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=U(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=J(e),h=Et(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:P,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Lt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Bt())},onReloadReport:()=>{e(Ut(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(_t({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(jt(t))},onPageFetchStarted:()=>{e(Pt(!0))},updateDownloadStateHandler:t=>{e(kt(t))},onClearSearch:t=>{e(Ft({timeframe:t}))}}}))(Gn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=Q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((E=>J(E)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,T]=u.useState(!1),x=f((E=>ue(E))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((E=>oe(E))),{isAiCfoAccessEnabled:V,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Nn();u.useEffect((()=>{(g||y||b)&&c===!1&&x!=="Completed"&&w&&(n(pe()),T(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[x,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,j]=u.useState(!1),O=E=>{j(E)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:P,onLoad:E=>{I.previousTab==null?E.trackVendorOperatingExpensesPageLoaded("Side Panel"):E.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:V,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Va=G((function(e,a){const s=U(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(_e({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(Te(Z))},onScroll:t=>{e(je({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(Pe({scheduleType:Z,fetchState:t}))}}}))(pt),Ea=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=N(),l=$(),{useFeatureGate:p}=Q(),h=xe();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>U(S))),c=f((S=>Fe(S,"prepaid_expenses"))),T={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),V=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||V||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(Te("prepaid_expenses",{selectedTimeframe:ke("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:V,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,V,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:j}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>J(S).isReportGenerated));f((S=>J(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const E=f((S=>ge(S,d.companyId))),[D,F]=u.useState(!1),z=S=>{F(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:z}),o.jsx(Va,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:x,themeState:h,vendorTabsToShow:e,analytics:P,controllerUserDetails:E,isAiCfoAccessEnabled:A,onAskAiCfoClick:j,onClickMenuIcon:()=>{z(!0)}})]})},Fa=L.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
width: 100%;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
align-items: center;
|
|
20
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
21
|
-
`,ka=G((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:Jt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=Yn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:V,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:j}=en(r,d);c!=null&&P.trackVendorDetailsSave(c,T??"",x,g,y,b,I,V,C,w,A,j)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Xt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Wt({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(Qt({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&P.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ge()),e($e()),e(ze()),e(Ye()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&P.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Ht("Not-Started",n)),e(Ge()),e($e()),e(ze()),e(Ye()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Kt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),T=K(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:T}})},onVendorDetailUIChange:r=>{e(qt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=K(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))(zn);function He({referrerType:e,isFiling1099FeatureEnabled:a}){const s=$(),t=H(),n=N(),i=$n(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=Y(),c=d.vendorId,T=d.qboId,{tenantEmailDomain:x,timeframe:g,startDate:y,endDate:b}=d,I={id:T??"",name:"",type:"vendor",zeniId:c??"",qboId:T??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const V=ne(),C=f((_=>U(_))),w=f((_=>c!=null?Ot(_,c,I):void 0)),A=f((_=>_.vendorState.vendorByID[c??""])),j=f((_=>U(_).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(j,2))),E=Ie({startDate:O.startDate,endDate:Nt()}),D=Gt(j),F=f((_=>$t(_.trendWithTransactionsState,I,"EntityDetail"))),[z,S]=u.useState(!1),be=l===!1&&m===!1?void 0:F?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s(zt(c,I)),()=>{e!=null&&c!=null&&s(Yt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((_,ae,ye)=>{_.id!=null&&P.trackVendorDetails(_.id,_.name,ye,_.account?.accountName,_.class?.className,_.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&z===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:F?.selectedPeriod?.timeframe??"quarter",timePeriod:be},j)),S(!0));const _=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ne(y,_.YYYYDashMMDashDDFormat),endDate:Ne(b,_.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,F?.selectedPeriod?.timeframe,l,j]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:E,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??E,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(Fa,{windowSize:V,children:o.jsx(ka,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:j,isTrendPeriodSelected:l,selectedPeriodTimePeriod:F?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:x})})}const Pa=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,ja={containerWidth:new Ue(100,58)},_a=L(qn)`
|
|
22
|
-
width: ${q.sp4};
|
|
23
|
-
height: ${q.sp4};
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
color: ${e=>e.theme.colors.brandColorJade};
|
|
26
|
-
`,Aa=L.div`
|
|
27
|
-
display: flex;
|
|
28
|
-
height: 100vh;
|
|
29
|
-
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
30
|
-
width: 100%;
|
|
31
|
-
overflow-y: scroll;
|
|
32
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
33
|
-
`,Ra=L.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
width: ${e=>`${ja.containerWidth.value(e.windowSize)}%`};
|
|
37
|
-
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
38
|
-
`,Ua=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:P,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(Hn);function Qe({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=$(),t=N(),{vendorId:n}=Y(),i=ne(),l=xe(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=Q(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>U(D))).companyName,c=new AbortController,T=c.signal;let x,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");x=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const V=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,T)))}),[n]);const w=Ke(y?.fetchState),A=Ke(g?.fetchState),j=x.vendor?.contactIds,O=j?.[j.length-1],E=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&x?.vendor!=null&&(s(nn(n,x.vendor,E)),x?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,x?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Na,{children:o.jsx(Jn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(La,{children:[o.jsx(_a,{onClick:C}),o.jsxs(Ba,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(Ua,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?Pa.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:x?.vendor?.legalName,isLoading:V}),o.jsx(Ra,{windowSize:i,children:e})]})}const Ba=L.div`
|
|
39
|
-
display: ${e=>e.showContent?"flex":"none"};
|
|
40
|
-
align-items: center;
|
|
41
|
-
`,La=L.div`
|
|
42
|
-
margin-bottom: ${q.sp3};
|
|
43
|
-
margin-top: ${q.sp3};
|
|
44
|
-
margin-left: ${q.sp8};
|
|
45
|
-
position: absolute;
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
`,Oa=L.div`
|
|
49
|
-
width: 1px;
|
|
50
|
-
height: ${q.sp3};
|
|
51
|
-
margin: ${q.sp0} ${q.sp3};
|
|
52
|
-
background-color: ${e=>e.showAutofill?ft.neutralGrey1Light:e.theme.colors.hero};
|
|
53
|
-
`,Ma=L(Kn.StandardMedium)`
|
|
54
|
-
color: ${e=>e.showAutofill?ft.neutralGrey5Light:e.theme.colors.primary};
|
|
55
|
-
`,Na=L.div`
|
|
56
|
-
width: 100%;
|
|
57
|
-
height: 100vh;
|
|
58
|
-
overflow: hidden;
|
|
59
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
60
|
-
`,Ga=G((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Qn);function $a(){const e=N();return o.jsx(Ga,{navigate:e})}const za=L.div`
|
|
61
|
-
display: flex;
|
|
62
|
-
min-height: 100%;
|
|
63
|
-
width: 100%;
|
|
64
|
-
flex: 1 1 auto;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
align-items: center;
|
|
67
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
68
|
-
`,Ya=G((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=U(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:P,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ve(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(qe())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=Ja(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(qe())},onClickRedirectToQBO:()=>{window.open(`${Be.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ve(null))}}}))(Wn);function We(){const e=N(),a=$(),s=H(),{tenantEmailDomain:t}=Y(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=Y(),p=f((d=>Je(d))),[h,v]=u.useState(!1),m=f((d=>Je(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ve(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Le.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:P,onLoad:r}):null,o.jsx(Se,{analytics:P,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Ue(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(qa,{onClick:d=>d.stopPropagation(),children:o.jsx($a,{})})}),o.jsx(za,{windowSize:n,children:o.jsx(Ya,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const Ja=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,qa=L(St)`
|
|
69
|
-
display: flex;
|
|
70
|
-
min-height: 100%;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
`,Ka=G((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:P,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Be.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),P.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=K(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=K(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Zn}}))(Xn);function Ha(){const e=N(),a=H(),{vendorId:s}=Y(),t=f((p=>U(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ka,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const Qa=L.div`
|
|
73
|
-
display: flex;
|
|
74
|
-
min-height: 100%;
|
|
75
|
-
width: 100%;
|
|
76
|
-
flex: 1 1 auto;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
align-items: center;
|
|
79
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
80
|
-
`,Wa=G((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(Vn({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Ee(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Le.Event.vendor1099TabSettingsSave)}}}))(ea);function Xe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>xn(C))),T=f((C=>bn(C))),{isAiCfoAccessEnabled:x,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Ee(!1)))}),[r,d]),u.useEffect((()=>{T.saveState.fetchState==="Completed"&&n(Ee(!1))}),[T.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>U(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},V=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:P,onLoad:()=>P.trackPageLoaded(Le.Event.vendor1099ListPage)})}):null,o.jsxs(Qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Wa,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:P,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:T,downloadParams:V,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:x,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Xa=L.div`
|
|
81
|
-
display: flex;
|
|
82
|
-
min-height: 100%;
|
|
83
|
-
width: 100%;
|
|
84
|
-
flex: 1 1 auto;
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
align-items: center;
|
|
87
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
88
|
-
`,Za=G((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:P}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(_n({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(jn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(Pn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(kn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=K(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(Fn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ta);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=N(),n=$(),i=H(),{tenantEmailDomain:l}=Y(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=Q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),T=e.includes("accrued_expenses"),x=f((F=>oe(F)));let g={};g=f((F=>En(F,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:V}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((F=>ue(F))),w=f((F=>J(F).isReportGenerated));f((F=>J(F).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,j]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),j(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:T,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),P.trackVendorList(x.currentTab,x.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,E]=u.useState(!1),D=F=>{E(F)};return o.jsxs(Xa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:V})]})}function Fo(){const{useFeatureGate:e}=Q(),a=H().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),T=f((V=>U(V))),x=T?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];x!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),x!=="netsuite"&&r===!0&&g.push("fixed_assets"),x!=="netsuite"&&d===!0&&g.push("accrued_expenses"),x!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,T),I=Un(T);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(k,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(k,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../summary"})}),o.jsx(k,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(k,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(B,{to:"../../vendors/opex"})}),o.jsx(k,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Ea,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099",element:c&&p?o.jsx(Xe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Xe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(Qe,{appContent:o.jsx(Ha,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(Qe,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(B,{to:"../opex"})}),o.jsx(k,{path:"/summary/:vendorId/:qboId",element:o.jsx(He,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(k,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(He,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(k,{path:"/review",element:v===!0?o.jsx(We,{}):o.jsx(fe,{})}),o.jsx(k,{path:"/review/vendor/:vendorId",element:v?o.jsx(We,{}):o.jsx(fe,{})}),o.jsx(k,{path:"/",element:o.jsx(B,{to:"summary"})}),o.jsx(k,{path:"*",element:o.jsx(fe,{})})]})}export{Fo as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-mJJR3MsR.js";import{a as f}from"./sentry-CItQHKpv.js";import{t as u,u as h,j as y,N as I}from"./core-CMivCywN.js";import{TO as b,ge as w,IR as j}from"./zeni-epic-state-CqKBThJ0.js";import{z as l,a7 as x,af as S,ag as D}from"./index-DlMGj3Af.js";import{n as c}from"./mui-C6XtNCo7.js";import"./recharts-Co0_Dmc-.js";import"./analytics-BgUj-hR5.js";import"./plaid-l8YRzpBD.js";import"./dnd-B8NpvFCU.js";import"./stripe-cKAAJElX.js";import"./lottie-BTBtSLCO.js";import"./lexical-Di6ZXkXF.js";import"./pdf-DSDpdkmb.js";import"./utils-macSqF2O.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]="841e56d5-dec7-495b-ad7a-59afe110dc98",e._sentryDebugIdIdentifier="sentry-dbid-841e56d5-dec7-495b-ad7a-59afe110dc98")}catch{}})();const B=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(T,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100vh;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey5};
|
|
9
|
-
`,T=c(D.LargeRegular)`
|
|
10
|
-
display: flex;
|
|
11
|
-
color: ${S.important};
|
|
12
|
-
`;export{B as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-mJJR3MsR.js";import{a as u}from"./sentry-CItQHKpv.js";import{h as x,u as j,g as v,i as B,j as p}from"./core-CMivCywN.js";import{Sw as s,Sv as T,_T as $,fB as C,_U as E}from"./zeni-epic-state-CqKBThJ0.js";import{a1 as _,ae as g,E as z,z as D,a7 as L,d4 as P,a4 as U}from"./index-DlMGj3Af.js";import{n as N}from"./mui-C6XtNCo7.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]="5fc3c077-92d8-4b99-a7f1-bae5afc93416",e._sentryDebugIdIdentifier="sentry-dbid-5fc3c077-92d8-4b99-a7f1-bae5afc93416")}catch{}})();const G=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
width: 100%;
|
|
5
|
-
flex: 1 1 auto;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`;function H(){const e=x(),n=j(),d=_(),f=v();let{accountId:a}=B(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,h]=u.useState(!1),y=z();u.useEffect((()=>{m||(h(!0),n(T(a??"",!1)))}),[m,n]);const o=p((t=>$(t,a??""))),b=()=>{const t=U(f.state?.pathnameStackToGoBack),k=t.poppedPathname??"..";e(k,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>C(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=E(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",S=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:S,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:l})})}export{H as Z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a0 as n}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import"./sentry-CItQHKpv.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]="f6941a2d-d06d-4ecc-903f-b350d6e88764",e._sentryDebugIdIdentifier="sentry-dbid-f6941a2d-d06d-4ecc-903f-b350d6e88764")}catch{}})();function r(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{br as u,dl as i}from"./zeni-epic-state-CqKBThJ0.js";import{G as $}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import"./sentry-CItQHKpv.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]="61189c2d-d040-4f20-9f69-8367ea8ac167",e._sentryDebugIdIdentifier="sentry-dbid-61189c2d-d040-4f20-9f69-8367ea8ac167")}catch{}})();const{dateFormat:{analytics:{YYYYDashMMDashDDFormat:s}}}=$.getLocalizedStrings();function D(e,n){return`/${n}/transaction/${encodeURIComponent(e.type)}/${e.id}`}const l=["prepaid_expenses","fixed_assets","accrued_expenses","one_time_accrual"];function R(e){return e!=null&&l.includes(e)}function U(e,n,o){return`${o.trim()===""?"":`/${o}`}/vendors/schedules/${e}/details/${n}`}const b=(e,n)=>e!=null&&e.length>0&&n!=null&&n.length>0;function y(e,n,o,t,a,d,r=!0){let c=`/${e}/transactions/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${a}/${d.startDate.format(s)}/${d.endDate.format(s)}/${encodeURIComponent(t)}`;return c=r===!1?`${c}/exclude_subaccounts`:`${c}/include_subaccounts`,c}const _=(e,n)=>({startDate:i(u(),n,Math.abs(e),"year"),endDate:u()});function g(e,n,o,t,a,d,r){return`/${e}/transactions/by-class/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function h(e,n,o,t,a,d,r){return`/${e}/transactions/by-project/${encodeURIComponent(o)}/${encodeURIComponent(n)}/${encodeURIComponent(t)}/${d}/${r.startDate.format(s)}/${r.endDate.format(s)}/${encodeURIComponent(a)}`}function x(e,n){return`/${n}/${e.type}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`}const v=(e,n,o,t)=>{let a=`/${o}/vendors/summary/${encodeURIComponent(e)}/vendor_${encodeURIComponent(n)}`;return t!=null&&(a+=`/${t.balanceTimeFrame}/${t.startDate.format(s)}/${t.endDate.format(s)}`),a};function w(e,n,o){let t=`/${e}/address`;return t=o!=null?t.concat(`/edit/${n}/${encodeURIComponent(o)}`):t.concat(`/new/${n}`),t}function Y(e){return`/${e}/vendors/schedules/prepaid_expenses`}function F(e){return`/${e}/vendors/schedules/fixed_assets`}const m=["explore","new_chat","routines","skills"];function M(e){return m.some((n=>n===e))}export{g as a,h as b,D as c,w as d,F as e,x as f,Y as g,b as h,R as i,M as j,_ as p,U as s,y as t,v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bt as n}from"./index-DlMGj3Af.js";import"./sentry-CItQHKpv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="4d67b72c-e724-47af-9238-03e07a44517b",e._sentryDebugIdIdentifier="sentry-dbid-4d67b72c-e724-47af-9238-03e07a44517b")}catch{}})();function f(){return n("dashboard")}export{f as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./sentry-CItQHKpv.js";import{h as b,g,i as h,j as S}from"./core-CMivCywN.js";import{fB as y}from"./zeni-epic-state-CqKBThJ0.js";import{a as k,a1 as C,d as A,ar as T,s as I,p as w,au as D}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.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]="48e71f66-4e39-4840-a6a5-757693f16425",e._sentryDebugIdIdentifier="sentry-dbid-48e71f66-4e39-4840-a6a5-757693f16425")}catch{}})();function B(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:r,setIsAiCfoOpen:i}=k(),s=b(),o=g(),{tenantEmailDomain:n}=h(),c=C(),f=D(c),d=A(),p=T(),m=S((a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0)),l=m?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:p&&d&&!r,onAskAiCfoClick:u.useCallback((()=>{if(n!=null)if(l)if(f){const a=w(o.state?.pathnameStackToGoBack,o.pathname);s(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else i(!0);else I({location:o,navigate:s,mergeState:{referrer:t}})}),[l,f,o,t,s,i,n])}}export{B as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./sentry-CItQHKpv.js";import{aK as _,aL as m}from"./index-DlMGj3Af.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]="d6d113d1-f575-4bfd-9cb1-c1cb87edadfc",e._sentryDebugIdIdentifier="sentry-dbid-d6d113d1-f575-4bfd-9cb1-c1cb87edadfc")}catch{}})();const v=e=>{const{events:n,onEvent:c,onSubscribed:h}=e,f=_(),y=r.useRef(c),p=r.useRef(h),g=r.useRef(0);r.useEffect((()=>{y.current=c}),[c]),r.useEffect((()=>{p.current=h}),[h]);const E=r.useMemo((()=>[...n].sort().join("|")),[n]);r.useEffect((()=>{if(f==null||n.length===0)return;const o=[],i=new Set,w=()=>{if(p.current==null)return;const t=Date.now();t-g.current<5e3||(g.current=t,p.current())};return n.forEach((t=>{const[d,u]=m(t);if(u==="")return;const b=f.channel(d),a=l=>{y.current(u,l)};let s;if(b?.subscribed===!0)s=b,s.bind(u,a),i.has(d)||(i.add(d),w()),o.push((()=>{b.unbind(u,a)}));else{if(s=b??f.subscribe(d),s.bind(u,a),!i.has(d)){i.add(d);const l=()=>{w()};s.bind("pusher:subscription_succeeded",l),o.push((()=>{s.unbind("pusher:subscription_succeeded",l)}))}o.push((()=>{s.unbind(u,a)}))}})),()=>{o.forEach((t=>t()))}}),[f,E])};export{v as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./sentry-CItQHKpv.js";import{u as P}from"./plaid-l8YRzpBD.js";import{u as x,j as m}from"./core-CMivCywN.js";import{UX as C,Fg as U,LO as R,Bv as w,UY as $,fB as F,gJ as N,B9 as T,UZ as B}from"./zeni-epic-state-CqKBThJ0.js";import{aJ as V,z as q}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="32cbb769-c6e3-494a-8757-4567f633f2ce",t._sentryDebugIdIdentifier="sentry-dbid-32cbb769-c6e3-494a-8757-4567f633f2ce")}catch{}})();const J=new Set($),Z=({companyId:t})=>{const n=x(),i=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.link_external_account)),s=m((e=>e.plaidAccountViewState.external_account.plaidConnectionDetails.update_account)),d=m((e=>C(e.paymentAccountState))),c=a.useRef(!1),[o,u]=a.useState(void 0),[r,l]=a.useState(!1);a.useEffect((()=>{n(U())}),[n]);const f=a.useCallback((e=>{t!=null&&(n(R(e,t,"external_account",void 0,o!=null?"update_account":"link_external_account")),c.current=!1,o!=null&&l(!0))}),[n,t,o]),A=a.useCallback((()=>{c.current=!1,u(void 0),l(!1)}),[]),p=o!=null?s:i,D=p.fetchStatus.fetchState==="Completed"?p.linkToken??null:null,{open:g,ready:h}=P({token:D,onSuccess:f,onExit:A});a.useEffect((()=>{c.current&&h&&(g(),c.current=!1)}),[h,g]);const b=p.fetchStatus.fetchState;a.useEffect((()=>{b==="Error"&&(c.current=!1)}),[b]);const E=a.useCallback((()=>{t!=null&&(u(void 0),c.current=!0,n(w("external_account","link_external_account")))}),[n,t]),v=a.useCallback((e=>{t!=null&&(u(e),l(!1),c.current=!0,n(w("external_account","update_account",e)))}),[n,t]),_=s.fetchStatus.fetchState==="In-Progress"||s.updateStatus.fetchState==="In-Progress"?"In-Progress":s.fetchStatus.fetchState==="Error"||r&&s.updateStatus.fetchState==="Error"?"Error":"Not-Started";return{plaidAccounts:a.useMemo((()=>d.map((e=>{const L=V(e.institutionDetails?.logo);return{accountId:e.paymentAccountId,name:e.institutionDetails?.institutionName??e.accountName,mask:e.accountLast4Digits,balanceFormatted:(S=e.balances?.current?.amount,y=e.balances?.current?.currencySymbol,S==null?"":`${y??"$"}${S.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`),isActive:J.has(e.providerVerificationStatus?.code??""),isLoginRequired:e.isLoginRequired,reLoginStatus:e.paymentAccountId===o?_:"Not-Started",institutionLogoUrl:L};var S,y}))),[d,o,_]),onAddPlaidAccount:E,onReLoginPlaidAccount:v}},I="email_connect_result",k="onboarding_step",G=()=>{const t=x(),n=m((o=>F(o).tenantId)),i=q.getSignedInUser()?.userId,s=a.useRef(!1),[d,c]=a.useState(null);return a.useEffect((()=>{if(s.current||i==null||i===""||n==null||n==="")return;const{consumed:o,onboardingStep:u}=(()=>{const r=new URL(window.location.href),l=r.searchParams.has(I),f=r.searchParams.get(k);return l||f!=null?(r.searchParams.delete(I),r.searchParams.delete(k),window.history.replaceState(window.history.state,"",`${r.pathname}${r.search}${r.hash}`),{consumed:l,onboardingStep:f}):{consumed:!1,onboardingStep:null}})();!o&&u==null||(s.current=!0,o&&(t(N(i,n)),c("email")),u!=null&&new Set(["connect_data_source"]).has(u)&&t(T({step:B(u)})))}),[t,n,i]),{pendingAutoFocusTabId:d}};export{Z as a,G as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./sentry-CItQHKpv.js";import{ay as c}from"./index-DlMGj3Af.js";import"./mui-C6XtNCo7.js";import{t as l}from"./core-CMivCywN.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="02e50011-dc27-4e0d-95d7-2d26ffe7c8b8",e._sentryDebugIdIdentifier="sentry-dbid-02e50011-dc27-4e0d-95d7-2d26ffe7c8b8")}catch{}})();function m(e,d){const{clearParams:f=!0}=d??{},[t,a]=l(),[i,o]=n.useState(),s=n.useRef(!1),u=n.useRef(!1);return n.useEffect((()=>{if(s.current||e==null||!(t.has("thread_id")||t.has("entity_type")))return;const r=c(t,e);r!=null&&(o(r),s.current=!0)}),[t,e]),n.useEffect((()=>{if(!s.current||u.current||!f||!(t.has("thread_id")||t.has("entity_type")))return;const r=new URLSearchParams(t);r.delete("thread_id"),r.delete("entity_type"),a(r,{replace:!0}),u.current=!0}),[t,a,f]),i}export{m as u};
|